]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
preprocessor: Reinitialize frontend parser after loading a PCH [PR112319]
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
6fb55db0
GA
12023-11-23 Jakub Jelinek <jakub@redhat.com>
2
3 * c-parser.cc (c_parser_postfix_expression): Handle RID_BUILTIN_STDC.
4 * c-decl.cc (names_builtin_p): Likewise.
5
b9fd8399
GA
62023-11-14 Jakub Jelinek <jakub@redhat.com>
7
8 PR c/111309
9 * c-typeck.cc (convert_arguments): Don't promote first argument
10 of BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G.
11
122023-11-10 Martin Uecker <uecker@tugraz.at>
13
14 * c-typeck.cc (struct comptypes_data): Add anon_field flag.
15 (comptypes, comptypes_check_unum_int,
16 comptypes_check_different_types): Remove old cache.
17 (tagged_tu_types_compatible_p): Rewrite.
18
192023-11-09 Florian Weimer <fweimer@redhat.com>
20
21 * c-typeck.cc (c_finish_return): Use pedwarn with
22 OPT_Wreturn_mismatch for missing/extra return expressions.
23
c48f1056
GA
242023-11-07 Kwok Cheung Yeung <kcy@codesourcery.com>
25
26 * c-decl.cc (c_decl_attributes): Add attribute for indirect
27 functions.
28 * c-lang.h (c_omp_declare_target_attr): Add indirect field.
29 * c-parser.cc (c_parser_omp_clause_name): Handle indirect clause.
30 (c_parser_omp_clause_indirect): New.
31 (c_parser_omp_all_clauses): Handle indirect clause.
32 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
33 (c_parser_omp_declare_target): Handle indirect clause. Emit error
34 message if device_type or indirect clauses used alone. Emit error
35 if indirect clause used with device_type that is not 'any'.
36 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Add indirect clause to mask.
37 (c_parser_omp_begin): Handle indirect clause.
38 * c-typeck.cc (c_finish_omp_clauses): Handle indirect clause.
39
402023-11-07 Joseph Myers <joseph@codesourcery.com>
41
42 * c-decl.cc: Use flag_isoc23 instead of flag_isoc2x and c23_auto_p
43 instead of c2x_auto_p. Refer to C23 instead of C2X in diagnostics
44 and comments.
45 * c-errors.cc: Use flag_isoc23 instead of flag_isoc2x and
46 warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23
47 instead of C2X in comments.
48 * c-parser.cc: Use flag_isoc23 instead of flag_isoc2x,
49 warn_c11_c23_compat instead of warn_c11_c2x_compat, c23_auto_p
50 instead of c2x_auto_p and D_C23 instead of D_C2X. Refer to C23
51 instead of C2X in diagnostics and comments.
52 * c-tree.h: Refer to C23 instead of C2X in comments.
53 (struct c_declspecs): Rename c2x_auto_p to c23_auto_p.
54 * c-typeck.cc: Use flag_isoc23 instead of flag_isoc2x and
55 warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23
56 instead of C2X in diagnostics and comments.
57
2cca6ae6
GA
582023-11-06 Joseph Myers <joseph@codesourcery.com>
59
60 PR c/107954
61 * c-errors.cc (pedwarn_c11): Use OPT_Wc11_c23_compat instead of
62 OPT_Wc11_c2x_compat.
63 * c-typeck.cc (build_conditional_expr, convert_for_assignment):
64 Use OPT_Wc11_c23_compat instead of OPT_Wc11_c2x_compat.
65
eb4e1b62
GA
662023-11-04 Jakub Jelinek <jakub@redhat.com>
67
68 * c-parser.h (c_maybe_parse_omp_decl): Declare.
69 * c-parser.cc (struct c_parser): Add in_omp_decl_attribute member.
70 (c_parser_std_attribute): Uncoment omp::decl handling.
71 (c_parser_omp_var_list_parens): If parser->in_omp_decl_attribute
72 don't expect any arguments, instead create clause or TREE_LIST for
73 that decl.
74 (c_maybe_parse_omp_decl): New function.
75 (c_parser_omp_declare_target): If parser->in_omp_decl_attribute and
76 first token isn't name or comma invoke c_parser_omp_var_list_parens.
77 * c-decl.cc (c_decl_attributes): Uncomment omp::decl handling and
78 use *node rather than non-existing *decl.
79
802023-11-04 Jakub Jelinek <jakub@redhat.com>
81
82 * c-tree.def: New file.
83 * c-tree.h (struct c_tree_token_vec): Forward declare.
84 (c_tree_size): Declare.
85 * c-lang.h (struct c_omp_declare_target_attr): Add attr_syntax member.
86 (struct c_omp_begin_assumes_data): New type.
87 (current_omp_begin_assumes): Change type from int to
88 vec<c_omp_begin_assumes_data, va_gc> *.
89 * c-lang.cc: Include c-family/c-pragma.h and c-parser.h.
90 * c-parser.h (struct c_tree_token_vec_struct): New type.
91 (C_TOKEN_VEC_TOKENS): New macro.
92 * c-parser.cc (struct c_parser): Add omp_attrs_forbidden_p and
93 in_omp_attribute_pragma members.
94 (c_parser_skip_until_found): Handle CPP_PRAGMA_EOL when
95 parser->in_omp_attribute_pragma.
96 (c_parser_skip_to_pragma_eol): Likewise.
97 (c_parser_translation_unit): Adjust for current_omp_begin_assumes
98 being a vector rather than counter.
99 (c_parser_declaration_or_fndef): Handle omp::directive and
100 omp::sequence attributes on attribute declaration and declare simd
101 or declare variant directives in those on function declarations.
102 (c_parser_check_balanced_raw_token_sequence): Forward declare.
103 (c_parser_omp_directive_args, c_parser_omp_sequence_args): New
104 functions.
105 (c_parser_std_attribute): Handle omp::directive and omp::sequence
106 attributes.
107 (struct c_omp_attribute_data): New type.
108 (c_parser_handle_statement_omp_attributes,
109 c_parser_handle_directive_omp_attributes): New functions.
110 (c_parser_compound_statement_nostart): Handle omp::directive and
111 omp::sequence attributes on statements. Formatting fix.
112 (c_parser_all_labels): Handle omp::directive and omp::sequence
113 attributes on statements.
114 (c_parser_statement): Clear parser->omp_attrs_forbidden_p.
115 (c_parser_omp_variable_list): Handle parser->tokens
116 != &parser->tokens_buf[0] by saving/restoring it.
117 (c_parser_omp_structured_block): Set parser->omp_attrs_forbidden_p.
118 (c_parser_omp_section_scan): New function.
119 (c_parser_omp_structured_block_sequence, c_parser_omp_sections_scope):
120 Use it.
121 (c_parser_omp_parallel): Set parser->omp_attrs_forbidden_p.
122 (c_parser_omp_task): Likewise.
123 (c_parser_omp_declare_simd): Handle function declaration after
124 std attributes.
125 (c_finish_omp_declare_simd): Don't assert all kinds are the same.
126 (c_parser_omp_declare_target): Also push attr_syntax flag.
127 (c_parser_omp_begin): Likewise. Adjust for current_omp_begin_assumes
128 type change.
129 (c_parser_omp_end): Adjust for current_omp_begin_assumes type
130 change. Diagnose mixing of attribute vs. pragma syntax on end assumes
131 or end declare target.
132 (c_parser_omp_declare_reduction): Handle parser->tokens
133 != &parser->tokens_buf[0] by saving/restoring it.
134 * c-decl.cc: Include c-parser.h.
135 (current_omp_begin_assumes): Change type from int to
136 vec<c_omp_begin_assumes_data, va_gc> *.
137 (struct c_tree_token_vec): New type. Add static assertions
138 for sizeof and offsetof.
139 (union lang_tree_node): Add c_token_vec member and adjust GTY
140 desc for it.
141 (c_tree_size): New function.
142 (c_decl_attributes): Diagnose invalid omp::directive attribute
143 uses.
144 * c-objc-common.h (LANG_HOOKS_TREE_SIZE): Redefine.
145
9daed0b5
GA
1462023-11-02 Martin Uecker <uecker@tugraz.at>
147
148 PR c/112347
149 * c-typeck.cc (convert_for_assignment): Add missing check.
150
c73d2d49
GA
1512023-11-01 Martin Uecker <uecker@tugraz.at>
152
153 PR c/71219
154 * c-typeck.cc (convert_for_assignment): Add warning.
155
ecca503b
GA
1562023-10-26 liuhongt <hongtao.liu@intel.com>
157
158 * c-typeck.cc (build_vec_cmp): Pass type of arg0 to
159 truth_type_for.
160
f75fc1f0
GA
1612023-10-25 Thomas Schwinge <thomas@codesourcery.com>
162
163 * c-parser.cc (c_parser_omp_clause_name): Return
164 'PRAGMA_OACC_CLAUSE_SELF' for "self".
165 (c_parser_oacc_data_clause, OACC_UPDATE_CLAUSE_MASK): Adjust.
166 (c_parser_oacc_all_clauses): Remove 'bool compute_p' formal
167 parameter, and instead locally determine whether we're called for
168 an OpenACC compute construct or OpenACC 'update' directive.
169 (c_parser_oacc_compute): Adjust.
170
1712023-10-25 Chung-Lin Tang <cltang@codesourcery.com>
172
173 * c-parser.cc (c_parser_oacc_compute_clause_self): New function.
174 (c_parser_oacc_all_clauses): Add new 'bool compute_p = false'
175 parameter, add parsing of self clause when compute_p is true.
176 (OACC_KERNELS_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_SELF.
177 (OACC_PARALLEL_CLAUSE_MASK): Likewise,
178 (OACC_SERIAL_CLAUSE_MASK): Likewise.
179 (c_parser_oacc_compute): Adjust call to c_parser_oacc_all_clauses to
180 set compute_p argument to true.
181 * c-typeck.cc (c_finish_omp_clauses): Add OMP_CLAUSE_SELF case.
182
6f684dd2
GA
1832023-10-20 Florian Weimer <fweimer@redhat.com>
184
185 PR c/109827
186 PR other/44209
187 * c-typeck.cc (build_conditional_expr): Use OPT_Wint_conversion
188 for pointer/integer mismatch warnings.
189
1902023-10-20 Florian Weimer <fweimer@redhat.com>
191
192 PR c/109826
193 PR other/44209
194 * c-typeck.cc (build_conditional_expr): Use
195 OPT_Wincompatible_pointer_types for pointer mismatches.
196 Emit location information for the operand.
197
c85f7481
GA
1982023-10-19 Andrew Pinski <pinskia@gmail.com>
199
200 PR c/100532
201 * c-typeck.cc (convert_argument): After erroring out
202 about an incomplete type return error_mark_node.
203
2042023-10-19 Andrew Pinski <pinskia@gmail.com>
205
206 PR c/104822
207 * c-typeck.cc (convert_for_assignment): Check for null pointer
208 before warning about an incompatible scalar storage order.
209
0308461d
GA
2102023-10-18 Andrew Pinski <pinskia@gmail.com>
211
212 PR c/101364
213 * c-decl.cc (diagnose_arglist_conflict): Test for
214 error mark before calling of c_type_promotes_to.
215
2162023-10-18 Andrew Pinski <pinskia@gmail.com>
217
218 PR c/101285
219 * c-typeck.cc (c_safe_arg_type_equiv_p): Return true for error
220 operands early.
221
fb69acff
GA
2222023-10-17 Martin Uecker <uecker@tugraz.at>
223
224 PR c/111708
225 * c-decl.cc (grokdeclarator): Add error.
226
96557ee6
GA
2272023-10-03 David Malcolm <dmalcolm@redhat.com>
228
229 * c-objc-common.cc (c_tree_printer): Update for "m_" prefixes to
230 text_info fields.
231
125781fb
GA
2322023-09-30 Eugene Rozenfeld <erozen@microsoft.com>
233
234 * Make-lang.in: Make create_fdas_for_cc1 target not .PHONY
235
4907d220
GA
2362023-09-20 Jakub Jelinek <jakub@redhat.com>
237
238 * c-parser.cc (c_parser_postfix_expression_after_primary): Parse
239 __builtin_classify_type call with typename as argument.
240
590a8bec
GA
2412023-09-19 Richard Biener <rguenther@suse.de>
242
243 PR c/111468
244 * gimple-parser.cc (c_parser_gimple_binary_expression): Handle __LTGT.
245
2462023-09-19 Richard Biener <rguenther@suse.de>
247
248 PR c/111468
249 * gimple-parser.cc (c_parser_gimple_binary_expression): Add
250 return type argument.
251 (c_parser_gimple_statement): Adjust.
252 (c_parser_gimple_paren_condition): Likewise.
253 (c_parser_gimple_binary_expression): Use passed in return type,
254 add support for - as POINTER_DIFF_EXPR, __UN{LT,LE,GT,GE,EQ},
255 __UNORDERED and __ORDERED.
256
a1c20158
GA
2572023-09-12 Tobias Burnus <tobias@codesourcery.com>
258
259 * c-parser.cc (struct c_omp_loc_tree): New.
260 (c_check_omp_allocate_allocator_r): New; checking moved from ...
261 (c_parser_omp_allocate): ... here. Call it via walk_tree. Avoid
262 ICE with tree_to_shwi for invalid too-large value.
263
2642023-09-12 Tobias Burnus <tobias@codesourcery.com>
265
266 * c-parser.cc (c_parser_omp_construct): Move call to
267 c_parser_omp_allocate to ...
268 (c_parser_pragma): ... here.
269 (c_parser_omp_allocate): Avoid ICE is allocator could not be
270 parsed; set 'omp allocate' attribute for stack/automatic variables
271 and only reject static variables; add several additional
272 restriction checks.
273 * c-tree.h (c_mark_decl_jump_unsafe_in_current_scope): New prototype.
274 * c-decl.cc (decl_jump_unsafe): Return true for omp-allocated decls.
275 (c_mark_decl_jump_unsafe_in_current_scope): New.
276 (warn_about_goto, c_check_switch_jump_warnings): Add error for
277 omp-allocated decls.
278
2792023-09-12 Martin Uecker <uecker@tugraz.at>
280
281 * c-typeck.cc (struct comptypes_data): Add structure.
282 (tagged_types_tu_compatible_p,
283 function_types_compatible_p, type_lists_compatible_p,
284 comptypes_internal): Add structure to interface, change
285 return type to bool, and adapt calls.
286 (comptarget_types): Change return type too bool.
287 (comptypes, comptypes_check_enum_int,
288 comptypes_check_different_types): Adapt calls.
289
a134b6ce
GA
2902023-09-06 Jakub Jelinek <jakub@redhat.com>
291
292 PR c/102989
293 * c-decl.cc (finish_declspecs): Emit pedwarn_c11 on _BitInt.
294 * c-typeck.cc (c_common_type): Emit sorry for common type between
295 _Complex integer and larger _BitInt and return the _Complex integer.
296
2972023-09-06 Jakub Jelinek <jakub@redhat.com>
298
299 PR c/102989
300 * c-convert.cc (c_convert): Handle BITINT_TYPE like INTEGER_TYPE.
301 * c-decl.cc (check_bitfield_type_and_width): Allow BITINT_TYPE
302 bit-fields.
303 (finish_struct): Prefer to use BITINT_TYPE for BITINT_TYPE bit-fields
304 if possible.
305 (declspecs_add_type): Formatting fixes. Handle cts_bitint. Adjust
306 for added union in *specs. Handle RID_BITINT.
307 (finish_declspecs): Handle cts_bitint. Adjust for added union
308 in *specs.
309 * c-parser.cc (c_keyword_starts_typename, c_token_starts_declspecs,
310 c_parser_declspecs, c_parser_gnu_attribute_any_word): Handle
311 RID_BITINT.
312 (c_parser_omp_clause_schedule): Handle BITINT_TYPE like INTEGER_TYPE.
313 * c-tree.h (enum c_typespec_keyword): Mention _BitInt in comment.
314 Add cts_bitint enumerator.
315 (struct c_declspecs): Move int_n_idx and floatn_nx_idx into a union
316 and add bitint_prec there as well.
317 * c-typeck.cc (c_common_type, comptypes_internal):
318 Handle BITINT_TYPE.
319 (perform_integral_promotions): Promote BITINT_TYPE bit-fields to
320 their declared type.
321 (build_array_ref, build_unary_op, build_conditional_expr,
322 build_c_cast, convert_for_assignment, digest_init, build_binary_op):
323 Handle BITINT_TYPE.
324 * c-fold.cc (c_fully_fold_internal): Handle BITINT_TYPE like
325 INTEGER_TYPE.
326 * c-aux-info.cc (gen_type): Handle BITINT_TYPE.
327
3282023-09-06 Jakub Jelinek <jakub@redhat.com>
329
330 * c-decl.cc (declspecs_add_type): Use pedwarn_c11 rather than pedwarn
331 for _FloatN{,x} diagnostics and append " before C2X" to the diagnostic
332 text.
333
4388bc82
GA
3342023-09-05 Tobias Burnus <tobias@codesourcery.com>
335
336 * c-parser.cc (c_parser_omp_clause_allocate): Handle
337 error_mark_node.
338
b8863640
GA
3392023-08-25 Sandra Loosemore <sandra@codesourcery.com>
340
341 * c-parser.cc (struct c_parser): Add omp_for_parse_state field.
342 (struct omp_for_parse_data): New.
343 (check_omp_intervening_code): New.
344 (add_structured_block_stmt): New.
345 (c_parser_compound_statement_nostart): Recognize intervening code,
346 nested loops, and other things that need special handling in
347 OpenMP loop constructs.
348 (c_parser_while_statement): Error on loop in intervening code.
349 (c_parser_do_statement): Likewise.
350 (c_parser_for_statement): Likewise.
351 (c_parser_postfix_expression_after_primary): Error on calls to
352 the OpenMP runtime in intervening code.
353 (c_parser_pragma): Error on OpenMP pragmas in intervening code.
354 (c_parser_omp_loop_nest): New.
355 (c_parser_omp_for_loop): Rewrite to use recursive descent, calling
356 c_parser_omp_loop_nest to do the heavy lifting.
357
6d47c9b4
GA
3582023-08-24 Richard Sandiford <richard.sandiford@arm.com>
359
360 * c-parser.cc (c_parser_std_attribute): Conditionally allow
361 two colons to be used in place of ::.
362 (c_parser_std_attribute_list): New function, split out from...
363 (c_parser_std_attribute_specifier): ...here. Allow the attribute-list
364 to start with __extension__. When it does, also allow two colons
365 to be used in place of ::.
366
6cd85273
GA
3672023-08-22 Tobias Burnus <tobias@codesourcery.com>
368
369 * c-parser.cc (c_parser_omp_clause_defaultmap): Parse
370 'all' as category.
371
1eb2433f
GA
3722023-08-17 Jose E. Marchesi <jose.marchesi@oracle.com>
373
374 PR c/106537
375 * c-typeck.cc (build_binary_op): Warning on comparing distinct
376 pointer types only when -Wcompare-distinct-pointer-types.
377
b01e96f8
GA
3782023-08-15 Chung-Lin Tang <cltang@codesourcery.com>
379 Thomas Schwinge <thomas@codesourcery.com>
380
381 * c-parser.cc (OACC_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
382
886afed6
GA
3832023-08-11 Jakub Jelinek <jakub@redhat.com>
384
385 * c-parser.cc (c_parser_typeof_specifier): Handle
386 __typeof_unqual and __typeof_unqual__ as !is_std.
387
3882023-08-11 Martin Uecker <uecker@tugraz.at>
389
390 PR c/84510
391 * c-typeck.cc (build_c_cast): Add warning.
392
87b0749c
GA
3932023-08-05 Martin Uecker <uecker@tugraz.at>
394
395 * c-parser.cc (c_parser_generic_selection): Inhibit evaluation
396 warnings branches that are known not be taken during parsing.
397
5b42ee2c
GA
3982023-08-04 Tamar Christina <tamar.christina@arm.com>
399
400 * c-parser.cc (c_parser_while_statement, c_parser_do_statement,
401 c_parser_for_statement, c_parser_statement_after_labels,
402 c_parse_pragma_novector, c_parser_pragma): Wire through novector and
403 default to false.
404
4297a08e
GA
4052023-08-02 Eric Feng <ef2648@columbia.edu>
406
407 PR analyzer/107646
408 * c-parser.cc: New functions on stashing values for the
409 analyzer.
410
cf58b896
GA
4112023-08-01 Lewis Hyatt <lhyatt@gmail.com>
412
413 * c-parser.cc (pragma_lex_discard_to_eol): New function.
414 (c_init_preprocess): New function.
415
a2f31d79
GA
4162023-07-31 Hamza Mahfooz <someguy@effective-light.com>
417
418 PR c/65213
419 * c-decl.cc (start_decl): Handle
420 -Wmissing-variable-declarations.
421
4222023-07-31 Chung-Lin Tang <cltang@codesourcery.com>
423
424 * c-parser.cc (c_parser_oacc_host_data): Add checking requiring OpenACC
425 host_data construct to have an use_device clause.
426
14bfda60
GA
4272023-06-29 Qing Zhao <qing.zhao@oracle.com>
428
429 PR c/77650
430 * c-decl.cc (finish_struct): Issue warnings for new option.
431
4322023-06-29 Qing Zhao <qing.zhao@oracle.com>
433
434 * c-decl.cc (finish_struct): Set TYPE_INCLUDES_FLEXARRAY for
435 struct/union type.
436
4372023-06-29 Richard Biener <rguenther@suse.de>
438
439 PR c/110454
440 * c-typeck.cc (convert_argument): Sink formal_prec compute
441 to where TYPE_PRECISION is valid to use.
442
4432023-06-29 Eugene Rozenfeld <erozen@microsoft.com>
444
445 * Make-lang.in: Pass correct stage cc1 when processing
446 profile data collected while building target libraries
447
f10a4ce0
GA
4482023-06-16 David Malcolm <dmalcolm@redhat.com>
449
450 PR c/107583
451 * c-parser.cc (c_parser_declspecs): Add hints to "unknown type
452 name" error.
453
9d250bdb
GA
4542023-06-12 Tobias Burnus <tobias@codesourcery.com>
455
456 * c-parser.cc (c_parser_omp_clause_map): Reword error message for
457 clearness especially with 'omp target (enter/exit) data.'
458
4f0d4825
GA
4592023-06-06 Kwok Cheung Yeung <kcy@codesourcery.com>
460 Tobias Burnus <tobias@codesourcery.com>
461
462 * c-parser.cc (c_parser_omp_clause_defaultmap,
463 c_parser_omp_clause_map): Parse 'present'.
464 (c_parser_omp_clause_to, c_parser_omp_clause_from): Remove.
465 (c_parser_omp_clause_from_to): New; parse to/from clauses with
466 optional present modifer.
467 (c_parser_omp_all_clauses): Update call.
468 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
469 c_parser_omp_target_exit_data): Handle new map enum values
470 for 'present' mapping.
471
df2762ac
GA
4722023-05-30 Tobias Burnus <tobias@codesourcery.com>
473
474 PR c/109999
475 * c-parser.cc (c_parser_oacc_all_clauses,
476 c_parser_omp_all_clauses): Improve error wording.
477
03c7c418
GA
4782023-05-23 Martin Uecker <uecker@tugraz.at>
479
480 PR c/109450
481 * c-decl.cc (add_decl_expr): New function.
482 (grokdeclarator): Add decl expr for size expression in
483 types pointed to by parameters declared as arrays.
484
4852023-05-23 Martin Uecker <uecker@tugraz.at>
486
487 PR c/70418
488 PR c/106465
489 PR c/107557
490 PR c/108423
491 * c-decl.cc (start_decl): Make sure size expression are
492 evaluated only in correct context.
493 (grokdeclarator): Size expression in fields may need a bind
494 expression, make sure DECL_EXPR is always created.
495 (grokfield, declspecs_add_type): Pass along size expressions.
496 (finish_struct): Remove unneeded DECL_EXPR.
497 (start_function): Evaluate size expressions for nested functions.
498 * c-parser.cc (c_parser_struct_declarations,
499 c_parser_struct_or_union_specifier): Pass along size expressions.
500 (c_parser_declaration_or_fndef): Evaluate size expression.
501 (c_parser_objc_at_property_declaration,
502 c_parser_objc_class_instance_variables): Adapt.
503 * c-tree.h (grokfield): Adapt declaration.
504
5df01f89
GA
5052023-05-19 Martin Uecker <uecker@tugraz.at>
506
507 * c-decl.cc (set_type_context): Remove.
508 (pop_scope, diagnose_mismatched_decls, pushdecl):
509 Remove dead code.
510 * c-typeck.cc (comptypes_internal): Remove dead code.
511 (same_translation_unit_p): Remove.
512 (tagged_types_tu_compatible_p): Some fixes.
513
5142023-05-19 Joseph Myers <joseph@codesourcery.com>
515
516 * c-decl.cc (diagnose_mismatched_decls): Do not handle
517 thread-local declarations as tentative definitions for C2x.
518 (finish_decl): Do not allow thread-local definition with
519 incomplete type for C2x.
520
b2776076
GA
5212023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
522
523 * c-convert.cc (c_convert): Ditto.
524 * c-decl.cc (merge_decls): Ditto.
525 * c-parser.cc (c_parser_omp_clause_reduction): Ditto.
526 (c_parser_omp_declare_reduction): Ditto.
527 * c-typeck.cc (build_component_ref): Ditto.
528 (convert_argument): Ditto.
529 (pointer_diff): Ditto.
530 (build_unary_op): Ditto.
531 (build_c_cast): Ditto.
532 (build_modify_expr): Ditto.
533 (store_init_value): Ditto.
534 (constexpr_init_fits_real_type): Ditto.
535 (check_constexpr_init): Ditto.
536 (c_finish_return): Ditto.
537 (handle_omp_array_sections_1): Ditto.
538 (c_finish_omp_clauses): Ditto.
539 * gimple-parser.cc (c_finish_gimple_return): Ditto.
540
0d566057
GA
5412023-05-16 Joseph Myers <joseph@codesourcery.com>
542
543 * c-decl.cc (check_for_loop_decls): Use pedwarn_c11 for
544 diagnostics.
545
3427b51b
GA
5462023-05-15 Joseph Myers <joseph@codesourcery.com>
547
548 * c-decl.cc (grokdeclarator): Ignore _Atomic on function return
549 type for C2x.
550
4d68c7f7
GA
5512023-04-30 Andrew Pinski <apinski@marvell.com>
552
553 * c-typeck.cc (process_init_element): Print out array type
554 for excessive elements.
555
5562023-04-30 Andrew Pinski <apinski@marvell.com>
557
558 PR c/107926
559 * c-typeck.cc (process_init_element): Move the check
560 for string cst until after the error message.
561
50205195
GA
5622023-04-28 Eugene Rozenfeld <erozen@microsoft.com>
563
564 * Make-lang.in: Merge perf data collected when compiling cc1 and runtime libraries
565
32a98ccd
GA
5662023-04-27 Jakub Jelinek <jakub@redhat.com>
567
568 PR c/109409
569 * c-parser.cc (c_parser_initializer): Move diagnostics about
570 initialization of variable sized object with non-empty initializer
571 after c_parser_expr_no_commas call and ret.set_error (); after it.
572
5732023-04-27 Jakub Jelinek <jakub@redhat.com>
574
575 PR c/107682
576 PR c/109412
577 * c-typeck.cc (pop_init_level): If constructor_type is FUNCTION_TYPE,
578 reject empty initializer as invalid.
579
4a3dbcbd
GA
5802023-04-26 Richard Biener <rguenther@suse.de>
581
582 * gimple-parser.cc (c_parser_parse_gimple_body): Avoid
583 last_stmt.
584
49cea02d
GA
5852023-04-25 Tobias Burnus <tobias@codesourcery.com>
586
587 * c-parser.cc (c_parser_omp_scan_loop_body): Handle
588 zero exec statements before/after 'omp scan'.
589
ce4e4f37
GA
5902023-04-20 Jakub Jelinek <jakub@redhat.com>
591
592 PR c/107041
593 * c-decl.cc (diagnose_mismatched_decls): Avoid -Wenum-int-mismatch
594 warning on acc_on_device declaration.
595
579cdc1e
GA
5962023-03-28 David Malcolm <dmalcolm@redhat.com>
597
598 PR c/107002
599 * c-typeck.cc (parser_build_binary_op): Update for new param of
600 check_for_xor_used_as_pow.
601
c8065441
GA
6022023-03-10 Jakub Jelinek <jakub@redhat.com>
603
604 PR c/108079
605 * c-decl.cc (pop_scope): Suppress OPT_Wunused_variable warning
606 after diagnosing it.
607
6f9e2f14
GA
6082023-02-28 Jakub Jelinek <jakub@redhat.com>
609
610 PR sanitizer/108894
611 * c-decl.cc (strict_flex_array_level_of): Move to c-common.cc
612 and rename to c_strict_flex_array_level_of.
613 (is_flexible_array_member_p): Adjust caller.
614
0263e9d5
GA
6152023-02-18 Martin Uecker <uecker@tugraz.at>
616
617 PR c/108375
618 * c-decl.cc (decl_jump_unsafe): Use c_type_variably_modified_p.
619 (diagnose_mismatched_decl): Dito.
620 (warn_about_goto): Dito:
621 (c_check_switch_jump_warnings): Dito.
622 (finish_decl): Dito.
623 (finish_struct): Dito.
624 (grokdeclarator): Set C_TYPE_VARIABLY_MODIFIED.
625 (finish_struct): Set C_TYPE_VARIABLY_MODIFIED.
626 * c-objc-common.cc (c_var_mod_p): New function.
627 (c_var_unspec_p): Remove.
628 * c-objc-common.h: Set lang hook.
629 * c-parser.cc (c_parser_declararion_or_fndef): Use c_type_variably_modified_p.
630 (c_parser_typeof_specifier): Dito.
631 (c_parser_has_attribute_expression): Dito.
632 (c_parser_generic_selection): Dito.
633 * c-tree.h: Define C_TYPE_VARIABLY_MODIFIED and define c_var_mode_p.
634 * c-typeck.cc: Remove c_vla_mod_p and use C_TYPE_VARIABLY_MODIFIED.
635
88cc4495
GA
6362023-02-16 Patrick Palka <ppalka@redhat.com>
637
638 * c-parser.h: Mechanically drop static from static inline
639 functions via s/^static inline/inline/g.
640
d7a47ed1
GA
6412023-02-10 Joseph Myers <joseph@codesourcery.com>
642
643 * c-convert.cc (c_convert): Allow conversion of a null pointer
644 constant to nullptr_t.
645 * c-typeck.cc (null_pointer_constant_p): Remove static.
646 (convert_for_assignment): Allow conversion of a null pointer
647 constant to nullptr_t.
648 (digest_init): Handle NULLPTR_TYPE among scalar conversions.
649 * c-tree.h (null_pointer_constant_p): Declare.
650
e92e2c96
GA
6512023-02-09 Tobias Burnus <tobias@codesourcery.com>
652
653 * c-parser.cc (c_parser_omp_allocate): Parse align
654 clause and check for restrictions.
655
f6fc79d0
GA
6562023-02-08 Joseph Myers <joseph@codesourcery.com>
657
658 * c-typeck.cc (check_constexpr_init): Remove argument
659 null_pointer_constant. Only check pointer initializers for being
660 null.
661 (digest_init): Update calls to check_constexpr_init.
662
a37a0cb3
GA
6632023-02-02 Joseph Myers <joseph@codesourcery.com>
664
665 * c-typeck.cc (build_binary_op): Allow comparisons between
666 pointers and nullptr_t values that are not null pointer constants.
667
6682023-02-02 Joseph Myers <joseph@codesourcery.com>
669
670 * c-typeck.cc: Include "realmpfr.h".
671 (constexpr_init_fits_real_type): Do not allow signaling NaN
672 conversions to different types with the same mode. Handle
673 conversions from binary to decimal types.
674 (check_constexpr_init): Do not disallow real initializers for
675 complex types. Do not disallow binary initializers for decimal
676 floating types.
677
317525b0
GA
6782023-01-31 Marek Polacek <polacek@redhat.com>
679
680 PR c++/107593
681 PR c++/108597
682 * c-objc-common.cc (instantiation_dependent_expression_p): New.
683
338eb0f0
GA
6842023-01-27 Joseph Myers <joseph@codesourcery.com>
685
686 * c-parser.cc (c_parser_declaration_or_fndef): Do not allow braces
687 around auto initializer.
688
f457a62e
GA
6892023-01-16 Jakub Jelinek <jakub@redhat.com>
690
691 PR c++/105593
692 * c-parser.cc (c_parser_initializer): Check warning_enabled_at
693 at the DECL_SOURCE_LOCATION (decl) for OPT_Winit_self instead
694 of warn_init_self.
695
5013c3bb
GA
6962023-01-14 Jakub Jelinek <jakub@redhat.com>
697
698 PR c++/108365
699 * c-typeck.cc (build_binary_op): Use may_shorten_divmod for integral
700 division or modulo.
701
7022023-01-13 Qing Zhao <qing.zhao@oracle.com>
703
704 * c-decl.cc (strict_flex_array_level_of): ... here.
705
81ed98bc
GA
7062023-01-11 Jakub Jelinek <jakub@redhat.com>
707
708 PR c/105972
709 * c-parser.cc (c_parser_declaration_or_fndef): Disable debug non-bind
710 markers for K&R function parameter declarations of nested functions.
711
84723aca
GA
7122023-01-09 Joseph Myers <joseph@codesourcery.com>
713
714 * c-decl.cc (build_compound_literal): Call record_inline_static.
715
d808db1f
GA
7162023-01-06 Joseph Myers <joseph@codesourcery.com>
717
718 * c-parser.cc (c_parser_postfix_expression): Handle integer
719 generic arguments to functions passed to __builtin_tgmath as
720 _Float32x if any argument has _FloatNx or _Complex _FloatNx type.
721 Do not handle integer arguments to some narrowing functions as
722 _Float64.
723
d2ef2327
GA
7242022-12-19 Jakub Jelinek <jakub@redhat.com>
725
726 PR c/108043
727 * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose
728 compound literals with function type.
729
4bc2d9f6
GA
7302022-12-07 Joseph Myers <joseph@codesourcery.com>
731
732 * c-decl.cc (declspecs_add_type, declspecs_add_scspec): Check for
733 auto, constexpr and a type used together.
734
3fe66f7f
GA
7352022-12-06 Qing Zhao <qing.zhao@oracle.com>
736
737 * c-decl.cc (is_flexible_array_member_p): Call new function
738 strict_flex_array_level_of.
739
9a1b4f1d
GA
7402022-11-24 Florian Weimer <fweimer@redhat.com>
741
742 PR c/107805
743 * c-decl.cc (declspecs_add_type): Propagate error_mark_bode
744 from type to specs.
745
add89840
GA
7462022-11-17 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
747
748 * c-decl.cc (start_function): Set the result decl source
749 location to the location of the typespec.
750
7512022-11-17 David Malcolm <dmalcolm@redhat.com>
752
753 PR analyzer/107711
754 * c-parser.cc (ana::c_translation_unit::consider_macro): Pass NULL
755 to cpp_create_reader, rather than ident_hash, so that the new
756 reader gets its own hash table.
757
cdc34229
GA
7582022-11-15 David Malcolm <dmalcolm@redhat.com>
759
760 PR analyzer/106302
761 * c-parser.cc: Include "analyzer/analyzer-language.h" and "toplev.h".
762 (class ana::c_translation_unit): New.
763 (c_parser_translation_unit): Call ana::on_finish_translation_unit.
764
30d77d49
GA
7652022-11-12 Joseph Myers <joseph@codesourcery.com>
766
767 * c-decl.cc (start_underspecified_init)
768 (finish_underspecified_init): Handle name == NULL_TREE for
769 compound literals.
770 (merge_decls): Merge C_DECL_DECLARED_CONSTEXPR.
771 (shadow_tag_warned): Check for constexpr.
772 (start_decl): Add parameter do_push.
773 (build_compound_literal): Set C_DECL_DECLARED_CONSTEXPR.
774 (grokdeclarator): Handle constexpr.
775 (finish_struct): Set C_TYPE_FIELDS_NON_CONSTEXPR.
776 (declspecs_add_scspec): Handle constexpr.
777 * c-parser.cc (c_token_starts_compound_literal)
778 (c_token_starts_declspecs, c_parser_declaration_or_fndef)
779 (c_parser_declspecs, c_parser_gnu_attribute_any_word)
780 (c_parser_compound_literal_scspecs)
781 (c_parser_postfix_expression_after_paren_type): Handle constexpr.
782 Update calls to start_init.
783 (c_parser_declaration_or_fndef, c_parser_initializer)
784 (c_parser_initval): Pass true for new argument of
785 convert_lvalue_to_rvalue. Call convert_lvalue_to_rvalue for
786 constexpr compound literals.
787 (c_parser_static_assert_declaration_no_semi)
788 (c_parser_enum_specifier, c_parser_struct_declaration)
789 (c_parser_alignas_specifier, c_parser_initelt, c_parser_label):
790 Call convert_lvalue_to_rvalue on expressions required to be
791 integer constant expressions.
792 (c_parser_omp_declare_reduction): Update call to start_init.
793 * c-tree.h (C_TYPE_FIELDS_NON_CONSTEXPR)
794 (C_DECL_DECLARED_CONSTEXPR): New macros.
795 (struct c_declspecs): Add constexpr_p.
796 (start_decl, convert_lvalue_to_rvalue, start_init): Update
797 prototypes.
798 * c-typeck.cc (require_constant_value, require_constant_elements):
799 Change to bool.
800 (require_constexpr_value, maybe_get_constexpr_init)
801 (constexpr_init_fits_real_type, check_constexpr_init): New.
802 (convert_lvalue_to_rvalue): Add new parameter for_init. Call
803 maybe_get_constexpr_init.
804 (store_init_value): Update call to digest_init.
805 (digest_init): Add parameters int_const_expr, arith_const_expr and
806 require_constexpr. Check constexpr initializers.
807 (constructor_top_level): Remove.
808 (struct initializer_stack): Remove top_level. Add
809 require_constexpr_value.
810 (start_init): Remove parameter top_level. Add parameters
811 init_require_constant and init_require_constexpr. Save
812 require_constexpr_value on stack.
813 (pop_init_level): Use a null pointer constant for zero initializer
814 of pointer initialized with {}.
815 (output_init_element): Update call to digest_init. Avoid passing
816 null pointer constants of pointer type through digest_init a
817 second time when initializing a constexpr object.
818
d29260ce
GA
8192022-11-03 Joseph Myers <joseph@codesourcery.com>
820
821 * c-decl.cc (in_underspecified_init, start_underspecified_init)
822 (finish_underspecified_init): New.
823 (shadow_tag_warned, parser_xref_tag, start_struct, start_enum):
824 Give errors inside initializers of underspecified declarations.
825 (grokdeclarator): Handle (erroneous) case of C2X auto on a
826 parameter.
827 (declspecs_add_type): Handle c2x_auto_p case.
828 (declspecs_add_scspec): Handle auto possibly setting c2x_auto_p in
829 C2X mode.
830 (finish_declspecs): Handle c2x_auto_p.
831 * c-parser.cc (c_parser_declaration_or_fndef): Handle C2X auto.
832 * c-tree.h (C_DECL_UNDERSPECIFIED): New macro.
833 (struct c_declspecs): Add c2x_auto_p.
834 (start_underspecified_init, finish_underspecified_init): New
835 prototypes.
836 * c-typeck.cc (build_external_ref): Give error for underspecified
837 declaration referenced in its initializer.
838
3055829a
GA
8392022-10-28 Joseph Myers <joseph@codesourcery.com>
840
841 * c-decl.cc (grokdeclarator): Pass
842 arg_info->no_named_args_stdarg_p to build_function_type.
843 (grokparms): Check arg_info->no_named_args_stdarg_p before
844 converting () to (void).
845 (build_arg_info): Initialize no_named_args_stdarg_p.
846 (get_parm_info): Set no_named_args_stdarg_p.
847 (start_function): Pass TYPE_NO_NAMED_ARGS_STDARG_P to
848 build_function_type.
849 (store_parm_decls): Count (...) functions as prototyped.
850 * c-parser.cc (c_parser_direct_declarator): Allow '...' after open
851 parenthesis to start parameter list.
852 (c_parser_parms_list_declarator): Always allow '...' with no
853 arguments, call pedwarn_c11 and set no_named_args_stdarg_p.
854 * c-tree.h (struct c_arg_info): Add field no_named_args_stdarg_p.
855 * c-typeck.cc (composite_type): Handle
856 TYPE_NO_NAMED_ARGS_STDARG_P.
857 (function_types_compatible_p): Compare
858 TYPE_NO_NAMED_ARGS_STDARG_P.
859
8602022-10-28 Jakub Jelinek <jakub@redhat.com>
861
862 * c-parser.cc (c_parser_omp_all_clauses): Allow optional
863 comma before the first clause.
864 (c_parser_omp_allocate, c_parser_omp_atomic, c_parser_omp_depobj,
865 c_parser_omp_flush, c_parser_omp_scan_loop_body,
866 c_parser_omp_ordered, c_finish_omp_declare_variant,
867 c_parser_omp_declare_target, c_parser_omp_declare_reduction,
868 c_parser_omp_requires, c_parser_omp_error,
869 c_parser_omp_assumption_clauses): Likewise.
870
8712022-10-28 Joseph Myers <joseph@codesourcery.com>
872
873 PR c/61469
874 * c-convert.cc (c_convert): Handle enums with underlying boolean
875 type like bool.
876 * c-decl.cc (shadow_tag_warned): Allow shadowing declarations for
877 enums with enum type specifier, but give errors for storage class
878 specifiers, qualifiers or alignment specifiers in non-definition
879 declarations of such enums.
880 (grokdeclarator): Give error for non-definition use of type
881 specifier with an enum type specifier.
882 (parser_xref_tag): Add argument has_enum_type_specifier. Pass it
883 to lookup_tag and use it to set ENUM_FIXED_UNDERLYING_TYPE_P.
884 (xref_tag): Update call to parser_xref_tag.
885 (start_enum): Add argument fixed_underlying_type. Complete enum
886 type with a fixed underlying type given in the definition. Give
887 error for defining without a fixed underlying type in the
888 definition if one was given in a prior declaration. Do not mark
889 enums with fixed underlying type as packed for -fshort-enums.
890 Store the enum type in the_enum.
891 (finish_enum): Do not adjust types of values or check their range
892 for an enum with a fixed underlying type. Set underlying type of
893 enum and variants.
894 (build_enumerator): Check enumeration constants for enum with
895 fixed underlying type against that type and convert to that type.
896 Increment in the underlying integer type, with handling for bool.
897 (c_simulate_enum_decl): Update call to start_enum.
898 (declspecs_add_type): Set specs->enum_type_specifier_ref_p.
899 * c-objc-common.cc (c_get_alias_set): Use ENUM_UNDERLYING_TYPE
900 rather than recomputing an underlying type based on size.
901 * c-parser.cc (c_parser_declspecs)
902 (c_parser_struct_or_union_specifier, c_parser_typeof_specifier):
903 Set has_enum_type_specifier for type specifiers.
904 (c_parser_enum_specifier): Handle enum type specifiers.
905 (c_parser_struct_or_union_specifier): Update call to
906 parser_xref_tag.
907 (c_parser_omp_atomic): Check for boolean increment or decrement
908 using C_BOOLEAN_TYPE_P.
909 * c-tree.h (C_BOOLEAN_TYPE_P): New.
910 (struct c_typespec): Add has_enum_type_specifier.
911 (struct c_declspecs): Add enum_type_specifier_ref_p.
912 (struct c_enum_contents): Add enum_type.
913 (start_enum, parser_xref_tag): Update prototypes.
914 * c-typeck.cc (composite_type): Allow for enumerated types
915 compatible with bool.
916 (common_type, comptypes_internal, perform_integral_promotions):
917 Use ENUM_UNDERLYING_TYPE.
918 (parser_build_binary_op, build_unary_op, convert_for_assignment)
919 (c_finish_return, c_start_switch, build_binary_op): Check for
920 boolean types using C_BOOLEAN_TYPE_P.
921
4e939ae1
GA
9222022-10-24 Jakub Jelinek <jakub@redhat.com>
923
924 PR c++/107358
925 * c-typeck.cc (build_binary_op): Pass operands before excess precision
926 promotions to scalar_to_vector call.
927
9282022-10-24 Arsen Arsenović <arsen@aarsen.me>
929
930 * c-decl.cc (finish_function): Ignore hosted when deciding
931 whether to implicitly return zero, but check noreturn.
932 * c-objc-common.cc (c_missing_noreturn_ok_p): Loosen the
933 requirements to just MAIN_NAME_P when hosted, or `int main'
934 otherwise.
935
47a6ae56
GA
9362022-10-20 Richard Biener <rguenther@suse.de>
937
938 PR c/107305
939 PR c/107306
940 * gimple-parser.cc (c_parser_parse_gimple_body): Verify
941 the parsed IL and zap the body on error.
942
21de009f
GA
9432022-10-18 Joseph Myers <joseph@codesourcery.com>
944
945 PR c/107164
946 * c-decl.cc (shadow_tag_warned): If pedantic, diagnose "enum tag;"
947 with previous declaration visible.
948
9492022-10-18 Joseph Myers <joseph@codesourcery.com>
950
951 PR c/36113
952 * c-decl.cc (finish_enum): If any enumerators do not fit in int,
953 convert all to the type of the enumeration. pedwarn if no integer
954 type fits all enumerators and default to
955 widest_integer_literal_type_node in that case. Otherwise pedwarn
956 for type wider than intmax_t.
957 (build_enumerator): pedwarn for enumerators outside the range of
958 uintmax_t or intmax_t, and otherwise use pedwarn_c11 for
959 enumerators outside the range of int. On overflow, attempt to
960 find a wider type that can hold the value of the next enumerator.
961 Do not convert value to type determined with
962 c_common_type_for_size.
963
baeec7cc
GA
9642022-10-14 Jakub Jelinek <jakub@redhat.com>
965
966 * c-typeck.cc (convert_arguments): Don't promote __bf16 to
967 double.
968
9692022-10-14 Joseph Myers <joseph@codesourcery.com>
970
971 * c-decl.cc (build_compound_literal): Add parameter scspecs.
972 Handle storage class specifiers.
973 * c-parser.cc (c_token_starts_compound_literal)
974 (c_parser_compound_literal_scspecs): New.
975 (c_parser_postfix_expression_after_paren_type): Add parameter
976 scspecs. Call pedwarn_c11 for use of storage class specifiers.
977 Update call to build_compound_literal.
978 (c_parser_cast_expression, c_parser_sizeof_expression)
979 (c_parser_alignof_expression): Handle storage class specifiers for
980 compound literals. Update calls to
981 c_parser_postfix_expression_after_paren_type.
982 (c_parser_postfix_expression): Update syntax comment.
983 * c-tree.h (build_compound_literal): Update prototype.
984 * c-typeck.cc (c_mark_addressable): Diagnose taking address of
985 register compound literal.
986
9ff6c33e
GA
9872022-10-07 Qing Zhao <qing.zhao@oracle.com>
988
989 * c-decl.cc (flexible_array_member_type_p): New function.
990 (one_element_array_type_p): Likewise.
991 (zero_length_array_type_p): Likewise.
992 (add_flexible_array_elts_to_size): Call new utility
993 routine flexible_array_member_type_p.
994 (is_flexible_array_member_p): New function.
995 (finish_struct): Set the new DECL_NOT_FLEXARRAY flag.
996
629d04d3
GA
9972022-10-06 Joseph Myers <joseph@codesourcery.com>
998
999 * c-parser.cc (c_parse_init): Add D_EXT11 to mask if flag_no_asm
1000 and not C2x.
1001 (c_keyword_starts_typename, c_token_starts_declspecs)
1002 (c_parser_declspecs, c_parser_objc_selector): Handle
1003 RID_TYPEOF_UNQUAL.
1004 (c_parser_typeof_specifier): Handle RID_TYPEOF_UNQUAL.
1005 Distinguish typeof for C2x from __typeof__ for all standard
1006 versions and typeof before C2x.
1007 * c-typeck.cc (build_function_call_vec): Use unqualified version
1008 of non-void return type.
1009 (build_unary_op): Use unqualified type for increment and
1010 decrement.
1011
10122022-10-06 Jakub Jelinek <jakub@redhat.com>
1013
1014 * c-parser.cc (c_parser_omp_assumption_clauses): Emit IFN_ASSUME
1015 call for holds clause on assume construct.
1016
10172022-10-06 Jakub Jelinek <jakub@redhat.com>
1018
1019 PR c++/106654
1020 * c-parser.cc (handle_assume_attribute): New function.
1021 (c_parser_declaration_or_fndef): Handle assume attribute.
1022 (c_parser_attribute_arguments): Add assume_attr argument,
1023 if true, parse first argument as conditional expression.
1024 (c_parser_gnu_attribute, c_parser_std_attribute): Adjust
1025 c_parser_attribute_arguments callers.
1026 (c_parser_statement_after_labels) <case RID_ATTRIBUTE>: Handle
1027 assume attribute.
1028
85872a69
GA
10292022-10-04 Jakub Jelinek <jakub@redhat.com>
1030
1031 * c-lang.h (struct c_omp_declare_target_attr): New type.
1032 (current_omp_declare_target_attribute): Change type from
1033 int to vec<c_omp_declare_target_attr, va_gc> *.
1034 * c-parser.cc (c_parser_translation_unit): Adjust for that change.
1035 If last pushed directive was begin declare target, use different
1036 wording and simplify format strings for easier translations.
1037 (c_parser_omp_clause_device_type): Uncomment
1038 check_no_duplicate_clause call.
1039 (c_parser_omp_declare_target): Adjust for the
1040 current_omp_declare_target_attribute type change, push { -1 }.
1041 Use error_at rather than warning_at for declare target with
1042 only device_type clauses.
1043 (OMP_BEGIN_DECLARE_TARGET_CLAUSE_MASK): Define.
1044 (c_parser_omp_begin): Add begin declare target support.
1045 (c_parser_omp_end): Adjust for the
1046 current_omp_declare_target_attribute type change, adjust
1047 diagnostics wording and simplify format strings for easier
1048 translations.
1049 * c-decl.cc (current_omp_declare_target_attribute): Change type from
1050 int to vec<c_omp_declare_target_attr, va_gc> *.
1051 (c_decl_attributes): Adjust for the
1052 current_omp_declare_target_attribute type change. If device_type
1053 was present on begin declare target, add "omp declare target host"
1054 and/or "omp declare target nohost" attributes.
1055
bbdcdf5c
GA
10562022-09-29 Joseph Myers <joseph@codesourcery.com>
1057
1058 * c-decl.cc (handle_std_noreturn_attribute): New function.
1059 (std_attribute_table): Add _Noreturn and noreturn.
1060
1f16a020
GA
10612022-09-27 Jakub Jelinek <jakub@redhat.com>
1062
1063 * c-lang.h (current_omp_begin_assumes): Declare.
1064 * c-parser.cc: Include bitmap.h.
1065 (c_parser_omp_end_declare_target): Rename to ...
1066 (c_parser_omp_end): ... this. Handle also end assumes.
1067 (c_parser_omp_begin, c_parser_omp_assumption_clauses,
1068 c_parser_omp_assumes, c_parser_omp_assume): New functions.
1069 (c_parser_translation_unit): Also diagnose #pragma omp begin assumes
1070 without corresponding #pragma omp end assumes.
1071 (c_parser_pragma): Use %s in may only be used at file scope
1072 diagnostics to decrease number of translatable messages. Handle
1073 PRAGMA_OMP_BEGIN and PRAGMA_OMP_ASSUMES. Handle PRAGMA_OMP_END
1074 rather than PRAGMA_OMP_END_DECLARE_TARGET and call c_parser_omp_end
1075 for it rather than c_parser_omp_end_declare_target.
1076 (c_parser_omp_construct): Handle PRAGMA_OMP_ASSUME.
1077 * c-decl.cc (current_omp_begin_assumes): Define.
1078
28a61ecd
GA
10792022-09-24 Jakub Jelinek <jakub@redhat.com>
1080
1081 PR c/106981
1082 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
1083 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
1084 t2 have different types.
1085
279c6715
GA
10862022-09-22 David Malcolm <dmalcolm@redhat.com>
1087
1088 PR c/106830
1089 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
1090 (c_parser_cast_expression): Likewise.
1091 (c_parser_alignof_expression): Likewise.
1092 (c_parser_postfix_expression_after_paren_type): Likewise.
1093 (c_parser_postfix_expression_after_primary): Likewise.
1094 (c_parser_expression): Likewise.
1095 (c_parser_omp_variable_list): Likewise.
1096 (c_parser_transaction_expression): Likewise.
1097 * c-tree.h (c_expr::set_error): Likewise.
1098 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
1099 (parser_build_unary_op): Likewise.
1100 (parser_build_binary_op): Likewise.
1101 (digest_init): Likewise.
1102 (pop_init_level): Likewise.
1103 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
1104
43be56c4
GA
11052022-09-19 Marek Polacek <polacek@redhat.com>
1106
1107 PR c/106947
1108 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
1109 notes.
1110
d0fc05e8
GA
11112022-09-15 Richard Biener <rguenther@suse.de>
1112
1113 * c-decl.cc (build_void_list_node): Remove.
1114
ff822367
GA
11152022-09-14 Julian Brown <julian@codesourcery.com>
1116
1117 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
1118 on error.
1119
fe2a8ce9
GA
11202022-09-07 Joseph Myers <joseph@codesourcery.com>
1121
1122 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
1123 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
1124 for C2x spellings of keywords.
1125 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
1126
25aeb922
GA
11272022-09-06 Jakub Jelinek <jakub@redhat.com>
1128
1129 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
1130 in omp_cur_iteration - 1 has integer_type_node type.
1131
83f2f228
GA
11322022-09-03 Jakub Jelinek <jakub@redhat.com>
1133
1134 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
1135 (c_parser_omp_clause_depend_sink): Renamed to ...
1136 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
1137 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
1138 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
1139 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
1140 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
1141 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
1142 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
1143 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
1144 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
1145 (c_parser_omp_clause_doacross): New function.
1146 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
1147 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
1148 OMP_CLAUSE_DEPEND_SOURCE.
1149 (c_parser_omp_for_loop): Don't diagnose here linear clause together
1150 with ordered with argument.
1151 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
1152 for simd.
1153 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
1154 (c_parser_omp_ordered): Handle also doacross and adjust for it
1155 diagnostic wording.
1156 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
1157 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
1158
c64b0947
GA
11592022-09-02 David Malcolm <dmalcolm@redhat.com>
1160
1161 PR c/90885
1162 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
1163 (c_parser_expr_no_commas): Likewise.
1164 (c_parser_conditional_expression): Likewise.
1165 (c_parser_binary_expression): Clear m_decimal when popping the
1166 stack.
1167 (c_parser_unary_expression): Clear ret.m_decimal.
1168 (c_parser_has_attribute_expression): Likewise for result.
1169 (c_parser_predefined_identifier): Likewise for expr.
1170 (c_parser_postfix_expression): Likewise for expr.
1171 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
1172 token.
1173 * c-tree.h (c_expr::m_decimal): New bitfield.
1174 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
1175 (parser_build_binary_op): Call check_for_xor_used_as_pow.
1176
bb0a1556
GA
11772022-09-01 Joseph Myers <joseph@codesourcery.com>
1178
1179 * c-decl.cc (grokparms): Handle () in a function declaration the
1180 same as (void) for C2X.
1181
542c60c4
GA
11822022-08-31 Joseph Myers <joseph@codesourcery.com>
1183
1184 * c-parser.cc (c_parser_label): Pass attributes to do_case.
1185 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
1186 c_add_case_label.
1187
16f542d6
GA
11882022-08-26 Jakub Jelinek <jakub@redhat.com>
1189
1190 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
1191
5d4389dc
GA
11922022-08-25 Marek Polacek <polacek@redhat.com>
1193
1194 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
1195 Give a better diagnostic when converting to nullptr_t.
1196 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
1197 initialization.
1198 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
1199 (c_parser_postfix_expression): Handle RID_NULLPTR.
1200 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
1201 nullptr_node.
1202 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
1203 (build_conditional_expr): Handle the case when the second/third operand
1204 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
1205 (convert_for_assignment): Handle converting an expression of type
1206 nullptr_t to pointer/bool.
1207 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
1208 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
1209
12102022-08-25 Joseph Myers <joseph@codesourcery.com>
1211
1212 * c-decl.cc (start_decl): Do not diagnose initialization of
1213 variable-sized objects here.
1214 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
1215 callers changed.
1216 (c_parser_initializer): Diagnose initialization of variable-sized
1217 objects other than with braced initializer.
1218 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
1219 braces and update diagnostic text. Diagnose initialization of
1220 variable-sized objects with nonempty braces.
1221 * c-typeck.cc (digest_init): Update diagnostic for initialization
1222 of variable-sized objects.
1223 (really_start_incremental_init, set_designator)
1224 (process_init_element): Update comments.
1225 (pop_init_level): Allow scalar empty initializers.
1226
0342f034
GA
12272022-08-17 Tobias Burnus <tobias@codesourcery.com>
1228 Chung-Lin Tang <cltang@codesourcery.com>
1229
1230 PR c++/104493
1231 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
1232 instead of removed langhook.
1233 * c-typeck.cc (c_finish_omp_clauses): Likewise.
1234
5cd525f0
GA
12352022-08-11 Marek Polacek <polacek@redhat.com>
1236
1237 PR middle-end/102633
1238 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
1239 Call suppress_warning.
1240 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
1241 (c_parser_omp_declare_reduction): Pass omp_priv down to
1242 c_parser_initializer.
1243
5f17badb
GA
12442022-08-08 Tom Honermann <tom@honermann.net>
1245
1246 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
1247 of CPP_UTF8STRING when char8_t support is enabled.
1248 * c-typeck.cc (digest_init): Allow initialization of an array
1249 of character type by a string literal with type array of
1250 char8_t.
1251
32510382
GA
12522022-08-01 David Malcolm <dmalcolm@redhat.com>
1253
1254 * c-typeck.cc (build_c_cast): Quote names of address spaces in
1255 diagnostics.
1256 (convert_for_assignment): Add a note to address space mismatch
1257 diagnostics, specifying the expected and actual types.
1258
b53ebbc5
GA
12592022-07-10 Lewis Hyatt <lhyatt@gmail.com>
1260
1261 PR preprocessor/97498
1262 * c-parser.cc (c_parser_pragma): Set input_location to the
1263 location of the pragma, rather than the start of the line.
1264
8467574d
GA
12652022-07-04 Tobias Burnus <tobias@codesourcery.com>
1266 Chung-Lin Tang <cltang@codesourcery.com>
1267 Thomas Schwinge <thomas@codesourcery.com>
1268
1269 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
1270 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
1271 OMP_REQUIRES_TARGET_USED.
1272 (c_parser_omp_requires): Remove sorry.
1273
ed974488
GA
12742022-07-01 Tobias Burnus <tobias@codesourcery.com>
1275
1276 * c-parser.cc (c_parser_omp_target_enter_data,
1277 c_parser_omp_target_exit_data): Accept tofrom
1278 map-type modifier but use 'to' / 'from' internally.
1279
bc7e9f76
GA
12802022-06-16 David Malcolm <dmalcolm@redhat.com>
1281
1282 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
1283 group the warning with any note.
1284 (warn_about_goto): Likewise to group error or warning with note.
1285 Bail out if the warning wasn't emitted, to avoid emitting orphan
1286 notes.
1287 (lookup_label_for_goto): Add auto_diagnostic_group to
1288 group the error with the note.
1289 (check_earlier_gotos): Likewise.
1290 (c_check_switch_jump_warnings): Likewise for any error/warning.
1291 Conditionalize emission of the notes.
1292 (diagnose_uninitialized_cst_member): Likewise for warning,
1293 conditionalizing emission of the note.
1294 (grokdeclarator): Add auto_diagnostic_group to group the "array
1295 type has incomplete element type" error with any note.
1296 (parser_xref_tag): Add auto_diagnostic_group to group warnings
1297 with their notes. Conditionalize emission of notes.
1298 (start_struct): Add auto_diagnostic_group to group the
1299 "redefinition of" errors with any note.
1300 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
1301 (check_for_loop_decls): Likewise for pre-C99 error.
1302
445ba599
GA
13032022-06-07 Jakub Jelinek <jakub@redhat.com>
1304
1305 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
1306 style linear clause modifiers. Set
1307 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
1308 old style modifiers are used.
1309 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
1310 with val modifier on simd or for if the old style modifiers are
1311 used.
1312
b168441c
GA
13132022-06-02 David Malcolm <dmalcolm@redhat.com>
1314
1315 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
1316 (c_get_sarif_source_language): New.
1317 * c-tree.h (c_get_sarif_source_language): New decl.
1318
820ead45
GA
13192022-05-31 Jason Merrill <jason@redhat.com>
1320
1321 * Make-lang.in (c.tags): Look at *.cc.
1322
13232022-05-31 Jakub Jelinek <jakub@redhat.com>
1324
1325 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
1326 clauses.
1327
37b3b5da
GA
13282022-05-28 Jakub Jelinek <jakub@redhat.com>
1329
1330 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
1331 seen first, use "%<to%>" or "%<enter%>" depending on
1332 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
1333 "%<to%> or %<enter%>" wording.
1334
d9176e64
GA
13352022-05-27 Jakub Jelinek <jakub@redhat.com>
1336
1337 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
1338 (c_parser_omp_all_clauses): For to clause on declare target, use
1339 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
1340 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
1341 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
1342 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
1343 OMP_CLAUSE_TO_DECLARE.
1344 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
1345 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
1346 name in diagnostics instead of
1347 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
1348
3dff965c
GA
13492022-05-25 Jakub Jelinek <jakub@redhat.com>
1350
1351 PR c/91134
1352 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
1353 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
1354 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
1355 diagnostic and fixit hint if DATUM has pointer type.
1356 * c-parser.cc (c_parser_postfix_expression,
1357 c_parser_omp_variable_list): Adjust build_component_ref callers.
1358 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
1359 Likewise.
1360
768f49a2
GA
13612022-05-24 Jakub Jelinek <jakub@redhat.com>
1362
1363 PR c/105378
1364 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
1365
1cda629f
GA
13662022-05-18 Marek Polacek <polacek@redhat.com>
1367
1368 PR c/105131
1369 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
1370 mismatches.
1371 * c-tree.h (comptypes_check_enum_int): Declare.
1372 * c-typeck.cc (comptypes): No longer static.
1373
3d9439b1
GA
13742022-05-17 Marek Polacek <polacek@redhat.com>
1375
1376 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
1377 its value.
1378
13792022-05-17 Jakub Jelinek <jakub@redhat.com>
1380
1381 * c-parser.cc (c_parser_omp_clause_depend): Parse
1382 inoutset depend-kind.
1383 (c_parser_omp_depobj): Likewise.
1384
702bd11f
GA
13852022-05-16 Martin Liska <mliska@suse.cz>
1386
1387 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
1388
49ace834
GA
13892022-05-12 Jakub Jelinek <jakub@redhat.com>
1390
1391 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
1392 if flag_openmp.
1393 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
1394 in postfix expressions.
1395 (c_parser_omp_variable_list): Handle omp_all_memory in depend
1396 clause.
1397 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
1398 keyword in depend clause as null_pointer_node, diagnose invalid
1399 uses.
1400
bd022ff9
GA
14012022-05-09 Martin Liska <mliska@suse.cz>
1402
1403 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
1404 macros.
1405 (c_parser_binary_expression): Likewise.
1406
a1947c92
GA
14072022-05-07 Marek Polacek <polacek@redhat.com>
1408
1409 PR c++/101833
1410 PR c++/47634
1411 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
1412
405eda0d
GA
14132022-04-08 Jakub Jelinek <jakub@redhat.com>
1414
1415 PR c/105149
1416 * c-typeck.cc (c_build_va_arg): Reject function types.
1417
a2287813
GA
14182022-03-22 Marek Polacek <polacek@redhat.com>
1419
1420 PR c/82283
1421 PR c/84685
1422 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
1423 (start_init): Set it.
1424 (finish_init): Restore constructor_designated.
1425 (push_init_level): Set constructor_designated to the value of
1426 constructor_designated in the upper constructor_stack.
1427
57eeedda
GA
14282022-03-12 Thomas Schwinge <thomas@codesourcery.com>
1429
1430 PR other/65095
1431 * c-typeck.cc (handle_omp_array_sections_1)
1432 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
1433 instead of 'c_omp_map_clause_name'.
1434
8cc4f9cd
GA
14352022-03-09 Joseph Myers <joseph@codesourcery.com>
1436
1437 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
1438 differently from earlier standards for unprototyped function type
1439 compatibility.
1440
14412022-03-09 Jakub Jelinek <jakub@redhat.com>
1442
1443 PR c/104711
1444 * c-fold.cc (c_fully_fold_internal): Don't emit
1445 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
1446 * c-typeck.cc (build_binary_op): Likewise.
1447
e6533e2e
GA
14482022-03-07 Jakub Jelinek <jakub@redhat.com>
1449
1450 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
1451 literal.
1452
4bf3bac1
GA
14532022-02-23 Richard Biener <rguenther@suse.de>
1454
1455 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
1456 SSA names without definition.
1457 (c_parser_gimple_declaration): Handle pointer typed SSA names.
1458
0bdb0498
GA
14592022-02-17 Jakub Jelinek <jakub@redhat.com>
1460
1461 PR c/104532
1462 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
1463 convert_lvalue_to_rvalue and build_indirect_ref instead of
1464 build_simple_mem_ref.
1465
e8d68f0a
GA
14662022-02-11 Richard Biener <rguenther@suse.de>
1467
1468 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
1469 VEC_COND_EXPRs.
1470
a645583d
GA
14712022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
1472
1473 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
1474 clause.
1475 (c_parser_omp_variable_list): Handle array sections.
1476 (c_parser_omp_clause_has_device_addr): Added.
1477 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
1478 case.
1479 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
1480 OMP_CLAUSE_MASK.
1481 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
1482 (c_finish_omp_clauses): Handle array sections.
1483
3adf509f
GA
14842022-02-09 Jakub Jelinek <jakub@redhat.com>
1485
1486 PR c/104427
1487 * c-parser.cc (c_parser_postfix_expression)
1488 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
1489 instead of build1_loc to build PAREN_EXPR.
1490 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
1491 * c-fold.cc (c_fully_fold_internal): Likewise.
1492
fc829782
GA
14932022-01-17 Martin Liska <mliska@suse.cz>
1494
1495 * Make-lang.in: Rename .c names to .cc.
1496 * c-convert.cc: Likewise.
1497 * c-decl.cc (struct lang_identifier): Likewise.
1498 (pop_scope): Likewise.
1499 (finish_decl): Likewise.
1500 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
1501 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
1502 * c-parser.h (GCC_C_PARSER_H): Likewise.
1503 * c-tree.h (c_keyword_starts_typename): Likewise.
1504 (finish_declspecs): Likewise.
1505 (c_get_alias_set): Likewise.
1506 (enum c_oracle_request): Likewise.
1507 (tag_exists_p): Likewise.
1508 (set_c_expr_source_range): Likewise.
1509 * c-typeck.cc (c_common_type): Likewise.
1510 (c_finish_omp_clauses): Likewise.
1511 * config-lang.in: Likewise.
1512
15132022-01-17 Martin Liska <mliska@suse.cz>
1514
1515 * c-aux-info.c: Moved to...
1516 * c-aux-info.cc: ...here.
1517 * c-convert.c: Moved to...
1518 * c-convert.cc: ...here.
1519 * c-decl.c: Moved to...
1520 * c-decl.cc: ...here.
1521 * c-errors.c: Moved to...
1522 * c-errors.cc: ...here.
1523 * c-fold.c: Moved to...
1524 * c-fold.cc: ...here.
1525 * c-lang.c: Moved to...
1526 * c-lang.cc: ...here.
1527 * c-objc-common.c: Moved to...
1528 * c-objc-common.cc: ...here.
1529 * c-parser.c: Moved to...
1530 * c-parser.cc: ...here.
1531 * c-typeck.c: Moved to...
1532 * c-typeck.cc: ...here.
1533 * gccspec.c: Moved to...
1534 * gccspec.cc: ...here.
1535 * gimple-parser.c: Moved to...
1536 * gimple-parser.cc: ...here.
1537
15382022-01-17 Andrew Stubbs <ams@codesourcery.com>
1539
1540 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
1541
617db51d
GA
15422022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
1543
1544 PR c++/103705
1545 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
1546 outer node for ARRAY_REFs.
1547
62eb5308
GA
15482022-01-01 Jakub Jelinek <jakub@redhat.com>
1549
1550 PR objc/103639
1551 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
1552 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
1553
2554e2da
GA
15542021-12-17 Marek Polacek <polacek@redhat.com>
1555
1556 PR c/103649
1557 * c-decl.c (c_warn_unused_attributes): Don't warn for
1558 attribute_ignored_p.
1559 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
1560 arguments when the attribute is ignored.
1561
9c6586bc
GA
15622021-12-14 Jakub Jelinek <jakub@redhat.com>
1563
1564 PR c/103587
1565 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
1566 consume the pragma and silently skip to the pragma eol.
1567
c8dcf64b
GA
15682021-12-12 Jonathan Wakely <jwakely@redhat.com>
1569
1570 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
1571 * c-parser.c: Likewise.
1572
4b4839e3
GA
15732021-12-09 Jakub Jelinek <jakub@redhat.com>
1574
1575 PR pch/71934
1576 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
1577 to resort_data.new_value.
1578
641ff219
GA
15792021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1580
1581 * c-parser.c (struct omp_dim): New struct type for use inside
1582 c_parser_omp_variable_list.
1583 (c_parser_omp_variable_list): Allow multiple levels of array and
1584 component accesses in array section base-pointer expression.
1585 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
1586 c_parser_omp_var_list_parens.
1587 (c_parser_omp_clause_from): Likewise.
1588 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
1589 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
1590 POINTER_PLUS_EXPR.
1591 (c_finish_omp_clauses): Extend allowed ranged of expressions
1592 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
1593
15942021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
1595
1596 PR middle-end/92120
1597 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
1598 call to c_parser_omp_variable_list to 'true'.
1599 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
1600 array base handling.
1601 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
1602
c177e806
GA
16032021-11-30 Thomas Schwinge <thomas@codesourcery.com>
1604
1605 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
1606 orphan loop" checking.
1607
16082021-11-30 Cesar Philippidis <cesar@codesourcery.com>
1609 Thomas Schwinge <thomas@codesourcery.com>
1610
1611 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
1612 OpenACC gang reductions.
1613
16142021-11-30 Richard Biener <rguenther@suse.de>
1615
1616 * gimple-parser.c (c_parser_gimple_postfix_expression):
1617 avoid unreachable code after break.
1618
87cd82c8
GA
16192021-11-29 Eric Gallager <egallager@gcc.gnu.org>
1620
1621 PR other/103021
1622 * Make-lang.in: Use ETAGS variable in TAGS target.
1623
16242021-11-29 Richard Biener <rguenther@suse.de>
1625
1626 * c-typeck.c (c_tree_equal): Remove unreachable return.
1627 * c-parser.c (get_matching_symbol): Likewise.
1628
e1d43592
GA
16292021-11-23 Jakub Jelinek <jakub@redhat.com>
1630
1631 * c-typeck.c (c_clone_omp_udr): Don't initialize
1632 id.transform_lang_insert_block.
1633
9c077398
GA
16342021-11-19 Martin Sebor <msebor@redhat.com>
1635
1636 PR c++/33925
1637 PR c/102867
1638 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
1639 code resulting from macro expansion.
1640
16412021-11-19 Martin Liska <mliska@suse.cz>
1642
1643 Revert:
1644 2021-11-19 Martin Liska <mliska@suse.cz>
1645
1646 * c-parser.c (add_debug_begin_stmt): Use option directly.
1647
483092d3
GA
16482021-11-18 Matthias Kretz <m.kretz@gsi.de>
1649
1650 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
1651 * c-parser.c (c_parser_postfix_expression): Likewise.
1652
16532021-11-18 Martin Liska <mliska@suse.cz>
1654
1655 * c-parser.c (add_debug_begin_stmt): Use option directly.
1656
280d2838
GA
16572021-11-17 Martin Sebor <msebor@redhat.com>
1658
1659 PR c/101702
1660 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
1661 bounds before deciding if they're constant.
1662
e2b57363
GA
16632021-11-15 Jakub Jelinek <jakub@redhat.com>
1664
1665 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
1666 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
1667
b39265d4
GA
16682021-11-11 Jakub Jelinek <jakub@redhat.com>
1669
1670 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
1671 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
1672 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
1673 OMP_CLAUSE_NUM_TEAMS_EXPR.
1674 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
1675 combined target teams even lower-bound expression.
1676
16772021-11-11 Richard Biener <rguenther@suse.de>
1678
1679 * gimple-parser.c: Shuffle bitmap.h include.
1680
18ae471f
GA
16812021-11-03 Joseph Myers <joseph@codesourcery.com>
1682
1683 PR c/103031
1684 * c-convert.c (c_convert): New function, based on convert.
1685 (convert): Make into wrapper of c_convert.
1686 (convert_init): New function.
1687 * c-typeck.c (enum impl_conv): Add ic_init_const.
1688 (convert_for_assignment): Handle ic_init_const like ic_init. Add
1689 new argument to convert_and_check call.
1690 (digest_init): Pass ic_init_const to convert_for_assignment for
1691 initializers required to be constant.
1692
b4df2dd3
GA
16932021-11-02 Richard Sandiford <richard.sandiford@arm.com>
1694
1695 * c-tree.h (c_simulate_record_decl): Declare.
1696 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
1697 * c-decl.c (c_simulate_record_decl): New function.
1698
c2bd5d8a
GA
16992021-10-22 Eric Gallager <egallager@gcc.gnu.org>
1700
1701 PR other/102663
1702 * Make-lang.in: Add dummy c.install-dvi target.
1703
93d183a5
GA
17042021-10-15 Richard Biener <rguenther@suse.de>
1705
1706 PR c/102763
1707 * gimple-parser.c
1708 (c_parser_gimple_postfix_expression_after_primary): Check
1709 for a pointer do be dereferenced by ->.
1710
5d5885c9
GA
17112021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1712
1713 * c-parser.c (c_finish_omp_declare_variant): Change call from
1714 c_omp_check_context_selector to omp_check_context_selector. Change
1715 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
1716
c9db17b8
GA
17172021-10-09 Jakub Jelinek <jakub@redhat.com>
1718
1719 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
1720 (c_parser_omp_scan_loop_body): Use it.
1721 (c_parser_omp_sections_scope): Likewise.
1722
50e20ee6
GA
17232021-10-07 Richard Biener <rguenther@suse.de>
1724
1725 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
1726
bb6194e0
GA
17272021-10-05 Richard Biener <rguenther@suse.de>
1728
1729 PR c/102605
1730 * gimple-parser.c (c_parser_gimple_postfix_expression):
1731 Accept more address _Literals.
1732
da9c5f78
GA
17332021-10-04 Marek Polacek <polacek@redhat.com>
1734
1735 PR c++/97573
1736 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
1737
9d116bcc
GA
17382021-10-01 Martin Sebor <msebor@redhat.com>
1739
1740 PR c/102103
1741 * c-typeck.c (maybe_warn_for_null_address): New function.
1742 (build_binary_op): Call it.
1743
17442021-10-01 Jakub Jelinek <jakub@redhat.com>
1745 Richard Biener <rguenther@suse.de>
1746
1747 PR sanitizer/102515
1748 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1749 for division even for SANITIZE_SI_OVERFLOW.
1750
17512021-10-01 Jakub Jelinek <jakub@redhat.com>
1752
1753 * c-parser.c (c_parser_omp_clause_order): Set
1754 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
1755
fd133479
GA
17562021-09-28 Andrew Pinski <apinski@marvell.com>
1757
1758 PR c/32122
1759 * c-parser.c (c_parser_statement_after_labels): Pass
1760 the c_expr instead of the tree to c_finish_goto_ptr.
1761 * c-typeck.c (c_finish_goto_ptr): Change the second
1762 argument type to c_expr.
1763 * c-tree.h (c_finish_goto_ptr): Likewise.
1764 Error out if the expression was not of a pointer type.
1765
e4777439
GA
17662021-09-22 Jakub Jelinek <jakub@redhat.com>
1767
1768 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
1769 modifiers.
1770
cf74e7b5
GA
17712021-09-18 Jakub Jelinek <jakub@redhat.com>
1772
1773 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
1774 and reproducible modifiers.
1775 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
1776
17772021-09-18 Jakub Jelinek <jakub@redhat.com>
1778
1779 * c-parser.c (c_parser_omp_clause_default): Handle private and
1780 firstprivate arguments, adjust diagnostics on unknown argument.
1781
0a4cb439
GA
17822021-09-17 Jakub Jelinek <jakub@redhat.com>
1783
1784 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
1785 is true.
1786
a26206ec
GA
17872021-09-10 Jakub Jelinek <jakub@redhat.com>
1788
1789 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
1790 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
1791 don't call build_conditional_expr, instead build a COND_EXPR directly.
1792 (c_parser_binary_expression): Avoid calling parser_build_binary_op
1793 if omp_atomic_lhs even in more cases for >, < or ==.
1794 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
1795 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
1796 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
1797 * c-typeck.c (build_binary_op): For flag_openmp only handle
1798 MIN_EXPR/MAX_EXPR.
1799
b2748138
GA
18002021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1801
1802 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
1803 directive.
1804
e11c6046
GA
18052021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1806
1807 * c-decl.c (enum deprecated_states): Add unavailable state.
1808 (merge_decls): Copy unavailability.
1809 (quals_from_declspecs): Handle unavailable case.
1810 (start_decl): Amend the logic handling suppression of nested
1811 deprecation states to include unavailability.
1812 (smallest_type_quals_location): Amend comment.
1813 (grokdeclarator): Handle the unavailable deprecation state.
1814 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
1815 * c-tree.h (struct c_declspecs): Add unavailable_p.
1816 * c-typeck.c (build_component_ref): Handle unavailability.
1817 (build_external_ref): Likewise.
1818
18192021-09-01 Roger Sayle <roger@nextmovesoftware.com>
1820 Joseph Myers <joseph@codesourcery.com>
1821
1822 PR c/79412
1823 * c-decl.c (duplicate_decls): On significant mismatches, mark the
1824 types of both (non-function) decls as error_mark_node, so that the
1825 middle-end can see the code is malformed.
1826 (free_attr_access_data): Don't process if the type has been set to
1827 error_mark_node.
1828
6d51ee43
GA
18292021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
1830
1831 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
1832 and 'ancestor' in 'target device' clauses.
1833
38b19c5b
GA
18342021-08-23 Jakub Jelinek <jakub@redhat.com>
1835
1836 * c-parser.c (c_parser_omp_clause_num_tasks,
1837 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
1838
5b2876f9
GA
18392021-08-22 Martin Uecker <muecker@gwdg.de>
1840
1841 PR c/98397
1842 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
1843 for pointers to arrays with qualifiers.
1844 (build_conditional_expr): For C23 don't lose qualifiers for pointers
1845 to arrays when the other pointer is a void pointer. Update warnings.
1846 (convert_for_assignment): Update warnings for C2X when converting from
1847 void* with qualifiers to a pointer to array with the same qualifiers.
1848
7c9e1645
GA
18492021-08-20 Jakub Jelinek <jakub@redhat.com>
1850
1851 * c-parser.c (c_parser_omp_error): New function.
1852 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
1853
18542021-08-20 Jakub Jelinek <jakub@redhat.com>
1855
1856 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
1857 comma at the end of list.
1858 (c_parser_omp_requires): Likewise.
1859
b57fba5e
GA
18602021-08-19 Jakub Jelinek <jakub@redhat.com>
1861
1862 * c-parser.c (c_parser_omp_requires): Don't call
1863 c_parser_peek_2nd_token and optionally consume token if current
1864 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
1865
6e529985
GA
18662021-08-18 Jakub Jelinek <jakub@redhat.com>
1867
1868 * c-parser.c (c_parser_omp_nothing): New function.
1869 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
1870
18712021-08-18 Jakub Jelinek <jakub@redhat.com>
1872
1873 * c-parser.c (c_parser_statement_after_labels): Add restart label
1874 near the start of the function. If c_parser_pragma returns false,
1875 goto restart.
1876 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
1877 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
1878 return what c_parser_omp_declare returned. Return true instead of
1879 false after emitting errors that the directive is not allowed in
1880 pragma_stmt context.
1881 (c_parser_omp_ordered): Return true instead of
1882 false after emitting errors that the directive is not allowed in
1883 pragma_stmt context.
1884 (c_parser_omp_target_update): Likewise.
1885 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
1886 Change return type from tree to bool, return false if the
1887 directive should be ignored in pragma_stmt contexts.
1888 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
1889 return their result directly.
1890 (c_parser_omp_cancellation_point): Change return type from void to
1891 bool, return false if the directive should be ignored in pragma_stmt
1892 contexts.
1893 (c_parser_omp_declare): Likewise.
1894
2d14d64b
GA
18952021-08-17 Jakub Jelinek <jakub@redhat.com>
1896
1897 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
1898 (c_parser_omp_scope): New function.
1899 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
1900
72be20e2
GA
19012021-08-12 Jakub Jelinek <jakub@redhat.com>
1902
1903 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
1904 (c_parser_omp_clause_filter): New function.
1905 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
1906 (OMP_MASKED_CLAUSE_MASK): Define.
1907 (c_parser_omp_masked): New function.
1908 (c_parser_omp_parallel): Handle parallel masked.
1909 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
1910 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
1911
19122021-08-12 Martin Uecker <muecker@gwdg.de>
1913
1914 PR c/101838
1915 PR c/29970
1916 * c-typeck.c (c_expr_sizeof_type): Evaluate
1917 size expressions for structs of variable size.
1918
19192021-08-12 Tobias Burnus <tobias@codesourcery.com>
1920
1921 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
1922 'primary' as alias for 'master'.
1923
3ae564ea
GA
19242021-08-10 Martin Uecker <muecker@gwdg.de>
1925
1926 PR c/29970
1927 * c-typeck.c (c_expr_sizeof_expr): Evaluate
1928 size expressions for structs of variable size.
1929
f92f4778
GA
19302021-08-06 Tamar Christina <tamar.christina@arm.com>
1931
1932 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
1933 * c-tree.h (c_simulate_enum_decl): Likewise.
1934
19352021-08-06 Martin Sebor <msebor@redhat.com>
1936
1937 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
1938 vec arguments to by-reference.
1939 (c_finish_omp_declare_simd): Same.
1940 (c_parser_compound_statement_nostart): Same.
1941 (c_parser_for_statement): Same.
1942 (c_parser_objc_methodprotolist): Same.
1943 (c_parser_oacc_routine): Same.
1944 (c_parser_omp_for_loop): Same.
1945 (c_parser_omp_declare_simd): Same.
1946
419c6c68
GA
19472021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1948 Joseph Myers <joseph@codesourcery.com>
1949 Cesar Philippidis <cesar@codesourcery.com>
1950
1951 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
1952 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
1953 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1954 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
1955
92d45509
GA
19562021-07-20 Martin Sebor <msebor@redhat.com>
1957
1958 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
1959 by-const-reference.
1960 * c-typeck.c (c_build_function_call_vec): Same.
1961
d97d71a1
GA
19622021-07-15 Martin Sebor <msebor@redhat.com>
1963
1964 PR c/101289
1965 PR c/97548
1966 * c-decl.c (get_parm_array_spec): Strip nops.
1967
6fba0eea
GA
19682021-07-06 Martin Sebor <msebor@redhat.com>
1969
1970 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
1971
7a60a6e8
GA
19722021-07-02 Jakub Jelinek <jakub@redhat.com>
1973
1974 PR c/101297
1975 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
1976 appears before a CPP_NAME.
1977
90708f87
GA
19782021-06-25 Martin Sebor <msebor@redhat.com>
1979
1980 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
1981 warning_suppressed_p, suppress_warning, and copy_no_warning.
1982 (diagnose_mismatched_decls): Same.
1983 (duplicate_decls): Same.
1984 (grokdeclarator): Same.
1985 (finish_function): Same.
1986 (c_write_global_declarations_1): Same.
1987 * c-fold.c (c_fully_fold_internal): Same.
1988 * c-parser.c (c_parser_expr_no_commas): Same.
1989 (c_parser_postfix_expression): Same.
1990 * c-typeck.c (array_to_pointer_conversion): Same.
1991 (function_to_pointer_conversion): Same.
1992 (default_function_array_conversion): Same.
1993 (convert_lvalue_to_rvalue): Same.
1994 (default_conversion): Same.
1995 (build_indirect_ref): Same.
1996 (build_function_call_vec): Same.
1997 (build_atomic_assign): Same.
1998 (build_unary_op): Same.
1999 (c_finish_return): Same.
2000 (emit_side_effect_warnings): Same.
2001 (c_finish_stmt_expr): Same.
2002 (c_omp_clause_copy_ctor): Same.
2003
9aa8327e
GA
20042021-06-24 Jakub Jelinek <jakub@redhat.com>
2005
2006 PR c/101176
2007 * c-parser.c (c_parser_has_attribute_expression): Set source range for
2008 the result.
2009
20102021-06-24 Jakub Jelinek <jakub@redhat.com>
2011
2012 PR c/101171
2013 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
2014 error_mark_node.
2015
20162021-06-24 Jakub Jelinek <jakub@redhat.com>
2017
2018 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
2019 C_ORT_OMP for clauses on target construct.
2020 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
2021 (c_parser_omp_target): For non-combined target add
2022 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
2023 C_ORT_OMP_TARGET to c_finish_omp_clauses.
2024 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
2025 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
2026 never present on C_ORT_*DECLARE_SIMD.
2027 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
2028 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
2029 corresponding map clauses.
2030
2f080224
GA
20312021-06-21 Jakub Jelinek <jakub@redhat.com>
2032
2033 PR inline-asm/100785
2034 * c-typeck.c (c_mark_addressable): Diagnose trying to make
2035 bit-fields addressable.
2036
ede6c356
GA
20372021-06-15 Robin Dapp <rdapp@linux.ibm.com>
2038
2039 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
2040 similar.
2041
8dc48181
GA
20422021-06-14 Tobias Burnus <tobias@codesourcery.com>
2043
2044 PR c/100913
2045 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
2046 var in the error case.
2047
438aac59
GA
20482021-06-07 Eric Botcazou <ebotcazou@adacore.com>
2049
2050 PR c/100920
2051 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
2052 spot built-in functions.
2053
7d6987e9
GA
20542021-06-06 Jakub Jelinek <jakub@redhat.com>
2055
2056 PR c/100902
2057 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
2058 even when target is combined with other constructs.
2059
20602021-06-06 Eric Botcazou <ebotcazou@adacore.com>
2061
2062 PR c/100920
2063 * c-decl.c (finish_struct): Fix thinko in previous change.
2064 * c-typeck.c (convert_for_assignment): Do not warn on pointer
2065 assignment and initialization for storage order purposes if the
2066 RHS is a call to a DECL_IS_MALLOC function.
2067
600f90cb
GA
20682021-06-04 Martin Sebor <msebor@redhat.com>
2069
2070 PR c/100783
2071 * c-objc-common.c (print_type): Handle erroneous types.
2072
440c8a0a
GA
20732021-06-03 Jakub Jelinek <jakub@redhat.com>
2074
2075 PR c++/100859
2076 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
2077 after depend only cases.
2078
ee682192
GA
20792021-05-31 Richard Biener <rguenther@suse.de>
2080
2081 PR c++/88601
2082 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
2083 * c-parser.c (c_parser_postfix_expression): Likewise.
2084
48166757
GA
20852021-05-28 Richard Biener <rguenther@suse.de>
2086
2087 PR c/100803
2088 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
2089 invalid if conditions.
2090
20912021-05-28 Jakub Jelinek <jakub@redhat.com>
2092
2093 PR middle-end/99928
2094 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
2095 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
2096 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
2097 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
2098 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
2099 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
2100 if present in map_head, map_field_head or map_firstprivate_head
2101 bitmaps.
2102
21032021-05-28 Tobias Burnus <tobias@codesourcery.com>
2104
2105 * c-parser.c (c_parser_omp_clause_affinity): New.
2106 (c_parser_omp_clause_name, c_parser_omp_variable_list,
2107 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
2108 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
2109 c_finish_omp_clauses): Likewise.
2110
01c59ef2
GA
21112021-05-26 Eric Botcazou <ebotcazou@adacore.com>
2112
2113 PR c/100653
2114 * c-decl.c (finish_struct): Warn for a union containing an aggregate
2115 field with a differing scalar storage order.
2116
2832d51b
GA
21172021-05-21 Jakub Jelinek <jakub@redhat.com>
2118
2119 PR middle-end/99928
2120 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
2121 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
2122 if a decl is mentioned both in map clause and in such firstprivate
2123 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
2124
65f32e5d
GA
21252021-05-19 Jakub Jelinek <jakub@redhat.com>
2126
2127 PR middle-end/99928
2128 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
2129 master when combined with taskloop.
2130 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
2131 parallel master when not combined with taskloop.
2132
a8daf9a1
GA
21332021-05-18 Richard Biener <rguenther@suse.de>
2134
2135 PR c/100522
2136 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
2137 Diagnose calls to non-functions.
2138 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
2139
a7ffc1ef
GA
21402021-05-17 Richard Biener <rguenther@suse.de>
2141
2142 PR c/100625
2143 * gimple-parser.c (c_parser_gimple_label): Avoid building
2144 a GIMPLE label with NULL label decl.
2145
f9af11c7
GA
21462021-05-13 Martin Sebor <msebor@redhat.com>
2147
2148 PR c/100550
2149 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
2150
0ff3a0f2
GA
21512021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
2152
2153 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
2154 'close'.
2155
aa891c56
GA
21562021-05-10 Martin Liska <mliska@suse.cz>
2157
2158 * c-aux-info.c (affix_data_type): Use startswith
2159 function instead of strncmp.
2160 * c-typeck.c (build_function_call_vec): Likewise.
2161 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
2162
62d87a32
GA
21632021-05-07 Eric Botcazou <ebotcazou@adacore.com>
2164
2165 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
2166 on the address of a pointer field in a record with reverse SSO.
2167
99e8df7a
GA
21682021-05-04 Tobias Burnus <tobias@codesourcery.com>
2169
2170 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
2171 for || and && reductions.
2172
3c8e539d
GA
21732021-04-29 Joseph Myers <joseph@codesourcery.com>
2174
2175 * c-typeck.c (function_types_compatible_p): For C2X, treat
2176 unprototyped function as compatible with non-variadic prototyped
2177 function even if some argument types are changed by the default
2178 argument promotions.
2179
ee351f7f
GA
21802021-04-15 Martin Sebor <msebor@redhat.com>
2181
2182 PR c/99420
2183 PR c/99972
2184 * c-decl.c (pushdecl): Always propagate type attribute.
2185
21862021-04-15 Richard Sandiford <richard.sandiford@arm.com>
2187
2188 PR c/98852
2189 * c-typeck.c (c_common_type): Do not drop attributes that
2190 affect type identity.
2191
1d54b138
GA
21922021-04-10 Jakub Jelinek <jakub@redhat.com>
2193
2194 PR c/99990
2195 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
2196 error_mark_node.
2197
4493b1c1
GA
21982021-03-25 Jakub Jelinek <jakub@redhat.com>
2199
2200 PR c++/99565
2201 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
2202 to operand_equal_p.
2203
5f256a70
GA
22042021-03-19 Jakub Jelinek <jakub@redhat.com>
2205
2206 PR c/99588
2207 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
2208 with modifycode NOP_EXPR produces and mark the _Atomic var as read
2209 if found.
2210 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
2211 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
2212 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
2213
3c5b6d24
GA
22142021-03-15 Tobias Burnus <tobias@codesourcery.com>
2215
2216 PR c++/99509
2217 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
2218 ensure that the varpool node is marked as offloadable.
2219
ceae9533
GA
22202021-03-05 Tobias Burnus <tobias@codesourcery.com>
2221
2222 PR c/99137
2223 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
2224
4028d01a
GA
22252021-02-24 Martin Sebor <msebor@redhat.com>
2226
2227 PR middle-end/97172
2228 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
2229
bf81237e
GA
22302021-02-18 Jakub Jelinek <jakub@redhat.com>
2231
2232 PR c/99136
2233 * c-typeck.c (c_finish_return): Don't wrap retval into
2234 EXCESS_PRECISION_EXPR in functions that return void.
2235
0c5cdb31
GA
22362021-02-11 Marek Polacek <polacek@redhat.com>
2237
2238 * c-parser.c (c_parser_if_statement): Use vec_free.
2239
a19dd5e6
GA
22402021-02-04 Martin Sebor <msebor@redhat.com>
2241
2242 PR c/97882
2243 * c-decl.c (locate_old_decl): Add type to diagnostic output.
2244 (diagnose_mismatched_decls): Same.
2245 (start_function): Introduce temporaries for better readability.
2246 * c-typeck.c (comptypes_internal): Only consider complete enum
2247 types in comparisons with integers.
2248
f7884fb1
GA
22492021-02-01 Martin Sebor <msebor@redhat.com>
2250
2251 PR middle-end/97172
2252 * c-decl.c (free_attr_access_data): New function.
2253 (c_parse_final_cleanups): Call free_attr_access_data.
2254
59cf67d1
GA
22552021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2256
2257 * c-parser.c (c_parser_omp_clause_detach): New.
2258 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
2259 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
2260 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
2261 clause. Prevent use of detach with mergeable and overriding the
2262 data sharing mode of the event handle.
2263
2f7f0d32
GA
22642021-01-15 Jakub Jelinek <jakub@redhat.com>
2265
2266 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
2267 unqualified element type and then call c_build_qualified_type on the
2268 ARRAY_TYPE.
2269
7d187e4f
GA
22702021-01-07 Richard Biener <rguenther@suse.de>
2271
2272 * gimple-parser.c (c_parser_gimple_compound_statement): Only
2273 reallocate loop array if it is too small.
2274
eefe499f
GA
22752020-12-16 Martin Uecker <muecker@gwdg.de>
2276
2277 PR c/98047
2278 * c-typeck.c (build_modify_expr): Drop qualifiers.
2279
22802020-12-16 Martin Uecker <muecker@gwdg.de>
2281
2282 PR c/98260
2283 * c-parser.c (c_parser_expression): Look into
2284 nop expression when marking expressions as read.
2285
d52945ce
GA
22862020-12-14 Martin Liska <mliska@suse.cz>
2287
2288 PR sanitizer/98204
2289 * c-typeck.c (pointer_diff): Do not emit a top-level
2290 sanitization.
2291 (build_binary_op): Likewise.
2292
ca2bd949
GA
22932020-12-09 Tobias Burnus <tobias@codesourcery.com>
2294
2295 * c-parser.c (c_parser_omp_allocate): New.
2296 (c_parser_omp_construct): Call it.
2297
22982020-12-09 Richard Biener <rguenther@suse.de>
2299
2300 PR c/98200
2301 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
2302 early on error.
2303
bc8a7013
GA
23042020-12-07 Martin Uecker <muecker@gwdg.de>
2305
2306 PR c/97981
2307 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
2308 that drops qualifiers to the end of the function.
2309
d48df6f2
GA
23102020-11-26 Martin Uecker <muecker@gwdg.de>
2311
2312 PR c/65455
2313 PR c/92935
2314 * c-parser.c (c_parser_declaration_or_fndef): Remove
2315 redundant code to drop qualifiers of _Atomic types for __auto_type.
2316 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
2317 types for __typeof__.
2318
1e2c9a27
GA
23192020-11-24 Jakub Jelinek <jakub@redhat.com>
2320
2321 PR c/97958
2322 * c-parser.c (c_parser_binary_expression): For omp atomic binary
2323 expressions, use make_node instead of build2 to avoid checking build2
2324 performs.
2325
8e6198d0
GA
23262020-11-23 Joseph Myers <joseph@codesourcery.com>
2327
2328 PR c/95630
2329 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
2330 for comparisons of complete and incomplete pointers.
2331
7a97e2fc
GA
23322020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2333
2334 * c-aux-info.c (gen_type): Support opaque types.
2335
82e5048e
GA
23362020-11-20 Martin Sebor <msebor@redhat.com>
2337
2338 PR middle-end/97879
2339 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
2340
23412020-11-20 Jakub Jelinek <jakub@redhat.com>
2342
2343 PR other/97911
2344 * Make-lang.in (c.serial): Change from goal to a variable.
2345 (.PHONY): Drop c.serial.
2346
23472020-11-20 Martin Uecker <muecker@gwdg.de>
2348
2349 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
2350
d62586ee
GA
23512020-11-19 Jakub Jelinek <jakub@redhat.com>
2352
2353 PR c/97860
2354 * c-decl.c (get_parm_array_spec): Bail out of nelts is
2355 error_operand_p.
2356
25bb75f8
GA
23572020-11-18 Jakub Jelinek <jakub@redhat.com>
2358
2359 * Make-lang.in (c.serial): New goal.
2360 (.PHONY): Add c.serial c.prev.
2361 (cc1$(exeext)): Call LINK_PROGRESS.
2362
77f67db2
GA
23632020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
2364
2365 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
2366 goto too.
2367 * c-typeck.c (build_asm_expr): Remove an assert checking output
2368 absence for asm goto.
2369
23702020-11-13 Jakub Jelinek <jakub@redhat.com>
2371
2372 * c-typeck.c (c_finish_omp_clauses): Don't clear
2373 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
2374
23752020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2376
2377 PR objc/77404
2378 * c-parser.c (c_parser_objc_class_definition): Pass the
2379 location of the class name to the interface declaration.
2380
bb622641
GA
23812020-11-10 Strager Neds <strager.nds@gmail.com>
2382
2383 * c-decl.c (merge_decls): Use new overload of
2384 set_decl_section_name.
2385
23862020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2387
2388 * c-parser.c (c_parser_omp_target_data): Add use of
2389 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
2390 handled map clause kind.
2391 (c_parser_omp_target_enter_data): Likewise.
2392 (c_parser_omp_target_exit_data): Likewise.
2393 (c_parser_omp_target): Likewise.
2394 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
2395 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
2396 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
2397 same struct field access to co-exist on OpenMP construct.
2398
2da7ee05
GA
23992020-11-07 Martin Uecker <muecker@gwdg.de>
2400
2401 * c-parser.c (c_parser_label): Implement mixing of labels and code.
2402 (c_parser_all_labels): Likewise.
2403
44cab2d8
GA
24042020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2405
2406 * c-parser.c (c_parser_objc_at_property_declaration):
2407 Improve parsing fidelity. Associate better location info
2408 with @property attributes. Clean up the interface to
2409 objc_add_property_declaration ().
2410
24112020-11-06 Nathan Sidwell <nathan@acm.org>
2412
2413 * c-decl.c (diagnose_mismatched_decls): Rename
2414 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2415 (warn_if_shadowing, implicitly_declare, names_builtin_p)
2416 (collect_source_refs): Likewise.
2417 * c-typeck.c (inform_declaration, inform_for_arg)
2418 (convert_for_assignment): Likewise.
2419
24202020-11-06 Tobias Burnus <tobias@codesourcery.com>
2421
2422 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
2423 OpenACC matching.
2424 (c_parser_omp_construct): Update call.
2425
35c125cb
GA
24262020-11-04 Jakub Jelinek <jakub@redhat.com>
2427
2428 PR c++/97670
2429 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
2430 find underlying decl to clear in the aligned_head bitmap.
2431
24322020-11-04 Joseph Myers <joseph@codesourcery.com>
2433
2434 * c-decl.c (handle_nodiscard_attribute): New.
2435 (std_attribute_table): Add nodiscard.
2436 * c-parser.c (c_parser_std_attribute): Expect argument to
2437 nodiscard attribute to be a string. Do not special-case ignoring
2438 nodiscard.
2439 * c-typeck.c (maybe_warn_nodiscard): New.
2440 (build_compound_expr, emit_side_effect_warnings): Call
2441 maybe_warn_nodiscard.
2442 (c_process_expr_stmt, c_finish_stmt_expr): Also call
2443 emit_side_effect_warnings if warn_unused_result.
2444
4f0606fe
GA
24452020-10-29 Asher Gordon <AsDaGo@posteo.net>
2446
2447 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
2448 with XDELETE.
2449 (finish_init): Likewise.
2450 (pop_init_level): Likewise.
2451
e93aae4a
GA
24522020-10-28 Joseph Myers <joseph@codesourcery.com>
2453
2454 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
2455 error_at for omitted parameter name.
2456
24572020-10-28 Jakub Jelinek <jakub@redhat.com>
2458
2459 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
2460 (c_parser_omp_clause_allocate): New function.
2461 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
2462 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2463 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
2464 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
2465 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
2466 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
2467 PRAGMA_OMP_CLAUSE_ALLOCATE.
2468 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
2469
89bb01e7
GA
24702020-10-27 Joseph Myers <joseph@codesourcery.com>
2471
2472 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
2473 standard attributes.
2474
efe71fcc
GA
24752020-10-23 Marek Polacek <polacek@redhat.com>
2476
2477 PR c++/91741
2478 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
2479 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
2480 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
2481 * c-tree.h (char_type_p): Declare.
2482 * c-typeck.c (char_type_p): No longer static.
2483
24842020-10-23 Martin Sebor <msebor@redhat.com>
2485
2486 PR middle-end/97552
2487 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
2488
2fe5b7d1
GA
24892020-09-19 Martin Sebor <msebor@redhat.com>
2490
2491 PR c/50584
2492 * c-decl.c (lookup_last_decl): Define new function.
2493 (c_decl_attributes): Call it.
2494 (start_decl): Add argument and use it.
2495 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
2496 (get_parm_array_spec): Define new function.
2497 (push_parm_decl): Call get_parm_array_spec.
2498 (start_function): Call warn_parm_array_mismatch. Build attribute
2499 access and add it to current function.
2500 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
2501 in forms of array parameters.
2502 * c-tree.h (start_decl): Add argument.
2503
25042020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2505
2506 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
2507 with...
2508 (in_statement): New.
2509 (start_function): Adjust for above change.
2510 (c_push_function_context, c_pop_function_context): Likewise.
2511 * c-lang.h (struct language_function): Likewise.
2512 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
2513 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
2514 New.
2515 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
2516 (c_parser_switch_statement): Adjust break/switch context handling
2517 and calls to renamed functions.
2518 (c_parser_while_statement): Adjust break/switch context handling and
2519 build a WHILE_STMT.
2520 (c_parser_do_statement): Ditto, with DO_STMT respectively.
2521 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
2522 (c_parser_omp_for_loop): Adjust break/switch context handling.
2523 * c-tree.h (c_break_label, c_cont_label): Delete.
2524 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
2525 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
2526 (in_statement, switch_statement_break_seen_p): Declare.
2527 (c_start_case, c_finish_case): Renamed to...
2528 (c_start_switch, c_finish_switch).
2529 (c_finish_bc_stmt): Adjust arguments.
2530 * c-typeck.c (build_function_call_vec): Don't try to print
2531 statements with %qE format.
2532 (struct c_switch): Rename switch_expr field to switch_stmt.
2533 Add break_stmt_seen_p field.
2534 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
2535 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
2536 (do_case): Update for changes to struct c_switch.
2537 (c_finish_case): Rename to c_finish_switch. Update for changes to
2538 struct c_switch and change of representation from SWITCH_EXPR to
2539 SWITCH_STMT.
2540 (c_finish_loop): Delete.
2541 (c_finish_bc_stmt): Update to reflect changes to break/continue
2542 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
2543 of a GOTO_EXPR except for objc foreach loops.
2544
e1a4a8a0
GA
25452020-09-01 Jakub Jelinek <jakub@redhat.com>
2546
2547 PR c++/96867
2548 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
2549 only on PARM_DECLs.
2550
8f7ea26a
GA
25512020-08-28 Martin Sebor <msebor@redhat.com>
2552
2553 PR c/96596
2554 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
2555 argument type.
2556
8b394f01
GA
25572020-08-27 Martin Liska <mliska@suse.cz>
2558
2559 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
2560 growth function to true.
2561
db0f6efe
GA
25622020-08-25 Tobias Burnus <tobias@codesourcery.com>
2563
2564 PR c/96678
2565 * c-typeck.c (handle_omp_array_sections_1): Talk about
2566 array function parameter in the error message.
2567
5c265693
GA
25682020-08-18 Jakub Jelinek <jakub@redhat.com>
2569
2570 PR c/96571
2571 * c-parser.c (c_parser_generic_selection): Change match_found from bool
2572 to int, holding index of the match. Call mark_exp_read on the selector
2573 expression and on expressions other than the selected one.
2574
4967ca2f
GA
25752020-08-01 Richard Sandiford <richard.sandiford@arm.com>
2576
2577 PR c/96377
2578 * c-typeck.c (process_init_element): Split test for whether to
2579 recurse into a record, union or array into...
2580 (initialize_elementwise_p): ...this new function. Don't recurse
2581 into a vector type if the initialization value is also a vector.
2582
48cc2e46
GA
25832020-07-31 Richard Biener <rguenther@suse.de>
2584
2585 PR debug/96383
2586 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
2587 Define to c_common_finalize_early_debug.
2588
3ea9abca
GA
25892020-07-22 Tobias Burnus <tobias@codesourcery.com>
2590
2591 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
2592 (c_parser_omp_critical): Permit hint(0) clause without named critical.
2593 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
2594
30430061
GA
25952020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
2596
2597 PR target/95237
2598 * c-decl.c (finish_decl): Call target hook
2599 lower_local_decl_alignment to lower local decl alignment.
2600
3f8ca9cb
GA
26012020-07-09 Julian Brown <julian@codesourcery.com>
2602 Thomas Schwinge <thomas@codesourcery.com>
2603
2604 PR middle-end/95270
2605 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
2606 for standalone attach/detach clauses.
2607
a82c4c4c 26082020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2609
2610 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
2611 set, warn for conversion between pointers that point to incompatible
2612 scalar storage orders.
2613
f60ee68d
GA
26142020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
2615
2616 * c-parser.c (c_parser_statement_after_labels): Pass correct
2617 parameters to c_parser_do_statement.
2618
56638b9b
GA
26192020-06-16 Jakub Jelinek <jakub@redhat.com>
2620
2621 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
2622 c_in_omp_for.
2623 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
2624 premature c_fully_fold. Defer explicit c_fully_fold calls to after
2625 c_finish_omp_for.
2626 * c-tree.h (c_in_omp_for): Declare.
2627 * c-typeck.c (c_in_omp_for): Define.
2628 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
2629 (digest_init): Likewise.
2630 (build_binary_op): Likewise.
2631
26322020-06-16 Jakub Jelinek <jakub@redhat.com>
2633
2634 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
2635 from kind by comma rather than colon.
2636
1a59f3db
GA
26372020-06-05 Mark Wielaard <mark@klomp.org>
2638
2639 * c-decl.c (implicit_decl_warning): When warned and olddecl is
2640 an undeclared builtin, then add a fixit header hint, if found.
2641 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
2642 warning_at about implicit builtin declaration type mismatch.
2643
9a5b7438
GA
26442020-06-03 Mark Wielaard <mark@klomp.org>
2645
2646 * c-parser.c (struct c_parser): Add seen_string_literal
2647 bitfield.
2648 (c_parser_consume_token): Reset seen_string_literal.
2649 (c_parser_error_richloc): Add name_hint if seen_string_literal
2650 and next token is a CPP_NAME and we have a missing header
2651 suggestion for the name.
2652 (c_parser_string_literal): Set seen_string_literal.
2653
26542020-06-03 Mark Wielaard <mark@klomp.org>
2655
2656 * c-parser.c (c_parser_postfix_expression_after_primary): Add
2657 scope with matching_parens after CPP_OPEN_PAREN.
2658
26592020-06-03 Tobias Burnus <tobias@codesourcery.com>
2660
2661 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
2662
53ffb43a
GA
26632020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
2664
2665 * Make-lang.in: Remove extra slash.
2666
8f66f175
ML
26672020-05-19 Martin Liska <mliska@suse.cz>
2668
2669 * c-parser.c: Fix typo.
2670
49ddde69
JJ
26712020-05-14 Jakub Jelinek <jakub@redhat.com>
2672
2673 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
2674
eb72dc66
RB
26752020-05-07 Richard Biener <rguenther@suse.de>
2676
2677 PR middle-end/94703
2678 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
2679 DECL_GIMPLE_REG_P.
2680
bf915591
JJ
26812020-04-30 Jakub Jelinek <jakub@redhat.com>
2682
2683 PR c/94842
2684 * c-decl.c (set_labels_context_r): In addition to context-less
2685 LABEL_DECLs adjust also LABEL_DECLs with context equal to
2686 parent function if any.
2687 (store_parm_decls): Adjust comment.
2688
e1113ffb
JJ
26892020-04-19 Jakub Jelinek <jakub@redhat.com>
2690
2691 PR objc/94637
2692 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
2693 two CPP_COLON tokens.
2694
2e389749
JJ
26952020-04-17 Jakub Jelinek <jakub@redhat.com>
2696
2697 PR other/94629
2698 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
2699 to data.clauses.
2700
2dc9294c
JJ
27012020-04-15 Jakub Jelinek <jakub@redhat.com>
2702
2703 PR c/94593
2704 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
2705 requires directive when not at file scope.
2706
13e41d8b
TB
27072020-04-08 Tobias Burnus <tobias@codesourcery.com>
2708
2709 PR middle-end/94120
2710 * c-decl.c (c_check_in_current_scope): New function.
2711 * c-tree.h (c_check_in_current_scope): Declare it.
2712 * c-parser.c (c_parser_oacc_declare): Add check that variables
2713 are declared in the same scope as the directive. Fix handling
2714 of namespace vars.
2715
4df50a05
JJ
27162020-04-07 Jakub Jelinek <jakub@redhat.com>
2717
2718 PR c++/94512
2719 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
2720 if c_parser_omp_master succeeded.
2721
5db9e893
JJ
27222020-03-23 Jakub Jelinek <jakub@redhat.com>
2723
2724 PR gcov-profile/94029
2725 PR c/94239
2726 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
2727 the function_start_locus location. Don't do that afterwards for the
2728 __GIMPLE body parsing.
2729
9def91e9
JJ
27302020-03-19 Jakub Jelinek <jakub@redhat.com>
2731
2732 PR gcov-profile/94029
2733 * c-tree.h (finish_function): Add location_t argument defaulted to
2734 input_location.
2735 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
2736 set it to the locus of closing } if non-NULL.
2737 (c_parser_compound_statement_nostart): Return locus of closing }.
2738 (c_parser_parse_rtl_body): Likewise.
2739 (c_parser_declaration_or_fndef): Propagate locus of closing } to
2740 finish_function.
2741 * c-decl.c (finish_function): Add end_loc argument, use it instead of
2742 input_location to set function_end_locus.
2743
046c5890
JJ
27442020-03-17 Jakub Jelinek <jakub@redhat.com>
2745
2746 PR c/94172
2747 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
2748 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
2749 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
2750 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
2751 ENUMERAL_TYPEs.
2752 (finish_incomplete_vars): New function, moved from finish_struct. Use
2753 relayout_decl instead of layout_decl.
2754 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
2755 being TYPE_VFIELD. Use finish_incomplete_vars.
2756 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
2757 finish_incomplete_vars.
2758 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2759 also on ENUMERAL_TYPEs.
2760
c015ff8c
JJ
27612020-03-16 Jakub Jelinek <jakub@redhat.com>
2762
2763 PR c/94179
2764 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
2765
f2e9fe5f
MS
27662020-03-13 Martin Sebor <msebor@redhat.com>
2767
2768 PR c/94040
2769 * c-decl.c (builtin_structptr_type_count): New constant.
2770 (match_builtin_function_types): Reject decls that are incompatible
2771 in types pointed to by pointers.
2772 (diagnose_mismatched_decls): Adjust comments.
2773
c9d70946
JM
27742020-03-05 Joseph Myers <joseph@codesourcery.com>
2775
2776 PR c/93577
2777 * c-typeck.c (pop_init_level): Do not diagnose initializers as
2778 empty when initialized type is error_mark_node.
2779 (set_designator, process_init_element): Ignore initializers for
2780 elements of a variable-size type or of error_mark_node.
2781
726e292d
MS
27822020-03-01 Martin Sebor <msebor@redhat.com>
2783
2784 PR middle-end/93926
2785 * c-decl.c (types_close_enough_to_match): New function.
2786 (match_builtin_function_types):
2787 (diagnose_mismatched_decls): Add missing inform call to a warning.
2788
a499c2f8
MS
27892020-03-01 Martin Sebor <msebor@redhat.com>
2790
2791 PR c/93812
2792 * c-typeck.c (build_functype_attribute_variant): New function.
2793 (composite_type): Call it.
2794
9c3da8cc
JJ
27952020-02-25 Jakub Jelinek <jakub@redhat.com>
2796
2797 PR other/93912
2798 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
2799 Rename last argument from probablity to probability.
2800
bacdd5e9
JJ
28012020-02-13 Jakub Jelinek <jakub@redhat.com>
2802
2803 PR c/93576
2804 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
2805 *expr if it has side effects.
2806
f9eb0973
JL
28072020-01-30 Jeff Law <law@redhat.com>
2808
2809 PR c/88660
2810 * c-parser.c (c_parser_switch_statement): Make sure to request
2811 marking the switch expr as used.
2812
ac68e287
JM
28132020-01-22 Joseph Myers <joseph@codesourcery.com>
2814
2815 PR c/93348
2816 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
2817 argument with integer operands.
2818
852f0ae8
KK
28192020-01-16 Kerem Kat <keremkat@gmail.com>
2820
2821 PR c/92833
2822 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
2823 to support 4 available tokens.
2824
e2346a33
JM
28252020-01-15 Joseph Myers <joseph@codesourcery.com>
2826
2827 PR c/93072
2828 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
2829 determine whether to set DECL_CONTEXT.
2830
3d77686d
JM
28312020-01-13 Joseph Myers <joseph@codesourcery.com>
2832
2833 PR c/93241
2834 * c-typeck.c (build_c_cast): Check for expressions with integer
2835 operands that can occur in an unevaluated part of an integer
2836 constant expression and call note_integer_operands as needed.
2837
f74c4b2c
RB
28382019-01-08 Richard Biener <rguenther@suse.de>
2839
2840 PR middle-end/93199
2841 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
2842 permanently.
2843
8d9254fc
JJ
28442020-01-01 Jakub Jelinek <jakub@redhat.com>
2845
2846 Update copyright years.
2847
39292e25
EB
28482019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2849
2850 * c-decl.c (collect_source_ref_cb): Delete.
2851 (for_each_global_decl): Rename into...
2852 (collect_source_refs): ...this. Call collect_source_ref directly.
2853 (c_parse_final_cleanups): Always call collect_source_ref on the main
2854 input filename.
2855
519d7496
JB
28562019-12-19 Julian Brown <julian@codesourcery.com>
2857 Cesar Philippidis <cesar@codesourcery.com>
2858
2859 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
2860 detach clauses.
2861 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
2862 Allow deref (->) in variable lists if true.
2863 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
2864 Pass to c_parser_omp_variable_list.
2865 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
2866 call to c_parser_omp_variable_list.
2867 (c_parser_oacc_all_clauses): Support attach and detach clauses.
2868 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
2869 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
2870 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
2871 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
2872 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
2873 and detach. Support deref.
2874 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
2875 GOMP_MAP_ALWAYS_POINTER for OpenACC.
2876 (c_oacc_check_attachments): New function.
2877 (c_finish_omp_clauses): Check attach/detach arguments for being
2878 pointers using above. Support deref.
2879
a6163563
JB
28802019-12-19 Julian Brown <julian@codesourcery.com>
2881 Maciej W. Rozycki <macro@codesourcery.com>
2882 Tobias Burnus <tobias@codesourcery.com>
2883 Thomas Schwinge <thomas@codesourcery.com>
2884
2885 * c-parser.c (c_parser_omp_clause_name): Support no_create.
2886 (c_parser_oacc_data_clause): Likewise.
2887 (c_parser_oacc_all_clauses): Likewise.
2888 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2889 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
2890 PRAGMA_OACC_CLAUSE_NO_CREATE.
2891 * c-typeck.c (handle_omp_array_sections): Support
2892 GOMP_MAP_NO_ALLOC.
2893
d68f5d45
DM
28942019-12-09 David Malcolm <dmalcolm@redhat.com>
2895
2896 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2897 Replace label_text ctor calls.
2898
4691bf46
JM
28992019-12-04 Joseph Myers <joseph@codesourcery.com>
2900
2901 PR c/36941
2902 PR c/88827
2903 * c-typeck.c (convert_lvalue_to_rvalue): Call
2904 require_complete_type for arguments not of void types.
2905 (build_indirect_ref): Do not diagnose dereferencing pointers to
2906 incomplete types.
2907 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
2908
85d11957
JM
29092019-12-03 Joseph Myers <joseph@codesourcery.com>
2910
2911 PR c/88704
2912 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
2913 old-style parameter definitions.
2914
4569f8b3
SL
29152019-12-01 Sandra Loosemore <sandra@codesourcery.com>
2916
2917 PR target/92499
2918
2919 * c-decl.c (flexible_array_type_p): Move to common code.
2920
65ef05d0
RS
29212019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2922
2923 * c-decl.c (start_decl): Allow initialization of variables whose
2924 size is a POLY_INT_CST.
2925 (finish_decl): Use verify_type_context to check whether the target
2926 allows variables with a particular type to have static or thread-local
2927 storage duration. Don't raise a second error if such variables do
2928 not have a constant size.
2929 (grokdeclarator): Use verify_type_context to check whether the
2930 target allows fields or array elements to have a particular type.
2931 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
2932 the target allows pointer difference for the types involved.
2933 (build_unary_op): Likewise for pointer increment and decrement.
2934
34b43828
JM
29352019-11-29 Joseph Myers <joseph@codesourcery.com>
2936
2937 * c-parser.c (struct c_parser): Add members raw_tokens and
2938 raw_tokens_used.
2939 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
2940 using previously-lexed raw tokens.
2941 (c_parser_peek_nth_token_raw)
2942 (c_parser_check_balanced_raw_token_sequence): New functions.
2943 (c_parser_nth_token_starts_std_attributes): Use
2944 c_parser_check_balanced_raw_token_sequence for Objective-C.
2945
5b8d9367
JM
29462019-11-25 Joseph Myers <joseph@codesourcery.com>
2947
2948 PR c/91985
2949 * c-decl.c (finish_declspecs): Use int instead of decimal
2950 floating-point types if decimal floating-point not supported.
2951
1723e1be
JM
29522019-11-25 Joseph Myers <joseph@codesourcery.com>
2953
2954 * c-tree.h (struct c_declarator): Use a structure for id member.
2955 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
2956 declarators at the start, not when handling individual declarators
2957 later. Use u.id.id instead of u.id.
2958 (grokfield): Use u.id.id instead of u.id.
2959 (build_id_declarator): Set u.id.id and u.id.attrs.
2960 (finish_declspecs): Handle postfix attributes in case of typedef
2961 name or typeof used.
2962 * c-parser.c (c_parser_direct_declarator)
2963 (c_parser_direct_declarator_inner): Place declarator for
2964 attributes inside that for function or array, not outside. Set
2965 u.id.attrs for identifiers.
2966 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
2967 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
2968 instead of u.id.
2969
bdaf8be1
JJ
29702019-11-22 Jakub Jelinek <jakub@redhat.com>
2971
2972 PR c/90677
2973 * c-decl.c (identifier_global_tag): Define.
2974
3e00ba47
RB
29752019-11-20 Richard Biener <rguenther@suse.de>
2976
2977 PR c/92088
2978 * c-decl.c (grokdeclarator): Prevent inlining of nested
2979 function with VLA arguments.
2980
8c5b727a
JM
29812019-11-20 Joseph Myers <joseph@codesourcery.com>
2982
2983 * c-decl.c (c_warn_type_attributes): New function.
2984 (groktypename, grokdeclarator, finish_declspecs): Call
2985 c_warn_type_attributes before applying attributes to types.
2986 * c-tree.h (c_warn_type_attributes): Declare.
2987
192961ff
JM
29882019-11-19 Joseph Myers <joseph@codesourcery.com>
2989
2990 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
2991 standard attributes.
2992 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
2993 pedwarn for unknown standard attributes and return error_mark_node
2994 for them.
2995
20a38017
MM
29962019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
2997
2998 * c-parser.c (c_parser_parse_rtl_body): Always call
2999 run_rtl_passes, even if startwith pass is not provided.
3000
d5fbe5e0
JM
30012019-11-15 Joseph Myers <joseph@codesourcery.com>
3002
3003 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
3004 duplicate standard attributes.
3005
97cc1187
JM
30062019-11-15 Joseph Myers <joseph@codesourcery.com>
3007
3008 * c-decl.c (std_attribute_table): Add maybe_unused.
3009
f8aea5e3
JM
30102019-11-15 Joseph Myers <joseph@codesourcery.com>
3011
3012 * c-decl.c (std_attribute_table): Add fallthrough.
3013 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
3014 attribute at top level.
3015
2cc94aa8
JM
30162019-11-15 Joseph Myers <joseph@codesourcery.com>
3017
3018 * c-decl.c (std_attribute_table): New.
3019 (c_init_decl_processing): Register attributes from
3020 std_attribute_table.
3021 * c-parser.c (c_parser_attribute_arguments): Add arguments
3022 require_string and allow_empty_args. All callers changed.
3023 (c_parser_std_attribute): Set require_string argument for
3024 "deprecated" attribute.
3025
7c5890cc
JM
30262019-11-14 Joseph Myers <joseph@codesourcery.com>
3027
3028 * c-parser.c (c_parser_postfix_expression)
3029 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
3030 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
3031
e8738f4e
RS
30322019-11-14 Richard Sandiford <richard.sandiford@arm.com>
3033
3034 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
3035 of build_same_sized_truth_vector_type.
3036 (build_vec_cmp): Likewise.
3037
b2417b59
JJ
30382019-11-14 Jakub Jelinek <jakub@redhat.com>
3039
bedb7f04
JJ
3040 * c-parser.c (c_parser_omp_context_selector): Don't require score
3041 argument to fit into shwi, just to be INTEGER_CST. Diagnose
3042 negative score.
3043
b2417b59
JJ
3044 * c-parser.c (c_parser_omp_context_selector): Rename
3045 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
3046 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
3047 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
3048 and string literals.
3049
4e03c3a7
JM
30502019-11-14 Joseph Myers <joseph@codesourcery.com>
3051
3052 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
3053 ctsk_tagfirstref_attrs.
3054 (struct c_declspecs): Update description of attrs. Add
3055 postfix_attrs and non_std_attrs_seen_p. Increase size of
3056 typespec_kind bit-field.
3057 (c_warn_unused_attributes): New declaration.
3058 (parser_xref_tag): Update prototype.
3059 * c-decl.c (c_warn_unused_attributes): New function.
3060 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
3061 ctsk_tagref_attrs. Handle attribute declarations.
3062 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
3063 (grokdeclarator): Handle standard attributes.
3064 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
3065 attributes to incomplete type reference.
3066 (xref_tag): Update call to parser_xref_tag.
3067 (declspecs_add_addrspace, declspecs_add_type)
3068 (declspecs_add_scspec, declspecs_add_attrs): Set
3069 non_std_attrs_seen_p.
3070 (finish_declspecs): Apply postfix standard attributes to type.
3071 * c-parser.c (c_token_starts_declspecs)
3072 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
3073 (c_parser_next_tokens_start_declaration): Update comments.
3074 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
3075 parser->tokens[2] to parser->tokens[1].
3076 (c_parser_nth_token_starts_std_attributes)
3077 (c_parser_std_attribute_specifier_sequence): New functions.
3078 (c_parser_declaration_or_fndef): Add arguments have_attrs and
3079 attrs. All callers changed. Handle standard attributes.
3080 (c_parser_parms_declarator, c_parser_parms_list_declarator)
3081 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
3082 All callers changed.
3083 (c_parser_declspecs): Add arguments start_std_attr_ok and
3084 end_std_attr_ok. All callers changed. Handle standard
3085 attributes.
3086 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3087 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
3088 (c_parser_compound_statement_nostart, c_parser_all_labels)
3089 (c_parser_label, c_parser_statement, c_parser_for_statement):
3090 Handle standard attributes.
3091 * c-parser.h (c_parser_declspecs): Update prototype.
3092 * gimple-parser.c (c_parser_gimple_declaration): Update call to
3093 c_parser_declspecs.
3094
0c29cac4
ML
30952019-11-12 Martin Liska <mliska@suse.cz>
3096
3097 * gimple-parser.c: Do not include params.h.
3098
028d4092
ML
30992019-11-12 Martin Liska <mliska@suse.cz>
3100
3101 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
3102 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
3103 macro.
3104
62aee289
MR
31052019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3106 Frederik Harwath <frederik@codesourcery.com>
3107
3108 gcc/c/
3109 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
3110 (c_parser_oacc_kernels_parallel): Rename function to...
3111 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
3112 (c_parser_omp_construct): Update accordingly.
3113
3114
7cec9588
JJ
31152019-11-11 Jakub Jelinek <jakub@redhat.com>
3116
3117 * c-parser.c (c_parser_translation_unit): Diagnose declare target
3118 without corresponding end declare target.
3119
f486280c
RS
31202019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3121
3122 * c-convert.c (convert): Only handle vector conversions if one of
3123 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
3124 allows it.
3125 * c-typeck.c (build_array_ref): Only allow vector indexing if the
3126 vectors satisfy gnu_vector_type_p.
3127 (build_unary_op): Only allow unary operators to be applied to
3128 vectors if they satisfy gnu_vector_type_p.
3129 (digest_init): Only allow by-element initialization of vectors
3130 if they satisfy gnu_vector_type_p.
3131 (really_start_incremental_init): Likewise.
3132 (push_init_level): Likewise.
3133 (pop_init_level): Likewise.
3134 (process_init_element): Likewise.
3135 (build_binary_op): Only allow binary operators to be applied to
3136 vectors if they satisfy gnu_vector_type_p.
3137
017c6491
JM
31382019-11-08 Joseph Myers <joseph@codesourcery.com>
3139
3140 * c-decl.c (grokparms): Convert () in a function definition to
3141 (void) for C2x.
3142 (store_parm_decls_oldstyle): Pedwarn for C2x.
3143 (store_parm_decls): Update comment about () not generating a
3144 prototype.
3145
c01bd174
JM
31462019-11-07 Joseph Myers <joseph@codesourcery.com>
3147
3148 * c-parser.c (c_parser_attribute_arguments): New function.
3149 Factored out of c_parser_gnu_attribute.
3150 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
3151 (c_parser_balanced_token_sequence, c_parser_std_attribute)
3152 (c_parser_std_attribute_specifier): New functions.
3153 (c_parser_transaction_attributes): Use
3154 c_parser_std_attribute_specifier.
3155
471c5330
JM
31562019-11-07 Joseph Myers <joseph@codesourcery.com>
3157
3158 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
3159 lex_joined_string and translate_strings_p.
3160 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
3161 c_lex_with_flags.
3162 (c_parser_string_literal): New function.
3163 (c_parser_static_assert_declaration_no_semi): Use
3164 c_parser_string_literal. Do not set lex_untranslated_string.
3165 (c_parser_asm_string_literal): Use c_parser_string_literal.
3166 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
3167 (c_parser_gnu_attributes): Set and restore translate_strings_p
3168 instead of lex_untranslated_string.
3169 (c_parser_asm_statement): Do not set lex_untranslated_string.
3170 (c_parser_asm_operands): Likewise.
3171 (c_parser_has_attribute_expression): Set and restore
3172 translate_strings_p instead of lex_untranslated_string.
3173 (c_parser_postfix_expression): Use c_parser_string_literal.
3174 (pragma_lex): Likewise.
3175 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
3176 (c_parse_file): Set translate_strings_p.
3177 * gimple-parser.c (c_parser_gimple_postfix_expression)
3178 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
3179 * c-parser.c (c_parser_string_literal): Declare function.
3180
d0c464d2
JJ
31812019-11-02 Jakub Jelinek <jakub@redhat.com>
3182
3183 * c-parser.c (c_finish_omp_declare_variant): Use
3184 omp_get_context_selector instead of c_omp_get_context_selector.
3185
ac2cfa6c
RS
31862019-10-29 Richard Sandiford <richard.sandiford@arm.com>
3187
3188 * c-tree.h (c_simulate_enum_decl): Declare.
3189 * c-decl.c (c_simulate_enum_decl): New function.
3190 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
3191
74078538
RS
31922019-10-29 Richard Sandiford <richard.sandiford@arm.com>
3193
3194 * c-tree.h (c_simulate_builtin_function_decl): Declare.
3195 * c-decl.c (c_simulate_builtin_function_decl): New function.
3196 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
3197 to the above.
3198
ad1539d5
MS
31992019-10-28 Martin Sebor <msebor@redhat.com>
3200
3201 PR c/66970
3202 * c-decl.c (names_builtin_p): Define a new function.
3203
cb73e4e7
RB
32042019-10-28 Richard Biener <rguenther@suse.de>
3205
3206 PR c/92249
3207 * gimple-parser.c (c_parser_parse_gimple_body): Make
3208 current_bb the entry block initially to easier recover
3209 from errors.
3210 (c_parser_gimple_compound_statement): Adjust.
3211
135df52c
JJ
32122019-10-24 Jakub Jelinek <jakub@redhat.com>
3213
3214 * c-parser.c (c_finish_omp_declare_variant): Use
3215 omp_context_selector_matches instead of
3216 c_omp_context_selector_matches.
3217 * c-decl.c (c_decl_attributes): Add "omp declare target block"
3218 attribute in between declare target and end declare target
3219 pragmas.
3220
783bfe5e
JM
32212019-10-15 Joseph Myers <joseph@codesourcery.com>
3222
3223 * c-parser.c (c_parser_attribute_any_word): Rename to
3224 c_parser_gnu_attribute_any_word. All callers changed.
3225 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
3226 callers changed.
3227 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
3228 callers changed.
3229 (c_parser_declaration_or_fndef, c_parser_declspecs)
3230 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
3231 (c_parser_struct_declaration, c_parser_declarator)
3232 (c_parser_gnu_attribute, c_parser_compound_statement)
3233 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
3234 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
3235 attribute-related syntax productions.
3236
56898e43
RS
32372019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3238
3239 * c-objc-common.c (useful_aka_type_p): Replace with...
3240 (get_aka_type): ...this new function. Given the original type,
3241 decide which aka type to print (if any). Only look through typedefs
3242 if user_facing_original_type_p.
3243 (print_type): Update accordingly.
3244
b9424661
JJ
32452019-10-14 Jakub Jelinek <jakub@redhat.com>
3246
3247 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
3248 into int NESTED, if it is 2, diagnose missing commas in between
3249 clauses.
3250 (c_parser_omp_context_selector): Pass 2 as last argument to
3251 c_parser_omp_all_clauses.
3252
20de9568
JJ
32532019-10-12 Jakub Jelinek <jakub@redhat.com>
3254
3255 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
3256 For simd properties, put them directly into TREE_VALUE.
3257 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
3258 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
3259 add "omp declare variant base" attribute rather than
3260 "omp declare variant".
3261
fe2bc27c
JM
32622019-10-11 Joseph Myers <joseph@codesourcery.com>
3263
3264 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
3265
94e7f906
JJ
32662019-10-10 Jakub Jelinek <jakub@redhat.com>
3267
3268 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
3269 true, terminate processing on closing paren and don't skip to end of
3270 pragma line.
3271 (c_parser_omp_declare_simd): Handle also declare variant.
3272 (omp_construct_selectors, omp_device_selectors,
3273 omp_implementation_selectors, omp_user_selectors): New variables.
3274 (c_parser_omp_context_selector,
3275 c_parser_omp_context_selector_specification,
3276 c_finish_omp_declare_variant): New functions.
3277 (c_finish_omp_declare_simd): Handle both declare simd and
3278 declare variant.
3279 (c_parser_omp_declare): Handle declare variant.
3280
93313b94
JM
32812019-10-02 Joseph Myers <joseph@codesourcery.com>
3282
3283 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
3284 CPP_COLON tokens.
3285
55879815
RS
32862019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3287
3288 * c-objc-common.c (useful_aka_type_p): New function.
3289 (print_type): Use it to decide whether an aka type is worth printing.
3290
59bc434a
JJ
32912019-09-27 Jakub Jelinek <jakub@redhat.com>
3292
3293 PR c++/88203
3294 * c-parser.c (c_parser_predefined_identifier): New function.
3295 (c_parser_postfix_expression): Use it.
3296 (c_parser_omp_variable_list): Parse predefined identifiers.
3297 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
3298 in shared and firstprivate clauses, even when they are predetermined
3299 shared.
3300
c6447c20
RS
33012019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3302
3303 * c-typeck.c (build_function_call_vec): Take the original function
3304 decl as an optional final parameter. Pass all built-in calls to
3305 check_builtin_function_arguments.
3306
522da4c2
EB
33072019-09-20 Eric Botcazou <ebotcazou@adacore.com>
3308
3309 PR c/91815
3310 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
3311 of identifiers in the external scope only for variables and functions.
3312
68e2c199
PK
33132019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3314
3315 PR c/78736
3316 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
3317
22f8849d
IS
33182019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3319
3320 PR pch/61250
3321 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
3322 after determining that the first token is not
3323 PRAGMA_GCC_PCH_PREPROCESS.
3324
db376f45
EB
33252019-08-22 Eric Botcazou <ebotcazou@adacore.com>
3326
3327 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
3328 FUNCTION_DECL to the right value in the presence of nested declarators.
3329
4d732405
RS
33302019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3331
3332 PR middle-end/91421
3333 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
3334
cb1180d5
RS
33352019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3336
3337 PR middle-end/91421
3338 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
3339 of a built_in_function.
3340 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
3341
77eb117f
JJ
33422019-08-10 Jakub Jelinek <jakub@redhat.com>
3343
3344 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
3345 (c_parser_omp_clause_device_type): New function.
3346 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3347 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3348 (c_parser_omp_declare_target): Handle device_type clauses. Remove
3349 diagnostics for declare target with clauses nested in clause-less
3350 declare target declaration-definition-seq.
3351 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
3352
2c3b8bad
JJ
33532019-08-09 Jakub Jelinek <jakub@redhat.com>
3354
bb522e2e
JJ
3355 * c-parser.c (check_no_duplicate_clause): Simplify using
3356 omp_find_clause.
3357 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
3358 directive name modifiers.
3359 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
3360
2c3b8bad
JJ
3361 PR c/91401
3362 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
3363 check_no_duplicate_clause call. Comment it out, instead emit a
3364 warning for duplicate dist_schedule clauses.
3365
99769e7f
RS
33662019-08-08 Richard Sandiford <richard.sandiford@arm.com>
3367
3368 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
3369
8860d270
JJ
33702019-08-08 Jakub Jelinek <jakub@redhat.com>
3371
3372 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
3373 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
3374 instead of generic_head to track duplicates.
3375
398e3feb
JJ
33762019-08-07 Jakub Jelinek <jakub@redhat.com>
3377
3378 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
3379 (c_parser_omp_clause_use_device_addr): New function.
3380 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3381 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
3382 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
3383 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
3384 map or use_device_* clauses.
3385 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
3386 in OpenMP, require pointer type rather than pointer or array type.
3387 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
3388
a28351e7
JJ
33892019-07-31 Jakub Jelinek <jakub@redhat.com>
3390
3391 PR c/91192
3392 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
3393 even if finish is UNKNOWN_LOCATION, just use start as finish in that
3394 case.
3395
6343b6bf
ML
33962019-07-25 Martin Liska <mliska@suse.cz>
3397 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
3398
3399 PR c++/23383
3400 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
3401
cb50701e
ML
34022019-07-25 Martin Liska <mliska@suse.cz>
3403
3404 * c-decl.c (merge_decls): Use new macros
3405 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
3406
62e3e66f
RB
34072019-07-23 Richard Biener <rguenther@suse.de>
3408
3409 PR tree-optimization/83518
3410 * gimple-parser.c (c_parser_parse_gimple_body): When we have
3411 a CFG also rebuild cgraph edges.
3412
554a530f
JJ
34132019-07-20 Jakub Jelinek <jakub@redhat.com>
3414
3415 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
3416 (c_parser_omp_clause_bind): New function.
3417 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
3418 (OMP_LOOP_CLAUSE_MASK): Define.
3419 (c_parser_omp_loop): New function.
3420 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
3421 loop combined with parallel or teams.
3422 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
3423 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
3424
d119bf79
RS
34252019-07-18 Richard Sandiford <richard.sandiford@arm.com>
3426
3427 PR c/53633
3428 * c-decl.c (finish_function): Check targetm.warn_func_return
3429 before issuing a -Wreturn-type warning.
3430
ab20d992 34312019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
3432
3433 * gimple-parser.c (c_parser_gimple_try_stmt): New.
3434 (c_parser_compound_statement): Call it.
3435
1fdd6f04
JJ
34362019-07-12 Jakub Jelinek <jakub@redhat.com>
3437
3438 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
3439 (c_parser_omp_clause_order): New function.
3440 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
3441 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
3442 PRAGMA_OMP_CLAUSE_ORDER.
3443 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
3444
8389386c
RB
34452019-07-10 Richard Biener <rguenther@suse.de>
3446
3447 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
3448 _Literal (int *) &x for address literals.
3449
99b1c316
MS
34502019-07-09 Martin Sebor <msebor@redhat.com>
3451
3452 PR c++/61339
3453 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
3454 to class.
3455 (field_decl_cmp): Same.
3456 * c-parser.c (c_parser_struct_or_union_specifier): Same.
3457 * c-tree.h: Same.
3458 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
3459
6c1dae73
MS
34602019-07-09 Martin Sebor <msebor@redhat.com>
3461
3462 PR c++/61339
3463 * c-decl.c: Change class-key from class to struct and vice versa
3464 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
3465 * gimple-parser.c: Same.
3466
69b5279e
RB
34672019-07-01 Richard Biener <rguenther@suse.de>
3468
3469 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3470 _Literal (char *) &"foo" for address literals pointing to
3471 STRING_CSTs.
3472
ab20d992
JJ
34732019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3474
3475 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
3476 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
3477 C incompatibility if alternate "__intN__" form is used.
3478
1e3d475e
MS
34792019-06-24 Martin Sebor <msebor@redhat.com>
3480
3481 * c-typeck.c (build_binary_op): Hyphenate floating-point.
3482
bf38f7e9
JJ
34832019-06-10 Jakub Jelinek <jakub@redhat.com>
3484
3485 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
3486 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
3487 (c_parser_omp_scan_loop_body): New function.
3488 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
3489 inscan reduction clauses.
3490 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
3491 non-inscan reductions on the same construct, or inscan reductions with
3492 ordered or schedule clauses, or inscan array reductions.
3493
65985d78
MS
34942019-06-05 Martin Sebor <msebor@redhat.com>
3495
3496 PR c/90737
3497 * c-typeck.c (c_finish_return): Only consider functions returning
3498 pointers as candidates for -Wreturn-local-addr.
3499
0ecf545c
MS
35002019-06-05 Martin Sebor <msebor@redhat.com>
3501
3502 * c-decl.c (start_decl): Adjust quoting and hyphenation
3503 in diagnostics.
3504 (finish_decl): Same.
3505 (finish_enum): Same.
3506 (start_function): Same.
3507 (declspecs_add_type): Same.
3508 * c-parser.c (warn_for_abs): Same.
3509 * c-typeck.c (build_binary_op): Same.
3510
e03436e7
TS
35112019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3512
b48f44bf
TS
3513 PR c/89433
3514 * c-parser.c (c_finish_oacc_routine): Rework checking if already
3515 marked with an OpenACC 'routine' directive.
3516
5bf04509
TS
3517 PR c/89433
3518 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
3519 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
3520
e03436e7
TS
3521 PR c/89433
3522 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
3523 clauses from "omp declare target" attribute.
3524
a9c697b8
MS
35252019-05-16 Martin Sebor <msebor@redhat.com>
3526
ab20d992
JJ
3527 * c-decl.c (start_decl): Quote keywords, operators, and
3528 types in diagnostics.
3529 (finish_decl): Same.
3530 * c-parser.c (c_parser_asm_statement): Same.
3531 (c_parser_conditional_expression): Same.
3532 (c_parser_transaction_cancel): Same.
3533 * c-typeck.c (c_common_type): Same.
3534 (build_conditional_expr): Same.
3535 (digest_init): Same.
3536 (process_init_element): Same.
3537 (build_binary_op): Same.
a9c697b8 3538
c4499192
RB
35392019-05-17 Richard Biener <rguenther@suse.de>
3540
3541 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
3542 (c_parser_gimple_unary_expression): Likewise.
3543 (c_parser_gimple_parentized_ternary_expression): New function.
3544
adfe6e4b
RB
35452019-05-16 Richard Biener <rguenther@suse.de>
3546
3547 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
3548 (c_parser_gimple_unary_expression): Likewise.
3549
186dabf2
RB
35502019-05-15 Richard Biener <rguenther@suse.de>
3551
3552 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3553 __BIT_FIELD_REF.
3554
1158c5b4
RB
35552019-05-14 Richard Biener <rguenther@suse.de>
3556
3557 * gimple-parser.c (c_parser_gimple_statement): Remove
3558 questionable auto-promotion to VIEW_CONVERT_EXPR.
3559 (c_parser_gimple_typespec): Split out from __MEM parsing.
3560 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
3561 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
3562 as __VIEW_CONVERT with -gimple.
3563
fd4485aa
ML
35642019-05-09 Martin Liska <mliska@suse.cz>
3565
3566 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
3567 __MAX.
3568 (c_parser_gimple_unary_expression): Parse also binary expression
3569 __MIN and __MAX.
3570 (c_parser_gimple_parentized_binary_expression): New function.
3571
d276406a
ML
35722019-05-09 Martin Liska <mliska@suse.cz>
3573
3574 * gimple-parser.c (struct gimple_parser): Add probability.
3575 for gimple_parser_edge.
3576 (gimple_parser::push_edge): Add new argument probability.
3577 (c_parser_gimple_parse_bb_spec): Parse also probability
3578 if present.
3579 (c_parser_parse_gimple_body): Set edge probability.
3580 (c_parser_gimple_compound_statement): Consume token
3581 before calling c_parser_gimple_goto_stmt.
3582 Parse BB counts.
3583 (c_parser_gimple_statement): Pass new argument.
3584 (c_parser_gimple_goto_stmt): Likewise.
3585 (c_parser_gimple_if_stmt): Likewise.
3586 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
3587 * c-parser.c (c_parser_declaration_or_fndef): Pass
3588 hot_bb_threshold argument.
3589 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
3590 field.
3591 (c_parser_gimple_parse_bb_spec_edge_probability): New.
3592
f179b64e
JJ
35932019-04-26 Jakub Jelinek <jakub@redhat.com>
3594
3595 PR debug/90197
3596 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
3597 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
3598 (c_parser_do_statement): Likewise.
3599 (c_parser_for_statement): Likewise. Formatting fixes.
3600 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
3601 emit DEBUG_BEGIN_STMTs if needed.
3602
e7178413
JJ
36032019-04-19 Jakub Jelinek <jakub@redhat.com>
3604
c280b7ee
JJ
3605 PR c/89888
3606 * c-typeck.c (struct c_switch): Remove outside_range_p member.
3607 (c_start_case): Don't clear it.
3608 (do_case): Adjust c_add_case_label caller.
3609 (c_finish_case): Adjust c_do_switch_warnings caller.
3610
e7178413
JJ
3611 PR c++/90108
3612 * c-decl.c (merge_decls): If remove is main variant and
3613 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
3614 variant that has newdecl as TYPE_NAME if any.
3615
60a2c645
JJ
36162019-04-12 Jakub Jelinek <jakub@redhat.com>
3617
3618 PR c/89933
3619 * c-decl.c (merge_decls): When newdecl's type is its main variant,
3620 don't try to remove it from the variant list, but instead assert
3621 it has no variants.
3622
2a82beaa
RB
36232019-04-01 Richard Biener <rguenther@suse.de>
3624
3625 PR c/71598
3626 * c-tree.h (c_get_alias_set): Declare.
3627 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
3628 * c-objc-common.c (c_get_alias_set): Treat enumeral types
3629 as the underlying integer type.
3630
bec1da64
MS
36312019-03-19 Martin Sebor <msebor@redhat.com>
3632
3633 PR tree-optimization/89688
3634 * c-decl.c (finish_decl): Call braced_lists_to_string for more
3635 kinds of initializers.
3636
855cd9b1
JJ
36372019-03-19 Jakub Jelinek <jakub@redhat.com>
3638
3639 PR c/89734
3640 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
3641 return type even if quals_used is 0. Formatting fixes.
3642
baa09dc5
RB
36432019-03-14 Richard Biener <rguenther@suse.de>
3644
3645 * c-tree.h (enum c_declspec_il): New.
3646 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
3647 enum bitfield.
3648 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
3649 Pass start pass and declspec_il to c_parser_parse_gimple_body.
3650 (c_parser_declspecs): Adjust.
3651 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
3652 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
3653 and bitmap.h.
3654 (struct gimple_parser): New.
3655 (gimple_parser::push_edge): New method.
3656 (c_parser_gimple_parse_bb_spec): New helper.
3657 (c_parser_parse_gimple_body): Get start pass and IL specification.
3658 Initialize SSA and CFG.
3659 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
3660 Build a gimple_parser parsing state and pass it along.
3661 (c_parser_gimple_statement): Change intermittend __PHI internal
3662 function argument for the edge.
3663 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
3664 (c_parser_gimple_goto_stmt): Record edges to build.
3665 (c_parser_gimple_if_stmt): Likewise.
3666 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
3667 (c_parser_gimple_or_rtl_pass_list): Likewise.
3668
a3f9f006
ML
36692019-03-11 Martin Liska <mliska@suse.cz>
3670
3671 * c-decl.c (check_for_loop_decls): Wrap an option name
3672 in a string format message and fix GNU coding style.
3673 * c-parser.c (c_parser_declspecs): Likewise.
3674
1db01ff9
JJ
36752019-03-08 Jakub Jelinek <jakub@redhat.com>
3676
3677 PR tree-optimization/89550
3678 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
3679 returned true.
3680 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
3681 or warning returned true.
3682
66dcb747
JJ
36832019-02-28 Jakub Jelinek <jakub@redhat.com>
3684
3685 PR c/89525
3686 * c-typeck.c (convert_arguments): Call inform_declaration only if
3687 the previous warning_at call returned true.
3688
2263c9f2
TS
36892019-02-22 Thomas Schwinge <thomas@codesourcery.com>
3690
3691 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
3692 parameter. Adjust all users.
3693 (c_parser_oacc_simple_clause): Replace parser with loc formal
3694 parameter. Adjust all users.
3695
ab20d992 36962019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
3697
3698 PR c/87924
3699 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
3700 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
3701
5f88ba10
JJ
37022019-02-15 Jakub Jelinek <jakub@redhat.com>
3703
3704 PR c/89340
3705 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
3706 before c_decl_attributes rather than after it.
3707
cfc30fd1
JJ
37082019-02-06 Jakub Jelinek <jakub@redhat.com>
3709
3710 PR c/89211
3711 * c-parser.c (c_parser_declaration_or_fndef): Don't update
3712 DECL_ARGUMENTS of d if it has been defined already. Use a single if
3713 instead of 3 nested ifs.
3714
fbe83e6b
JM
37152019-02-06 Joseph Myers <joseph@codesourcery.com>
3716
3717 PR c/88584
3718 * c-decl.c (finish_decl): Do not complete array types for arrays
3719 with external linkage not at file scope.
3720
f461f938
RB
37212019-02-05 Richard Biener <rguenther@suse.de>
3722
3723 PR c/88606
3724 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
3725 all type variants when not supported.
3726
fe509359
JJ
37272019-01-30 Jakub Jelinek <jakub@redhat.com>
3728
3729 PR c/89061
3730 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
3731 * c-decl.c (decl_jump_unsafe): Return false for
3732 C_DECL_COMPOUND_LITERAL_P decls.
3733 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
3734
6a335b96
JJ
37352019-01-29 Jakub Jelinek <jakub@redhat.com>
3736
f4b7e754
JJ
3737 PR c/89045
3738 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
3739 scope.
3740
6a335b96
JJ
3741 PR c/86125
3742 * c-decl.c (last_fileptr_type): Remove.
3743 (last_structptr_types): New variable.
3744 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
3745 {old,new}rettype instead of the types themselves. Assert
3746 last_structptr_types array has the same number of elements
3747 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
3748 argument oldtype and newtype. Instead of handling
3749 just fileptr_type_node specially, handle all builtin_structptr_types
3750 pointer nodes. Formatting fix.
3751
d8b5a1a0
MS
37522019-01-24 Martin Sebor <msebor@redhat.com>
3753
3754 PR c/86125
3755 PR c/88886
3756 PR middle-end/86308
3757 * c-decl.c (match_builtin_function_types): Add arguments.
3758 (diagnose_mismatched_decls): Diagnose mismatched declarations
3759 of built-ins more strictly.
3760
e21c4491
JJ
37612019-01-24 Jakub Jelinek <jakub@redhat.com>
3762
3763 PR c++/88976
3764 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
3765 on #pragma omp cancel with different modifiers.
3766
420183d9
L
37672019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3768
3769 PR c/51628
3770 PR c/88664
3771 * c-typeck.c (convert_for_assignment): Upate the
3772 warn_for_address_or_pointer_of_packed_member call.
3773
17ad43dd
TH
37742019-01-16 Tom Honermann <tom@honermann.net>
3775 Jason Merrill <jason@redhat.com>
3776
3777 * c-typeck.c (digest_init): Revised the error message produced for
3778 ill-formed cases of array initialization with a string literal.
3779 (error_init): Make variadic.
3780
5f07d78a
JJ
37812019-01-12 Jakub Jelinek <jakub@redhat.com>
3782
3783 * c-typeck.c (convert_for_assignment): Fix a comment typo.
3784
c4581bbf
JJ
37852019-01-07 Jakub Jelinek <jakub@redhat.com>
3786
3787 PR c/88701
3788 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
3789 if current_function_decl is non-NULL.
3790
65c5b1eb
JM
37912019-01-07 Joseph Myers <joseph@codesourcery.com>
3792
3793 PR c/88720
3794 PR c/88726
3795 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
3796 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
3797 functions declared but never defined only for external scope, not
3798 for other scopes.
3799
d8fcab68
JJ
38002019-01-07 Jakub Jelinek <jakub@redhat.com>
3801
3802 PR c++/85052
3803 * c-parser.c (c_parser_postfix_expression): Parse
3804 __builtin_convertvector.
3805
a5544970
JJ
38062019-01-01 Jakub Jelinek <jakub@redhat.com>
3807
3808 Update copyright years.
3809
da77eace
L
38102018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3811
3812 PR c/51628
3813 * c-typeck.c (convert_for_assignment): Call
3814 warn_for_address_or_pointer_of_packed_member.
3815
1edf8866
SB
38162018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3817
3818 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
3819 a more specific error message (instead of just falling through).
3820
db4fd626
SB
38212018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3822
3823 * c-parser.c (c_parser_asm_statement): Keep track of the location each
3824 asm qualifier is first seen; use that to give nicer "duplicate asm
3825 qualifier" messages. Delete 'quals" variable, instead pass the
3826 "is_volatile_ flag to build_asm_stmt directly.
3827 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
3828 * c-typeck.c (build_asm_stmt): Ditto; adjust.
3829
9c9cfcbb
SB
38302018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
3831
3832 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
3833 "done" boolean variable.
3834
a14feb3c
DM
38352018-12-19 David Malcolm <dmalcolm@redhat.com>
3836
3837 PR c++/87504
3838 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
3839 Move from here to gcc-rich-location.h and gcc-rich-location.c.
3840 (build_binary_op): Use struct op_location_t and
3841 class binary_op_rich_location.
3842
6d939173
JJ
38432018-12-11 Jakub Jelinek <jakub@redhat.com>
3844
3845 PR sanitizer/88426
3846 * c-convert.c (convert): Call c_fully_fold before calling
3847 ubsan_instrument_float_cast.
3848
b7055028
SB
38492018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
3850
3851 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
3852 setting "quals".
3853
5b76e75f
SB
38542018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3855
3856 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
3857 after asm. Pass a flag for it to build_asm_expr.
3858 * c-tree.h (build_asm_expr): Update declaration.
3859 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
3860 set ASM_INLINE_P.
3861
30bd42b9
SB
38622018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
3863
3864 PR inline-asm/55681
3865 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
3866 combination of volatile and goto, in any order, without repetitions.
3867
9df6c0e4
JB
38682018-12-04 James Norris <jnorris@codesourcery.com>
3869 Cesar Philippidis <cesar@codesourcery.com>
3870 Julian Brown <julian@codesourcery.com>
3871
3872 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
3873 code.
3874
f44697b7
RB
38752018-11-30 Richard Biener <rguenther@suse.de>
3876
3877 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
3878 _Literal (type) { ... } as empty aggregate or vector constructor.
3879
550dfbdc
MS
38802018-11-29 Martin Sebor <msebor@redhat.com>
3881
3882 PR c/88091
3883 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
3884 (convert_arguments): Add comments. Pass additional argument to
3885 the function above.
3886
673670da
MS
38872018-11-29 Martin Sebor <msebor@redhat.com>
3888
3889 PR c/88172
3890 PR testsuite/88208
3891 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
3892
db1d09b0
MS
38932018-11-23 Martin Sebor <msebor@redhat.com>
3894
3895 PR testsuite/88098
3896 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
3897 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
3898
98f08eb8
MS
38992018-11-20 Martin Sebor <msebor@redhat.com>
3900
3901 * c-parser.c (c_parser_has_attribute_expression): New function.
3902 (c_parser_attribute): New function.
3903 (c_parser_attributes): Move code into c_parser_attribute.
3904 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
3905
cd5da983
MS
39062018-11-15 Martin Sebor <msebor@redhat.com>
3907
3908 PR c/83656
3909 * c-decl.c (header_for_builtin_fn): Declare.
3910 (diagnose_mismatched_decls): Diagnose declarations of built-in
3911 functions without a prototype.
3912 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
3913 (convert_argument): Same.
3914 (convert_arguments): Factor code out into convert_argument.
3915 Detect mismatches between built-in formal arguments in calls
3916 to built-in without prototype.
3917 (build_conditional_expr): Same.
3918 (type_or_builtin_type): New function.
3919 (convert_for_assignment): Add argument. Conditionally issue
3920 warnings instead of errors for mismatches.
3921
620e594b
DM
39222018-11-13 David Malcolm <dmalcolm@redhat.com>
3923
3924 * c-decl.c: Replace "source_location" with "location_t".
3925 * c-tree.h: Likewise.
3926 * c-typeck.c: Likewise.
3927 * gimple-parser.c: Likewise.
3928
3179ebae
JJ
39292018-11-09 Jakub Jelinek <jakub@redhat.com>
3930
81a227c6
JJ
3931 * c-parser.c (c_parser_omp_clause_final): Use
3932 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
3933 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
3934 parsing instead of c_parser_paren_condition.
3935 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
3936 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
3937 c_fully_fold instead of c_parser_condition.
3938 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
3939 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
3940 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
3941 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
3942 c_parser_expr_no_commas instead of c_parser_expression.
3943
98c91c56
JJ
3944 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
3945 reduction clause with inscan modifier.
3946
3179ebae
JJ
3947 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
3948 clauses other than atomic_default_mem_order.
3949
28567c40
JJ
39502018-11-08 Jakub Jelinek <jakub@redhat.com>
3951
3952 * c-parser.c: Include memmode.h.
3953 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
3954 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
3955 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
3956 task_reduction clauses.
3957 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
3958 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
3959 section, or lvalue assignment expression.
3960 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
3961 (c_parser_omp_clause_lastprivate): Parse optional
3962 conditional: modifier.
3963 (c_parser_omp_clause_hint): Require constant integer expression rather
3964 than just integer expression.
3965 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
3966 clause.
3967 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
3968 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
3969 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
3970 functions.
3971 (c_parser_omp_clause_depend): Parse iterator modifier and handle
3972 iterators. Parse mutexinoutset and depobj kinds.
3973 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
3974 callers.
3975 (c_parser_omp_all_clauses): Likewise. Handle
3976 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
3977 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3978 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
3979 default memory order from requires directive if any. Adjust
3980 c_finish_omp_atomic caller.
3981 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
3982 (c_parser_omp_flush): Parse flush with memory-order-clause.
3983 (c_parser_omp_for_loop): Allow NE_EXPR even in
3984 OpenMP loops, adjust c_finish_omp_for caller.
3985 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
3986 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
3987 Allow to be called while parsing combined parallel master.
3988 Parse combined master taskloop{, simd}.
3989 (c_parser_omp_parallel): Parse combined
3990 parallel master{, taskloop{, simd}} constructs.
3991 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
3992 (OMP_TASKGROUP_CLAUSE_MASK): Define.
3993 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
3994 (OMP_TASKWAIT_CLAUSE_MASK): Define.
3995 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
3996 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
3997 around teams body. Use SET_EXPR_LOCATION.
3998 (c_parser_omp_target_data): Allow target data
3999 with only use_device_ptr clauses.
4000 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
4001 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
4002 (c_parser_omp_requires): New function.
4003 (c_finish_taskloop_clauses): New function.
4004 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
4005 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
4006 declaration. Disallow in_reduction clause when combined with parallel
4007 master.
4008 (c_parser_omp_construct): Adjust c_parser_omp_master and
4009 c_parser_omp_taskgroup callers.
4010 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
4011 other than cancel.
4012 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
4013 like OMP_CLAUSE_REDUCTION.
4014 (handle_omp_array_sections): Likewise. Call save_expr on array
4015 reductions before calling build_index_type. Handle depend clauses
4016 with iterators.
4017 (struct c_find_omp_var_s): New type.
4018 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
4019 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
4020 with static, runtime or auto schedule kinds. Call save_expr for whole
4021 array reduction sizes. Diagnose reductions with zero sized elements
4022 or variable length structures. Diagnose nogroup clause used with
4023 reduction clause(s). Handle depend clause with
4024 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
4025 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
4026 some different type for other kinds. Use build_unary_op with
4027 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
4028 Handle depend clauses with iterators. Remove no longer needed special
4029 case that predetermined const qualified vars may be specified in
4030 firstprivate clause. Complain if const qualified vars are mentioned
4031 in data-sharing clauses other than firstprivate or shared. Use
4032 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
4033 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
4034 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
4035 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
4036
7e2de6df
DM
40372018-10-29 David Malcolm <dmalcolm@redhat.com>
4038
4039 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
4040 logic for change to name_hint::operator bool.
4041 (undeclared_variable): Likewise.
4042 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4043 (c_parser_parameter_declaration): Likewise.
4044
9f936c86
JM
40452018-10-17 Joseph Myers <joseph@codesourcery.com>
4046
4047 * c-errors.c (pedwarn_c11): New function.
4048 * c-parser.c (disable_extension_diagnostics): Save
4049 warn_c11_c2x_compat and set it to 0.
4050 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
4051 (c_parser_static_assert_declaration_no_semi): Handle
4052 _Static_assert without string constant.
4053 * c-tree.h (pedwarn_c11): New prototype.
4054
033eb567
DM
40552018-10-17 David Malcolm <dmalcolm@redhat.com>
4056
4057 * Make-lang.in (selftest-c): New.
4058 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4059 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
4060 from gcc/Makefile.in.
4061
0edf3afe
RB
40622018-10-02 Richard Biener <rguenther@suse.de>
4063
4064 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
4065
8313a764
JM
40662018-09-26 Joseph Myers <joseph@codesourcery.com>
4067
4068 PR c/87390
4069 * c-typeck.c (build_binary_op): Use excess precision for
4070 comparisons of integers and floating-point for C11 and later.
4071
ce6f0888
MJ
40722018-09-26 Martin Jambor <mjambor@suse.cz>
4073
4074 PR c/87347
4075 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 4076 comment.
ce6f0888 4077
9c4a4b3c
DM
40782018-09-17 David Malcolm <dmalcolm@redhat.com>
4079
4080 * c-objc-common.c (range_label_for_type_mismatch::get_text):
4081 Update for new param.
4082 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
4083 Likewise.
4084
80c6d1f4
MJ
40852018-09-17 Martin Jambor <mjambor@suse.cz>
4086
4087 PR c/63886
4088 * c-parser.c: (warn_for_abs): New function.
4089 (c_parser_postfix_expression_after_primary): Call it.
4090
4a426e36
BE
40912018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4092
4093 * c-typeck.c (digest_init): Shorten overlength strings.
4094
6d900107
BE
40952018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4096
4097 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
4098
b5764229
BE
40992018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4100
4101 * c-decl.c (finish_decl): Call braced_list_to_string here ...
4102 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
4103
22eea6b2
AM
41042018-08-30 Alexander Monakov <amonakov@ispras.ru>
4105
4106 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
4107 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
4108
85204e23
DM
41092018-08-27 David Malcolm <dmalcolm@redhat.com>
4110
4111 PR 87091
4112 * c-decl.c (implicitly_declare): Update call to
4113 maybe_add_include_fixit to suggest overriding the location, as it
4114 is for a note.
4115 * c-objc-common.c (c_tree_printer): Update for conversion of
4116 show_caret_p to a tri-state.
4117
3d78e008
ML
41182018-08-27 Martin Liska <mliska@suse.cz>
4119
4120 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
4121 fndecl_built_in_p and remove check for FUNCTION_DECL if
4122 possible.
3d78e008
ML
4123 (diagnose_mismatched_decls): Likewise.
4124 (merge_decls): Likewise.
4125 (warn_if_shadowing): Likewise.
4126 (pushdecl): Likewise.
4127 (implicitly_declare): Likewise.
4128 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4129 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
4130 * c-typeck.c (build_function_call_vec): Likewise.
4131 (convert_arguments): Likewise.
4132
097f82ec
DM
41332018-08-20 David Malcolm <dmalcolm@redhat.com>
4134
4135 PR other/84889
4136 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
4137 (diagnose_mismatched_decls): Likewise, in various places.
4138 (warn_if_shadowing): Likewise.
4139 (implicit_decl_warning): Likewise.
4140 (implicitly_declare): Likewise.
4141 (undeclared_variable): Likewise.
4142 (declare_label): Likewise.
4143 (grokdeclarator): Likewise.
4144 (start_function): Likewise.
4145 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4146 (c_parser_parameter_declaration): Likewise.
4147 (c_parser_binary_expression): Likewise.
4148 * c-typeck.c (c_expr_sizeof_expr): Likewise.
4149 (parser_build_binary_op): Likewise.
4150 (build_unary_op): Likewise.
4151 (error_init): Likewise.
4152 (pedwarn_init): Likewise.
4153 (warning_init): Likewise.
4154 (convert_for_assignment): Likewise.
4155
96e6ae57
DM
41562018-08-15 David Malcolm <dmalcolm@redhat.com>
4157
4158 * c-objc-common.c: Include "gcc-rich-location.h".
4159 (c_tree_printer): Move implemenation of '%T' to...
4160 (print_type): ...this new function.
4161 (range_label_for_type_mismatch::get_text): New function.
4162 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
4163 range for the various ic_argpass cases.
4164 (class maybe_range_label_for_tree_type_mismatch): New class.
4165 (build_binary_op): Use it when calling binary_op_error.
4166
0cd020ae 41672018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 4168
0cd020ae
PK
4169 * c-decl.c (start_decl): Do not warn if variables is named as main
4170 and is a local variable.
4171
72733314
IS
41722018-08-15 Iain Sandoe <iain@sandoe.co.uk>
4173
4174 PR c/19315
4175 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
4176 objects of unknown size.
4177
23aa9f7c
MS
41782018-08-13 Martin Sebor <msebor@redhat.com>
4179
4180 PR tree-optimization/71625
4181 * c-parser.c (c_parser_declaration_or_fndef): Call
4182 braced_list_to_string.
4183
e5e7e50d
BH
41842018-08-03 Bogdan Harjoc <harjoc@gmail.com>
4185
4186 PR c/86690
4187 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
4188 errors.
4189
8a45b051
MS
41902018-08-01 Martin Sebor <msebor@redhat.com>
4191
4192 PR tree-optimization/86650
4193 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
4194 and TREE_BLOCK (t) from within percent_K_format to this callsite.
4195
5922dcb5
JJ
41962018-08-01 Jakub Jelinek <jakub@redhat.com>
4197
4198 PR c/85704
4199 * c-typeck.c (init_field_decl_cmp): New function.
4200 (output_pending_init_elements): Use it for field comparisons
4201 instead of pure bit_position comparisons.
4202
9b452033
JJ
42032018-07-12 Jakub Jelinek <jakub@redhat.com>
4204
4205 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
4206 type here, instead add "omp declare target implicit" attribute.
4207 (finish_decl): Diagnose vars without mappable type here.
4208
ab20d992
JJ
42092018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4210 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
4211 Cesar Philippidis <cesar@codesourcery.com>
4212
4213 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
4214 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
4215 to their non-present_or_* counterparts. Make 'self' an alias to
4216 PRAGMA_OACC_CLAUSE_HOST.
4217 (c_parser_oacc_data_clause): Update GOMP mappings for
4218 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
4219 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
4220 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
4221 Remove support for present_or_* clauses.
4222 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4223 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
4224 (OACC_DECLARE_CLAUSE_MASK): Likewise.
4225 (OACC_DATA_CLAUSE_MASK): Likewise.
4226 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
4227 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
4228 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
4229 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
4230 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
4231
e197e64e
KV
42322018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4233
4234 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
4235 * gimple-parser.c (c_parser_gimple_statement): Likewise.
4236 (c_parser_gimple_unary_expression): Likewise.
4237
487f2f61
JJ
42382018-06-15 Jakub Jelinek <jakub@redhat.com>
4239
4240 PR c/86093
4241 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
4242 before doing POINTER_DIFF_EXPR.
4243
e4d44a37
MP
42442018-06-07 Marek Polacek <polacek@redhat.com>
4245
4246 PR c/85318
4247 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
4248 for loop initial declarations.
4249
b67b9225
DP
42502018-05-30 David Pagan <dave.pagan@oracle.com>
4251
4252 PR c/55976
4253 * c-decl.c (grokdeclarator): Update check for return type warnings.
4254 (start_function): Likewise.
4255 (finish_function): Likewise.
4256 * c-typeck.c (c_finish_return): Update check for return type warnings.
4257 Pass OPT_Wreturn_type to pedwarn when appropriate.
4258
c566cc9f
RS
42592018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
4260
4261 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
4262 __FMA_EXPR handlng.
4263
e4f81565
RS
42642018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
4265
4266 * gimple-parser.c: Include internal-fn.h.
4267 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
4268 (c_parser_gimple_call_internal): New function.
4269 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
4270 Fix typos in comment.
4271
79e7b1fe
JJ
42722018-05-10 Jakub Jelinek <jakub@redhat.com>
4273
4274 PR c++/85662
4275 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
4276 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
4277 fold_convert_loc.
4278 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
4279 fold_offsetof_1, pass argtype as TYPE to it and drop the
4280 fold_convert_loc.
4281
f7584c81
DP
42822018-05-02 David Pagan <dave.pagan@oracle.com>
4283
4284 PR c/30552
4285 * c-decl.c (old_style_parameter_scope): New function.
4286 * c-parser.c (c_parser_postfix_expression): Check for statement
4287 expressions in old-style function parameter list declarations.
4288 * c-parser.h (old_style_parameter_scope): New extern declaration.
4289
b33a0cb3
JJ
42902018-04-25 Jakub Jelinek <jakub@redhat.com>
4291
4292 PR sanitizer/84307
4293 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
4294 it is not TREE_STATIC.
4295 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
4296 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
4297 its COMPOUND_LITERAL_EXPR_DECL.
4298
c5c5822a
JM
42992018-03-21 Joseph Myers <joseph@codesourcery.com>
4300
4301 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
4302 where all functions return the same _FloatN or _FloatNx type,
4303 treat integer types as _Float64 instead of double.
4304
aa1c9429
JJ
43052018-03-21 Jakub Jelinek <jakub@redhat.com>
4306
4307 PR c/84999
4308 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
4309 building vector comparison, diagnose it and return error_mark_node.
4310
9bb45a95
JJ
43112018-03-15 Jakub Jelinek <jakub@redhat.com>
4312
4313 PR c/84853
4314 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
4315 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
4316 INTEGER_TYPE element type.
4317
ada6bad9
DP
43182018-03-13 David Pagan <dave.pagan@oracle.com>
4319
4320 PR c/46921
4321 * c-typeck.c (output_init_element): Ensure field initializer
4322 expression is always evaluated if there are side effects.
4323
849bbdb9
JJ
43242018-03-06 Jakub Jelinek <jakub@redhat.com>
4325
4326 PR c/84721
4327 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
4328 !building_stmt_list_p ().
4329
d74641bd
RS
43302018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
4331
4332 PR c/84305
4333 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
4334 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
4335 and include the BIND_EXPR in the list of things that need to be
4336 pre-evaluated.
4337
0444aa9c
NS
43382018-02-09 Nathan Sidwell <nathan@acm.org>
4339
4340 PR c/84293
4341 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
4342 to strict_aliasing_warning.
4343
7c30b12a
PC
43442018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4345
4346 * c-typeck.c (really_start_incremental_init, push_init_level,
4347 set_nonincremental_init, output_init_element, process_init_element):
4348 Use DECL_UNNAMED_BIT_FIELD.
4349
2be4dfcb
MP
43502018-01-31 Marek Polacek <polacek@redhat.com>
4351
4352 PR c/81779
4353 * c-parser.c (c_parser_compound_statement_nostart): Call
4354 expansion_point_location_if_in_system_header.
4355
bb9869d5
DM
43562018-01-17 David Malcolm <dmalcolm@redhat.com>
4357
4358 PR c++/83814
4359 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
4360 the C part.
4361
b4923738
JJ
43622018-01-13 Jakub Jelinek <jakub@redhat.com>
4363
4364 PR c/83801
4365 * c-tree.h (decl_constant_value_1): Add a bool argument.
4366 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
4367 returning a CONSTRUCTOR if it is true. Use error_operand_p.
4368 (decl_constant_value): Adjust caller.
4369 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
4370 decl_constant_value_1 as IN_INIT. Otherwise, punt if
4371 decl_constant_value returns initializer that has BLKmode or
4372 array type.
4373 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
4374
928686b1
RS
43752018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4376 Alan Hayward <alan.hayward@arm.com>
4377 David Sherwood <david.sherwood@arm.com>
4378
4379 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
4380 TYPE_VECTOR_SUBPARTS.
4381
85ec4feb
JJ
43822018-01-03 Jakub Jelinek <jakub@redhat.com>
4383
4384 Update copyright years.
4385
913884f7
JJ
43862018-01-01 Jakub Jelinek <jakub@redhat.com>
4387
4388 PR c/83595
4389 * c-parser.c (c_parser_braced_init, c_parser_initelt,
4390 c_parser_conditional_expression, c_parser_cast_expression,
4391 c_parser_sizeof_expression, c_parser_alignof_expression,
4392 c_parser_postfix_expression, c_parser_omp_declare_reduction,
4393 c_parser_transaction_expression): Use set_error () method instead
4394 of setting value member to error_mark_node.
4395
c6cfa2bf
MM
43962017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
4397
4398 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
4399 and _Float<N>X built-in functions.
4400
11d29d63
JJ
44012017-12-22 Jakub Jelinek <jakub@redhat.com>
4402
14ec014e
JJ
4403 PR debug/83550
4404 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
4405 TYPE_STUB_DECL and call rest_of_type_compilation before processing
4406 incomplete vars rather than after it.
4407
11d29d63
JJ
4408 PR debug/83547
4409 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
4410 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
4411 and consider empty ones if there are no other stmts. For
4412 -Wunused-value walk all statements before the one only followed by
4413 DEBUG_BEGIN_STMTs.
4414
170a8bd6 44152017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 4416 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
4417
4418 * c-parser.c (c_parser_while_statement): Add unroll parameter and
4419 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
4420 (c_parser_do_statement): Likewise.
4421 (c_parser_for_statement): Likewise.
4422 (c_parser_statement_after_labels): Adjust calls to above.
4423 (c_parse_pragma_ivdep): New static function.
4424 (c_parser_pragma_unroll): Likewise.
4425 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
4426 <PRAGMA_UNROLL>: New case.
4427
01512446
JJ
44282017-12-19 Jakub Jelinek <jakub@redhat.com>
4429
4430 * c-typeck.c (comptypes_internal, function_types_compatible_p,
4431 perform_integral_promotions, digest_init): Replace Yoda conditions
4432 with typical order conditions.
4433 * c-decl.c (check_bitfield_type_and_width): Likewise.
4434
c65e18d3
BE
44352017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4436
4437 * c-typeck.c (c_safe_arg_type_equiv_p,
4438 c_safe_function_type_cast_p): New function.
4439 (build_c_cast): Implement -Wcast-function-type.
4440
b7280579
RB
44412017-12-14 Richard Biener <rguenther@suse.de>
4442
4443 PR c/83415
4444 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
4445 like REALPART_EXPR for the behavior of whether its operand
4446 is an lvalue.
4447
49e6a6c0
MP
44482017-12-12 Marek Polacek <polacek@redhat.com>
4449
4450 PR c/82679
4451 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
4452
ab20d992 44532017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
4454
4455 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
4456 * c-parser.c (add_debug_begin_stmt): New.
4457 (c_parser_declaration_or_fndef): Call it.
4458 (c_parser_compound_statement_nostart): Likewise.
4459 (c_parser_statement_after_labels): Likewise.
4460 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
4461
4b2b493f
JM
44622017-12-07 Joseph Myers <joseph@codesourcery.com>
4463
4464 * c-decl.c (build_compound_literal): Add parameter alignas_align
4465 and set alignment of decl if nonzero.
4466 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
4467 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
4468 qualifier.
4469 (c_parser_struct_declaration): Update syntax comment.
4470 (c_parser_type_name): Add alignas_ok argument and pass it to
4471 c_parser_declspecs.
4472 (c_parser_cast_expression): Pass true to c_parser_type_name and
4473 give error if a cast used an _Alignas specifier.
4474 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
4475 give error if sizeof (type-name) used an _Alignas specifier.
4476 (c_parser_alignof_expression): Pass true to c_parser_type_name and
4477 give error if _Alignof (type-name) used an _Alignas specifier.
4478 (c_parser_postfix_expression_after_paren_type): Check specified
4479 alignment for a compound literal and pass it to
4480 build_compound_literal.
4481 * c-parser.h (c_parser_type_name): Update prototype.
4482 * c-tree.h (build_compound_literal): Update prototype.
4483
5d9ae53d
MS
44842017-12-07 Martin Sebor <msebor@redhat.com>
4485
4486 PR c/81544
4487 * c-decl.c (c_decl_attributes): Look up existing declaration and
4488 pass it to decl_attributes.
4489
c79144f8
DM
44902017-12-06 David Malcolm <dmalcolm@redhat.com>
4491
4492 PR c/83236
4493 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
4494 reserved for use by the implementation.
4495
613bc14f
DM
44962017-12-06 David Malcolm <dmalcolm@redhat.com>
4497
4498 * c-decl.c: Include "c-family/c-spellcheck.h".
4499
05abad4c
ML
45002017-12-05 Martin Liska <mliska@suse.cz>
4501 Jakub Jelinek <jakub@redhat.com>
4502
4503 * c-typeck.c (pointer_diff): Add new argument and instrument
4504 pointer subtraction.
4505 (build_binary_op): Similar for pointer comparison.
4506
cc6534d4
JJ
45072017-12-01 Jakub Jelinek <jakub@redhat.com>
4508
65791f42
JJ
4509 PR c/79153
4510 * c-parser.c: Include tree-iterator.h.
4511 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
4512 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
4513 on it.
4514
cc6534d4
JJ
4515 PR c/83222
4516 * c-tree.h (decl_constant_value_1): Declare.
4517 * c-typeck.c (decl_constant_value_1): New function.
4518 (decl_constant_value): Use it.
4519 * c-fold.c (c_fully_fold_internal): If in_init, use
4520 decl_constant_value_1 instead of decl_constant_value.
4521
5de73c05
JJ
45222017-11-30 Jakub Jelinek <jakub@redhat.com>
4523
4524 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
4525
058f0b9e
JJ
45262017-11-28 Jakub Jelinek <jakub@redhat.com>
4527
4528 PR sanitizer/81275
4529 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
4530 c_switch_covers_all_cases_p returns true.
4531
5e9d6aa4 45322017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 4533 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
4534
4535 * Make-lang.in (c/c-array-notation.o): Remove.
4536 * c-array-notation.c: Delete.
4537 * c-decl.c: Remove cilkplus condition.
4538 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
4539 c_parser_cilk_verify_simd, c_parser_array_notation,
4540 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
4541 c_parser_cilk_simd_fn_vector_attrs,
4542 c_finish_cilk_simd_fn_tokens): Delete.
4543 (c_parser_declaration_or_fndef): Remove cilkplus condition.
4544 (c_parser_direct_declarator_inner): Ditto.
4545 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
4546 (c_parser_attributes, c_parser_compound_statement,
4547 c_parser_statement_after_labels, c_parser_if_statement,
4548 c_parser_switch_statement, c_parser_while_statement,
4549 c_parser_do_statement, c_parser_for_statement,
4550 c_parser_unary_expression, c_parser_postfix_expression,
4551 c_parser_postfix_expression_after_primary,
4552 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
4553 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
4554 support.
4555 * c-typeck.c (build_array_ref, build_function_call_vec,
4556 convert_arguments,
4557 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
4558 c_finish_loop, build_binary_op): Remove cilkplus support.
4559
9e851845
JJ
45602017-11-28 Jakub Jelinek <jakub@redhat.com>
4561
4562 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
4563 of build3.
4564
ab20d992 45652017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
4566
4567 * Make-lang.in (c.install-plugin): Install backend import library.
4568
41521dee
JJ
45692017-11-23 Jakub Jelinek <jakub@redhat.com>
4570
4571 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
4572 pragma_stmt context.
4573
ac9effed
EB
45742017-11-23 Mike Stump <mikestump@comcast.net>
4575 Eric Botcazou <ebotcazou@adacore.com>
4576
4577 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
4578 ANNOTATE_EXPR.
4579 (c_parser_do_statement): Likewise.
4580 (c_parser_for_statement): Likewise.
4581
ce95abc4
DM
45822017-11-22 David Malcolm <dmalcolm@redhat.com>
4583
4584 PR c++/62170
4585 * c-objc-common.c (c_tree_printer): Convert penultimate param from
4586 bool to bool *. Within '%T' handling, if showing an "aka", use
4587 "quoted" param to add appropriate quoting.
4588
974aedcc
MP
45892017-11-22 Marek Polacek <polacek@redhat.com>
4590
4591 PR c++/60336
4592 PR middle-end/67239
4593 PR target/68355
4594 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
4595
d4300cc6
DM
45962017-11-21 David Malcolm <dmalcolm@redhat.com>
4597
4598 PR c/83056
4599 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
4600 earlier failed lookups.
4601
1af4ebf5
MG
46022017-11-21 Marc Glisse <marc.glisse@inria.fr>
4603
4604 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
4605 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
4606
26edace6
DM
46072017-11-20 David Malcolm <dmalcolm@redhat.com>
4608
4609 PR c/81404
4610 * c-decl.c: Include "c-family/known-headers.h".
4611 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
4612 to known-headers.cc.
4613 (class suggest_missing_header): Move to known-header.h.
4614 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
4615 than get_c_name_hint.
4616
b1212255
DM
46172017-11-20 David Malcolm <dmalcolm@redhat.com>
4618
4619 * c-decl.c (get_c_name_hint): New function.
4620 (class suggest_missing_header): New class.
4621 (lookup_name_fuzzy): Call get_c_name_hint and use it to
4622 suggest missing headers to the user.
4623
6c7a259b
DM
46242017-11-20 David Malcolm <dmalcolm@redhat.com>
4625
4626 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4627 Include "c-family/name-hint.h"
4628 (implicit_decl_warning): Convert "hint" from
4629 const char * to name_hint. Pass location to
4630 lookup_name_fuzzy. Suppress any deferred diagnostic if the
4631 warning was not printed.
4632 (undeclared_variable): Likewise for "guessed_id".
4633 (lookup_name_fuzzy): Convert return type from const char *
4634 to name_hint. Add location_t param.
4635 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
4636 Include "c-family/name-hint.h"
4637 (c_parser_declaration_or_fndef): Convert "hint" from
4638 const char * to name_hint. Pass location to lookup_name_fuzzy.
4639 (c_parser_parameter_declaration): Likewise.
4640
f9c59f7e
JJ
46412017-11-19 Jakub Jelinek <jakub@redhat.com>
4642
4643 PR c/66618
4644 PR c/69960
4645 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
4646 where needed.
4647 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
4648 handle_omp_array_sections): Likewise.
4649 (digest_init): Don't call decl_constant_value_for_optimization.
4650 * c-tree.h (decl_constant_value_for_optimization): Removed.
4651 * c-fold.c (c_fold_array_ref): New function.
4652 (c_fully_fold_internal): Add LVAL argument, propagate it through
4653 recursive calls. For VAR_P call decl_constant_value and
4654 unshare if not LVAL and either optimizing or IN_INIT. Remove
4655 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
4656 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
4657 (c_fully_fold): Add LVAL argument, pass it through to
4658 c_fully_fold_internal.
4659 (decl_constant_value_for_optimization): Removed.
4660
3ca0dc60
JM
46612017-11-15 Joseph Myers <joseph@codesourcery.com>
4662
4663 PR c/81156
4664 * c-parser.c (check_tgmath_function): New function.
4665 (enum tgmath_parm_kind): New enum.
4666 (c_parser_postfix_expression): Handle __builtin_tgmath.
4667
64a5912c
DM
46682017-10-31 David Malcolm <dmalcolm@redhat.com>
4669
4670 * c-decl.c (implicit_decl_warning): Update for renaming of
4671 pedwarn_at_rich_loc and warning_at_rich_loc.
4672 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
4673 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
4674 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
4675 (c_parser_struct_or_union_specifier): Likewise for renaming of
4676 pedwarn_at_rich_loc.
4677 (c_parser_parameter_declaration): Likewise for renaming of
4678 error_at_rich_loc.
4679 * c-typeck.c (build_component_ref): Likewise.
4680 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
4681 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
4682 (set_init_label): Likewise for renaming of error_at_rich_loc.
4683
c1136864
RB
46842017-10-30 Richard Biener <rguenther@suse.de>
4685
4686 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
4687 stmts.
4688
ee5fd23a
MM
46892017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4690
4691 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
4692 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
4693
1a59ccf2
DM
46942017-10-25 David Malcolm <dmalcolm@redhat.com>
4695
4696 PR c/7356
4697 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
4698 semicolons.
4699
bc1a75dd
JJ
47002017-10-25 Jakub Jelinek <jakub@redhat.com>
4701
4702 PR libstdc++/81706
4703 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
4704 newdecl to corresponding __builtin_ if any.
4705
ff1ff960
PC
47062017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
4707
4708 PR c++/82466
4709 * c-decl.c (diagnose_mismatched_decls): Use
4710 OPT_Wbuiltin_declaration_mismatch.
4711
62e1c678
DM
47122017-10-12 David Malcolm <dmalcolm@redhat.com>
4713
4714 * c-parser.c (c_parser_require): Add "type_is_unique" param and
4715 use it to guard calls to maybe_suggest_missing_token_insertion.
4716 (c_parser_parms_list_declarator): Override default value of new
4717 "type_is_unique" param to c_parser_require.
4718 (c_parser_asm_statement): Likewise.
4719 * c-parser.h (c_parser_require): Add "type_is_unique" param,
4720 defaulting to true.
4721
a92f6726
NS
47222017-10-11 Nathan Sidwell <nathan@acm.org>
4723
4724 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
4725
8e6cdc90
RS
47262017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4727
4728 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
4729 operating on trees as wide_ints.
4730 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
4731 (c_tree_equal): Likewise.
4732
8139a48e
DM
47332017-10-04 David Malcolm <dmalcolm@redhat.com>
4734
4735 * c-decl.c (push_parm_decl): Store c_parm's location into the
4736 PARAM_DECL.
4737 (build_c_parm): Add "loc" param and store it within the c_parm.
4738 * c-parser.c (struct c_parser): Add "last_token_location" field.
4739 (c_parser_consume_token): Store location of the token into the
4740 new field.
4741 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
4742 when handling a FUNCTION_DECL, if it doesn't already have them.
4743 (c_parser_parameter_declaration): Generate a location for the
4744 parameter, and pass it to the call to build_c_parm.
4745 * c-tree.h (struct c_parm): Add field "loc".
4746 (build_c_parm): Add location_t param.
4747 * c-typeck.c (get_fndecl_argument_location): New function.
4748 (inform_for_arg): New function.
4749 (convert_for_assignment): Use inform_for_arg when dealing with
4750 ic_argpass.
4751
2a389958
JJ
47522017-09-29 Jakub Jelinek <jakub@redhat.com>
4753
7d386d45
JJ
4754 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
4755 width is non-NULL.
4756 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
4757 don't SET_DECL_C_BIT_FIELD here.
4758
2a389958
JJ
4759 PR c/82340
4760 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
4761 instead of trying to set just TREE_READONLY manually.
4762
ebc6a85e
TV
47632017-09-16 Tom de Vries <tom@codesourcery.com>
4764
4765 PR c/81875
4766 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
4767 cond itself.
4768
bb75facd
JM
47692017-09-15 Joseph Myers <joseph@codesourcery.com>
4770
4771 PR c/82071
4772 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
4773 for C11.
4774 (build_conditional_expr): For C11, generate result with excess
4775 precision when one argument is an integer and the other is of a
4776 type using excess precision.
4777
1d933576
BE
47782017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
4779
4780 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
4781
267bbb6f
MP
47822017-09-13 Marek Polacek <polacek@redhat.com>
4783
4784 PR c/82167
4785 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
4786 than expr.original_type.
4787
6836632e
NS
47882017-09-12 Nathan Sidwell <nathan@acm.org>
4789
4790 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4791 resort_sorted_fields): Moved from c-family/c-common.c.
4792 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
4793
e035be33
JM
47942017-09-01 Joseph Myers <joseph@codesourcery.com>
4795
4796 PR c/82071
4797 * c-typeck.c (build_atomic_assign): Handle argument with excess
4798 precision. Ensure any EXCESS_PRECISION_EXPR is present in
4799 argument passed to build_binary_op and convert_for_assignment but
4800 not for call to c_fully_fold.
4801 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
4802 Ensure build_binary_op is called with argument with original
4803 semantic type. Avoid calling c_fully_fold with an
4804 EXCESS_PRECISION_EXPR from build_binary_op.
4805
d2e05fcb
JJ
48062017-09-01 Jakub Jelinek <jakub@redhat.com>
4807
4808 PR c/81887
4809 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
4810
b397965c
RS
48112017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4812 Alan Hayward <alan.hayward@arm.com>
4813 David Sherwood <david.sherwood@arm.com>
4814
4815 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
4816 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
4817 m1 and m2 to the signed equivalent of a fixed-point
4818 SCALAR_TYPE_MODE.
4819
14e18d71
DM
48202017-08-24 David Malcolm <dmalcolm@redhat.com>
4821
4822 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
4823 than CAN_HAVE_LOCATION_P when determining whether to use the
4824 location_t value within "value".
4825
7f204c0f
DM
48262017-08-21 David Malcolm <dmalcolm@redhat.com>
4827
4828 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
4829 rather than peeking the location of the first token.
4830 * c-tree.h (c_expr::get_location): New method.
4831
2f687306
DM
48322017-08-21 David Malcolm <dmalcolm@redhat.com>
4833
4834 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
4835 to check_function_arguments.
4836
3e7b80d7
MP
48372017-08-18 Marek Polacek <polacek@redhat.com>
4838
4839 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
4840 commentary.
4841
00aa1fa2
L
48422017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4843
4844 PR c/53037
4845 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
4846 (check_bitfield_type_and_width): Don't allow bit-field with
4847 warn_if_not_aligned type.
4848
da67acb9
MS
48492017-08-14 Martin Sebor <msebor@redhat.com>
4850
4851 PR c/81117
4852 * c-objc-common.c (c_objc_common_init): Handle 'G'.
4853
bb85aa74
MP
48542017-08-11 Marek Polacek <polacek@redhat.com>
4855
4856 PR c/81795
4857 * c-decl.c (pushtag): Only print inform if the warning was printed.
4858 (grokdeclarator): Likewise.
4859
32129a17
DM
48602017-08-10 David Malcolm <dmalcolm@redhat.com>
4861
4862 * c-parser.c (c_parser_error): Rename to...
4863 (c_parser_error_richloc): ...this, making static, and adding
4864 "richloc" parameter, passing it to the c_parse_error call,
4865 rather than calling c_parser_set_source_position_from_token.
4866 (c_parser_error): Reintroduce, reimplementing in terms of the
4867 above, converting return type from void to bool.
4868 (class token_pair): New class.
4869 (struct matching_paren_traits): New struct.
4870 (matching_parens): New typedef.
4871 (struct matching_brace_traits): New struct.
4872 (matching_braces): New typedef.
4873 (get_matching_symbol): New function.
4874 (c_parser_require): Add param MATCHING_LOCATION, using it to
4875 highlight matching "opening" tokens for missing "closing" tokens.
4876 (c_parser_skip_until_found): Likewise.
4877 (c_parser_static_assert_declaration_no_semi): Convert explicit
4878 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
4879 class matching_parens, so that the pertinent open parenthesis is
4880 highlighted when there are problems locating the close
4881 parenthesis.
4882 (c_parser_struct_or_union_specifier): Likewise.
4883 (c_parser_typeof_specifier): Likewise.
4884 (c_parser_alignas_specifier): Likewise.
4885 (c_parser_simple_asm_expr): Likewise.
4886 (c_parser_braced_init): Likewise, for matching_braces.
4887 (c_parser_paren_condition): Likewise, for matching_parens.
4888 (c_parser_switch_statement): Likewise.
4889 (c_parser_for_statement): Likewise.
4890 (c_parser_asm_statement): Likewise.
4891 (c_parser_asm_operands): Likewise.
4892 (c_parser_cast_expression): Likewise.
4893 (c_parser_sizeof_expression): Likewise.
4894 (c_parser_alignof_expression): Likewise.
4895 (c_parser_generic_selection): Likewise.
4896 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
4897 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
4898 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
4899 In case CPP_OPEN_PAREN, pass loc_open_paren to the
4900 c_parser_skip_until_found call.
4901 (c_parser_objc_class_definition): Use class matching_parens as
4902 above.
4903 (c_parser_objc_method_decl): Likewise.
4904 (c_parser_objc_try_catch_finally_statement): Likewise.
4905 (c_parser_objc_synchronized_statement): Likewise.
4906 (c_parser_objc_at_property_declaration): Likewise.
4907 (c_parser_oacc_wait_list): Likewise.
4908 (c_parser_omp_var_list_parens): Likewise.
4909 (c_parser_omp_clause_collapse): Likewise.
4910 (c_parser_omp_clause_default): Likewise.
4911 (c_parser_omp_clause_if): Likewise.
4912 (c_parser_omp_clause_num_threads): Likewise.
4913 (c_parser_omp_clause_num_tasks): Likewise.
4914 (c_parser_omp_clause_grainsize): Likewise.
4915 (c_parser_omp_clause_priority): Likewise.
4916 (c_parser_omp_clause_hint): Likewise.
4917 (c_parser_omp_clause_defaultmap): Likewise.
4918 (c_parser_oacc_single_int_clause): Likewise.
4919 (c_parser_omp_clause_ordered): Likewise.
4920 (c_parser_omp_clause_reduction): Likewise.
4921 (c_parser_omp_clause_schedule): Likewise.
4922 (c_parser_omp_clause_num_teams): Likewise.
4923 (c_parser_omp_clause_thread_limit): Likewise.
4924 (c_parser_omp_clause_aligned): Likewise.
4925 (c_parser_omp_clause_linear): Likewise.
4926 (c_parser_omp_clause_safelen): Likewise.
4927 (c_parser_omp_clause_simdlen): Likewise.
4928 (c_parser_omp_clause_depend): Likewise.
4929 (c_parser_omp_clause_map): Likewise.
4930 (c_parser_omp_clause_device): Likewise.
4931 (c_parser_omp_clause_dist_schedule): Likewise.
4932 (c_parser_omp_clause_proc_bind): Likewise.
4933 (c_parser_omp_clause_uniform): Likewise.
4934 (c_parser_omp_for_loop): Likewise.
4935 (c_parser_cilk_clause_vectorlength): Likewise.
4936 (c_parser_cilk_clause_linear): Likewise.
4937 (c_parser_transaction_expression): Likewise.
4938 * c-parser.h (c_parser_require): Add param matching_location with
4939 default UNKNOWN_LOCATION.
4940 (c_parser_error): Convert return type from void to bool.
4941 (c_parser_skip_until_found): Add param matching_location with
4942 default UNKNOWN_LOCATION.
4943
30af3a2b
MP
49442017-08-09 Marek Polacek <polacek@redhat.com>
4945
4946 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
4947 * c-tree.h (build_external_ref): Update declaration.
4948 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
4949 (build_external_ref): Change the type of a parameter to bool.
4950 (parser_build_binary_op): Use true/false instead of 1/0.
4951 (pointer_diff): Likewise.
4952 (build_modify_expr): Likewise.
4953 (set_designator): Change the type of a parameter to bool.
4954 (set_init_index): Use true/false instead of 1/0.
4955 (set_init_label): Likewise.
4956 (output_init_element): Change the type of a parameter to bool.
4957 (output_pending_init_elements): Use true/false instead of 1/0.
4958 (process_init_element): Likewise.
4959 (build_binary_op): Change the type of a parameter to bool.
4960
296c53ac
MP
49612017-08-09 Marek Polacek <polacek@redhat.com>
4962
4963 PR c/81233
4964 * c-typeck.c (pedwarn_init): Make the function take a variable list.
4965 Call emit_diagnostic_valist instead of pedwarn.
4966 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
4967 Print the relevant types in diagnostics.
4968
a32c8316
MP
49692017-08-09 Marek Polacek <polacek@redhat.com>
4970
4971 PR c/81417
4972 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 4973 build_conditional_expr.
a32c8316
MP
4974 * c-parser.c (c_parser_conditional_expression): Create locations for
4975 EXP1 and EXP2 from their source ranges. Pass the locations down to
4976 build_conditional_expr.
4977 * c-tree.h (build_conditional_expr): Update declaration.
4978 * c-typeck.c (build_conditional_expr): Add location_t parameters.
4979 For -Wsign-compare, also print the types.
4980
314e6352
ML
49812017-08-08 Martin Liska <mliska@suse.cz>
4982
4983 * c-convert.c: Include header files.
4984 * c-typeck.c: Likewise.
4985
577eec56
ML
49862017-08-07 Martin Liska <mliska@suse.cz>
4987
4988 * c-parser.c (c_parser_attributes): Canonicalize name of an
4989 attribute.
4990
f7b6353a
MP
49912017-08-02 Marek Polacek <polacek@redhat.com>
4992
4993 PR c/81289
4994 * c-parser.c (c_parser_unary_expression): Use set_error.
4995
8a6eab34
MP
4996 PR c/81448
4997 PR c/81306
4998 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
4999 warnings. Avoid walking MACRO_MAP_LOCATIONS.
5000
ab20d992 50012017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
5002 Martin Liska <mliska@suse.cz>
5003
5004 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 5005 statement.
7fef86d3 5006
f34ebeb2
ML
50072017-07-31 Martin Liska <mliska@suse.cz>
5008
5009 PR sanitize/81530
5010 * c-convert.c (convert): Guard condition with flag_sanitize_p
5011 also with current_function_decl non-null equality.
5012 * c-decl.c (grokdeclarator): Likewise.
5013 * c-typeck.c (build_binary_op): Likewise.
5014
8595f67b
MP
50152017-07-25 Marek Polacek <polacek@redhat.com>
5016
5017 * c-decl.c (grokfield): Remove local variable.
5018
d49718d6
MP
50192017-07-25 Marek Polacek <polacek@redhat.com>
5020
5021 PR c/81364
5022 * c-parser.c (c_parser_else_body): Don't warn about multistatement
5023 macro expansion if the body is in { }.
5024 (c_parser_while_statement): Likewise.
5025 (c_parser_for_statement): Likewise.
5026
ff22eb12
NS
50272017-07-18 Nathan Sidwell <nathan@acm.org>
5028
5029 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
5030
eea77d1f
DM
50312017-07-14 David Malcolm <dmalcolm@redhat.com>
5032
5033 * c-decl.c (implicitly_declare): When suggesting a missing
5034 #include, provide a fix-it hint.
5035
b6f43128
DM
50362017-07-06 David Malcolm <dmalcolm@redhat.com>
5037
5038 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
5039 and call that instead.
5040 * c-tree.h (selftest::run_c_tests): New decl.
5041
3e2becc4
MP
50422017-06-26 Marek Polacek <polacek@redhat.com>
5043
5044 PR c/80116
5045 * c-parser.c (c_parser_if_body): Set the location of the
5046 body of the conditional after parsing all the labels. Call
5047 warn_for_multistatement_macros.
5048 (c_parser_else_body): Likewise.
5049 (c_parser_switch_statement): Likewise.
5050 (c_parser_while_statement): Likewise.
5051 (c_parser_for_statement): Likewise.
5052 (c_parser_statement): Add a default argument. Save the location
5053 after labels have been parsed.
5054 (c_parser_c99_block_statement): Likewise.
5055
343ae898
RB
50562017-06-19 Richard Biener <rguenther@suse.de>
5057
5058 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5059 negated _Literals to parse _Literal (int) -1.
5060
45b2222a
ML
50612017-06-13 Martin Liska <mliska@suse.cz>
5062
5063 PR sanitize/78204
5064 * c-convert.c (convert): Use sanitize_flags_p.
5065 * c-decl.c (grokdeclarator): Likewise.
5066 * c-typeck.c (convert_for_assignment): Likewise.
5067 (c_finish_return): Likewise.
5068 (build_binary_op): Likewise.
5069
8ab7005b
JJ
50702017-06-08 Jakub Jelinek <jakub@redhat.com>
5071
5072 PR c/81006
5073 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
5074 to sizetype before size_binop.
5075
363dc72c
JJ
50762017-06-07 Jakub Jelinek <jakub@redhat.com>
5077
5078 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
5079 of TDI_generic.
5080
dc949728
MP
50812017-06-06 Marek Polacek <polacek@redhat.com>
5082
5083 PR c/79983
5084 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
5085 ref.
5086 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
5087
40ffd95f
BE
50882017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5089
5090 * c-parser.c (c_parser_binary_expression): Implement the
5091 -Wsizeof_pointer_div warning.
5092 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
5093 from a parenthesized expression.
5094 (c_parser_expr_list): Use c_last_sizeof_loc.
5095 * c-tree.h (c_last_sizeof_loc): New external.
5096 * c-typeck.c (c_last_sizeof_loc): New variable.
5097 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
5098
9fc5e7a4
MM
50992017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
5100
5101 PR testsuite/80580
5102 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
5103
f012c8ef
DM
51042017-05-30 David Malcolm <dmalcolm@redhat.com>
5105
5106 * c-objc-common.c (c_tree_printer): Gain bool and const char **
5107 parameters.
5108
3cd211af
MS
51092017-05-24 Martin Sebor <msebor@redhat.com>
5110
5111 PR c/80731
5112 * c-fold.c (c_fully_fold_internal): Adjust.
5113 * c-typeck.c (parser_build_unary_op): Adjust.
5114
fd71a9a2
TS
51152017-05-23 Thomas Schwinge <thomas@codesourcery.com>
5116
5117 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
5118 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
5119 "VECTOR_LENGTH".
5120
92fa0f9e
MP
51212017-05-23 Marek Polacek <polacek@redhat.com>
5122
5123 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
5124 quotes.
5125
d11c168a
JJ
51262017-05-22 Jakub Jelinek <jakub@redhat.com>
5127
5128 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
5129 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
5130 it returned invariant. Call tree_invariant_p unconditionally
5131 afterwards to decide whether to return expr or op0.
5132
58aca9d9
NS
51332017-05-22 Nathan Sidwell <nathan@acm.org>
5134
5135 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
5136
7fd549d2
TS
51372017-05-19 Thomas Schwinge <thomas@codesourcery.com>
5138
5139 * c-parser.c (c_parser_omp_clause_default): Handle
5140 "OMP_CLAUSE_DEFAULT_PRESENT".
5141
6ecd2339
BE
51422017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5143
5144 * config-lang.in (gtfiles): Add c-family/c-format.c.
5145
8a57ecff
NS
51462017-05-18 Nathan Sidwell <nathan@acm.org>
5147
5148 * c-decl.c (pushdecl_top_level): Delete unused function.
5149
6574d78e
MP
51502017-05-18 Marek Polacek <polacek@redhat.com>
5151
5152 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
5153 (check_earlier_gotos): Likewise.
5154 (define_label): Likewise.
5155 (pending_xref_error): Likewise.
5156 (smallest_type_quals_location): Likewise.
5157 (grokdeclarator): Likewise.
5158 (grokparms): Likewise.
5159 (identifier_global_value): Likewise.
5160 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
5161 (find_init_member): Likewise.
5162
e3455240
MP
51632017-05-18 Marek Polacek <polacek@redhat.com>
5164
5165 * c-decl.c (start_decl): Use false/true instead of 0/1.
5166 (grokdeclarator): Likewise.
5167 (finish_struct): Likewise.
5168 (start_function): Change the return type to bool. Use false/true
5169 instead of 0/1.
5170 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
5171 * c-tree.h (start_function): Update.
5172 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
5173 (set_designator): Change the return type to bool. Use false/true
5174 instead of 0/1.
5175
3fa8871b
MP
51762017-05-17 Marek Polacek <polacek@redhat.com>
5177
5178 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
5179 * c-typeck.c: Likewise.
5180
142473df
MP
51812017-05-17 Marek Polacek <polacek@redhat.com>
5182
5183 PR sanitizer/80659
5184 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
5185 DECL_IGNORED_P even for non-static compound literals.
5186
1a817418
ML
51872017-05-17 Martin Liska <mliska@suse.cz>
5188
5189 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
5190 use it instead of int type.
5191
b2fa0a8b
MP
51922017-05-17 Marek Polacek <polacek@redhat.com>
5193
5194 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
5195 call c_fully_fold.
5196 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 5197 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
5198 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
5199 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
5200 save_expr.
5201 (c_parser_conditional_expression): Likewise.
5202 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
5203 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
5204 (process_init_element): Likewise.
5205 (build_binary_op): Likewise.
5206 (handle_omp_array_sections_1): Likewise.
5207
1e47f02b
TS
52082017-05-12 Thomas Schwinge <thomas@codesourcery.com>
5209
5210 * c-parser.c (c_parser_omp_clause_num_gangs)
5211 (c_parser_omp_clause_num_workers)
5212 (c_parser_omp_clause_vector_length): Merge functions into...
5213 (c_parser_oacc_single_int_clause): ... this new function. Adjust
5214 all users.
5215
c24e924f
NS
52162017-05-11 Nathan Sidwell <nathan@acm.org>
5217
5218 * gimple-parser.c: Don't #include tree-dump.h.
5219
c587104e
MM
52202017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5221
5222 PR testsuite/80580
5223 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
5224
67ac9a9d
MM
52252017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5226
5227 PR testsuite/80580
5228 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5229 incorrect __MEM syntax.
5230
ac4eb40f
MM
52312017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5232
5233 PR testsuite/80580
5234 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
5235 type of unary '*'.
5236
641da50a
NS
52372017-05-09 Nathan Sidwell <nathan@acm.org>
5238
5239 * c-tree.h (pushdecl): Declare.
5240
56d35585
DM
52412017-05-05 David Malcolm <dmalcolm@redhat.com>
5242
5243 * c-decl.c (warn_defaults_to): Replace report_diagnostic
5244 with diagnostic_report_diagnostic.
5245 * c-errors.c (pedwarn_c99): Likewise.
5246 (pedwarn_c90): Likewise.
5247
815d9cc6
XR
52482017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5249
92a285c1 5250 PR c++/80038
815d9cc6
XR
5251 * c-gimplify.c (c_gimplify_expr): Remove calls to
5252 cilk_gimplifY_call_params_in_spawned_fn.
5253
1c4ea66f
DM
52542017-04-25 David Malcolm <dmalcolm@redhat.com>
5255
5256 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
5257 hint for removing extra semicolon.
5258
666f7903
JJ
52592017-04-21 Jakub Jelinek <jakub@redhat.com>
5260
5261 PR c/80468
5262 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
5263 enabled, set specs->type to integer_type_node.
5264
5764ee3c
JW
52652017-04-03 Jonathan Wakely <jwakely@redhat.com>
5266
5267 * c-array-notation.c: Fix typo in comment.
5268
10fa8dfb
MP
52692017-03-29 Marek Polacek <polacek@redhat.com>
5270
5271 PR c/79730
5272 * c-decl.c (finish_decl): Check VAR_P.
5273
a9e4a1a5
JJ
52742017-03-27 Jakub Jelinek <jakub@redhat.com>
5275
5276 PR middle-end/80162
5277 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
5278 * c-typeck.c (c_mark_addressable): Likewise. Look through
5279 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
5280 to ARRAY_TYPE.
5281 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
5282
ee3ff394
MP
52832017-03-23 Marek Polacek <polacek@redhat.com>
5284
5285 * c-tree.h: Remove a C_RID_YYCODE reference.
5286
4d1b8e70
JJ
52872017-03-21 Jakub Jelinek <jakub@redhat.com>
5288
5289 PR c/80097
5290 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
5291 optional COMPOUND_EXPR with ubsan instrumentation.
5292
31dc71a8
MP
52932017-03-17 Marek Polacek <polacek@redhat.com>
5294
5295 * c-parser.c: Add C11 references.
5296
d579c385
MP
52972017-03-15 Marek Polacek <polacek@redhat.com>
5298
5299 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
5300
85059a38
MP
53012017-03-11 Marek Polacek <polacek@redhat.com>
5302
5303 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
5304
2f6f187a
DM
53052017-03-10 David Malcolm <dmalcolm@redhat.com>
5306
5307 PR translation/79848
5308 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
5309 "%qs".
5310 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
5311
36618428
MP
53122017-03-09 Marek Polacek <polacek@redhat.com>
5313
5314 PR sanitizer/79757
5315 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
5316 parameter declarations with initializers.
5317
01e5af5a
JJ
53182017-03-09 Jakub Jelinek <jakub@redhat.com>
5319
5320 PR c/79969
5321 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
5322 TYPE_STUB_DECL.
5323
a71dbc63
JJ
53242017-03-07 Jakub Jelinek <jakub@redhat.com>
5325
5326 PR c/79834
5327 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
5328 for "may only be used in compound statements" diagnostics, change it
5329 such that the same translatable string is used for all pragmas. For
5330 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
5331 diagnostics.
5332 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
5333 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
5334 "may only be used in compound statements" diagnostics, such that the
5335 same translatable string is used for all pragmas.
5336
1ff4bae6
MP
53372017-03-04 Marek Polacek <polacek@redhat.com>
5338
5339 PR c/79847
5340 * c-decl.c (implicit_decl_warning): Add missing space.
5341
7f5a7d78
MP
53422017-03-03 Marek Polacek <polacek@redhat.com>
5343
5344 PR c/79758
5345 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
5346 current_function_prototype_arg_types is error_mark_node. Fix
5347 formatting. Use TREE_VALUE instead of TREE_TYPE.
5348
883c8f06
JJ
53492017-03-03 Jakub Jelinek <jakub@redhat.com>
5350
79c9b7a8
JJ
5351 PR c/79837
5352 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
5353 %<min%> or %<max%> in the diagnostics, instead mention identifier.
5354 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
5355 diagnostics.
5356
883c8f06
JJ
5357 PR c/79836
5358 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
5359 instead of %<_Generic>.
5360 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
5361 (c_parser_omp_target_exit_data): Use %<release%> instead of
5362 %<release>.
5363
324ff1a0
JJ
53642017-02-28 Jakub Jelinek <jakub@redhat.com>
5365
5366 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
5367 instead of just cond ? "..." : "...".
5368 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
5369 for "enter"/"exit" keyword.
5370 (c_finish_oacc_routine): Don't use %s to supply portions of the
5371 message.
5372
4227c9ad
JJ
53732017-02-24 Jakub Jelinek <jakub@redhat.com>
5374
5375 PR c++/79588
5376 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
5377 handle -Wrestrict here.
5378 * c-typeck.c (build_function_call_vec): Adjust
5379 check_function_arguments caller.
5380
5d972e66
RB
53812017-02-23 Richard Biener <rguenther@suse.de>
5382
5383 PR c/79684
5384 * gimple-parser.c (c_parser_gimple_statement): Use set_error
5385 to initialize c_exprs to return.
5386 (c_parser_gimple_binary_expression): Likewise.
5387 (c_parser_gimple_unary_expression): Likewise.
5388 (c_parser_gimple_postfix_expression): Likewise.
5389
61ac5ebe
MP
53902017-02-22 Marek Polacek <polacek@redhat.com>
5391
5392 PR c/79662
5393 * c-typeck.c (convert_arguments): Handle error_mark_node.
5394
41d1b0b1
PK
53952017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5396
5397 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
5398 value of c_parser_parse_ssa_name against error_mark_node and emit
5399 error if ssa name is anonymous and written as default definition.
5400
eab1f169
PK
54012017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5402
5403 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
5404 FMA_EXPR.
5405
bcac0b4d
JJ
54062017-02-16 Jakub Jelinek <jakub@redhat.com>
5407
5408 PR c++/79512
5409 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
5410 ignore #pragma omp target even when not followed by identifier.
5411
1be33173
PK
54122017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5413
5414 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
5415 (c_parser_gimple_unary_expression): Likewise.
5416
aa326bfb
JJ
54172017-02-13 Jakub Jelinek <jakub@redhat.com>
5418
5419 * c-parser.c (c_parser_oacc_declare): Add missing space in
5420 diagnostics.
5421
8a398bc5
PK
54222017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5423
5424 PR c/79478
5425 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
5426 set_c_expr_source_range when parsing ssa-name.
5427
3dcde5ef 54282017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 5429 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
5430
5431 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
5432 building IL when arguments are error_mark_node.
5433 (c_parser_gimple_unary_expression): Likewise.
5434 (c_parser_gimple_if_stmt): Likewise.
5435 (c_parser_gimple_switch_stmt): Likewise.
5436 (c_parser_gimple_return_stmt): Likewise.
5437 (c_parser_parse_ssa_name): When name lookup fails do not build
5438 an SSA name. Use undeclared rather than not declared in error
5439 reporting.
5440
192b048b
MP
54412017-02-09 Marek Polacek <polacek@redhat.com>
5442
5443 PR c/79428
5444 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
5445 instead of c_parser_skip_until_found.
5446
56f71478
JJ
54472017-02-09 Jakub Jelinek <jakub@redhat.com>
5448
5449 PR c/79431
5450 * c-parser.c (c_parser_omp_declare_target): Don't invoke
5451 symtab_node::get on automatic variables.
5452
02889d23
CLT
54532016-02-09 Nathan Sidwell <nathan@codesourcery.com>
5454 Chung-Lin Tang <cltang@codesourcery.com>
5455
5456 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
5457 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
5458 semantic checking.
5459 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
5460
7af4b20d
RB
54612017-02-07 Richard Biener <rguenther@suse.de>
5462
5463 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
5464 (c_parser_gimple_postfix_expression_after_primary):
5465 Do not use c_build_function_call_vec to avoid folding and promotion.
5466 Simplify.
5467
e5e391d6
MO
54682017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
5469
5470 PR lto/79061
5471 * c-decl.c (pop_scope): Pass main_input_filename to
5472 build_translation_unit_decl.
5473
c2e84327
DM
54742017-01-24 David Malcolm <dmalcolm@redhat.com>
5475
5476 * c-parser.c: Include "read-rtl-function.h" and
5477 "run-rtl-passes.h".
5478 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
5479 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
5480 production. Update for renaming of field "gimple_pass" to
5481 "gimple_or_rtl_pass". If __RTL was seen, call
5482 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
5483 to an auto_timevar, to cope with early exit.
5484 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
5485 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
5486 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
5487 Handle RID_RTL.
5488 (c_parser_parse_rtl_body): New function.
5489 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
5490 (struct c_declspecs): Rename field "gimple_pass" to
5491 "gimple_or_rtl_pass". Add field "rtl_p".
5492 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
5493 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
5494 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
5495 (c_parser_gimple_or_rtl_pass_list): ...this.
5496
2ebd93e1
MP
54972017-01-20 Marek Polacek <polacek@redhat.com>
5498
5499 PR c/64279
5500 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
5501
b1c95bb5
RB
55022017-01-13 Richard Biener <rguenther@suse.de>
5503
5504 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
5505 nops.
5506
25329913
RB
55072017-01-13 Richard Biener <rguenther@suse.de>
5508
5509 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5510 _Literal ( type-name ) number.
5511
6bb4ea5c
RB
55122017-01-12 Richard Biener <rguenther@suse.de>
5513
5514 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
5515 __MEM.
5516
6b5b4e9c
JJ
55172017-01-11 Jakub Jelinek <jakub@redhat.com>
5518
5519 PR c++/72813
5520 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
5521 PCH file.
5522
e3252775
RB
55232017-01-11 Richard Biener <rguenther@suse.de>
5524
5525 PR bootstrap/79052
5526 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
5527 returns on parse errors.
5528
a9342885
MP
55292017-01-04 Marek Polacek <polacek@redhat.com>
5530
5531 PR c++/64767
5532 * c-parser.c (c_parser_postfix_expression): Mark zero character
5533 constants by setting original_type in c_expr.
5534 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
5535 with a zero character constant.
5536 (char_type_p): New function.
5537
5dd9a9d0
DM
55382017-01-04 David Malcolm <dmalcolm@redhat.com>
5539
5540 * c-parser.c (c_parser_declaration_or_fndef): Create a
5541 rich_location at init_loc and parse it to start_init.
5542 (last_init_list_comma): New global.
5543 (c_parser_braced_init): Update last_init_list_comma when parsing
5544 commas. Pass it to pop_init_level. Pass location of closing
5545 brace to pop_init_level.
5546 (c_parser_postfix_expression_after_paren_type): Create a
5547 rich_location at type_loc and parse it to start_init.
5548 (c_parser_omp_declare_reduction): Likewise for loc.
5549 * c-tree.h (start_init): Add rich_location * param.
5550 (pop_init_level): Add location_t param.
5551 * c-typeck.c (struct initializer_stack): Add field
5552 "missing_brace_richloc".
5553 (start_init): Add richloc param, use it to initialize
5554 the stack node's missing_brace_richloc.
5555 (last_init_list_comma): New decl.
5556 (finish_implicit_inits): Pass last_init_list_comma to
5557 pop_init_level.
5558 (push_init_level): When finding missing open braces, add fix-it
5559 hints to the richloc.
5560 (pop_init_level): Add "insert_before" param and pass it
5561 when calling pop_init_level. Add fixits about missing
5562 close braces to any richloc. Use the richloc for the
5563 -Wmissing-braces warning.
5564 (set_designator): Pass last_init_list_comma to pop_init_level.
5565 (process_init_element): Likewise.
5566
cbe34bb5
JJ
55672017-01-01 Jakub Jelinek <jakub@redhat.com>
5568
5569 Update copyright years.
5570
d17680f3
JJ
55712016-12-21 Jakub Jelinek <jakub@redhat.com>
5572
0dba7960
JJ
5573 PR bootstrap/78817
5574 * c-typeck.c (build_function_call_vec): If check_function_arguments
5575 returns true, set TREE_NO_WARNING on CALL_EXPR.
5576
d17680f3
JJ
5577 PR c/77767
5578 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
5579 to *expr instead of overwriting it.
5580
aa90531e
RB
55812016-12-20 Richard Biener <rguenther@suse.de>
5582
5583 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
5584 error recovery.
5585 (c_parser_gimple_statement): Only build assigns for non-error
5586 stmts.
5587 (c_parser_gimple_postfix_expression_after): Improve error recovery.
5588
629b3d75
MJ
55892016-12-14 Martin Jambor <mjambor@suse.cz>
5590
5591 * c-parser.c: Include omp-general.h and omp-offload.h instead of
5592 omp-low.h.
5593 (c_finish_oacc_routine): Adjusted call to
5594 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
5595 to use their new names.
5596 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
5597 use its new name.
5598 (c_parser_oacc_update): Likewise.
5599 (c_parser_omp_simd): Likewise.
5600 (c_parser_omp_target_update): Likewise.
5601 * c-typeck.c: Include omp-general.h instead of omp-low.h.
5602 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
5603 name.
5604 (c_finish_omp_cancellation_point): Likewise.
5605 * gimple-parser.c: Do not include omp-low.h
5606
c5af52eb
CP
56072016-12-02 Cesar Philippidis <cesar@codesourcery.com>
5608 James Norris <jnorris@codesourcery.com>
5609
5610 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
5611 EXIT_DATA,WAIT} are not used in compound statements.
5612 (c_parser_oacc_enter_exit_data): Update diagnostics.
5613
48330c93
BE
56142016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5615
5616 PR c++/71973
5617 * c-decl.c (diagnose_mismatched_decls): Use
5618 OPT_Wbuiltin_declaration_mismatch here too.
5619
899ca90e 56202016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
5621 Alan Hayward <alan.hayward@arm.com>
5622 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
5623
5624 * c-decl.c (merge_decls): Use SET_DECL_MODE.
5625 (make_label, finish_struct): Likewise.
5626
1ee62b92 56272016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 5628 Richard Biener <rguenther@suse.de>
22b15758 5629
8e745a17
JJ
5630 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
5631 * config-lang.in (gtfiles): Add c/c-parser.h.
5632 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
5633 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
5634 * c-parser.c (enum c_id_kind, struct c_token,
5635 c_parser_next_token_is, c_parser_next_token_is_not,
5636 c_parser_next_token_is_keyword,
5637 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
5638 Split out to ...
5639 * c-parser.h: ... new header.
5640 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 5641 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
5642 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5643 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5644 c_parser_error, c_parser_require, c_parser_skip_until_found,
5645 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5646 c_parser_type_name): Export.
5647 (c_parser_tokens_buf): New function.
5648 (c_parser_error): Likewise.
5649 (c_parser_set_error): Likewise.
5650 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
5651 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
5652 via c_parser_parse_gimple_body.
8e745a17
JJ
5653 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
5654 c_token_starts_typename, c_parser_next_token_starts_declspecs,
5655 c_parser_next_tokens_start_declaration, c_parser_consume_token,
5656 c_parser_error, c_parser_require, c_parser_skip_until_found,
5657 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
5658 c_parser_type_name): Declare.
1ee62b92
PG
5659 (struct c_parser): Declare forward.
5660 (c_parser_tokens_buf): Declare.
8e745a17
JJ
5661 (c_parser_error): Likewise.
5662 (c_parser_set_error): Likewise.
5663 * gimple-parser.c: New file.
5664 * gimple-parser.h: Likewise.
1ee62b92 5665
22b15758
UB
56662016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5667
5668 PR c/35503
5669 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5670 warn_for_restrict.
5671
84ff4775
LCW
56722016-09-11 Le-Chun Wu <lcwu@google.com>
5673 Mark Wielaard <mjw@redhat.com>
5674
5675 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
5676 to the given -Wshadow= variant.
5677
4d0cdd0c
TP
56782016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5679
5680 * c-typeck.c: Include memmodel.h.
5681
1202f33e
JJ
56822016-10-13 Jakub Jelinek <jakub@redhat.com>
5683
5684 PR target/77957
5685 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
5686 instead of lhd_return_null_tree_v.
5687
8a14afd0
BS
56882016-10-07 Bernd Schmidt <bschmidt@redhat.com>
5689
5690 PR c++/69733
5691 * c-decl.c (smallest_type_quals_location): New static function.
5692 (grokdeclarator): Try to find the correct location for an ignored
5693 qualifier.
5694
81fea426
MP
56952016-09-26 Marek Polacek <polacek@redhat.com>
5696
5697 PR c/7652
5698 * c-decl.c (pop_scope): Add gcc_fallthrough.
5699
57002016-09-26 Marek Polacek <polacek@redhat.com>
5701
5702 PR c/7652
5703 * c-parser.c (struct c_token): Add flags field.
5704 (c_lex_one_token): Pass it to c_lex_with_flags.
5705 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
5706 into IFN_FALLTHROUGH.
5707 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
5708 attribute fallthrough after a case label or default label.
5709 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
5710
9a2300e9
MP
57112016-09-24 Marek Polacek <polacek@redhat.com>
5712
5713 PR c/77490
5714 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
5715 have boolean value. Warn about ++/-- on booleans.
5716
7de76362
JJ
57172016-09-23 Jakub Jelinek <jakub@redhat.com>
5718
5719 * c-parser.c (incomplete_record_decls): Remove unnecessary
5720 = vNULL initialization of file scope vec.
5721
5b73d2ab
MP
57222016-09-16 Marek Polacek <polacek@redhat.com>
5723
5724 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
5725
e51fbec3
MP
57262016-09-14 Marek Polacek <polacek@redhat.com>
5727
5728 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
5729 (fix_array_notation_expr): Likewise.
5730 * c-decl.c (finish_decl): Likewise.
5731 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
5732 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
5733 (function_to_pointer_conversion): Use false instead of 0.
5734 (convert_lvalue_to_rvalue): Likewise.
5735 (parser_build_unary_op): Likewise.
5736 (build_atomic_assign): Likewise.
5737 (build_unary_op): Change nonconvert parameter type to bool, use
5738 true/false instead of 1/0.
5739 (build_binary_op): Use true instead of 1.
5740
254830ba
DM
57412016-09-13 David Malcolm <dmalcolm@redhat.com>
5742
5743 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
5744 of add_fixit_insert to add_fixit_insert_before.
5745
4c13ba17
MP
57462016-09-13 Marek Polacek <polacek@redhat.com>
5747
5748 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
5749 it.
5750
54dcdb88
BE
57512016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5752
5753 PR c++/77496
5754 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
5755 COMPOUND_EXPR to warn_for_omitted_condop.
5756
e5106e27
DM
57572016-09-07 David Malcolm <dmalcolm@redhat.com>
5758
5759 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
5760 c_get_substring_location for this new langhook.
5761
9dc5773f
JJ
57622016-09-02 Jakub Jelinek <jakub@redhat.com>
5763
5764 PR c/65467
5765 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
5766 flag_openmp.
5767 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
5768 instead of mark_exp_read on low_bound/length expression.
5769 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
5770 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5771 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5772 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
5773 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
5774 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
5775 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
5776 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
5777 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
5778 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
5779 instead of mark_expr_read.
5780 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
5781 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
5782 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
5783 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
5784 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
5785 array section bases outside of depend clause, for depend clause
5786 use convert_lvalue_to_rvalue on the base.
5787 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
5788 linear, aligned, map, to and from clauses.
5789 (c_omp_clause_copy_ctor): New function.
5790
295844f6
MP
57912016-09-01 Marek Polacek <polacek@redhat.com>
5792
5793 PR c/7652
5794 * c-typeck.c (composite_type): Add FALLTHRU comment.
5795
089af25c
DM
57962016-08-31 David Malcolm <dmalcolm@redhat.com>
5797
5798 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
5799 to the insertion fixits for "struct", "union", and "enum".
5800
f9087798
DM
58012016-08-30 David Malcolm <dmalcolm@redhat.com>
5802
5803 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
5804 rather than add_fixit_misspelled_id.
5805 (undeclared_variable): Likewise.
5806 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
5807 now-redundant "here" params from add_fixit_insert method calls.
5808 (c_parser_parameter_declaration): Likewise.
5809 * c-typeck.c (build_component_ref): Remove now-redundant range
5810 param from add_fixit_replace method calls.
5811
ebef225f
MP
58122016-08-25 Marek Polacek <polacek@redhat.com>
5813
5814 * c-typeck.c (parser_build_binary_op): Pass LHS to
5815 warn_logical_not_parentheses.
5816
fe377a48
MP
58172016-08-25 Marek Polacek <polacek@redhat.com>
5818
5819 PR c/77323
5820 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
5821 or _FloatN or _FloatNx is not supported.
5822 (finish_declspecs): Set type to integer_type_node when _FloatN or
5823 _FloatNx is not supported.
5824
c65699ef
JM
58252016-08-19 Joseph Myers <joseph@codesourcery.com>
5826
5827 PR c/32187
5828 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
5829 (struct c_declspecs): Add field floatn_nx_idx.
5830 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
5831 and _FloatNx type specifiers.
5832 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
5833 (c_parser_declspecs, c_parser_attribute_any_word)
5834 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
5835 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
5836 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
5837 narrower than double.
5838
2f1364c2
JJ
58392016-08-12 Jakub Jelinek <jakub@redhat.com>
5840 Martin Liska <mliska@suse.cz>
5841
5842 PR c/67410
5843 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
5844 % to determine val element to change. Assert that
5845 wchar_bytes * charwidth fits into val array.
5846
191816a3
MP
58472016-08-12 Marek Polacek <polacek@redhat.com>
5848
5849 PR c/7652
5850 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
5851 (c_parser_postfix_expression): Likewise.
5852 * c-typeck.c (build_unary_op): Adjust fall through comment.
5853 (c_mark_addressable): Likewise.
5854
b95a64bb
JJ
58552016-08-11 Jakub Jelinek <jakub@redhat.com>
5856
5857 PR c/72816
5858 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
5859 array member through typedef, for orig_qual_indirect == 0 clear
5860 orig_qual_type.
5861
895aa8e1
DM
58622016-08-08 David Malcolm <dmalcolm@redhat.com>
5863
5864 PR c/64955
5865 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
5866 this up to selftest::run_c_tests.
5867 (selftest::run_c_tests): New function.
5868
0b212d8c
TS
58692016-08-04 Thomas Schwinge <thomas@codesourcery.com>
5870
ae9281fc
TS
5871 * c-parser.c (struct oacc_routine_data): Add error_seen and
5872 fndecl_seen members.
5873 (c_finish_oacc_routine): Use these.
5874 (c_parser_declaration_or_fndef): Adjust.
5875 (c_parser_oacc_routine): Likewise. Support more C language
5876 constructs, and improve diagnostics. Move pragma context
5877 checking...
5878 (c_parser_pragma): ... here.
5879
0b212d8c
TS
5880 * c-parser.c (struct oacc_routine_data): New.
5881 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
5882 Simplify code.
5883 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
5884 declare target" attribute.
5885
76e2c821
JB
58862016-08-01 Jan Beulich <jbeulich@suse.com>
5887
5888 * c-fold.c (c_fully_fold_internal): Also emit shift count
5889 warnings for vector types.
5890 * c-typeck.c (build_binary_op): Likewise.
5891
f618a472
MP
58922016-07-29 Marek Polacek <polacek@redhat.com>
5893
5894 PR c/71742
5895 * c-decl.c (finish_struct): Rephrase an error message.
5896
efd0786f
MP
5897 PR c/71853
5898 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
5899 to error node for invalid code.
5900
e00dceaf
MP
5901 PR c/71573
5902 * c-decl.c (implicitly_declare): Return decl early not only for
5903 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
5904
673a107a
JJ
59052016-07-29 Jakub Jelinek <jakub@redhat.com>
5906
5907 PR c/71969
5908 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
5909 on GNU extern inline functions.
5910
a5b5c8b6
MP
59112016-07-29 Marek Polacek <polacek@redhat.com>
5912
5913 PR c/71583
5914 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
5915 check expr.value.
5916
e3fe09c1
UB
59172016-07-22 Uros Bizjak <ubizjak@gmail.com>
5918
5919 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
5920
7c8f7eaa
DM
59212016-07-20 David Malcolm <dmalcolm@redhat.com>
5922
5923 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
5924 spellcheck-tree.h
5925 (best_macro_match): Likewise, converting from a typedef to a
5926 subclass.
5927 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
5928 (lookup_name_fuzzy): Update for change of best_macro_match to a
5929 subclass with a ctor that calls cpp_forall_identifiers.
5930
de6a69ee
DM
59312016-07-20 David Malcolm <dmalcolm@redhat.com>
5932
5933 * c-decl.c (implicit_decl_warning): Update for conversion of
5934 return type of lookup_name_fuzzy to const char *.
5935 (undeclared_variable): Likewise.
5936 (lookup_name_fuzzy): Convert return type from tree to
5937 const char *.
5938 * c-parser.c (c_parser_declaration_or_fndef): Update for
5939 conversion of return type of lookup_name_fuzzy to const char *.
5940 (c_parser_parameter_declaration): Likewise.
5941
b1c9c068
CP
59422016-07-15 Cesar Philippidis <cesar@codesourcery.com>
5943
5944 * c-parser.c (c_parser_oacc_declare): Don't scan for
5945 GOMP_MAP_POINTER.
5946 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
5947 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
5948 zero-length subarrays.
5949
ddbbcb19
JJ
59502016-07-15 Jakub Jelinek <jakub@redhat.com>
5951
5952 PR c/71858
5953 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
5954 instead of FUZZY_LOOKUP_NAME.
5955 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
5956 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
5957
dd36b877
JJ
59582016-07-14 Jakub Jelinek <jakub@redhat.com>
5959
5960 PR c/71858
5961 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
5962
8c681247
TS
59632016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5964
5965 * c-parser.c (c_parser_generic_selection): Make type of variable
5966 auto_vec.
5967 (c_parser_omp_declare_simd): Likewise.
5968
bf4fa671
TS
59692016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5970
5971 * c-decl.c (struct c_struct_parse_info): Change member types
5972 from vec to auto_vec.
5973 (start_struct): Adjust.
5974 (finish_struct): Likewise.
5975
557e8c49
JJ
59762016-07-02 Jakub Jelinek <jakub@redhat.com>
5977
5978 PR c/71719
5979 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
5980
54d19c3b
TS
59812016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5982
5983 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
5984 Move pragma context checking into...
5985 (c_parser_omp_cancellation_point): ... here, and improve
5986 diagnostic messages.
5987 * c-typeck.c (c_finish_omp_cancel)
5988 (c_finish_omp_cancellation_point): Improve diagnostic messages.
5989
152ef731
JJ
59902016-06-29 Jakub Jelinek <jakub@redhat.com>
5991
5992 PR c/71685
5993 * c-typeck.c (c_build_qualified_type): Don't clear
5994 C_TYPE_INCOMPLETE_VARS for the main variant.
5995
59962016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
5997
5998 PR c/71552
5999 * c-typeck.c (output_init_element): Diagnose incompatible types
6000 before non-constant initializers.
6001
e9ac1f86
JJ
60022016-06-28 Jakub Jelinek <jakub@redhat.com>
6003
6004 * Make-lang.in: Don't cat ../stage_current if it does not exist.
6005
277d7ee0
AK
60062016-06-23 Andi Kleen <ak@linux.intel.com>
6007
6008 * Make-lang.in: Add support for autofdo.
6009
1a4f11c8
DM
60102016-06-22 David Malcolm <dmalcolm@redhat.com>
6011
6012 PR c/70339
6013 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
6014 (implicit_decl_warning): When issuing warnings for implicit
6015 declarations, attempt to provide a suggestion via
6016 lookup_name_fuzzy.
6017 (undeclared_variable): Likewise when issuing errors.
6018 (lookup_name_in_scope): Likewise.
6019 (struct edit_distance_traits<cpp_hashnode *>): New struct.
6020 (best_macro_match): New typedef.
6021 (find_closest_macro_cpp_cb): New function.
6022 (lookup_name_fuzzy): New function.
6023 * c-parser.c: Include gcc-rich-location.h.
6024 (c_token_starts_typename): Split out case CPP_KEYWORD into...
6025 (c_keyword_starts_typename): ...this new function.
6026 (c_parser_declaration_or_fndef): When issuing errors about
6027 missing "struct" etc, add a fixit. For other kinds of errors,
6028 attempt to provide a suggestion via lookup_name_fuzzy.
6029 (c_parser_parms_declarator): When looking ahead to detect typos in
6030 type names, also reject CPP_KEYWORD.
6031 (c_parser_parameter_declaration): When issuing errors about
6032 unknown type names, attempt to provide a suggestion via
6033 lookup_name_fuzzy.
6034 * c-tree.h (c_keyword_starts_typename): New prototype.
6035
5a578671
JM
60362016-06-20 Joseph Myers <joseph@codesourcery.com>
6037
6038 PR c/71601
6039 * c-typeck.c (build_conditional_expr): Return error_mark_node if
6040 c_common_type returns error_mark_node.
6041
3f8257db 60422016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
6043
6044 PR c/69507
6045 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
6046 __alignof__ (expression).
6047
6a3f203c
DM
60482016-06-14 David Malcolm <dmalcolm@redhat.com>
6049
6050 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
6051
264757fb
DM
60522016-06-14 David Malcolm <dmalcolm@redhat.com>
6053
6054 * c-typeck.c (build_component_ref): Simplify fixit code by
6055 using gcc_rich_location::add_fixit_misspelled_id.
6056 (set_init_label): Likewise.
6057
f7e4f2e3
DM
60582016-06-13 David Malcolm <dmalcolm@redhat.com>
6059
6060 * c-parser.c (c_parser_initelt): Provide location of name for new
6061 location_t param of set_init_label.
6062 * c-tree.h (set_init_label): Add location_t param.
6063 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
6064 param and use it when issuing error messages about unrecognized
6065 field names. Attempt to provide a fixit hint if appropriate,
6066 otherwise update the error message to provide the type name.
6067
4b1ffdb1
TS
60682016-06-10 Thomas Schwinge <thomas@codesourcery.com>
6069
6070 PR c/71381
6071 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
6072 Loosen checking.
6073
44a845ca
MS
60742016-06-08 Martin Sebor <msebor@redhat.com>
6075 Jakub Jelinek <jakub@redhat.com>
6076
6077 PR c++/70507
6078 PR c/68120
6079 * c-typeck.c (convert_arguments): Don't promote last argument
6080 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6081
92a5f2ba
MP
60822016-06-08 Marek Polacek <polacek@redhat.com>
6083
6084 PR c/71418
6085 * c-decl.c (grokdeclarator): Check TYPE_P.
6086
08203f73
MP
6087 PR c/71426
6088 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
6089 code.
6090
6ffd47b7
DM
60912016-06-07 David Malcolm <dmalcolm@redhat.com>
6092
6093 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
6094 and structure element reference, capture the location of the
6095 element name token and pass it to build_component_ref.
6096 (c_parser_postfix_expression_after_primary): Likewise for
6097 structure element dereference.
6098 (c_parser_omp_variable_list): Likewise for
6099 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
6100 * c-tree.h (build_component_ref): Add location_t param.
6101 * c-typeck.c (build_component_ref): Add location_t param
6102 COMPONENT_LOC. Use it, if available, when issuing hints about
6103 mispelled member names to provide a fixit replacement hint.
6104
1f40cff3
MP
61052016-06-06 Marek Polacek <polacek@redhat.com>
6106
6107 PR c/71362
6108 * c-parser.c (c_parser_direct_declarator): Set location.
6109
5545a907
MP
61102016-06-06 Marek Polacek <polacek@redhat.com>
6111
6112 * c-typeck.c (comptypes_internal): Handle comparisons of
6113 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
6114 TYPE_REF_CAN_ALIAS_ALL.
6115
b605f663
CLT
61162016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
6117
6118 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
6119 arguments as addressable when async clause exists.
6120
00631022
JJ
61212016-05-30 Jakub Jelinek <jakub@redhat.com>
6122
6123 PR c++/71349
6124 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
6125 when combined with target construct.
6126
7211a097
JJ
61272016-05-26 Jakub Jelinek <jakub@redhat.com>
6128
6129 * c-parser.c (c_parser_omp_clause_schedule): Warn if
6130 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
6131
95efe6b6
MP
61322016-05-25 Marek Polacek <polacek@redhat.com>
6133
6134 PR c/71265
6135 * c-decl.c (c_make_fname_decl): Don't check seen_error.
6136
a23faf7a
MP
6137 PR c/71266
6138 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
6139
e46c7770
CP
61402016-05-24 Cesar Philippidis <cesar@codesourcery.com>
6141
6142 * c-parser.c (c_parser_oacc_declare): Add support for
6143 GOMP_MAP_FIRSTPRIVATE_POINTER.
6144 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
6145 argument with enum c_omp_region_type ort.
6146 (handle_omp_array_sections): Likewise. Update call to
6147 handle_omp_array_sections_1.
6148 (c_finish_omp_clauses): Add specific errors and warning messages for
6149 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
6150 call to handle_omp_array_sections.
6151
a04e69c0
TS
61522016-05-24 Thomas Schwinge <thomas@codesourcery.com>
6153
6154 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
6155
f17a223d
RB
61562016-05-24 Richard Biener <rguenther@suse.de>
6157
6158 PR middle-end/70434
6159 PR c/69504
6160 * c-typeck.c (build_array_ref): Do not complain about indexing
6161 non-lvalue vectors. Adjust for function name change.
6162
79063edd
MS
61632016-05-20 Martin Sebor <msebor@redhat.com>
6164
6165 PR c/71115
6166 * c-typeck.c (error_init): Use
6167 expansion_point_location_if_in_system_header.
6168 (warning_init): Same.
6169
8a40fef3
DM
61702016-05-19 David Malcolm <dmalcolm@redhat.com>
6171
6172 PR c/71171
6173 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
6174 in error-handling.
6175 (c_parser_postfix_expression): Likewise.
6176 * c-tree.h (c_expr::set_error): New method.
6177 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
6178 that result's range is initialized.
6179
e9892350
JG
61802016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
6181
6182 * c-typeck.c (parser_build_unary_op): Fix formatting.
6183
8fad45f5
MW
61842016-05-16 Matthew Wahab <matthew.wahab@arm.com>
6185
6186 * c-decl.c (grokdeclarator): Remove errmsg and use of
6187 targetm.invalid_return_type.
6188 (grokparms): Remove errmsg and use of
6189 targetm.invalid_parameter_type.
6190
aa4b467b
JM
61912016-05-13 Joseph Myers <joseph@codesourcery.com>
6192
6193 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
6194 function return type.
6195
4f2e1536
MP
61962016-05-12 Marek Polacek <polacek@redhat.com>
6197
6198 PR c/70756
6199 * c-decl.c (build_compound_literal): Pass LOC down to
6200 c_incomplete_type_error.
6201 * c-tree.h (require_complete_type): Adjust declaration.
6202 (c_incomplete_type_error): Likewise.
6203 * c-typeck.c (require_complete_type): Add location parameter, pass it
6204 down to c_incomplete_type_error.
6205 (c_incomplete_type_error): Add location parameter, pass it down to
6206 error_at.
6207 (build_component_ref): Pass location down to c_incomplete_type_error.
6208 (default_conversion): Pass location down to require_complete_type.
6209 (build_array_ref): Likewise.
6210 (build_function_call_vec): Likewise.
6211 (convert_arguments): Likewise.
6212 (build_unary_op): Likewise.
6213 (build_c_cast): Likewise.
6214 (build_modify_expr): Likewise.
6215 (convert_for_assignment): Likewise.
6216 (c_finish_omp_clauses): Likewise.
6217
d6e83a8d
MM
62182016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6219
6220 PR c/43651
6221 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
6222 is enabled.
6223 * c-errors.c (pedwarn_c90): Return true if warned.
6224 * c-tree.h (pedwarn_c90): Change return type to bool.
6225 (enum c_declspec_word): Add new enumerator cdw_atomic.
6226
5c3a10fb
MP
62272016-05-11 Marek Polacek <polacek@redhat.com>
6228
6229 PR c++/71024
6230 * c-decl.c (diagnose_mismatched_decls): Factor out code to
6231 diagnose_mismatched_attributes and call it.
6232
cf68d92c
MP
62332016-05-10 Marek Polacek <polacek@redhat.com>
6234
6235 PR c/70255
6236 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
6237 on a declaration following the definition.
6238
351f85c5
JJ
62392016-05-05 Jakub Jelinek <jakub@redhat.com>
6240
6241 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
6242 parse it through to c_parser_c99_block_statement.
6243 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
6244 caller.
6245
deef7113
MP
62462016-05-04 Marek Polacek <polacek@redhat.com>
6247
6248 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
6249 OPT_Wdangling_else.
6250
de55efd5
MP
62512016-05-04 Marek Polacek <polacek@redhat.com>
6252
6253 PR c/48778
6254 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
6255 for macro expansions.
6256
79ce98bc
MP
62572016-05-03 Marek Polacek <polacek@redhat.com>
6258
6259 PR c/70859
6260 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
6261 check_builtin_function_arguments.
6262
fb2647aa
RB
62632016-05-03 Richard Biener <rguenther@suse.de>
6264
6265 * Make-lang.in (cc1-checksum.c): For stage-final re-use
6266 the checksum from the previous stage.
6267
77886428
CP
62682016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6269
6270 * c-parser.c (c_parser_oacc_all_clauses): Update call to
6271 c_finish_omp_clauses.
6272 (c_parser_omp_all_clauses): Likewise.
6273 (c_parser_oacc_cache): Likewise.
6274 (c_parser_oacc_loop): Likewise.
6275 (omp_split_clauses): Likewise.
6276 (c_parser_omp_declare_target): Likewise.
6277 (c_parser_cilk_all_clauses): Likewise.
6278 (c_parser_cilk_for): Likewise.
6279 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
6280 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
6281
7176a4a0
MP
62822016-05-02 Marek Polacek <polacek@redhat.com>
6283
6284 PR c/70851
6285 * c-decl.c (grokdeclarator): Diagnose when array's size has an
6286 incomplete type.
6287
e7ff0319
CP
62882016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6289
6290 PR middle-end/70626
6291 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
6292 OACC_LOOP_CLAUSE_MASK.
6293 (c_parser_oacc_kernels_parallel): Update call to
6294 c_oacc_split_loop_clauses.
6295
9f405ce1
AM
62962016-04-28 Andrew MacLeod <amacleod@redhat.com>
6297
6298 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
6299 argument to build_modify_expr in two cases.
6300
c1e1f433
BS
63012016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6302
6303 * c-parser.c (c_parser_postfix_expression_after_primary): Call
6304 warn_for_memset instead of warning directly here.
6305
2448a956
MP
63062016-04-26 Marek Polacek <polacek@redhat.com>
6307
6308 PR c/67784
6309 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
6310 out of ...
6311 (c_parser_for_statement): ... here.
6312 (c_parser_if_statement): Use it.
6313 (c_parser_switch_statement): Use it.
6314 (c_parser_while_statement): Use it.
6315
b02a5e26
MP
6316 PR c/70791
6317 * c-decl.c (pushdecl): Pass LOCUS down to warning.
6318
477d4906
IV
63192016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6320
6321 PR c++/69363
6322 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
6323 instead of c_finish_cilk_clauses.
6324 * c-tree.h (c_finish_omp_clauses): Add new default argument.
6325 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
6326 floating-point variables in the linear clause for Cilk Plus.
6327
fe37c7af
MM
63282016-04-18 Michael Matz <matz@suse.de>
6329
6330 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
6331 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
6332
949505a9
MP
63332016-04-15 Marek Polacek <polacek@redhat.com>
6334
6335 PR c/70671
6336 * c-typeck.c (build_unary_op): Pass location down to error and
6337 warning call.
6338
dda1bf61
JJ
63392016-04-15 Jakub Jelinek <jakub@redhat.com>
6340
6341 PR c/70436
6342 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
6343 where needed.
6344 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
6345 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
6346 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
6347 Adjust c_parser_pragma callers.
6348 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
6349 caller.
6350 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
6351 c_parser_statement.
6352 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
6353 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
6354 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
6355 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
6356 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
6357 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
6358 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
6359 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
6360 down where needed.
6361 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
6362 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
6363 calls.
6364
99cd9857
MP
63652016-04-13 Marek Polacek <polacek@redhat.com>
6366
6367 PR c/70436
6368 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
6369 adjust callers.
6370 (c_parser_statement): Likewise.
6371 (c_parser_c99_block_statement): Likewise.
6372 (c_parser_while_statement): Likewise.
6373 (c_parser_for_statement): Likewise.
6374 (c_parser_if_body): Don't set IF_P here.
6375 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
6376 about dangling else here.
6377 * c-tree.h (c_finish_if_stmt): Adjust declaration.
6378 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
6379 warn about dangling else here.
6380
f13355da
MP
63812016-04-04 Marek Polacek <polacek@redhat.com>
6382
6383 PR c/70307
6384 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
6385
5fde6a45
MP
63862016-03-31 Marek Polacek <polacek@redhat.com>
6387
6388 PR c/70297
6389 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
6390
4bbf545b
DM
63912016-03-18 David Malcolm <dmalcolm@redhat.com>
6392
6393 PR c/70281
6394 * c-parser.c (c_parser_postfix_expression): Set the source range
6395 for uses of "__builtin_types_compatible_p".
6396
fcc2b74f
JJ
63972016-03-17 Jakub Jelinek <jakub@redhat.com>
6398
6399 PR c/70280
6400 * c-typeck.c (composite_type): Don't count void_list_node
6401 into len, if the list is terminated by void_list_node, start
6402 with void_list_node instead of NULL for newargs. Stop
6403 at void_list_node.
6404
ab4c578f
MP
64052016-03-16 Marek Polacek <polacek@redhat.com>
6406
6407 PR c/70093
6408 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
6409 nested functions returning VM types.
6410
96b3c82d
CP
64112016-03-09 Cesar Philippidis <cesar@codesourcery.com>
6412
6413 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
6414 when calling c_finish_omp_clauses.
6415
29b9828f
BS
64162016-03-04 Bernd Schmidt <bschmidt@redhat.com>
6417
6418 PR c/69824
6419 * c-decl.c (get_parm_info): Don't queue implicit function declarations
6420 for later.
6421
7ff6ca38
MP
64222016-03-04 Marek Polacek <polacek@redhat.com>
6423
6424 PR c/69798
6425 * c-parser.c (c_parser_postfix_expression): Call
6426 c_parser_cast_expression rather than c_parser_postfix_expression.
6427
686e2237
JJ
64282016-03-01 Jakub Jelinek <jakub@redhat.com>
6429
6430 PR c/69796
6431 PR c/69974
6432 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
6433 of incomplete decls to error_mark_node.
6434
0b05329b
MP
64352016-02-24 Marek Polacek <polacek@redhat.com>
6436
6437 PR c/69819
6438 * c-decl.c (finish_decl): Don't update the copy of the type of a
6439 different decl type.
6440
067fbd8b
JJ
64412016-02-23 Jakub Jelinek <jakub@redhat.com>
6442
6443 PR objc/69844
6444 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
6445 in id_kind reclassification.
6446
bf14eba2
JJ
64472016-02-16 Jakub Jelinek <jakub@redhat.com>
6448
6449 PR c/69835
6450 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
6451
ba539195
JN
64522016-02-16 James Norris <jnorris@codesourcery.com>
6453
6454 PR c/64748
6455 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
6456
16595a1f
BS
64572016-02-12 Bernd Schmidt <bschmidt@redhat.com>
6458
f48dfe98
BS
6459 * c-decl.c (build_null_declspecs): Zero the entire struct.
6460
16595a1f
BS
6461 PR c/69522
6462 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
6463 callers changed. If nested_p is true, use it to call
6464 finish_implicit_inits.
6465 * c-tree.h (finish_implicit_inits): Declare.
6466 * c-typeck.c (finish_implicit_inits): New function. Move code
6467 from ...
6468 (push_init_level): ... here.
6469 (set_designator, process_init_element): Call finish_implicit_inits.
6470
66756373
JJ
64712016-02-11 Jakub Jelinek <jakub@redhat.com>
6472
6473 PR c/69768
6474 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
6475 arguments for -Waddress warning.
6476
1066e9b5
JJ
64772016-02-04 Jakub Jelinek <jakub@redhat.com>
6478
6479 PR c/69669
6480 * c-decl.c (finish_enum): When honoring mode attribute,
6481 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
6482
3a5d2ba4
JJ
64832016-01-29 Jakub Jelinek <jakub@redhat.com>
6484
6485 PR debug/69518
6486 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
6487 all type variants, not just TYPE_MAIN_VARIANT.
6488
cbdd8ae0
JJ
64892016-01-27 Jakub Jelinek <jakub@redhat.com>
6490
6491 PR debug/66869
6492 * c-decl.c (c_write_global_declarations_1): Warn with
6493 warn_unused_function if static prototype without definition
6494 is not C_DECL_USED.
6495
fa74a4bc
MP
64962016-01-27 Marek Polacek <polacek@redhat.com>
6497
6498 PR c/68062
6499 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
6500 to unsigned, if needed. Add -Wsign-compare warning.
6501
13f92e8d
JJ
65022016-01-26 Jakub Jelinek <jakub@redhat.com>
6503
6504 PR tree-optimization/69483
6505 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
6506
cd8e73dc 65072016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
6508
6509 PR c/24293
6510 * c-tree.h (incomplete_record_decls): Declare.
6511 * c-parser.c (incomplete_record_decls): Define.
6512 (c_parser_translation_unit): Iterate through incomplete_record_decls and
6513 report error if any decl has zero size.
6514 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
6515 or enum type to incomplete_record_decls.
6516
e6d6ec9e
TV
65172016-01-14 Tom de Vries <tom@codesourcery.com>
6518
6519 PR tree-optimization/68773
6520 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
6521 set force_output.
6522
00083992
MP
65232016-01-14 Marek Polacek <polacek@redhat.com>
6524
6525 PR c/69262
6526 * c-decl.c (grokdeclarator): Provide more information for invalid
6527 array declarations.
6528
7443cf13
DM
65292016-01-06 David Malcolm <dmalcolm@redhat.com>
6530
6531 * c-parser.c (c_parser_unary_expression): For dereferences, build
6532 a combined location before calling build_indirect_ref, so that
6533 error reports cover the full range, manually updating the c_expr
6534 src_range.
6535
6b131d5b
MP
65362016-01-06 Marek Polacek <polacek@redhat.com>
6537
6538 PR sanitizer/69099
6539 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
6540 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
6541 NULL.
6542
818ab71a
JJ
65432016-01-04 Jakub Jelinek <jakub@redhat.com>
6544
6545 Update copyright years.
6546
2fe0a208
MP
65472016-01-04 Marek Polacek <polacek@redhat.com>
6548
6549 PR c/68908
6550 * c-typeck.c (build_atomic_assign): Improve commentary. Add
6551 optimization to use __atomic_fetch_* built-in if possible.
6552
c7b48c8a
TS
65532015-12-23 Thomas Schwinge <thomas@codesourcery.com>
6554
6555 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
6556 into...
6557 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
6558 all users.
6559
fda5652f
MP
65602015-12-22 Marek Polacek <polacek@redhat.com>
6561
6562 PR c/69002
6563 * c-typeck.c (build_component_ref): Warn when acessing elements of
6564 atomic structures or unions.
6565
745e411d
DM
65662015-12-21 David Malcolm <dmalcolm@redhat.com>
6567
6568 * c-typeck.c: Include "gcc-rich-location.h".
6569 (build_binary_op): In the two places that call binary_op_error,
6570 create a gcc_rich_location and populate it with the location of
6571 the binary op and its two operands.
6572
94c40e19
DM
65732015-12-16 David Malcolm <dmalcolm@redhat.com>
6574
6575 * c-parser.c (c_parser_statement_after_labels): When calling
6576 c_finish_return, Use the return expression's location if it has
6577 one, falling back to the location of the first token within it.
6578 * c-typeck.c (c_finish_return): When issuing warnings about
6579 the incorrect presence/absence of a return value, issue a note
6580 showing the declaration of the function.
6581
de67c4c3
DM
65822015-12-16 David Malcolm <dmalcolm@redhat.com>
6583
6584 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
6585 to 4.
6586 (c_parser_peek_nth_token): New function.
6587 (c_parser_peek_conflict_marker): New function.
6588 (c_parser_error): Detect conflict markers and report them as such.
6589
a10704e1
DM
65902015-12-16 David Malcolm <dmalcolm@redhat.com>
6591
6592 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
6593 to preserve range information for the primary expression
6594 in the call to c_parser_postfix_expression_after_primary.
6595
8062bca6
DM
65962015-12-16 David Malcolm <dmalcolm@redhat.com>
6597
6598 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
6599 expression location, falling back on the first token location,
6600 rather than always using the latter.
6601
d06f8b75
MP
66022015-12-16 Marek Polacek <polacek@redhat.com>
6603
6604 PR c/64637
6605 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
6606 available.
6607
2994fb91
MP
66082015-12-15 Marek Polacek <polacek@redhat.com>
6609
6610 PR c/68907
6611 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
6612 artificial decl.
6613
a1b93f8d
DM
66142015-12-08 David Malcolm <dmalcolm@redhat.com>
6615
6616 * c-parser.c (c_parser_alignof_expression): Capture location of
6617 closing parenthesis (if any), or of end of unary expression, and
6618 use it to build a src_range for the expression.
6619
46c6e1e2
DM
66202015-12-08 David Malcolm <dmalcolm@redhat.com>
6621
6622 PR c/68757
6623 * c-parser.c (c_parser_get_builtin_args): Add
6624 "out_close_paren_loc" param, and write back to it.
6625 (c_parser_postfix_expression): Capture the closing
6626 parenthesis location for RID_CHOOSE_EXPR,
6627 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
6628 RID_BUILTIN_SHUFFLE and use it to set the source range
6629 for such expressions; within RID_BUILTIN_COMPLEX set
6630 the underlying location.
6631
66189108
MP
66322015-12-07 Marek Polacek <polacek@redhat.com>
6633
6634 PR c/68668
6635 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
6636 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
6637
f187980b
EB
66382015-12-04 Eric Botcazou <ebotcazou@adacore.com>
6639
6640 * c-tree.h (c_build_va_arg): Adjust prototype.
6641 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
6642 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
6643 parameter, adjust throughout and issue an error if EXPR is a component
6644 with reverse storage order.
6645
4250754e
JM
66462015-12-02 Jason Merrill <jason@redhat.com>
6647
6648 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6649 (c_fully_fold_internal, decl_constant_value_for_optimization):
6650 Move from c-common.c.
6651 * c-tree.h: Declare decl_constant_value_for_optimization.
6652 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
6653
e9e32ee6
JM
66542015-12-02 Joseph Myers <joseph@codesourcery.com>
6655
6656 PR c/68162
6657 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
6658 following link from declarator to next declarator. Track original
6659 qualified type and pass it to c_build_qualified_type.
6660 * c-typeck.c (c_build_qualified_type): Add arguments
6661 orig_qual_type and orig_qual_indirect.
6662
ff7a55bf
TS
66632015-12-02 Thomas Schwinge <thomas@codesourcery.com>
6664
6665 * c-parser.c (c_parser_omp_clause_name)
6666 (c_parser_oacc_all_clauses): Alphabetical sorting.
6667
657e4e47
JJ
66682015-12-02 Jakub Jelinek <jakub@redhat.com>
6669
6670 PR c/68533
6671 * c-decl.c (get_parm_info): Use b->locus instead of input_location
6672 for diagnostics.
6673
37d5ad46
JB
66742015-12-01 Julian Brown <julian@codesourcery.com>
6675 Cesar Philippidis <cesar@codesourcery.com>
6676 James Norris <James_Norris@mentor.com>
6677
6678 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
6679 (c_parser_oacc_clause_use_device): New function.
6680 (c_parser_oacc_all_clauses): Add use_device support.
6681 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
6682 (c_parser_oacc_host_data): New function.
6683 (c_parser_omp_construct): Add host_data support.
6684 * c-tree.h (c_finish_oacc_host_data): Add prototype.
6685 * c-typeck.c (c_finish_oacc_host_data): New function.
6686 (c_finish_omp_clauses): Add use_device support.
6687
a4850ce9
JH
66882015-11-29 Jan Hubicka <hubicka@ucw.cz>
6689
6690 PR c/67106
6691 * c-decl.c: Set TYPE_PACKED in variants.
6692
b58d3df2
ML
66932015-11-27 Martin Liska <mliska@suse.cz>
6694
6695 PR c++/68312
6696 * c-array-notation.c (fix_builtin_array_notation_fn):
6697 Use release_vec_vec instead of vec::release.
6698 (build_array_notation_expr): Likewise.
6699 (fix_conditional_array_notations_1): Likewise.
6700 (fix_array_notation_expr): Likewise.
6701 (fix_array_notation_call_expr): Likewise.
6702
aec17bfe
JJ
67032015-11-27 Jakub Jelinek <jakub@redhat.com>
6704
6705 PR c/63326
6706 * c-parser.c (c_parser_compound_statement_nostart): If
6707 last_label is true, use pragma_stmt instead of pragma_compound
6708 as second c_parser_pragma argument.
6709 (c_parser_omp_ordered, c_parser_omp_target_update,
6710 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
6711 false as second argument to c_parser_skip_to_pragma_eol after
6712 diagnosing standalone directives used in pragma_stmt context.
6713
688c4de0
IV
67142015-11-24 Ilya Verbin <ilya.verbin@intel.com>
6715
6716 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
6717 with "if (ENABLE_OFFLOADING)".
6718
cbd03aee
DM
67192015-11-23 David Malcolm <dmalcolm@redhat.com>
6720
6721 PR objc/68438
6722 * c-parser.c (c_parser_postfix_expression): Set up source ranges
6723 for various Objective-C constructs: Class.name syntax,
6724 @selector(), @protocol(), @encode(), and [] message syntax.
6725
a87a86e1
DM
67262015-11-20 David Malcolm <dmalcolm@redhat.com>
6727
6728 PR 62314
6729 * c-typeck.c (should_suggest_deref_p): New function.
6730 (build_component_ref): Special-case POINTER_TYPE when
6731 generating a "not a structure of union" error message, and
6732 suggest a "->" rather than a ".", providing a fix-it hint.
6733
8ece8dfb
DM
67342015-11-19 David Malcolm <dmalcolm@redhat.com>
6735
6736 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
6737 candidate into a new function, find_closest_identifier.
6738
433068cc
MP
67392015-11-19 Marek Polacek <polacek@redhat.com>
6740
6741 PR c/68412
6742 * c-typeck.c (parser_build_binary_op): Properly handle
6743 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
6744
bef08b71
DM
67452015-11-17 David Malcolm <dmalcolm@redhat.com>
6746
6747 * c-parser.c (set_c_expr_source_range): Bulletproof both
6748 overloaded implementations against NULL expr->value.
6749 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
6750 values.
6751 (c_parser_unary_expression): Likewise when handling addresses of
6752 labels.
6753 (c_parser_postfix_expression): Likewise for statement expressions,
6754 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
6755 __builtin_va_arg, and for __builtin_offset_of.
6756 (c_parser_postfix_expression_after_paren_type): Initialize expr's
6757 src_range using the range of the braced initializer.
6758 (c_parser_transaction_expression): Set src_range for "ret" to a
6759 sane pair of values.
6760
fff77217
KY
67612015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6762
6763 * c-parser.c (c_finish_omp_declare_simd): Look for
6764 "simd" attribute as well. Update error message.
6765
1d899da2
TS
67662015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6767
6768 * c-parser.c (c_parser_omp_declare_target): Adjust.
6769
e4606348
JJ
67702015-11-14 Jakub Jelinek <jakub@redhat.com>
6771
6772 * c-typeck.c (c_finish_omp_clauses): Don't mark
6773 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
6774
3e636daf
MP
67752015-11-14 Marek Polacek <polacek@redhat.com>
6776
6777 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
6778 * c-typeck.c: Likewise.
6779
ebedc9a3
DM
67802015-11-13 David Malcolm <dmalcolm@redhat.com>
6781
6782 * c-decl.c (warn_defaults_to): Pass line_table to
6783 rich_location ctor.
6784 * c-errors.c (pedwarn_c99): Likewise.
6785 (pedwarn_c90): Likewise.
6786 * c-parser.c (set_c_expr_source_range): New functions.
6787 (c_token::get_range): New method.
6788 (c_token::get_finish): New method.
6789 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
6790 based on the range from the start of the LHS to the end of the
6791 RHS.
6792 (c_parser_conditional_expression): Likewise, based on the range
6793 from the start of the cond.value to the end of exp2.value.
6794 (c_parser_binary_expression): Call set_c_expr_source_range on
6795 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
6796 (c_parser_cast_expression): Call set_c_expr_source_range on ret
6797 based on the cast_loc through to the end of the expr.
6798 (c_parser_unary_expression): Likewise, based on the
6799 op_loc through to the end of op.
6800 (c_parser_sizeof_expression) Likewise, based on the start of the
6801 sizeof token through to either the closing paren or the end of
6802 expr.
6803 (c_parser_postfix_expression): Likewise, using the token range,
6804 or from the open paren through to the close paren for
6805 parenthesized expressions.
6806 (c_parser_postfix_expression_after_primary): Likewise, for
6807 various kinds of expression.
6808 * c-tree.h (struct c_expr): Add field "src_range".
6809 (c_expr::get_start): New method.
6810 (c_expr::get_finish): New method.
6811 (set_c_expr_source_range): New decls.
6812 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
6813 on ret for prefix unary ops.
6814 (parser_build_binary_op): Likewise, running from the start of
6815 arg1.value through to the end of arg2.value.
6816
ec8b536f
MP
68172015-11-13 Marek Polacek <polacek@redhat.com>
6818
6819 PR c/68320
6820 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
6821
277fe616
DM
68222015-11-13 David Malcolm <dmalcolm@redhat.com>
6823
6824 * c-typeck.c: Include spellcheck.h.
6825 (lookup_field_fuzzy_find_candidates): New function.
6826 (lookup_field_fuzzy): New function.
6827 (build_component_ref): If the field was not found, try using
6828 lookup_field_fuzzy and potentially offer a suggestion.
6829
6e232ba4
JN
68302015-11-12 James Norris <jnorris@codesourcery.com>
6831 Joseph Myers <joseph@codesourcery.com>
6832
6833 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
6834 (c_parser_omp_clause_name): Handle 'device_resident' clause.
6835 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6836 and PRAGMA_OMP_CLAUSE_LINK.
6837 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
6838 and PRAGMA_OACC_CLAUSE_LINK.
6839 (OACC_DECLARE_CLAUSE_MASK): New definition.
6840 (c_parser_oacc_declare): New function.
6841
9be4f715
MP
68422015-11-12 Marek Polacek <polacek@redhat.com>
6843
6844 PR c/67784
6845 * c-parser.c (c_parser_for_statement): Reclassify the token in
6846 a correct scope.
6847
e78bede6
MP
68482015-11-11 Marek Polacek <polacek@redhat.com>
6849
6850 PR c/68107
6851 PR c++/68266
6852 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
6853 checking the size of an array.
6854
69f293c9
AM
68552015-11-11 Andrew MacLeod <amacleod@redhat.com>
6856
6857 * c-array-notation.c: Remove unused header files.
6858 * c-aux-info.c: Likewise.
6859 * c-convert.c: Likewise.
6860 * c-decl.c: Likewise.
6861 * c-errors.c: Likewise.
6862 * c-lang.c: Likewise.
6863 * c-objc-common.c: Likewise.
6864 * c-parser.c: Likewise.
6865 * c-typeck.c: Likewise.
6866 * gccspec.c: Likewise.
6867
3a40d81d
NS
68682015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6869 Cesar Philippidis <cesar@codesourcery.com>
6870 James Norris <jnorris@codesourcery.com>
6871 Julian Brown <julian@codesourcery.com>
6872 Nathan Sidwell <nathan@codesourcery.com>
6873
3a40d81d
NS
6874 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
6875 routine arg.
6876 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
6877 (c_parser_pragma): Parse 'acc routine'.
6878 (OACC_ROUTINE_CLAUSE_MARK): Define.
6879 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
6880
fc402eec
AA
68812015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6882
6883 PR debug/67192
6884 * c-typeck.c (c_finish_loop): For unconditional loops, set the
6885 location of the backward-goto to the start of the loop body.
6886
f6b0b3db
AA
68872015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
6888
6889 PR debug/67192
6890 * c-parser.c (c_parser_while_statement): Finish the loop before
6891 parsing ahead for misleading indentation.
6892 (c_parser_for_statement): Likewise.
6893
ee45a32d
EB
68942015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6895
6896 * c-decl.c (finish_struct): If the structure has reverse storage
6897 order, rewrite the type of array fields with scalar component. Call
6898 maybe_apply_pragma_scalar_storage_order on entry.
6899 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
6900 errors on bit-fields and reverse SSO here and not...
6901 (c_mark_addressable): ...here.
6902 (output_init_element): Adjust call to initializer_constant_valid_p.
6903 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
6904
8a645150
DM
69052015-11-06 David Malcolm <dmalcolm@redhat.com>
6906
6907 * c-decl.c (warn_defaults_to): Update for change in signature
6908 of diagnostic_set_info.
6909 * c-errors.c (pedwarn_c99): Likewise.
6910 (pedwarn_c90): Likewise.
6911 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
6912 for textinfo::set_location.
6913
7a5e4956
CP
69142015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6915 Thomas Schwinge <thomas@codesourcery.com>
6916 James Norris <jnorris@codesourcery.com>
6917
6918 * c-parser.c (c_parser_omp_clause_name): Add support for
6919 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
6920 (c_parser_omp_clause_default): Add is_oacc argument. Handle
6921 default(none) in OpenACC.
6922 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
6923 arguments.
6924 (c_parser_oacc_clause_tile): New function.
6925 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
6926 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
6927 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
6928 TILE}.
6929 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
6930 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
6931 FIRSTPRIVATE}.
6932 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
6933 (c_parser_oacc_update): Update the error message for missing clauses.
6934 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
6935 and OMP_CLAUSE_INDEPENDENT.
6936
bfcfbfa0
MP
69372015-11-05 Marek Polacek <polacek@redhat.com>
6938
6939 PR c/68090
6940 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
6941 deal with pre-evaluation on invalid types.
6942
e01d41e5
JJ
69432015-11-05 Jakub Jelinek <jakub@redhat.com>
6944 Ilya Verbin <ilya.verbin@intel.com>
6945
6946 * c-parser.c: Include context.h and gimple-expr.h.
6947 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
6948 monotonic together with nonmonotonic.
6949 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
6950 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
6951 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
6952 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
6953 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
6954 expressions on combined target teams before the target.
6955 (c_parser_omp_declare_target): If decl has "omp declare target" or
6956 "omp declare target link" attribute, and cgraph or varpool node already
6957 exists, then set corresponding flags. Call c_finish_omp_clauses
6958 in the parenthesized extended-list syntax case.
6959 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
6960 declare target.
6961 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
6962 on OMP_CLAUSE_REDUCTION array sections.
6963 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
6964 into the constant offset, or for variable low-bound using
6965 POINTER_PLUS_EXPR. For structure element based array sections use
6966 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
6967 (c_finish_omp_clauses): Drop generic_field_head, structure
6968 elements are now always mapped even as array section bases,
6969 diagnose same var in data sharing and mapping clauses. Diagnose if
6970 linear step on declare simd is neither a constant nor a uniform
6971 parameter. Look through POINTER_PLUS_EXPR for array section
6972 reductions. Diagnose the same var or function appearing multiple
6973 times on the same directive. Fix up wording for the to clause if t
6974 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
6975 modifier on kinds other than dynamic or guided or nonmonotonic
6976 modifier together with ordered clause.
6977
4bf9e5a8
TS
69782015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6979 Chung-Lin Tang <cltang@codesourcery.com>
6980
6981 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
6982
2adfab87
AM
69832015-10-29 Andrew MacLeod <amacleod@redhat.com>
6984
6985 * c-array-notation.c: Reorder #include's and remove duplicates.
6986 * c-aux-info.c: Likewise.
6987 * c-convert.c: Likewise.
6988 * c-decl.c: Likewise.
6989 * c-errors.c: Likewise.
6990 * c-lang.c: Likewise.
6991 * c-objc-common.c: Likewise.
6992 * c-parser.c: Likewise.
6993 * c-typeck.c: Likewise.
6994
e922069e
JW
69952015-10-26 Jim Wilson <jim.wilson@linaro.org>
6996
6997 PR debug/66068
6998 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
6999 after calling build_qualified_type.
7000
765dd391
CP
70012015-10-27 Cesar Philippidis <cesar@codesourcery.com>
7002 Thomas Schwinge <thomas@codesourcery.com>
7003 James Norris <jnorris@codesourcery.com>
7004 Joseph Myers <joseph@codesourcery.com>
7005 Julian Brown <julian@codesourcery.com>
7006 Bernd Schmidt <bschmidt@redhat.com>
7007
7008 * c-parser.c (c_parser_oacc_shape_clause): New.
7009 (c_parser_oacc_simple_clause): New.
7010 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
7011 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
7012
88bae6f4
TS
70132015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7014 James Norris <jnorris@codesourcery.com>
7015 Cesar Philippidis <cesar@codesourcery.com>
7016
7017 PR c/64765
7018 PR c/64880
7019 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
7020 parameters, and handle these. Adjust all users.
7021 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
7022 into...
7023 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
7024 all users.
7025 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
7026 declare functions.
7027 (c_finish_omp_construct): Declare function.
7028 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
7029 Merge functions into...
7030 (c_finish_omp_construct): ... this new function.
7031
a8fc2579
RB
70322015-10-22 Richard Biener <rguenther@suse.de>
7033
7034 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
7035 before folding a MINUS_EXPR.
7036
e9122ef6
MP
70372015-10-21 Marek Polacek <polacek@redhat.com>
7038
7039 PR c/68024
7040 * c-decl.c (start_function): Warn about vararg functions without
7041 a prototype.
7042
9f47c7e5
IE
70432015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
7044
7045 * c-typeck.c (build_conditional_expr): Use boolean vector
7046 type for vector comparison.
7047 (build_vec_cmp): New.
7048 (build_binary_op): Use build_vec_cmp for comparison.
7049
fa60eeb9
MP
70502015-10-20 Marek Polacek <polacek@redhat.com>
7051
7052 * c-parser.c (is_cilkplus_vector_p): Don't define here.
7053
2c7020eb
MP
70542015-10-20 Marek Polacek <polacek@redhat.com>
7055
7056 PR c/67964
7057 * c-parser.c (c_parser_attributes): Break out of the loop if the
7058 token after an attribute isn't a comma.
7059
d9a6bd32
JJ
70602015-10-13 Jakub Jelinek <jakub@redhat.com>
7061 Aldy Hernandez <aldyh@redhat.com>
7062
7063 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
7064 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
7065 (c_parser_omp_variable_list): Handle structure elements for
7066 map, to and from clauses. Handle array sections in reduction
7067 clause. Formatting fixes.
7068 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
7069 if clause modifiers.
7070 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
7071 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
7072 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
7073 c_parser_omp_clause_is_device_ptr): New functions.
7074 (c_parser_omp_clause_ordered): Parse optional parameter.
7075 (c_parser_omp_clause_reduction): Handle array reductions.
7076 (c_parser_omp_clause_schedule): Parse optional simd modifier.
7077 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
7078 functions.
7079 (c_parser_omp_clause_linear): Parse linear clause modifiers.
7080 (c_parser_omp_clause_depend_sink): New function.
7081 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
7082 (c_parser_omp_clause_map): Parse release/delete map kinds and
7083 optional always modifier.
7084 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
7085 and c_finish_omp_clauses callers.
7086 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
7087 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
7088 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
7089 (OMP_CRITICAL_CLAUSE_MASK): Define.
7090 (c_parser_omp_critical): Parse critical clauses.
7091 (c_parser_omp_for_loop): Handle doacross loops, adjust
7092 c_finish_omp_for and c_finish_omp_clauses callers.
7093 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
7094 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
7095 (OMP_FOR_CLAUSE_MASK): Add linear clause.
7096 (c_parser_omp_for): Disallow ordered clause when combined with
7097 distribute. Disallow linear clause when combined with distribute
7098 and not combined with simd.
7099 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
7100 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
7101 parse clauses and if depend clause is found, don't parse a body.
7102 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
7103 Allow target parallel without for after it.
7104 (OMP_TASK_CLAUSE_MASK): Add priority clause.
7105 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
7106 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
7107 invalid kinds.
7108 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
7109 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
7110 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
7111 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
7112 functions.
7113 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
7114 defaultmap and is_device_ptr clauses.
7115 (c_parser_omp_target): Parse target parallel and target simd. Set
7116 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
7117 and target exit data. Diagnose invalid map kinds.
7118 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
7119 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
7120 construct.
7121 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
7122 &omp_priv.
7123 (OMP_TASKLOOP_CLAUSE_MASK): Define.
7124 (c_parser_omp_taskloop): New function.
7125 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
7126 handle PRAGMA_OMP_TASKLOOP.
7127 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
7128 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
7129 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
7130 Add IS_OMP argument, handle structure element bases, diagnose
7131 bitfields, pass IS_OMP recursively, diagnose known zero length
7132 array sections in depend clauses, handle array sections in reduction
7133 clause, diagnose negative length even for pointers.
7134 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
7135 types, pass IS_OMP down to handle_omp_array_sections_1, handle
7136 array sections in reduction clause, set
7137 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
7138 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
7139 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
7140 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
7141
21ba0cea
MP
71422015-10-06 Marek Polacek <polacek@redhat.com>
7143
7144 * c-parser.c (c_parser_statement_after_labels): Use
7145 protected_set_expr_location.
7146 (c_parser_omp_clause_num_gangs): Likewise.
7147 (c_parser_omp_clause_num_threads): Likewise.
7148 (c_parser_omp_clause_num_workers): Likewise.
7149 (c_parser_omp_clause_vector_length): Likewise.
7150 (c_parser_omp_clause_num_teams): Likewise.
7151 (c_parser_omp_clause_thread_limit): Likewise.
7152 * c-typeck.c (build_c_cast): Likewise.
7153 (c_cast_expr): Likewise.
7154
624d31fe
RS
71552015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7156
7157 * c-typeck.c (c_tree_equal): Use real_equal instead of
7158 REAL_VALUES_EQUAL.
7159
b8fd7909
JM
71602015-10-04 Jason Merrill <jason@redhat.com>
7161
7162 * c-parser.c (c_lex_one_token): Handle @synchronized.
7163 * c-decl.c (match_builtin_function_types): A declaration of a built-in
7164 can change whether the function is transaction_safe.
7165
1c7485af
MP
71662015-10-02 Marek Polacek <polacek@redhat.com>
7167
7168 PR c/67730
7169 * c-typeck.c (convert_for_assignment): Use the expansion point
7170 location throughout.
7171
3e3b8d63
MP
71722015-10-02 Marek Polacek <polacek@redhat.com>
7173
7174 PR c/64249
7175 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
7176 and pass it down to c_parser_if_statement.
7177 (c_parser_else_body): Add CHAIN parameter and pass it down to
7178 c_parser_statement_after_labels.
7179 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
7180 duplicated if-else-if conditions.
7181
aabef2de
MP
71822015-10-01 Marek Polacek <polacek@redhat.com>
7183
7184 * c-typeck.c (convert_for_assignment): Improve commentary.
7185
de8ddd5f
MP
71862015-09-30 Marek Polacek <polacek@redhat.com>
7187
7188 PR c/67730
7189 * c-typeck.c (c_finish_return): Use the expansion point location for
7190 certain "return with value" warnings.
7191
c4914de6
MLI
71922015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7193
7194 * c-parser.c (pragma_lex): Add loc argument.
7195
0e36f5c7
MP
71962015-09-15 Marek Polacek <polacek@redhat.com>
7197
7198 PR c/67580
7199 * c-decl.c (tag_exists_p): New function.
7200 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
7201 struct/union/enum keywords are missing.
7202 * c-tree.h (tag_exists_p): Declare.
7203
2f3bb934
MP
72042015-09-15 Marek Polacek <polacek@redhat.com>
7205
7206 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
7207 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
7208 Return NULL_TREE instead of 0.
7209 (lookup_name): Return NULL_TREE instead of 0.
7210 (lookup_name_in_scope): Likewise.
7211 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
7212 (parser_xref_tag): Use false instead of 0.
7213 (start_struct): Use true instead of 1.
7214 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
7215
aa256c4a
MP
72162015-09-14 Marek Polacek <polacek@redhat.com>
7217
7218 * c-typeck.c (set_nonincremental_init_from_string): Use
7219 HOST_WIDE_INT_M1U when shifting a negative value.
7220
dbb68221
MW
72212015-09-09 Mark Wielaard <mjw@redhat.com>
7222
7223 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
7224 parm against NULL.
7225
a8a098ac
JJ
72262015-09-10 Jakub Jelinek <jakub@redhat.com>
7227
7228 PR c/67502
7229 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
7230 into OMP_FOR_PRE_BODY rather than before the loop.
7231
f4b189d5
JJ
72322015-09-09 Jakub Jelinek <jakub@redhat.com>
7233
0bb99c11
JJ
7234 PR c/67501
7235 * c-parser.c (c_parser_oacc_all_clauses,
7236 c_parser_omp_all_clauses): Remove invalid clause from
7237 list of clauses even if parser->error is set.
7238
fce5e5e3
JJ
7239 PR c/67500
7240 * c-parser.c (c_parser_omp_clause_aligned,
7241 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
7242 test for errors.
7243 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
7244 error_mark_node.
7245
f4b189d5
JJ
7246 PR c/67495
7247 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
7248 instead of c_parser_unary_expression. If the result is !lvalue_p,
7249 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
7250
b2aaf235
MP
72512015-09-04 Marek Polacek <polacek@redhat.com>
7252
7253 PR sanitizer/67279
7254 * c-typeck.c (build_binary_op): Don't instrument static initializers.
7255
1807ffc1
MS
72562015-09-03 Martin Sebor <msebor@redhat.com>
7257
7258 PR c/66516
8b652e65
JJ
7259 * c-typeck.c (convert_arguments, parser_build_unary_op,
7260 build_conditional_expr, c_cast_expr, convert_for_assignment,
7261 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
7262 reject_gcc_builtin.
7263 (c_decl_implicit): Define.
7264
d04ff417
MP
72652015-09-02 Marek Polacek <polacek@redhat.com>
7266
7267 PR c/67432
7268 * c-parser.c (c_parser_enum_specifier): Give a better error for
7269 an empty enum.
7270
a79683d5
TS
72712015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7272
7273 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
7274
191a6b94
MP
72752015-08-12 Marek Polacek <polacek@redhat.com>
7276
7277 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
7278 LOC to it.
7279
420a9d9b
MP
72802015-08-03 Marek Polacek <polacek@redhat.com>
7281
7282 PR c/67088
7283 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
7284 Use it.
7285 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
7286
992118a1
PP
72872015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7288
7289 * c-parser.c (c_parser_if_body): Take token_indent_info
7290 argument. Call warn_for_misleading_indentation even when the
7291 body is a semicolon. Extract token_indent_infos corresponding
7292 to the guard, body and next tokens. Adjust call to
7293 warn_for_misleading_indentation accordingly.
7294 (c_parser_else_body): Likewise.
7295 (c_parser_if_statement): Likewise.
7296 (c_parser_while_statement): Likewise.
7297 (c_parser_for_statement): Likewise.
7298
46308474
LFSM
72992015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
7300 Manuel López-Ibáñez <manu@gcc.gnu.org>
7301
7302 * c-decl.c (get_parm_info): Remove static var. Update warning
7303 message.
7304
05b28fd6
MP
73052015-07-27 Marek Polacek <polacek@redhat.com>
7306
7307 PR c++/66555
7308 PR c/54979
7309 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
7310
451b5e48
MP
73112015-07-20 Marek Polacek <polacek@redhat.com>
7312
7313 PR c++/55095
7314 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
7315 (build_binary_op): Warn about left shift overflows.
7316
1916bcb5
AM
73172015-07-09 Andrew MacLeod <amacleod@redhat.com>
7318
7319 * c-array-notation.c: Adjust includes for flags.h changes.
7320 * c-objc-common.c: Likewise.
7321
c7131fb2
AM
73222015-07-07 Andrew MacLeod <amacleod@redhat.com>
7323
7324 * c-array-notation.c: Adjust includes.
7325 * c-aux-info.c: Likewise.
7326 * c-convert.c: Likewise.
7327 * c-decl.c: Likewise.
7328 * c-errors.c: Likewise.
7329 * c-lang.c: Likewise.
7330 * c-objc-common.c: Likewise.
7331 * c-parser.c: Likewise.
7332 * c-typeck.c: Likewise.
7333
da2e71c9
MLI
73342015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7335
7336 PR fortran/66605
7337 * c-decl.c (finish_function): Call do_warn_unused_parameter.
7338
b155cfd9
MP
73392015-06-29 Marek Polacek <polacek@redhat.com>
7340
7341 PR c/66322
7342 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
7343 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
7344 about -Wswitch-bool here.
7345 (do_case): Update c_add_case_label call.
7346 (c_finish_case): Update c_do_switch_warnings call.
7347
31521951
MP
73482015-06-27 Marek Polacek <polacek@redhat.com>
7349
7350 * c-typeck.c: Use VECTOR_TYPE_P throughout.
7351
22d03525
MP
73522015-06-26 Marek Polacek <polacek@redhat.com>
7353
7354 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7355 INDIRECT_REF_P.
7356 * c-typeck.c (array_to_pointer_conversion): Likewise.
7357 (build_unary_op): Likewise.
7358 (c_finish_return): Likewise.
7359
f0889939
AM
73602015-06-25 Andrew MacLeod <amacleod@redhat.com>
7361
7362 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
7363 * c-parser.c: Likewise.
7364
8d67ee55
RS
73652015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7366
7367 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
7368 instead of pointer_hash.
7369 (detect_field_duplicates): Likewise.
7370
0ae9bd27
MP
73712015-06-25 Marek Polacek <polacek@redhat.com>
7372
7373 * c-array-notation.c: Use VAR_P throughout.
7374 * c-decl.c: Likewise.
7375 * c-objc-common.c: Likewise.
7376 * c-parser.c: Likewise.
7377 * c-typeck.c: Likewise.
7378
62f9079a
MP
73792015-06-25 Marek Polacek <polacek@redhat.com>
7380
7381 * c-decl.c: Use is_global_var throughout.
7382 * c-parser.c: Likewise.
7383 * c-typeck.c: Likewise.
7384
abb226c9
AM
73852015-06-17 Andrew MacLeod <amacleod@redhat.com>
7386
7387 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
7388 * c-aux-info.c: Likewise.
7389 * c-convert.c: Likewise.
7390 * c-decl.c: Likewise.
7391 * c-errors.c: Likewise.
7392 * c-lang.c: Likewise.
7393 * c-objc-common.c: Likewise.
7394 * c-parser.c: Likewise.
7395 * c-typeck.c: Likewise.
7396
8cbababc
JH
73972015-06-11 Jan Hubicka <hubicka@ucw.cz>
7398
7399 PR middle-end/66325
7400 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
7401 variants.
7402
a0349665
PMR
74032015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
7404
7405 * c-decl.c (pop_scope): Register the main translation unit
7406 through the new debug hook.
7407
13fdf2e2
AM
74082015-06-08 Andrew MacLeod <amacleod@redhat.com>
7409
7410 * c-array-notation.c : Adjust include files.
7411 * c-aux-info.c : Likewise.
7412 * c-convert.c : Likewise.
7413 * c-decl.c : Likewise.
7414 * c-errors.c : Likewise.
7415 * c-lang.c : Likewise.
7416 * c-lang.h : Likewise.
7417 * c-objc-common.c : Likewise.
7418 * c-parser.c : Likewise.
7419 * c-typeck.c : Likewise.
7420
d7438551
AH
74212015-06-05 Aldy Hernandez <aldyh@redhat.com>
7422
7423 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
7424 immediately clobber it.
7425 (c_write_global_declarations_1): Remove call to
7426 check_global_declaration_1.
7427 (c_write_global_declarations_2): Remove.
7428 (c_write_final_cleanups): Rename from c_write_global_declarations.
7429 Remove call to finalize_compilation_unit.
7430 Remove calls to debugging hooks.
7431 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
7432 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
7433 * c-tree.h: Remove c_write_global_declarations.
7434
ecb9f223
AM
74352015-06-04 Andrew MacLeod <amacleod@redhat.com>
7436
7437 * c-array-notation.c: Adjust includes for restructured coretypes.h.
7438 * c-aux-info.c: Likewise.
7439 * c-convert.c: Likewise.
7440 * c-decl.c: Likewise.
7441 * c-errors.c: Likewise.
7442 * c-lang.c: Likewise.
7443 * c-objc-common.c: Likewise.
7444 * c-parser.c: Likewise.
7445 * c-typeck.c: Likewise.
7446
9482b620
MP
74472015-06-04 Marek Polacek <polacek@redhat.com>
7448
7449 PR c/66341
7450 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
7451 it is a lvalue.
7452
bc51ace3
PK
74532015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7454
7455 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
7456 Warn for empty struct.
7457 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
7458
ea5b45b6
AT
74592015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
7460
7461 * c-decl.c (start_function): Call plugin before parsing.
7462 (finish_function): Call plugin after parsing.
7463
c2d47482
PK
74642015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7465
7466 PR c/49551
7467 * c-decl.c (merge_decls): Merge DECL_COMMON.
7468
a95492ab
JW
74692015-05-22 Jim Wilson <jim.wilson@linaro.org>
7470
7471 * Make-lang.in (check_gcc_pallelize): Define.
7472
fd5c817a
MP
74732015-05-22 Marek Polacek <polacek@redhat.com>
7474
7475 PR c/47043
7476 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
7477 attributes.
7478
c7b70a3c
MP
74792015-05-21 Marek Polacek <polacek@redhat.com>
7480
7481 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
7482 DECL_BUILT_IN.
7483
21b634ae
MP
74842015-05-20 Marek Polacek <polacek@redhat.com>
7485
7486 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7487 * c-typeck.c: Likewise.
7488
296a8c2f
MP
74892015-05-19 Marek Polacek <polacek@redhat.com>
7490
7491 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
7492
41b37d5e
JJ
74932015-05-19 Jakub Jelinek <jakub@redhat.com>
7494
7495 PR middle-end/66199
7496 * c-parser.c (c_parser_omp_for_loop): Don't add
7497 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
7498 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
7499 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
7500 constructs.
7501
fab27f52
MM
75022015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7503
7504 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 7505 swaps.
fab27f52 7506
40de31cf
MLI
75072015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7508
7509 PR fortran/44054
7510 * c-objc-common.c (c_tree_printer): Replace locus pointer with
7511 accessor function.
7512
3aa3c9fc
MP
75132015-05-14 Marek Polacek <polacek@redhat.com>
7514
7515 PR c/66066
7516 PR c/66127
7517 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
7518 rather than with 0.
7519
c3388e62
DM
75202015-05-12 David Malcolm <dmalcolm@redhat.com>
7521
7522 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
7523 to add a call to warn_for_misleading_indentation.
7524 (c_parser_else_body): Likewise, adding param "else_loc".
7525 (c_parser_if_statement): Check for misleading indentation.
7526 (c_parser_while_statement): Likewise.
7527 (c_parser_for_statement): Likewise.
7528
755e528f
MP
75292015-05-08 Marek Polacek <polacek@redhat.com>
7530
7531 PR c/64918
7532 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
7533 (output_init_element): Likewise.
7534
0173bd2a
MP
75352015-05-07 Marek Polacek <polacek@redhat.com>
7536
7537 PR c/65179
7538 * c-typeck.c (build_binary_op): Warn when left shifting a negative
7539 value.
7540
9babc352
MP
75412015-04-30 Marek Polacek <polacek@redhat.com>
7542
7543 * c-typeck.c (set_init_label): Call error_at instead of error and
7544 pass LOC to it.
7545
ac9f18db
MP
7546 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
7547 the type of a decl.
7548
ec3fba51
MP
7549 * c-typeck.c (c_build_va_arg): Clarify the error message.
7550
b811915d
TS
75512015-04-29 Thomas Schwinge <thomas@codesourcery.com>
7552
7553 * c-parser.c (c_parser_oacc_enter_exit_data): Use
7554 OMP_STANDALONE_CLAUSES.
7555
f3075008
MP
75562015-04-28 Marek Polacek <polacek@redhat.com>
7557
7558 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
7559
4e81b788
MP
75602015-04-28 Marek Polacek <polacek@redhat.com>
7561
7562 PR c/65901
7563 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
7564
6c1db78e
MP
75652015-04-25 Marek Polacek <polacek@redhat.com>
7566
7567 PR c/52085
7568 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
7569 attribute.
7570
5c4abbb8
MP
75712015-04-23 Marek Polacek <polacek@redhat.com>
7572
7573 PR c/65345
7574 * c-decl.c (set_labels_context_r): New function.
7575 (store_parm_decls): Call it via walk_tree_without_duplicates.
7576 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
7577 instead of create_tmp_var. Build TARGET_EXPR instead of
7578 COMPOUND_EXPR.
7579 (build_atomic_assign): Use create_tmp_var_raw instead of
7580 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
7581
06aca1d5
IV
75822015-04-20 Ilya Verbin <ilya.verbin@intel.com>
7583
7584 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
7585 (c_parser_omp_target_update): Add missed %> to error_at ().
7586
8fba1830
BRF
75872015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7588
7589 PR target/55143
7590 * c-decl.c (c_default_pointer_mode): Remove definition.
7591 * c-tree.h (c_default_pointer_mode): Remove declaration.
7592
62021f64
TB
75932015-03-27 Tobias Burnus <burnus@net-b.de>
7594
7595 PR c/65586
7596 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
7597 error out.
7598 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
7599 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
7600 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
7601
9b65e171
JJ
76022015-03-19 Jakub Jelinek <jakub@redhat.com>
7603
7604 * c-decl.c (c_decl_attributes): Also add "omp declare target"
7605 attribute for DECL_EXTERNAL VAR_DECLs.
7606
17958621
JJ
76072015-03-11 Jakub Jelinek <jakub@redhat.com>
7608
7609 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
7610 argument.
7611
7ccb1a11
JJ
76122015-03-10 Jakub Jelinek <jakub@redhat.com>
7613
7614 PR c/65120
7615 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
7616 before preparing arguments to warn_logical_not_parentheses.
7617
01177669
JJ
76182015-03-09 Jakub Jelinek <jakub@redhat.com>
7619
7620 PR c/65120
7621 * c-typeck.c (parser_build_binary_op): Don't warn for
7622 !!x == y or !b == y where b is _Bool.
7623
802ac282
MP
76242015-03-09 Marek Polacek <polacek@redhat.com>
7625
7626 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
7627 * c-decl.c (grokdeclarator): Likewise.
7628 * c-typeck.c (build_binary_op): Likewise.
7629
e5165b60
MP
76302015-02-27 Marek Polacek <polacek@redhat.com>
7631
7632 PR c/65228
7633 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
7634
065d214c
MP
76352015-02-14 Marek Polacek <polacek@redhat.com>
7636
7637 PR c/64768
7638 * c-decl.c (grokdeclarator): Set the range of a flexible array member
7639 declared through a typedef name.
7640
e5d9235b
MP
76412015-02-13 Marek Polacek <polacek@redhat.com>
7642
7643 PR c/65050
7644 * c-decl.c (grokdeclarator): Print also the type when giving
7645 the error message about array's incomplete element type.
7646
fa01ffcc
JJ
76472015-02-11 Jakub Jelinek <jakub@redhat.com>
7648
7649 PR c/64824
7650 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
7651 check in the POP macro.
7652
c3e38a03
MP
76532015-02-09 Marek Polacek <polacek@redhat.com>
7654
7655 PR c/64856
7656 * c-typeck.c (process_init_element): Don't always wrap
7657 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
7658 initializing a range of elements.
7659
4886ec8e
JJ
76602015-02-04 Jakub Jelinek <jakub@redhat.com>
7661
7662 PR c/64824
7663 PR c/64868
7664 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
7665
c3e38a03 76662015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
7667
7668 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
7669 processing enum declaration.
7670
7b33f0c8
MP
76712015-01-29 Marek Polacek <polacek@redhat.com>
7672
7673 PR c/64709
7674 * c-typeck.c (pop_init_level): If constructor_elements has
7675 exactly one element with integer_zerop value, set constructor_zeroinit
7676 to 1. Remove braces around warning_init call.
7677
dea63e49
JJ
76782015-01-27 Jakub Jelinek <jakub@redhat.com>
7679
7680 PR c/64766
7681 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
7682 of FUNCTION_DECLs with error_mark_node.
7683
d38f7dce
JJ
76842015-01-26 Jakub Jelinek <jakub@redhat.com>
7685
7686 PR c/64778
7687 * c-typeck.c (convert_arguments): Return -1 if there are
7688 error_args, even if we've diagnosed too many arguments.
7689
cbf5d0e7
RB
76902015-01-21 Richard Biener <rguenther@suse.de>
7691
7692 PR middle-end/64313
7693 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
7694 for builtins the user declared correctly.
7695
41dbbb37
TS
76962015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7697 Bernd Schmidt <bernds@codesourcery.com>
7698 Cesar Philippidis <cesar@codesourcery.com>
7699 James Norris <jnorris@codesourcery.com>
7700 Jakub Jelinek <jakub@redhat.com>
7701 Ilmir Usmanov <i.usmanov@samsung.com>
7702
7703 * c-parser.c: Include "gomp-constants.h".
7704 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
7705 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
7706 Use OMP_CLAUSE_SET_MAP_KIND.
7707 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
7708 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
7709 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
7710 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
7711 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
7712 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
7713 "copyout", "create", "delete", "deviceptr", "gang", "host",
7714 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
7715 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
7716 "present_or_create", "pcreate", "seq", "self", "vector",
7717 "vector_length", "wait", "worker".
7718 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
7719 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
7720 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
7721 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
7722 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
7723 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
7724 (c_parser_oacc_data_clause_deviceptr)
7725 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
7726 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
7727 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
7728 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
7729 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
7730 (c_parser_oacc_parallel, c_parser_oacc_update)
7731 (c_parser_oacc_wait): New functions.
7732 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
7733 (c_finish_oacc_data): New prototypes.
7734 * c-typeck.c: Include "gomp-constants.h".
7735 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
7736 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
7737 OMP_CLAUSE_SET_MAP_KIND.
7738 (c_finish_oacc_parallel, c_finish_oacc_kernels)
7739 (c_finish_oacc_data): New functions.
7740 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
7741 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
7742 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
7743 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
7744 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
7745 GOMP_MAP_FORCE_DEVICEPTR.
7746
adfac8df
JJ
77472015-01-09 Michael Collison <michael.collison@linaro.org>
7748
7749 * c-array-notation.c: Include hash-set.h, machmode.h,
7750 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7751 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7752 * c-aux-info.c: Ditto.
7753 * c-convert.c: Ditto.
7754 * c-decl.c: Ditto.
7755 * c-errors.c: Ditto.
7756 * c-lang.c: Dittoxs.
7757 * c-objc-common.c: Ditto.
7758 * c-parser.c: Ditto.
7759 * c-typeck.c: Include hash-set.h, machmode.h,
7760 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7761 fold-const.h, wide-int.h, inchash.h, real.h and
7762 fixed-value.h due to flattening of tree.h.
7763
2cc901dc
MP
77642015-01-07 Marek Polacek <polacek@redhat.com>
7765
7766 PR c/64417
7767 * c-typeck.c (process_init_element): Disallow initialization of
7768 a flexible array member with a string constant if the structure
7769 is in an array.
7770
5624e564
JJ
77712015-01-05 Jakub Jelinek <jakub@redhat.com>
7772
e5341100
JJ
7773 PR sanitizer/64344
7774 * c-typeck.c (convert_for_assignment, c_finish_return): For
7775 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
7776 types also set in_late_binary_op around convert call.
7777 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
7778 to integral type casts, if not in_late_binary_op, pass c_fully_fold
7779 result on expr as last argument to ubsan_instrument_float_cast,
7780 if in_late_binary_op, don't use c_save_expr but save_expr.
7781
5624e564
JJ
7782 Update copyright years.
7783
5bd012f8
MP
77842015-01-05 Marek Polacek <polacek@redhat.com>
7785
7786 PR c/64423
7787 * c-typeck.c (build_array_ref): Pass loc down to
7788 warn_array_subscript_with_type_char.
7789
3f8257db 77902014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
7791
7792 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 7793 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 7794 element type.
8e745a17 7795 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 7796 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 7797 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 7798 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 7799 to PEDWARN_FOR_QUALIFIERS.
768952be 7800
8f94a8c4
JJ
78012014-12-17 Jakub Jelinek <jakub@redhat.com>
7802
7803 PR sanitizer/64289
7804 * c-convert.c: Include ubsan.h.
7805 (convert): For real -> integral casts and
7806 -fsanitize=float-cast-overflow don't call convert_to_integer, but
7807 instead instrument the float cast directly.
7808
b731b390
JJ
78092014-11-29 Jakub Jelinek <jakub@redhat.com>
7810
7811 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
7812 c_finish_stmt_expr): Remove NULL last argument from
7813 create_tmp_var_raw and create_tmp_var calls.
7814 * c-array-notation.c (fix_builtin_array_notation_fn,
7815 build_array_notation_expr, fix_conditional_array_notations_1,
7816 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
7817
541e35a6
MP
78182014-11-28 Marek Polacek <polacek@redhat.com>
7819
7820 PR c/63862
7821 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
7822 convert the right operand to integer type.
7823
b286be94
MP
78242014-11-25 Marek Polacek <polacek@redhat.com>
7825
7826 PR c/63877
7827 * c-decl.c (start_function): Disable -Wmissing-declarations warning
7828 for inline functions.
7829
aa7da51a
JJ
78302014-11-21 Jakub Jelinek <jakub@redhat.com>
7831
7832 PR target/63764
7833 * c-typeck.c (build_array_ref): Adjust
7834 convert_vector_to_pointer_for_subscript caller. If it returns true,
7835 call non_lvalue_loc on the result.
7836
d876207f
RB
78372014-11-11 Richard Biener <rguenther@suse.de>
7838
7839 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
7840 to true.
7841
e5e44252
AK
78422014-11-10 Andi Kleen <ak@linux.intel.com>
7843
7844 PR c/60804
7845 * c-parser.c (c_parser_statement_after_labels): Call
7846 check_no_cilk.
7847 (c_parser_if_statement): Dito.
7848 (c_parser_switch_statement): Dito.
7849 (c_parser_while_statement): Dito.
7850 (c_parser_do_statement): Dito.
7851 (c_parser_for_statement): Dito.
7852 * c-typeck.c (c_finish_loop): Dito.
7853
13c21655
PC
78542014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7855
7856 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
7857 OPT_Wshift_count_overflow in the warnings.
7858
2d51fcef
MP
78592014-10-30 Marek Polacek <polacek@redhat.com>
7860
7861 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
7862 print the stripped version as well, if they're not the same.
7863
ef4bddc2
RS
78642014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7865
7866 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
7867 machine_mode.
7868
c582198b
AM
78692014-10-28 Andrew MacLeod <amacleod@redhat.com>
7870
7871 * c-decl.c: Adjust include files.
7872 * c-parser.c: Ditto.
7873
ddc8de03
PM
78742014-10-27 Phil Muldoon <pmuldoon@redhat.com>
7875 Tom Tromey <tromey@redhat.com>
7876
7877 * c-tree.h (enum c_oracle_request): New.
7878 (c_binding_oracle_function): New typedef.
7879 (c_binding_oracle, c_pushtag, c_bind): Declare.
7880 * c-decl.c (c_binding_oracle): New global.
7881 (I_SYMBOL_CHECKED): New macro.
7882 (i_symbol_binding): New function.
7883 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
7884 (I_TAG_CHECKED): New macro.
7885 (i_tag_binding): New function.
7886 (I_TAG_BINDING, I_TAG_DECL): Redefine.
7887 (I_LABEL_CHECKED): New macro.
7888 (i_label_binding): New function.
7889 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
7890 (c_print_identifier): Save and restore c_binding_oracle.
7891 (c_pushtag, c_bind): New functions.
7892
60393bbc
AM
78932014-10-27 Andrew MacLeod <amacleod@redhat.com>
7894
7895 * c-typeck.c: Adjust include files.
7896
d723bb7c
MLI
78972014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7898
7899 PR c++/53061
7900 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
7901 initialization here...
7902 (c_initialize_diagnostics): ... but here. Set defaults after
7903 building pretty-printer.
7904
1bc5a451
MP
79052014-10-23 Marek Polacek <polacek@redhat.com>
7906
7907 PR c/63626
7908 * c-decl.c (pop_scope): Don't print warning in external_scope.
7909
4435bb92
MP
79102014-10-19 Marek Polacek <polacek@redhat.com>
7911
7912 PR c/63567
7913 * c-typeck.c (output_init_element): Allow initializing objects with
7914 static storage duration with compound literals even in C99 and add
7915 pedwarn for it.
7916
7278465e
MP
79172014-10-17 Marek Polacek <polacek@redhat.com>
7918
7919 PR c/63567
7920 * c-typeck.c (digest_init): Allow initializing objects with static
7921 storage duration with compound literals even in C99 and add pedwarn
7922 for it.
7923
d9b7be2e
MP
79242014-10-17 Marek Polacek <polacek@redhat.com>
7925
7926 PR c/63543
7927 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
7928 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
7929 error multiple times. Print the type.
7930
f406ae1f
MP
79312014-10-17 Marek Polacek <polacek@redhat.com>
7932
7933 PR c/63549
7934 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
7935 type.
7936
92574c7c
MP
79372014-10-17 Marek Polacek <polacek@redhat.com>
7938
7939 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
7940 (start_function): Use OPT_Wimplicit_int instead of 0.
7941 (store_parm_decls_oldstyle): Likewise.
7942
1bc4a978
MT
79432014-10-17 Alan Modra <amodra@gmail.com>
7944
7945 PR middle-end/61848
7946 * c-decl.c (merge_decls): Don't merge section name or tls model
7947 to newdecl symtab node, instead merge to olddecl. Override
7948 existing olddecl section name. Set tls_model for all thread-local
7949 vars, not just OMP thread-private ones. Remove incorrect comment.
7950
83685514
AM
79512014-10-16 Andrew MacLeod <amacleod@redhat.com>
7952
7953 * c-decl.c: Adjust include files.
7954
78a7c317
DD
79552014-10-14 DJ Delorie <dj@redhat.com>
7956
7957 * c-parser.c (c_parse_init): Add RID entries for each __intN.
7958 (c_token_starts_typename): Check all __intN, not just __int128.
7959 (c_token_starts_declspecs): Likewise.
7960 (c_parser_declspecs): Likewise.
7961 (c_parser_attribute_any_word): Likewise.
7962 (c_parser_objc_selector): Likewise.
7963 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
7964 (struct c_declspecs): Add int_n_idx field to record *which* __intN
7965 is specified.
7966 * c-decl.c (declspecs_add_type): Check for all __intN, not just
7967 __int128.
7968 (finish_declspecs): Likewise.
7969
74d98c1e
AB
79702014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
7971
8e745a17 7972 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 7973 the duplicate code.
8e745a17 7974 (c_parser_statement): Call the new function.
74d98c1e 7975
84937de2
MP
79762014-10-09 Marek Polacek <polacek@redhat.com>
7977
7978 PR c/63480
7979 * c-typeck.c (pop_init_level): Don't warn about initializing
7980 with { }.
7981
0382aaa0
MP
79822014-10-07 Marek Polacek <polacek@redhat.com>
7983
7984 PR c/59717
7985 * c-decl.c (header_for_builtin_fn): New function.
7986 (implicitly_declare): Suggest which header to include.
7987
7a0ca710
MP
79882014-10-07 Marek Polacek <polacek@redhat.com>
7989
7990 * c-convert.c (convert): Use error_operand_p.
7991 * c-typeck.c (require_complete_type): Likewise.
7992 (really_atomic_lvalue): Likewise.
7993 (digest_init): Likewise.
7994 (handle_omp_array_sections_1): Likewise.
7995
6bc8a126
MP
79962014-10-03 Marek Polacek <polacek@redhat.com>
7997
7998 PR c/63453
7999 * c-decl.c (pop_scope): Don't warn about "inline function declared
8000 but never defined" for functions marked with gnu_inline attribute.
8001
d90c0a59
JJ
80022014-09-25 Jakub Jelinek <jakub@redhat.com>
8003
8004 PR c++/63249
8005 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
8006 on low_bound and length.
8007
083e891e
MP
80082014-09-24 Marek Polacek <polacek@redhat.com>
8009
8010 PR c/61405
8011 PR c/53874
8012 * c-parser.c: Don't define CPP_KEYWORD.
8013 (c_parser_switch_statement): Pass original type to c_finish_case.
8014 * c-tree.h (c_finish_case): Update declaration.
8015 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
8016 conditionally to c_do_switch_warnings.
8017
8d95fe25
MP
80182014-09-03 Marek Polacek <polacek@redhat.com>
8019
8020 PR c/62024
8021 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
8022 conversions.
8023
9a771876
JJ
80242014-09-02 Jakub Jelinek <jakub@redhat.com>
8025 Balaji V. Iyer <balaji.v.iyer@intel.com>
8026 Igor Zamyatin <igor.zamyatin@intel.com>
8027
8028 * c-parser.c (c_parser_cilk_for): New function.
8029 (c_parser_cilk_grainsize): Likewise.
8030 (c_get_temp_regvar): Likewise.
8031 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
8032 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
8033 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
8034 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
8035 case.
8036
b7679d96
CG
80372014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
8038
8039 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
8040 with using HOST_WIDE_INT without truncation to 'int'
8041
59ea0364
MP
80422014-08-22 Marek Polacek <polacek@redhat.com>
8043
8044 PR c++/62199
8045 * c-typeck.c (parser_build_binary_op): Adjust call to
8046 warn_logical_not_parentheses.
8047
671a475e
IZ
80482014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
8049
8050 PR other/62008
8051 * c-parser.c (c_parser_array_notation): Check for correct
8052 type of an array added.
8053
04159acf
MP
80542014-08-19 Marek Polacek <polacek@redhat.com>
8055
8056 PR c++/62153
8057 * c-typeck.c (build_binary_op): If either operand of a comparison
8058 is a boolean expression, call maybe_warn_bool_compare.
8059
c77935ee
PP
80602014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
8061
8062 PR c/45584
8063 * c-typeck.c (build_c_cast): Do a conversion even when the
8064 TYPE_MAIN_VARIANTs are the same.
8065
35aff4fb
MP
80662014-08-19 Marek Polacek <polacek@redhat.com>
8067
8068 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
8069 pedwarn_c99 instead of pedwarn.
8070 (grokfield): Likewise.
8071 (warn_defaults_to): New function.
8072 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
8073 Unconditionally call pedwarn_c99 instead of pedwarn.
8074 (start_function): Call warn_defaults_to instead of pedwarn_c99.
8075 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
8076 check flag_isoc11 before.
8077 * c-errors.c (pedwarn_c99): Change the return type to bool.
8078 Handle -Wc99-c11-compat.
8079 * c-parser.c (disable_extension_diagnostics): Handle
8080 warn_c99_c11_compat.
8081 (restore_extension_diagnostics): Likewise.
8082 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
8083 instead of pedwarn, don't check flag_isoc11 before.
8084 (c_parser_declspecs): Likewise.
8085 (c_parser_alignas_specifier): Likewise.
8086 (c_parser_alignof_expression): Likewise.
8087 (c_parser_generic_selection): Likewise.
8088 * c-tree.h (pedwarn_c99): Update declaration.
8089 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
8090 of pedwarn_c99.
8091
177cce46
MP
80922014-08-19 Marek Polacek <polacek@redhat.com>
8093
8094 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
8095 to pedwarn_c90.
8096 * c-errors.c: Include "opts.h".
8097 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
8098 * c-parser.c (disable_extension_diagnostics): Handle negative value
8099 of warn_c90_c99_compat, too.
8100 (restore_extension_diagnostics): Likewise.
8101 (c_parser_compound_statement_nostart): Pass
8102 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
8103
6dc99c33
MP
81042014-08-12 Marek Polacek <polacek@redhat.com>
8105
8106 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
8107 Add pedwarn.
8108 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
8109 Likewise.
8110 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
8111
3f8257db 81122014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
8113
8114 PR c/51849
8115 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
8116 Call pedwarn_c90 instead of pedwarn.
8117 (check_bitfield_type_and_width): Likewise.
8118 (declspecs_add_qual): Likewise.
8119 (declspecs_add_type): Likewise.
8120 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
8121 Adjust to only call pedwarn_c90.
8122 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
8123 pedwarn_c90 instead of pedwarn.
8124 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
8125 * c-parser.c (disable_extension_diagnostics): Handle
8126 warn_c90_c99_compat.
8127 (restore_extension_diagnostics): Likewise.
8128 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
8129 pedwarn_c90 instead of pedwarn.
8130 (c_parser_initelt): Likewise.
8131 (c_parser_postfix_expression): Likewise.
8132 (c_parser_postfix_expression_after_paren_type): Likewise.
8133 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
8134 * c-tree.h: Fix formatting.
8135 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
8136 pedwarn_c90 instead of pedwarn.
8137
9f25a338
TS
81382014-08-07 Trevor Saunders <tsaunders@mozilla.com>
8139
8140 * c-typeck.c: Remove include of pointer-set.h.
8141
044331a8
MP
81422014-08-07 Marek Polacek <polacek@redhat.com>
8143
8144 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
8145
b787e7a2
TS
81462014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8147
8148 * c-typeck.c: Use hash_map instead of pointer_map.
8149
6e2830c3
TS
81502014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8151
8152 * c-decl.c: Use hash_set instead of pointer_set.
8153
a7ee52fb
IZ
81542014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
8155
8156 PR middle-end/61455
8157 * c-array-notation.c (expand_array_notations): Handling
8158 of DECL_EXPR added.
8159
b4dfdc11
MG
81602014-07-31 Marc Glisse <marc.glisse@inria.fr>
8161
8162 PR c++/60517
8163 * c-typeck.c (c_finish_return): Return 0 instead of the address of
8164 a local variable.
8165
976d5a22
TT
81662014-07-30 Tom Tromey <tromey@redhat.com>
8167
8168 * c-typeck.c (struct constructor_stack) <designator_depth>: New
8169 field.
8170 (really_start_incremental_init, push_init_level): Initialize
8171 designator_depth.
8172 (pop_init_level): Set global designator_depth.
8173 (process_init_element): Check for designated_init attribute.
8174
30281de2
MP
81752014-07-20 Marek Polacek <polacek@redhat.com>
8176
8177 PR c/61852
8178 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
8179 (implicitly_declare): Pass location to implicit_decl_warning.
8180
b108f48f
JJ
81812014-07-14 Jakub Jelinek <jakub@redhat.com>
8182
8183 PR middle-end/61294
8184 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
8185 If non-NULL, call c_parser_check_literal_zero.
8186 (c_parser_check_literal_zero): New function.
8187 (c_parser_postfix_expression_after_primary): Adjust
8188 c_parser_expr_list caller, handle -Wmemset-transposed-args.
8189
773ec47f
MP
81902014-07-06 Marek Polacek <polacek@redhat.com>
8191
8192 PR c/6940
8193 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
8194 * c-tree.h (C_ARRAY_PARAMETER): Define.
8195 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
8196 function parameter.
8197
22e1cf1c 81982014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 8199 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
8200
8201 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
8202 releasing symbol.
8203
52ec0ea3
MP
82042014-07-01 Marek Polacek <polacek@redhat.com>
8205
8206 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
8207 instead of 0 to WARN_FOR_ASSIGNMENT.
8208
d5c3d343
MP
82092014-07-01 Marek Polacek <polacek@redhat.com>
8210
8211 PR c/58286
8212 * c-typeck.c (convert_for_assignment): Pass
8213 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
8214
6a7253a4
MP
82152014-06-30 Marek Polacek <polacek@redhat.com>
8216
8217 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
8218 has no_sanitize_undefined attribute.
8219
5e88a8f4
IZ
82202014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
8221
8222 PR middle-end/57541
8223 * c-array-notation.c (fix_builtin_array_notation_fn):
8224 Check for 0 arguments in builtin call. Check that bultin argument is
8225 correct.
8226 * c-parser.c (c_parser_array_notation): Check for incorrect initial
8227 index.
8228
9698b078
SH
82292014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
8230
8231 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
8232 qualifiers in __auto_type for atomic types.
8233 (c_parser_typeof_specifier): Discard all type qualifiers in
8234 __typeof__ for atomic types.
8235
6e07c515
MP
82362014-06-25 Marek Polacek <polacek@redhat.com>
8237
8238 PR c/61162
8239 * c-parser.c (c_parser_statement_after_labels): Pass the location of
8240 the return expression to c_finish_return.
8241
da6f124d
JJ
82422014-06-25 Jakub Jelinek <jakub@redhat.com>
8243
8244 * c-typeck.c (c_finish_omp_clauses): Make sure
8245 OMP_CLAUSE_LINEAR_STEP has correct type.
8246
c203e8a7
TS
82472014-06-24 Trevor Saunders <tsaunders@mozilla.com>
8248
8249 * c-decl.c: Adjust.
8250
56ad0e38
JJ
82512014-06-24 Jakub Jelinek <jakub@redhat.com>
8252
8253 * c-parser.c (c_parser_omp_for_loop): For
8254 #pragma omp parallel for simd move lastprivate clause from parallel
8255 to for rather than simd.
8256
47c2554f
MP
82572014-06-23 Marek Polacek <polacek@redhat.com>
8258
8259 * c-typeck.c (parser_build_binary_op): Don't call
8260 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
8261
56363ffd
JH
82622014-06-15 Jan Hubicka <hubicka@ucw.cz>
8263
8264 * c-parser.c (c_parser_omp_threadprivate): Likewise.
8265 * c-decl.c (merge_decls): Likewise.
8266
d7ff7ae5
MP
82672014-06-09 Marek Polacek <polacek@redhat.com>
8268
8269 PR c/36446
8270 * c-typeck.c (error_init): Call inform instead of error_at.
8271 (pedwarn_init): Call inform instead of pedwarn.
8272 (warning_init): Call inform instead of warning_at.
8273
24d047a3
JH
82742014-06-07 Jan Hubicka <hubicka@ucw.cz>
8275
8276 * c-decl.c (merge_decls): Use set_decl_section_name.
8277 (duplicate_decls): Remove node if it exists.
8278
9bac5cbb
G
82792014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
8280
8281 PR c/53119
8282 * c-typeck.c (push_init_level, process_init_element,
8283 pop_init_level): Correct check for zero initialization, move
8284 missing brace warning to respect zero initialization.
8285
8ffcdea8
MP
82862014-06-05 Marek Polacek <polacek@redhat.com>
8287
8288 PR c/56724
8289 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
8290
742938c9
MP
82912014-06-05 Marek Polacek <polacek@redhat.com>
8292
8293 PR c/49706
8294 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 8295 on the left hand side operand of a comparison.
742938c9 8296
6447c55d
MP
82972014-06-05 Marek Polacek <polacek@redhat.com>
8298
8299 PR c/48062
8300 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
8301 Print note only if the warning was printed.
8302
9dc7743c
IZ
83032014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
8304
8305 PR c/58942
8306 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
8307 with a pointer.
8308
fedfecef
MP
83092014-06-03 Marek Polacek <polacek@redhat.com>
8310
8311 PR c/60439
8312 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
8313 c_start_case.
8314 * c-tree.h (c_start_case): Update.
8315 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
8316 switch condition has boolean value.
8317
9b2b7279
AM
83182014-06-02 Andrew MacLeod <amacleod@redhat.com>
8319
8320 * c-decl.c: Include builtins.h.
8321 * c-parser.c: Likewise.
8322
5c1bc275
MP
83232014-05-27 Marek Polacek <polacek@redhat.com>
8324
8325 PR c/56724
8326 * c-typeck.c (convert_arguments): Get location of a parameter. Change
8327 error and warning calls to error_at and warning_at. Pass location of
8328 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
8329 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
8330 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
8331
97563bc8
IZ
83322014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
8333
8334 PR c/61191
8335 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
8336 function parameters.
8337
aede2c10
JH
83382014-05-23 Jan Hubicka <hubicka@ucw.cz>
8339
8340 * c-decl.c (merge_decls): Preserve symtab node pointers.
8341 (duplicate_decls): Free new decl.
8342
edbba2ce
TS
83432014-05-23 Thomas Schwinge <thomas@codesourcery.com>
8344
f3316c6d
TS
8345 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
8346 initialization.
8347
edbba2ce
TS
8348 * c-parser.c (c_parser_omp_target): Return bool values.
8349
68c81f24
TS
83502014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8351
8352 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
8353 num_teams_loc variable to num_thread_limit_loc.
8354
632f2871
RS
83552014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8356
8357 * c-array-notation.c (expand_array_notations): Use void_node
8358 instead of void_zero_node.
8359
766090c2
TS
83602014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8361
8362 * c-decl.c (finish_struct): Adjust.
8363 (finish_enum): Likewise.
8364 (bind): Adjust.
8365 (record_inline_static): Likewise.
8366 (push_scope): Likewise.
8367 (make_label): Likewise.
8368 (lookup_label_for_goto): Likewise.
8369 (finish_struct): Likewise.
8370 (finish_enum): Likewise.
8371 (store_parm_decls): Likewise.
8372 (c_push_function_context): Likewise.
8373 * c-lang.h: Remove usage of variable_size gty attribute.
8374 * c-parser.c (c_parse_init): Adjust.
8375 (c_parse_file): Likewise.
8376
2b107f6b
MP
83772014-05-13 Marek Polacek <polacek@redhat.com>
8378
8379 PR c/61162
8380 * c-typeck.c (convert_for_assignment): Pass location to
8381 WARN_FOR_ASSIGNMENT instead of input_location.
8382
d033409e
MP
83832014-05-10 Marek Polacek <polacek@redhat.com>
8384
8385 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
8386 maybe_warn_string_init.
8387 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
8388 maybe_warn_string_init.
8389 * c-tree.h (maybe_warn_string_init): Update declaration.
8390 * c-typeck.c (maybe_warn_string_init): Add location parameter.
8391 Call pedwarn_init with loc instead of with input_location.
8392 (digest_init): Pass init_loc to maybe_warn_string_init.
8393 (pop_init_level): Call pedwarn_init with loc instead of with
8394 input_location.
8395 (set_init_index): Likewise.
8396 (process_init_element): Likewise.
8397
ea58ef42
MP
83982014-05-09 Marek Polacek <polacek@redhat.com>
8399
8400 PR c/61096
8401 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
8402 (c_parser_initelt): Pass location to set_init_label. Pass array index
8403 location to set_init_index.
8404 * c-tree.h (push_init_level): Update declaration.
8405 (pop_init_level): Likewise.
8406 (set_init_index): Likewise.
8407 (set_init_label): Likewise.
8408 * c-typeck.c (error_init): Add location parameter. Call error_at
8409 instead of error.
8410 (digest_init): Pass init_loc to error_init.
8411 (really_start_incremental_init):
8412 (push_init_level): Add location parameter. Pass loc to pop_init_level
8413 and error_init.
8414 (pop_init_level): Likewise.
8415 (set_designator): Add location parameter. Pass loc to pop_init_level,
8416 push_init_level, and error_init.
8417 (set_init_index): Add location parameter. Pass loc to error_init and
8418 set_designator.
8419 (set_init_label): Likewise.
8420 (output_init_element): Pass loc to error_init.
8421 (process_init_element): Pass loc to error_init, pop_init_level,
8422 pedwarn_init, and push_init_level.
8423
661a0813
MP
84242014-05-09 Marek Polacek <polacek@redhat.com>
8425
8426 PR c/50459
8427 * c-parser.c (c_parser_attributes): Parse the arguments as an
8428 expression-list if the attribute takes identifier.
8429
2793eeab
MP
84302014-05-08 Marek Polacek <polacek@redhat.com>
8431
8432 PR c/61053
8433 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
8434 TYPE_ALIGN_UNIT.
8435
f827930a
MP
84362014-05-08 Marek Polacek <polacek@redhat.com>
8437
8438 PR c/61077
8439 * c-decl.c (start_function): Warn for _Atomic-qualified return type
8440 of main.
8441
1d60af08
KZ
84422014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8443 Mike Stump <mikestump@comcast.net>
8444 Richard Sandiford <rdsandiford@googlemail.com>
8445
8446 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
8447 (finish_enum): Use wide-int interfaces.
8448 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
8449 * c-typeck.c (build_c_cast): Likewise.
8450 (set_nonincremental_init_from_string): Likewise.
8451 (c_tree_equal): Likewise.
8452
a0e24419
MP
84532014-05-02 Marek Polacek <polacek@redhat.com>
8454
8455 PR c/25801
8456 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
8457 Return size_one_node when the type is not complete.
8458 (pointer_diff): Remove comment.
8459 (build_unary_op): Improve error messages.
8460
19fc9faa
MP
84612014-05-02 Marek Polacek <polacek@redhat.com>
8462
8463 * c-typeck.c (c_finish_return): Separate warning_at calls.
8464
63bc4e87
MP
84652014-05-02 Marek Polacek <polacek@redhat.com>
8466
8467 * c-tree.h (error_init): Remove declaration.
8468 (pedwarn_init): Likewise.
8469 * c-typeck.c (error_init): Make static and move above.
8470 (pedwarn_init): Likewise.
8471 (warning_init): Move above.
8472 (maybe_warn_string_init): Likewise.
8473
4bd2511b
JL
84742014-05-01 Jeff Law <law@redhat.com>
8475
8476 Revert:
8477
8478 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8479 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
8480 avoid goto.
8481
6a358dcb
MP
84822014-05-02 Marek Polacek <polacek@redhat.com>
8483
8484 PR c/60784
8485 * c-typeck.c (push_init_level): Set constructor_designated to
8486 p->designated for structures.
8487
ae5ebda4
MP
84882014-05-01 Marek Polacek <polacek@redhat.com>
8489
8490 PR c/60915
8491 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
8492 function-definition has an attribute after the declarator.
8493
96b40f8d
MP
84942014-05-01 Marek Polacek <polacek@redhat.com>
8495
8496 PR c/60257
8497 * c-typeck.c (warning_init): Add location_t parameter. Call
8498 warning_at instead of warning.
8499 (push_init_level): Pass input_location to warning_init.
8500 (add_pending_init): Add location_t parameter. Pass loc to
8501 warning_init.
8502 (set_nonincremental_init): Pass input_location to add_pending_init.
8503 (set_nonincremental_init_from_string): Likewise.
8504 (output_init_element): Pass loc to warning_init and to
8505 add_pending_init.
8506
32e00768
MP
85072014-05-01 Marek Polacek <polacek@redhat.com>
8508
8509 PR c/43395
8510 * c-typeck.c (c_finish_return): Distinguish between label and variable
8511 when warning about returning local address.
8512
c9379ce2
MP
85132014-05-01 Marek Polacek <polacek@redhat.com>
8514
8515 PR c/29467
8516 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
8517 in C89 mode.
8518
d00887e8
MP
85192014-05-01 Marek Polacek <polacek@redhat.com>
8520
8521 PR c/43245
8522 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
8523 instead of 0 to WARN_FOR_QUALIFIERS.
8524
5436fa2e
MP
85252014-05-01 Marek Polacek <polacek@redhat.com>
8526
8527 PR c/56989
8528 * c-typeck.c (default_conversion): Use better location for
8529 error call.
8530
f8ed5150
MP
85312014-04-30 Marek Polacek <polacek@redhat.com>
8532
8533 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
8534 also when SANITIZE_FLOAT_DIVIDE is on.
8535
8337d1db
MP
85362014-04-30 Marek Polacek <polacek@redhat.com>
8537
8538 PR c/60139
8539 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
8540 and pedwarn_init. Use loc insted of input_location.
8541
c4bdc42f
MP
85422014-04-30 Marek Polacek <polacek@redhat.com>
8543
8544 PR c/60351
8545 * c-typeck.c (build_binary_op): Use location when warning about
8546 shift count.
8547
45484dcf
MP
85482014-04-25 Marek Polacek <polacek@redhat.com>
8549
8550 PR c/18079
8551 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
8552 always_inline/noinline and hot/cold attributes.
8553
34cf811f
MP
85542014-04-25 Marek Polacek <polacek@redhat.com>
8555
8556 PR c/60114
8557 * c-parser.c (c_parser_initelt): Pass input_location to
8558 process_init_element.
8559 (c_parser_initval): Pass loc to process_init_element.
8560 * c-tree.h (process_init_element): Adjust declaration.
8561 * c-typeck.c (push_init_level): Pass input_location to
8562 process_init_element.
8563 (pop_init_level): Likewise.
8564 (set_designator): Likewise.
8565 (output_init_element): Add location_t parameter. Pass loc to
8566 digest_init.
8567 (output_pending_init_elements): Pass input_location to
8568 output_init_element.
8569 (process_init_element): Add location_t parameter. Pass loc to
8570 output_init_element.
8571
42056eac
JJ
85722014-04-24 Jakub Jelinek <jakub@redhat.com>
8573
8574 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
8575 atomic-clause, allow comma in between atomic-clause and
8576 seq_cst.
8577
e162a134
JJ
85782014-04-22 Jakub Jelinek <jakub@redhat.com>
8579
8580 PR c/59073
8581 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
8582 fails, don't set OM_PARALLEL_COMBINED and return NULL.
8583
2f6babac
IZ
85842014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8585
8586 PR middle-end/60469
8587 * c-array-notation.c (fix_builtin_array_notation_fn): Use
8588 create_tmp_var instead build_decl for creating temps.
8589 (build_array_notation_expr): Likewise.
8590 (fix_conditional_array_notations_1): Likewise.
8591 (fix_array_notation_expr): Likewise.
8592 (fix_array_notation_call_expr): Likewise.
8593
8edbfaa6
JJ
85942014-03-28 Jakub Jelinek <jakub@redhat.com>
8595
8596 PR c++/60689
8597 * c-tree.h (c_build_function_call_vec): New prototype.
8598 * c-typeck.c (build_function_call_vec): Don't call
8599 resolve_overloaded_builtin here.
8600 (c_build_function_call_vec): New wrapper function around
8601 build_function_call_vec. Call resolve_overloaded_builtin here.
8602 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
8603 Call c_build_function_call_vec instead of build_function_call_vec.
8604 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
8605 * c-decl.c (finish_decl): Likewise.
8606
7485aeea
MLI
86072014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8608
8609 PR c/55383
8610 * c-typeck.c: Use correct format string in cast-qual warning
8611
b17a8b07
TS
86122014-03-07 Thomas Schwinge <thomas@codesourcery.com>
8613
8614 * c-decl.c (c_decl_attributes): Use
8615 lang_hooks.types.omp_mappable_type.
8616 * c-typeck.c (c_finish_omp_clauses): Likewise.
8617
3af9c5e9
MP
86182014-03-06 Marek Polacek <polacek@redhat.com>
8619
8620 PR c/60197
8621 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
8622 of checking tree code.
8623
1c9f5f33
PK
86242014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8625
8626 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
8627 (c_parser_parameter_declaration): Likewise.
8628
cc28fc7f
MP
86292014-02-19 Marek Polacek <polacek@redhat.com>
8630
8631 PR c/60195
8632 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
8633 Call mark_exp_read on exp.value.
8634 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
8635 TREE_ADDRESSABLE on old instead of val.
8636 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
8637
b581c05c
PK
86382014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
8639
8640 * c-parser.c (c_parser_get_builtin_args): Replace calls to
8641 C_EXPR_APPEND by vec_safe_push.
8642 * c-tree.h (C_EXPR_APPEND): Remove.
8643
81e5eca8
MP
86442014-01-31 Marek Polacek <polacek@redhat.com>
8645
8646 PR c/59963
8647 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
8648 build_function_call_vec.
8649 (build_function_call): Likewise.
8650 (build_atomic_assign): Likewise.
8651 (build_function_call_vec): Add arg_loc parameter. Use it.
8652 (convert_arguments): Likewise.
8653 (convert_for_assignment): Rename rhs_loc to expr_loc.
8654 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
8655 (c_parser_objc_keywordexpr): Likewise.
8656 (c_parser_postfix_expression_after_primary): Call
8657 build_function_call_vec with expr_loc rather than op_loc.
8658 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
8659 build_function_call_vec.
8660 (c_parser_expr_list): Add locations parameter. Fill it with locations
8661 of function arguments.
8662 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
8663
68fca595
MP
86642014-01-30 Marek Polacek <polacek@redhat.com>
8665
8666 PR c/59940
8667 * c-typeck.c (build_function_call_vec): Use loc parameter.
8668 (convert_arguments): Add location parameter. Use it.
8669 (ep_convert_and_check): Likewise.
8670 (build_atomic_assign): Adjust convert_for_assignment call.
8671 (build_modify_expr): Likewise.
8672 (digest_init): Likewise.
8673 (c_finish_return): Likewise.
8674 (build_conditional_expr): Adjust ep_convert_and_check calls.
8675 (convert_for_assignment): Add rhs_loc parameter. Use it.
8676 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
8677 calls.
8678
fa337f3a
RB
86792014-01-30 Richard Biener <rguenther@suse.de>
8680
8681 PR c/59905
8682 * c-typeck.c (build_function_call_vec): Do not replace calls
8683 to a function via an incompatible type with a runtime abort.
8684
b72271b9
BI
86852014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8686
8687 * c-parser.c (c_parser_declaration_or_fndef): Replaced
8688 flag_enable_cilkplus with flag_cilkplus.
8689 (c_parser_direct_declarator_inner): Likewise.
8690 (c_parser_attribute_any_word): Likewise.
8691 (c_parser_attributes): Likewise.
8692 (c_parser_compound_statement): Likewise.
8693 (c_parser_statement_after_labels): Likewise.
8694 (c_parser_if_statement): Likewise.
8695 (c_parser_switch_statement): Likewise.
8696 (c_parser_do_statement): Likewise.
8697 (c_parser_for_statement): Likewise.
8698 (c_parser_unary_expression): Likewise.
8699 (c_parser_postfix_expression): Likewise.
8700 (c_parser_postfix_expression_after_primary): Likewise.
8701 (c_parser_postfix_expression_after_primary): Likewise.
8702 (c_parser_omp_clause_name): Likewise.
8703 (c_finish_omp_declare_simd): Likewise.
8704 (c_parser_cilk_verify_simd): Likewise.
8705 * c-typeck.c (build_array_ref): Likewise.
8706 (build_function_call_vec): Likewise.
8707 (convert_arguments): Likewise.
8708 (build_compound_expr): Likewise.
8709 (c_finish_return): Likewise.
8710 (c_finish_if_stmt): Likewise.
8711 (c_finish_loop): Likewise.
8712 (build_binary_op): Likewise.
8713
393e8e8b
MP
87142014-01-23 Marek Polacek <polacek@redhat.com>
8715
8716 PR c/59846
8717 * c-typeck.c (parser_build_binary_op): Use location instead of
8718 input_location.
8719 (build_binary_op): Pass location to shorten_compare.
8720
f04dda30
MP
87212014-01-23 Marek Polacek <polacek@redhat.com>
8722
8723 PR c/58346
8724 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
8725 an empty aggregate.
8726
789eadcd
MP
87272014-01-23 Marek Polacek <polacek@redhat.com>
8728
8729 PR c/59871
8730 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
8731 of a comma expression.
8732 (emit_side_effect_warnings): Likewise.
8733
40f14e9f
BI
87342014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8735
8736 PR c/59825
8737 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
8738 function to use walk_tree and moved a lot of its functionality to
8739 expand_array_notations.
8740 (expand_array_notations): New function.
8741
74558dd9
BI
87422014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
8743
8744 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
8745 attribute an attribute without value.
8746
652fea39
JJ
87472014-01-23 Jakub Jelinek <jakub@redhat.com>
8748
8749 PR middle-end/58809
8750 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
8751 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
8752
f34f1c87
MP
87532014-01-22 Marek Polacek <polacek@redhat.com>
8754
8755 PR c/59891
8756 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
8757 of remove_c_maybe_const_expr on op1 and op2.
8758
241f845a
JJ
87592014-01-15 Jakub Jelinek <jakub@redhat.com>
8760
8761 PR c/58943
8762 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
8763 effects, preevaluate rhs using SAVE_EXPR first.
8764
9a74f20c
BI
87652014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
8766
8767 PR c++/59631
8768 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
8769 statements with if-elseif statements.
8770
96066ce1
MP
87712014-01-06 Marek Polacek <polacek@redhat.com>
8772
8773 PR c/57773
8774 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
8775 defined bit-field types only in ISO C.
8776
23a5b65a
RS
87772014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8778
8779 Update copyright years
8780
f9030485
RS
87812014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8782
8783 * c-array-notation.c: Use the standard form for the copyright notice.
8784
41958c28
BI
87852013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8786
8787 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
8788 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
8789 field in parser is not empty. If not-empty, call the function
8790 c_parser_finish_omp_declare_simd.
8791 (c_parser_cilk_clause_vectorlength): Modified function to be shared
8792 between SIMD-enabled functions and #pragma simd. Added new parameter.
8793 (c_parser_cilk_all_clauses): Modified the usage of the function
8794 c_parser_cilk_clause_vectorlength as mentioned above.
8795 (c_parser_cilk_simd_fn_vector_attrs): New function.
8796 (c_finish_cilk_simd_fn_tokens): Likewise.
8797 (is_cilkplus_vector_p): Likewise.
8798 (c_parser_omp_clause_name): Added checking for "vectorlength,"
8799 "nomask," and "mask" strings in clause name.
8800 (c_parser_omp_all_clauses): Added 3 new case statements:
8801 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
8802 PRAGMA_CILK_CLAUSE_NOMASK.
8803 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
8804 check for vector attribute and if so call the function
8805 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
8806 called the function c_finish_cilk_simd_fn_tokens.
8807 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
8808 parser field is non-empty. If so, parse them as you would parse
8809 the omp declare simd pragma.
8810 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
8811 Added a check when step is a parameter and flag it as error.
8812 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
8813 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
8814 pragma_omp_clause.
8815
cef0fd0e
TS
88162013-12-17 Thomas Schwinge <thomas@codesourcery.com>
8817
8818 * c-parser.c (c_parser_omp_parallel): Fix description.
8819
12893402
BI
88202013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8821
8822 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
8823 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8824 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
8825 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
8826
296674db
JM
88272013-12-04 Joseph Myers <joseph@codesourcery.com>
8828
8829 PR c/52023
8830 * c-parser.c (c_parser_alignas_specifier): Use
8831 c_sizeof_or_alignof_type instead of c_alignof.
8832 (c_parser_alignof_expression): Likewise, with min_alignof
8833 parameter depending on alignof spelling used.
8834
edd28054
MP
88352013-12-04 Marek Polacek <polacek@redhat.com>
8836
8837 PR c/54113
8838 * c-decl.c (start_function): Don't warn for missing prototype for
8839 inline functions.
8840
da0fc454
MP
88412013-12-03 Marek Polacek <polacek@redhat.com>
8842
8843 PR c/59351
8844 * c-decl.c (build_compound_literal): Allow compound literals with
8845 empty initial value.
8846
4c2ecab0
JM
88472013-12-02 Joseph Myers <joseph@codesourcery.com>
8848
8849 PR c/58235
8850 * c-typeck.c (build_modify_expr): Diagnose assignment to
8851 expression with array type.
8852
340baef7
JM
88532013-11-29 Joseph Myers <joseph@codesourcery.com>
8854
8855 PR c/42262
8856 * c-typeck.c (process_init_element): Do not treat a string as
8857 initializing a whole array when used with a designator for an
8858 individual element.
8859
6763b9f7
JM
88602013-11-29 Joseph Myers <joseph@codesourcery.com>
8861
8862 PR c/57574
8863 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
8864 an inline function following a static declaration.
8865
e7bd1de1
JJ
88662013-11-28 Jakub Jelinek <jakub@redhat.com>
8867
8868 PR c/59310
8869 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
8870 to p_name before calling c_parser_omp_teams instead of after.
8871 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
8872 argument. Remove unused p_name variable.
8873
0136f8f0
AH
88742013-11-27 Aldy Hernandez <aldyh@redhat.com>
8875 Jakub Jelinek <jakub@redhat.com>
8876
8877 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
8878 external_scope is NULL.
8879
241b71bb
TV
88802013-11-27 Tom de Vries <tom@codesourcery.com>
8881 Marc Glisse <marc.glisse@inria.fr>
8882
8883 PR c++/59032
8884 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
8885
2fb9a547
AM
88862013-11-22 Andrew MacLeod <amacleod@redhat.com>
8887
8888 * c-typeck.c: Add required include files from gimple.h.
8889
8400e75e
DM
88902013-11-22 David Malcolm <dmalcolm@redhat.com>
8891
8892 * c-decl.c (define_label, shadow_tag_warned)
8893 (check_bitfield_type_and_width, grokdeclarator, grokparms,
8894 store_parm_decls_newstyle, store_parm_decls_oldstyle)
8895 (declspecs_add_type): Remove use of in_system_header macro.
8896 * c-parser.c (c_parser_unary_expression): Likewise.
8897 * c-typeck.c (store_init_value, process_init_element)
8898 (c_start_case): Likewise.
8899
8900 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
8901 macro.
8902
8903 * c-parser.c (c_parser_set_source_position_from_token): Remove
8904 reference to in_system_header from comment.
8905
386b1f1f
RS
89062013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8907
8908 * c-decl.c (grokdeclarator): Update comment to refer to
8909 tree_to_[su]hwi rather than tree_low_cst.
8910
ae7e9ddd
RS
89112013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8912
8913 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
8914 tree_to_uhwi throughout.
8915
9439e9a1
RS
89162013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8917
8918 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
8919 throughout.
8920
9541ffee
RS
89212013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8922
8923 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
8924 throughout.
8925
c02065fc
AH
89262013-11-15 Aldy Hernandez <aldyh@redhat.com>
8927
8928 * c-parser.c (c_parser_cilk_simd): New.
8929 (c_parser_cilk_verify_simd): New.
8930 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
8931 (c_parser_omp_for_loop): Add case for NE_EXPR.
8932 Set c_break_label for CILK_SIMD.
8933 (c_parser_cilk_clause_vectorlength): New.
8934 (c_parser_cilk_clause_linear): New.
8935 (c_parser_cilk_clause_name): New.
8936 (c_parser_cilk_all_clauses): New.
8937 * c-typeck.c (build_unary_op): Pass location argument to
8938 readonly_error.
8939 (build_modify_expr): Same.
8940 (build_asm_expr): Same.
8941 (c_finish_bc_stmt): Error on break/continue in loops.
8942
18f429e2
AM
89432013-11-14 Andrew MacLeod <amacleod@redhat.com>
8944
8945 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
8946
d8a2d370
DN
89472013-11-14 Diego Novillo <dnovillo@google.com>
8948
8949 * c-decl.c: Include print-tree.h.
8950 Include stor-layout.h.
8951 Include varasm.h.
8952 Include attribs.h.
8953 Include stringpool.h.
8954 * c-lang.c: Include fold-const.h.
8955 * c-parser.c: Include stringpool.h.
8956 Include attribs.h.
8957 Include stor-layout.h.
8958 Include varasm.h.
8959 Include trans-mem.h.
8960 * c-typeck.c: Include stor-layout.h.
8961 Include trans-mem.h.
8962 Include varasm.h.
8963 Include stmt.h.
8964
38b7bc7f
JM
89652013-11-13 Joseph Myers <joseph@codesourcery.com>
8966
8967 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
8968 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
8969 __auto_type.
8970 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
8971 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
8972 RID_AUTO_TYPE.
8973 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
8974 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
8975 (c_parser_declarator, c_parser_direct_declarator_inner)
8976 (c_parser_parameter_declaration, c_parser_type_name): All callers
8977 changed.
8978 (c_parser_declaration_or_fndef): Handle declarations with type
8979 determined from the initializer.
8980
45b0be94
AM
89812013-11-12 Andrew MacLeod <amacleod@redhat.com>
8982
18f429e2 8983 * c-typeck.c: Include gimplify.h.
45b0be94 8984
582d9b50
JM
89852013-11-12 Joseph Myers <joseph@codesourcery.com>
8986
8987 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
8988 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
8989 comment.
8990 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
8991 or _Thread_local as appropriate in diagnostics.
8992 (build_null_declspecs): Initialize ret->thread_gnu_p.
8993 (declspecs_add_scspec): Handle either __thread or _Thread_local
8994 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
8995 pedantic. Do not disallow _Thread_local extern and _Thread_local
8996 static.
8997
267bac10
JM
89982013-11-07 Joseph Myers <joseph@codesourcery.com>
8999 Andrew MacLeod <amacleod@redhat.com>
9000
9001 * c-aux-info.c (gen_type): Handle atomic qualifier.
9002 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
9003 qualifiers when compating types.
9004 (shadow_tag_warned): Handle atomic_p in declspecs.
9005 (quals_from_declspecs): Likewise.
9006 (start_decl): Use c_type_promotes_to when promoting argument
9007 types.
9008 (grokdeclarator): Handle _Atomic.
9009 (get_parm_info): Diagnose any qualifier on "void" as only
9010 parameter.
9011 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
9012 comparing types. Use c_type_promotes_to when promoting argument
9013 types.
9014 (finish_function): Use c_type_promotes_to when promoting argument
9015 types.
9016 (build_null_declspecs): Handle atomic_p in declspecs.
9017 (declspecs_add_qual): Handle RID_ATOMIC.
9018 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
9019 (c_token_starts_declspecs): Handle RID_ATOMIC.
9020 (c_parser_declspecs): Handle atomic type specifiers and
9021 qualifiers.
9022 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
9023 from types of expressions with atomic type.
9024 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
9025 (c_parser_attribute_any_word): Handle RID_ATOMIC.
9026 (c_parser_initializer, c_parser_initelt, c_parser_initval)
9027 (c_parser_statement_after_labels, c_parser_switch_statement)
9028 (c_parser_for_statement, c_parser_expr_no_commas)
9029 (c_parser_conditional_expression, c_parser_binary_expression)
9030 (c_parser_cast_expression, c_parser_unary_expression)
9031 (c_parser_postfix_expression)
9032 (c_parser_postfix_expression_after_primary, c_parser_expression):
9033 Use convert_lvalue_to_rvalue.
9034 (c_parser_expression_conv, c_parser_expr_list): Document
9035 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
9036 (c_parser_objc_synchronized_statement): Use
9037 convert_lvalue_to_rvalue.
9038 (c_parser_objc_selector): Handle RID_ATOMIC.
9039 (c_parser_objc_receiver, c_parser_array_notation): Use
9040 convert_lvalue_to_rvalue.
9041 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
9042 _Atomic (type-name).
9043 (struct c_declspecs): Add atomic_p field.
9044 (convert_lvalue_to_rvalue): Declare.
9045 * c-typeck.c (c_type_promotes_to): Promote atomic types to
9046 corresponding atomic types.
9047 (qualify_type): Don't add _Atomic qualifiers from second argument.
9048 (comp_target_types): Do not allow _Atomic mismatches.
9049 (type_lists_compatible_p): Do not remove atomic qualifiers when
9050 comparing types.
9051 (really_atomic_lvalue, convert_lvalue_to_rvalue)
9052 (build_atomic_assign): New functions.
9053 (build_unary_op): Use build_atomic_assign for atomic increment and
9054 decrement.
9055 (build_conditional_expr): Do not treat _Atomic void as a qualified
9056 version of void.
9057 (build_modify_expr): Use build_atomic_assign for atomic LHS.
9058 (find_anonymous_field_with_type, convert_to_anonymous_field)
9059 (convert_for_assignment): Do not remove atomic qualifiers when
9060 comparing types.
9061 (digest_init): Do not accept initialization of arrays of atomic
9062 elements by string constants.
9063 (build_asm_expr): Use convert_lvalue_to_rvalue.
9064 (build_binary_op): Do not treat _Atomic void as a qualified
9065 version of void.
9066
0c249d4b
DD
90672013-11-06 DJ Delorie <dj@redhat.com>
9068
9069 * c-decl.c (locate_old_decl): If a previous conflicting decl is
9070 both explicit and builtin, print the location of the explicit one.
9071
6d7f7e0a
TB
90722013-11-05 Tobias Burnus <burnus@net-b.de>
9073
9074 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
9075 c_parser_omp_distribute, c_parser_omp_teams,
9076 c_parser_omp_target, c_parser_omp_declare): Handle
9077 -fopenmp-simd.
9078
b906f4ca
MP
90792013-11-03 Marek Polacek <polacek@redhat.com>
9080
9081 * c-decl.c (grokdeclarator): Add VLA instrumentation.
9082
ee1d5a02
JJ
90832013-11-01 Jakub Jelinek <jakub@redhat.com>
9084
9085 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
9086 check_dup_generic at the end, unless remove is true.
9087 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
9088 remove = true;.
9089 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
9090
5a9785fb
JJ
90912013-10-31 Jakub Jelinek <jakub@redhat.com>
9092
9093 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
9094 with decl that is not pointer nor array.
9095
939b37da
BI
90962013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
9097
9098 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
9099 a spawning function is found.
9100 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
9101 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
9102 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
9103 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
9104 case.
9105 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
9106 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
9107 expr.
9108 (c_finish_return): Added a check to reject _Cilk_spawn in return
9109 expression.
9110 (build_cilk_spawn): New function.
9111 (build_cilk_sync): Likewise.
9112 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 9113
d4af74d4
TB
91142013-10-27 Tobias Burnus <burnus@net-b.de>
9115
9116 PR other/33426
9117 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
9118 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
9119 (c_parser_statement_after_labels): Update calls.
9120
d73749df 91212013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
9122
9123 PR other/33426
9124 * c-parser.c (c_parser_pragma, c_parser_for_statement):
9125 Handle PRAGMA_IVDEP.
9126 (c_parser_statement_after_labels): Update call.
9127
f28aa681
MP
91282013-10-24 Marek Polacek <polacek@redhat.com>
9129
9130 * c-parser.c (c_parser_struct_declaration): Add a comment.
9131 (c_parser_declarator): Don't allow _Alignas here.
9132
0645c1a2
AM
91332013-10-17 Andrew MacLeod <amacleod@redhat.com>
9134
9135 * c-parser.c: Include omp-low.h.
9136 * c-typeck.c: Likewise.
9137
568a31f2
MP
91382013-10-17 Marek Polacek <polacek@redhat.com>
9139
9140 PR c/58267
9141 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
9142 Document syntax of the array-declarator.
9143 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
9144 are not permitted.
9145 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
9146 (c_parser_struct_declaration): Likewise.
9147 (c_parser_declarator): Likewise.
9148 (c_parser_direct_declarator_inner): Likewise.
9149 (c_parser_parameter_declaration): Likewise.
9150 (c_parser_type_name): Likewise.
9151
acf0174b
JJ
91522013-10-11 Jakub Jelinek <jakub@redhat.com>
9153
9154 * c-lang.h (current_omp_declare_target_attribute): New extern
9155 decl.
9156 * c-parser.c: Include c-lang.h.
9157 (struct c_parser): Change tokens to c_token *.
9158 Add tokens_buf field. Change tokens_avail type to unsigned int.
9159 (c_parser_consume_token): If parser->tokens isn't
9160 &parser->tokens_buf[0], increment parser->tokens.
9161 (c_parser_consume_pragma): Likewise.
9162 (enum pragma_context): Add pragma_struct and pragma_param.
9163 (c_parser_external_declaration): Adjust
9164 c_parser_declaration_or_fndef caller.
9165 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
9166 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
9167 Adjust recursive call.
9168 (c_parser_struct_or_union_specifier): Use pragma_struct instead
9169 of pragma_external.
9170 (c_parser_parameter_declaration): Use pragma_param instead of
9171 pragma_external.
9172 (c_parser_compound_statement_nostart, c_parser_label,
9173 c_parser_for_statement): Adjust
9174 c_parser_declaration_or_fndef callers.
9175 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
9176 it through to c_parser_conditional_expression.
9177 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
9178 pass it through to c_parser_binary_expression. Adjust recursive
9179 call.
9180 (c_parser_binary_expression): Remove prec argument, add
9181 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
9182 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
9183 binop matches it, use build2 instead of parser_build_binary_op.
9184 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
9185 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
9186 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
9187 Handle pragma_struct and pragma_param the same as pragma_external.
9188 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
9189 (c_parser_omp_variable_list): Parse array sections for
9190 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
9191 (c_parser_omp_clause_collapse): Fully fold collapse expression.
9192 (c_parser_omp_clause_reduction): Handle user defined reductions.
9193 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
9194 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
9195 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
9196 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
9197 c_parser_omp_clause_depend, c_parser_omp_clause_map,
9198 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
9199 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
9200 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
9201 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
9202 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
9203 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
9204 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
9205 (c_parser_omp_for_loop): Add CODE argument, pass it through
9206 to c_finish_omp_for. Change last argument to cclauses,
9207 and adjust uses to grab parallel clauses from the array of all
9208 the split clauses. Adjust c_parser_binary_expression,
9209 c_parser_declaration_or_fndef and c_finish_omp_for callers.
9210 (omp_split_clauses): New function.
9211 (c_parser_omp_simd): New function.
9212 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
9213 Allow the function to be called also when parsing combined constructs,
9214 and call c_parser_omp_simd when parsing for simd.
9215 (c_parser_omp_sections_scope): If section-sequence doesn't start with
9216 #pragma omp section, require exactly one structured-block instead of
9217 sequence of statements.
9218 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
9219 Allow the function to be called also when parsing combined constructs.
9220 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
9221 Allow the function to be called also when parsing combined
9222 constructs.
9223 (c_parser_omp_taskgroup, c_parser_omp_cancel,
9224 c_parser_omp_cancellation_point, c_parser_omp_distribute,
9225 c_parser_omp_teams, c_parser_omp_target_data,
9226 c_parser_omp_target_update, c_parser_omp_target,
9227 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
9228 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
9229 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
9230 (c_parser_omp_construct): Add p_name and mask vars. Handle
9231 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
9232 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
9233 and c_parser_omp_sections callers.
9234 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
9235 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
9236 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
9237 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
9238 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
9239 OMP_CLAUSE_DEPEND.
9240 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
9241 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
9242 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
9243 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
9244 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
9245 * c-typeck.c: Include tree-inline.h.
9246 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
9247 handle_omp_array_sections_1, handle_omp_array_sections,
9248 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
9249 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
9250 user defined reductions.
9251 (c_tree_equal): New function.
9252 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
9253 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
9254 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
9255 c_check_omp_declare_reduction_r): New prototypes.
9256 * c-decl.c (current_omp_declare_target_attribute): New variable.
9257 (c_decl_attributes): New function.
9258 (start_decl, start_function): Use it instead of decl_attributes.
9259 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
9260 c_omp_reduction_decl, c_omp_reduction_lookup,
9261 c_check_omp_declare_reduction_r): New functions.
9262
0a6c2227
TT
92632013-09-25 Tom Tromey <tromey@redhat.com>
9264
9265 * Make-lang.in (c/gccspec.o): Remove.
9266 (CFLAGS-c/gccspec.o): New variable.
9267 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
9268 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
9269 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
9270
f3bc55f0
TT
92712013-09-25 Tom Tromey <tromey@redhat.com>
9272
9273 * Make-lang.in (c/gccspec.o): Don't use subshell.
9274
a24d975c
MP
92752013-09-18 Marek Polacek <polacek@redhat.com>
9276
9277 PR sanitize/58443
9278 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
9279 Remove unnecessary check.
9280
ce6923c5
MP
92812013-09-18 Marek Polacek <polacek@redhat.com>
9282
9283 PR sanitizer/58411
9284 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
9285 no_sanitize_undefined attribute.
9286
a1e51df9
KT
92872013-09-13 Kai Tietz <ktietz@redhat.com>
9288
9289 PR target/57848
9290 * c-decl.c (c_builtin_function_ext_scope): Remove
9291 wrong assumption that it is never called on prexisting
9292 symbol.
9293
0af94e6f
JR
92942013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9295
9296 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
9297
20059c8b
GDR
92982013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9299
9300 * c-objc-common.c (c_tree_printer): Tidy.
9301
de5a5fa1
MP
93022013-08-30 Marek Polacek <polacek@redhat.com>
9303
9304 * c-typeck.c (build_binary_op): Add division by zero and shift
9305 instrumentation.
9306
2531a1d9 93072013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 9308 Joseph Myers <joseph@codesourcery.com>
2531a1d9 9309
6e2bcc98 9310 PR c/35649
2531a1d9
JR
9311 * c-typeck.c (c_common_type): Prefer double_type_node over
9312 other REAL_TYPE types with the same precision.
9313 (convert_arguments): Likewise.
9314
025311c4
GDR
93152013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
9316
9317 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
9318 (c_initialize_diagnostics): Call a destructor for the early printer.
9319
da6ca2b5
GDR
93202013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9321
9322 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
9323 printer initialization.
9324
318cda85 93252013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 9326
318cda85
BI
9327 PR c/57490
9328 * c-array-notation.c (fix_conditional_array_notations_1): Added a
9329 check for truth values.
9330 (expand_array_notation_exprs): Added truth values case. Removed an
9331 unwanted else. Added for-loop to walk through subtrees in default
9332 case.
9333
b066401f
GDR
93342013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9335
9336 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
9337
fb48aadc
JM
93382013-07-23 Joseph Myers <joseph@codesourcery.com>
9339
9340 * c-parser.c (struct c_generic_association): Fix typo.
9341
433cc7b0
TT
93422013-07-23 Tom Tromey <tromey@redhat.com>
9343 Joseph Myers <joseph@codesourcery.com>
9344
9345 * c-parser.c (struct c_generic_association): New.
9346 (c_generic_association_d): New typedef.
9347 (c_parser_generic_selection): New function.
9348 (c_parser_postfix_expression): Handle RID_GENERIC.
9349
26d40c3d
JM
93502013-07-13 Jason Merrill <jason@redhat.com>
9351
9352 PR c++/57793
9353 * c-decl.c (finish_struct): Check for too-large class.
9354
ecdbd01a 93552013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
9356
9357 PR c/57821
9358 * c-typeck.c (set_init_index): When folding, check for index overflow.
9359
1141ed3f
BI
93602013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9361
9362 * c-parser.c (c_parser_array_notation): Removed rejection of array
9363 notations in an array of function pointers.
9364
713b46fa
BI
93652013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9366
9367 * c-array-notation.c (make_triplet_val_inv): New function.
9368 (create_cmp_incr): Likewise.
9369 (create_array_refs): Likewise.
9370 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
9371 Also modularized common parts between functions and called the function.
9372 (build_array_notation_expr): Likewise.
9373 (fix_conditional_array_notations_1): Likewise.
9374 (fix_array_notation_expr): Likewise.
9375 (fix_array_notation_call_expr): Likewise.
9376
92f20202
MP
93772013-06-18 Marek Polacek <polacek@redhat.com>
9378
9379 PR c/57630
9380 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
9381
73a23b06
BI
93822013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
9383
9384 * c-array-notation.c (build_array_notation_expr): Reject array notation
9385 mismatch between LHS and RHS even inside a call_expr. Also, removed
9386 a couple while statements that were dead code.
9387
00b8517d
BI
93882013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
9389
9390 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
9391 excessive precision expressions in function parameters. Also removed
9392 couple unwanted while statements.
9393
1509bdda
BI
93942013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9395
9396 * c-array-notation.c (expand_array_notation_exprs): Added
9397 ARRAY_NOTATION_REF case.
ab20d992 9398
d60f1706
BI
93992013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9400
9401 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
9402 function to c-family/array-notation-common.c.
9403 (is_cilkplus_reduce_builtin): Likewise.
9404 (find_rank): Likewise.
9405 (extract_array_notation_exprs): Likewise.
9406 (replace_array_notations): Likewise.
9407 (find_inv_trees): Likewise.
9408 (replace_inv_trees): Likewise.
9409 (contains_array_notation_expr): Likewise.
9410 (find_correct_array_notation_type): Likewise.
9411 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
9412 (struct inv_list): Moved this to c-family/array-notation-common.c.
9413 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 9414
6d6efbb3
BI
94152013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
9416
9417 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
9418 reduction functions outside the for-loop. Added a check if the fundecl
9419 is non-NULL. Finally, removed an unwanted if-statement, and made the
9420 body unconditional.
9421
25c22937
BI
94222013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9423
9424 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
9425 condition of the if-statement matches the rank of else-block and then-
9426 block when array notations are used.
9427 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
9428 expression after the entire function body is parsed.
9429 (c_parser_expr_no_commas): Delayed creating array notation expressions
9430 to the end of function parsing.
9431 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
9432 whole if-statement instead of just the condition.
ab20d992 9433 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 9434
edd25645
BI
94352013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
9436
9437 PR c/57474
9438 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
9439 array to NULL_TREE if they are unused. Also added a check for the
9440 field to be NULL before its fields are used in future.
ab20d992 9441
065ce7f1
RO
94422013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9443
9444 PR bootstrap/57450
9445 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
9446 (build_array_notation_expr): Likewise.
9447
36536d79
BI
94482013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9449
9450 * c-typeck.c (build_array_ref): Added a check to see if array's
9451 index is greater than one. If true, then emit an error.
9452 (build_function_call_vec): Exclude error reporting and checking
9453 for builtin array-notation functions.
9454 (convert_arguments): Likewise.
9455 (c_finish_return): Added a check for array notations as a return
9456 expression. If true, then emit an error.
9457 (c_finish_loop): Added a check for array notations in a loop
9458 condition. If true then emit an error.
9459 (lvalue_p): Added a ARRAY_NOTATION_REF case.
9460 (build_binary_op): Added a check for array notation expr inside
9461 op1 and op0. If present, we call another function to find correct
9462 type.
9463 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
9464 * c-parser.c (c_parser_compound_statement): Check if array
9465 notation code is used in tree, if so, then transform them into
9466 appropriate C code.
9467 (c_parser_expr_no_commas): Check if array notation is used in LHS
9468 or RHS, if so, then build array notation expression instead of
9469 regular modify.
9470 (c_parser_postfix_expression_after_primary): Added a check for
9471 colon(s) after square braces, if so then handle it like an array
9472 notation. Also, break up array notations in unary op if found.
9473 (c_parser_direct_declarator_inner): Added a check for array
9474 notation.
9475 (c_parser_compound_statement): Added a check for array notation in
9476 a stmt. If one is present, then expand array notation expr.
9477 (c_parser_if_statement): Likewise.
9478 (c_parser_switch_statement): Added a check for array notations in
9479 a switch statement's condition. If true, then output an error.
9480 (c_parser_while_statement): Similarly, but for a while.
9481 (c_parser_do_statement): Similarly, but for a do-while.
9482 (c_parser_for_statement): Similarly, but for a for-loop.
9483 (c_parser_unary_expression): Check if array notation is used in a
9484 pre-increment or pre-decrement expression. If true, then expand
9485 them.
9486 (c_parser_array_notation): New function.
9487 * c-array-notation.c: New file.
9488 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 9489
cd192ccc
MS
94902013-05-23 Mike Stump <mikestump@comcast.net>
9491
9492 * c-typeck.c (convert_for_assignment): Handle references to memory
9493 spaces better.
9494
427b248d
JM
94952013-05-16 Jason Merrill <jason@redhat.com>
9496
9497 * Make-lang.in (cc1$(exeext)): Use link mutex.
9498
44d90fe1
PC
94992013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9500
9501 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
9502 to simply use OPT_Wpointer_arith.
9503 (build_unary_op): Likewise.
9504
4e7d7b3d
JJ
95052013-04-03 Jakub Jelinek <jakub@redhat.com>
9506
9507 PR c/19449
9508 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
9509 argument. If set, or it temporarily for parsing of the first
9510 argument into force_folding_builtin_constant_p.
9511 (c_parser_postfix_expression): Adjust callers.
9512
839b422f
RB
95132013-03-21 Richard Biener <rguenther@suse.de>
9514
9515 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
9516 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
9517
2ee028f1
MP
95182013-02-12 Marek Polacek <polacek@redhat.com>
9519
9520 PR c/44938
9521 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
9522 origtypes to NULL.
9523
8824edff
JJ
95242013-01-24 Jakub Jelinek <jakub@redhat.com>
9525
9526 PR c/56078
9527 * c-typeck.c (set_nonincremental_init_from_string): If
9528 constructor_max_index is NULL, treat it as if tree_int_cst_lt
9529 returned false.
9530 (process_init_element): Likewise.
9531
eadd3d0d
JJ
95322012-12-20 Jakub Jelinek <jakub@redhat.com>
9533
9534 PR c++/55619
9535 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
9536 argument, don't call default_function_array_conversion
9537 nor c_fully_fold here.
9538 (c_parser_asm_statement): Adjust callers.
9539 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
9540 and outputs here, and call default_function_array_conversion
9541 on inputs that don't need to be addressable.
9542
f8a93a2e
JJ
95432012-12-18 Jakub Jelinek <jakub@redhat.com>
9544
9545 PR c/39464
9546 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
9547 warning require that both c_common_unsigned_type as well as
9548 c_common_signed_type is the same for both mvl and mvr types.
9549
9771b263
DN
95502012-11-16 Diego Novillo <dnovillo@google.com>
9551
9552 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
9553
9554 * c-common.c: Use new vec API in vec.h.
9555 * c-common.h: Likewise.
9556 * c-gimplify.c: Likewise.
9557 * c-pragma.c: Likewise.
9558 * c-pretty-print.c: Likewise.
9559 * c-pretty-print.h: Likewise.
9560 * c-semantics.c: Likewise.
9561 * c-decl.c: Likewise.
9562 * c-parser.c: Likewise.
9563 * c-tree.h: Likewise.
9564 * c-typeck.c: Likewise.
9565
880661a4
JW
95662012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9567
9568 PR c++/54930
9569 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
9570
077d1abe
MLI
95712012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9572
9573 PR c/53066
9574 * c-decl.c (warn_if_shadowing): Do not warn if a variable
9575 shadows a function, unless the variable is a function or a
9576 pointer-to-function.
9577
3a785c97
JJ
95782012-10-12 Jakub Jelinek <jakub@redhat.com>
9579
9580 PR c/54381
9581 * c-parser.c (struct c_tree_loc_pair): Removed.
9582 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
9583 add location_t * and tree * arguments, fill in array of 3
9584 sizeof_arg trees and corresponding locs.
9585 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
9586 c_parser_expr_list callers.
9587 (c_parser_postfix_expression_after_primary): Likewise. Pass
9588 array of 3 sizeof_arg trees and locs (corresponding to first
9589 3 arguments) to sizeof_pointer_memaccess_warning.
9590
703c8606
LC
95912012-10-09 Lawrence Crowl <crowl@google.com>
9592
9593 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
9594 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
9595 hash table.
9596
5d9de0d0
PC
95972012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9598
9599 PR c++/54194
9600 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
9601 call.
9602
a212e43f
MG
96032012-10-09 Marc Glisse <marc.glisse@inria.fr>
9604
9605 PR c++/54427
9606 * c-typeck.c: Include c-common.h.
9607 (enum stv_conv): Moved to c-common.h.
9608 (scalar_to_vector): Moved to c-common.c.
9609 (build_binary_op): Adapt to scalar_to_vector's new prototype.
9610 * Make-lang.in: c-typeck.c depends on c-common.h.
9611
3b78de56
AC
96122012-10-04 Arnaud Charlet <charlet@adacore.com>
9613
9614 * c-decl.c (c_write_global_declarations): Fix handling of
9615 -fdump-ada-spec*.
9616
78c60e3d
SS
96172012-09-30 Sharad Singhai <singhai@google.com>
9618
9619 * c-decl.c (c_write_global_declarations): Use a different method
9620 to determine if the dump has ben initialized.
9621
9f33203d
JM
96222012-09-14 Joseph Myers <joseph@codesourcery.com>
9623
9624 PR c/54552
9625 * c-typeck.c (c_cast_expr): When casting to a type requiring
9626 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
9627 c_fully_fold first.
9628
a27d595d
JM
96292012-09-14 Joseph Myers <joseph@codesourcery.com>
9630
9631 PR c/54103
9632 * c-typeck.c (build_unary_op): Pass original argument of
9633 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
9634 any C_MAYBE_CONST_EXPR, if it has integer operands.
9635 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
9636 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
9637 to c_objc_common_truthvalue_conversion, then remove any
9638 C_MAYBE_CONST_EXPR, if they have integer operands. Use
9639 c_objc_common_truthvalue_conversion not
9640 c_common_truthvalue_conversion.
9641 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
9642 call note_integer_operands for arguments with integer operands
9643 that are not integer constants.
9644
9feb29df
JJ
96452012-09-13 Jakub Jelinek <jakub@redhat.com>
9646
9647 PR c/54559
9648 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
9649 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
9650
d409320c
JJ
96512012-08-31 Jakub Jelinek <jakub@redhat.com>
9652
9653 PR c/54428
9654 * c-convert.c (convert): Don't call fold_convert_loc if
9655 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
9656 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
9657 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
9658
6265d07c
JJ
96592012-08-24 Jakub Jelinek <jakub@redhat.com>
9660
9661 PR c/54355
9662 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
9663 for nested and empty_ok arguments in the call to
9664 c_parser_declaration_or_fndef.
9665
1a4049e7
JJ
96662012-08-17 Jakub Jelinek <jakub@redhat.com>
9667
9668 * c-tree.h (c_last_sizeof_arg): Declare.
9669 * c-parser.c (struct c_tree_loc_pair): New type.
9670 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
9671 non-NULL.
9672 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
9673 (c_parser_postfix_expression_after_primary): Likewise. Call
9674 sizeof_pointer_memaccess_warning if needed.
9675 (sizeof_ptr_memacc_comptypes): New function.
9676 * c-typeck.c (c_last_sizeof_arg): New global variable.
9677 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
9678
0229aee9
UB
96792012-07-24 Uros Bizjak <ubizjak@gmail.com>
9680
9681 * c-lang.h (lang_decl): Add variable_size GTY option.
9682
7ee2468b
SB
96832012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9684
9685 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
9686 * Make-lang.in: Fix dependencies.
9687
d4a10d0a
SB
96882012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9689
9690 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
9691 and add language Makefile hooks.
9692 * config-lang.in: New file.
9693 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
9694 add the required "normal" config-lang.in rules.
9695 * c-lang.h: Moved from gcc/ to here.
9696 * c-tree.h: Likewise.
9697 * c-objc-common.c: Likewise.
9698 * c-objc-common.h: Likewise.
9699 * c-typeck.c: Likewise.
9700 * c-convert.c: Likewise.
9701 * c-lang.c: Likewise.
9702 * c-aux-info.c: Likewise.
9703 * c-errors.c: Likewise.
9704 * gccspec.c: Likewise.
9705 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
9706 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
9707\f
68127a8e 9708Copyright (C) 2012-2023 Free Software Foundation, Inc.
d4a10d0a
SB
9709
9710Copying and distribution of this file, with or without modification,
9711are permitted in any medium without royalty provided the copyright
9712notice and this notice are preserved.