]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
cse: Use simplify_replace_fn_rtx to process notes [PR94740]
[gcc.git] / gcc / c / ChangeLog
CommitLineData
e1113ffb
JJ
12020-04-19 Jakub Jelinek <jakub@redhat.com>
2
3 PR objc/94637
4 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
5 two CPP_COLON tokens.
6
2e389749
JJ
72020-04-17 Jakub Jelinek <jakub@redhat.com>
8
9 PR other/94629
10 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
11 to data.clauses.
12
2dc9294c
JJ
132020-04-15 Jakub Jelinek <jakub@redhat.com>
14
15 PR c/94593
16 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
17 requires directive when not at file scope.
18
13e41d8b
TB
192020-04-08 Tobias Burnus <tobias@codesourcery.com>
20
21 PR middle-end/94120
22 * c-decl.c (c_check_in_current_scope): New function.
23 * c-tree.h (c_check_in_current_scope): Declare it.
24 * c-parser.c (c_parser_oacc_declare): Add check that variables
25 are declared in the same scope as the directive. Fix handling
26 of namespace vars.
27
4df50a05
JJ
282020-04-07 Jakub Jelinek <jakub@redhat.com>
29
30 PR c++/94512
31 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
32 if c_parser_omp_master succeeded.
33
5db9e893
JJ
342020-03-23 Jakub Jelinek <jakub@redhat.com>
35
36 PR gcov-profile/94029
37 PR c/94239
38 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
39 the function_start_locus location. Don't do that afterwards for the
40 __GIMPLE body parsing.
41
9def91e9
JJ
422020-03-19 Jakub Jelinek <jakub@redhat.com>
43
44 PR gcov-profile/94029
45 * c-tree.h (finish_function): Add location_t argument defaulted to
46 input_location.
47 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
48 set it to the locus of closing } if non-NULL.
49 (c_parser_compound_statement_nostart): Return locus of closing }.
50 (c_parser_parse_rtl_body): Likewise.
51 (c_parser_declaration_or_fndef): Propagate locus of closing } to
52 finish_function.
53 * c-decl.c (finish_function): Add end_loc argument, use it instead of
54 input_location to set function_end_locus.
55
046c5890
JJ
562020-03-17 Jakub Jelinek <jakub@redhat.com>
57
58 PR c/94172
59 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
60 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
61 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
62 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
63 ENUMERAL_TYPEs.
64 (finish_incomplete_vars): New function, moved from finish_struct. Use
65 relayout_decl instead of layout_decl.
66 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
67 being TYPE_VFIELD. Use finish_incomplete_vars.
68 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
69 finish_incomplete_vars.
70 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
71 also on ENUMERAL_TYPEs.
72
c015ff8c
JJ
732020-03-16 Jakub Jelinek <jakub@redhat.com>
74
75 PR c/94179
76 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
77
f2e9fe5f
MS
782020-03-13 Martin Sebor <msebor@redhat.com>
79
80 PR c/94040
81 * c-decl.c (builtin_structptr_type_count): New constant.
82 (match_builtin_function_types): Reject decls that are incompatible
83 in types pointed to by pointers.
84 (diagnose_mismatched_decls): Adjust comments.
85
c9d70946
JM
862020-03-05 Joseph Myers <joseph@codesourcery.com>
87
88 PR c/93577
89 * c-typeck.c (pop_init_level): Do not diagnose initializers as
90 empty when initialized type is error_mark_node.
91 (set_designator, process_init_element): Ignore initializers for
92 elements of a variable-size type or of error_mark_node.
93
726e292d
MS
942020-03-01 Martin Sebor <msebor@redhat.com>
95
96 PR middle-end/93926
97 * c-decl.c (types_close_enough_to_match): New function.
98 (match_builtin_function_types):
99 (diagnose_mismatched_decls): Add missing inform call to a warning.
100
a499c2f8
MS
1012020-03-01 Martin Sebor <msebor@redhat.com>
102
103 PR c/93812
104 * c-typeck.c (build_functype_attribute_variant): New function.
105 (composite_type): Call it.
106
9c3da8cc
JJ
1072020-02-25 Jakub Jelinek <jakub@redhat.com>
108
109 PR other/93912
110 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
111 Rename last argument from probablity to probability.
112
bacdd5e9
JJ
1132020-02-13 Jakub Jelinek <jakub@redhat.com>
114
115 PR c/93576
116 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
117 *expr if it has side effects.
118
f9eb0973
JL
1192020-01-30 Jeff Law <law@redhat.com>
120
121 PR c/88660
122 * c-parser.c (c_parser_switch_statement): Make sure to request
123 marking the switch expr as used.
124
ac68e287
JM
1252020-01-22 Joseph Myers <joseph@codesourcery.com>
126
127 PR c/93348
128 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
129 argument with integer operands.
130
852f0ae8
KK
1312020-01-16 Kerem Kat <keremkat@gmail.com>
132
133 PR c/92833
134 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
135 to support 4 available tokens.
136
e2346a33
JM
1372020-01-15 Joseph Myers <joseph@codesourcery.com>
138
139 PR c/93072
140 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
141 determine whether to set DECL_CONTEXT.
142
3d77686d
JM
1432020-01-13 Joseph Myers <joseph@codesourcery.com>
144
145 PR c/93241
146 * c-typeck.c (build_c_cast): Check for expressions with integer
147 operands that can occur in an unevaluated part of an integer
148 constant expression and call note_integer_operands as needed.
149
f74c4b2c
RB
1502019-01-08 Richard Biener <rguenther@suse.de>
151
152 PR middle-end/93199
153 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
154 permanently.
155
8d9254fc
JJ
1562020-01-01 Jakub Jelinek <jakub@redhat.com>
157
158 Update copyright years.
159
39292e25
EB
1602019-12-20 Eric Botcazou <ebotcazou@adacore.com>
161
162 * c-decl.c (collect_source_ref_cb): Delete.
163 (for_each_global_decl): Rename into...
164 (collect_source_refs): ...this. Call collect_source_ref directly.
165 (c_parse_final_cleanups): Always call collect_source_ref on the main
166 input filename.
167
519d7496
JB
1682019-12-19 Julian Brown <julian@codesourcery.com>
169 Cesar Philippidis <cesar@codesourcery.com>
170
171 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
172 detach clauses.
173 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
174 Allow deref (->) in variable lists if true.
175 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
176 Pass to c_parser_omp_variable_list.
177 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
178 call to c_parser_omp_variable_list.
179 (c_parser_oacc_all_clauses): Support attach and detach clauses.
180 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
181 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
182 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
183 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
184 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
185 and detach. Support deref.
186 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
187 GOMP_MAP_ALWAYS_POINTER for OpenACC.
188 (c_oacc_check_attachments): New function.
189 (c_finish_omp_clauses): Check attach/detach arguments for being
190 pointers using above. Support deref.
191
a6163563
JB
1922019-12-19 Julian Brown <julian@codesourcery.com>
193 Maciej W. Rozycki <macro@codesourcery.com>
194 Tobias Burnus <tobias@codesourcery.com>
195 Thomas Schwinge <thomas@codesourcery.com>
196
197 * c-parser.c (c_parser_omp_clause_name): Support no_create.
198 (c_parser_oacc_data_clause): Likewise.
199 (c_parser_oacc_all_clauses): Likewise.
200 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
201 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
202 PRAGMA_OACC_CLAUSE_NO_CREATE.
203 * c-typeck.c (handle_omp_array_sections): Support
204 GOMP_MAP_NO_ALLOC.
205
d68f5d45
DM
2062019-12-09 David Malcolm <dmalcolm@redhat.com>
207
208 * c-objc-common.c (range_label_for_type_mismatch::get_text):
209 Replace label_text ctor calls.
210
4691bf46
JM
2112019-12-04 Joseph Myers <joseph@codesourcery.com>
212
213 PR c/36941
214 PR c/88827
215 * c-typeck.c (convert_lvalue_to_rvalue): Call
216 require_complete_type for arguments not of void types.
217 (build_indirect_ref): Do not diagnose dereferencing pointers to
218 incomplete types.
219 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
220
85d11957
JM
2212019-12-03 Joseph Myers <joseph@codesourcery.com>
222
223 PR c/88704
224 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
225 old-style parameter definitions.
226
4569f8b3
SL
2272019-12-01 Sandra Loosemore <sandra@codesourcery.com>
228
229 PR target/92499
230
231 * c-decl.c (flexible_array_type_p): Move to common code.
232
65ef05d0
RS
2332019-11-30 Richard Sandiford <richard.sandiford@arm.com>
234
235 * c-decl.c (start_decl): Allow initialization of variables whose
236 size is a POLY_INT_CST.
237 (finish_decl): Use verify_type_context to check whether the target
238 allows variables with a particular type to have static or thread-local
239 storage duration. Don't raise a second error if such variables do
240 not have a constant size.
241 (grokdeclarator): Use verify_type_context to check whether the
242 target allows fields or array elements to have a particular type.
243 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
244 the target allows pointer difference for the types involved.
245 (build_unary_op): Likewise for pointer increment and decrement.
246
34b43828
JM
2472019-11-29 Joseph Myers <joseph@codesourcery.com>
248
249 * c-parser.c (struct c_parser): Add members raw_tokens and
250 raw_tokens_used.
251 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
252 using previously-lexed raw tokens.
253 (c_parser_peek_nth_token_raw)
254 (c_parser_check_balanced_raw_token_sequence): New functions.
255 (c_parser_nth_token_starts_std_attributes): Use
256 c_parser_check_balanced_raw_token_sequence for Objective-C.
257
5b8d9367
JM
2582019-11-25 Joseph Myers <joseph@codesourcery.com>
259
260 PR c/91985
261 * c-decl.c (finish_declspecs): Use int instead of decimal
262 floating-point types if decimal floating-point not supported.
263
1723e1be
JM
2642019-11-25 Joseph Myers <joseph@codesourcery.com>
265
266 * c-tree.h (struct c_declarator): Use a structure for id member.
267 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
268 declarators at the start, not when handling individual declarators
269 later. Use u.id.id instead of u.id.
270 (grokfield): Use u.id.id instead of u.id.
271 (build_id_declarator): Set u.id.id and u.id.attrs.
272 (finish_declspecs): Handle postfix attributes in case of typedef
273 name or typeof used.
274 * c-parser.c (c_parser_direct_declarator)
275 (c_parser_direct_declarator_inner): Place declarator for
276 attributes inside that for function or array, not outside. Set
277 u.id.attrs for identifiers.
278 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
279 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
280 instead of u.id.
281
bdaf8be1
JJ
2822019-11-22 Jakub Jelinek <jakub@redhat.com>
283
284 PR c/90677
285 * c-decl.c (identifier_global_tag): Define.
286
3e00ba47
RB
2872019-11-20 Richard Biener <rguenther@suse.de>
288
289 PR c/92088
290 * c-decl.c (grokdeclarator): Prevent inlining of nested
291 function with VLA arguments.
292
8c5b727a
JM
2932019-11-20 Joseph Myers <joseph@codesourcery.com>
294
295 * c-decl.c (c_warn_type_attributes): New function.
296 (groktypename, grokdeclarator, finish_declspecs): Call
297 c_warn_type_attributes before applying attributes to types.
298 * c-tree.h (c_warn_type_attributes): Declare.
299
192961ff
JM
3002019-11-19 Joseph Myers <joseph@codesourcery.com>
301
302 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
303 standard attributes.
304 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
305 pedwarn for unknown standard attributes and return error_mark_node
306 for them.
307
20a38017
MM
3082019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
309
310 * c-parser.c (c_parser_parse_rtl_body): Always call
311 run_rtl_passes, even if startwith pass is not provided.
312
d5fbe5e0
JM
3132019-11-15 Joseph Myers <joseph@codesourcery.com>
314
315 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
316 duplicate standard attributes.
317
97cc1187
JM
3182019-11-15 Joseph Myers <joseph@codesourcery.com>
319
320 * c-decl.c (std_attribute_table): Add maybe_unused.
321
f8aea5e3
JM
3222019-11-15 Joseph Myers <joseph@codesourcery.com>
323
324 * c-decl.c (std_attribute_table): Add fallthrough.
325 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
326 attribute at top level.
327
2cc94aa8
JM
3282019-11-15 Joseph Myers <joseph@codesourcery.com>
329
330 * c-decl.c (std_attribute_table): New.
331 (c_init_decl_processing): Register attributes from
332 std_attribute_table.
333 * c-parser.c (c_parser_attribute_arguments): Add arguments
334 require_string and allow_empty_args. All callers changed.
335 (c_parser_std_attribute): Set require_string argument for
336 "deprecated" attribute.
337
7c5890cc
JM
3382019-11-14 Joseph Myers <joseph@codesourcery.com>
339
340 * c-parser.c (c_parser_postfix_expression)
341 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
342 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
343
e8738f4e
RS
3442019-11-14 Richard Sandiford <richard.sandiford@arm.com>
345
346 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
347 of build_same_sized_truth_vector_type.
348 (build_vec_cmp): Likewise.
349
b2417b59
JJ
3502019-11-14 Jakub Jelinek <jakub@redhat.com>
351
bedb7f04
JJ
352 * c-parser.c (c_parser_omp_context_selector): Don't require score
353 argument to fit into shwi, just to be INTEGER_CST. Diagnose
354 negative score.
355
b2417b59
JJ
356 * c-parser.c (c_parser_omp_context_selector): Rename
357 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
358 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
359 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
360 and string literals.
361
4e03c3a7
JM
3622019-11-14 Joseph Myers <joseph@codesourcery.com>
363
364 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
365 ctsk_tagfirstref_attrs.
366 (struct c_declspecs): Update description of attrs. Add
367 postfix_attrs and non_std_attrs_seen_p. Increase size of
368 typespec_kind bit-field.
369 (c_warn_unused_attributes): New declaration.
370 (parser_xref_tag): Update prototype.
371 * c-decl.c (c_warn_unused_attributes): New function.
372 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
373 ctsk_tagref_attrs. Handle attribute declarations.
374 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
375 (grokdeclarator): Handle standard attributes.
376 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
377 attributes to incomplete type reference.
378 (xref_tag): Update call to parser_xref_tag.
379 (declspecs_add_addrspace, declspecs_add_type)
380 (declspecs_add_scspec, declspecs_add_attrs): Set
381 non_std_attrs_seen_p.
382 (finish_declspecs): Apply postfix standard attributes to type.
383 * c-parser.c (c_token_starts_declspecs)
384 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
385 (c_parser_next_tokens_start_declaration): Update comments.
386 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
387 parser->tokens[2] to parser->tokens[1].
388 (c_parser_nth_token_starts_std_attributes)
389 (c_parser_std_attribute_specifier_sequence): New functions.
390 (c_parser_declaration_or_fndef): Add arguments have_attrs and
391 attrs. All callers changed. Handle standard attributes.
392 (c_parser_parms_declarator, c_parser_parms_list_declarator)
393 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
394 All callers changed.
395 (c_parser_declspecs): Add arguments start_std_attr_ok and
396 end_std_attr_ok. All callers changed. Handle standard
397 attributes.
398 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
399 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
400 (c_parser_compound_statement_nostart, c_parser_all_labels)
401 (c_parser_label, c_parser_statement, c_parser_for_statement):
402 Handle standard attributes.
403 * c-parser.h (c_parser_declspecs): Update prototype.
404 * gimple-parser.c (c_parser_gimple_declaration): Update call to
405 c_parser_declspecs.
406
0c29cac4
ML
4072019-11-12 Martin Liska <mliska@suse.cz>
408
409 * gimple-parser.c: Do not include params.h.
410
028d4092
ML
4112019-11-12 Martin Liska <mliska@suse.cz>
412
413 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
414 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
415 macro.
416
62aee289
MR
4172019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
418 Frederik Harwath <frederik@codesourcery.com>
419
420 gcc/c/
421 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
422 (c_parser_oacc_kernels_parallel): Rename function to...
423 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
424 (c_parser_omp_construct): Update accordingly.
425
426
7cec9588
JJ
4272019-11-11 Jakub Jelinek <jakub@redhat.com>
428
429 * c-parser.c (c_parser_translation_unit): Diagnose declare target
430 without corresponding end declare target.
431
f486280c
RS
4322019-11-08 Richard Sandiford <richard.sandiford@arm.com>
433
434 * c-convert.c (convert): Only handle vector conversions if one of
435 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
436 allows it.
437 * c-typeck.c (build_array_ref): Only allow vector indexing if the
438 vectors satisfy gnu_vector_type_p.
439 (build_unary_op): Only allow unary operators to be applied to
440 vectors if they satisfy gnu_vector_type_p.
441 (digest_init): Only allow by-element initialization of vectors
442 if they satisfy gnu_vector_type_p.
443 (really_start_incremental_init): Likewise.
444 (push_init_level): Likewise.
445 (pop_init_level): Likewise.
446 (process_init_element): Likewise.
447 (build_binary_op): Only allow binary operators to be applied to
448 vectors if they satisfy gnu_vector_type_p.
449
017c6491
JM
4502019-11-08 Joseph Myers <joseph@codesourcery.com>
451
452 * c-decl.c (grokparms): Convert () in a function definition to
453 (void) for C2x.
454 (store_parm_decls_oldstyle): Pedwarn for C2x.
455 (store_parm_decls): Update comment about () not generating a
456 prototype.
457
c01bd174
JM
4582019-11-07 Joseph Myers <joseph@codesourcery.com>
459
460 * c-parser.c (c_parser_attribute_arguments): New function.
461 Factored out of c_parser_gnu_attribute.
462 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
463 (c_parser_balanced_token_sequence, c_parser_std_attribute)
464 (c_parser_std_attribute_specifier): New functions.
465 (c_parser_transaction_attributes): Use
466 c_parser_std_attribute_specifier.
467
471c5330
JM
4682019-11-07 Joseph Myers <joseph@codesourcery.com>
469
470 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
471 lex_joined_string and translate_strings_p.
472 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
473 c_lex_with_flags.
474 (c_parser_string_literal): New function.
475 (c_parser_static_assert_declaration_no_semi): Use
476 c_parser_string_literal. Do not set lex_untranslated_string.
477 (c_parser_asm_string_literal): Use c_parser_string_literal.
478 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
479 (c_parser_gnu_attributes): Set and restore translate_strings_p
480 instead of lex_untranslated_string.
481 (c_parser_asm_statement): Do not set lex_untranslated_string.
482 (c_parser_asm_operands): Likewise.
483 (c_parser_has_attribute_expression): Set and restore
484 translate_strings_p instead of lex_untranslated_string.
485 (c_parser_postfix_expression): Use c_parser_string_literal.
486 (pragma_lex): Likewise.
487 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
488 (c_parse_file): Set translate_strings_p.
489 * gimple-parser.c (c_parser_gimple_postfix_expression)
490 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
491 * c-parser.c (c_parser_string_literal): Declare function.
492
d0c464d2
JJ
4932019-11-02 Jakub Jelinek <jakub@redhat.com>
494
495 * c-parser.c (c_finish_omp_declare_variant): Use
496 omp_get_context_selector instead of c_omp_get_context_selector.
497
ac2cfa6c
RS
4982019-10-29 Richard Sandiford <richard.sandiford@arm.com>
499
500 * c-tree.h (c_simulate_enum_decl): Declare.
501 * c-decl.c (c_simulate_enum_decl): New function.
502 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
503
74078538
RS
5042019-10-29 Richard Sandiford <richard.sandiford@arm.com>
505
506 * c-tree.h (c_simulate_builtin_function_decl): Declare.
507 * c-decl.c (c_simulate_builtin_function_decl): New function.
508 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
509 to the above.
510
ad1539d5
MS
5112019-10-28 Martin Sebor <msebor@redhat.com>
512
513 PR c/66970
514 * c-decl.c (names_builtin_p): Define a new function.
515
cb73e4e7
RB
5162019-10-28 Richard Biener <rguenther@suse.de>
517
518 PR c/92249
519 * gimple-parser.c (c_parser_parse_gimple_body): Make
520 current_bb the entry block initially to easier recover
521 from errors.
522 (c_parser_gimple_compound_statement): Adjust.
523
135df52c
JJ
5242019-10-24 Jakub Jelinek <jakub@redhat.com>
525
526 * c-parser.c (c_finish_omp_declare_variant): Use
527 omp_context_selector_matches instead of
528 c_omp_context_selector_matches.
529 * c-decl.c (c_decl_attributes): Add "omp declare target block"
530 attribute in between declare target and end declare target
531 pragmas.
532
783bfe5e
JM
5332019-10-15 Joseph Myers <joseph@codesourcery.com>
534
535 * c-parser.c (c_parser_attribute_any_word): Rename to
536 c_parser_gnu_attribute_any_word. All callers changed.
537 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
538 callers changed.
539 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
540 callers changed.
541 (c_parser_declaration_or_fndef, c_parser_declspecs)
542 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
543 (c_parser_struct_declaration, c_parser_declarator)
544 (c_parser_gnu_attribute, c_parser_compound_statement)
545 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
546 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
547 attribute-related syntax productions.
548
56898e43
RS
5492019-10-14 Richard Sandiford <richard.sandiford@arm.com>
550
551 * c-objc-common.c (useful_aka_type_p): Replace with...
552 (get_aka_type): ...this new function. Given the original type,
553 decide which aka type to print (if any). Only look through typedefs
554 if user_facing_original_type_p.
555 (print_type): Update accordingly.
556
b9424661
JJ
5572019-10-14 Jakub Jelinek <jakub@redhat.com>
558
559 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
560 into int NESTED, if it is 2, diagnose missing commas in between
561 clauses.
562 (c_parser_omp_context_selector): Pass 2 as last argument to
563 c_parser_omp_all_clauses.
564
20de9568
JJ
5652019-10-12 Jakub Jelinek <jakub@redhat.com>
566
567 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
568 For simd properties, put them directly into TREE_VALUE.
569 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
570 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
571 add "omp declare variant base" attribute rather than
572 "omp declare variant".
573
fe2bc27c
JM
5742019-10-11 Joseph Myers <joseph@codesourcery.com>
575
576 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
577
94e7f906
JJ
5782019-10-10 Jakub Jelinek <jakub@redhat.com>
579
580 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
581 true, terminate processing on closing paren and don't skip to end of
582 pragma line.
583 (c_parser_omp_declare_simd): Handle also declare variant.
584 (omp_construct_selectors, omp_device_selectors,
585 omp_implementation_selectors, omp_user_selectors): New variables.
586 (c_parser_omp_context_selector,
587 c_parser_omp_context_selector_specification,
588 c_finish_omp_declare_variant): New functions.
589 (c_finish_omp_declare_simd): Handle both declare simd and
590 declare variant.
591 (c_parser_omp_declare): Handle declare variant.
592
93313b94
JM
5932019-10-02 Joseph Myers <joseph@codesourcery.com>
594
595 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
596 CPP_COLON tokens.
597
55879815
RS
5982019-10-01 Richard Sandiford <richard.sandiford@arm.com>
599
600 * c-objc-common.c (useful_aka_type_p): New function.
601 (print_type): Use it to decide whether an aka type is worth printing.
602
59bc434a
JJ
6032019-09-27 Jakub Jelinek <jakub@redhat.com>
604
605 PR c++/88203
606 * c-parser.c (c_parser_predefined_identifier): New function.
607 (c_parser_postfix_expression): Use it.
608 (c_parser_omp_variable_list): Parse predefined identifiers.
609 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
610 in shared and firstprivate clauses, even when they are predetermined
611 shared.
612
c6447c20
RS
6132019-09-27 Richard Sandiford <richard.sandiford@arm.com>
614
615 * c-typeck.c (build_function_call_vec): Take the original function
616 decl as an optional final parameter. Pass all built-in calls to
617 check_builtin_function_arguments.
618
522da4c2
EB
6192019-09-20 Eric Botcazou <ebotcazou@adacore.com>
620
621 PR c/91815
622 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
623 of identifiers in the external scope only for variables and functions.
624
68e2c199
PK
6252019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
626
627 PR c/78736
628 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
629
22f8849d
IS
6302019-08-23 Iain Sandoe <iain@sandoe.co.uk>
631
632 PR pch/61250
633 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
634 after determining that the first token is not
635 PRAGMA_GCC_PCH_PREPROCESS.
636
db376f45
EB
6372019-08-22 Eric Botcazou <ebotcazou@adacore.com>
638
639 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
640 FUNCTION_DECL to the right value in the presence of nested declarators.
641
4d732405
RS
6422019-08-13 Richard Sandiford <richard.sandiford@arm.com>
643
644 PR middle-end/91421
645 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
646
cb1180d5
RS
6472019-08-13 Richard Sandiford <richard.sandiford@arm.com>
648
649 PR middle-end/91421
650 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
651 of a built_in_function.
652 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
653
77eb117f
JJ
6542019-08-10 Jakub Jelinek <jakub@redhat.com>
655
656 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
657 (c_parser_omp_clause_device_type): New function.
658 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
659 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
660 (c_parser_omp_declare_target): Handle device_type clauses. Remove
661 diagnostics for declare target with clauses nested in clause-less
662 declare target declaration-definition-seq.
663 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
664
2c3b8bad
JJ
6652019-08-09 Jakub Jelinek <jakub@redhat.com>
666
bb522e2e
JJ
667 * c-parser.c (check_no_duplicate_clause): Simplify using
668 omp_find_clause.
669 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
670 directive name modifiers.
671 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
672
2c3b8bad
JJ
673 PR c/91401
674 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
675 check_no_duplicate_clause call. Comment it out, instead emit a
676 warning for duplicate dist_schedule clauses.
677
99769e7f
RS
6782019-08-08 Richard Sandiford <richard.sandiford@arm.com>
679
680 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
681
8860d270
JJ
6822019-08-08 Jakub Jelinek <jakub@redhat.com>
683
684 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
685 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
686 instead of generic_head to track duplicates.
687
398e3feb
JJ
6882019-08-07 Jakub Jelinek <jakub@redhat.com>
689
690 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
691 (c_parser_omp_clause_use_device_addr): New function.
692 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
693 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
694 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
695 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
696 map or use_device_* clauses.
697 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
698 in OpenMP, require pointer type rather than pointer or array type.
699 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
700
a28351e7
JJ
7012019-07-31 Jakub Jelinek <jakub@redhat.com>
702
703 PR c/91192
704 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
705 even if finish is UNKNOWN_LOCATION, just use start as finish in that
706 case.
707
6343b6bf
ML
7082019-07-25 Martin Liska <mliska@suse.cz>
709 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
710
711 PR c++/23383
712 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
713
cb50701e
ML
7142019-07-25 Martin Liska <mliska@suse.cz>
715
716 * c-decl.c (merge_decls): Use new macros
717 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
718
62e3e66f
RB
7192019-07-23 Richard Biener <rguenther@suse.de>
720
721 PR tree-optimization/83518
722 * gimple-parser.c (c_parser_parse_gimple_body): When we have
723 a CFG also rebuild cgraph edges.
724
554a530f
JJ
7252019-07-20 Jakub Jelinek <jakub@redhat.com>
726
727 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
728 (c_parser_omp_clause_bind): New function.
729 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
730 (OMP_LOOP_CLAUSE_MASK): Define.
731 (c_parser_omp_loop): New function.
732 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
733 loop combined with parallel or teams.
734 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
735 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
736
d119bf79
RS
7372019-07-18 Richard Sandiford <richard.sandiford@arm.com>
738
739 PR c/53633
740 * c-decl.c (finish_function): Check targetm.warn_func_return
741 before issuing a -Wreturn-type warning.
742
ab20d992 7432019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
744
745 * gimple-parser.c (c_parser_gimple_try_stmt): New.
746 (c_parser_compound_statement): Call it.
747
1fdd6f04
JJ
7482019-07-12 Jakub Jelinek <jakub@redhat.com>
749
750 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
751 (c_parser_omp_clause_order): New function.
752 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
753 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
754 PRAGMA_OMP_CLAUSE_ORDER.
755 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
756
8389386c
RB
7572019-07-10 Richard Biener <rguenther@suse.de>
758
759 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
760 _Literal (int *) &x for address literals.
761
99b1c316
MS
7622019-07-09 Martin Sebor <msebor@redhat.com>
763
764 PR c++/61339
765 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
766 to class.
767 (field_decl_cmp): Same.
768 * c-parser.c (c_parser_struct_or_union_specifier): Same.
769 * c-tree.h: Same.
770 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
771
6c1dae73
MS
7722019-07-09 Martin Sebor <msebor@redhat.com>
773
774 PR c++/61339
775 * c-decl.c: Change class-key from class to struct and vice versa
776 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
777 * gimple-parser.c: Same.
778
69b5279e
RB
7792019-07-01 Richard Biener <rguenther@suse.de>
780
781 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
782 _Literal (char *) &"foo" for address literals pointing to
783 STRING_CSTs.
784
ab20d992
JJ
7852019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
786
787 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
788 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
789 C incompatibility if alternate "__intN__" form is used.
790
1e3d475e
MS
7912019-06-24 Martin Sebor <msebor@redhat.com>
792
793 * c-typeck.c (build_binary_op): Hyphenate floating-point.
794
bf38f7e9
JJ
7952019-06-10 Jakub Jelinek <jakub@redhat.com>
796
797 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
798 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
799 (c_parser_omp_scan_loop_body): New function.
800 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
801 inscan reduction clauses.
802 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
803 non-inscan reductions on the same construct, or inscan reductions with
804 ordered or schedule clauses, or inscan array reductions.
805
65985d78
MS
8062019-06-05 Martin Sebor <msebor@redhat.com>
807
808 PR c/90737
809 * c-typeck.c (c_finish_return): Only consider functions returning
810 pointers as candidates for -Wreturn-local-addr.
811
0ecf545c
MS
8122019-06-05 Martin Sebor <msebor@redhat.com>
813
814 * c-decl.c (start_decl): Adjust quoting and hyphenation
815 in diagnostics.
816 (finish_decl): Same.
817 (finish_enum): Same.
818 (start_function): Same.
819 (declspecs_add_type): Same.
820 * c-parser.c (warn_for_abs): Same.
821 * c-typeck.c (build_binary_op): Same.
822
e03436e7
TS
8232019-05-17 Thomas Schwinge <thomas@codesourcery.com>
824
b48f44bf
TS
825 PR c/89433
826 * c-parser.c (c_finish_oacc_routine): Rework checking if already
827 marked with an OpenACC 'routine' directive.
828
5bf04509
TS
829 PR c/89433
830 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
831 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
832
e03436e7
TS
833 PR c/89433
834 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
835 clauses from "omp declare target" attribute.
836
a9c697b8
MS
8372019-05-16 Martin Sebor <msebor@redhat.com>
838
ab20d992
JJ
839 * c-decl.c (start_decl): Quote keywords, operators, and
840 types in diagnostics.
841 (finish_decl): Same.
842 * c-parser.c (c_parser_asm_statement): Same.
843 (c_parser_conditional_expression): Same.
844 (c_parser_transaction_cancel): Same.
845 * c-typeck.c (c_common_type): Same.
846 (build_conditional_expr): Same.
847 (digest_init): Same.
848 (process_init_element): Same.
849 (build_binary_op): Same.
a9c697b8 850
c4499192
RB
8512019-05-17 Richard Biener <rguenther@suse.de>
852
853 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
854 (c_parser_gimple_unary_expression): Likewise.
855 (c_parser_gimple_parentized_ternary_expression): New function.
856
adfe6e4b
RB
8572019-05-16 Richard Biener <rguenther@suse.de>
858
859 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
860 (c_parser_gimple_unary_expression): Likewise.
861
186dabf2
RB
8622019-05-15 Richard Biener <rguenther@suse.de>
863
864 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
865 __BIT_FIELD_REF.
866
1158c5b4
RB
8672019-05-14 Richard Biener <rguenther@suse.de>
868
869 * gimple-parser.c (c_parser_gimple_statement): Remove
870 questionable auto-promotion to VIEW_CONVERT_EXPR.
871 (c_parser_gimple_typespec): Split out from __MEM parsing.
872 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
873 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
874 as __VIEW_CONVERT with -gimple.
875
fd4485aa
ML
8762019-05-09 Martin Liska <mliska@suse.cz>
877
878 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
879 __MAX.
880 (c_parser_gimple_unary_expression): Parse also binary expression
881 __MIN and __MAX.
882 (c_parser_gimple_parentized_binary_expression): New function.
883
d276406a
ML
8842019-05-09 Martin Liska <mliska@suse.cz>
885
886 * gimple-parser.c (struct gimple_parser): Add probability.
887 for gimple_parser_edge.
888 (gimple_parser::push_edge): Add new argument probability.
889 (c_parser_gimple_parse_bb_spec): Parse also probability
890 if present.
891 (c_parser_parse_gimple_body): Set edge probability.
892 (c_parser_gimple_compound_statement): Consume token
893 before calling c_parser_gimple_goto_stmt.
894 Parse BB counts.
895 (c_parser_gimple_statement): Pass new argument.
896 (c_parser_gimple_goto_stmt): Likewise.
897 (c_parser_gimple_if_stmt): Likewise.
898 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
899 * c-parser.c (c_parser_declaration_or_fndef): Pass
900 hot_bb_threshold argument.
901 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
902 field.
903 (c_parser_gimple_parse_bb_spec_edge_probability): New.
904
f179b64e
JJ
9052019-04-26 Jakub Jelinek <jakub@redhat.com>
906
907 PR debug/90197
908 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
909 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
910 (c_parser_do_statement): Likewise.
911 (c_parser_for_statement): Likewise. Formatting fixes.
912 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
913 emit DEBUG_BEGIN_STMTs if needed.
914
e7178413
JJ
9152019-04-19 Jakub Jelinek <jakub@redhat.com>
916
c280b7ee
JJ
917 PR c/89888
918 * c-typeck.c (struct c_switch): Remove outside_range_p member.
919 (c_start_case): Don't clear it.
920 (do_case): Adjust c_add_case_label caller.
921 (c_finish_case): Adjust c_do_switch_warnings caller.
922
e7178413
JJ
923 PR c++/90108
924 * c-decl.c (merge_decls): If remove is main variant and
925 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
926 variant that has newdecl as TYPE_NAME if any.
927
60a2c645
JJ
9282019-04-12 Jakub Jelinek <jakub@redhat.com>
929
930 PR c/89933
931 * c-decl.c (merge_decls): When newdecl's type is its main variant,
932 don't try to remove it from the variant list, but instead assert
933 it has no variants.
934
2a82beaa
RB
9352019-04-01 Richard Biener <rguenther@suse.de>
936
937 PR c/71598
938 * c-tree.h (c_get_alias_set): Declare.
939 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
940 * c-objc-common.c (c_get_alias_set): Treat enumeral types
941 as the underlying integer type.
942
bec1da64
MS
9432019-03-19 Martin Sebor <msebor@redhat.com>
944
945 PR tree-optimization/89688
946 * c-decl.c (finish_decl): Call braced_lists_to_string for more
947 kinds of initializers.
948
855cd9b1
JJ
9492019-03-19 Jakub Jelinek <jakub@redhat.com>
950
951 PR c/89734
952 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
953 return type even if quals_used is 0. Formatting fixes.
954
baa09dc5
RB
9552019-03-14 Richard Biener <rguenther@suse.de>
956
957 * c-tree.h (enum c_declspec_il): New.
958 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
959 enum bitfield.
960 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
961 Pass start pass and declspec_il to c_parser_parse_gimple_body.
962 (c_parser_declspecs): Adjust.
963 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
964 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
965 and bitmap.h.
966 (struct gimple_parser): New.
967 (gimple_parser::push_edge): New method.
968 (c_parser_gimple_parse_bb_spec): New helper.
969 (c_parser_parse_gimple_body): Get start pass and IL specification.
970 Initialize SSA and CFG.
971 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
972 Build a gimple_parser parsing state and pass it along.
973 (c_parser_gimple_statement): Change intermittend __PHI internal
974 function argument for the edge.
975 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
976 (c_parser_gimple_goto_stmt): Record edges to build.
977 (c_parser_gimple_if_stmt): Likewise.
978 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
979 (c_parser_gimple_or_rtl_pass_list): Likewise.
980
a3f9f006
ML
9812019-03-11 Martin Liska <mliska@suse.cz>
982
983 * c-decl.c (check_for_loop_decls): Wrap an option name
984 in a string format message and fix GNU coding style.
985 * c-parser.c (c_parser_declspecs): Likewise.
986
1db01ff9
JJ
9872019-03-08 Jakub Jelinek <jakub@redhat.com>
988
989 PR tree-optimization/89550
990 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
991 returned true.
992 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
993 or warning returned true.
994
66dcb747
JJ
9952019-02-28 Jakub Jelinek <jakub@redhat.com>
996
997 PR c/89525
998 * c-typeck.c (convert_arguments): Call inform_declaration only if
999 the previous warning_at call returned true.
1000
2263c9f2
TS
10012019-02-22 Thomas Schwinge <thomas@codesourcery.com>
1002
1003 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
1004 parameter. Adjust all users.
1005 (c_parser_oacc_simple_clause): Replace parser with loc formal
1006 parameter. Adjust all users.
1007
ab20d992 10082019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
1009
1010 PR c/87924
1011 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
1012 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
1013
5f88ba10
JJ
10142019-02-15 Jakub Jelinek <jakub@redhat.com>
1015
1016 PR c/89340
1017 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
1018 before c_decl_attributes rather than after it.
1019
cfc30fd1
JJ
10202019-02-06 Jakub Jelinek <jakub@redhat.com>
1021
1022 PR c/89211
1023 * c-parser.c (c_parser_declaration_or_fndef): Don't update
1024 DECL_ARGUMENTS of d if it has been defined already. Use a single if
1025 instead of 3 nested ifs.
1026
fbe83e6b
JM
10272019-02-06 Joseph Myers <joseph@codesourcery.com>
1028
1029 PR c/88584
1030 * c-decl.c (finish_decl): Do not complete array types for arrays
1031 with external linkage not at file scope.
1032
f461f938
RB
10332019-02-05 Richard Biener <rguenther@suse.de>
1034
1035 PR c/88606
1036 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
1037 all type variants when not supported.
1038
fe509359
JJ
10392019-01-30 Jakub Jelinek <jakub@redhat.com>
1040
1041 PR c/89061
1042 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
1043 * c-decl.c (decl_jump_unsafe): Return false for
1044 C_DECL_COMPOUND_LITERAL_P decls.
1045 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
1046
6a335b96
JJ
10472019-01-29 Jakub Jelinek <jakub@redhat.com>
1048
f4b7e754
JJ
1049 PR c/89045
1050 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
1051 scope.
1052
6a335b96
JJ
1053 PR c/86125
1054 * c-decl.c (last_fileptr_type): Remove.
1055 (last_structptr_types): New variable.
1056 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
1057 {old,new}rettype instead of the types themselves. Assert
1058 last_structptr_types array has the same number of elements
1059 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
1060 argument oldtype and newtype. Instead of handling
1061 just fileptr_type_node specially, handle all builtin_structptr_types
1062 pointer nodes. Formatting fix.
1063
d8b5a1a0
MS
10642019-01-24 Martin Sebor <msebor@redhat.com>
1065
1066 PR c/86125
1067 PR c/88886
1068 PR middle-end/86308
1069 * c-decl.c (match_builtin_function_types): Add arguments.
1070 (diagnose_mismatched_decls): Diagnose mismatched declarations
1071 of built-ins more strictly.
1072
e21c4491
JJ
10732019-01-24 Jakub Jelinek <jakub@redhat.com>
1074
1075 PR c++/88976
1076 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
1077 on #pragma omp cancel with different modifiers.
1078
420183d9
L
10792019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1080
1081 PR c/51628
1082 PR c/88664
1083 * c-typeck.c (convert_for_assignment): Upate the
1084 warn_for_address_or_pointer_of_packed_member call.
1085
17ad43dd
TH
10862019-01-16 Tom Honermann <tom@honermann.net>
1087 Jason Merrill <jason@redhat.com>
1088
1089 * c-typeck.c (digest_init): Revised the error message produced for
1090 ill-formed cases of array initialization with a string literal.
1091 (error_init): Make variadic.
1092
5f07d78a
JJ
10932019-01-12 Jakub Jelinek <jakub@redhat.com>
1094
1095 * c-typeck.c (convert_for_assignment): Fix a comment typo.
1096
c4581bbf
JJ
10972019-01-07 Jakub Jelinek <jakub@redhat.com>
1098
1099 PR c/88701
1100 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
1101 if current_function_decl is non-NULL.
1102
65c5b1eb
JM
11032019-01-07 Joseph Myers <joseph@codesourcery.com>
1104
1105 PR c/88720
1106 PR c/88726
1107 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
1108 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
1109 functions declared but never defined only for external scope, not
1110 for other scopes.
1111
d8fcab68
JJ
11122019-01-07 Jakub Jelinek <jakub@redhat.com>
1113
1114 PR c++/85052
1115 * c-parser.c (c_parser_postfix_expression): Parse
1116 __builtin_convertvector.
1117
a5544970
JJ
11182019-01-01 Jakub Jelinek <jakub@redhat.com>
1119
1120 Update copyright years.
1121
da77eace
L
11222018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1123
1124 PR c/51628
1125 * c-typeck.c (convert_for_assignment): Call
1126 warn_for_address_or_pointer_of_packed_member.
1127
1edf8866
SB
11282018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1129
1130 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
1131 a more specific error message (instead of just falling through).
1132
db4fd626
SB
11332018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1134
1135 * c-parser.c (c_parser_asm_statement): Keep track of the location each
1136 asm qualifier is first seen; use that to give nicer "duplicate asm
1137 qualifier" messages. Delete 'quals" variable, instead pass the
1138 "is_volatile_ flag to build_asm_stmt directly.
1139 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
1140 * c-typeck.c (build_asm_stmt): Ditto; adjust.
1141
9c9cfcbb
SB
11422018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
1143
1144 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
1145 "done" boolean variable.
1146
a14feb3c
DM
11472018-12-19 David Malcolm <dmalcolm@redhat.com>
1148
1149 PR c++/87504
1150 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
1151 Move from here to gcc-rich-location.h and gcc-rich-location.c.
1152 (build_binary_op): Use struct op_location_t and
1153 class binary_op_rich_location.
1154
6d939173
JJ
11552018-12-11 Jakub Jelinek <jakub@redhat.com>
1156
1157 PR sanitizer/88426
1158 * c-convert.c (convert): Call c_fully_fold before calling
1159 ubsan_instrument_float_cast.
1160
b7055028
SB
11612018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
1162
1163 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
1164 setting "quals".
1165
5b76e75f
SB
11662018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1167
1168 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
1169 after asm. Pass a flag for it to build_asm_expr.
1170 * c-tree.h (build_asm_expr): Update declaration.
1171 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
1172 set ASM_INLINE_P.
1173
30bd42b9
SB
11742018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
1175
1176 PR inline-asm/55681
1177 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
1178 combination of volatile and goto, in any order, without repetitions.
1179
9df6c0e4
JB
11802018-12-04 James Norris <jnorris@codesourcery.com>
1181 Cesar Philippidis <cesar@codesourcery.com>
1182 Julian Brown <julian@codesourcery.com>
1183
1184 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
1185 code.
1186
f44697b7
RB
11872018-11-30 Richard Biener <rguenther@suse.de>
1188
1189 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
1190 _Literal (type) { ... } as empty aggregate or vector constructor.
1191
550dfbdc
MS
11922018-11-29 Martin Sebor <msebor@redhat.com>
1193
1194 PR c/88091
1195 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
1196 (convert_arguments): Add comments. Pass additional argument to
1197 the function above.
1198
673670da
MS
11992018-11-29 Martin Sebor <msebor@redhat.com>
1200
1201 PR c/88172
1202 PR testsuite/88208
1203 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
1204
db1d09b0
MS
12052018-11-23 Martin Sebor <msebor@redhat.com>
1206
1207 PR testsuite/88098
1208 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
1209 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
1210
98f08eb8
MS
12112018-11-20 Martin Sebor <msebor@redhat.com>
1212
1213 * c-parser.c (c_parser_has_attribute_expression): New function.
1214 (c_parser_attribute): New function.
1215 (c_parser_attributes): Move code into c_parser_attribute.
1216 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
1217
cd5da983
MS
12182018-11-15 Martin Sebor <msebor@redhat.com>
1219
1220 PR c/83656
1221 * c-decl.c (header_for_builtin_fn): Declare.
1222 (diagnose_mismatched_decls): Diagnose declarations of built-in
1223 functions without a prototype.
1224 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
1225 (convert_argument): Same.
1226 (convert_arguments): Factor code out into convert_argument.
1227 Detect mismatches between built-in formal arguments in calls
1228 to built-in without prototype.
1229 (build_conditional_expr): Same.
1230 (type_or_builtin_type): New function.
1231 (convert_for_assignment): Add argument. Conditionally issue
1232 warnings instead of errors for mismatches.
1233
620e594b
DM
12342018-11-13 David Malcolm <dmalcolm@redhat.com>
1235
1236 * c-decl.c: Replace "source_location" with "location_t".
1237 * c-tree.h: Likewise.
1238 * c-typeck.c: Likewise.
1239 * gimple-parser.c: Likewise.
1240
3179ebae
JJ
12412018-11-09 Jakub Jelinek <jakub@redhat.com>
1242
81a227c6
JJ
1243 * c-parser.c (c_parser_omp_clause_final): Use
1244 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
1245 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
1246 parsing instead of c_parser_paren_condition.
1247 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
1248 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
1249 c_fully_fold instead of c_parser_condition.
1250 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
1251 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
1252 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
1253 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
1254 c_parser_expr_no_commas instead of c_parser_expression.
1255
98c91c56
JJ
1256 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
1257 reduction clause with inscan modifier.
1258
3179ebae
JJ
1259 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
1260 clauses other than atomic_default_mem_order.
1261
28567c40
JJ
12622018-11-08 Jakub Jelinek <jakub@redhat.com>
1263
1264 * c-parser.c: Include memmode.h.
1265 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
1266 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
1267 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
1268 task_reduction clauses.
1269 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
1270 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
1271 section, or lvalue assignment expression.
1272 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
1273 (c_parser_omp_clause_lastprivate): Parse optional
1274 conditional: modifier.
1275 (c_parser_omp_clause_hint): Require constant integer expression rather
1276 than just integer expression.
1277 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
1278 clause.
1279 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
1280 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
1281 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
1282 functions.
1283 (c_parser_omp_clause_depend): Parse iterator modifier and handle
1284 iterators. Parse mutexinoutset and depobj kinds.
1285 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
1286 callers.
1287 (c_parser_omp_all_clauses): Likewise. Handle
1288 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
1289 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1290 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
1291 default memory order from requires directive if any. Adjust
1292 c_finish_omp_atomic caller.
1293 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
1294 (c_parser_omp_flush): Parse flush with memory-order-clause.
1295 (c_parser_omp_for_loop): Allow NE_EXPR even in
1296 OpenMP loops, adjust c_finish_omp_for caller.
1297 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
1298 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
1299 Allow to be called while parsing combined parallel master.
1300 Parse combined master taskloop{, simd}.
1301 (c_parser_omp_parallel): Parse combined
1302 parallel master{, taskloop{, simd}} constructs.
1303 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
1304 (OMP_TASKGROUP_CLAUSE_MASK): Define.
1305 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
1306 (OMP_TASKWAIT_CLAUSE_MASK): Define.
1307 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
1308 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
1309 around teams body. Use SET_EXPR_LOCATION.
1310 (c_parser_omp_target_data): Allow target data
1311 with only use_device_ptr clauses.
1312 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
1313 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
1314 (c_parser_omp_requires): New function.
1315 (c_finish_taskloop_clauses): New function.
1316 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
1317 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
1318 declaration. Disallow in_reduction clause when combined with parallel
1319 master.
1320 (c_parser_omp_construct): Adjust c_parser_omp_master and
1321 c_parser_omp_taskgroup callers.
1322 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
1323 other than cancel.
1324 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
1325 like OMP_CLAUSE_REDUCTION.
1326 (handle_omp_array_sections): Likewise. Call save_expr on array
1327 reductions before calling build_index_type. Handle depend clauses
1328 with iterators.
1329 (struct c_find_omp_var_s): New type.
1330 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
1331 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
1332 with static, runtime or auto schedule kinds. Call save_expr for whole
1333 array reduction sizes. Diagnose reductions with zero sized elements
1334 or variable length structures. Diagnose nogroup clause used with
1335 reduction clause(s). Handle depend clause with
1336 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
1337 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
1338 some different type for other kinds. Use build_unary_op with
1339 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
1340 Handle depend clauses with iterators. Remove no longer needed special
1341 case that predetermined const qualified vars may be specified in
1342 firstprivate clause. Complain if const qualified vars are mentioned
1343 in data-sharing clauses other than firstprivate or shared. Use
1344 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
1345 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
1346 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
1347 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
1348
7e2de6df
DM
13492018-10-29 David Malcolm <dmalcolm@redhat.com>
1350
1351 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
1352 logic for change to name_hint::operator bool.
1353 (undeclared_variable): Likewise.
1354 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1355 (c_parser_parameter_declaration): Likewise.
1356
9f936c86
JM
13572018-10-17 Joseph Myers <joseph@codesourcery.com>
1358
1359 * c-errors.c (pedwarn_c11): New function.
1360 * c-parser.c (disable_extension_diagnostics): Save
1361 warn_c11_c2x_compat and set it to 0.
1362 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
1363 (c_parser_static_assert_declaration_no_semi): Handle
1364 _Static_assert without string constant.
1365 * c-tree.h (pedwarn_c11): New prototype.
1366
033eb567
DM
13672018-10-17 David Malcolm <dmalcolm@redhat.com>
1368
1369 * Make-lang.in (selftest-c): New.
1370 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
1371 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
1372 from gcc/Makefile.in.
1373
0edf3afe
RB
13742018-10-02 Richard Biener <rguenther@suse.de>
1375
1376 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
1377
8313a764
JM
13782018-09-26 Joseph Myers <joseph@codesourcery.com>
1379
1380 PR c/87390
1381 * c-typeck.c (build_binary_op): Use excess precision for
1382 comparisons of integers and floating-point for C11 and later.
1383
ce6f0888
MJ
13842018-09-26 Martin Jambor <mjambor@suse.cz>
1385
1386 PR c/87347
1387 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 1388 comment.
ce6f0888 1389
9c4a4b3c
DM
13902018-09-17 David Malcolm <dmalcolm@redhat.com>
1391
1392 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1393 Update for new param.
1394 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
1395 Likewise.
1396
80c6d1f4
MJ
13972018-09-17 Martin Jambor <mjambor@suse.cz>
1398
1399 PR c/63886
1400 * c-parser.c: (warn_for_abs): New function.
1401 (c_parser_postfix_expression_after_primary): Call it.
1402
4a426e36
BE
14032018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
1404
1405 * c-typeck.c (digest_init): Shorten overlength strings.
1406
6d900107
BE
14072018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1408
1409 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
1410
b5764229
BE
14112018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1412
1413 * c-decl.c (finish_decl): Call braced_list_to_string here ...
1414 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
1415
22eea6b2
AM
14162018-08-30 Alexander Monakov <amonakov@ispras.ru>
1417
1418 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
1419 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
1420
85204e23
DM
14212018-08-27 David Malcolm <dmalcolm@redhat.com>
1422
1423 PR 87091
1424 * c-decl.c (implicitly_declare): Update call to
1425 maybe_add_include_fixit to suggest overriding the location, as it
1426 is for a note.
1427 * c-objc-common.c (c_tree_printer): Update for conversion of
1428 show_caret_p to a tri-state.
1429
3d78e008
ML
14302018-08-27 Martin Liska <mliska@suse.cz>
1431
1432 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
1433 fndecl_built_in_p and remove check for FUNCTION_DECL if
1434 possible.
3d78e008
ML
1435 (diagnose_mismatched_decls): Likewise.
1436 (merge_decls): Likewise.
1437 (warn_if_shadowing): Likewise.
1438 (pushdecl): Likewise.
1439 (implicitly_declare): Likewise.
1440 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1441 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
1442 * c-typeck.c (build_function_call_vec): Likewise.
1443 (convert_arguments): Likewise.
1444
097f82ec
DM
14452018-08-20 David Malcolm <dmalcolm@redhat.com>
1446
1447 PR other/84889
1448 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
1449 (diagnose_mismatched_decls): Likewise, in various places.
1450 (warn_if_shadowing): Likewise.
1451 (implicit_decl_warning): Likewise.
1452 (implicitly_declare): Likewise.
1453 (undeclared_variable): Likewise.
1454 (declare_label): Likewise.
1455 (grokdeclarator): Likewise.
1456 (start_function): Likewise.
1457 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1458 (c_parser_parameter_declaration): Likewise.
1459 (c_parser_binary_expression): Likewise.
1460 * c-typeck.c (c_expr_sizeof_expr): Likewise.
1461 (parser_build_binary_op): Likewise.
1462 (build_unary_op): Likewise.
1463 (error_init): Likewise.
1464 (pedwarn_init): Likewise.
1465 (warning_init): Likewise.
1466 (convert_for_assignment): Likewise.
1467
96e6ae57
DM
14682018-08-15 David Malcolm <dmalcolm@redhat.com>
1469
1470 * c-objc-common.c: Include "gcc-rich-location.h".
1471 (c_tree_printer): Move implemenation of '%T' to...
1472 (print_type): ...this new function.
1473 (range_label_for_type_mismatch::get_text): New function.
1474 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
1475 range for the various ic_argpass cases.
1476 (class maybe_range_label_for_tree_type_mismatch): New class.
1477 (build_binary_op): Use it when calling binary_op_error.
1478
0cd020ae 14792018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 1480
0cd020ae
PK
1481 * c-decl.c (start_decl): Do not warn if variables is named as main
1482 and is a local variable.
1483
72733314
IS
14842018-08-15 Iain Sandoe <iain@sandoe.co.uk>
1485
1486 PR c/19315
1487 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
1488 objects of unknown size.
1489
23aa9f7c
MS
14902018-08-13 Martin Sebor <msebor@redhat.com>
1491
1492 PR tree-optimization/71625
1493 * c-parser.c (c_parser_declaration_or_fndef): Call
1494 braced_list_to_string.
1495
e5e7e50d
BH
14962018-08-03 Bogdan Harjoc <harjoc@gmail.com>
1497
1498 PR c/86690
1499 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
1500 errors.
1501
8a45b051
MS
15022018-08-01 Martin Sebor <msebor@redhat.com>
1503
1504 PR tree-optimization/86650
1505 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
1506 and TREE_BLOCK (t) from within percent_K_format to this callsite.
1507
5922dcb5
JJ
15082018-08-01 Jakub Jelinek <jakub@redhat.com>
1509
1510 PR c/85704
1511 * c-typeck.c (init_field_decl_cmp): New function.
1512 (output_pending_init_elements): Use it for field comparisons
1513 instead of pure bit_position comparisons.
1514
9b452033
JJ
15152018-07-12 Jakub Jelinek <jakub@redhat.com>
1516
1517 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
1518 type here, instead add "omp declare target implicit" attribute.
1519 (finish_decl): Diagnose vars without mappable type here.
1520
ab20d992
JJ
15212018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1522 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1523 Cesar Philippidis <cesar@codesourcery.com>
1524
1525 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
1526 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
1527 to their non-present_or_* counterparts. Make 'self' an alias to
1528 PRAGMA_OACC_CLAUSE_HOST.
1529 (c_parser_oacc_data_clause): Update GOMP mappings for
1530 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
1531 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
1532 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
1533 Remove support for present_or_* clauses.
1534 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1535 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
1536 (OACC_DECLARE_CLAUSE_MASK): Likewise.
1537 (OACC_DATA_CLAUSE_MASK): Likewise.
1538 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
1539 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
1540 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
1541 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
1542 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
1543
e197e64e
KV
15442018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1545
1546 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
1547 * gimple-parser.c (c_parser_gimple_statement): Likewise.
1548 (c_parser_gimple_unary_expression): Likewise.
1549
487f2f61
JJ
15502018-06-15 Jakub Jelinek <jakub@redhat.com>
1551
1552 PR c/86093
1553 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
1554 before doing POINTER_DIFF_EXPR.
1555
e4d44a37
MP
15562018-06-07 Marek Polacek <polacek@redhat.com>
1557
1558 PR c/85318
1559 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
1560 for loop initial declarations.
1561
b67b9225
DP
15622018-05-30 David Pagan <dave.pagan@oracle.com>
1563
1564 PR c/55976
1565 * c-decl.c (grokdeclarator): Update check for return type warnings.
1566 (start_function): Likewise.
1567 (finish_function): Likewise.
1568 * c-typeck.c (c_finish_return): Update check for return type warnings.
1569 Pass OPT_Wreturn_type to pedwarn when appropriate.
1570
c566cc9f
RS
15712018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1572
1573 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
1574 __FMA_EXPR handlng.
1575
e4f81565
RS
15762018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1577
1578 * gimple-parser.c: Include internal-fn.h.
1579 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
1580 (c_parser_gimple_call_internal): New function.
1581 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
1582 Fix typos in comment.
1583
79e7b1fe
JJ
15842018-05-10 Jakub Jelinek <jakub@redhat.com>
1585
1586 PR c++/85662
1587 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
1588 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
1589 fold_convert_loc.
1590 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
1591 fold_offsetof_1, pass argtype as TYPE to it and drop the
1592 fold_convert_loc.
1593
f7584c81
DP
15942018-05-02 David Pagan <dave.pagan@oracle.com>
1595
1596 PR c/30552
1597 * c-decl.c (old_style_parameter_scope): New function.
1598 * c-parser.c (c_parser_postfix_expression): Check for statement
1599 expressions in old-style function parameter list declarations.
1600 * c-parser.h (old_style_parameter_scope): New extern declaration.
1601
b33a0cb3
JJ
16022018-04-25 Jakub Jelinek <jakub@redhat.com>
1603
1604 PR sanitizer/84307
1605 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
1606 it is not TREE_STATIC.
1607 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
1608 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
1609 its COMPOUND_LITERAL_EXPR_DECL.
1610
c5c5822a
JM
16112018-03-21 Joseph Myers <joseph@codesourcery.com>
1612
1613 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
1614 where all functions return the same _FloatN or _FloatNx type,
1615 treat integer types as _Float64 instead of double.
1616
aa1c9429
JJ
16172018-03-21 Jakub Jelinek <jakub@redhat.com>
1618
1619 PR c/84999
1620 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
1621 building vector comparison, diagnose it and return error_mark_node.
1622
9bb45a95
JJ
16232018-03-15 Jakub Jelinek <jakub@redhat.com>
1624
1625 PR c/84853
1626 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
1627 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
1628 INTEGER_TYPE element type.
1629
ada6bad9
DP
16302018-03-13 David Pagan <dave.pagan@oracle.com>
1631
1632 PR c/46921
1633 * c-typeck.c (output_init_element): Ensure field initializer
1634 expression is always evaluated if there are side effects.
1635
849bbdb9
JJ
16362018-03-06 Jakub Jelinek <jakub@redhat.com>
1637
1638 PR c/84721
1639 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
1640 !building_stmt_list_p ().
1641
d74641bd
RS
16422018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
1643
1644 PR c/84305
1645 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
1646 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
1647 and include the BIND_EXPR in the list of things that need to be
1648 pre-evaluated.
1649
0444aa9c
NS
16502018-02-09 Nathan Sidwell <nathan@acm.org>
1651
1652 PR c/84293
1653 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
1654 to strict_aliasing_warning.
1655
7c30b12a
PC
16562018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1657
1658 * c-typeck.c (really_start_incremental_init, push_init_level,
1659 set_nonincremental_init, output_init_element, process_init_element):
1660 Use DECL_UNNAMED_BIT_FIELD.
1661
2be4dfcb
MP
16622018-01-31 Marek Polacek <polacek@redhat.com>
1663
1664 PR c/81779
1665 * c-parser.c (c_parser_compound_statement_nostart): Call
1666 expansion_point_location_if_in_system_header.
1667
bb9869d5
DM
16682018-01-17 David Malcolm <dmalcolm@redhat.com>
1669
1670 PR c++/83814
1671 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
1672 the C part.
1673
b4923738
JJ
16742018-01-13 Jakub Jelinek <jakub@redhat.com>
1675
1676 PR c/83801
1677 * c-tree.h (decl_constant_value_1): Add a bool argument.
1678 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
1679 returning a CONSTRUCTOR if it is true. Use error_operand_p.
1680 (decl_constant_value): Adjust caller.
1681 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
1682 decl_constant_value_1 as IN_INIT. Otherwise, punt if
1683 decl_constant_value returns initializer that has BLKmode or
1684 array type.
1685 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
1686
928686b1
RS
16872018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1688 Alan Hayward <alan.hayward@arm.com>
1689 David Sherwood <david.sherwood@arm.com>
1690
1691 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
1692 TYPE_VECTOR_SUBPARTS.
1693
85ec4feb
JJ
16942018-01-03 Jakub Jelinek <jakub@redhat.com>
1695
1696 Update copyright years.
1697
913884f7
JJ
16982018-01-01 Jakub Jelinek <jakub@redhat.com>
1699
1700 PR c/83595
1701 * c-parser.c (c_parser_braced_init, c_parser_initelt,
1702 c_parser_conditional_expression, c_parser_cast_expression,
1703 c_parser_sizeof_expression, c_parser_alignof_expression,
1704 c_parser_postfix_expression, c_parser_omp_declare_reduction,
1705 c_parser_transaction_expression): Use set_error () method instead
1706 of setting value member to error_mark_node.
1707
c6cfa2bf
MM
17082017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
1709
1710 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
1711 and _Float<N>X built-in functions.
1712
11d29d63
JJ
17132017-12-22 Jakub Jelinek <jakub@redhat.com>
1714
14ec014e
JJ
1715 PR debug/83550
1716 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
1717 TYPE_STUB_DECL and call rest_of_type_compilation before processing
1718 incomplete vars rather than after it.
1719
11d29d63
JJ
1720 PR debug/83547
1721 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
1722 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
1723 and consider empty ones if there are no other stmts. For
1724 -Wunused-value walk all statements before the one only followed by
1725 DEBUG_BEGIN_STMTs.
1726
170a8bd6 17272017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1728 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1729
1730 * c-parser.c (c_parser_while_statement): Add unroll parameter and
1731 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
1732 (c_parser_do_statement): Likewise.
1733 (c_parser_for_statement): Likewise.
1734 (c_parser_statement_after_labels): Adjust calls to above.
1735 (c_parse_pragma_ivdep): New static function.
1736 (c_parser_pragma_unroll): Likewise.
1737 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
1738 <PRAGMA_UNROLL>: New case.
1739
01512446
JJ
17402017-12-19 Jakub Jelinek <jakub@redhat.com>
1741
1742 * c-typeck.c (comptypes_internal, function_types_compatible_p,
1743 perform_integral_promotions, digest_init): Replace Yoda conditions
1744 with typical order conditions.
1745 * c-decl.c (check_bitfield_type_and_width): Likewise.
1746
c65e18d3
BE
17472017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1748
1749 * c-typeck.c (c_safe_arg_type_equiv_p,
1750 c_safe_function_type_cast_p): New function.
1751 (build_c_cast): Implement -Wcast-function-type.
1752
b7280579
RB
17532017-12-14 Richard Biener <rguenther@suse.de>
1754
1755 PR c/83415
1756 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
1757 like REALPART_EXPR for the behavior of whether its operand
1758 is an lvalue.
1759
49e6a6c0
MP
17602017-12-12 Marek Polacek <polacek@redhat.com>
1761
1762 PR c/82679
1763 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
1764
ab20d992 17652017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1766
1767 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
1768 * c-parser.c (add_debug_begin_stmt): New.
1769 (c_parser_declaration_or_fndef): Call it.
1770 (c_parser_compound_statement_nostart): Likewise.
1771 (c_parser_statement_after_labels): Likewise.
1772 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
1773
4b2b493f
JM
17742017-12-07 Joseph Myers <joseph@codesourcery.com>
1775
1776 * c-decl.c (build_compound_literal): Add parameter alignas_align
1777 and set alignment of decl if nonzero.
1778 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
1779 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
1780 qualifier.
1781 (c_parser_struct_declaration): Update syntax comment.
1782 (c_parser_type_name): Add alignas_ok argument and pass it to
1783 c_parser_declspecs.
1784 (c_parser_cast_expression): Pass true to c_parser_type_name and
1785 give error if a cast used an _Alignas specifier.
1786 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
1787 give error if sizeof (type-name) used an _Alignas specifier.
1788 (c_parser_alignof_expression): Pass true to c_parser_type_name and
1789 give error if _Alignof (type-name) used an _Alignas specifier.
1790 (c_parser_postfix_expression_after_paren_type): Check specified
1791 alignment for a compound literal and pass it to
1792 build_compound_literal.
1793 * c-parser.h (c_parser_type_name): Update prototype.
1794 * c-tree.h (build_compound_literal): Update prototype.
1795
5d9ae53d
MS
17962017-12-07 Martin Sebor <msebor@redhat.com>
1797
1798 PR c/81544
1799 * c-decl.c (c_decl_attributes): Look up existing declaration and
1800 pass it to decl_attributes.
1801
c79144f8
DM
18022017-12-06 David Malcolm <dmalcolm@redhat.com>
1803
1804 PR c/83236
1805 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
1806 reserved for use by the implementation.
1807
613bc14f
DM
18082017-12-06 David Malcolm <dmalcolm@redhat.com>
1809
1810 * c-decl.c: Include "c-family/c-spellcheck.h".
1811
05abad4c
ML
18122017-12-05 Martin Liska <mliska@suse.cz>
1813 Jakub Jelinek <jakub@redhat.com>
1814
1815 * c-typeck.c (pointer_diff): Add new argument and instrument
1816 pointer subtraction.
1817 (build_binary_op): Similar for pointer comparison.
1818
cc6534d4
JJ
18192017-12-01 Jakub Jelinek <jakub@redhat.com>
1820
65791f42
JJ
1821 PR c/79153
1822 * c-parser.c: Include tree-iterator.h.
1823 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
1824 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
1825 on it.
1826
cc6534d4
JJ
1827 PR c/83222
1828 * c-tree.h (decl_constant_value_1): Declare.
1829 * c-typeck.c (decl_constant_value_1): New function.
1830 (decl_constant_value): Use it.
1831 * c-fold.c (c_fully_fold_internal): If in_init, use
1832 decl_constant_value_1 instead of decl_constant_value.
1833
5de73c05
JJ
18342017-11-30 Jakub Jelinek <jakub@redhat.com>
1835
1836 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
1837
058f0b9e
JJ
18382017-11-28 Jakub Jelinek <jakub@redhat.com>
1839
1840 PR sanitizer/81275
1841 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
1842 c_switch_covers_all_cases_p returns true.
1843
5e9d6aa4 18442017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1845 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1846
1847 * Make-lang.in (c/c-array-notation.o): Remove.
1848 * c-array-notation.c: Delete.
1849 * c-decl.c: Remove cilkplus condition.
1850 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
1851 c_parser_cilk_verify_simd, c_parser_array_notation,
1852 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
1853 c_parser_cilk_simd_fn_vector_attrs,
1854 c_finish_cilk_simd_fn_tokens): Delete.
1855 (c_parser_declaration_or_fndef): Remove cilkplus condition.
1856 (c_parser_direct_declarator_inner): Ditto.
1857 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
1858 (c_parser_attributes, c_parser_compound_statement,
1859 c_parser_statement_after_labels, c_parser_if_statement,
1860 c_parser_switch_statement, c_parser_while_statement,
1861 c_parser_do_statement, c_parser_for_statement,
1862 c_parser_unary_expression, c_parser_postfix_expression,
1863 c_parser_postfix_expression_after_primary,
1864 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
1865 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
1866 support.
1867 * c-typeck.c (build_array_ref, build_function_call_vec,
1868 convert_arguments,
1869 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
1870 c_finish_loop, build_binary_op): Remove cilkplus support.
1871
9e851845
JJ
18722017-11-28 Jakub Jelinek <jakub@redhat.com>
1873
1874 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
1875 of build3.
1876
ab20d992 18772017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
1878
1879 * Make-lang.in (c.install-plugin): Install backend import library.
1880
41521dee
JJ
18812017-11-23 Jakub Jelinek <jakub@redhat.com>
1882
1883 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
1884 pragma_stmt context.
1885
ac9effed
EB
18862017-11-23 Mike Stump <mikestump@comcast.net>
1887 Eric Botcazou <ebotcazou@adacore.com>
1888
1889 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
1890 ANNOTATE_EXPR.
1891 (c_parser_do_statement): Likewise.
1892 (c_parser_for_statement): Likewise.
1893
ce95abc4
DM
18942017-11-22 David Malcolm <dmalcolm@redhat.com>
1895
1896 PR c++/62170
1897 * c-objc-common.c (c_tree_printer): Convert penultimate param from
1898 bool to bool *. Within '%T' handling, if showing an "aka", use
1899 "quoted" param to add appropriate quoting.
1900
974aedcc
MP
19012017-11-22 Marek Polacek <polacek@redhat.com>
1902
1903 PR c++/60336
1904 PR middle-end/67239
1905 PR target/68355
1906 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
1907
d4300cc6
DM
19082017-11-21 David Malcolm <dmalcolm@redhat.com>
1909
1910 PR c/83056
1911 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
1912 earlier failed lookups.
1913
1af4ebf5
MG
19142017-11-21 Marc Glisse <marc.glisse@inria.fr>
1915
1916 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
1917 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
1918
26edace6
DM
19192017-11-20 David Malcolm <dmalcolm@redhat.com>
1920
1921 PR c/81404
1922 * c-decl.c: Include "c-family/known-headers.h".
1923 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
1924 to known-headers.cc.
1925 (class suggest_missing_header): Move to known-header.h.
1926 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
1927 than get_c_name_hint.
1928
b1212255
DM
19292017-11-20 David Malcolm <dmalcolm@redhat.com>
1930
1931 * c-decl.c (get_c_name_hint): New function.
1932 (class suggest_missing_header): New class.
1933 (lookup_name_fuzzy): Call get_c_name_hint and use it to
1934 suggest missing headers to the user.
1935
6c7a259b
DM
19362017-11-20 David Malcolm <dmalcolm@redhat.com>
1937
1938 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1939 Include "c-family/name-hint.h"
1940 (implicit_decl_warning): Convert "hint" from
1941 const char * to name_hint. Pass location to
1942 lookup_name_fuzzy. Suppress any deferred diagnostic if the
1943 warning was not printed.
1944 (undeclared_variable): Likewise for "guessed_id".
1945 (lookup_name_fuzzy): Convert return type from const char *
1946 to name_hint. Add location_t param.
1947 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
1948 Include "c-family/name-hint.h"
1949 (c_parser_declaration_or_fndef): Convert "hint" from
1950 const char * to name_hint. Pass location to lookup_name_fuzzy.
1951 (c_parser_parameter_declaration): Likewise.
1952
f9c59f7e
JJ
19532017-11-19 Jakub Jelinek <jakub@redhat.com>
1954
1955 PR c/66618
1956 PR c/69960
1957 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
1958 where needed.
1959 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
1960 handle_omp_array_sections): Likewise.
1961 (digest_init): Don't call decl_constant_value_for_optimization.
1962 * c-tree.h (decl_constant_value_for_optimization): Removed.
1963 * c-fold.c (c_fold_array_ref): New function.
1964 (c_fully_fold_internal): Add LVAL argument, propagate it through
1965 recursive calls. For VAR_P call decl_constant_value and
1966 unshare if not LVAL and either optimizing or IN_INIT. Remove
1967 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
1968 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
1969 (c_fully_fold): Add LVAL argument, pass it through to
1970 c_fully_fold_internal.
1971 (decl_constant_value_for_optimization): Removed.
1972
3ca0dc60
JM
19732017-11-15 Joseph Myers <joseph@codesourcery.com>
1974
1975 PR c/81156
1976 * c-parser.c (check_tgmath_function): New function.
1977 (enum tgmath_parm_kind): New enum.
1978 (c_parser_postfix_expression): Handle __builtin_tgmath.
1979
64a5912c
DM
19802017-10-31 David Malcolm <dmalcolm@redhat.com>
1981
1982 * c-decl.c (implicit_decl_warning): Update for renaming of
1983 pedwarn_at_rich_loc and warning_at_rich_loc.
1984 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
1985 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
1986 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
1987 (c_parser_struct_or_union_specifier): Likewise for renaming of
1988 pedwarn_at_rich_loc.
1989 (c_parser_parameter_declaration): Likewise for renaming of
1990 error_at_rich_loc.
1991 * c-typeck.c (build_component_ref): Likewise.
1992 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
1993 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
1994 (set_init_label): Likewise for renaming of error_at_rich_loc.
1995
c1136864
RB
19962017-10-30 Richard Biener <rguenther@suse.de>
1997
1998 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
1999 stmts.
2000
ee5fd23a
MM
20012017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2002
2003 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
2004 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
2005
1a59ccf2
DM
20062017-10-25 David Malcolm <dmalcolm@redhat.com>
2007
2008 PR c/7356
2009 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
2010 semicolons.
2011
bc1a75dd
JJ
20122017-10-25 Jakub Jelinek <jakub@redhat.com>
2013
2014 PR libstdc++/81706
2015 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
2016 newdecl to corresponding __builtin_ if any.
2017
ff1ff960
PC
20182017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
2019
2020 PR c++/82466
2021 * c-decl.c (diagnose_mismatched_decls): Use
2022 OPT_Wbuiltin_declaration_mismatch.
2023
62e1c678
DM
20242017-10-12 David Malcolm <dmalcolm@redhat.com>
2025
2026 * c-parser.c (c_parser_require): Add "type_is_unique" param and
2027 use it to guard calls to maybe_suggest_missing_token_insertion.
2028 (c_parser_parms_list_declarator): Override default value of new
2029 "type_is_unique" param to c_parser_require.
2030 (c_parser_asm_statement): Likewise.
2031 * c-parser.h (c_parser_require): Add "type_is_unique" param,
2032 defaulting to true.
2033
a92f6726
NS
20342017-10-11 Nathan Sidwell <nathan@acm.org>
2035
2036 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
2037
8e6cdc90
RS
20382017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2039
2040 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
2041 operating on trees as wide_ints.
2042 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
2043 (c_tree_equal): Likewise.
2044
8139a48e
DM
20452017-10-04 David Malcolm <dmalcolm@redhat.com>
2046
2047 * c-decl.c (push_parm_decl): Store c_parm's location into the
2048 PARAM_DECL.
2049 (build_c_parm): Add "loc" param and store it within the c_parm.
2050 * c-parser.c (struct c_parser): Add "last_token_location" field.
2051 (c_parser_consume_token): Store location of the token into the
2052 new field.
2053 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
2054 when handling a FUNCTION_DECL, if it doesn't already have them.
2055 (c_parser_parameter_declaration): Generate a location for the
2056 parameter, and pass it to the call to build_c_parm.
2057 * c-tree.h (struct c_parm): Add field "loc".
2058 (build_c_parm): Add location_t param.
2059 * c-typeck.c (get_fndecl_argument_location): New function.
2060 (inform_for_arg): New function.
2061 (convert_for_assignment): Use inform_for_arg when dealing with
2062 ic_argpass.
2063
2a389958
JJ
20642017-09-29 Jakub Jelinek <jakub@redhat.com>
2065
7d386d45
JJ
2066 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
2067 width is non-NULL.
2068 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
2069 don't SET_DECL_C_BIT_FIELD here.
2070
2a389958
JJ
2071 PR c/82340
2072 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
2073 instead of trying to set just TREE_READONLY manually.
2074
ebc6a85e
TV
20752017-09-16 Tom de Vries <tom@codesourcery.com>
2076
2077 PR c/81875
2078 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
2079 cond itself.
2080
bb75facd
JM
20812017-09-15 Joseph Myers <joseph@codesourcery.com>
2082
2083 PR c/82071
2084 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
2085 for C11.
2086 (build_conditional_expr): For C11, generate result with excess
2087 precision when one argument is an integer and the other is of a
2088 type using excess precision.
2089
1d933576
BE
20902017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2091
2092 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
2093
267bbb6f
MP
20942017-09-13 Marek Polacek <polacek@redhat.com>
2095
2096 PR c/82167
2097 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
2098 than expr.original_type.
2099
6836632e
NS
21002017-09-12 Nathan Sidwell <nathan@acm.org>
2101
2102 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2103 resort_sorted_fields): Moved from c-family/c-common.c.
2104 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
2105
e035be33
JM
21062017-09-01 Joseph Myers <joseph@codesourcery.com>
2107
2108 PR c/82071
2109 * c-typeck.c (build_atomic_assign): Handle argument with excess
2110 precision. Ensure any EXCESS_PRECISION_EXPR is present in
2111 argument passed to build_binary_op and convert_for_assignment but
2112 not for call to c_fully_fold.
2113 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
2114 Ensure build_binary_op is called with argument with original
2115 semantic type. Avoid calling c_fully_fold with an
2116 EXCESS_PRECISION_EXPR from build_binary_op.
2117
d2e05fcb
JJ
21182017-09-01 Jakub Jelinek <jakub@redhat.com>
2119
2120 PR c/81887
2121 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
2122
b397965c
RS
21232017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2124 Alan Hayward <alan.hayward@arm.com>
2125 David Sherwood <david.sherwood@arm.com>
2126
2127 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
2128 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
2129 m1 and m2 to the signed equivalent of a fixed-point
2130 SCALAR_TYPE_MODE.
2131
14e18d71
DM
21322017-08-24 David Malcolm <dmalcolm@redhat.com>
2133
2134 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
2135 than CAN_HAVE_LOCATION_P when determining whether to use the
2136 location_t value within "value".
2137
7f204c0f
DM
21382017-08-21 David Malcolm <dmalcolm@redhat.com>
2139
2140 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
2141 rather than peeking the location of the first token.
2142 * c-tree.h (c_expr::get_location): New method.
2143
2f687306
DM
21442017-08-21 David Malcolm <dmalcolm@redhat.com>
2145
2146 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
2147 to check_function_arguments.
2148
3e7b80d7
MP
21492017-08-18 Marek Polacek <polacek@redhat.com>
2150
2151 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
2152 commentary.
2153
00aa1fa2
L
21542017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2155
2156 PR c/53037
2157 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
2158 (check_bitfield_type_and_width): Don't allow bit-field with
2159 warn_if_not_aligned type.
2160
da67acb9
MS
21612017-08-14 Martin Sebor <msebor@redhat.com>
2162
2163 PR c/81117
2164 * c-objc-common.c (c_objc_common_init): Handle 'G'.
2165
bb85aa74
MP
21662017-08-11 Marek Polacek <polacek@redhat.com>
2167
2168 PR c/81795
2169 * c-decl.c (pushtag): Only print inform if the warning was printed.
2170 (grokdeclarator): Likewise.
2171
32129a17
DM
21722017-08-10 David Malcolm <dmalcolm@redhat.com>
2173
2174 * c-parser.c (c_parser_error): Rename to...
2175 (c_parser_error_richloc): ...this, making static, and adding
2176 "richloc" parameter, passing it to the c_parse_error call,
2177 rather than calling c_parser_set_source_position_from_token.
2178 (c_parser_error): Reintroduce, reimplementing in terms of the
2179 above, converting return type from void to bool.
2180 (class token_pair): New class.
2181 (struct matching_paren_traits): New struct.
2182 (matching_parens): New typedef.
2183 (struct matching_brace_traits): New struct.
2184 (matching_braces): New typedef.
2185 (get_matching_symbol): New function.
2186 (c_parser_require): Add param MATCHING_LOCATION, using it to
2187 highlight matching "opening" tokens for missing "closing" tokens.
2188 (c_parser_skip_until_found): Likewise.
2189 (c_parser_static_assert_declaration_no_semi): Convert explicit
2190 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
2191 class matching_parens, so that the pertinent open parenthesis is
2192 highlighted when there are problems locating the close
2193 parenthesis.
2194 (c_parser_struct_or_union_specifier): Likewise.
2195 (c_parser_typeof_specifier): Likewise.
2196 (c_parser_alignas_specifier): Likewise.
2197 (c_parser_simple_asm_expr): Likewise.
2198 (c_parser_braced_init): Likewise, for matching_braces.
2199 (c_parser_paren_condition): Likewise, for matching_parens.
2200 (c_parser_switch_statement): Likewise.
2201 (c_parser_for_statement): Likewise.
2202 (c_parser_asm_statement): Likewise.
2203 (c_parser_asm_operands): Likewise.
2204 (c_parser_cast_expression): Likewise.
2205 (c_parser_sizeof_expression): Likewise.
2206 (c_parser_alignof_expression): Likewise.
2207 (c_parser_generic_selection): Likewise.
2208 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
2209 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
2210 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
2211 In case CPP_OPEN_PAREN, pass loc_open_paren to the
2212 c_parser_skip_until_found call.
2213 (c_parser_objc_class_definition): Use class matching_parens as
2214 above.
2215 (c_parser_objc_method_decl): Likewise.
2216 (c_parser_objc_try_catch_finally_statement): Likewise.
2217 (c_parser_objc_synchronized_statement): Likewise.
2218 (c_parser_objc_at_property_declaration): Likewise.
2219 (c_parser_oacc_wait_list): Likewise.
2220 (c_parser_omp_var_list_parens): Likewise.
2221 (c_parser_omp_clause_collapse): Likewise.
2222 (c_parser_omp_clause_default): Likewise.
2223 (c_parser_omp_clause_if): Likewise.
2224 (c_parser_omp_clause_num_threads): Likewise.
2225 (c_parser_omp_clause_num_tasks): Likewise.
2226 (c_parser_omp_clause_grainsize): Likewise.
2227 (c_parser_omp_clause_priority): Likewise.
2228 (c_parser_omp_clause_hint): Likewise.
2229 (c_parser_omp_clause_defaultmap): Likewise.
2230 (c_parser_oacc_single_int_clause): Likewise.
2231 (c_parser_omp_clause_ordered): Likewise.
2232 (c_parser_omp_clause_reduction): Likewise.
2233 (c_parser_omp_clause_schedule): Likewise.
2234 (c_parser_omp_clause_num_teams): Likewise.
2235 (c_parser_omp_clause_thread_limit): Likewise.
2236 (c_parser_omp_clause_aligned): Likewise.
2237 (c_parser_omp_clause_linear): Likewise.
2238 (c_parser_omp_clause_safelen): Likewise.
2239 (c_parser_omp_clause_simdlen): Likewise.
2240 (c_parser_omp_clause_depend): Likewise.
2241 (c_parser_omp_clause_map): Likewise.
2242 (c_parser_omp_clause_device): Likewise.
2243 (c_parser_omp_clause_dist_schedule): Likewise.
2244 (c_parser_omp_clause_proc_bind): Likewise.
2245 (c_parser_omp_clause_uniform): Likewise.
2246 (c_parser_omp_for_loop): Likewise.
2247 (c_parser_cilk_clause_vectorlength): Likewise.
2248 (c_parser_cilk_clause_linear): Likewise.
2249 (c_parser_transaction_expression): Likewise.
2250 * c-parser.h (c_parser_require): Add param matching_location with
2251 default UNKNOWN_LOCATION.
2252 (c_parser_error): Convert return type from void to bool.
2253 (c_parser_skip_until_found): Add param matching_location with
2254 default UNKNOWN_LOCATION.
2255
30af3a2b
MP
22562017-08-09 Marek Polacek <polacek@redhat.com>
2257
2258 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
2259 * c-tree.h (build_external_ref): Update declaration.
2260 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
2261 (build_external_ref): Change the type of a parameter to bool.
2262 (parser_build_binary_op): Use true/false instead of 1/0.
2263 (pointer_diff): Likewise.
2264 (build_modify_expr): Likewise.
2265 (set_designator): Change the type of a parameter to bool.
2266 (set_init_index): Use true/false instead of 1/0.
2267 (set_init_label): Likewise.
2268 (output_init_element): Change the type of a parameter to bool.
2269 (output_pending_init_elements): Use true/false instead of 1/0.
2270 (process_init_element): Likewise.
2271 (build_binary_op): Change the type of a parameter to bool.
2272
296c53ac
MP
22732017-08-09 Marek Polacek <polacek@redhat.com>
2274
2275 PR c/81233
2276 * c-typeck.c (pedwarn_init): Make the function take a variable list.
2277 Call emit_diagnostic_valist instead of pedwarn.
2278 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
2279 Print the relevant types in diagnostics.
2280
a32c8316
MP
22812017-08-09 Marek Polacek <polacek@redhat.com>
2282
2283 PR c/81417
2284 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 2285 build_conditional_expr.
a32c8316
MP
2286 * c-parser.c (c_parser_conditional_expression): Create locations for
2287 EXP1 and EXP2 from their source ranges. Pass the locations down to
2288 build_conditional_expr.
2289 * c-tree.h (build_conditional_expr): Update declaration.
2290 * c-typeck.c (build_conditional_expr): Add location_t parameters.
2291 For -Wsign-compare, also print the types.
2292
314e6352
ML
22932017-08-08 Martin Liska <mliska@suse.cz>
2294
2295 * c-convert.c: Include header files.
2296 * c-typeck.c: Likewise.
2297
577eec56
ML
22982017-08-07 Martin Liska <mliska@suse.cz>
2299
2300 * c-parser.c (c_parser_attributes): Canonicalize name of an
2301 attribute.
2302
f7b6353a
MP
23032017-08-02 Marek Polacek <polacek@redhat.com>
2304
2305 PR c/81289
2306 * c-parser.c (c_parser_unary_expression): Use set_error.
2307
8a6eab34
MP
2308 PR c/81448
2309 PR c/81306
2310 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
2311 warnings. Avoid walking MACRO_MAP_LOCATIONS.
2312
ab20d992 23132017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
2314 Martin Liska <mliska@suse.cz>
2315
2316 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 2317 statement.
7fef86d3 2318
f34ebeb2
ML
23192017-07-31 Martin Liska <mliska@suse.cz>
2320
2321 PR sanitize/81530
2322 * c-convert.c (convert): Guard condition with flag_sanitize_p
2323 also with current_function_decl non-null equality.
2324 * c-decl.c (grokdeclarator): Likewise.
2325 * c-typeck.c (build_binary_op): Likewise.
2326
8595f67b
MP
23272017-07-25 Marek Polacek <polacek@redhat.com>
2328
2329 * c-decl.c (grokfield): Remove local variable.
2330
d49718d6
MP
23312017-07-25 Marek Polacek <polacek@redhat.com>
2332
2333 PR c/81364
2334 * c-parser.c (c_parser_else_body): Don't warn about multistatement
2335 macro expansion if the body is in { }.
2336 (c_parser_while_statement): Likewise.
2337 (c_parser_for_statement): Likewise.
2338
ff22eb12
NS
23392017-07-18 Nathan Sidwell <nathan@acm.org>
2340
2341 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
2342
eea77d1f
DM
23432017-07-14 David Malcolm <dmalcolm@redhat.com>
2344
2345 * c-decl.c (implicitly_declare): When suggesting a missing
2346 #include, provide a fix-it hint.
2347
b6f43128
DM
23482017-07-06 David Malcolm <dmalcolm@redhat.com>
2349
2350 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
2351 and call that instead.
2352 * c-tree.h (selftest::run_c_tests): New decl.
2353
3e2becc4
MP
23542017-06-26 Marek Polacek <polacek@redhat.com>
2355
2356 PR c/80116
2357 * c-parser.c (c_parser_if_body): Set the location of the
2358 body of the conditional after parsing all the labels. Call
2359 warn_for_multistatement_macros.
2360 (c_parser_else_body): Likewise.
2361 (c_parser_switch_statement): Likewise.
2362 (c_parser_while_statement): Likewise.
2363 (c_parser_for_statement): Likewise.
2364 (c_parser_statement): Add a default argument. Save the location
2365 after labels have been parsed.
2366 (c_parser_c99_block_statement): Likewise.
2367
343ae898
RB
23682017-06-19 Richard Biener <rguenther@suse.de>
2369
2370 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2371 negated _Literals to parse _Literal (int) -1.
2372
45b2222a
ML
23732017-06-13 Martin Liska <mliska@suse.cz>
2374
2375 PR sanitize/78204
2376 * c-convert.c (convert): Use sanitize_flags_p.
2377 * c-decl.c (grokdeclarator): Likewise.
2378 * c-typeck.c (convert_for_assignment): Likewise.
2379 (c_finish_return): Likewise.
2380 (build_binary_op): Likewise.
2381
8ab7005b
JJ
23822017-06-08 Jakub Jelinek <jakub@redhat.com>
2383
2384 PR c/81006
2385 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
2386 to sizetype before size_binop.
2387
363dc72c
JJ
23882017-06-07 Jakub Jelinek <jakub@redhat.com>
2389
2390 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
2391 of TDI_generic.
2392
dc949728
MP
23932017-06-06 Marek Polacek <polacek@redhat.com>
2394
2395 PR c/79983
2396 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
2397 ref.
2398 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
2399
40ffd95f
BE
24002017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2401
2402 * c-parser.c (c_parser_binary_expression): Implement the
2403 -Wsizeof_pointer_div warning.
2404 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
2405 from a parenthesized expression.
2406 (c_parser_expr_list): Use c_last_sizeof_loc.
2407 * c-tree.h (c_last_sizeof_loc): New external.
2408 * c-typeck.c (c_last_sizeof_loc): New variable.
2409 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
2410
9fc5e7a4
MM
24112017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2412
2413 PR testsuite/80580
2414 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
2415
f012c8ef
DM
24162017-05-30 David Malcolm <dmalcolm@redhat.com>
2417
2418 * c-objc-common.c (c_tree_printer): Gain bool and const char **
2419 parameters.
2420
3cd211af
MS
24212017-05-24 Martin Sebor <msebor@redhat.com>
2422
2423 PR c/80731
2424 * c-fold.c (c_fully_fold_internal): Adjust.
2425 * c-typeck.c (parser_build_unary_op): Adjust.
2426
fd71a9a2
TS
24272017-05-23 Thomas Schwinge <thomas@codesourcery.com>
2428
2429 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
2430 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
2431 "VECTOR_LENGTH".
2432
92fa0f9e
MP
24332017-05-23 Marek Polacek <polacek@redhat.com>
2434
2435 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
2436 quotes.
2437
d11c168a
JJ
24382017-05-22 Jakub Jelinek <jakub@redhat.com>
2439
2440 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
2441 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
2442 it returned invariant. Call tree_invariant_p unconditionally
2443 afterwards to decide whether to return expr or op0.
2444
58aca9d9
NS
24452017-05-22 Nathan Sidwell <nathan@acm.org>
2446
2447 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
2448
7fd549d2
TS
24492017-05-19 Thomas Schwinge <thomas@codesourcery.com>
2450
2451 * c-parser.c (c_parser_omp_clause_default): Handle
2452 "OMP_CLAUSE_DEFAULT_PRESENT".
2453
6ecd2339
BE
24542017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2455
2456 * config-lang.in (gtfiles): Add c-family/c-format.c.
2457
8a57ecff
NS
24582017-05-18 Nathan Sidwell <nathan@acm.org>
2459
2460 * c-decl.c (pushdecl_top_level): Delete unused function.
2461
6574d78e
MP
24622017-05-18 Marek Polacek <polacek@redhat.com>
2463
2464 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
2465 (check_earlier_gotos): Likewise.
2466 (define_label): Likewise.
2467 (pending_xref_error): Likewise.
2468 (smallest_type_quals_location): Likewise.
2469 (grokdeclarator): Likewise.
2470 (grokparms): Likewise.
2471 (identifier_global_value): Likewise.
2472 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
2473 (find_init_member): Likewise.
2474
e3455240
MP
24752017-05-18 Marek Polacek <polacek@redhat.com>
2476
2477 * c-decl.c (start_decl): Use false/true instead of 0/1.
2478 (grokdeclarator): Likewise.
2479 (finish_struct): Likewise.
2480 (start_function): Change the return type to bool. Use false/true
2481 instead of 0/1.
2482 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
2483 * c-tree.h (start_function): Update.
2484 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
2485 (set_designator): Change the return type to bool. Use false/true
2486 instead of 0/1.
2487
3fa8871b
MP
24882017-05-17 Marek Polacek <polacek@redhat.com>
2489
2490 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
2491 * c-typeck.c: Likewise.
2492
142473df
MP
24932017-05-17 Marek Polacek <polacek@redhat.com>
2494
2495 PR sanitizer/80659
2496 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
2497 DECL_IGNORED_P even for non-static compound literals.
2498
1a817418
ML
24992017-05-17 Martin Liska <mliska@suse.cz>
2500
2501 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
2502 use it instead of int type.
2503
b2fa0a8b
MP
25042017-05-17 Marek Polacek <polacek@redhat.com>
2505
2506 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
2507 call c_fully_fold.
2508 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 2509 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
2510 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
2511 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
2512 save_expr.
2513 (c_parser_conditional_expression): Likewise.
2514 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
2515 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
2516 (process_init_element): Likewise.
2517 (build_binary_op): Likewise.
2518 (handle_omp_array_sections_1): Likewise.
2519
1e47f02b
TS
25202017-05-12 Thomas Schwinge <thomas@codesourcery.com>
2521
2522 * c-parser.c (c_parser_omp_clause_num_gangs)
2523 (c_parser_omp_clause_num_workers)
2524 (c_parser_omp_clause_vector_length): Merge functions into...
2525 (c_parser_oacc_single_int_clause): ... this new function. Adjust
2526 all users.
2527
c24e924f
NS
25282017-05-11 Nathan Sidwell <nathan@acm.org>
2529
2530 * gimple-parser.c: Don't #include tree-dump.h.
2531
c587104e
MM
25322017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2533
2534 PR testsuite/80580
2535 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
2536
67ac9a9d
MM
25372017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2538
2539 PR testsuite/80580
2540 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2541 incorrect __MEM syntax.
2542
ac4eb40f
MM
25432017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2544
2545 PR testsuite/80580
2546 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
2547 type of unary '*'.
2548
641da50a
NS
25492017-05-09 Nathan Sidwell <nathan@acm.org>
2550
2551 * c-tree.h (pushdecl): Declare.
2552
56d35585
DM
25532017-05-05 David Malcolm <dmalcolm@redhat.com>
2554
2555 * c-decl.c (warn_defaults_to): Replace report_diagnostic
2556 with diagnostic_report_diagnostic.
2557 * c-errors.c (pedwarn_c99): Likewise.
2558 (pedwarn_c90): Likewise.
2559
815d9cc6
XR
25602017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2561
92a285c1 2562 PR c++/80038
815d9cc6
XR
2563 * c-gimplify.c (c_gimplify_expr): Remove calls to
2564 cilk_gimplifY_call_params_in_spawned_fn.
2565
1c4ea66f
DM
25662017-04-25 David Malcolm <dmalcolm@redhat.com>
2567
2568 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
2569 hint for removing extra semicolon.
2570
666f7903
JJ
25712017-04-21 Jakub Jelinek <jakub@redhat.com>
2572
2573 PR c/80468
2574 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
2575 enabled, set specs->type to integer_type_node.
2576
5764ee3c
JW
25772017-04-03 Jonathan Wakely <jwakely@redhat.com>
2578
2579 * c-array-notation.c: Fix typo in comment.
2580
10fa8dfb
MP
25812017-03-29 Marek Polacek <polacek@redhat.com>
2582
2583 PR c/79730
2584 * c-decl.c (finish_decl): Check VAR_P.
2585
a9e4a1a5
JJ
25862017-03-27 Jakub Jelinek <jakub@redhat.com>
2587
2588 PR middle-end/80162
2589 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
2590 * c-typeck.c (c_mark_addressable): Likewise. Look through
2591 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
2592 to ARRAY_TYPE.
2593 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
2594
ee3ff394
MP
25952017-03-23 Marek Polacek <polacek@redhat.com>
2596
2597 * c-tree.h: Remove a C_RID_YYCODE reference.
2598
4d1b8e70
JJ
25992017-03-21 Jakub Jelinek <jakub@redhat.com>
2600
2601 PR c/80097
2602 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
2603 optional COMPOUND_EXPR with ubsan instrumentation.
2604
31dc71a8
MP
26052017-03-17 Marek Polacek <polacek@redhat.com>
2606
2607 * c-parser.c: Add C11 references.
2608
d579c385
MP
26092017-03-15 Marek Polacek <polacek@redhat.com>
2610
2611 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
2612
85059a38
MP
26132017-03-11 Marek Polacek <polacek@redhat.com>
2614
2615 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
2616
2f6f187a
DM
26172017-03-10 David Malcolm <dmalcolm@redhat.com>
2618
2619 PR translation/79848
2620 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
2621 "%qs".
2622 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
2623
36618428
MP
26242017-03-09 Marek Polacek <polacek@redhat.com>
2625
2626 PR sanitizer/79757
2627 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
2628 parameter declarations with initializers.
2629
01e5af5a
JJ
26302017-03-09 Jakub Jelinek <jakub@redhat.com>
2631
2632 PR c/79969
2633 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
2634 TYPE_STUB_DECL.
2635
a71dbc63
JJ
26362017-03-07 Jakub Jelinek <jakub@redhat.com>
2637
2638 PR c/79834
2639 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
2640 for "may only be used in compound statements" diagnostics, change it
2641 such that the same translatable string is used for all pragmas. For
2642 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
2643 diagnostics.
2644 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
2645 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
2646 "may only be used in compound statements" diagnostics, such that the
2647 same translatable string is used for all pragmas.
2648
1ff4bae6
MP
26492017-03-04 Marek Polacek <polacek@redhat.com>
2650
2651 PR c/79847
2652 * c-decl.c (implicit_decl_warning): Add missing space.
2653
7f5a7d78
MP
26542017-03-03 Marek Polacek <polacek@redhat.com>
2655
2656 PR c/79758
2657 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
2658 current_function_prototype_arg_types is error_mark_node. Fix
2659 formatting. Use TREE_VALUE instead of TREE_TYPE.
2660
883c8f06
JJ
26612017-03-03 Jakub Jelinek <jakub@redhat.com>
2662
79c9b7a8
JJ
2663 PR c/79837
2664 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
2665 %<min%> or %<max%> in the diagnostics, instead mention identifier.
2666 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
2667 diagnostics.
2668
883c8f06
JJ
2669 PR c/79836
2670 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
2671 instead of %<_Generic>.
2672 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
2673 (c_parser_omp_target_exit_data): Use %<release%> instead of
2674 %<release>.
2675
324ff1a0
JJ
26762017-02-28 Jakub Jelinek <jakub@redhat.com>
2677
2678 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
2679 instead of just cond ? "..." : "...".
2680 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
2681 for "enter"/"exit" keyword.
2682 (c_finish_oacc_routine): Don't use %s to supply portions of the
2683 message.
2684
4227c9ad
JJ
26852017-02-24 Jakub Jelinek <jakub@redhat.com>
2686
2687 PR c++/79588
2688 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
2689 handle -Wrestrict here.
2690 * c-typeck.c (build_function_call_vec): Adjust
2691 check_function_arguments caller.
2692
5d972e66
RB
26932017-02-23 Richard Biener <rguenther@suse.de>
2694
2695 PR c/79684
2696 * gimple-parser.c (c_parser_gimple_statement): Use set_error
2697 to initialize c_exprs to return.
2698 (c_parser_gimple_binary_expression): Likewise.
2699 (c_parser_gimple_unary_expression): Likewise.
2700 (c_parser_gimple_postfix_expression): Likewise.
2701
61ac5ebe
MP
27022017-02-22 Marek Polacek <polacek@redhat.com>
2703
2704 PR c/79662
2705 * c-typeck.c (convert_arguments): Handle error_mark_node.
2706
41d1b0b1
PK
27072017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2708
2709 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
2710 value of c_parser_parse_ssa_name against error_mark_node and emit
2711 error if ssa name is anonymous and written as default definition.
2712
eab1f169
PK
27132017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2714
2715 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2716 FMA_EXPR.
2717
bcac0b4d
JJ
27182017-02-16 Jakub Jelinek <jakub@redhat.com>
2719
2720 PR c++/79512
2721 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
2722 ignore #pragma omp target even when not followed by identifier.
2723
1be33173
PK
27242017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2725
2726 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
2727 (c_parser_gimple_unary_expression): Likewise.
2728
aa326bfb
JJ
27292017-02-13 Jakub Jelinek <jakub@redhat.com>
2730
2731 * c-parser.c (c_parser_oacc_declare): Add missing space in
2732 diagnostics.
2733
8a398bc5
PK
27342017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2735
2736 PR c/79478
2737 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
2738 set_c_expr_source_range when parsing ssa-name.
2739
3dcde5ef 27402017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 2741 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
2742
2743 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
2744 building IL when arguments are error_mark_node.
2745 (c_parser_gimple_unary_expression): Likewise.
2746 (c_parser_gimple_if_stmt): Likewise.
2747 (c_parser_gimple_switch_stmt): Likewise.
2748 (c_parser_gimple_return_stmt): Likewise.
2749 (c_parser_parse_ssa_name): When name lookup fails do not build
2750 an SSA name. Use undeclared rather than not declared in error
2751 reporting.
2752
192b048b
MP
27532017-02-09 Marek Polacek <polacek@redhat.com>
2754
2755 PR c/79428
2756 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
2757 instead of c_parser_skip_until_found.
2758
56f71478
JJ
27592017-02-09 Jakub Jelinek <jakub@redhat.com>
2760
2761 PR c/79431
2762 * c-parser.c (c_parser_omp_declare_target): Don't invoke
2763 symtab_node::get on automatic variables.
2764
02889d23
CLT
27652016-02-09 Nathan Sidwell <nathan@codesourcery.com>
2766 Chung-Lin Tang <cltang@codesourcery.com>
2767
2768 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
2769 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
2770 semantic checking.
2771 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
2772
7af4b20d
RB
27732017-02-07 Richard Biener <rguenther@suse.de>
2774
2775 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
2776 (c_parser_gimple_postfix_expression_after_primary):
2777 Do not use c_build_function_call_vec to avoid folding and promotion.
2778 Simplify.
2779
e5e391d6
MO
27802017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
2781
2782 PR lto/79061
2783 * c-decl.c (pop_scope): Pass main_input_filename to
2784 build_translation_unit_decl.
2785
c2e84327
DM
27862017-01-24 David Malcolm <dmalcolm@redhat.com>
2787
2788 * c-parser.c: Include "read-rtl-function.h" and
2789 "run-rtl-passes.h".
2790 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
2791 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
2792 production. Update for renaming of field "gimple_pass" to
2793 "gimple_or_rtl_pass". If __RTL was seen, call
2794 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
2795 to an auto_timevar, to cope with early exit.
2796 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
2797 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
2798 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
2799 Handle RID_RTL.
2800 (c_parser_parse_rtl_body): New function.
2801 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
2802 (struct c_declspecs): Rename field "gimple_pass" to
2803 "gimple_or_rtl_pass". Add field "rtl_p".
2804 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
2805 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
2806 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
2807 (c_parser_gimple_or_rtl_pass_list): ...this.
2808
2ebd93e1
MP
28092017-01-20 Marek Polacek <polacek@redhat.com>
2810
2811 PR c/64279
2812 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
2813
b1c95bb5
RB
28142017-01-13 Richard Biener <rguenther@suse.de>
2815
2816 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
2817 nops.
2818
25329913
RB
28192017-01-13 Richard Biener <rguenther@suse.de>
2820
2821 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2822 _Literal ( type-name ) number.
2823
6bb4ea5c
RB
28242017-01-12 Richard Biener <rguenther@suse.de>
2825
2826 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2827 __MEM.
2828
6b5b4e9c
JJ
28292017-01-11 Jakub Jelinek <jakub@redhat.com>
2830
2831 PR c++/72813
2832 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
2833 PCH file.
2834
e3252775
RB
28352017-01-11 Richard Biener <rguenther@suse.de>
2836
2837 PR bootstrap/79052
2838 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
2839 returns on parse errors.
2840
a9342885
MP
28412017-01-04 Marek Polacek <polacek@redhat.com>
2842
2843 PR c++/64767
2844 * c-parser.c (c_parser_postfix_expression): Mark zero character
2845 constants by setting original_type in c_expr.
2846 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
2847 with a zero character constant.
2848 (char_type_p): New function.
2849
5dd9a9d0
DM
28502017-01-04 David Malcolm <dmalcolm@redhat.com>
2851
2852 * c-parser.c (c_parser_declaration_or_fndef): Create a
2853 rich_location at init_loc and parse it to start_init.
2854 (last_init_list_comma): New global.
2855 (c_parser_braced_init): Update last_init_list_comma when parsing
2856 commas. Pass it to pop_init_level. Pass location of closing
2857 brace to pop_init_level.
2858 (c_parser_postfix_expression_after_paren_type): Create a
2859 rich_location at type_loc and parse it to start_init.
2860 (c_parser_omp_declare_reduction): Likewise for loc.
2861 * c-tree.h (start_init): Add rich_location * param.
2862 (pop_init_level): Add location_t param.
2863 * c-typeck.c (struct initializer_stack): Add field
2864 "missing_brace_richloc".
2865 (start_init): Add richloc param, use it to initialize
2866 the stack node's missing_brace_richloc.
2867 (last_init_list_comma): New decl.
2868 (finish_implicit_inits): Pass last_init_list_comma to
2869 pop_init_level.
2870 (push_init_level): When finding missing open braces, add fix-it
2871 hints to the richloc.
2872 (pop_init_level): Add "insert_before" param and pass it
2873 when calling pop_init_level. Add fixits about missing
2874 close braces to any richloc. Use the richloc for the
2875 -Wmissing-braces warning.
2876 (set_designator): Pass last_init_list_comma to pop_init_level.
2877 (process_init_element): Likewise.
2878
cbe34bb5
JJ
28792017-01-01 Jakub Jelinek <jakub@redhat.com>
2880
2881 Update copyright years.
2882
d17680f3
JJ
28832016-12-21 Jakub Jelinek <jakub@redhat.com>
2884
0dba7960
JJ
2885 PR bootstrap/78817
2886 * c-typeck.c (build_function_call_vec): If check_function_arguments
2887 returns true, set TREE_NO_WARNING on CALL_EXPR.
2888
d17680f3
JJ
2889 PR c/77767
2890 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
2891 to *expr instead of overwriting it.
2892
aa90531e
RB
28932016-12-20 Richard Biener <rguenther@suse.de>
2894
2895 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
2896 error recovery.
2897 (c_parser_gimple_statement): Only build assigns for non-error
2898 stmts.
2899 (c_parser_gimple_postfix_expression_after): Improve error recovery.
2900
629b3d75
MJ
29012016-12-14 Martin Jambor <mjambor@suse.cz>
2902
2903 * c-parser.c: Include omp-general.h and omp-offload.h instead of
2904 omp-low.h.
2905 (c_finish_oacc_routine): Adjusted call to
2906 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
2907 to use their new names.
2908 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
2909 use its new name.
2910 (c_parser_oacc_update): Likewise.
2911 (c_parser_omp_simd): Likewise.
2912 (c_parser_omp_target_update): Likewise.
2913 * c-typeck.c: Include omp-general.h instead of omp-low.h.
2914 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
2915 name.
2916 (c_finish_omp_cancellation_point): Likewise.
2917 * gimple-parser.c: Do not include omp-low.h
2918
c5af52eb
CP
29192016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2920 James Norris <jnorris@codesourcery.com>
2921
2922 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
2923 EXIT_DATA,WAIT} are not used in compound statements.
2924 (c_parser_oacc_enter_exit_data): Update diagnostics.
2925
48330c93
BE
29262016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2927
2928 PR c++/71973
2929 * c-decl.c (diagnose_mismatched_decls): Use
2930 OPT_Wbuiltin_declaration_mismatch here too.
2931
899ca90e 29322016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
2933 Alan Hayward <alan.hayward@arm.com>
2934 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
2935
2936 * c-decl.c (merge_decls): Use SET_DECL_MODE.
2937 (make_label, finish_struct): Likewise.
2938
1ee62b92 29392016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 2940 Richard Biener <rguenther@suse.de>
22b15758 2941
8e745a17
JJ
2942 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
2943 * config-lang.in (gtfiles): Add c/c-parser.h.
2944 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
2945 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
2946 * c-parser.c (enum c_id_kind, struct c_token,
2947 c_parser_next_token_is, c_parser_next_token_is_not,
2948 c_parser_next_token_is_keyword,
2949 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
2950 Split out to ...
2951 * c-parser.h: ... new header.
2952 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 2953 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
2954 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2955 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2956 c_parser_error, c_parser_require, c_parser_skip_until_found,
2957 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2958 c_parser_type_name): Export.
2959 (c_parser_tokens_buf): New function.
2960 (c_parser_error): Likewise.
2961 (c_parser_set_error): Likewise.
2962 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
2963 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
2964 via c_parser_parse_gimple_body.
8e745a17
JJ
2965 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
2966 c_token_starts_typename, c_parser_next_token_starts_declspecs,
2967 c_parser_next_tokens_start_declaration, c_parser_consume_token,
2968 c_parser_error, c_parser_require, c_parser_skip_until_found,
2969 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
2970 c_parser_type_name): Declare.
1ee62b92
PG
2971 (struct c_parser): Declare forward.
2972 (c_parser_tokens_buf): Declare.
8e745a17
JJ
2973 (c_parser_error): Likewise.
2974 (c_parser_set_error): Likewise.
2975 * gimple-parser.c: New file.
2976 * gimple-parser.h: Likewise.
1ee62b92 2977
22b15758
UB
29782016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2979
2980 PR c/35503
2981 * c-parser.c (c_parser_postfix_expression_after_primary): Call
2982 warn_for_restrict.
2983
84ff4775
LCW
29842016-09-11 Le-Chun Wu <lcwu@google.com>
2985 Mark Wielaard <mjw@redhat.com>
2986
2987 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
2988 to the given -Wshadow= variant.
2989
4d0cdd0c
TP
29902016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2991
2992 * c-typeck.c: Include memmodel.h.
2993
1202f33e
JJ
29942016-10-13 Jakub Jelinek <jakub@redhat.com>
2995
2996 PR target/77957
2997 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
2998 instead of lhd_return_null_tree_v.
2999
8a14afd0
BS
30002016-10-07 Bernd Schmidt <bschmidt@redhat.com>
3001
3002 PR c++/69733
3003 * c-decl.c (smallest_type_quals_location): New static function.
3004 (grokdeclarator): Try to find the correct location for an ignored
3005 qualifier.
3006
81fea426
MP
30072016-09-26 Marek Polacek <polacek@redhat.com>
3008
3009 PR c/7652
3010 * c-decl.c (pop_scope): Add gcc_fallthrough.
3011
30122016-09-26 Marek Polacek <polacek@redhat.com>
3013
3014 PR c/7652
3015 * c-parser.c (struct c_token): Add flags field.
3016 (c_lex_one_token): Pass it to c_lex_with_flags.
3017 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
3018 into IFN_FALLTHROUGH.
3019 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
3020 attribute fallthrough after a case label or default label.
3021 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
3022
9a2300e9
MP
30232016-09-24 Marek Polacek <polacek@redhat.com>
3024
3025 PR c/77490
3026 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
3027 have boolean value. Warn about ++/-- on booleans.
3028
7de76362
JJ
30292016-09-23 Jakub Jelinek <jakub@redhat.com>
3030
3031 * c-parser.c (incomplete_record_decls): Remove unnecessary
3032 = vNULL initialization of file scope vec.
3033
5b73d2ab
MP
30342016-09-16 Marek Polacek <polacek@redhat.com>
3035
3036 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
3037
e51fbec3
MP
30382016-09-14 Marek Polacek <polacek@redhat.com>
3039
3040 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
3041 (fix_array_notation_expr): Likewise.
3042 * c-decl.c (finish_decl): Likewise.
3043 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3044 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
3045 (function_to_pointer_conversion): Use false instead of 0.
3046 (convert_lvalue_to_rvalue): Likewise.
3047 (parser_build_unary_op): Likewise.
3048 (build_atomic_assign): Likewise.
3049 (build_unary_op): Change nonconvert parameter type to bool, use
3050 true/false instead of 1/0.
3051 (build_binary_op): Use true instead of 1.
3052
254830ba
DM
30532016-09-13 David Malcolm <dmalcolm@redhat.com>
3054
3055 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
3056 of add_fixit_insert to add_fixit_insert_before.
3057
4c13ba17
MP
30582016-09-13 Marek Polacek <polacek@redhat.com>
3059
3060 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
3061 it.
3062
54dcdb88
BE
30632016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3064
3065 PR c++/77496
3066 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
3067 COMPOUND_EXPR to warn_for_omitted_condop.
3068
e5106e27
DM
30692016-09-07 David Malcolm <dmalcolm@redhat.com>
3070
3071 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
3072 c_get_substring_location for this new langhook.
3073
9dc5773f
JJ
30742016-09-02 Jakub Jelinek <jakub@redhat.com>
3075
3076 PR c/65467
3077 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
3078 flag_openmp.
3079 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
3080 instead of mark_exp_read on low_bound/length expression.
3081 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
3082 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
3083 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
3084 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
3085 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
3086 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
3087 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
3088 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
3089 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
3090 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
3091 instead of mark_expr_read.
3092 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
3093 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
3094 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
3095 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
3096 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
3097 array section bases outside of depend clause, for depend clause
3098 use convert_lvalue_to_rvalue on the base.
3099 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
3100 linear, aligned, map, to and from clauses.
3101 (c_omp_clause_copy_ctor): New function.
3102
295844f6
MP
31032016-09-01 Marek Polacek <polacek@redhat.com>
3104
3105 PR c/7652
3106 * c-typeck.c (composite_type): Add FALLTHRU comment.
3107
089af25c
DM
31082016-08-31 David Malcolm <dmalcolm@redhat.com>
3109
3110 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
3111 to the insertion fixits for "struct", "union", and "enum".
3112
f9087798
DM
31132016-08-30 David Malcolm <dmalcolm@redhat.com>
3114
3115 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
3116 rather than add_fixit_misspelled_id.
3117 (undeclared_variable): Likewise.
3118 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
3119 now-redundant "here" params from add_fixit_insert method calls.
3120 (c_parser_parameter_declaration): Likewise.
3121 * c-typeck.c (build_component_ref): Remove now-redundant range
3122 param from add_fixit_replace method calls.
3123
ebef225f
MP
31242016-08-25 Marek Polacek <polacek@redhat.com>
3125
3126 * c-typeck.c (parser_build_binary_op): Pass LHS to
3127 warn_logical_not_parentheses.
3128
fe377a48
MP
31292016-08-25 Marek Polacek <polacek@redhat.com>
3130
3131 PR c/77323
3132 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
3133 or _FloatN or _FloatNx is not supported.
3134 (finish_declspecs): Set type to integer_type_node when _FloatN or
3135 _FloatNx is not supported.
3136
c65699ef
JM
31372016-08-19 Joseph Myers <joseph@codesourcery.com>
3138
3139 PR c/32187
3140 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
3141 (struct c_declspecs): Add field floatn_nx_idx.
3142 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
3143 and _FloatNx type specifiers.
3144 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
3145 (c_parser_declspecs, c_parser_attribute_any_word)
3146 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
3147 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
3148 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
3149 narrower than double.
3150
2f1364c2
JJ
31512016-08-12 Jakub Jelinek <jakub@redhat.com>
3152 Martin Liska <mliska@suse.cz>
3153
3154 PR c/67410
3155 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
3156 % to determine val element to change. Assert that
3157 wchar_bytes * charwidth fits into val array.
3158
191816a3
MP
31592016-08-12 Marek Polacek <polacek@redhat.com>
3160
3161 PR c/7652
3162 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
3163 (c_parser_postfix_expression): Likewise.
3164 * c-typeck.c (build_unary_op): Adjust fall through comment.
3165 (c_mark_addressable): Likewise.
3166
b95a64bb
JJ
31672016-08-11 Jakub Jelinek <jakub@redhat.com>
3168
3169 PR c/72816
3170 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
3171 array member through typedef, for orig_qual_indirect == 0 clear
3172 orig_qual_type.
3173
895aa8e1
DM
31742016-08-08 David Malcolm <dmalcolm@redhat.com>
3175
3176 PR c/64955
3177 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
3178 this up to selftest::run_c_tests.
3179 (selftest::run_c_tests): New function.
3180
0b212d8c
TS
31812016-08-04 Thomas Schwinge <thomas@codesourcery.com>
3182
ae9281fc
TS
3183 * c-parser.c (struct oacc_routine_data): Add error_seen and
3184 fndecl_seen members.
3185 (c_finish_oacc_routine): Use these.
3186 (c_parser_declaration_or_fndef): Adjust.
3187 (c_parser_oacc_routine): Likewise. Support more C language
3188 constructs, and improve diagnostics. Move pragma context
3189 checking...
3190 (c_parser_pragma): ... here.
3191
0b212d8c
TS
3192 * c-parser.c (struct oacc_routine_data): New.
3193 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
3194 Simplify code.
3195 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
3196 declare target" attribute.
3197
76e2c821
JB
31982016-08-01 Jan Beulich <jbeulich@suse.com>
3199
3200 * c-fold.c (c_fully_fold_internal): Also emit shift count
3201 warnings for vector types.
3202 * c-typeck.c (build_binary_op): Likewise.
3203
f618a472
MP
32042016-07-29 Marek Polacek <polacek@redhat.com>
3205
3206 PR c/71742
3207 * c-decl.c (finish_struct): Rephrase an error message.
3208
efd0786f
MP
3209 PR c/71853
3210 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
3211 to error node for invalid code.
3212
e00dceaf
MP
3213 PR c/71573
3214 * c-decl.c (implicitly_declare): Return decl early not only for
3215 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
3216
673a107a
JJ
32172016-07-29 Jakub Jelinek <jakub@redhat.com>
3218
3219 PR c/71969
3220 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
3221 on GNU extern inline functions.
3222
a5b5c8b6
MP
32232016-07-29 Marek Polacek <polacek@redhat.com>
3224
3225 PR c/71583
3226 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
3227 check expr.value.
3228
e3fe09c1
UB
32292016-07-22 Uros Bizjak <ubizjak@gmail.com>
3230
3231 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
3232
7c8f7eaa
DM
32332016-07-20 David Malcolm <dmalcolm@redhat.com>
3234
3235 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
3236 spellcheck-tree.h
3237 (best_macro_match): Likewise, converting from a typedef to a
3238 subclass.
3239 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
3240 (lookup_name_fuzzy): Update for change of best_macro_match to a
3241 subclass with a ctor that calls cpp_forall_identifiers.
3242
de6a69ee
DM
32432016-07-20 David Malcolm <dmalcolm@redhat.com>
3244
3245 * c-decl.c (implicit_decl_warning): Update for conversion of
3246 return type of lookup_name_fuzzy to const char *.
3247 (undeclared_variable): Likewise.
3248 (lookup_name_fuzzy): Convert return type from tree to
3249 const char *.
3250 * c-parser.c (c_parser_declaration_or_fndef): Update for
3251 conversion of return type of lookup_name_fuzzy to const char *.
3252 (c_parser_parameter_declaration): Likewise.
3253
b1c9c068
CP
32542016-07-15 Cesar Philippidis <cesar@codesourcery.com>
3255
3256 * c-parser.c (c_parser_oacc_declare): Don't scan for
3257 GOMP_MAP_POINTER.
3258 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
3259 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
3260 zero-length subarrays.
3261
ddbbcb19
JJ
32622016-07-15 Jakub Jelinek <jakub@redhat.com>
3263
3264 PR c/71858
3265 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
3266 instead of FUZZY_LOOKUP_NAME.
3267 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
3268 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
3269
dd36b877
JJ
32702016-07-14 Jakub Jelinek <jakub@redhat.com>
3271
3272 PR c/71858
3273 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
3274
8c681247
TS
32752016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3276
3277 * c-parser.c (c_parser_generic_selection): Make type of variable
3278 auto_vec.
3279 (c_parser_omp_declare_simd): Likewise.
3280
bf4fa671
TS
32812016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3282
3283 * c-decl.c (struct c_struct_parse_info): Change member types
3284 from vec to auto_vec.
3285 (start_struct): Adjust.
3286 (finish_struct): Likewise.
3287
557e8c49
JJ
32882016-07-02 Jakub Jelinek <jakub@redhat.com>
3289
3290 PR c/71719
3291 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
3292
54d19c3b
TS
32932016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3294
3295 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
3296 Move pragma context checking into...
3297 (c_parser_omp_cancellation_point): ... here, and improve
3298 diagnostic messages.
3299 * c-typeck.c (c_finish_omp_cancel)
3300 (c_finish_omp_cancellation_point): Improve diagnostic messages.
3301
152ef731
JJ
33022016-06-29 Jakub Jelinek <jakub@redhat.com>
3303
3304 PR c/71685
3305 * c-typeck.c (c_build_qualified_type): Don't clear
3306 C_TYPE_INCOMPLETE_VARS for the main variant.
3307
33082016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
3309
3310 PR c/71552
3311 * c-typeck.c (output_init_element): Diagnose incompatible types
3312 before non-constant initializers.
3313
e9ac1f86
JJ
33142016-06-28 Jakub Jelinek <jakub@redhat.com>
3315
3316 * Make-lang.in: Don't cat ../stage_current if it does not exist.
3317
277d7ee0
AK
33182016-06-23 Andi Kleen <ak@linux.intel.com>
3319
3320 * Make-lang.in: Add support for autofdo.
3321
1a4f11c8
DM
33222016-06-22 David Malcolm <dmalcolm@redhat.com>
3323
3324 PR c/70339
3325 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
3326 (implicit_decl_warning): When issuing warnings for implicit
3327 declarations, attempt to provide a suggestion via
3328 lookup_name_fuzzy.
3329 (undeclared_variable): Likewise when issuing errors.
3330 (lookup_name_in_scope): Likewise.
3331 (struct edit_distance_traits<cpp_hashnode *>): New struct.
3332 (best_macro_match): New typedef.
3333 (find_closest_macro_cpp_cb): New function.
3334 (lookup_name_fuzzy): New function.
3335 * c-parser.c: Include gcc-rich-location.h.
3336 (c_token_starts_typename): Split out case CPP_KEYWORD into...
3337 (c_keyword_starts_typename): ...this new function.
3338 (c_parser_declaration_or_fndef): When issuing errors about
3339 missing "struct" etc, add a fixit. For other kinds of errors,
3340 attempt to provide a suggestion via lookup_name_fuzzy.
3341 (c_parser_parms_declarator): When looking ahead to detect typos in
3342 type names, also reject CPP_KEYWORD.
3343 (c_parser_parameter_declaration): When issuing errors about
3344 unknown type names, attempt to provide a suggestion via
3345 lookup_name_fuzzy.
3346 * c-tree.h (c_keyword_starts_typename): New prototype.
3347
5a578671
JM
33482016-06-20 Joseph Myers <joseph@codesourcery.com>
3349
3350 PR c/71601
3351 * c-typeck.c (build_conditional_expr): Return error_mark_node if
3352 c_common_type returns error_mark_node.
3353
3f8257db 33542016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
3355
3356 PR c/69507
3357 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
3358 __alignof__ (expression).
3359
6a3f203c
DM
33602016-06-14 David Malcolm <dmalcolm@redhat.com>
3361
3362 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
3363
264757fb
DM
33642016-06-14 David Malcolm <dmalcolm@redhat.com>
3365
3366 * c-typeck.c (build_component_ref): Simplify fixit code by
3367 using gcc_rich_location::add_fixit_misspelled_id.
3368 (set_init_label): Likewise.
3369
f7e4f2e3
DM
33702016-06-13 David Malcolm <dmalcolm@redhat.com>
3371
3372 * c-parser.c (c_parser_initelt): Provide location of name for new
3373 location_t param of set_init_label.
3374 * c-tree.h (set_init_label): Add location_t param.
3375 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
3376 param and use it when issuing error messages about unrecognized
3377 field names. Attempt to provide a fixit hint if appropriate,
3378 otherwise update the error message to provide the type name.
3379
4b1ffdb1
TS
33802016-06-10 Thomas Schwinge <thomas@codesourcery.com>
3381
3382 PR c/71381
3383 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
3384 Loosen checking.
3385
44a845ca
MS
33862016-06-08 Martin Sebor <msebor@redhat.com>
3387 Jakub Jelinek <jakub@redhat.com>
3388
3389 PR c++/70507
3390 PR c/68120
3391 * c-typeck.c (convert_arguments): Don't promote last argument
3392 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3393
92a5f2ba
MP
33942016-06-08 Marek Polacek <polacek@redhat.com>
3395
3396 PR c/71418
3397 * c-decl.c (grokdeclarator): Check TYPE_P.
3398
08203f73
MP
3399 PR c/71426
3400 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
3401 code.
3402
6ffd47b7
DM
34032016-06-07 David Malcolm <dmalcolm@redhat.com>
3404
3405 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
3406 and structure element reference, capture the location of the
3407 element name token and pass it to build_component_ref.
3408 (c_parser_postfix_expression_after_primary): Likewise for
3409 structure element dereference.
3410 (c_parser_omp_variable_list): Likewise for
3411 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
3412 * c-tree.h (build_component_ref): Add location_t param.
3413 * c-typeck.c (build_component_ref): Add location_t param
3414 COMPONENT_LOC. Use it, if available, when issuing hints about
3415 mispelled member names to provide a fixit replacement hint.
3416
1f40cff3
MP
34172016-06-06 Marek Polacek <polacek@redhat.com>
3418
3419 PR c/71362
3420 * c-parser.c (c_parser_direct_declarator): Set location.
3421
5545a907
MP
34222016-06-06 Marek Polacek <polacek@redhat.com>
3423
3424 * c-typeck.c (comptypes_internal): Handle comparisons of
3425 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
3426 TYPE_REF_CAN_ALIAS_ALL.
3427
b605f663
CLT
34282016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
3429
3430 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
3431 arguments as addressable when async clause exists.
3432
00631022
JJ
34332016-05-30 Jakub Jelinek <jakub@redhat.com>
3434
3435 PR c++/71349
3436 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
3437 when combined with target construct.
3438
7211a097
JJ
34392016-05-26 Jakub Jelinek <jakub@redhat.com>
3440
3441 * c-parser.c (c_parser_omp_clause_schedule): Warn if
3442 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
3443
95efe6b6
MP
34442016-05-25 Marek Polacek <polacek@redhat.com>
3445
3446 PR c/71265
3447 * c-decl.c (c_make_fname_decl): Don't check seen_error.
3448
a23faf7a
MP
3449 PR c/71266
3450 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
3451
e46c7770
CP
34522016-05-24 Cesar Philippidis <cesar@codesourcery.com>
3453
3454 * c-parser.c (c_parser_oacc_declare): Add support for
3455 GOMP_MAP_FIRSTPRIVATE_POINTER.
3456 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
3457 argument with enum c_omp_region_type ort.
3458 (handle_omp_array_sections): Likewise. Update call to
3459 handle_omp_array_sections_1.
3460 (c_finish_omp_clauses): Add specific errors and warning messages for
3461 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
3462 call to handle_omp_array_sections.
3463
a04e69c0
TS
34642016-05-24 Thomas Schwinge <thomas@codesourcery.com>
3465
3466 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
3467
f17a223d
RB
34682016-05-24 Richard Biener <rguenther@suse.de>
3469
3470 PR middle-end/70434
3471 PR c/69504
3472 * c-typeck.c (build_array_ref): Do not complain about indexing
3473 non-lvalue vectors. Adjust for function name change.
3474
79063edd
MS
34752016-05-20 Martin Sebor <msebor@redhat.com>
3476
3477 PR c/71115
3478 * c-typeck.c (error_init): Use
3479 expansion_point_location_if_in_system_header.
3480 (warning_init): Same.
3481
8a40fef3
DM
34822016-05-19 David Malcolm <dmalcolm@redhat.com>
3483
3484 PR c/71171
3485 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
3486 in error-handling.
3487 (c_parser_postfix_expression): Likewise.
3488 * c-tree.h (c_expr::set_error): New method.
3489 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
3490 that result's range is initialized.
3491
e9892350
JG
34922016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
3493
3494 * c-typeck.c (parser_build_unary_op): Fix formatting.
3495
8fad45f5
MW
34962016-05-16 Matthew Wahab <matthew.wahab@arm.com>
3497
3498 * c-decl.c (grokdeclarator): Remove errmsg and use of
3499 targetm.invalid_return_type.
3500 (grokparms): Remove errmsg and use of
3501 targetm.invalid_parameter_type.
3502
aa4b467b
JM
35032016-05-13 Joseph Myers <joseph@codesourcery.com>
3504
3505 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
3506 function return type.
3507
4f2e1536
MP
35082016-05-12 Marek Polacek <polacek@redhat.com>
3509
3510 PR c/70756
3511 * c-decl.c (build_compound_literal): Pass LOC down to
3512 c_incomplete_type_error.
3513 * c-tree.h (require_complete_type): Adjust declaration.
3514 (c_incomplete_type_error): Likewise.
3515 * c-typeck.c (require_complete_type): Add location parameter, pass it
3516 down to c_incomplete_type_error.
3517 (c_incomplete_type_error): Add location parameter, pass it down to
3518 error_at.
3519 (build_component_ref): Pass location down to c_incomplete_type_error.
3520 (default_conversion): Pass location down to require_complete_type.
3521 (build_array_ref): Likewise.
3522 (build_function_call_vec): Likewise.
3523 (convert_arguments): Likewise.
3524 (build_unary_op): Likewise.
3525 (build_c_cast): Likewise.
3526 (build_modify_expr): Likewise.
3527 (convert_for_assignment): Likewise.
3528 (c_finish_omp_clauses): Likewise.
3529
d6e83a8d
MM
35302016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3531
3532 PR c/43651
3533 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
3534 is enabled.
3535 * c-errors.c (pedwarn_c90): Return true if warned.
3536 * c-tree.h (pedwarn_c90): Change return type to bool.
3537 (enum c_declspec_word): Add new enumerator cdw_atomic.
3538
5c3a10fb
MP
35392016-05-11 Marek Polacek <polacek@redhat.com>
3540
3541 PR c++/71024
3542 * c-decl.c (diagnose_mismatched_decls): Factor out code to
3543 diagnose_mismatched_attributes and call it.
3544
cf68d92c
MP
35452016-05-10 Marek Polacek <polacek@redhat.com>
3546
3547 PR c/70255
3548 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
3549 on a declaration following the definition.
3550
351f85c5
JJ
35512016-05-05 Jakub Jelinek <jakub@redhat.com>
3552
3553 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
3554 parse it through to c_parser_c99_block_statement.
3555 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
3556 caller.
3557
deef7113
MP
35582016-05-04 Marek Polacek <polacek@redhat.com>
3559
3560 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
3561 OPT_Wdangling_else.
3562
de55efd5
MP
35632016-05-04 Marek Polacek <polacek@redhat.com>
3564
3565 PR c/48778
3566 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
3567 for macro expansions.
3568
79ce98bc
MP
35692016-05-03 Marek Polacek <polacek@redhat.com>
3570
3571 PR c/70859
3572 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
3573 check_builtin_function_arguments.
3574
fb2647aa
RB
35752016-05-03 Richard Biener <rguenther@suse.de>
3576
3577 * Make-lang.in (cc1-checksum.c): For stage-final re-use
3578 the checksum from the previous stage.
3579
77886428
CP
35802016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3581
3582 * c-parser.c (c_parser_oacc_all_clauses): Update call to
3583 c_finish_omp_clauses.
3584 (c_parser_omp_all_clauses): Likewise.
3585 (c_parser_oacc_cache): Likewise.
3586 (c_parser_oacc_loop): Likewise.
3587 (omp_split_clauses): Likewise.
3588 (c_parser_omp_declare_target): Likewise.
3589 (c_parser_cilk_all_clauses): Likewise.
3590 (c_parser_cilk_for): Likewise.
3591 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
3592 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
3593
7176a4a0
MP
35942016-05-02 Marek Polacek <polacek@redhat.com>
3595
3596 PR c/70851
3597 * c-decl.c (grokdeclarator): Diagnose when array's size has an
3598 incomplete type.
3599
e7ff0319
CP
36002016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3601
3602 PR middle-end/70626
3603 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
3604 OACC_LOOP_CLAUSE_MASK.
3605 (c_parser_oacc_kernels_parallel): Update call to
3606 c_oacc_split_loop_clauses.
3607
9f405ce1
AM
36082016-04-28 Andrew MacLeod <amacleod@redhat.com>
3609
3610 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
3611 argument to build_modify_expr in two cases.
3612
c1e1f433
BS
36132016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3614
3615 * c-parser.c (c_parser_postfix_expression_after_primary): Call
3616 warn_for_memset instead of warning directly here.
3617
2448a956
MP
36182016-04-26 Marek Polacek <polacek@redhat.com>
3619
3620 PR c/67784
3621 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
3622 out of ...
3623 (c_parser_for_statement): ... here.
3624 (c_parser_if_statement): Use it.
3625 (c_parser_switch_statement): Use it.
3626 (c_parser_while_statement): Use it.
3627
b02a5e26
MP
3628 PR c/70791
3629 * c-decl.c (pushdecl): Pass LOCUS down to warning.
3630
477d4906
IV
36312016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3632
3633 PR c++/69363
3634 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
3635 instead of c_finish_cilk_clauses.
3636 * c-tree.h (c_finish_omp_clauses): Add new default argument.
3637 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
3638 floating-point variables in the linear clause for Cilk Plus.
3639
fe37c7af
MM
36402016-04-18 Michael Matz <matz@suse.de>
3641
3642 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
3643 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
3644
949505a9
MP
36452016-04-15 Marek Polacek <polacek@redhat.com>
3646
3647 PR c/70671
3648 * c-typeck.c (build_unary_op): Pass location down to error and
3649 warning call.
3650
dda1bf61
JJ
36512016-04-15 Jakub Jelinek <jakub@redhat.com>
3652
3653 PR c/70436
3654 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
3655 where needed.
3656 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
3657 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
3658 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
3659 Adjust c_parser_pragma callers.
3660 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
3661 caller.
3662 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
3663 c_parser_statement.
3664 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
3665 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
3666 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
3667 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
3668 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
3669 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
3670 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
3671 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
3672 down where needed.
3673 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
3674 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
3675 calls.
3676
99cd9857
MP
36772016-04-13 Marek Polacek <polacek@redhat.com>
3678
3679 PR c/70436
3680 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
3681 adjust callers.
3682 (c_parser_statement): Likewise.
3683 (c_parser_c99_block_statement): Likewise.
3684 (c_parser_while_statement): Likewise.
3685 (c_parser_for_statement): Likewise.
3686 (c_parser_if_body): Don't set IF_P here.
3687 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
3688 about dangling else here.
3689 * c-tree.h (c_finish_if_stmt): Adjust declaration.
3690 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
3691 warn about dangling else here.
3692
f13355da
MP
36932016-04-04 Marek Polacek <polacek@redhat.com>
3694
3695 PR c/70307
3696 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
3697
5fde6a45
MP
36982016-03-31 Marek Polacek <polacek@redhat.com>
3699
3700 PR c/70297
3701 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
3702
4bbf545b
DM
37032016-03-18 David Malcolm <dmalcolm@redhat.com>
3704
3705 PR c/70281
3706 * c-parser.c (c_parser_postfix_expression): Set the source range
3707 for uses of "__builtin_types_compatible_p".
3708
fcc2b74f
JJ
37092016-03-17 Jakub Jelinek <jakub@redhat.com>
3710
3711 PR c/70280
3712 * c-typeck.c (composite_type): Don't count void_list_node
3713 into len, if the list is terminated by void_list_node, start
3714 with void_list_node instead of NULL for newargs. Stop
3715 at void_list_node.
3716
ab4c578f
MP
37172016-03-16 Marek Polacek <polacek@redhat.com>
3718
3719 PR c/70093
3720 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
3721 nested functions returning VM types.
3722
96b3c82d
CP
37232016-03-09 Cesar Philippidis <cesar@codesourcery.com>
3724
3725 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
3726 when calling c_finish_omp_clauses.
3727
29b9828f
BS
37282016-03-04 Bernd Schmidt <bschmidt@redhat.com>
3729
3730 PR c/69824
3731 * c-decl.c (get_parm_info): Don't queue implicit function declarations
3732 for later.
3733
7ff6ca38
MP
37342016-03-04 Marek Polacek <polacek@redhat.com>
3735
3736 PR c/69798
3737 * c-parser.c (c_parser_postfix_expression): Call
3738 c_parser_cast_expression rather than c_parser_postfix_expression.
3739
686e2237
JJ
37402016-03-01 Jakub Jelinek <jakub@redhat.com>
3741
3742 PR c/69796
3743 PR c/69974
3744 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
3745 of incomplete decls to error_mark_node.
3746
0b05329b
MP
37472016-02-24 Marek Polacek <polacek@redhat.com>
3748
3749 PR c/69819
3750 * c-decl.c (finish_decl): Don't update the copy of the type of a
3751 different decl type.
3752
067fbd8b
JJ
37532016-02-23 Jakub Jelinek <jakub@redhat.com>
3754
3755 PR objc/69844
3756 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
3757 in id_kind reclassification.
3758
bf14eba2
JJ
37592016-02-16 Jakub Jelinek <jakub@redhat.com>
3760
3761 PR c/69835
3762 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
3763
ba539195
JN
37642016-02-16 James Norris <jnorris@codesourcery.com>
3765
3766 PR c/64748
3767 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
3768
16595a1f
BS
37692016-02-12 Bernd Schmidt <bschmidt@redhat.com>
3770
f48dfe98
BS
3771 * c-decl.c (build_null_declspecs): Zero the entire struct.
3772
16595a1f
BS
3773 PR c/69522
3774 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
3775 callers changed. If nested_p is true, use it to call
3776 finish_implicit_inits.
3777 * c-tree.h (finish_implicit_inits): Declare.
3778 * c-typeck.c (finish_implicit_inits): New function. Move code
3779 from ...
3780 (push_init_level): ... here.
3781 (set_designator, process_init_element): Call finish_implicit_inits.
3782
66756373
JJ
37832016-02-11 Jakub Jelinek <jakub@redhat.com>
3784
3785 PR c/69768
3786 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
3787 arguments for -Waddress warning.
3788
1066e9b5
JJ
37892016-02-04 Jakub Jelinek <jakub@redhat.com>
3790
3791 PR c/69669
3792 * c-decl.c (finish_enum): When honoring mode attribute,
3793 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
3794
3a5d2ba4
JJ
37952016-01-29 Jakub Jelinek <jakub@redhat.com>
3796
3797 PR debug/69518
3798 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
3799 all type variants, not just TYPE_MAIN_VARIANT.
3800
cbdd8ae0
JJ
38012016-01-27 Jakub Jelinek <jakub@redhat.com>
3802
3803 PR debug/66869
3804 * c-decl.c (c_write_global_declarations_1): Warn with
3805 warn_unused_function if static prototype without definition
3806 is not C_DECL_USED.
3807
fa74a4bc
MP
38082016-01-27 Marek Polacek <polacek@redhat.com>
3809
3810 PR c/68062
3811 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
3812 to unsigned, if needed. Add -Wsign-compare warning.
3813
13f92e8d
JJ
38142016-01-26 Jakub Jelinek <jakub@redhat.com>
3815
3816 PR tree-optimization/69483
3817 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
3818
cd8e73dc 38192016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
3820
3821 PR c/24293
3822 * c-tree.h (incomplete_record_decls): Declare.
3823 * c-parser.c (incomplete_record_decls): Define.
3824 (c_parser_translation_unit): Iterate through incomplete_record_decls and
3825 report error if any decl has zero size.
3826 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
3827 or enum type to incomplete_record_decls.
3828
e6d6ec9e
TV
38292016-01-14 Tom de Vries <tom@codesourcery.com>
3830
3831 PR tree-optimization/68773
3832 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
3833 set force_output.
3834
00083992
MP
38352016-01-14 Marek Polacek <polacek@redhat.com>
3836
3837 PR c/69262
3838 * c-decl.c (grokdeclarator): Provide more information for invalid
3839 array declarations.
3840
7443cf13
DM
38412016-01-06 David Malcolm <dmalcolm@redhat.com>
3842
3843 * c-parser.c (c_parser_unary_expression): For dereferences, build
3844 a combined location before calling build_indirect_ref, so that
3845 error reports cover the full range, manually updating the c_expr
3846 src_range.
3847
6b131d5b
MP
38482016-01-06 Marek Polacek <polacek@redhat.com>
3849
3850 PR sanitizer/69099
3851 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
3852 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
3853 NULL.
3854
818ab71a
JJ
38552016-01-04 Jakub Jelinek <jakub@redhat.com>
3856
3857 Update copyright years.
3858
2fe0a208
MP
38592016-01-04 Marek Polacek <polacek@redhat.com>
3860
3861 PR c/68908
3862 * c-typeck.c (build_atomic_assign): Improve commentary. Add
3863 optimization to use __atomic_fetch_* built-in if possible.
3864
c7b48c8a
TS
38652015-12-23 Thomas Schwinge <thomas@codesourcery.com>
3866
3867 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
3868 into...
3869 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
3870 all users.
3871
fda5652f
MP
38722015-12-22 Marek Polacek <polacek@redhat.com>
3873
3874 PR c/69002
3875 * c-typeck.c (build_component_ref): Warn when acessing elements of
3876 atomic structures or unions.
3877
745e411d
DM
38782015-12-21 David Malcolm <dmalcolm@redhat.com>
3879
3880 * c-typeck.c: Include "gcc-rich-location.h".
3881 (build_binary_op): In the two places that call binary_op_error,
3882 create a gcc_rich_location and populate it with the location of
3883 the binary op and its two operands.
3884
94c40e19
DM
38852015-12-16 David Malcolm <dmalcolm@redhat.com>
3886
3887 * c-parser.c (c_parser_statement_after_labels): When calling
3888 c_finish_return, Use the return expression's location if it has
3889 one, falling back to the location of the first token within it.
3890 * c-typeck.c (c_finish_return): When issuing warnings about
3891 the incorrect presence/absence of a return value, issue a note
3892 showing the declaration of the function.
3893
de67c4c3
DM
38942015-12-16 David Malcolm <dmalcolm@redhat.com>
3895
3896 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
3897 to 4.
3898 (c_parser_peek_nth_token): New function.
3899 (c_parser_peek_conflict_marker): New function.
3900 (c_parser_error): Detect conflict markers and report them as such.
3901
a10704e1
DM
39022015-12-16 David Malcolm <dmalcolm@redhat.com>
3903
3904 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
3905 to preserve range information for the primary expression
3906 in the call to c_parser_postfix_expression_after_primary.
3907
8062bca6
DM
39082015-12-16 David Malcolm <dmalcolm@redhat.com>
3909
3910 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
3911 expression location, falling back on the first token location,
3912 rather than always using the latter.
3913
d06f8b75
MP
39142015-12-16 Marek Polacek <polacek@redhat.com>
3915
3916 PR c/64637
3917 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
3918 available.
3919
2994fb91
MP
39202015-12-15 Marek Polacek <polacek@redhat.com>
3921
3922 PR c/68907
3923 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
3924 artificial decl.
3925
a1b93f8d
DM
39262015-12-08 David Malcolm <dmalcolm@redhat.com>
3927
3928 * c-parser.c (c_parser_alignof_expression): Capture location of
3929 closing parenthesis (if any), or of end of unary expression, and
3930 use it to build a src_range for the expression.
3931
46c6e1e2
DM
39322015-12-08 David Malcolm <dmalcolm@redhat.com>
3933
3934 PR c/68757
3935 * c-parser.c (c_parser_get_builtin_args): Add
3936 "out_close_paren_loc" param, and write back to it.
3937 (c_parser_postfix_expression): Capture the closing
3938 parenthesis location for RID_CHOOSE_EXPR,
3939 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
3940 RID_BUILTIN_SHUFFLE and use it to set the source range
3941 for such expressions; within RID_BUILTIN_COMPLEX set
3942 the underlying location.
3943
66189108
MP
39442015-12-07 Marek Polacek <polacek@redhat.com>
3945
3946 PR c/68668
3947 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
3948 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
3949
f187980b
EB
39502015-12-04 Eric Botcazou <ebotcazou@adacore.com>
3951
3952 * c-tree.h (c_build_va_arg): Adjust prototype.
3953 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
3954 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
3955 parameter, adjust throughout and issue an error if EXPR is a component
3956 with reverse storage order.
3957
4250754e
JM
39582015-12-02 Jason Merrill <jason@redhat.com>
3959
3960 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3961 (c_fully_fold_internal, decl_constant_value_for_optimization):
3962 Move from c-common.c.
3963 * c-tree.h: Declare decl_constant_value_for_optimization.
3964 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
3965
e9e32ee6
JM
39662015-12-02 Joseph Myers <joseph@codesourcery.com>
3967
3968 PR c/68162
3969 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
3970 following link from declarator to next declarator. Track original
3971 qualified type and pass it to c_build_qualified_type.
3972 * c-typeck.c (c_build_qualified_type): Add arguments
3973 orig_qual_type and orig_qual_indirect.
3974
ff7a55bf
TS
39752015-12-02 Thomas Schwinge <thomas@codesourcery.com>
3976
3977 * c-parser.c (c_parser_omp_clause_name)
3978 (c_parser_oacc_all_clauses): Alphabetical sorting.
3979
657e4e47
JJ
39802015-12-02 Jakub Jelinek <jakub@redhat.com>
3981
3982 PR c/68533
3983 * c-decl.c (get_parm_info): Use b->locus instead of input_location
3984 for diagnostics.
3985
37d5ad46
JB
39862015-12-01 Julian Brown <julian@codesourcery.com>
3987 Cesar Philippidis <cesar@codesourcery.com>
3988 James Norris <James_Norris@mentor.com>
3989
3990 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
3991 (c_parser_oacc_clause_use_device): New function.
3992 (c_parser_oacc_all_clauses): Add use_device support.
3993 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
3994 (c_parser_oacc_host_data): New function.
3995 (c_parser_omp_construct): Add host_data support.
3996 * c-tree.h (c_finish_oacc_host_data): Add prototype.
3997 * c-typeck.c (c_finish_oacc_host_data): New function.
3998 (c_finish_omp_clauses): Add use_device support.
3999
a4850ce9
JH
40002015-11-29 Jan Hubicka <hubicka@ucw.cz>
4001
4002 PR c/67106
4003 * c-decl.c: Set TYPE_PACKED in variants.
4004
b58d3df2
ML
40052015-11-27 Martin Liska <mliska@suse.cz>
4006
4007 PR c++/68312
4008 * c-array-notation.c (fix_builtin_array_notation_fn):
4009 Use release_vec_vec instead of vec::release.
4010 (build_array_notation_expr): Likewise.
4011 (fix_conditional_array_notations_1): Likewise.
4012 (fix_array_notation_expr): Likewise.
4013 (fix_array_notation_call_expr): Likewise.
4014
aec17bfe
JJ
40152015-11-27 Jakub Jelinek <jakub@redhat.com>
4016
4017 PR c/63326
4018 * c-parser.c (c_parser_compound_statement_nostart): If
4019 last_label is true, use pragma_stmt instead of pragma_compound
4020 as second c_parser_pragma argument.
4021 (c_parser_omp_ordered, c_parser_omp_target_update,
4022 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
4023 false as second argument to c_parser_skip_to_pragma_eol after
4024 diagnosing standalone directives used in pragma_stmt context.
4025
688c4de0
IV
40262015-11-24 Ilya Verbin <ilya.verbin@intel.com>
4027
4028 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
4029 with "if (ENABLE_OFFLOADING)".
4030
cbd03aee
DM
40312015-11-23 David Malcolm <dmalcolm@redhat.com>
4032
4033 PR objc/68438
4034 * c-parser.c (c_parser_postfix_expression): Set up source ranges
4035 for various Objective-C constructs: Class.name syntax,
4036 @selector(), @protocol(), @encode(), and [] message syntax.
4037
a87a86e1
DM
40382015-11-20 David Malcolm <dmalcolm@redhat.com>
4039
4040 PR 62314
4041 * c-typeck.c (should_suggest_deref_p): New function.
4042 (build_component_ref): Special-case POINTER_TYPE when
4043 generating a "not a structure of union" error message, and
4044 suggest a "->" rather than a ".", providing a fix-it hint.
4045
8ece8dfb
DM
40462015-11-19 David Malcolm <dmalcolm@redhat.com>
4047
4048 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
4049 candidate into a new function, find_closest_identifier.
4050
433068cc
MP
40512015-11-19 Marek Polacek <polacek@redhat.com>
4052
4053 PR c/68412
4054 * c-typeck.c (parser_build_binary_op): Properly handle
4055 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
4056
bef08b71
DM
40572015-11-17 David Malcolm <dmalcolm@redhat.com>
4058
4059 * c-parser.c (set_c_expr_source_range): Bulletproof both
4060 overloaded implementations against NULL expr->value.
4061 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
4062 values.
4063 (c_parser_unary_expression): Likewise when handling addresses of
4064 labels.
4065 (c_parser_postfix_expression): Likewise for statement expressions,
4066 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
4067 __builtin_va_arg, and for __builtin_offset_of.
4068 (c_parser_postfix_expression_after_paren_type): Initialize expr's
4069 src_range using the range of the braced initializer.
4070 (c_parser_transaction_expression): Set src_range for "ret" to a
4071 sane pair of values.
4072
fff77217
KY
40732015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4074
4075 * c-parser.c (c_finish_omp_declare_simd): Look for
4076 "simd" attribute as well. Update error message.
4077
1d899da2
TS
40782015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4079
4080 * c-parser.c (c_parser_omp_declare_target): Adjust.
4081
e4606348
JJ
40822015-11-14 Jakub Jelinek <jakub@redhat.com>
4083
4084 * c-typeck.c (c_finish_omp_clauses): Don't mark
4085 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
4086
3e636daf
MP
40872015-11-14 Marek Polacek <polacek@redhat.com>
4088
4089 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
4090 * c-typeck.c: Likewise.
4091
ebedc9a3
DM
40922015-11-13 David Malcolm <dmalcolm@redhat.com>
4093
4094 * c-decl.c (warn_defaults_to): Pass line_table to
4095 rich_location ctor.
4096 * c-errors.c (pedwarn_c99): Likewise.
4097 (pedwarn_c90): Likewise.
4098 * c-parser.c (set_c_expr_source_range): New functions.
4099 (c_token::get_range): New method.
4100 (c_token::get_finish): New method.
4101 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
4102 based on the range from the start of the LHS to the end of the
4103 RHS.
4104 (c_parser_conditional_expression): Likewise, based on the range
4105 from the start of the cond.value to the end of exp2.value.
4106 (c_parser_binary_expression): Call set_c_expr_source_range on
4107 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
4108 (c_parser_cast_expression): Call set_c_expr_source_range on ret
4109 based on the cast_loc through to the end of the expr.
4110 (c_parser_unary_expression): Likewise, based on the
4111 op_loc through to the end of op.
4112 (c_parser_sizeof_expression) Likewise, based on the start of the
4113 sizeof token through to either the closing paren or the end of
4114 expr.
4115 (c_parser_postfix_expression): Likewise, using the token range,
4116 or from the open paren through to the close paren for
4117 parenthesized expressions.
4118 (c_parser_postfix_expression_after_primary): Likewise, for
4119 various kinds of expression.
4120 * c-tree.h (struct c_expr): Add field "src_range".
4121 (c_expr::get_start): New method.
4122 (c_expr::get_finish): New method.
4123 (set_c_expr_source_range): New decls.
4124 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
4125 on ret for prefix unary ops.
4126 (parser_build_binary_op): Likewise, running from the start of
4127 arg1.value through to the end of arg2.value.
4128
ec8b536f
MP
41292015-11-13 Marek Polacek <polacek@redhat.com>
4130
4131 PR c/68320
4132 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
4133
277fe616
DM
41342015-11-13 David Malcolm <dmalcolm@redhat.com>
4135
4136 * c-typeck.c: Include spellcheck.h.
4137 (lookup_field_fuzzy_find_candidates): New function.
4138 (lookup_field_fuzzy): New function.
4139 (build_component_ref): If the field was not found, try using
4140 lookup_field_fuzzy and potentially offer a suggestion.
4141
6e232ba4
JN
41422015-11-12 James Norris <jnorris@codesourcery.com>
4143 Joseph Myers <joseph@codesourcery.com>
4144
4145 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
4146 (c_parser_omp_clause_name): Handle 'device_resident' clause.
4147 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4148 and PRAGMA_OMP_CLAUSE_LINK.
4149 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
4150 and PRAGMA_OACC_CLAUSE_LINK.
4151 (OACC_DECLARE_CLAUSE_MASK): New definition.
4152 (c_parser_oacc_declare): New function.
4153
9be4f715
MP
41542015-11-12 Marek Polacek <polacek@redhat.com>
4155
4156 PR c/67784
4157 * c-parser.c (c_parser_for_statement): Reclassify the token in
4158 a correct scope.
4159
e78bede6
MP
41602015-11-11 Marek Polacek <polacek@redhat.com>
4161
4162 PR c/68107
4163 PR c++/68266
4164 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
4165 checking the size of an array.
4166
69f293c9
AM
41672015-11-11 Andrew MacLeod <amacleod@redhat.com>
4168
4169 * c-array-notation.c: Remove unused header files.
4170 * c-aux-info.c: Likewise.
4171 * c-convert.c: Likewise.
4172 * c-decl.c: Likewise.
4173 * c-errors.c: Likewise.
4174 * c-lang.c: Likewise.
4175 * c-objc-common.c: Likewise.
4176 * c-parser.c: Likewise.
4177 * c-typeck.c: Likewise.
4178 * gccspec.c: Likewise.
4179
3a40d81d
NS
41802015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4181 Cesar Philippidis <cesar@codesourcery.com>
4182 James Norris <jnorris@codesourcery.com>
4183 Julian Brown <julian@codesourcery.com>
4184 Nathan Sidwell <nathan@codesourcery.com>
4185
3a40d81d
NS
4186 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
4187 routine arg.
4188 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
4189 (c_parser_pragma): Parse 'acc routine'.
4190 (OACC_ROUTINE_CLAUSE_MARK): Define.
4191 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
4192
fc402eec
AA
41932015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4194
4195 PR debug/67192
4196 * c-typeck.c (c_finish_loop): For unconditional loops, set the
4197 location of the backward-goto to the start of the loop body.
4198
f6b0b3db
AA
41992015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
4200
4201 PR debug/67192
4202 * c-parser.c (c_parser_while_statement): Finish the loop before
4203 parsing ahead for misleading indentation.
4204 (c_parser_for_statement): Likewise.
4205
ee45a32d
EB
42062015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4207
4208 * c-decl.c (finish_struct): If the structure has reverse storage
4209 order, rewrite the type of array fields with scalar component. Call
4210 maybe_apply_pragma_scalar_storage_order on entry.
4211 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
4212 errors on bit-fields and reverse SSO here and not...
4213 (c_mark_addressable): ...here.
4214 (output_init_element): Adjust call to initializer_constant_valid_p.
4215 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
4216
8a645150
DM
42172015-11-06 David Malcolm <dmalcolm@redhat.com>
4218
4219 * c-decl.c (warn_defaults_to): Update for change in signature
4220 of diagnostic_set_info.
4221 * c-errors.c (pedwarn_c99): Likewise.
4222 (pedwarn_c90): Likewise.
4223 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
4224 for textinfo::set_location.
4225
7a5e4956
CP
42262015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4227 Thomas Schwinge <thomas@codesourcery.com>
4228 James Norris <jnorris@codesourcery.com>
4229
4230 * c-parser.c (c_parser_omp_clause_name): Add support for
4231 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
4232 (c_parser_omp_clause_default): Add is_oacc argument. Handle
4233 default(none) in OpenACC.
4234 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
4235 arguments.
4236 (c_parser_oacc_clause_tile): New function.
4237 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
4238 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
4239 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
4240 TILE}.
4241 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
4242 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
4243 FIRSTPRIVATE}.
4244 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
4245 (c_parser_oacc_update): Update the error message for missing clauses.
4246 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
4247 and OMP_CLAUSE_INDEPENDENT.
4248
bfcfbfa0
MP
42492015-11-05 Marek Polacek <polacek@redhat.com>
4250
4251 PR c/68090
4252 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
4253 deal with pre-evaluation on invalid types.
4254
e01d41e5
JJ
42552015-11-05 Jakub Jelinek <jakub@redhat.com>
4256 Ilya Verbin <ilya.verbin@intel.com>
4257
4258 * c-parser.c: Include context.h and gimple-expr.h.
4259 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
4260 monotonic together with nonmonotonic.
4261 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
4262 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
4263 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
4264 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
4265 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
4266 expressions on combined target teams before the target.
4267 (c_parser_omp_declare_target): If decl has "omp declare target" or
4268 "omp declare target link" attribute, and cgraph or varpool node already
4269 exists, then set corresponding flags. Call c_finish_omp_clauses
4270 in the parenthesized extended-list syntax case.
4271 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
4272 declare target.
4273 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
4274 on OMP_CLAUSE_REDUCTION array sections.
4275 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
4276 into the constant offset, or for variable low-bound using
4277 POINTER_PLUS_EXPR. For structure element based array sections use
4278 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
4279 (c_finish_omp_clauses): Drop generic_field_head, structure
4280 elements are now always mapped even as array section bases,
4281 diagnose same var in data sharing and mapping clauses. Diagnose if
4282 linear step on declare simd is neither a constant nor a uniform
4283 parameter. Look through POINTER_PLUS_EXPR for array section
4284 reductions. Diagnose the same var or function appearing multiple
4285 times on the same directive. Fix up wording for the to clause if t
4286 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
4287 modifier on kinds other than dynamic or guided or nonmonotonic
4288 modifier together with ordered clause.
4289
4bf9e5a8
TS
42902015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4291 Chung-Lin Tang <cltang@codesourcery.com>
4292
4293 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
4294
2adfab87
AM
42952015-10-29 Andrew MacLeod <amacleod@redhat.com>
4296
4297 * c-array-notation.c: Reorder #include's and remove duplicates.
4298 * c-aux-info.c: Likewise.
4299 * c-convert.c: Likewise.
4300 * c-decl.c: Likewise.
4301 * c-errors.c: Likewise.
4302 * c-lang.c: Likewise.
4303 * c-objc-common.c: Likewise.
4304 * c-parser.c: Likewise.
4305 * c-typeck.c: Likewise.
4306
e922069e
JW
43072015-10-26 Jim Wilson <jim.wilson@linaro.org>
4308
4309 PR debug/66068
4310 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
4311 after calling build_qualified_type.
4312
765dd391
CP
43132015-10-27 Cesar Philippidis <cesar@codesourcery.com>
4314 Thomas Schwinge <thomas@codesourcery.com>
4315 James Norris <jnorris@codesourcery.com>
4316 Joseph Myers <joseph@codesourcery.com>
4317 Julian Brown <julian@codesourcery.com>
4318 Bernd Schmidt <bschmidt@redhat.com>
4319
4320 * c-parser.c (c_parser_oacc_shape_clause): New.
4321 (c_parser_oacc_simple_clause): New.
4322 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
4323 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
4324
88bae6f4
TS
43252015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4326 James Norris <jnorris@codesourcery.com>
4327 Cesar Philippidis <cesar@codesourcery.com>
4328
4329 PR c/64765
4330 PR c/64880
4331 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
4332 parameters, and handle these. Adjust all users.
4333 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
4334 into...
4335 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
4336 all users.
4337 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
4338 declare functions.
4339 (c_finish_omp_construct): Declare function.
4340 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
4341 Merge functions into...
4342 (c_finish_omp_construct): ... this new function.
4343
a8fc2579
RB
43442015-10-22 Richard Biener <rguenther@suse.de>
4345
4346 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
4347 before folding a MINUS_EXPR.
4348
e9122ef6
MP
43492015-10-21 Marek Polacek <polacek@redhat.com>
4350
4351 PR c/68024
4352 * c-decl.c (start_function): Warn about vararg functions without
4353 a prototype.
4354
9f47c7e5
IE
43552015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
4356
4357 * c-typeck.c (build_conditional_expr): Use boolean vector
4358 type for vector comparison.
4359 (build_vec_cmp): New.
4360 (build_binary_op): Use build_vec_cmp for comparison.
4361
fa60eeb9
MP
43622015-10-20 Marek Polacek <polacek@redhat.com>
4363
4364 * c-parser.c (is_cilkplus_vector_p): Don't define here.
4365
2c7020eb
MP
43662015-10-20 Marek Polacek <polacek@redhat.com>
4367
4368 PR c/67964
4369 * c-parser.c (c_parser_attributes): Break out of the loop if the
4370 token after an attribute isn't a comma.
4371
d9a6bd32
JJ
43722015-10-13 Jakub Jelinek <jakub@redhat.com>
4373 Aldy Hernandez <aldyh@redhat.com>
4374
4375 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
4376 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
4377 (c_parser_omp_variable_list): Handle structure elements for
4378 map, to and from clauses. Handle array sections in reduction
4379 clause. Formatting fixes.
4380 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
4381 if clause modifiers.
4382 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4383 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4384 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
4385 c_parser_omp_clause_is_device_ptr): New functions.
4386 (c_parser_omp_clause_ordered): Parse optional parameter.
4387 (c_parser_omp_clause_reduction): Handle array reductions.
4388 (c_parser_omp_clause_schedule): Parse optional simd modifier.
4389 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
4390 functions.
4391 (c_parser_omp_clause_linear): Parse linear clause modifiers.
4392 (c_parser_omp_clause_depend_sink): New function.
4393 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
4394 (c_parser_omp_clause_map): Parse release/delete map kinds and
4395 optional always modifier.
4396 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
4397 and c_finish_omp_clauses callers.
4398 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
4399 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
4400 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
4401 (OMP_CRITICAL_CLAUSE_MASK): Define.
4402 (c_parser_omp_critical): Parse critical clauses.
4403 (c_parser_omp_for_loop): Handle doacross loops, adjust
4404 c_finish_omp_for and c_finish_omp_clauses callers.
4405 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
4406 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
4407 (OMP_FOR_CLAUSE_MASK): Add linear clause.
4408 (c_parser_omp_for): Disallow ordered clause when combined with
4409 distribute. Disallow linear clause when combined with distribute
4410 and not combined with simd.
4411 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
4412 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
4413 parse clauses and if depend clause is found, don't parse a body.
4414 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
4415 Allow target parallel without for after it.
4416 (OMP_TASK_CLAUSE_MASK): Add priority clause.
4417 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
4418 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
4419 invalid kinds.
4420 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
4421 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
4422 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
4423 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
4424 functions.
4425 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
4426 defaultmap and is_device_ptr clauses.
4427 (c_parser_omp_target): Parse target parallel and target simd. Set
4428 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
4429 and target exit data. Diagnose invalid map kinds.
4430 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
4431 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
4432 construct.
4433 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
4434 &omp_priv.
4435 (OMP_TASKLOOP_CLAUSE_MASK): Define.
4436 (c_parser_omp_taskloop): New function.
4437 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
4438 handle PRAGMA_OMP_TASKLOOP.
4439 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
4440 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
4441 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
4442 Add IS_OMP argument, handle structure element bases, diagnose
4443 bitfields, pass IS_OMP recursively, diagnose known zero length
4444 array sections in depend clauses, handle array sections in reduction
4445 clause, diagnose negative length even for pointers.
4446 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
4447 types, pass IS_OMP down to handle_omp_array_sections_1, handle
4448 array sections in reduction clause, set
4449 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
4450 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
4451 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
4452 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
4453
21ba0cea
MP
44542015-10-06 Marek Polacek <polacek@redhat.com>
4455
4456 * c-parser.c (c_parser_statement_after_labels): Use
4457 protected_set_expr_location.
4458 (c_parser_omp_clause_num_gangs): Likewise.
4459 (c_parser_omp_clause_num_threads): Likewise.
4460 (c_parser_omp_clause_num_workers): Likewise.
4461 (c_parser_omp_clause_vector_length): Likewise.
4462 (c_parser_omp_clause_num_teams): Likewise.
4463 (c_parser_omp_clause_thread_limit): Likewise.
4464 * c-typeck.c (build_c_cast): Likewise.
4465 (c_cast_expr): Likewise.
4466
624d31fe
RS
44672015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4468
4469 * c-typeck.c (c_tree_equal): Use real_equal instead of
4470 REAL_VALUES_EQUAL.
4471
b8fd7909
JM
44722015-10-04 Jason Merrill <jason@redhat.com>
4473
4474 * c-parser.c (c_lex_one_token): Handle @synchronized.
4475 * c-decl.c (match_builtin_function_types): A declaration of a built-in
4476 can change whether the function is transaction_safe.
4477
1c7485af
MP
44782015-10-02 Marek Polacek <polacek@redhat.com>
4479
4480 PR c/67730
4481 * c-typeck.c (convert_for_assignment): Use the expansion point
4482 location throughout.
4483
3e3b8d63
MP
44842015-10-02 Marek Polacek <polacek@redhat.com>
4485
4486 PR c/64249
4487 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
4488 and pass it down to c_parser_if_statement.
4489 (c_parser_else_body): Add CHAIN parameter and pass it down to
4490 c_parser_statement_after_labels.
4491 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
4492 duplicated if-else-if conditions.
4493
aabef2de
MP
44942015-10-01 Marek Polacek <polacek@redhat.com>
4495
4496 * c-typeck.c (convert_for_assignment): Improve commentary.
4497
de8ddd5f
MP
44982015-09-30 Marek Polacek <polacek@redhat.com>
4499
4500 PR c/67730
4501 * c-typeck.c (c_finish_return): Use the expansion point location for
4502 certain "return with value" warnings.
4503
c4914de6
MLI
45042015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4505
4506 * c-parser.c (pragma_lex): Add loc argument.
4507
0e36f5c7
MP
45082015-09-15 Marek Polacek <polacek@redhat.com>
4509
4510 PR c/67580
4511 * c-decl.c (tag_exists_p): New function.
4512 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
4513 struct/union/enum keywords are missing.
4514 * c-tree.h (tag_exists_p): Declare.
4515
2f3bb934
MP
45162015-09-15 Marek Polacek <polacek@redhat.com>
4517
4518 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
4519 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
4520 Return NULL_TREE instead of 0.
4521 (lookup_name): Return NULL_TREE instead of 0.
4522 (lookup_name_in_scope): Likewise.
4523 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
4524 (parser_xref_tag): Use false instead of 0.
4525 (start_struct): Use true instead of 1.
4526 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
4527
aa256c4a
MP
45282015-09-14 Marek Polacek <polacek@redhat.com>
4529
4530 * c-typeck.c (set_nonincremental_init_from_string): Use
4531 HOST_WIDE_INT_M1U when shifting a negative value.
4532
dbb68221
MW
45332015-09-09 Mark Wielaard <mjw@redhat.com>
4534
4535 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
4536 parm against NULL.
4537
a8a098ac
JJ
45382015-09-10 Jakub Jelinek <jakub@redhat.com>
4539
4540 PR c/67502
4541 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
4542 into OMP_FOR_PRE_BODY rather than before the loop.
4543
f4b189d5
JJ
45442015-09-09 Jakub Jelinek <jakub@redhat.com>
4545
0bb99c11
JJ
4546 PR c/67501
4547 * c-parser.c (c_parser_oacc_all_clauses,
4548 c_parser_omp_all_clauses): Remove invalid clause from
4549 list of clauses even if parser->error is set.
4550
fce5e5e3
JJ
4551 PR c/67500
4552 * c-parser.c (c_parser_omp_clause_aligned,
4553 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
4554 test for errors.
4555 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
4556 error_mark_node.
4557
f4b189d5
JJ
4558 PR c/67495
4559 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
4560 instead of c_parser_unary_expression. If the result is !lvalue_p,
4561 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
4562
b2aaf235
MP
45632015-09-04 Marek Polacek <polacek@redhat.com>
4564
4565 PR sanitizer/67279
4566 * c-typeck.c (build_binary_op): Don't instrument static initializers.
4567
1807ffc1
MS
45682015-09-03 Martin Sebor <msebor@redhat.com>
4569
4570 PR c/66516
8b652e65
JJ
4571 * c-typeck.c (convert_arguments, parser_build_unary_op,
4572 build_conditional_expr, c_cast_expr, convert_for_assignment,
4573 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
4574 reject_gcc_builtin.
4575 (c_decl_implicit): Define.
4576
d04ff417
MP
45772015-09-02 Marek Polacek <polacek@redhat.com>
4578
4579 PR c/67432
4580 * c-parser.c (c_parser_enum_specifier): Give a better error for
4581 an empty enum.
4582
a79683d5
TS
45832015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4584
4585 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
4586
191a6b94
MP
45872015-08-12 Marek Polacek <polacek@redhat.com>
4588
4589 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
4590 LOC to it.
4591
420a9d9b
MP
45922015-08-03 Marek Polacek <polacek@redhat.com>
4593
4594 PR c/67088
4595 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
4596 Use it.
4597 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
4598
992118a1
PP
45992015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4600
4601 * c-parser.c (c_parser_if_body): Take token_indent_info
4602 argument. Call warn_for_misleading_indentation even when the
4603 body is a semicolon. Extract token_indent_infos corresponding
4604 to the guard, body and next tokens. Adjust call to
4605 warn_for_misleading_indentation accordingly.
4606 (c_parser_else_body): Likewise.
4607 (c_parser_if_statement): Likewise.
4608 (c_parser_while_statement): Likewise.
4609 (c_parser_for_statement): Likewise.
4610
46308474
LFSM
46112015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
4612 Manuel López-Ibáñez <manu@gcc.gnu.org>
4613
4614 * c-decl.c (get_parm_info): Remove static var. Update warning
4615 message.
4616
05b28fd6
MP
46172015-07-27 Marek Polacek <polacek@redhat.com>
4618
4619 PR c++/66555
4620 PR c/54979
4621 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
4622
451b5e48
MP
46232015-07-20 Marek Polacek <polacek@redhat.com>
4624
4625 PR c++/55095
4626 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
4627 (build_binary_op): Warn about left shift overflows.
4628
1916bcb5
AM
46292015-07-09 Andrew MacLeod <amacleod@redhat.com>
4630
4631 * c-array-notation.c: Adjust includes for flags.h changes.
4632 * c-objc-common.c: Likewise.
4633
c7131fb2
AM
46342015-07-07 Andrew MacLeod <amacleod@redhat.com>
4635
4636 * c-array-notation.c: Adjust includes.
4637 * c-aux-info.c: Likewise.
4638 * c-convert.c: Likewise.
4639 * c-decl.c: Likewise.
4640 * c-errors.c: Likewise.
4641 * c-lang.c: Likewise.
4642 * c-objc-common.c: Likewise.
4643 * c-parser.c: Likewise.
4644 * c-typeck.c: Likewise.
4645
da2e71c9
MLI
46462015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4647
4648 PR fortran/66605
4649 * c-decl.c (finish_function): Call do_warn_unused_parameter.
4650
b155cfd9
MP
46512015-06-29 Marek Polacek <polacek@redhat.com>
4652
4653 PR c/66322
4654 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
4655 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
4656 about -Wswitch-bool here.
4657 (do_case): Update c_add_case_label call.
4658 (c_finish_case): Update c_do_switch_warnings call.
4659
31521951
MP
46602015-06-27 Marek Polacek <polacek@redhat.com>
4661
4662 * c-typeck.c: Use VECTOR_TYPE_P throughout.
4663
22d03525
MP
46642015-06-26 Marek Polacek <polacek@redhat.com>
4665
4666 * c-array-notation.c (fix_builtin_array_notation_fn): Use
4667 INDIRECT_REF_P.
4668 * c-typeck.c (array_to_pointer_conversion): Likewise.
4669 (build_unary_op): Likewise.
4670 (c_finish_return): Likewise.
4671
f0889939
AM
46722015-06-25 Andrew MacLeod <amacleod@redhat.com>
4673
4674 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4675 * c-parser.c: Likewise.
4676
8d67ee55
RS
46772015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4678
4679 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
4680 instead of pointer_hash.
4681 (detect_field_duplicates): Likewise.
4682
0ae9bd27
MP
46832015-06-25 Marek Polacek <polacek@redhat.com>
4684
4685 * c-array-notation.c: Use VAR_P throughout.
4686 * c-decl.c: Likewise.
4687 * c-objc-common.c: Likewise.
4688 * c-parser.c: Likewise.
4689 * c-typeck.c: Likewise.
4690
62f9079a
MP
46912015-06-25 Marek Polacek <polacek@redhat.com>
4692
4693 * c-decl.c: Use is_global_var throughout.
4694 * c-parser.c: Likewise.
4695 * c-typeck.c: Likewise.
4696
abb226c9
AM
46972015-06-17 Andrew MacLeod <amacleod@redhat.com>
4698
4699 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
4700 * c-aux-info.c: Likewise.
4701 * c-convert.c: Likewise.
4702 * c-decl.c: Likewise.
4703 * c-errors.c: Likewise.
4704 * c-lang.c: Likewise.
4705 * c-objc-common.c: Likewise.
4706 * c-parser.c: Likewise.
4707 * c-typeck.c: Likewise.
4708
8cbababc
JH
47092015-06-11 Jan Hubicka <hubicka@ucw.cz>
4710
4711 PR middle-end/66325
4712 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
4713 variants.
4714
a0349665
PMR
47152015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
4716
4717 * c-decl.c (pop_scope): Register the main translation unit
4718 through the new debug hook.
4719
13fdf2e2
AM
47202015-06-08 Andrew MacLeod <amacleod@redhat.com>
4721
4722 * c-array-notation.c : Adjust include files.
4723 * c-aux-info.c : Likewise.
4724 * c-convert.c : Likewise.
4725 * c-decl.c : Likewise.
4726 * c-errors.c : Likewise.
4727 * c-lang.c : Likewise.
4728 * c-lang.h : Likewise.
4729 * c-objc-common.c : Likewise.
4730 * c-parser.c : Likewise.
4731 * c-typeck.c : Likewise.
4732
d7438551
AH
47332015-06-05 Aldy Hernandez <aldyh@redhat.com>
4734
4735 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
4736 immediately clobber it.
4737 (c_write_global_declarations_1): Remove call to
4738 check_global_declaration_1.
4739 (c_write_global_declarations_2): Remove.
4740 (c_write_final_cleanups): Rename from c_write_global_declarations.
4741 Remove call to finalize_compilation_unit.
4742 Remove calls to debugging hooks.
4743 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
4744 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
4745 * c-tree.h: Remove c_write_global_declarations.
4746
ecb9f223
AM
47472015-06-04 Andrew MacLeod <amacleod@redhat.com>
4748
4749 * c-array-notation.c: Adjust includes for restructured coretypes.h.
4750 * c-aux-info.c: Likewise.
4751 * c-convert.c: Likewise.
4752 * c-decl.c: Likewise.
4753 * c-errors.c: Likewise.
4754 * c-lang.c: Likewise.
4755 * c-objc-common.c: Likewise.
4756 * c-parser.c: Likewise.
4757 * c-typeck.c: Likewise.
4758
9482b620
MP
47592015-06-04 Marek Polacek <polacek@redhat.com>
4760
4761 PR c/66341
4762 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
4763 it is a lvalue.
4764
bc51ace3
PK
47652015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4766
4767 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
4768 Warn for empty struct.
4769 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
4770
ea5b45b6
AT
47712015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
4772
4773 * c-decl.c (start_function): Call plugin before parsing.
4774 (finish_function): Call plugin after parsing.
4775
c2d47482
PK
47762015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4777
4778 PR c/49551
4779 * c-decl.c (merge_decls): Merge DECL_COMMON.
4780
a95492ab
JW
47812015-05-22 Jim Wilson <jim.wilson@linaro.org>
4782
4783 * Make-lang.in (check_gcc_pallelize): Define.
4784
fd5c817a
MP
47852015-05-22 Marek Polacek <polacek@redhat.com>
4786
4787 PR c/47043
4788 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
4789 attributes.
4790
c7b70a3c
MP
47912015-05-21 Marek Polacek <polacek@redhat.com>
4792
4793 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
4794 DECL_BUILT_IN.
4795
21b634ae
MP
47962015-05-20 Marek Polacek <polacek@redhat.com>
4797
4798 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4799 * c-typeck.c: Likewise.
4800
296a8c2f
MP
48012015-05-19 Marek Polacek <polacek@redhat.com>
4802
4803 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
4804
41b37d5e
JJ
48052015-05-19 Jakub Jelinek <jakub@redhat.com>
4806
4807 PR middle-end/66199
4808 * c-parser.c (c_parser_omp_for_loop): Don't add
4809 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
4810 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
4811 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
4812 constructs.
4813
fab27f52
MM
48142015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4815
4816 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 4817 swaps.
fab27f52 4818
40de31cf
MLI
48192015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
4820
4821 PR fortran/44054
4822 * c-objc-common.c (c_tree_printer): Replace locus pointer with
4823 accessor function.
4824
3aa3c9fc
MP
48252015-05-14 Marek Polacek <polacek@redhat.com>
4826
4827 PR c/66066
4828 PR c/66127
4829 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
4830 rather than with 0.
4831
c3388e62
DM
48322015-05-12 David Malcolm <dmalcolm@redhat.com>
4833
4834 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
4835 to add a call to warn_for_misleading_indentation.
4836 (c_parser_else_body): Likewise, adding param "else_loc".
4837 (c_parser_if_statement): Check for misleading indentation.
4838 (c_parser_while_statement): Likewise.
4839 (c_parser_for_statement): Likewise.
4840
755e528f
MP
48412015-05-08 Marek Polacek <polacek@redhat.com>
4842
4843 PR c/64918
4844 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
4845 (output_init_element): Likewise.
4846
0173bd2a
MP
48472015-05-07 Marek Polacek <polacek@redhat.com>
4848
4849 PR c/65179
4850 * c-typeck.c (build_binary_op): Warn when left shifting a negative
4851 value.
4852
9babc352
MP
48532015-04-30 Marek Polacek <polacek@redhat.com>
4854
4855 * c-typeck.c (set_init_label): Call error_at instead of error and
4856 pass LOC to it.
4857
ac9f18db
MP
4858 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
4859 the type of a decl.
4860
ec3fba51
MP
4861 * c-typeck.c (c_build_va_arg): Clarify the error message.
4862
b811915d
TS
48632015-04-29 Thomas Schwinge <thomas@codesourcery.com>
4864
4865 * c-parser.c (c_parser_oacc_enter_exit_data): Use
4866 OMP_STANDALONE_CLAUSES.
4867
f3075008
MP
48682015-04-28 Marek Polacek <polacek@redhat.com>
4869
4870 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
4871
4e81b788
MP
48722015-04-28 Marek Polacek <polacek@redhat.com>
4873
4874 PR c/65901
4875 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
4876
6c1db78e
MP
48772015-04-25 Marek Polacek <polacek@redhat.com>
4878
4879 PR c/52085
4880 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
4881 attribute.
4882
5c4abbb8
MP
48832015-04-23 Marek Polacek <polacek@redhat.com>
4884
4885 PR c/65345
4886 * c-decl.c (set_labels_context_r): New function.
4887 (store_parm_decls): Call it via walk_tree_without_duplicates.
4888 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
4889 instead of create_tmp_var. Build TARGET_EXPR instead of
4890 COMPOUND_EXPR.
4891 (build_atomic_assign): Use create_tmp_var_raw instead of
4892 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
4893
06aca1d5
IV
48942015-04-20 Ilya Verbin <ilya.verbin@intel.com>
4895
4896 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
4897 (c_parser_omp_target_update): Add missed %> to error_at ().
4898
8fba1830
BRF
48992015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4900
4901 PR target/55143
4902 * c-decl.c (c_default_pointer_mode): Remove definition.
4903 * c-tree.h (c_default_pointer_mode): Remove declaration.
4904
62021f64
TB
49052015-03-27 Tobias Burnus <burnus@net-b.de>
4906
4907 PR c/65586
4908 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
4909 error out.
4910 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
4911 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
4912 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
4913
9b65e171
JJ
49142015-03-19 Jakub Jelinek <jakub@redhat.com>
4915
4916 * c-decl.c (c_decl_attributes): Also add "omp declare target"
4917 attribute for DECL_EXTERNAL VAR_DECLs.
4918
17958621
JJ
49192015-03-11 Jakub Jelinek <jakub@redhat.com>
4920
4921 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
4922 argument.
4923
7ccb1a11
JJ
49242015-03-10 Jakub Jelinek <jakub@redhat.com>
4925
4926 PR c/65120
4927 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
4928 before preparing arguments to warn_logical_not_parentheses.
4929
01177669
JJ
49302015-03-09 Jakub Jelinek <jakub@redhat.com>
4931
4932 PR c/65120
4933 * c-typeck.c (parser_build_binary_op): Don't warn for
4934 !!x == y or !b == y where b is _Bool.
4935
802ac282
MP
49362015-03-09 Marek Polacek <polacek@redhat.com>
4937
4938 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
4939 * c-decl.c (grokdeclarator): Likewise.
4940 * c-typeck.c (build_binary_op): Likewise.
4941
e5165b60
MP
49422015-02-27 Marek Polacek <polacek@redhat.com>
4943
4944 PR c/65228
4945 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
4946
065d214c
MP
49472015-02-14 Marek Polacek <polacek@redhat.com>
4948
4949 PR c/64768
4950 * c-decl.c (grokdeclarator): Set the range of a flexible array member
4951 declared through a typedef name.
4952
e5d9235b
MP
49532015-02-13 Marek Polacek <polacek@redhat.com>
4954
4955 PR c/65050
4956 * c-decl.c (grokdeclarator): Print also the type when giving
4957 the error message about array's incomplete element type.
4958
fa01ffcc
JJ
49592015-02-11 Jakub Jelinek <jakub@redhat.com>
4960
4961 PR c/64824
4962 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
4963 check in the POP macro.
4964
c3e38a03
MP
49652015-02-09 Marek Polacek <polacek@redhat.com>
4966
4967 PR c/64856
4968 * c-typeck.c (process_init_element): Don't always wrap
4969 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
4970 initializing a range of elements.
4971
4886ec8e
JJ
49722015-02-04 Jakub Jelinek <jakub@redhat.com>
4973
4974 PR c/64824
4975 PR c/64868
4976 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
4977
c3e38a03 49782015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
4979
4980 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
4981 processing enum declaration.
4982
7b33f0c8
MP
49832015-01-29 Marek Polacek <polacek@redhat.com>
4984
4985 PR c/64709
4986 * c-typeck.c (pop_init_level): If constructor_elements has
4987 exactly one element with integer_zerop value, set constructor_zeroinit
4988 to 1. Remove braces around warning_init call.
4989
dea63e49
JJ
49902015-01-27 Jakub Jelinek <jakub@redhat.com>
4991
4992 PR c/64766
4993 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
4994 of FUNCTION_DECLs with error_mark_node.
4995
d38f7dce
JJ
49962015-01-26 Jakub Jelinek <jakub@redhat.com>
4997
4998 PR c/64778
4999 * c-typeck.c (convert_arguments): Return -1 if there are
5000 error_args, even if we've diagnosed too many arguments.
5001
cbf5d0e7
RB
50022015-01-21 Richard Biener <rguenther@suse.de>
5003
5004 PR middle-end/64313
5005 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
5006 for builtins the user declared correctly.
5007
41dbbb37
TS
50082015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5009 Bernd Schmidt <bernds@codesourcery.com>
5010 Cesar Philippidis <cesar@codesourcery.com>
5011 James Norris <jnorris@codesourcery.com>
5012 Jakub Jelinek <jakub@redhat.com>
5013 Ilmir Usmanov <i.usmanov@samsung.com>
5014
5015 * c-parser.c: Include "gomp-constants.h".
5016 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
5017 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
5018 Use OMP_CLAUSE_SET_MAP_KIND.
5019 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
5020 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
5021 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
5022 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
5023 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
5024 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
5025 "copyout", "create", "delete", "deviceptr", "gang", "host",
5026 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
5027 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
5028 "present_or_create", "pcreate", "seq", "self", "vector",
5029 "vector_length", "wait", "worker".
5030 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
5031 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
5032 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
5033 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
5034 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
5035 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
5036 (c_parser_oacc_data_clause_deviceptr)
5037 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
5038 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
5039 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
5040 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
5041 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
5042 (c_parser_oacc_parallel, c_parser_oacc_update)
5043 (c_parser_oacc_wait): New functions.
5044 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
5045 (c_finish_oacc_data): New prototypes.
5046 * c-typeck.c: Include "gomp-constants.h".
5047 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
5048 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
5049 OMP_CLAUSE_SET_MAP_KIND.
5050 (c_finish_oacc_parallel, c_finish_oacc_kernels)
5051 (c_finish_oacc_data): New functions.
5052 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
5053 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
5054 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
5055 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
5056 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
5057 GOMP_MAP_FORCE_DEVICEPTR.
5058
adfac8df
JJ
50592015-01-09 Michael Collison <michael.collison@linaro.org>
5060
5061 * c-array-notation.c: Include hash-set.h, machmode.h,
5062 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5063 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5064 * c-aux-info.c: Ditto.
5065 * c-convert.c: Ditto.
5066 * c-decl.c: Ditto.
5067 * c-errors.c: Ditto.
5068 * c-lang.c: Dittoxs.
5069 * c-objc-common.c: Ditto.
5070 * c-parser.c: Ditto.
5071 * c-typeck.c: Include hash-set.h, machmode.h,
5072 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5073 fold-const.h, wide-int.h, inchash.h, real.h and
5074 fixed-value.h due to flattening of tree.h.
5075
2cc901dc
MP
50762015-01-07 Marek Polacek <polacek@redhat.com>
5077
5078 PR c/64417
5079 * c-typeck.c (process_init_element): Disallow initialization of
5080 a flexible array member with a string constant if the structure
5081 is in an array.
5082
5624e564
JJ
50832015-01-05 Jakub Jelinek <jakub@redhat.com>
5084
e5341100
JJ
5085 PR sanitizer/64344
5086 * c-typeck.c (convert_for_assignment, c_finish_return): For
5087 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
5088 types also set in_late_binary_op around convert call.
5089 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
5090 to integral type casts, if not in_late_binary_op, pass c_fully_fold
5091 result on expr as last argument to ubsan_instrument_float_cast,
5092 if in_late_binary_op, don't use c_save_expr but save_expr.
5093
5624e564
JJ
5094 Update copyright years.
5095
5bd012f8
MP
50962015-01-05 Marek Polacek <polacek@redhat.com>
5097
5098 PR c/64423
5099 * c-typeck.c (build_array_ref): Pass loc down to
5100 warn_array_subscript_with_type_char.
5101
3f8257db 51022014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5103
5104 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 5105 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 5106 element type.
8e745a17 5107 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 5108 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 5109 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 5110 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 5111 to PEDWARN_FOR_QUALIFIERS.
768952be 5112
8f94a8c4
JJ
51132014-12-17 Jakub Jelinek <jakub@redhat.com>
5114
5115 PR sanitizer/64289
5116 * c-convert.c: Include ubsan.h.
5117 (convert): For real -> integral casts and
5118 -fsanitize=float-cast-overflow don't call convert_to_integer, but
5119 instead instrument the float cast directly.
5120
b731b390
JJ
51212014-11-29 Jakub Jelinek <jakub@redhat.com>
5122
5123 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
5124 c_finish_stmt_expr): Remove NULL last argument from
5125 create_tmp_var_raw and create_tmp_var calls.
5126 * c-array-notation.c (fix_builtin_array_notation_fn,
5127 build_array_notation_expr, fix_conditional_array_notations_1,
5128 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
5129
541e35a6
MP
51302014-11-28 Marek Polacek <polacek@redhat.com>
5131
5132 PR c/63862
5133 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
5134 convert the right operand to integer type.
5135
b286be94
MP
51362014-11-25 Marek Polacek <polacek@redhat.com>
5137
5138 PR c/63877
5139 * c-decl.c (start_function): Disable -Wmissing-declarations warning
5140 for inline functions.
5141
aa7da51a
JJ
51422014-11-21 Jakub Jelinek <jakub@redhat.com>
5143
5144 PR target/63764
5145 * c-typeck.c (build_array_ref): Adjust
5146 convert_vector_to_pointer_for_subscript caller. If it returns true,
5147 call non_lvalue_loc on the result.
5148
d876207f
RB
51492014-11-11 Richard Biener <rguenther@suse.de>
5150
5151 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
5152 to true.
5153
e5e44252
AK
51542014-11-10 Andi Kleen <ak@linux.intel.com>
5155
5156 PR c/60804
5157 * c-parser.c (c_parser_statement_after_labels): Call
5158 check_no_cilk.
5159 (c_parser_if_statement): Dito.
5160 (c_parser_switch_statement): Dito.
5161 (c_parser_while_statement): Dito.
5162 (c_parser_do_statement): Dito.
5163 (c_parser_for_statement): Dito.
5164 * c-typeck.c (c_finish_loop): Dito.
5165
13c21655
PC
51662014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5167
5168 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
5169 OPT_Wshift_count_overflow in the warnings.
5170
2d51fcef
MP
51712014-10-30 Marek Polacek <polacek@redhat.com>
5172
5173 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
5174 print the stripped version as well, if they're not the same.
5175
ef4bddc2
RS
51762014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5177
5178 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
5179 machine_mode.
5180
c582198b
AM
51812014-10-28 Andrew MacLeod <amacleod@redhat.com>
5182
5183 * c-decl.c: Adjust include files.
5184 * c-parser.c: Ditto.
5185
ddc8de03
PM
51862014-10-27 Phil Muldoon <pmuldoon@redhat.com>
5187 Tom Tromey <tromey@redhat.com>
5188
5189 * c-tree.h (enum c_oracle_request): New.
5190 (c_binding_oracle_function): New typedef.
5191 (c_binding_oracle, c_pushtag, c_bind): Declare.
5192 * c-decl.c (c_binding_oracle): New global.
5193 (I_SYMBOL_CHECKED): New macro.
5194 (i_symbol_binding): New function.
5195 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
5196 (I_TAG_CHECKED): New macro.
5197 (i_tag_binding): New function.
5198 (I_TAG_BINDING, I_TAG_DECL): Redefine.
5199 (I_LABEL_CHECKED): New macro.
5200 (i_label_binding): New function.
5201 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
5202 (c_print_identifier): Save and restore c_binding_oracle.
5203 (c_pushtag, c_bind): New functions.
5204
60393bbc
AM
52052014-10-27 Andrew MacLeod <amacleod@redhat.com>
5206
5207 * c-typeck.c: Adjust include files.
5208
d723bb7c
MLI
52092014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5210
5211 PR c++/53061
5212 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
5213 initialization here...
5214 (c_initialize_diagnostics): ... but here. Set defaults after
5215 building pretty-printer.
5216
1bc5a451
MP
52172014-10-23 Marek Polacek <polacek@redhat.com>
5218
5219 PR c/63626
5220 * c-decl.c (pop_scope): Don't print warning in external_scope.
5221
4435bb92
MP
52222014-10-19 Marek Polacek <polacek@redhat.com>
5223
5224 PR c/63567
5225 * c-typeck.c (output_init_element): Allow initializing objects with
5226 static storage duration with compound literals even in C99 and add
5227 pedwarn for it.
5228
7278465e
MP
52292014-10-17 Marek Polacek <polacek@redhat.com>
5230
5231 PR c/63567
5232 * c-typeck.c (digest_init): Allow initializing objects with static
5233 storage duration with compound literals even in C99 and add pedwarn
5234 for it.
5235
d9b7be2e
MP
52362014-10-17 Marek Polacek <polacek@redhat.com>
5237
5238 PR c/63543
5239 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
5240 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
5241 error multiple times. Print the type.
5242
f406ae1f
MP
52432014-10-17 Marek Polacek <polacek@redhat.com>
5244
5245 PR c/63549
5246 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
5247 type.
5248
92574c7c
MP
52492014-10-17 Marek Polacek <polacek@redhat.com>
5250
5251 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
5252 (start_function): Use OPT_Wimplicit_int instead of 0.
5253 (store_parm_decls_oldstyle): Likewise.
5254
1bc4a978
MT
52552014-10-17 Alan Modra <amodra@gmail.com>
5256
5257 PR middle-end/61848
5258 * c-decl.c (merge_decls): Don't merge section name or tls model
5259 to newdecl symtab node, instead merge to olddecl. Override
5260 existing olddecl section name. Set tls_model for all thread-local
5261 vars, not just OMP thread-private ones. Remove incorrect comment.
5262
83685514
AM
52632014-10-16 Andrew MacLeod <amacleod@redhat.com>
5264
5265 * c-decl.c: Adjust include files.
5266
78a7c317
DD
52672014-10-14 DJ Delorie <dj@redhat.com>
5268
5269 * c-parser.c (c_parse_init): Add RID entries for each __intN.
5270 (c_token_starts_typename): Check all __intN, not just __int128.
5271 (c_token_starts_declspecs): Likewise.
5272 (c_parser_declspecs): Likewise.
5273 (c_parser_attribute_any_word): Likewise.
5274 (c_parser_objc_selector): Likewise.
5275 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
5276 (struct c_declspecs): Add int_n_idx field to record *which* __intN
5277 is specified.
5278 * c-decl.c (declspecs_add_type): Check for all __intN, not just
5279 __int128.
5280 (finish_declspecs): Likewise.
5281
74d98c1e
AB
52822014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
5283
8e745a17 5284 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 5285 the duplicate code.
8e745a17 5286 (c_parser_statement): Call the new function.
74d98c1e 5287
84937de2
MP
52882014-10-09 Marek Polacek <polacek@redhat.com>
5289
5290 PR c/63480
5291 * c-typeck.c (pop_init_level): Don't warn about initializing
5292 with { }.
5293
0382aaa0
MP
52942014-10-07 Marek Polacek <polacek@redhat.com>
5295
5296 PR c/59717
5297 * c-decl.c (header_for_builtin_fn): New function.
5298 (implicitly_declare): Suggest which header to include.
5299
7a0ca710
MP
53002014-10-07 Marek Polacek <polacek@redhat.com>
5301
5302 * c-convert.c (convert): Use error_operand_p.
5303 * c-typeck.c (require_complete_type): Likewise.
5304 (really_atomic_lvalue): Likewise.
5305 (digest_init): Likewise.
5306 (handle_omp_array_sections_1): Likewise.
5307
6bc8a126
MP
53082014-10-03 Marek Polacek <polacek@redhat.com>
5309
5310 PR c/63453
5311 * c-decl.c (pop_scope): Don't warn about "inline function declared
5312 but never defined" for functions marked with gnu_inline attribute.
5313
d90c0a59
JJ
53142014-09-25 Jakub Jelinek <jakub@redhat.com>
5315
5316 PR c++/63249
5317 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
5318 on low_bound and length.
5319
083e891e
MP
53202014-09-24 Marek Polacek <polacek@redhat.com>
5321
5322 PR c/61405
5323 PR c/53874
5324 * c-parser.c: Don't define CPP_KEYWORD.
5325 (c_parser_switch_statement): Pass original type to c_finish_case.
5326 * c-tree.h (c_finish_case): Update declaration.
5327 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
5328 conditionally to c_do_switch_warnings.
5329
8d95fe25
MP
53302014-09-03 Marek Polacek <polacek@redhat.com>
5331
5332 PR c/62024
5333 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
5334 conversions.
5335
9a771876
JJ
53362014-09-02 Jakub Jelinek <jakub@redhat.com>
5337 Balaji V. Iyer <balaji.v.iyer@intel.com>
5338 Igor Zamyatin <igor.zamyatin@intel.com>
5339
5340 * c-parser.c (c_parser_cilk_for): New function.
5341 (c_parser_cilk_grainsize): Likewise.
5342 (c_get_temp_regvar): Likewise.
5343 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
5344 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
5345 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
5346 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
5347 case.
5348
b7679d96
CG
53492014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
5350
5351 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
5352 with using HOST_WIDE_INT without truncation to 'int'
5353
59ea0364
MP
53542014-08-22 Marek Polacek <polacek@redhat.com>
5355
5356 PR c++/62199
5357 * c-typeck.c (parser_build_binary_op): Adjust call to
5358 warn_logical_not_parentheses.
5359
671a475e
IZ
53602014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
5361
5362 PR other/62008
5363 * c-parser.c (c_parser_array_notation): Check for correct
5364 type of an array added.
5365
04159acf
MP
53662014-08-19 Marek Polacek <polacek@redhat.com>
5367
5368 PR c++/62153
5369 * c-typeck.c (build_binary_op): If either operand of a comparison
5370 is a boolean expression, call maybe_warn_bool_compare.
5371
c77935ee
PP
53722014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
5373
5374 PR c/45584
5375 * c-typeck.c (build_c_cast): Do a conversion even when the
5376 TYPE_MAIN_VARIANTs are the same.
5377
35aff4fb
MP
53782014-08-19 Marek Polacek <polacek@redhat.com>
5379
5380 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
5381 pedwarn_c99 instead of pedwarn.
5382 (grokfield): Likewise.
5383 (warn_defaults_to): New function.
5384 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
5385 Unconditionally call pedwarn_c99 instead of pedwarn.
5386 (start_function): Call warn_defaults_to instead of pedwarn_c99.
5387 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
5388 check flag_isoc11 before.
5389 * c-errors.c (pedwarn_c99): Change the return type to bool.
5390 Handle -Wc99-c11-compat.
5391 * c-parser.c (disable_extension_diagnostics): Handle
5392 warn_c99_c11_compat.
5393 (restore_extension_diagnostics): Likewise.
5394 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
5395 instead of pedwarn, don't check flag_isoc11 before.
5396 (c_parser_declspecs): Likewise.
5397 (c_parser_alignas_specifier): Likewise.
5398 (c_parser_alignof_expression): Likewise.
5399 (c_parser_generic_selection): Likewise.
5400 * c-tree.h (pedwarn_c99): Update declaration.
5401 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
5402 of pedwarn_c99.
5403
177cce46
MP
54042014-08-19 Marek Polacek <polacek@redhat.com>
5405
5406 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
5407 to pedwarn_c90.
5408 * c-errors.c: Include "opts.h".
5409 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
5410 * c-parser.c (disable_extension_diagnostics): Handle negative value
5411 of warn_c90_c99_compat, too.
5412 (restore_extension_diagnostics): Likewise.
5413 (c_parser_compound_statement_nostart): Pass
5414 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
5415
6dc99c33
MP
54162014-08-12 Marek Polacek <polacek@redhat.com>
5417
5418 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
5419 Add pedwarn.
5420 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
5421 Likewise.
5422 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
5423
3f8257db 54242014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
5425
5426 PR c/51849
5427 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
5428 Call pedwarn_c90 instead of pedwarn.
5429 (check_bitfield_type_and_width): Likewise.
5430 (declspecs_add_qual): Likewise.
5431 (declspecs_add_type): Likewise.
5432 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
5433 Adjust to only call pedwarn_c90.
5434 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
5435 pedwarn_c90 instead of pedwarn.
5436 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
5437 * c-parser.c (disable_extension_diagnostics): Handle
5438 warn_c90_c99_compat.
5439 (restore_extension_diagnostics): Likewise.
5440 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
5441 pedwarn_c90 instead of pedwarn.
5442 (c_parser_initelt): Likewise.
5443 (c_parser_postfix_expression): Likewise.
5444 (c_parser_postfix_expression_after_paren_type): Likewise.
5445 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
5446 * c-tree.h: Fix formatting.
5447 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
5448 pedwarn_c90 instead of pedwarn.
5449
9f25a338
TS
54502014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5451
5452 * c-typeck.c: Remove include of pointer-set.h.
5453
044331a8
MP
54542014-08-07 Marek Polacek <polacek@redhat.com>
5455
5456 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
5457
b787e7a2
TS
54582014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5459
5460 * c-typeck.c: Use hash_map instead of pointer_map.
5461
6e2830c3
TS
54622014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5463
5464 * c-decl.c: Use hash_set instead of pointer_set.
5465
a7ee52fb
IZ
54662014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5467
5468 PR middle-end/61455
5469 * c-array-notation.c (expand_array_notations): Handling
5470 of DECL_EXPR added.
5471
b4dfdc11
MG
54722014-07-31 Marc Glisse <marc.glisse@inria.fr>
5473
5474 PR c++/60517
5475 * c-typeck.c (c_finish_return): Return 0 instead of the address of
5476 a local variable.
5477
976d5a22
TT
54782014-07-30 Tom Tromey <tromey@redhat.com>
5479
5480 * c-typeck.c (struct constructor_stack) <designator_depth>: New
5481 field.
5482 (really_start_incremental_init, push_init_level): Initialize
5483 designator_depth.
5484 (pop_init_level): Set global designator_depth.
5485 (process_init_element): Check for designated_init attribute.
5486
30281de2
MP
54872014-07-20 Marek Polacek <polacek@redhat.com>
5488
5489 PR c/61852
5490 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
5491 (implicitly_declare): Pass location to implicit_decl_warning.
5492
b108f48f
JJ
54932014-07-14 Jakub Jelinek <jakub@redhat.com>
5494
5495 PR middle-end/61294
5496 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
5497 If non-NULL, call c_parser_check_literal_zero.
5498 (c_parser_check_literal_zero): New function.
5499 (c_parser_postfix_expression_after_primary): Adjust
5500 c_parser_expr_list caller, handle -Wmemset-transposed-args.
5501
773ec47f
MP
55022014-07-06 Marek Polacek <polacek@redhat.com>
5503
5504 PR c/6940
5505 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
5506 * c-tree.h (C_ARRAY_PARAMETER): Define.
5507 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
5508 function parameter.
5509
22e1cf1c 55102014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 5511 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
5512
5513 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
5514 releasing symbol.
5515
52ec0ea3
MP
55162014-07-01 Marek Polacek <polacek@redhat.com>
5517
5518 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
5519 instead of 0 to WARN_FOR_ASSIGNMENT.
5520
d5c3d343
MP
55212014-07-01 Marek Polacek <polacek@redhat.com>
5522
5523 PR c/58286
5524 * c-typeck.c (convert_for_assignment): Pass
5525 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
5526
6a7253a4
MP
55272014-06-30 Marek Polacek <polacek@redhat.com>
5528
5529 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
5530 has no_sanitize_undefined attribute.
5531
5e88a8f4
IZ
55322014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
5533
5534 PR middle-end/57541
5535 * c-array-notation.c (fix_builtin_array_notation_fn):
5536 Check for 0 arguments in builtin call. Check that bultin argument is
5537 correct.
5538 * c-parser.c (c_parser_array_notation): Check for incorrect initial
5539 index.
5540
9698b078
SH
55412014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
5542
5543 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
5544 qualifiers in __auto_type for atomic types.
5545 (c_parser_typeof_specifier): Discard all type qualifiers in
5546 __typeof__ for atomic types.
5547
6e07c515
MP
55482014-06-25 Marek Polacek <polacek@redhat.com>
5549
5550 PR c/61162
5551 * c-parser.c (c_parser_statement_after_labels): Pass the location of
5552 the return expression to c_finish_return.
5553
da6f124d
JJ
55542014-06-25 Jakub Jelinek <jakub@redhat.com>
5555
5556 * c-typeck.c (c_finish_omp_clauses): Make sure
5557 OMP_CLAUSE_LINEAR_STEP has correct type.
5558
c203e8a7
TS
55592014-06-24 Trevor Saunders <tsaunders@mozilla.com>
5560
5561 * c-decl.c: Adjust.
5562
56ad0e38
JJ
55632014-06-24 Jakub Jelinek <jakub@redhat.com>
5564
5565 * c-parser.c (c_parser_omp_for_loop): For
5566 #pragma omp parallel for simd move lastprivate clause from parallel
5567 to for rather than simd.
5568
47c2554f
MP
55692014-06-23 Marek Polacek <polacek@redhat.com>
5570
5571 * c-typeck.c (parser_build_binary_op): Don't call
5572 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
5573
56363ffd
JH
55742014-06-15 Jan Hubicka <hubicka@ucw.cz>
5575
5576 * c-parser.c (c_parser_omp_threadprivate): Likewise.
5577 * c-decl.c (merge_decls): Likewise.
5578
d7ff7ae5
MP
55792014-06-09 Marek Polacek <polacek@redhat.com>
5580
5581 PR c/36446
5582 * c-typeck.c (error_init): Call inform instead of error_at.
5583 (pedwarn_init): Call inform instead of pedwarn.
5584 (warning_init): Call inform instead of warning_at.
5585
24d047a3
JH
55862014-06-07 Jan Hubicka <hubicka@ucw.cz>
5587
5588 * c-decl.c (merge_decls): Use set_decl_section_name.
5589 (duplicate_decls): Remove node if it exists.
5590
9bac5cbb
G
55912014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
5592
5593 PR c/53119
5594 * c-typeck.c (push_init_level, process_init_element,
5595 pop_init_level): Correct check for zero initialization, move
5596 missing brace warning to respect zero initialization.
5597
8ffcdea8
MP
55982014-06-05 Marek Polacek <polacek@redhat.com>
5599
5600 PR c/56724
5601 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
5602
742938c9
MP
56032014-06-05 Marek Polacek <polacek@redhat.com>
5604
5605 PR c/49706
5606 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 5607 on the left hand side operand of a comparison.
742938c9 5608
6447c55d
MP
56092014-06-05 Marek Polacek <polacek@redhat.com>
5610
5611 PR c/48062
5612 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
5613 Print note only if the warning was printed.
5614
9dc7743c
IZ
56152014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
5616
5617 PR c/58942
5618 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
5619 with a pointer.
5620
fedfecef
MP
56212014-06-03 Marek Polacek <polacek@redhat.com>
5622
5623 PR c/60439
5624 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
5625 c_start_case.
5626 * c-tree.h (c_start_case): Update.
5627 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
5628 switch condition has boolean value.
5629
9b2b7279
AM
56302014-06-02 Andrew MacLeod <amacleod@redhat.com>
5631
5632 * c-decl.c: Include builtins.h.
5633 * c-parser.c: Likewise.
5634
5c1bc275
MP
56352014-05-27 Marek Polacek <polacek@redhat.com>
5636
5637 PR c/56724
5638 * c-typeck.c (convert_arguments): Get location of a parameter. Change
5639 error and warning calls to error_at and warning_at. Pass location of
5640 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
5641 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
5642 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
5643
97563bc8
IZ
56442014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
5645
5646 PR c/61191
5647 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
5648 function parameters.
5649
aede2c10
JH
56502014-05-23 Jan Hubicka <hubicka@ucw.cz>
5651
5652 * c-decl.c (merge_decls): Preserve symtab node pointers.
5653 (duplicate_decls): Free new decl.
5654
edbba2ce
TS
56552014-05-23 Thomas Schwinge <thomas@codesourcery.com>
5656
f3316c6d
TS
5657 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
5658 initialization.
5659
edbba2ce
TS
5660 * c-parser.c (c_parser_omp_target): Return bool values.
5661
68c81f24
TS
56622014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5663
5664 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
5665 num_teams_loc variable to num_thread_limit_loc.
5666
632f2871
RS
56672014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5668
5669 * c-array-notation.c (expand_array_notations): Use void_node
5670 instead of void_zero_node.
5671
766090c2
TS
56722014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5673
5674 * c-decl.c (finish_struct): Adjust.
5675 (finish_enum): Likewise.
5676 (bind): Adjust.
5677 (record_inline_static): Likewise.
5678 (push_scope): Likewise.
5679 (make_label): Likewise.
5680 (lookup_label_for_goto): Likewise.
5681 (finish_struct): Likewise.
5682 (finish_enum): Likewise.
5683 (store_parm_decls): Likewise.
5684 (c_push_function_context): Likewise.
5685 * c-lang.h: Remove usage of variable_size gty attribute.
5686 * c-parser.c (c_parse_init): Adjust.
5687 (c_parse_file): Likewise.
5688
2b107f6b
MP
56892014-05-13 Marek Polacek <polacek@redhat.com>
5690
5691 PR c/61162
5692 * c-typeck.c (convert_for_assignment): Pass location to
5693 WARN_FOR_ASSIGNMENT instead of input_location.
5694
d033409e
MP
56952014-05-10 Marek Polacek <polacek@redhat.com>
5696
5697 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
5698 maybe_warn_string_init.
5699 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
5700 maybe_warn_string_init.
5701 * c-tree.h (maybe_warn_string_init): Update declaration.
5702 * c-typeck.c (maybe_warn_string_init): Add location parameter.
5703 Call pedwarn_init with loc instead of with input_location.
5704 (digest_init): Pass init_loc to maybe_warn_string_init.
5705 (pop_init_level): Call pedwarn_init with loc instead of with
5706 input_location.
5707 (set_init_index): Likewise.
5708 (process_init_element): Likewise.
5709
ea58ef42
MP
57102014-05-09 Marek Polacek <polacek@redhat.com>
5711
5712 PR c/61096
5713 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
5714 (c_parser_initelt): Pass location to set_init_label. Pass array index
5715 location to set_init_index.
5716 * c-tree.h (push_init_level): Update declaration.
5717 (pop_init_level): Likewise.
5718 (set_init_index): Likewise.
5719 (set_init_label): Likewise.
5720 * c-typeck.c (error_init): Add location parameter. Call error_at
5721 instead of error.
5722 (digest_init): Pass init_loc to error_init.
5723 (really_start_incremental_init):
5724 (push_init_level): Add location parameter. Pass loc to pop_init_level
5725 and error_init.
5726 (pop_init_level): Likewise.
5727 (set_designator): Add location parameter. Pass loc to pop_init_level,
5728 push_init_level, and error_init.
5729 (set_init_index): Add location parameter. Pass loc to error_init and
5730 set_designator.
5731 (set_init_label): Likewise.
5732 (output_init_element): Pass loc to error_init.
5733 (process_init_element): Pass loc to error_init, pop_init_level,
5734 pedwarn_init, and push_init_level.
5735
661a0813
MP
57362014-05-09 Marek Polacek <polacek@redhat.com>
5737
5738 PR c/50459
5739 * c-parser.c (c_parser_attributes): Parse the arguments as an
5740 expression-list if the attribute takes identifier.
5741
2793eeab
MP
57422014-05-08 Marek Polacek <polacek@redhat.com>
5743
5744 PR c/61053
5745 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
5746 TYPE_ALIGN_UNIT.
5747
f827930a
MP
57482014-05-08 Marek Polacek <polacek@redhat.com>
5749
5750 PR c/61077
5751 * c-decl.c (start_function): Warn for _Atomic-qualified return type
5752 of main.
5753
1d60af08
KZ
57542014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5755 Mike Stump <mikestump@comcast.net>
5756 Richard Sandiford <rdsandiford@googlemail.com>
5757
5758 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
5759 (finish_enum): Use wide-int interfaces.
5760 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
5761 * c-typeck.c (build_c_cast): Likewise.
5762 (set_nonincremental_init_from_string): Likewise.
5763 (c_tree_equal): Likewise.
5764
a0e24419
MP
57652014-05-02 Marek Polacek <polacek@redhat.com>
5766
5767 PR c/25801
5768 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
5769 Return size_one_node when the type is not complete.
5770 (pointer_diff): Remove comment.
5771 (build_unary_op): Improve error messages.
5772
19fc9faa
MP
57732014-05-02 Marek Polacek <polacek@redhat.com>
5774
5775 * c-typeck.c (c_finish_return): Separate warning_at calls.
5776
63bc4e87
MP
57772014-05-02 Marek Polacek <polacek@redhat.com>
5778
5779 * c-tree.h (error_init): Remove declaration.
5780 (pedwarn_init): Likewise.
5781 * c-typeck.c (error_init): Make static and move above.
5782 (pedwarn_init): Likewise.
5783 (warning_init): Move above.
5784 (maybe_warn_string_init): Likewise.
5785
4bd2511b
JL
57862014-05-01 Jeff Law <law@redhat.com>
5787
5788 Revert:
5789
5790 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5791 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
5792 avoid goto.
5793
6a358dcb
MP
57942014-05-02 Marek Polacek <polacek@redhat.com>
5795
5796 PR c/60784
5797 * c-typeck.c (push_init_level): Set constructor_designated to
5798 p->designated for structures.
5799
ae5ebda4
MP
58002014-05-01 Marek Polacek <polacek@redhat.com>
5801
5802 PR c/60915
5803 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
5804 function-definition has an attribute after the declarator.
5805
96b40f8d
MP
58062014-05-01 Marek Polacek <polacek@redhat.com>
5807
5808 PR c/60257
5809 * c-typeck.c (warning_init): Add location_t parameter. Call
5810 warning_at instead of warning.
5811 (push_init_level): Pass input_location to warning_init.
5812 (add_pending_init): Add location_t parameter. Pass loc to
5813 warning_init.
5814 (set_nonincremental_init): Pass input_location to add_pending_init.
5815 (set_nonincremental_init_from_string): Likewise.
5816 (output_init_element): Pass loc to warning_init and to
5817 add_pending_init.
5818
32e00768
MP
58192014-05-01 Marek Polacek <polacek@redhat.com>
5820
5821 PR c/43395
5822 * c-typeck.c (c_finish_return): Distinguish between label and variable
5823 when warning about returning local address.
5824
c9379ce2
MP
58252014-05-01 Marek Polacek <polacek@redhat.com>
5826
5827 PR c/29467
5828 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
5829 in C89 mode.
5830
d00887e8
MP
58312014-05-01 Marek Polacek <polacek@redhat.com>
5832
5833 PR c/43245
5834 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
5835 instead of 0 to WARN_FOR_QUALIFIERS.
5836
5436fa2e
MP
58372014-05-01 Marek Polacek <polacek@redhat.com>
5838
5839 PR c/56989
5840 * c-typeck.c (default_conversion): Use better location for
5841 error call.
5842
f8ed5150
MP
58432014-04-30 Marek Polacek <polacek@redhat.com>
5844
5845 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
5846 also when SANITIZE_FLOAT_DIVIDE is on.
5847
8337d1db
MP
58482014-04-30 Marek Polacek <polacek@redhat.com>
5849
5850 PR c/60139
5851 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
5852 and pedwarn_init. Use loc insted of input_location.
5853
c4bdc42f
MP
58542014-04-30 Marek Polacek <polacek@redhat.com>
5855
5856 PR c/60351
5857 * c-typeck.c (build_binary_op): Use location when warning about
5858 shift count.
5859
45484dcf
MP
58602014-04-25 Marek Polacek <polacek@redhat.com>
5861
5862 PR c/18079
5863 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
5864 always_inline/noinline and hot/cold attributes.
5865
34cf811f
MP
58662014-04-25 Marek Polacek <polacek@redhat.com>
5867
5868 PR c/60114
5869 * c-parser.c (c_parser_initelt): Pass input_location to
5870 process_init_element.
5871 (c_parser_initval): Pass loc to process_init_element.
5872 * c-tree.h (process_init_element): Adjust declaration.
5873 * c-typeck.c (push_init_level): Pass input_location to
5874 process_init_element.
5875 (pop_init_level): Likewise.
5876 (set_designator): Likewise.
5877 (output_init_element): Add location_t parameter. Pass loc to
5878 digest_init.
5879 (output_pending_init_elements): Pass input_location to
5880 output_init_element.
5881 (process_init_element): Add location_t parameter. Pass loc to
5882 output_init_element.
5883
42056eac
JJ
58842014-04-24 Jakub Jelinek <jakub@redhat.com>
5885
5886 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
5887 atomic-clause, allow comma in between atomic-clause and
5888 seq_cst.
5889
e162a134
JJ
58902014-04-22 Jakub Jelinek <jakub@redhat.com>
5891
5892 PR c/59073
5893 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
5894 fails, don't set OM_PARALLEL_COMBINED and return NULL.
5895
2f6babac
IZ
58962014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5897
5898 PR middle-end/60469
5899 * c-array-notation.c (fix_builtin_array_notation_fn): Use
5900 create_tmp_var instead build_decl for creating temps.
5901 (build_array_notation_expr): Likewise.
5902 (fix_conditional_array_notations_1): Likewise.
5903 (fix_array_notation_expr): Likewise.
5904 (fix_array_notation_call_expr): Likewise.
5905
8edbfaa6
JJ
59062014-03-28 Jakub Jelinek <jakub@redhat.com>
5907
5908 PR c++/60689
5909 * c-tree.h (c_build_function_call_vec): New prototype.
5910 * c-typeck.c (build_function_call_vec): Don't call
5911 resolve_overloaded_builtin here.
5912 (c_build_function_call_vec): New wrapper function around
5913 build_function_call_vec. Call resolve_overloaded_builtin here.
5914 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
5915 Call c_build_function_call_vec instead of build_function_call_vec.
5916 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5917 * c-decl.c (finish_decl): Likewise.
5918
7485aeea
MLI
59192014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5920
5921 PR c/55383
5922 * c-typeck.c: Use correct format string in cast-qual warning
5923
b17a8b07
TS
59242014-03-07 Thomas Schwinge <thomas@codesourcery.com>
5925
5926 * c-decl.c (c_decl_attributes): Use
5927 lang_hooks.types.omp_mappable_type.
5928 * c-typeck.c (c_finish_omp_clauses): Likewise.
5929
3af9c5e9
MP
59302014-03-06 Marek Polacek <polacek@redhat.com>
5931
5932 PR c/60197
5933 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
5934 of checking tree code.
5935
1c9f5f33
PK
59362014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5937
5938 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
5939 (c_parser_parameter_declaration): Likewise.
5940
cc28fc7f
MP
59412014-02-19 Marek Polacek <polacek@redhat.com>
5942
5943 PR c/60195
5944 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
5945 Call mark_exp_read on exp.value.
5946 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
5947 TREE_ADDRESSABLE on old instead of val.
5948 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
5949
b581c05c
PK
59502014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
5951
5952 * c-parser.c (c_parser_get_builtin_args): Replace calls to
5953 C_EXPR_APPEND by vec_safe_push.
5954 * c-tree.h (C_EXPR_APPEND): Remove.
5955
81e5eca8
MP
59562014-01-31 Marek Polacek <polacek@redhat.com>
5957
5958 PR c/59963
5959 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
5960 build_function_call_vec.
5961 (build_function_call): Likewise.
5962 (build_atomic_assign): Likewise.
5963 (build_function_call_vec): Add arg_loc parameter. Use it.
5964 (convert_arguments): Likewise.
5965 (convert_for_assignment): Rename rhs_loc to expr_loc.
5966 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
5967 (c_parser_objc_keywordexpr): Likewise.
5968 (c_parser_postfix_expression_after_primary): Call
5969 build_function_call_vec with expr_loc rather than op_loc.
5970 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
5971 build_function_call_vec.
5972 (c_parser_expr_list): Add locations parameter. Fill it with locations
5973 of function arguments.
5974 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
5975
68fca595
MP
59762014-01-30 Marek Polacek <polacek@redhat.com>
5977
5978 PR c/59940
5979 * c-typeck.c (build_function_call_vec): Use loc parameter.
5980 (convert_arguments): Add location parameter. Use it.
5981 (ep_convert_and_check): Likewise.
5982 (build_atomic_assign): Adjust convert_for_assignment call.
5983 (build_modify_expr): Likewise.
5984 (digest_init): Likewise.
5985 (c_finish_return): Likewise.
5986 (build_conditional_expr): Adjust ep_convert_and_check calls.
5987 (convert_for_assignment): Add rhs_loc parameter. Use it.
5988 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
5989 calls.
5990
fa337f3a
RB
59912014-01-30 Richard Biener <rguenther@suse.de>
5992
5993 PR c/59905
5994 * c-typeck.c (build_function_call_vec): Do not replace calls
5995 to a function via an incompatible type with a runtime abort.
5996
b72271b9
BI
59972014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5998
5999 * c-parser.c (c_parser_declaration_or_fndef): Replaced
6000 flag_enable_cilkplus with flag_cilkplus.
6001 (c_parser_direct_declarator_inner): Likewise.
6002 (c_parser_attribute_any_word): Likewise.
6003 (c_parser_attributes): Likewise.
6004 (c_parser_compound_statement): Likewise.
6005 (c_parser_statement_after_labels): Likewise.
6006 (c_parser_if_statement): Likewise.
6007 (c_parser_switch_statement): Likewise.
6008 (c_parser_do_statement): Likewise.
6009 (c_parser_for_statement): Likewise.
6010 (c_parser_unary_expression): Likewise.
6011 (c_parser_postfix_expression): Likewise.
6012 (c_parser_postfix_expression_after_primary): Likewise.
6013 (c_parser_postfix_expression_after_primary): Likewise.
6014 (c_parser_omp_clause_name): Likewise.
6015 (c_finish_omp_declare_simd): Likewise.
6016 (c_parser_cilk_verify_simd): Likewise.
6017 * c-typeck.c (build_array_ref): Likewise.
6018 (build_function_call_vec): Likewise.
6019 (convert_arguments): Likewise.
6020 (build_compound_expr): Likewise.
6021 (c_finish_return): Likewise.
6022 (c_finish_if_stmt): Likewise.
6023 (c_finish_loop): Likewise.
6024 (build_binary_op): Likewise.
6025
393e8e8b
MP
60262014-01-23 Marek Polacek <polacek@redhat.com>
6027
6028 PR c/59846
6029 * c-typeck.c (parser_build_binary_op): Use location instead of
6030 input_location.
6031 (build_binary_op): Pass location to shorten_compare.
6032
f04dda30
MP
60332014-01-23 Marek Polacek <polacek@redhat.com>
6034
6035 PR c/58346
6036 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
6037 an empty aggregate.
6038
789eadcd
MP
60392014-01-23 Marek Polacek <polacek@redhat.com>
6040
6041 PR c/59871
6042 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
6043 of a comma expression.
6044 (emit_side_effect_warnings): Likewise.
6045
40f14e9f
BI
60462014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6047
6048 PR c/59825
6049 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
6050 function to use walk_tree and moved a lot of its functionality to
6051 expand_array_notations.
6052 (expand_array_notations): New function.
6053
74558dd9
BI
60542014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
6055
6056 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
6057 attribute an attribute without value.
6058
652fea39
JJ
60592014-01-23 Jakub Jelinek <jakub@redhat.com>
6060
6061 PR middle-end/58809
6062 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
6063 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
6064
f34f1c87
MP
60652014-01-22 Marek Polacek <polacek@redhat.com>
6066
6067 PR c/59891
6068 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
6069 of remove_c_maybe_const_expr on op1 and op2.
6070
241f845a
JJ
60712014-01-15 Jakub Jelinek <jakub@redhat.com>
6072
6073 PR c/58943
6074 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
6075 effects, preevaluate rhs using SAVE_EXPR first.
6076
9a74f20c
BI
60772014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
6078
6079 PR c++/59631
6080 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
6081 statements with if-elseif statements.
6082
96066ce1
MP
60832014-01-06 Marek Polacek <polacek@redhat.com>
6084
6085 PR c/57773
6086 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
6087 defined bit-field types only in ISO C.
6088
23a5b65a
RS
60892014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6090
6091 Update copyright years
6092
f9030485
RS
60932014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6094
6095 * c-array-notation.c: Use the standard form for the copyright notice.
6096
41958c28
BI
60972013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6098
6099 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
6100 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
6101 field in parser is not empty. If not-empty, call the function
6102 c_parser_finish_omp_declare_simd.
6103 (c_parser_cilk_clause_vectorlength): Modified function to be shared
6104 between SIMD-enabled functions and #pragma simd. Added new parameter.
6105 (c_parser_cilk_all_clauses): Modified the usage of the function
6106 c_parser_cilk_clause_vectorlength as mentioned above.
6107 (c_parser_cilk_simd_fn_vector_attrs): New function.
6108 (c_finish_cilk_simd_fn_tokens): Likewise.
6109 (is_cilkplus_vector_p): Likewise.
6110 (c_parser_omp_clause_name): Added checking for "vectorlength,"
6111 "nomask," and "mask" strings in clause name.
6112 (c_parser_omp_all_clauses): Added 3 new case statements:
6113 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
6114 PRAGMA_CILK_CLAUSE_NOMASK.
6115 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
6116 check for vector attribute and if so call the function
6117 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
6118 called the function c_finish_cilk_simd_fn_tokens.
6119 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
6120 parser field is non-empty. If so, parse them as you would parse
6121 the omp declare simd pragma.
6122 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
6123 Added a check when step is a parameter and flag it as error.
6124 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
6125 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
6126 pragma_omp_clause.
6127
cef0fd0e
TS
61282013-12-17 Thomas Schwinge <thomas@codesourcery.com>
6129
6130 * c-parser.c (c_parser_omp_parallel): Fix description.
6131
12893402
BI
61322013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6133
6134 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
6135 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6136 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
6137 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
6138
296674db
JM
61392013-12-04 Joseph Myers <joseph@codesourcery.com>
6140
6141 PR c/52023
6142 * c-parser.c (c_parser_alignas_specifier): Use
6143 c_sizeof_or_alignof_type instead of c_alignof.
6144 (c_parser_alignof_expression): Likewise, with min_alignof
6145 parameter depending on alignof spelling used.
6146
edd28054
MP
61472013-12-04 Marek Polacek <polacek@redhat.com>
6148
6149 PR c/54113
6150 * c-decl.c (start_function): Don't warn for missing prototype for
6151 inline functions.
6152
da0fc454
MP
61532013-12-03 Marek Polacek <polacek@redhat.com>
6154
6155 PR c/59351
6156 * c-decl.c (build_compound_literal): Allow compound literals with
6157 empty initial value.
6158
4c2ecab0
JM
61592013-12-02 Joseph Myers <joseph@codesourcery.com>
6160
6161 PR c/58235
6162 * c-typeck.c (build_modify_expr): Diagnose assignment to
6163 expression with array type.
6164
340baef7
JM
61652013-11-29 Joseph Myers <joseph@codesourcery.com>
6166
6167 PR c/42262
6168 * c-typeck.c (process_init_element): Do not treat a string as
6169 initializing a whole array when used with a designator for an
6170 individual element.
6171
6763b9f7
JM
61722013-11-29 Joseph Myers <joseph@codesourcery.com>
6173
6174 PR c/57574
6175 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
6176 an inline function following a static declaration.
6177
e7bd1de1
JJ
61782013-11-28 Jakub Jelinek <jakub@redhat.com>
6179
6180 PR c/59310
6181 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
6182 to p_name before calling c_parser_omp_teams instead of after.
6183 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
6184 argument. Remove unused p_name variable.
6185
0136f8f0
AH
61862013-11-27 Aldy Hernandez <aldyh@redhat.com>
6187 Jakub Jelinek <jakub@redhat.com>
6188
6189 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
6190 external_scope is NULL.
6191
241b71bb
TV
61922013-11-27 Tom de Vries <tom@codesourcery.com>
6193 Marc Glisse <marc.glisse@inria.fr>
6194
6195 PR c++/59032
6196 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
6197
2fb9a547
AM
61982013-11-22 Andrew MacLeod <amacleod@redhat.com>
6199
6200 * c-typeck.c: Add required include files from gimple.h.
6201
8400e75e
DM
62022013-11-22 David Malcolm <dmalcolm@redhat.com>
6203
6204 * c-decl.c (define_label, shadow_tag_warned)
6205 (check_bitfield_type_and_width, grokdeclarator, grokparms,
6206 store_parm_decls_newstyle, store_parm_decls_oldstyle)
6207 (declspecs_add_type): Remove use of in_system_header macro.
6208 * c-parser.c (c_parser_unary_expression): Likewise.
6209 * c-typeck.c (store_init_value, process_init_element)
6210 (c_start_case): Likewise.
6211
6212 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
6213 macro.
6214
6215 * c-parser.c (c_parser_set_source_position_from_token): Remove
6216 reference to in_system_header from comment.
6217
386b1f1f
RS
62182013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6219
6220 * c-decl.c (grokdeclarator): Update comment to refer to
6221 tree_to_[su]hwi rather than tree_low_cst.
6222
ae7e9ddd
RS
62232013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6224
6225 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
6226 tree_to_uhwi throughout.
6227
9439e9a1
RS
62282013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6229
6230 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
6231 throughout.
6232
9541ffee
RS
62332013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6234
6235 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
6236 throughout.
6237
c02065fc
AH
62382013-11-15 Aldy Hernandez <aldyh@redhat.com>
6239
6240 * c-parser.c (c_parser_cilk_simd): New.
6241 (c_parser_cilk_verify_simd): New.
6242 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
6243 (c_parser_omp_for_loop): Add case for NE_EXPR.
6244 Set c_break_label for CILK_SIMD.
6245 (c_parser_cilk_clause_vectorlength): New.
6246 (c_parser_cilk_clause_linear): New.
6247 (c_parser_cilk_clause_name): New.
6248 (c_parser_cilk_all_clauses): New.
6249 * c-typeck.c (build_unary_op): Pass location argument to
6250 readonly_error.
6251 (build_modify_expr): Same.
6252 (build_asm_expr): Same.
6253 (c_finish_bc_stmt): Error on break/continue in loops.
6254
18f429e2
AM
62552013-11-14 Andrew MacLeod <amacleod@redhat.com>
6256
6257 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
6258
d8a2d370
DN
62592013-11-14 Diego Novillo <dnovillo@google.com>
6260
6261 * c-decl.c: Include print-tree.h.
6262 Include stor-layout.h.
6263 Include varasm.h.
6264 Include attribs.h.
6265 Include stringpool.h.
6266 * c-lang.c: Include fold-const.h.
6267 * c-parser.c: Include stringpool.h.
6268 Include attribs.h.
6269 Include stor-layout.h.
6270 Include varasm.h.
6271 Include trans-mem.h.
6272 * c-typeck.c: Include stor-layout.h.
6273 Include trans-mem.h.
6274 Include varasm.h.
6275 Include stmt.h.
6276
38b7bc7f
JM
62772013-11-13 Joseph Myers <joseph@codesourcery.com>
6278
6279 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
6280 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
6281 __auto_type.
6282 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
6283 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
6284 RID_AUTO_TYPE.
6285 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
6286 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
6287 (c_parser_declarator, c_parser_direct_declarator_inner)
6288 (c_parser_parameter_declaration, c_parser_type_name): All callers
6289 changed.
6290 (c_parser_declaration_or_fndef): Handle declarations with type
6291 determined from the initializer.
6292
45b0be94
AM
62932013-11-12 Andrew MacLeod <amacleod@redhat.com>
6294
18f429e2 6295 * c-typeck.c: Include gimplify.h.
45b0be94 6296
582d9b50
JM
62972013-11-12 Joseph Myers <joseph@codesourcery.com>
6298
6299 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
6300 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
6301 comment.
6302 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
6303 or _Thread_local as appropriate in diagnostics.
6304 (build_null_declspecs): Initialize ret->thread_gnu_p.
6305 (declspecs_add_scspec): Handle either __thread or _Thread_local
6306 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
6307 pedantic. Do not disallow _Thread_local extern and _Thread_local
6308 static.
6309
267bac10
JM
63102013-11-07 Joseph Myers <joseph@codesourcery.com>
6311 Andrew MacLeod <amacleod@redhat.com>
6312
6313 * c-aux-info.c (gen_type): Handle atomic qualifier.
6314 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
6315 qualifiers when compating types.
6316 (shadow_tag_warned): Handle atomic_p in declspecs.
6317 (quals_from_declspecs): Likewise.
6318 (start_decl): Use c_type_promotes_to when promoting argument
6319 types.
6320 (grokdeclarator): Handle _Atomic.
6321 (get_parm_info): Diagnose any qualifier on "void" as only
6322 parameter.
6323 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
6324 comparing types. Use c_type_promotes_to when promoting argument
6325 types.
6326 (finish_function): Use c_type_promotes_to when promoting argument
6327 types.
6328 (build_null_declspecs): Handle atomic_p in declspecs.
6329 (declspecs_add_qual): Handle RID_ATOMIC.
6330 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
6331 (c_token_starts_declspecs): Handle RID_ATOMIC.
6332 (c_parser_declspecs): Handle atomic type specifiers and
6333 qualifiers.
6334 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
6335 from types of expressions with atomic type.
6336 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
6337 (c_parser_attribute_any_word): Handle RID_ATOMIC.
6338 (c_parser_initializer, c_parser_initelt, c_parser_initval)
6339 (c_parser_statement_after_labels, c_parser_switch_statement)
6340 (c_parser_for_statement, c_parser_expr_no_commas)
6341 (c_parser_conditional_expression, c_parser_binary_expression)
6342 (c_parser_cast_expression, c_parser_unary_expression)
6343 (c_parser_postfix_expression)
6344 (c_parser_postfix_expression_after_primary, c_parser_expression):
6345 Use convert_lvalue_to_rvalue.
6346 (c_parser_expression_conv, c_parser_expr_list): Document
6347 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
6348 (c_parser_objc_synchronized_statement): Use
6349 convert_lvalue_to_rvalue.
6350 (c_parser_objc_selector): Handle RID_ATOMIC.
6351 (c_parser_objc_receiver, c_parser_array_notation): Use
6352 convert_lvalue_to_rvalue.
6353 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
6354 _Atomic (type-name).
6355 (struct c_declspecs): Add atomic_p field.
6356 (convert_lvalue_to_rvalue): Declare.
6357 * c-typeck.c (c_type_promotes_to): Promote atomic types to
6358 corresponding atomic types.
6359 (qualify_type): Don't add _Atomic qualifiers from second argument.
6360 (comp_target_types): Do not allow _Atomic mismatches.
6361 (type_lists_compatible_p): Do not remove atomic qualifiers when
6362 comparing types.
6363 (really_atomic_lvalue, convert_lvalue_to_rvalue)
6364 (build_atomic_assign): New functions.
6365 (build_unary_op): Use build_atomic_assign for atomic increment and
6366 decrement.
6367 (build_conditional_expr): Do not treat _Atomic void as a qualified
6368 version of void.
6369 (build_modify_expr): Use build_atomic_assign for atomic LHS.
6370 (find_anonymous_field_with_type, convert_to_anonymous_field)
6371 (convert_for_assignment): Do not remove atomic qualifiers when
6372 comparing types.
6373 (digest_init): Do not accept initialization of arrays of atomic
6374 elements by string constants.
6375 (build_asm_expr): Use convert_lvalue_to_rvalue.
6376 (build_binary_op): Do not treat _Atomic void as a qualified
6377 version of void.
6378
0c249d4b
DD
63792013-11-06 DJ Delorie <dj@redhat.com>
6380
6381 * c-decl.c (locate_old_decl): If a previous conflicting decl is
6382 both explicit and builtin, print the location of the explicit one.
6383
6d7f7e0a
TB
63842013-11-05 Tobias Burnus <burnus@net-b.de>
6385
6386 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
6387 c_parser_omp_distribute, c_parser_omp_teams,
6388 c_parser_omp_target, c_parser_omp_declare): Handle
6389 -fopenmp-simd.
6390
b906f4ca
MP
63912013-11-03 Marek Polacek <polacek@redhat.com>
6392
6393 * c-decl.c (grokdeclarator): Add VLA instrumentation.
6394
ee1d5a02
JJ
63952013-11-01 Jakub Jelinek <jakub@redhat.com>
6396
6397 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
6398 check_dup_generic at the end, unless remove is true.
6399 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
6400 remove = true;.
6401 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
6402
5a9785fb
JJ
64032013-10-31 Jakub Jelinek <jakub@redhat.com>
6404
6405 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
6406 with decl that is not pointer nor array.
6407
939b37da
BI
64082013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6409
6410 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
6411 a spawning function is found.
6412 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
6413 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
6414 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
6415 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
6416 case.
6417 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
6418 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
6419 expr.
6420 (c_finish_return): Added a check to reject _Cilk_spawn in return
6421 expression.
6422 (build_cilk_spawn): New function.
6423 (build_cilk_sync): Likewise.
6424 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 6425
d4af74d4
TB
64262013-10-27 Tobias Burnus <burnus@net-b.de>
6427
6428 PR other/33426
6429 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
6430 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
6431 (c_parser_statement_after_labels): Update calls.
6432
d73749df 64332013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6434
6435 PR other/33426
6436 * c-parser.c (c_parser_pragma, c_parser_for_statement):
6437 Handle PRAGMA_IVDEP.
6438 (c_parser_statement_after_labels): Update call.
6439
f28aa681
MP
64402013-10-24 Marek Polacek <polacek@redhat.com>
6441
6442 * c-parser.c (c_parser_struct_declaration): Add a comment.
6443 (c_parser_declarator): Don't allow _Alignas here.
6444
0645c1a2
AM
64452013-10-17 Andrew MacLeod <amacleod@redhat.com>
6446
6447 * c-parser.c: Include omp-low.h.
6448 * c-typeck.c: Likewise.
6449
568a31f2
MP
64502013-10-17 Marek Polacek <polacek@redhat.com>
6451
6452 PR c/58267
6453 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
6454 Document syntax of the array-declarator.
6455 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
6456 are not permitted.
6457 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
6458 (c_parser_struct_declaration): Likewise.
6459 (c_parser_declarator): Likewise.
6460 (c_parser_direct_declarator_inner): Likewise.
6461 (c_parser_parameter_declaration): Likewise.
6462 (c_parser_type_name): Likewise.
6463
acf0174b
JJ
64642013-10-11 Jakub Jelinek <jakub@redhat.com>
6465
6466 * c-lang.h (current_omp_declare_target_attribute): New extern
6467 decl.
6468 * c-parser.c: Include c-lang.h.
6469 (struct c_parser): Change tokens to c_token *.
6470 Add tokens_buf field. Change tokens_avail type to unsigned int.
6471 (c_parser_consume_token): If parser->tokens isn't
6472 &parser->tokens_buf[0], increment parser->tokens.
6473 (c_parser_consume_pragma): Likewise.
6474 (enum pragma_context): Add pragma_struct and pragma_param.
6475 (c_parser_external_declaration): Adjust
6476 c_parser_declaration_or_fndef caller.
6477 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
6478 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
6479 Adjust recursive call.
6480 (c_parser_struct_or_union_specifier): Use pragma_struct instead
6481 of pragma_external.
6482 (c_parser_parameter_declaration): Use pragma_param instead of
6483 pragma_external.
6484 (c_parser_compound_statement_nostart, c_parser_label,
6485 c_parser_for_statement): Adjust
6486 c_parser_declaration_or_fndef callers.
6487 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
6488 it through to c_parser_conditional_expression.
6489 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
6490 pass it through to c_parser_binary_expression. Adjust recursive
6491 call.
6492 (c_parser_binary_expression): Remove prec argument, add
6493 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
6494 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
6495 binop matches it, use build2 instead of parser_build_binary_op.
6496 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
6497 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
6498 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
6499 Handle pragma_struct and pragma_param the same as pragma_external.
6500 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
6501 (c_parser_omp_variable_list): Parse array sections for
6502 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
6503 (c_parser_omp_clause_collapse): Fully fold collapse expression.
6504 (c_parser_omp_clause_reduction): Handle user defined reductions.
6505 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
6506 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
6507 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
6508 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
6509 c_parser_omp_clause_depend, c_parser_omp_clause_map,
6510 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
6511 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
6512 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
6513 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
6514 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
6515 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
6516 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
6517 (c_parser_omp_for_loop): Add CODE argument, pass it through
6518 to c_finish_omp_for. Change last argument to cclauses,
6519 and adjust uses to grab parallel clauses from the array of all
6520 the split clauses. Adjust c_parser_binary_expression,
6521 c_parser_declaration_or_fndef and c_finish_omp_for callers.
6522 (omp_split_clauses): New function.
6523 (c_parser_omp_simd): New function.
6524 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
6525 Allow the function to be called also when parsing combined constructs,
6526 and call c_parser_omp_simd when parsing for simd.
6527 (c_parser_omp_sections_scope): If section-sequence doesn't start with
6528 #pragma omp section, require exactly one structured-block instead of
6529 sequence of statements.
6530 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
6531 Allow the function to be called also when parsing combined constructs.
6532 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
6533 Allow the function to be called also when parsing combined
6534 constructs.
6535 (c_parser_omp_taskgroup, c_parser_omp_cancel,
6536 c_parser_omp_cancellation_point, c_parser_omp_distribute,
6537 c_parser_omp_teams, c_parser_omp_target_data,
6538 c_parser_omp_target_update, c_parser_omp_target,
6539 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
6540 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
6541 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
6542 (c_parser_omp_construct): Add p_name and mask vars. Handle
6543 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
6544 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
6545 and c_parser_omp_sections callers.
6546 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
6547 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
6548 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
6549 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
6550 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
6551 OMP_CLAUSE_DEPEND.
6552 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
6553 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
6554 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
6555 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
6556 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
6557 * c-typeck.c: Include tree-inline.h.
6558 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
6559 handle_omp_array_sections_1, handle_omp_array_sections,
6560 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
6561 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
6562 user defined reductions.
6563 (c_tree_equal): New function.
6564 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
6565 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
6566 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
6567 c_check_omp_declare_reduction_r): New prototypes.
6568 * c-decl.c (current_omp_declare_target_attribute): New variable.
6569 (c_decl_attributes): New function.
6570 (start_decl, start_function): Use it instead of decl_attributes.
6571 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
6572 c_omp_reduction_decl, c_omp_reduction_lookup,
6573 c_check_omp_declare_reduction_r): New functions.
6574
0a6c2227
TT
65752013-09-25 Tom Tromey <tromey@redhat.com>
6576
6577 * Make-lang.in (c/gccspec.o): Remove.
6578 (CFLAGS-c/gccspec.o): New variable.
6579 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
6580 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
6581 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
6582
f3bc55f0
TT
65832013-09-25 Tom Tromey <tromey@redhat.com>
6584
6585 * Make-lang.in (c/gccspec.o): Don't use subshell.
6586
a24d975c
MP
65872013-09-18 Marek Polacek <polacek@redhat.com>
6588
6589 PR sanitize/58443
6590 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
6591 Remove unnecessary check.
6592
ce6923c5
MP
65932013-09-18 Marek Polacek <polacek@redhat.com>
6594
6595 PR sanitizer/58411
6596 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
6597 no_sanitize_undefined attribute.
6598
a1e51df9
KT
65992013-09-13 Kai Tietz <ktietz@redhat.com>
6600
6601 PR target/57848
6602 * c-decl.c (c_builtin_function_ext_scope): Remove
6603 wrong assumption that it is never called on prexisting
6604 symbol.
6605
0af94e6f
JR
66062013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6607
6608 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
6609
20059c8b
GDR
66102013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6611
6612 * c-objc-common.c (c_tree_printer): Tidy.
6613
de5a5fa1
MP
66142013-08-30 Marek Polacek <polacek@redhat.com>
6615
6616 * c-typeck.c (build_binary_op): Add division by zero and shift
6617 instrumentation.
6618
2531a1d9 66192013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 6620 Joseph Myers <joseph@codesourcery.com>
2531a1d9 6621
6e2bcc98 6622 PR c/35649
2531a1d9
JR
6623 * c-typeck.c (c_common_type): Prefer double_type_node over
6624 other REAL_TYPE types with the same precision.
6625 (convert_arguments): Likewise.
6626
025311c4
GDR
66272013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6628
6629 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
6630 (c_initialize_diagnostics): Call a destructor for the early printer.
6631
da6ca2b5
GDR
66322013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6633
6634 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
6635 printer initialization.
6636
318cda85 66372013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 6638
318cda85
BI
6639 PR c/57490
6640 * c-array-notation.c (fix_conditional_array_notations_1): Added a
6641 check for truth values.
6642 (expand_array_notation_exprs): Added truth values case. Removed an
6643 unwanted else. Added for-loop to walk through subtrees in default
6644 case.
6645
b066401f
GDR
66462013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6647
6648 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
6649
fb48aadc
JM
66502013-07-23 Joseph Myers <joseph@codesourcery.com>
6651
6652 * c-parser.c (struct c_generic_association): Fix typo.
6653
433cc7b0
TT
66542013-07-23 Tom Tromey <tromey@redhat.com>
6655 Joseph Myers <joseph@codesourcery.com>
6656
6657 * c-parser.c (struct c_generic_association): New.
6658 (c_generic_association_d): New typedef.
6659 (c_parser_generic_selection): New function.
6660 (c_parser_postfix_expression): Handle RID_GENERIC.
6661
26d40c3d
JM
66622013-07-13 Jason Merrill <jason@redhat.com>
6663
6664 PR c++/57793
6665 * c-decl.c (finish_struct): Check for too-large class.
6666
ecdbd01a 66672013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6668
6669 PR c/57821
6670 * c-typeck.c (set_init_index): When folding, check for index overflow.
6671
1141ed3f
BI
66722013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6673
6674 * c-parser.c (c_parser_array_notation): Removed rejection of array
6675 notations in an array of function pointers.
6676
713b46fa
BI
66772013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6678
6679 * c-array-notation.c (make_triplet_val_inv): New function.
6680 (create_cmp_incr): Likewise.
6681 (create_array_refs): Likewise.
6682 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
6683 Also modularized common parts between functions and called the function.
6684 (build_array_notation_expr): Likewise.
6685 (fix_conditional_array_notations_1): Likewise.
6686 (fix_array_notation_expr): Likewise.
6687 (fix_array_notation_call_expr): Likewise.
6688
92f20202
MP
66892013-06-18 Marek Polacek <polacek@redhat.com>
6690
6691 PR c/57630
6692 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
6693
73a23b06
BI
66942013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
6695
6696 * c-array-notation.c (build_array_notation_expr): Reject array notation
6697 mismatch between LHS and RHS even inside a call_expr. Also, removed
6698 a couple while statements that were dead code.
6699
00b8517d
BI
67002013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
6701
6702 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
6703 excessive precision expressions in function parameters. Also removed
6704 couple unwanted while statements.
6705
1509bdda
BI
67062013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6707
6708 * c-array-notation.c (expand_array_notation_exprs): Added
6709 ARRAY_NOTATION_REF case.
ab20d992 6710
d60f1706
BI
67112013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6712
6713 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
6714 function to c-family/array-notation-common.c.
6715 (is_cilkplus_reduce_builtin): Likewise.
6716 (find_rank): Likewise.
6717 (extract_array_notation_exprs): Likewise.
6718 (replace_array_notations): Likewise.
6719 (find_inv_trees): Likewise.
6720 (replace_inv_trees): Likewise.
6721 (contains_array_notation_expr): Likewise.
6722 (find_correct_array_notation_type): Likewise.
6723 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
6724 (struct inv_list): Moved this to c-family/array-notation-common.c.
6725 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 6726
6d6efbb3
BI
67272013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
6728
6729 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
6730 reduction functions outside the for-loop. Added a check if the fundecl
6731 is non-NULL. Finally, removed an unwanted if-statement, and made the
6732 body unconditional.
6733
25c22937
BI
67342013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6735
6736 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
6737 condition of the if-statement matches the rank of else-block and then-
6738 block when array notations are used.
6739 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
6740 expression after the entire function body is parsed.
6741 (c_parser_expr_no_commas): Delayed creating array notation expressions
6742 to the end of function parsing.
6743 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
6744 whole if-statement instead of just the condition.
ab20d992 6745 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 6746
edd25645
BI
67472013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
6748
6749 PR c/57474
6750 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
6751 array to NULL_TREE if they are unused. Also added a check for the
6752 field to be NULL before its fields are used in future.
ab20d992 6753
065ce7f1
RO
67542013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6755
6756 PR bootstrap/57450
6757 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
6758 (build_array_notation_expr): Likewise.
6759
36536d79
BI
67602013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6761
6762 * c-typeck.c (build_array_ref): Added a check to see if array's
6763 index is greater than one. If true, then emit an error.
6764 (build_function_call_vec): Exclude error reporting and checking
6765 for builtin array-notation functions.
6766 (convert_arguments): Likewise.
6767 (c_finish_return): Added a check for array notations as a return
6768 expression. If true, then emit an error.
6769 (c_finish_loop): Added a check for array notations in a loop
6770 condition. If true then emit an error.
6771 (lvalue_p): Added a ARRAY_NOTATION_REF case.
6772 (build_binary_op): Added a check for array notation expr inside
6773 op1 and op0. If present, we call another function to find correct
6774 type.
6775 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
6776 * c-parser.c (c_parser_compound_statement): Check if array
6777 notation code is used in tree, if so, then transform them into
6778 appropriate C code.
6779 (c_parser_expr_no_commas): Check if array notation is used in LHS
6780 or RHS, if so, then build array notation expression instead of
6781 regular modify.
6782 (c_parser_postfix_expression_after_primary): Added a check for
6783 colon(s) after square braces, if so then handle it like an array
6784 notation. Also, break up array notations in unary op if found.
6785 (c_parser_direct_declarator_inner): Added a check for array
6786 notation.
6787 (c_parser_compound_statement): Added a check for array notation in
6788 a stmt. If one is present, then expand array notation expr.
6789 (c_parser_if_statement): Likewise.
6790 (c_parser_switch_statement): Added a check for array notations in
6791 a switch statement's condition. If true, then output an error.
6792 (c_parser_while_statement): Similarly, but for a while.
6793 (c_parser_do_statement): Similarly, but for a do-while.
6794 (c_parser_for_statement): Similarly, but for a for-loop.
6795 (c_parser_unary_expression): Check if array notation is used in a
6796 pre-increment or pre-decrement expression. If true, then expand
6797 them.
6798 (c_parser_array_notation): New function.
6799 * c-array-notation.c: New file.
6800 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 6801
cd192ccc
MS
68022013-05-23 Mike Stump <mikestump@comcast.net>
6803
6804 * c-typeck.c (convert_for_assignment): Handle references to memory
6805 spaces better.
6806
427b248d
JM
68072013-05-16 Jason Merrill <jason@redhat.com>
6808
6809 * Make-lang.in (cc1$(exeext)): Use link mutex.
6810
44d90fe1
PC
68112013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6812
6813 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
6814 to simply use OPT_Wpointer_arith.
6815 (build_unary_op): Likewise.
6816
4e7d7b3d
JJ
68172013-04-03 Jakub Jelinek <jakub@redhat.com>
6818
6819 PR c/19449
6820 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
6821 argument. If set, or it temporarily for parsing of the first
6822 argument into force_folding_builtin_constant_p.
6823 (c_parser_postfix_expression): Adjust callers.
6824
839b422f
RB
68252013-03-21 Richard Biener <rguenther@suse.de>
6826
6827 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
6828 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
6829
2ee028f1
MP
68302013-02-12 Marek Polacek <polacek@redhat.com>
6831
6832 PR c/44938
6833 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
6834 origtypes to NULL.
6835
8824edff
JJ
68362013-01-24 Jakub Jelinek <jakub@redhat.com>
6837
6838 PR c/56078
6839 * c-typeck.c (set_nonincremental_init_from_string): If
6840 constructor_max_index is NULL, treat it as if tree_int_cst_lt
6841 returned false.
6842 (process_init_element): Likewise.
6843
eadd3d0d
JJ
68442012-12-20 Jakub Jelinek <jakub@redhat.com>
6845
6846 PR c++/55619
6847 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
6848 argument, don't call default_function_array_conversion
6849 nor c_fully_fold here.
6850 (c_parser_asm_statement): Adjust callers.
6851 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
6852 and outputs here, and call default_function_array_conversion
6853 on inputs that don't need to be addressable.
6854
f8a93a2e
JJ
68552012-12-18 Jakub Jelinek <jakub@redhat.com>
6856
6857 PR c/39464
6858 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
6859 warning require that both c_common_unsigned_type as well as
6860 c_common_signed_type is the same for both mvl and mvr types.
6861
9771b263
DN
68622012-11-16 Diego Novillo <dnovillo@google.com>
6863
6864 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
6865
6866 * c-common.c: Use new vec API in vec.h.
6867 * c-common.h: Likewise.
6868 * c-gimplify.c: Likewise.
6869 * c-pragma.c: Likewise.
6870 * c-pretty-print.c: Likewise.
6871 * c-pretty-print.h: Likewise.
6872 * c-semantics.c: Likewise.
6873 * c-decl.c: Likewise.
6874 * c-parser.c: Likewise.
6875 * c-tree.h: Likewise.
6876 * c-typeck.c: Likewise.
6877
880661a4
JW
68782012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6879
6880 PR c++/54930
6881 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
6882
077d1abe
MLI
68832012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6884
6885 PR c/53066
6886 * c-decl.c (warn_if_shadowing): Do not warn if a variable
6887 shadows a function, unless the variable is a function or a
6888 pointer-to-function.
6889
3a785c97
JJ
68902012-10-12 Jakub Jelinek <jakub@redhat.com>
6891
6892 PR c/54381
6893 * c-parser.c (struct c_tree_loc_pair): Removed.
6894 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
6895 add location_t * and tree * arguments, fill in array of 3
6896 sizeof_arg trees and corresponding locs.
6897 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
6898 c_parser_expr_list callers.
6899 (c_parser_postfix_expression_after_primary): Likewise. Pass
6900 array of 3 sizeof_arg trees and locs (corresponding to first
6901 3 arguments) to sizeof_pointer_memaccess_warning.
6902
703c8606
LC
69032012-10-09 Lawrence Crowl <crowl@google.com>
6904
6905 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
6906 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
6907 hash table.
6908
5d9de0d0
PC
69092012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6910
6911 PR c++/54194
6912 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
6913 call.
6914
a212e43f
MG
69152012-10-09 Marc Glisse <marc.glisse@inria.fr>
6916
6917 PR c++/54427
6918 * c-typeck.c: Include c-common.h.
6919 (enum stv_conv): Moved to c-common.h.
6920 (scalar_to_vector): Moved to c-common.c.
6921 (build_binary_op): Adapt to scalar_to_vector's new prototype.
6922 * Make-lang.in: c-typeck.c depends on c-common.h.
6923
3b78de56
AC
69242012-10-04 Arnaud Charlet <charlet@adacore.com>
6925
6926 * c-decl.c (c_write_global_declarations): Fix handling of
6927 -fdump-ada-spec*.
6928
78c60e3d
SS
69292012-09-30 Sharad Singhai <singhai@google.com>
6930
6931 * c-decl.c (c_write_global_declarations): Use a different method
6932 to determine if the dump has ben initialized.
6933
9f33203d
JM
69342012-09-14 Joseph Myers <joseph@codesourcery.com>
6935
6936 PR c/54552
6937 * c-typeck.c (c_cast_expr): When casting to a type requiring
6938 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
6939 c_fully_fold first.
6940
a27d595d
JM
69412012-09-14 Joseph Myers <joseph@codesourcery.com>
6942
6943 PR c/54103
6944 * c-typeck.c (build_unary_op): Pass original argument of
6945 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
6946 any C_MAYBE_CONST_EXPR, if it has integer operands.
6947 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
6948 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
6949 to c_objc_common_truthvalue_conversion, then remove any
6950 C_MAYBE_CONST_EXPR, if they have integer operands. Use
6951 c_objc_common_truthvalue_conversion not
6952 c_common_truthvalue_conversion.
6953 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
6954 call note_integer_operands for arguments with integer operands
6955 that are not integer constants.
6956
9feb29df
JJ
69572012-09-13 Jakub Jelinek <jakub@redhat.com>
6958
6959 PR c/54559
6960 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
6961 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
6962
d409320c
JJ
69632012-08-31 Jakub Jelinek <jakub@redhat.com>
6964
6965 PR c/54428
6966 * c-convert.c (convert): Don't call fold_convert_loc if
6967 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
6968 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
6969 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
6970
6265d07c
JJ
69712012-08-24 Jakub Jelinek <jakub@redhat.com>
6972
6973 PR c/54355
6974 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
6975 for nested and empty_ok arguments in the call to
6976 c_parser_declaration_or_fndef.
6977
1a4049e7
JJ
69782012-08-17 Jakub Jelinek <jakub@redhat.com>
6979
6980 * c-tree.h (c_last_sizeof_arg): Declare.
6981 * c-parser.c (struct c_tree_loc_pair): New type.
6982 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
6983 non-NULL.
6984 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
6985 (c_parser_postfix_expression_after_primary): Likewise. Call
6986 sizeof_pointer_memaccess_warning if needed.
6987 (sizeof_ptr_memacc_comptypes): New function.
6988 * c-typeck.c (c_last_sizeof_arg): New global variable.
6989 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
6990
0229aee9
UB
69912012-07-24 Uros Bizjak <ubizjak@gmail.com>
6992
6993 * c-lang.h (lang_decl): Add variable_size GTY option.
6994
7ee2468b
SB
69952012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6996
6997 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
6998 * Make-lang.in: Fix dependencies.
6999
d4a10d0a
SB
70002012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7001
7002 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
7003 and add language Makefile hooks.
7004 * config-lang.in: New file.
7005 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
7006 add the required "normal" config-lang.in rules.
7007 * c-lang.h: Moved from gcc/ to here.
7008 * c-tree.h: Likewise.
7009 * c-objc-common.c: Likewise.
7010 * c-objc-common.h: Likewise.
7011 * c-typeck.c: Likewise.
7012 * c-convert.c: Likewise.
7013 * c-lang.c: Likewise.
7014 * c-aux-info.c: Likewise.
7015 * c-errors.c: Likewise.
7016 * gccspec.c: Likewise.
7017 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
7018 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
7019\f
8d9254fc 7020Copyright (C) 2012-2020 Free Software Foundation, Inc.
d4a10d0a
SB
7021
7022Copying and distribution of this file, with or without modification,
7023are permitted in any medium without royalty provided the copyright
7024notice and this notice are preserved.
This page took 2.724718 seconds and 5 git commands to generate.