]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Fix profile count comparison.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
28a61ecd
GA
12022-09-24 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/106981
4 * c-typeck.cc (c_tree_equal): Only strip NON_LVALUE_EXPRs at the
5 start. For CONSTANT_CLASS_P or CASE_CONVERT: return false if t1 and
6 t2 have different types.
7
279c6715
GA
82022-09-22 David Malcolm <dmalcolm@redhat.com>
9
10 PR c/106830
11 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
12 (c_parser_cast_expression): Likewise.
13 (c_parser_alignof_expression): Likewise.
14 (c_parser_postfix_expression_after_paren_type): Likewise.
15 (c_parser_postfix_expression_after_primary): Likewise.
16 (c_parser_expression): Likewise.
17 (c_parser_omp_variable_list): Likewise.
18 (c_parser_transaction_expression): Likewise.
19 * c-tree.h (c_expr::set_error): Likewise.
20 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
21 (parser_build_unary_op): Likewise.
22 (parser_build_binary_op): Likewise.
23 (digest_init): Likewise.
24 (pop_init_level): Likewise.
25 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
26
43be56c4
GA
272022-09-19 Marek Polacek <polacek@redhat.com>
28
29 PR c/106947
30 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
31 notes.
32
d0fc05e8
GA
332022-09-15 Richard Biener <rguenther@suse.de>
34
35 * c-decl.cc (build_void_list_node): Remove.
36
ff822367
GA
372022-09-14 Julian Brown <julian@codesourcery.com>
38
39 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
40 on error.
41
fe2a8ce9
GA
422022-09-07 Joseph Myers <joseph@codesourcery.com>
43
44 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
45 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
46 for C2x spellings of keywords.
47 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
48
25aeb922
GA
492022-09-06 Jakub Jelinek <jakub@redhat.com>
50
51 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
52 in omp_cur_iteration - 1 has integer_type_node type.
53
83f2f228
GA
542022-09-03 Jakub Jelinek <jakub@redhat.com>
55
56 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
57 (c_parser_omp_clause_depend_sink): Renamed to ...
58 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
59 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
60 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
61 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
62 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
63 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
64 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
65 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
66 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
67 (c_parser_omp_clause_doacross): New function.
68 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
69 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
70 OMP_CLAUSE_DEPEND_SOURCE.
71 (c_parser_omp_for_loop): Don't diagnose here linear clause together
72 with ordered with argument.
73 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
74 for simd.
75 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
76 (c_parser_omp_ordered): Handle also doacross and adjust for it
77 diagnostic wording.
78 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
79 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
80
c64b0947
GA
812022-09-02 David Malcolm <dmalcolm@redhat.com>
82
83 PR c/90885
84 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
85 (c_parser_expr_no_commas): Likewise.
86 (c_parser_conditional_expression): Likewise.
87 (c_parser_binary_expression): Clear m_decimal when popping the
88 stack.
89 (c_parser_unary_expression): Clear ret.m_decimal.
90 (c_parser_has_attribute_expression): Likewise for result.
91 (c_parser_predefined_identifier): Likewise for expr.
92 (c_parser_postfix_expression): Likewise for expr.
93 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
94 token.
95 * c-tree.h (c_expr::m_decimal): New bitfield.
96 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
97 (parser_build_binary_op): Call check_for_xor_used_as_pow.
98
bb0a1556
GA
992022-09-01 Joseph Myers <joseph@codesourcery.com>
100
101 * c-decl.cc (grokparms): Handle () in a function declaration the
102 same as (void) for C2X.
103
542c60c4
GA
1042022-08-31 Joseph Myers <joseph@codesourcery.com>
105
106 * c-parser.cc (c_parser_label): Pass attributes to do_case.
107 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
108 c_add_case_label.
109
16f542d6
GA
1102022-08-26 Jakub Jelinek <jakub@redhat.com>
111
112 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
113
5d4389dc
GA
1142022-08-25 Marek Polacek <polacek@redhat.com>
115
116 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
117 Give a better diagnostic when converting to nullptr_t.
118 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
119 initialization.
120 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
121 (c_parser_postfix_expression): Handle RID_NULLPTR.
122 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
123 nullptr_node.
124 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
125 (build_conditional_expr): Handle the case when the second/third operand
126 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
127 (convert_for_assignment): Handle converting an expression of type
128 nullptr_t to pointer/bool.
129 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
130 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
131
1322022-08-25 Joseph Myers <joseph@codesourcery.com>
133
134 * c-decl.cc (start_decl): Do not diagnose initialization of
135 variable-sized objects here.
136 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
137 callers changed.
138 (c_parser_initializer): Diagnose initialization of variable-sized
139 objects other than with braced initializer.
140 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
141 braces and update diagnostic text. Diagnose initialization of
142 variable-sized objects with nonempty braces.
143 * c-typeck.cc (digest_init): Update diagnostic for initialization
144 of variable-sized objects.
145 (really_start_incremental_init, set_designator)
146 (process_init_element): Update comments.
147 (pop_init_level): Allow scalar empty initializers.
148
0342f034
GA
1492022-08-17 Tobias Burnus <tobias@codesourcery.com>
150 Chung-Lin Tang <cltang@codesourcery.com>
151
152 PR c++/104493
153 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
154 instead of removed langhook.
155 * c-typeck.cc (c_finish_omp_clauses): Likewise.
156
5cd525f0
GA
1572022-08-11 Marek Polacek <polacek@redhat.com>
158
159 PR middle-end/102633
160 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
161 Call suppress_warning.
162 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
163 (c_parser_omp_declare_reduction): Pass omp_priv down to
164 c_parser_initializer.
165
5f17badb
GA
1662022-08-08 Tom Honermann <tom@honermann.net>
167
168 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
169 of CPP_UTF8STRING when char8_t support is enabled.
170 * c-typeck.cc (digest_init): Allow initialization of an array
171 of character type by a string literal with type array of
172 char8_t.
173
32510382
GA
1742022-08-01 David Malcolm <dmalcolm@redhat.com>
175
176 * c-typeck.cc (build_c_cast): Quote names of address spaces in
177 diagnostics.
178 (convert_for_assignment): Add a note to address space mismatch
179 diagnostics, specifying the expected and actual types.
180
b53ebbc5
GA
1812022-07-10 Lewis Hyatt <lhyatt@gmail.com>
182
183 PR preprocessor/97498
184 * c-parser.cc (c_parser_pragma): Set input_location to the
185 location of the pragma, rather than the start of the line.
186
8467574d
GA
1872022-07-04 Tobias Burnus <tobias@codesourcery.com>
188 Chung-Lin Tang <cltang@codesourcery.com>
189 Thomas Schwinge <thomas@codesourcery.com>
190
191 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
192 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
193 OMP_REQUIRES_TARGET_USED.
194 (c_parser_omp_requires): Remove sorry.
195
ed974488
GA
1962022-07-01 Tobias Burnus <tobias@codesourcery.com>
197
198 * c-parser.cc (c_parser_omp_target_enter_data,
199 c_parser_omp_target_exit_data): Accept tofrom
200 map-type modifier but use 'to' / 'from' internally.
201
bc7e9f76
GA
2022022-06-16 David Malcolm <dmalcolm@redhat.com>
203
204 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
205 group the warning with any note.
206 (warn_about_goto): Likewise to group error or warning with note.
207 Bail out if the warning wasn't emitted, to avoid emitting orphan
208 notes.
209 (lookup_label_for_goto): Add auto_diagnostic_group to
210 group the error with the note.
211 (check_earlier_gotos): Likewise.
212 (c_check_switch_jump_warnings): Likewise for any error/warning.
213 Conditionalize emission of the notes.
214 (diagnose_uninitialized_cst_member): Likewise for warning,
215 conditionalizing emission of the note.
216 (grokdeclarator): Add auto_diagnostic_group to group the "array
217 type has incomplete element type" error with any note.
218 (parser_xref_tag): Add auto_diagnostic_group to group warnings
219 with their notes. Conditionalize emission of notes.
220 (start_struct): Add auto_diagnostic_group to group the
221 "redefinition of" errors with any note.
222 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
223 (check_for_loop_decls): Likewise for pre-C99 error.
224
445ba599
GA
2252022-06-07 Jakub Jelinek <jakub@redhat.com>
226
227 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
228 style linear clause modifiers. Set
229 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
230 old style modifiers are used.
231 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
232 with val modifier on simd or for if the old style modifiers are
233 used.
234
b168441c
GA
2352022-06-02 David Malcolm <dmalcolm@redhat.com>
236
237 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
238 (c_get_sarif_source_language): New.
239 * c-tree.h (c_get_sarif_source_language): New decl.
240
820ead45
GA
2412022-05-31 Jason Merrill <jason@redhat.com>
242
243 * Make-lang.in (c.tags): Look at *.cc.
244
2452022-05-31 Jakub Jelinek <jakub@redhat.com>
246
247 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
248 clauses.
249
37b3b5da
GA
2502022-05-28 Jakub Jelinek <jakub@redhat.com>
251
252 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
253 seen first, use "%<to%>" or "%<enter%>" depending on
254 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
255 "%<to%> or %<enter%>" wording.
256
d9176e64
GA
2572022-05-27 Jakub Jelinek <jakub@redhat.com>
258
259 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
260 (c_parser_omp_all_clauses): For to clause on declare target, use
261 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
262 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
263 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
264 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
265 OMP_CLAUSE_TO_DECLARE.
266 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
267 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
268 name in diagnostics instead of
269 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
270
3dff965c
GA
2712022-05-25 Jakub Jelinek <jakub@redhat.com>
272
273 PR c/91134
274 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
275 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
276 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
277 diagnostic and fixit hint if DATUM has pointer type.
278 * c-parser.cc (c_parser_postfix_expression,
279 c_parser_omp_variable_list): Adjust build_component_ref callers.
280 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
281 Likewise.
282
768f49a2
GA
2832022-05-24 Jakub Jelinek <jakub@redhat.com>
284
285 PR c/105378
286 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
287
1cda629f
GA
2882022-05-18 Marek Polacek <polacek@redhat.com>
289
290 PR c/105131
291 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
292 mismatches.
293 * c-tree.h (comptypes_check_enum_int): Declare.
294 * c-typeck.cc (comptypes): No longer static.
295
3d9439b1
GA
2962022-05-17 Marek Polacek <polacek@redhat.com>
297
298 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
299 its value.
300
3012022-05-17 Jakub Jelinek <jakub@redhat.com>
302
303 * c-parser.cc (c_parser_omp_clause_depend): Parse
304 inoutset depend-kind.
305 (c_parser_omp_depobj): Likewise.
306
702bd11f
GA
3072022-05-16 Martin Liska <mliska@suse.cz>
308
309 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
310
49ace834
GA
3112022-05-12 Jakub Jelinek <jakub@redhat.com>
312
313 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
314 if flag_openmp.
315 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
316 in postfix expressions.
317 (c_parser_omp_variable_list): Handle omp_all_memory in depend
318 clause.
319 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
320 keyword in depend clause as null_pointer_node, diagnose invalid
321 uses.
322
bd022ff9
GA
3232022-05-09 Martin Liska <mliska@suse.cz>
324
325 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
326 macros.
327 (c_parser_binary_expression): Likewise.
328
a1947c92
GA
3292022-05-07 Marek Polacek <polacek@redhat.com>
330
331 PR c++/101833
332 PR c++/47634
333 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
334
405eda0d
GA
3352022-04-08 Jakub Jelinek <jakub@redhat.com>
336
337 PR c/105149
338 * c-typeck.cc (c_build_va_arg): Reject function types.
339
a2287813
GA
3402022-03-22 Marek Polacek <polacek@redhat.com>
341
342 PR c/82283
343 PR c/84685
344 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
345 (start_init): Set it.
346 (finish_init): Restore constructor_designated.
347 (push_init_level): Set constructor_designated to the value of
348 constructor_designated in the upper constructor_stack.
349
57eeedda
GA
3502022-03-12 Thomas Schwinge <thomas@codesourcery.com>
351
352 PR other/65095
353 * c-typeck.cc (handle_omp_array_sections_1)
354 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
355 instead of 'c_omp_map_clause_name'.
356
8cc4f9cd
GA
3572022-03-09 Joseph Myers <joseph@codesourcery.com>
358
359 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
360 differently from earlier standards for unprototyped function type
361 compatibility.
362
3632022-03-09 Jakub Jelinek <jakub@redhat.com>
364
365 PR c/104711
366 * c-fold.cc (c_fully_fold_internal): Don't emit
367 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
368 * c-typeck.cc (build_binary_op): Likewise.
369
e6533e2e
GA
3702022-03-07 Jakub Jelinek <jakub@redhat.com>
371
372 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
373 literal.
374
4bf3bac1
GA
3752022-02-23 Richard Biener <rguenther@suse.de>
376
377 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
378 SSA names without definition.
379 (c_parser_gimple_declaration): Handle pointer typed SSA names.
380
0bdb0498
GA
3812022-02-17 Jakub Jelinek <jakub@redhat.com>
382
383 PR c/104532
384 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
385 convert_lvalue_to_rvalue and build_indirect_ref instead of
386 build_simple_mem_ref.
387
e8d68f0a
GA
3882022-02-11 Richard Biener <rguenther@suse.de>
389
390 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
391 VEC_COND_EXPRs.
392
a645583d
GA
3932022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
394
395 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
396 clause.
397 (c_parser_omp_variable_list): Handle array sections.
398 (c_parser_omp_clause_has_device_addr): Added.
399 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
400 case.
401 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
402 OMP_CLAUSE_MASK.
403 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
404 (c_finish_omp_clauses): Handle array sections.
405
3adf509f
GA
4062022-02-09 Jakub Jelinek <jakub@redhat.com>
407
408 PR c/104427
409 * c-parser.cc (c_parser_postfix_expression)
410 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
411 instead of build1_loc to build PAREN_EXPR.
412 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
413 * c-fold.cc (c_fully_fold_internal): Likewise.
414
fc829782
GA
4152022-01-17 Martin Liska <mliska@suse.cz>
416
417 * Make-lang.in: Rename .c names to .cc.
418 * c-convert.cc: Likewise.
419 * c-decl.cc (struct lang_identifier): Likewise.
420 (pop_scope): Likewise.
421 (finish_decl): Likewise.
422 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
423 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
424 * c-parser.h (GCC_C_PARSER_H): Likewise.
425 * c-tree.h (c_keyword_starts_typename): Likewise.
426 (finish_declspecs): Likewise.
427 (c_get_alias_set): Likewise.
428 (enum c_oracle_request): Likewise.
429 (tag_exists_p): Likewise.
430 (set_c_expr_source_range): Likewise.
431 * c-typeck.cc (c_common_type): Likewise.
432 (c_finish_omp_clauses): Likewise.
433 * config-lang.in: Likewise.
434
4352022-01-17 Martin Liska <mliska@suse.cz>
436
437 * c-aux-info.c: Moved to...
438 * c-aux-info.cc: ...here.
439 * c-convert.c: Moved to...
440 * c-convert.cc: ...here.
441 * c-decl.c: Moved to...
442 * c-decl.cc: ...here.
443 * c-errors.c: Moved to...
444 * c-errors.cc: ...here.
445 * c-fold.c: Moved to...
446 * c-fold.cc: ...here.
447 * c-lang.c: Moved to...
448 * c-lang.cc: ...here.
449 * c-objc-common.c: Moved to...
450 * c-objc-common.cc: ...here.
451 * c-parser.c: Moved to...
452 * c-parser.cc: ...here.
453 * c-typeck.c: Moved to...
454 * c-typeck.cc: ...here.
455 * gccspec.c: Moved to...
456 * gccspec.cc: ...here.
457 * gimple-parser.c: Moved to...
458 * gimple-parser.cc: ...here.
459
4602022-01-17 Andrew Stubbs <ams@codesourcery.com>
461
462 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
463
617db51d
GA
4642022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
465
466 PR c++/103705
467 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
468 outer node for ARRAY_REFs.
469
62eb5308
GA
4702022-01-01 Jakub Jelinek <jakub@redhat.com>
471
472 PR objc/103639
473 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
474 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
475
2554e2da
GA
4762021-12-17 Marek Polacek <polacek@redhat.com>
477
478 PR c/103649
479 * c-decl.c (c_warn_unused_attributes): Don't warn for
480 attribute_ignored_p.
481 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
482 arguments when the attribute is ignored.
483
9c6586bc
GA
4842021-12-14 Jakub Jelinek <jakub@redhat.com>
485
486 PR c/103587
487 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
488 consume the pragma and silently skip to the pragma eol.
489
c8dcf64b
GA
4902021-12-12 Jonathan Wakely <jwakely@redhat.com>
491
492 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
493 * c-parser.c: Likewise.
494
4b4839e3
GA
4952021-12-09 Jakub Jelinek <jakub@redhat.com>
496
497 PR pch/71934
498 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
499 to resort_data.new_value.
500
641ff219
GA
5012021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
502
503 * c-parser.c (struct omp_dim): New struct type for use inside
504 c_parser_omp_variable_list.
505 (c_parser_omp_variable_list): Allow multiple levels of array and
506 component accesses in array section base-pointer expression.
507 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
508 c_parser_omp_var_list_parens.
509 (c_parser_omp_clause_from): Likewise.
510 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
511 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
512 POINTER_PLUS_EXPR.
513 (c_finish_omp_clauses): Extend allowed ranged of expressions
514 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
515
5162021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
517
518 PR middle-end/92120
519 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
520 call to c_parser_omp_variable_list to 'true'.
521 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
522 array base handling.
523 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
524
c177e806
GA
5252021-11-30 Thomas Schwinge <thomas@codesourcery.com>
526
527 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
528 orphan loop" checking.
529
5302021-11-30 Cesar Philippidis <cesar@codesourcery.com>
531 Thomas Schwinge <thomas@codesourcery.com>
532
533 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
534 OpenACC gang reductions.
535
5362021-11-30 Richard Biener <rguenther@suse.de>
537
538 * gimple-parser.c (c_parser_gimple_postfix_expression):
539 avoid unreachable code after break.
540
87cd82c8
GA
5412021-11-29 Eric Gallager <egallager@gcc.gnu.org>
542
543 PR other/103021
544 * Make-lang.in: Use ETAGS variable in TAGS target.
545
5462021-11-29 Richard Biener <rguenther@suse.de>
547
548 * c-typeck.c (c_tree_equal): Remove unreachable return.
549 * c-parser.c (get_matching_symbol): Likewise.
550
e1d43592
GA
5512021-11-23 Jakub Jelinek <jakub@redhat.com>
552
553 * c-typeck.c (c_clone_omp_udr): Don't initialize
554 id.transform_lang_insert_block.
555
9c077398
GA
5562021-11-19 Martin Sebor <msebor@redhat.com>
557
558 PR c++/33925
559 PR c/102867
560 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
561 code resulting from macro expansion.
562
5632021-11-19 Martin Liska <mliska@suse.cz>
564
565 Revert:
566 2021-11-19 Martin Liska <mliska@suse.cz>
567
568 * c-parser.c (add_debug_begin_stmt): Use option directly.
569
483092d3
GA
5702021-11-18 Matthias Kretz <m.kretz@gsi.de>
571
572 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
573 * c-parser.c (c_parser_postfix_expression): Likewise.
574
5752021-11-18 Martin Liska <mliska@suse.cz>
576
577 * c-parser.c (add_debug_begin_stmt): Use option directly.
578
280d2838
GA
5792021-11-17 Martin Sebor <msebor@redhat.com>
580
581 PR c/101702
582 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
583 bounds before deciding if they're constant.
584
e2b57363
GA
5852021-11-15 Jakub Jelinek <jakub@redhat.com>
586
587 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
588 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
589
b39265d4
GA
5902021-11-11 Jakub Jelinek <jakub@redhat.com>
591
592 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
593 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
594 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
595 OMP_CLAUSE_NUM_TEAMS_EXPR.
596 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
597 combined target teams even lower-bound expression.
598
5992021-11-11 Richard Biener <rguenther@suse.de>
600
601 * gimple-parser.c: Shuffle bitmap.h include.
602
18ae471f
GA
6032021-11-03 Joseph Myers <joseph@codesourcery.com>
604
605 PR c/103031
606 * c-convert.c (c_convert): New function, based on convert.
607 (convert): Make into wrapper of c_convert.
608 (convert_init): New function.
609 * c-typeck.c (enum impl_conv): Add ic_init_const.
610 (convert_for_assignment): Handle ic_init_const like ic_init. Add
611 new argument to convert_and_check call.
612 (digest_init): Pass ic_init_const to convert_for_assignment for
613 initializers required to be constant.
614
b4df2dd3
GA
6152021-11-02 Richard Sandiford <richard.sandiford@arm.com>
616
617 * c-tree.h (c_simulate_record_decl): Declare.
618 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
619 * c-decl.c (c_simulate_record_decl): New function.
620
c2bd5d8a
GA
6212021-10-22 Eric Gallager <egallager@gcc.gnu.org>
622
623 PR other/102663
624 * Make-lang.in: Add dummy c.install-dvi target.
625
93d183a5
GA
6262021-10-15 Richard Biener <rguenther@suse.de>
627
628 PR c/102763
629 * gimple-parser.c
630 (c_parser_gimple_postfix_expression_after_primary): Check
631 for a pointer do be dereferenced by ->.
632
5d5885c9
GA
6332021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
634
635 * c-parser.c (c_finish_omp_declare_variant): Change call from
636 c_omp_check_context_selector to omp_check_context_selector. Change
637 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
638
c9db17b8
GA
6392021-10-09 Jakub Jelinek <jakub@redhat.com>
640
641 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
642 (c_parser_omp_scan_loop_body): Use it.
643 (c_parser_omp_sections_scope): Likewise.
644
50e20ee6
GA
6452021-10-07 Richard Biener <rguenther@suse.de>
646
647 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
648
bb6194e0
GA
6492021-10-05 Richard Biener <rguenther@suse.de>
650
651 PR c/102605
652 * gimple-parser.c (c_parser_gimple_postfix_expression):
653 Accept more address _Literals.
654
da9c5f78
GA
6552021-10-04 Marek Polacek <polacek@redhat.com>
656
657 PR c++/97573
658 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
659
9d116bcc
GA
6602021-10-01 Martin Sebor <msebor@redhat.com>
661
662 PR c/102103
663 * c-typeck.c (maybe_warn_for_null_address): New function.
664 (build_binary_op): Call it.
665
6662021-10-01 Jakub Jelinek <jakub@redhat.com>
667 Richard Biener <rguenther@suse.de>
668
669 PR sanitizer/102515
670 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
671 for division even for SANITIZE_SI_OVERFLOW.
672
6732021-10-01 Jakub Jelinek <jakub@redhat.com>
674
675 * c-parser.c (c_parser_omp_clause_order): Set
676 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
677
fd133479
GA
6782021-09-28 Andrew Pinski <apinski@marvell.com>
679
680 PR c/32122
681 * c-parser.c (c_parser_statement_after_labels): Pass
682 the c_expr instead of the tree to c_finish_goto_ptr.
683 * c-typeck.c (c_finish_goto_ptr): Change the second
684 argument type to c_expr.
685 * c-tree.h (c_finish_goto_ptr): Likewise.
686 Error out if the expression was not of a pointer type.
687
e4777439
GA
6882021-09-22 Jakub Jelinek <jakub@redhat.com>
689
690 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
691 modifiers.
692
cf74e7b5
GA
6932021-09-18 Jakub Jelinek <jakub@redhat.com>
694
695 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
696 and reproducible modifiers.
697 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
698
6992021-09-18 Jakub Jelinek <jakub@redhat.com>
700
701 * c-parser.c (c_parser_omp_clause_default): Handle private and
702 firstprivate arguments, adjust diagnostics on unknown argument.
703
0a4cb439
GA
7042021-09-17 Jakub Jelinek <jakub@redhat.com>
705
706 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
707 is true.
708
a26206ec
GA
7092021-09-10 Jakub Jelinek <jakub@redhat.com>
710
711 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
712 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
713 don't call build_conditional_expr, instead build a COND_EXPR directly.
714 (c_parser_binary_expression): Avoid calling parser_build_binary_op
715 if omp_atomic_lhs even in more cases for >, < or ==.
716 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
717 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
718 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
719 * c-typeck.c (build_binary_op): For flag_openmp only handle
720 MIN_EXPR/MAX_EXPR.
721
b2748138
GA
7222021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
723
724 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
725 directive.
726
e11c6046
GA
7272021-09-01 Iain Sandoe <iain@sandoe.co.uk>
728
729 * c-decl.c (enum deprecated_states): Add unavailable state.
730 (merge_decls): Copy unavailability.
731 (quals_from_declspecs): Handle unavailable case.
732 (start_decl): Amend the logic handling suppression of nested
733 deprecation states to include unavailability.
734 (smallest_type_quals_location): Amend comment.
735 (grokdeclarator): Handle the unavailable deprecation state.
736 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
737 * c-tree.h (struct c_declspecs): Add unavailable_p.
738 * c-typeck.c (build_component_ref): Handle unavailability.
739 (build_external_ref): Likewise.
740
7412021-09-01 Roger Sayle <roger@nextmovesoftware.com>
742 Joseph Myers <joseph@codesourcery.com>
743
744 PR c/79412
745 * c-decl.c (duplicate_decls): On significant mismatches, mark the
746 types of both (non-function) decls as error_mark_node, so that the
747 middle-end can see the code is malformed.
748 (free_attr_access_data): Don't process if the type has been set to
749 error_mark_node.
750
6d51ee43
GA
7512021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
752
753 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
754 and 'ancestor' in 'target device' clauses.
755
38b19c5b
GA
7562021-08-23 Jakub Jelinek <jakub@redhat.com>
757
758 * c-parser.c (c_parser_omp_clause_num_tasks,
759 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
760
5b2876f9
GA
7612021-08-22 Martin Uecker <muecker@gwdg.de>
762
763 PR c/98397
764 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
765 for pointers to arrays with qualifiers.
766 (build_conditional_expr): For C23 don't lose qualifiers for pointers
767 to arrays when the other pointer is a void pointer. Update warnings.
768 (convert_for_assignment): Update warnings for C2X when converting from
769 void* with qualifiers to a pointer to array with the same qualifiers.
770
7c9e1645
GA
7712021-08-20 Jakub Jelinek <jakub@redhat.com>
772
773 * c-parser.c (c_parser_omp_error): New function.
774 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
775
7762021-08-20 Jakub Jelinek <jakub@redhat.com>
777
778 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
779 comma at the end of list.
780 (c_parser_omp_requires): Likewise.
781
b57fba5e
GA
7822021-08-19 Jakub Jelinek <jakub@redhat.com>
783
784 * c-parser.c (c_parser_omp_requires): Don't call
785 c_parser_peek_2nd_token and optionally consume token if current
786 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
787
6e529985
GA
7882021-08-18 Jakub Jelinek <jakub@redhat.com>
789
790 * c-parser.c (c_parser_omp_nothing): New function.
791 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
792
7932021-08-18 Jakub Jelinek <jakub@redhat.com>
794
795 * c-parser.c (c_parser_statement_after_labels): Add restart label
796 near the start of the function. If c_parser_pragma returns false,
797 goto restart.
798 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
799 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
800 return what c_parser_omp_declare returned. Return true instead of
801 false after emitting errors that the directive is not allowed in
802 pragma_stmt context.
803 (c_parser_omp_ordered): Return true instead of
804 false after emitting errors that the directive is not allowed in
805 pragma_stmt context.
806 (c_parser_omp_target_update): Likewise.
807 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
808 Change return type from tree to bool, return false if the
809 directive should be ignored in pragma_stmt contexts.
810 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
811 return their result directly.
812 (c_parser_omp_cancellation_point): Change return type from void to
813 bool, return false if the directive should be ignored in pragma_stmt
814 contexts.
815 (c_parser_omp_declare): Likewise.
816
2d14d64b
GA
8172021-08-17 Jakub Jelinek <jakub@redhat.com>
818
819 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
820 (c_parser_omp_scope): New function.
821 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
822
72be20e2
GA
8232021-08-12 Jakub Jelinek <jakub@redhat.com>
824
825 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
826 (c_parser_omp_clause_filter): New function.
827 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
828 (OMP_MASKED_CLAUSE_MASK): Define.
829 (c_parser_omp_masked): New function.
830 (c_parser_omp_parallel): Handle parallel masked.
831 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
832 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
833
8342021-08-12 Martin Uecker <muecker@gwdg.de>
835
836 PR c/101838
837 PR c/29970
838 * c-typeck.c (c_expr_sizeof_type): Evaluate
839 size expressions for structs of variable size.
840
8412021-08-12 Tobias Burnus <tobias@codesourcery.com>
842
843 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
844 'primary' as alias for 'master'.
845
3ae564ea
GA
8462021-08-10 Martin Uecker <muecker@gwdg.de>
847
848 PR c/29970
849 * c-typeck.c (c_expr_sizeof_expr): Evaluate
850 size expressions for structs of variable size.
851
f92f4778
GA
8522021-08-06 Tamar Christina <tamar.christina@arm.com>
853
854 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
855 * c-tree.h (c_simulate_enum_decl): Likewise.
856
8572021-08-06 Martin Sebor <msebor@redhat.com>
858
859 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
860 vec arguments to by-reference.
861 (c_finish_omp_declare_simd): Same.
862 (c_parser_compound_statement_nostart): Same.
863 (c_parser_for_statement): Same.
864 (c_parser_objc_methodprotolist): Same.
865 (c_parser_oacc_routine): Same.
866 (c_parser_omp_for_loop): Same.
867 (c_parser_omp_declare_simd): Same.
868
419c6c68
GA
8692021-07-21 Thomas Schwinge <thomas@codesourcery.com>
870 Joseph Myers <joseph@codesourcery.com>
871 Cesar Philippidis <cesar@codesourcery.com>
872
873 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
874 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
875 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
876 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
877
92d45509
GA
8782021-07-20 Martin Sebor <msebor@redhat.com>
879
880 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
881 by-const-reference.
882 * c-typeck.c (c_build_function_call_vec): Same.
883
d97d71a1
GA
8842021-07-15 Martin Sebor <msebor@redhat.com>
885
886 PR c/101289
887 PR c/97548
888 * c-decl.c (get_parm_array_spec): Strip nops.
889
6fba0eea
GA
8902021-07-06 Martin Sebor <msebor@redhat.com>
891
892 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
893
7a60a6e8
GA
8942021-07-02 Jakub Jelinek <jakub@redhat.com>
895
896 PR c/101297
897 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
898 appears before a CPP_NAME.
899
90708f87
GA
9002021-06-25 Martin Sebor <msebor@redhat.com>
901
902 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
903 warning_suppressed_p, suppress_warning, and copy_no_warning.
904 (diagnose_mismatched_decls): Same.
905 (duplicate_decls): Same.
906 (grokdeclarator): Same.
907 (finish_function): Same.
908 (c_write_global_declarations_1): Same.
909 * c-fold.c (c_fully_fold_internal): Same.
910 * c-parser.c (c_parser_expr_no_commas): Same.
911 (c_parser_postfix_expression): Same.
912 * c-typeck.c (array_to_pointer_conversion): Same.
913 (function_to_pointer_conversion): Same.
914 (default_function_array_conversion): Same.
915 (convert_lvalue_to_rvalue): Same.
916 (default_conversion): Same.
917 (build_indirect_ref): Same.
918 (build_function_call_vec): Same.
919 (build_atomic_assign): Same.
920 (build_unary_op): Same.
921 (c_finish_return): Same.
922 (emit_side_effect_warnings): Same.
923 (c_finish_stmt_expr): Same.
924 (c_omp_clause_copy_ctor): Same.
925
9aa8327e
GA
9262021-06-24 Jakub Jelinek <jakub@redhat.com>
927
928 PR c/101176
929 * c-parser.c (c_parser_has_attribute_expression): Set source range for
930 the result.
931
9322021-06-24 Jakub Jelinek <jakub@redhat.com>
933
934 PR c/101171
935 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
936 error_mark_node.
937
9382021-06-24 Jakub Jelinek <jakub@redhat.com>
939
940 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
941 C_ORT_OMP for clauses on target construct.
942 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
943 (c_parser_omp_target): For non-combined target add
944 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
945 C_ORT_OMP_TARGET to c_finish_omp_clauses.
946 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
947 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
948 never present on C_ORT_*DECLARE_SIMD.
949 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
950 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
951 corresponding map clauses.
952
2f080224
GA
9532021-06-21 Jakub Jelinek <jakub@redhat.com>
954
955 PR inline-asm/100785
956 * c-typeck.c (c_mark_addressable): Diagnose trying to make
957 bit-fields addressable.
958
ede6c356
GA
9592021-06-15 Robin Dapp <rdapp@linux.ibm.com>
960
961 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
962 similar.
963
8dc48181
GA
9642021-06-14 Tobias Burnus <tobias@codesourcery.com>
965
966 PR c/100913
967 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
968 var in the error case.
969
438aac59
GA
9702021-06-07 Eric Botcazou <ebotcazou@adacore.com>
971
972 PR c/100920
973 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
974 spot built-in functions.
975
7d6987e9
GA
9762021-06-06 Jakub Jelinek <jakub@redhat.com>
977
978 PR c/100902
979 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
980 even when target is combined with other constructs.
981
9822021-06-06 Eric Botcazou <ebotcazou@adacore.com>
983
984 PR c/100920
985 * c-decl.c (finish_struct): Fix thinko in previous change.
986 * c-typeck.c (convert_for_assignment): Do not warn on pointer
987 assignment and initialization for storage order purposes if the
988 RHS is a call to a DECL_IS_MALLOC function.
989
600f90cb
GA
9902021-06-04 Martin Sebor <msebor@redhat.com>
991
992 PR c/100783
993 * c-objc-common.c (print_type): Handle erroneous types.
994
440c8a0a
GA
9952021-06-03 Jakub Jelinek <jakub@redhat.com>
996
997 PR c++/100859
998 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
999 after depend only cases.
1000
ee682192
GA
10012021-05-31 Richard Biener <rguenther@suse.de>
1002
1003 PR c++/88601
1004 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
1005 * c-parser.c (c_parser_postfix_expression): Likewise.
1006
48166757
GA
10072021-05-28 Richard Biener <rguenther@suse.de>
1008
1009 PR c/100803
1010 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
1011 invalid if conditions.
1012
10132021-05-28 Jakub Jelinek <jakub@redhat.com>
1014
1015 PR middle-end/99928
1016 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
1017 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1018 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
1019 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
1020 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
1021 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
1022 if present in map_head, map_field_head or map_firstprivate_head
1023 bitmaps.
1024
10252021-05-28 Tobias Burnus <tobias@codesourcery.com>
1026
1027 * c-parser.c (c_parser_omp_clause_affinity): New.
1028 (c_parser_omp_clause_name, c_parser_omp_variable_list,
1029 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
1030 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
1031 c_finish_omp_clauses): Likewise.
1032
01c59ef2
GA
10332021-05-26 Eric Botcazou <ebotcazou@adacore.com>
1034
1035 PR c/100653
1036 * c-decl.c (finish_struct): Warn for a union containing an aggregate
1037 field with a differing scalar storage order.
1038
2832d51b
GA
10392021-05-21 Jakub Jelinek <jakub@redhat.com>
1040
1041 PR middle-end/99928
1042 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
1043 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
1044 if a decl is mentioned both in map clause and in such firstprivate
1045 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
1046
65f32e5d
GA
10472021-05-19 Jakub Jelinek <jakub@redhat.com>
1048
1049 PR middle-end/99928
1050 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
1051 master when combined with taskloop.
1052 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
1053 parallel master when not combined with taskloop.
1054
a8daf9a1
GA
10552021-05-18 Richard Biener <rguenther@suse.de>
1056
1057 PR c/100522
1058 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
1059 Diagnose calls to non-functions.
1060 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
1061
a7ffc1ef
GA
10622021-05-17 Richard Biener <rguenther@suse.de>
1063
1064 PR c/100625
1065 * gimple-parser.c (c_parser_gimple_label): Avoid building
1066 a GIMPLE label with NULL label decl.
1067
f9af11c7
GA
10682021-05-13 Martin Sebor <msebor@redhat.com>
1069
1070 PR c/100550
1071 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
1072
0ff3a0f2
GA
10732021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
1074
1075 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
1076 'close'.
1077
aa891c56
GA
10782021-05-10 Martin Liska <mliska@suse.cz>
1079
1080 * c-aux-info.c (affix_data_type): Use startswith
1081 function instead of strncmp.
1082 * c-typeck.c (build_function_call_vec): Likewise.
1083 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
1084
62d87a32
GA
10852021-05-07 Eric Botcazou <ebotcazou@adacore.com>
1086
1087 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
1088 on the address of a pointer field in a record with reverse SSO.
1089
99e8df7a
GA
10902021-05-04 Tobias Burnus <tobias@codesourcery.com>
1091
1092 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
1093 for || and && reductions.
1094
3c8e539d
GA
10952021-04-29 Joseph Myers <joseph@codesourcery.com>
1096
1097 * c-typeck.c (function_types_compatible_p): For C2X, treat
1098 unprototyped function as compatible with non-variadic prototyped
1099 function even if some argument types are changed by the default
1100 argument promotions.
1101
ee351f7f
GA
11022021-04-15 Martin Sebor <msebor@redhat.com>
1103
1104 PR c/99420
1105 PR c/99972
1106 * c-decl.c (pushdecl): Always propagate type attribute.
1107
11082021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1109
1110 PR c/98852
1111 * c-typeck.c (c_common_type): Do not drop attributes that
1112 affect type identity.
1113
1d54b138
GA
11142021-04-10 Jakub Jelinek <jakub@redhat.com>
1115
1116 PR c/99990
1117 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
1118 error_mark_node.
1119
4493b1c1
GA
11202021-03-25 Jakub Jelinek <jakub@redhat.com>
1121
1122 PR c++/99565
1123 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
1124 to operand_equal_p.
1125
5f256a70
GA
11262021-03-19 Jakub Jelinek <jakub@redhat.com>
1127
1128 PR c/99588
1129 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
1130 with modifycode NOP_EXPR produces and mark the _Atomic var as read
1131 if found.
1132 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
1133 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
1134 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
1135
3c5b6d24
GA
11362021-03-15 Tobias Burnus <tobias@codesourcery.com>
1137
1138 PR c++/99509
1139 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
1140 ensure that the varpool node is marked as offloadable.
1141
ceae9533
GA
11422021-03-05 Tobias Burnus <tobias@codesourcery.com>
1143
1144 PR c/99137
1145 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
1146
4028d01a
GA
11472021-02-24 Martin Sebor <msebor@redhat.com>
1148
1149 PR middle-end/97172
1150 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
1151
bf81237e
GA
11522021-02-18 Jakub Jelinek <jakub@redhat.com>
1153
1154 PR c/99136
1155 * c-typeck.c (c_finish_return): Don't wrap retval into
1156 EXCESS_PRECISION_EXPR in functions that return void.
1157
0c5cdb31
GA
11582021-02-11 Marek Polacek <polacek@redhat.com>
1159
1160 * c-parser.c (c_parser_if_statement): Use vec_free.
1161
a19dd5e6
GA
11622021-02-04 Martin Sebor <msebor@redhat.com>
1163
1164 PR c/97882
1165 * c-decl.c (locate_old_decl): Add type to diagnostic output.
1166 (diagnose_mismatched_decls): Same.
1167 (start_function): Introduce temporaries for better readability.
1168 * c-typeck.c (comptypes_internal): Only consider complete enum
1169 types in comparisons with integers.
1170
f7884fb1
GA
11712021-02-01 Martin Sebor <msebor@redhat.com>
1172
1173 PR middle-end/97172
1174 * c-decl.c (free_attr_access_data): New function.
1175 (c_parse_final_cleanups): Call free_attr_access_data.
1176
59cf67d1
GA
11772021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1178
1179 * c-parser.c (c_parser_omp_clause_detach): New.
1180 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
1181 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
1182 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
1183 clause. Prevent use of detach with mergeable and overriding the
1184 data sharing mode of the event handle.
1185
2f7f0d32
GA
11862021-01-15 Jakub Jelinek <jakub@redhat.com>
1187
1188 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
1189 unqualified element type and then call c_build_qualified_type on the
1190 ARRAY_TYPE.
1191
7d187e4f
GA
11922021-01-07 Richard Biener <rguenther@suse.de>
1193
1194 * gimple-parser.c (c_parser_gimple_compound_statement): Only
1195 reallocate loop array if it is too small.
1196
eefe499f
GA
11972020-12-16 Martin Uecker <muecker@gwdg.de>
1198
1199 PR c/98047
1200 * c-typeck.c (build_modify_expr): Drop qualifiers.
1201
12022020-12-16 Martin Uecker <muecker@gwdg.de>
1203
1204 PR c/98260
1205 * c-parser.c (c_parser_expression): Look into
1206 nop expression when marking expressions as read.
1207
d52945ce
GA
12082020-12-14 Martin Liska <mliska@suse.cz>
1209
1210 PR sanitizer/98204
1211 * c-typeck.c (pointer_diff): Do not emit a top-level
1212 sanitization.
1213 (build_binary_op): Likewise.
1214
ca2bd949
GA
12152020-12-09 Tobias Burnus <tobias@codesourcery.com>
1216
1217 * c-parser.c (c_parser_omp_allocate): New.
1218 (c_parser_omp_construct): Call it.
1219
12202020-12-09 Richard Biener <rguenther@suse.de>
1221
1222 PR c/98200
1223 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
1224 early on error.
1225
bc8a7013
GA
12262020-12-07 Martin Uecker <muecker@gwdg.de>
1227
1228 PR c/97981
1229 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
1230 that drops qualifiers to the end of the function.
1231
d48df6f2
GA
12322020-11-26 Martin Uecker <muecker@gwdg.de>
1233
1234 PR c/65455
1235 PR c/92935
1236 * c-parser.c (c_parser_declaration_or_fndef): Remove
1237 redundant code to drop qualifiers of _Atomic types for __auto_type.
1238 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
1239 types for __typeof__.
1240
1e2c9a27
GA
12412020-11-24 Jakub Jelinek <jakub@redhat.com>
1242
1243 PR c/97958
1244 * c-parser.c (c_parser_binary_expression): For omp atomic binary
1245 expressions, use make_node instead of build2 to avoid checking build2
1246 performs.
1247
8e6198d0
GA
12482020-11-23 Joseph Myers <joseph@codesourcery.com>
1249
1250 PR c/95630
1251 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
1252 for comparisons of complete and incomplete pointers.
1253
7a97e2fc
GA
12542020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1255
1256 * c-aux-info.c (gen_type): Support opaque types.
1257
82e5048e
GA
12582020-11-20 Martin Sebor <msebor@redhat.com>
1259
1260 PR middle-end/97879
1261 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
1262
12632020-11-20 Jakub Jelinek <jakub@redhat.com>
1264
1265 PR other/97911
1266 * Make-lang.in (c.serial): Change from goal to a variable.
1267 (.PHONY): Drop c.serial.
1268
12692020-11-20 Martin Uecker <muecker@gwdg.de>
1270
1271 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
1272
d62586ee
GA
12732020-11-19 Jakub Jelinek <jakub@redhat.com>
1274
1275 PR c/97860
1276 * c-decl.c (get_parm_array_spec): Bail out of nelts is
1277 error_operand_p.
1278
25bb75f8
GA
12792020-11-18 Jakub Jelinek <jakub@redhat.com>
1280
1281 * Make-lang.in (c.serial): New goal.
1282 (.PHONY): Add c.serial c.prev.
1283 (cc1$(exeext)): Call LINK_PROGRESS.
1284
77f67db2
GA
12852020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1286
1287 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1288 goto too.
1289 * c-typeck.c (build_asm_expr): Remove an assert checking output
1290 absence for asm goto.
1291
12922020-11-13 Jakub Jelinek <jakub@redhat.com>
1293
1294 * c-typeck.c (c_finish_omp_clauses): Don't clear
1295 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1296
12972020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1298
1299 PR objc/77404
1300 * c-parser.c (c_parser_objc_class_definition): Pass the
1301 location of the class name to the interface declaration.
1302
bb622641
GA
13032020-11-10 Strager Neds <strager.nds@gmail.com>
1304
1305 * c-decl.c (merge_decls): Use new overload of
1306 set_decl_section_name.
1307
13082020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1309
1310 * c-parser.c (c_parser_omp_target_data): Add use of
1311 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1312 handled map clause kind.
1313 (c_parser_omp_target_enter_data): Likewise.
1314 (c_parser_omp_target_exit_data): Likewise.
1315 (c_parser_omp_target): Likewise.
1316 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1317 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1318 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1319 same struct field access to co-exist on OpenMP construct.
1320
2da7ee05
GA
13212020-11-07 Martin Uecker <muecker@gwdg.de>
1322
1323 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1324 (c_parser_all_labels): Likewise.
1325
44cab2d8
GA
13262020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1327
1328 * c-parser.c (c_parser_objc_at_property_declaration):
1329 Improve parsing fidelity. Associate better location info
1330 with @property attributes. Clean up the interface to
1331 objc_add_property_declaration ().
1332
13332020-11-06 Nathan Sidwell <nathan@acm.org>
1334
1335 * c-decl.c (diagnose_mismatched_decls): Rename
1336 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1337 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1338 (collect_source_refs): Likewise.
1339 * c-typeck.c (inform_declaration, inform_for_arg)
1340 (convert_for_assignment): Likewise.
1341
13422020-11-06 Tobias Burnus <tobias@codesourcery.com>
1343
1344 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1345 OpenACC matching.
1346 (c_parser_omp_construct): Update call.
1347
35c125cb
GA
13482020-11-04 Jakub Jelinek <jakub@redhat.com>
1349
1350 PR c++/97670
1351 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1352 find underlying decl to clear in the aligned_head bitmap.
1353
13542020-11-04 Joseph Myers <joseph@codesourcery.com>
1355
1356 * c-decl.c (handle_nodiscard_attribute): New.
1357 (std_attribute_table): Add nodiscard.
1358 * c-parser.c (c_parser_std_attribute): Expect argument to
1359 nodiscard attribute to be a string. Do not special-case ignoring
1360 nodiscard.
1361 * c-typeck.c (maybe_warn_nodiscard): New.
1362 (build_compound_expr, emit_side_effect_warnings): Call
1363 maybe_warn_nodiscard.
1364 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1365 emit_side_effect_warnings if warn_unused_result.
1366
4f0606fe
GA
13672020-10-29 Asher Gordon <AsDaGo@posteo.net>
1368
1369 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1370 with XDELETE.
1371 (finish_init): Likewise.
1372 (pop_init_level): Likewise.
1373
e93aae4a
GA
13742020-10-28 Joseph Myers <joseph@codesourcery.com>
1375
1376 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1377 error_at for omitted parameter name.
1378
13792020-10-28 Jakub Jelinek <jakub@redhat.com>
1380
1381 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1382 (c_parser_omp_clause_allocate): New function.
1383 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1384 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1385 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1386 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1387 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1388 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1389 PRAGMA_OMP_CLAUSE_ALLOCATE.
1390 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1391
89bb01e7
GA
13922020-10-27 Joseph Myers <joseph@codesourcery.com>
1393
1394 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1395 standard attributes.
1396
efe71fcc
GA
13972020-10-23 Marek Polacek <polacek@redhat.com>
1398
1399 PR c++/91741
1400 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1401 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1402 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1403 * c-tree.h (char_type_p): Declare.
1404 * c-typeck.c (char_type_p): No longer static.
1405
14062020-10-23 Martin Sebor <msebor@redhat.com>
1407
1408 PR middle-end/97552
1409 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1410
2fe5b7d1
GA
14112020-09-19 Martin Sebor <msebor@redhat.com>
1412
1413 PR c/50584
1414 * c-decl.c (lookup_last_decl): Define new function.
1415 (c_decl_attributes): Call it.
1416 (start_decl): Add argument and use it.
1417 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1418 (get_parm_array_spec): Define new function.
1419 (push_parm_decl): Call get_parm_array_spec.
1420 (start_function): Call warn_parm_array_mismatch. Build attribute
1421 access and add it to current function.
1422 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1423 in forms of array parameters.
1424 * c-tree.h (start_decl): Add argument.
1425
14262020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1427
1428 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1429 with...
1430 (in_statement): New.
1431 (start_function): Adjust for above change.
1432 (c_push_function_context, c_pop_function_context): Likewise.
1433 * c-lang.h (struct language_function): Likewise.
1434 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1435 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1436 New.
1437 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1438 (c_parser_switch_statement): Adjust break/switch context handling
1439 and calls to renamed functions.
1440 (c_parser_while_statement): Adjust break/switch context handling and
1441 build a WHILE_STMT.
1442 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1443 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1444 (c_parser_omp_for_loop): Adjust break/switch context handling.
1445 * c-tree.h (c_break_label, c_cont_label): Delete.
1446 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1447 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1448 (in_statement, switch_statement_break_seen_p): Declare.
1449 (c_start_case, c_finish_case): Renamed to...
1450 (c_start_switch, c_finish_switch).
1451 (c_finish_bc_stmt): Adjust arguments.
1452 * c-typeck.c (build_function_call_vec): Don't try to print
1453 statements with %qE format.
1454 (struct c_switch): Rename switch_expr field to switch_stmt.
1455 Add break_stmt_seen_p field.
1456 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1457 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1458 (do_case): Update for changes to struct c_switch.
1459 (c_finish_case): Rename to c_finish_switch. Update for changes to
1460 struct c_switch and change of representation from SWITCH_EXPR to
1461 SWITCH_STMT.
1462 (c_finish_loop): Delete.
1463 (c_finish_bc_stmt): Update to reflect changes to break/continue
1464 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1465 of a GOTO_EXPR except for objc foreach loops.
1466
e1a4a8a0
GA
14672020-09-01 Jakub Jelinek <jakub@redhat.com>
1468
1469 PR c++/96867
1470 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1471 only on PARM_DECLs.
1472
8f7ea26a
GA
14732020-08-28 Martin Sebor <msebor@redhat.com>
1474
1475 PR c/96596
1476 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1477 argument type.
1478
8b394f01
GA
14792020-08-27 Martin Liska <mliska@suse.cz>
1480
1481 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1482 growth function to true.
1483
db0f6efe
GA
14842020-08-25 Tobias Burnus <tobias@codesourcery.com>
1485
1486 PR c/96678
1487 * c-typeck.c (handle_omp_array_sections_1): Talk about
1488 array function parameter in the error message.
1489
5c265693
GA
14902020-08-18 Jakub Jelinek <jakub@redhat.com>
1491
1492 PR c/96571
1493 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1494 to int, holding index of the match. Call mark_exp_read on the selector
1495 expression and on expressions other than the selected one.
1496
4967ca2f
GA
14972020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1498
1499 PR c/96377
1500 * c-typeck.c (process_init_element): Split test for whether to
1501 recurse into a record, union or array into...
1502 (initialize_elementwise_p): ...this new function. Don't recurse
1503 into a vector type if the initialization value is also a vector.
1504
48cc2e46
GA
15052020-07-31 Richard Biener <rguenther@suse.de>
1506
1507 PR debug/96383
1508 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1509 Define to c_common_finalize_early_debug.
1510
3ea9abca
GA
15112020-07-22 Tobias Burnus <tobias@codesourcery.com>
1512
1513 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1514 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1515 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1516
30430061
GA
15172020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1518
1519 PR target/95237
1520 * c-decl.c (finish_decl): Call target hook
1521 lower_local_decl_alignment to lower local decl alignment.
1522
3f8ca9cb
GA
15232020-07-09 Julian Brown <julian@codesourcery.com>
1524 Thomas Schwinge <thomas@codesourcery.com>
1525
1526 PR middle-end/95270
1527 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1528 for standalone attach/detach clauses.
1529
a82c4c4c 15302020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1531
1532 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1533 set, warn for conversion between pointers that point to incompatible
1534 scalar storage orders.
1535
f60ee68d
GA
15362020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1537
1538 * c-parser.c (c_parser_statement_after_labels): Pass correct
1539 parameters to c_parser_do_statement.
1540
56638b9b
GA
15412020-06-16 Jakub Jelinek <jakub@redhat.com>
1542
1543 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1544 c_in_omp_for.
1545 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1546 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1547 c_finish_omp_for.
1548 * c-tree.h (c_in_omp_for): Declare.
1549 * c-typeck.c (c_in_omp_for): Define.
1550 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1551 (digest_init): Likewise.
1552 (build_binary_op): Likewise.
1553
15542020-06-16 Jakub Jelinek <jakub@redhat.com>
1555
1556 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1557 from kind by comma rather than colon.
1558
1a59f3db
GA
15592020-06-05 Mark Wielaard <mark@klomp.org>
1560
1561 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1562 an undeclared builtin, then add a fixit header hint, if found.
1563 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1564 warning_at about implicit builtin declaration type mismatch.
1565
9a5b7438
GA
15662020-06-03 Mark Wielaard <mark@klomp.org>
1567
1568 * c-parser.c (struct c_parser): Add seen_string_literal
1569 bitfield.
1570 (c_parser_consume_token): Reset seen_string_literal.
1571 (c_parser_error_richloc): Add name_hint if seen_string_literal
1572 and next token is a CPP_NAME and we have a missing header
1573 suggestion for the name.
1574 (c_parser_string_literal): Set seen_string_literal.
1575
15762020-06-03 Mark Wielaard <mark@klomp.org>
1577
1578 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1579 scope with matching_parens after CPP_OPEN_PAREN.
1580
15812020-06-03 Tobias Burnus <tobias@codesourcery.com>
1582
1583 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1584
53ffb43a
GA
15852020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1586
1587 * Make-lang.in: Remove extra slash.
1588
8f66f175
ML
15892020-05-19 Martin Liska <mliska@suse.cz>
1590
1591 * c-parser.c: Fix typo.
1592
49ddde69
JJ
15932020-05-14 Jakub Jelinek <jakub@redhat.com>
1594
1595 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1596
eb72dc66
RB
15972020-05-07 Richard Biener <rguenther@suse.de>
1598
1599 PR middle-end/94703
1600 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1601 DECL_GIMPLE_REG_P.
1602
bf915591
JJ
16032020-04-30 Jakub Jelinek <jakub@redhat.com>
1604
1605 PR c/94842
1606 * c-decl.c (set_labels_context_r): In addition to context-less
1607 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1608 parent function if any.
1609 (store_parm_decls): Adjust comment.
1610
e1113ffb
JJ
16112020-04-19 Jakub Jelinek <jakub@redhat.com>
1612
1613 PR objc/94637
1614 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1615 two CPP_COLON tokens.
1616
2e389749
JJ
16172020-04-17 Jakub Jelinek <jakub@redhat.com>
1618
1619 PR other/94629
1620 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1621 to data.clauses.
1622
2dc9294c
JJ
16232020-04-15 Jakub Jelinek <jakub@redhat.com>
1624
1625 PR c/94593
1626 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1627 requires directive when not at file scope.
1628
13e41d8b
TB
16292020-04-08 Tobias Burnus <tobias@codesourcery.com>
1630
1631 PR middle-end/94120
1632 * c-decl.c (c_check_in_current_scope): New function.
1633 * c-tree.h (c_check_in_current_scope): Declare it.
1634 * c-parser.c (c_parser_oacc_declare): Add check that variables
1635 are declared in the same scope as the directive. Fix handling
1636 of namespace vars.
1637
4df50a05
JJ
16382020-04-07 Jakub Jelinek <jakub@redhat.com>
1639
1640 PR c++/94512
1641 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1642 if c_parser_omp_master succeeded.
1643
5db9e893
JJ
16442020-03-23 Jakub Jelinek <jakub@redhat.com>
1645
1646 PR gcov-profile/94029
1647 PR c/94239
1648 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1649 the function_start_locus location. Don't do that afterwards for the
1650 __GIMPLE body parsing.
1651
9def91e9
JJ
16522020-03-19 Jakub Jelinek <jakub@redhat.com>
1653
1654 PR gcov-profile/94029
1655 * c-tree.h (finish_function): Add location_t argument defaulted to
1656 input_location.
1657 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1658 set it to the locus of closing } if non-NULL.
1659 (c_parser_compound_statement_nostart): Return locus of closing }.
1660 (c_parser_parse_rtl_body): Likewise.
1661 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1662 finish_function.
1663 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1664 input_location to set function_end_locus.
1665
046c5890
JJ
16662020-03-17 Jakub Jelinek <jakub@redhat.com>
1667
1668 PR c/94172
1669 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1670 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1671 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1672 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1673 ENUMERAL_TYPEs.
1674 (finish_incomplete_vars): New function, moved from finish_struct. Use
1675 relayout_decl instead of layout_decl.
1676 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1677 being TYPE_VFIELD. Use finish_incomplete_vars.
1678 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1679 finish_incomplete_vars.
1680 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1681 also on ENUMERAL_TYPEs.
1682
c015ff8c
JJ
16832020-03-16 Jakub Jelinek <jakub@redhat.com>
1684
1685 PR c/94179
1686 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1687
f2e9fe5f
MS
16882020-03-13 Martin Sebor <msebor@redhat.com>
1689
1690 PR c/94040
1691 * c-decl.c (builtin_structptr_type_count): New constant.
1692 (match_builtin_function_types): Reject decls that are incompatible
1693 in types pointed to by pointers.
1694 (diagnose_mismatched_decls): Adjust comments.
1695
c9d70946
JM
16962020-03-05 Joseph Myers <joseph@codesourcery.com>
1697
1698 PR c/93577
1699 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1700 empty when initialized type is error_mark_node.
1701 (set_designator, process_init_element): Ignore initializers for
1702 elements of a variable-size type or of error_mark_node.
1703
726e292d
MS
17042020-03-01 Martin Sebor <msebor@redhat.com>
1705
1706 PR middle-end/93926
1707 * c-decl.c (types_close_enough_to_match): New function.
1708 (match_builtin_function_types):
1709 (diagnose_mismatched_decls): Add missing inform call to a warning.
1710
a499c2f8
MS
17112020-03-01 Martin Sebor <msebor@redhat.com>
1712
1713 PR c/93812
1714 * c-typeck.c (build_functype_attribute_variant): New function.
1715 (composite_type): Call it.
1716
9c3da8cc
JJ
17172020-02-25 Jakub Jelinek <jakub@redhat.com>
1718
1719 PR other/93912
1720 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1721 Rename last argument from probablity to probability.
1722
bacdd5e9
JJ
17232020-02-13 Jakub Jelinek <jakub@redhat.com>
1724
1725 PR c/93576
1726 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1727 *expr if it has side effects.
1728
f9eb0973
JL
17292020-01-30 Jeff Law <law@redhat.com>
1730
1731 PR c/88660
1732 * c-parser.c (c_parser_switch_statement): Make sure to request
1733 marking the switch expr as used.
1734
ac68e287
JM
17352020-01-22 Joseph Myers <joseph@codesourcery.com>
1736
1737 PR c/93348
1738 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1739 argument with integer operands.
1740
852f0ae8
KK
17412020-01-16 Kerem Kat <keremkat@gmail.com>
1742
1743 PR c/92833
1744 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1745 to support 4 available tokens.
1746
e2346a33
JM
17472020-01-15 Joseph Myers <joseph@codesourcery.com>
1748
1749 PR c/93072
1750 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1751 determine whether to set DECL_CONTEXT.
1752
3d77686d
JM
17532020-01-13 Joseph Myers <joseph@codesourcery.com>
1754
1755 PR c/93241
1756 * c-typeck.c (build_c_cast): Check for expressions with integer
1757 operands that can occur in an unevaluated part of an integer
1758 constant expression and call note_integer_operands as needed.
1759
f74c4b2c
RB
17602019-01-08 Richard Biener <rguenther@suse.de>
1761
1762 PR middle-end/93199
1763 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1764 permanently.
1765
8d9254fc
JJ
17662020-01-01 Jakub Jelinek <jakub@redhat.com>
1767
1768 Update copyright years.
1769
39292e25
EB
17702019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1771
1772 * c-decl.c (collect_source_ref_cb): Delete.
1773 (for_each_global_decl): Rename into...
1774 (collect_source_refs): ...this. Call collect_source_ref directly.
1775 (c_parse_final_cleanups): Always call collect_source_ref on the main
1776 input filename.
1777
519d7496
JB
17782019-12-19 Julian Brown <julian@codesourcery.com>
1779 Cesar Philippidis <cesar@codesourcery.com>
1780
1781 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1782 detach clauses.
1783 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1784 Allow deref (->) in variable lists if true.
1785 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1786 Pass to c_parser_omp_variable_list.
1787 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1788 call to c_parser_omp_variable_list.
1789 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1790 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1791 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1792 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1793 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1794 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1795 and detach. Support deref.
1796 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1797 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1798 (c_oacc_check_attachments): New function.
1799 (c_finish_omp_clauses): Check attach/detach arguments for being
1800 pointers using above. Support deref.
1801
a6163563
JB
18022019-12-19 Julian Brown <julian@codesourcery.com>
1803 Maciej W. Rozycki <macro@codesourcery.com>
1804 Tobias Burnus <tobias@codesourcery.com>
1805 Thomas Schwinge <thomas@codesourcery.com>
1806
1807 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1808 (c_parser_oacc_data_clause): Likewise.
1809 (c_parser_oacc_all_clauses): Likewise.
1810 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1811 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1812 PRAGMA_OACC_CLAUSE_NO_CREATE.
1813 * c-typeck.c (handle_omp_array_sections): Support
1814 GOMP_MAP_NO_ALLOC.
1815
d68f5d45
DM
18162019-12-09 David Malcolm <dmalcolm@redhat.com>
1817
1818 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1819 Replace label_text ctor calls.
1820
4691bf46
JM
18212019-12-04 Joseph Myers <joseph@codesourcery.com>
1822
1823 PR c/36941
1824 PR c/88827
1825 * c-typeck.c (convert_lvalue_to_rvalue): Call
1826 require_complete_type for arguments not of void types.
1827 (build_indirect_ref): Do not diagnose dereferencing pointers to
1828 incomplete types.
1829 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1830
85d11957
JM
18312019-12-03 Joseph Myers <joseph@codesourcery.com>
1832
1833 PR c/88704
1834 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1835 old-style parameter definitions.
1836
4569f8b3
SL
18372019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1838
1839 PR target/92499
1840
1841 * c-decl.c (flexible_array_type_p): Move to common code.
1842
65ef05d0
RS
18432019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1844
1845 * c-decl.c (start_decl): Allow initialization of variables whose
1846 size is a POLY_INT_CST.
1847 (finish_decl): Use verify_type_context to check whether the target
1848 allows variables with a particular type to have static or thread-local
1849 storage duration. Don't raise a second error if such variables do
1850 not have a constant size.
1851 (grokdeclarator): Use verify_type_context to check whether the
1852 target allows fields or array elements to have a particular type.
1853 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1854 the target allows pointer difference for the types involved.
1855 (build_unary_op): Likewise for pointer increment and decrement.
1856
34b43828
JM
18572019-11-29 Joseph Myers <joseph@codesourcery.com>
1858
1859 * c-parser.c (struct c_parser): Add members raw_tokens and
1860 raw_tokens_used.
1861 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1862 using previously-lexed raw tokens.
1863 (c_parser_peek_nth_token_raw)
1864 (c_parser_check_balanced_raw_token_sequence): New functions.
1865 (c_parser_nth_token_starts_std_attributes): Use
1866 c_parser_check_balanced_raw_token_sequence for Objective-C.
1867
5b8d9367
JM
18682019-11-25 Joseph Myers <joseph@codesourcery.com>
1869
1870 PR c/91985
1871 * c-decl.c (finish_declspecs): Use int instead of decimal
1872 floating-point types if decimal floating-point not supported.
1873
1723e1be
JM
18742019-11-25 Joseph Myers <joseph@codesourcery.com>
1875
1876 * c-tree.h (struct c_declarator): Use a structure for id member.
1877 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1878 declarators at the start, not when handling individual declarators
1879 later. Use u.id.id instead of u.id.
1880 (grokfield): Use u.id.id instead of u.id.
1881 (build_id_declarator): Set u.id.id and u.id.attrs.
1882 (finish_declspecs): Handle postfix attributes in case of typedef
1883 name or typeof used.
1884 * c-parser.c (c_parser_direct_declarator)
1885 (c_parser_direct_declarator_inner): Place declarator for
1886 attributes inside that for function or array, not outside. Set
1887 u.id.attrs for identifiers.
1888 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1889 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1890 instead of u.id.
1891
bdaf8be1
JJ
18922019-11-22 Jakub Jelinek <jakub@redhat.com>
1893
1894 PR c/90677
1895 * c-decl.c (identifier_global_tag): Define.
1896
3e00ba47
RB
18972019-11-20 Richard Biener <rguenther@suse.de>
1898
1899 PR c/92088
1900 * c-decl.c (grokdeclarator): Prevent inlining of nested
1901 function with VLA arguments.
1902
8c5b727a
JM
19032019-11-20 Joseph Myers <joseph@codesourcery.com>
1904
1905 * c-decl.c (c_warn_type_attributes): New function.
1906 (groktypename, grokdeclarator, finish_declspecs): Call
1907 c_warn_type_attributes before applying attributes to types.
1908 * c-tree.h (c_warn_type_attributes): Declare.
1909
192961ff
JM
19102019-11-19 Joseph Myers <joseph@codesourcery.com>
1911
1912 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1913 standard attributes.
1914 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1915 pedwarn for unknown standard attributes and return error_mark_node
1916 for them.
1917
20a38017
MM
19182019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1919
1920 * c-parser.c (c_parser_parse_rtl_body): Always call
1921 run_rtl_passes, even if startwith pass is not provided.
1922
d5fbe5e0
JM
19232019-11-15 Joseph Myers <joseph@codesourcery.com>
1924
1925 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1926 duplicate standard attributes.
1927
97cc1187
JM
19282019-11-15 Joseph Myers <joseph@codesourcery.com>
1929
1930 * c-decl.c (std_attribute_table): Add maybe_unused.
1931
f8aea5e3
JM
19322019-11-15 Joseph Myers <joseph@codesourcery.com>
1933
1934 * c-decl.c (std_attribute_table): Add fallthrough.
1935 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1936 attribute at top level.
1937
2cc94aa8
JM
19382019-11-15 Joseph Myers <joseph@codesourcery.com>
1939
1940 * c-decl.c (std_attribute_table): New.
1941 (c_init_decl_processing): Register attributes from
1942 std_attribute_table.
1943 * c-parser.c (c_parser_attribute_arguments): Add arguments
1944 require_string and allow_empty_args. All callers changed.
1945 (c_parser_std_attribute): Set require_string argument for
1946 "deprecated" attribute.
1947
7c5890cc
JM
19482019-11-14 Joseph Myers <joseph@codesourcery.com>
1949
1950 * c-parser.c (c_parser_postfix_expression)
1951 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1952 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1953
e8738f4e
RS
19542019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1955
1956 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1957 of build_same_sized_truth_vector_type.
1958 (build_vec_cmp): Likewise.
1959
b2417b59
JJ
19602019-11-14 Jakub Jelinek <jakub@redhat.com>
1961
bedb7f04
JJ
1962 * c-parser.c (c_parser_omp_context_selector): Don't require score
1963 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1964 negative score.
1965
b2417b59
JJ
1966 * c-parser.c (c_parser_omp_context_selector): Rename
1967 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1968 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1969 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1970 and string literals.
1971
4e03c3a7
JM
19722019-11-14 Joseph Myers <joseph@codesourcery.com>
1973
1974 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1975 ctsk_tagfirstref_attrs.
1976 (struct c_declspecs): Update description of attrs. Add
1977 postfix_attrs and non_std_attrs_seen_p. Increase size of
1978 typespec_kind bit-field.
1979 (c_warn_unused_attributes): New declaration.
1980 (parser_xref_tag): Update prototype.
1981 * c-decl.c (c_warn_unused_attributes): New function.
1982 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1983 ctsk_tagref_attrs. Handle attribute declarations.
1984 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1985 (grokdeclarator): Handle standard attributes.
1986 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1987 attributes to incomplete type reference.
1988 (xref_tag): Update call to parser_xref_tag.
1989 (declspecs_add_addrspace, declspecs_add_type)
1990 (declspecs_add_scspec, declspecs_add_attrs): Set
1991 non_std_attrs_seen_p.
1992 (finish_declspecs): Apply postfix standard attributes to type.
1993 * c-parser.c (c_token_starts_declspecs)
1994 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1995 (c_parser_next_tokens_start_declaration): Update comments.
1996 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1997 parser->tokens[2] to parser->tokens[1].
1998 (c_parser_nth_token_starts_std_attributes)
1999 (c_parser_std_attribute_specifier_sequence): New functions.
2000 (c_parser_declaration_or_fndef): Add arguments have_attrs and
2001 attrs. All callers changed. Handle standard attributes.
2002 (c_parser_parms_declarator, c_parser_parms_list_declarator)
2003 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
2004 All callers changed.
2005 (c_parser_declspecs): Add arguments start_std_attr_ok and
2006 end_std_attr_ok. All callers changed. Handle standard
2007 attributes.
2008 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2009 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
2010 (c_parser_compound_statement_nostart, c_parser_all_labels)
2011 (c_parser_label, c_parser_statement, c_parser_for_statement):
2012 Handle standard attributes.
2013 * c-parser.h (c_parser_declspecs): Update prototype.
2014 * gimple-parser.c (c_parser_gimple_declaration): Update call to
2015 c_parser_declspecs.
2016
0c29cac4
ML
20172019-11-12 Martin Liska <mliska@suse.cz>
2018
2019 * gimple-parser.c: Do not include params.h.
2020
028d4092
ML
20212019-11-12 Martin Liska <mliska@suse.cz>
2022
2023 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
2024 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
2025 macro.
2026
62aee289
MR
20272019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2028 Frederik Harwath <frederik@codesourcery.com>
2029
2030 gcc/c/
2031 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
2032 (c_parser_oacc_kernels_parallel): Rename function to...
2033 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
2034 (c_parser_omp_construct): Update accordingly.
2035
2036
7cec9588
JJ
20372019-11-11 Jakub Jelinek <jakub@redhat.com>
2038
2039 * c-parser.c (c_parser_translation_unit): Diagnose declare target
2040 without corresponding end declare target.
2041
f486280c
RS
20422019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2043
2044 * c-convert.c (convert): Only handle vector conversions if one of
2045 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
2046 allows it.
2047 * c-typeck.c (build_array_ref): Only allow vector indexing if the
2048 vectors satisfy gnu_vector_type_p.
2049 (build_unary_op): Only allow unary operators to be applied to
2050 vectors if they satisfy gnu_vector_type_p.
2051 (digest_init): Only allow by-element initialization of vectors
2052 if they satisfy gnu_vector_type_p.
2053 (really_start_incremental_init): Likewise.
2054 (push_init_level): Likewise.
2055 (pop_init_level): Likewise.
2056 (process_init_element): Likewise.
2057 (build_binary_op): Only allow binary operators to be applied to
2058 vectors if they satisfy gnu_vector_type_p.
2059
017c6491
JM
20602019-11-08 Joseph Myers <joseph@codesourcery.com>
2061
2062 * c-decl.c (grokparms): Convert () in a function definition to
2063 (void) for C2x.
2064 (store_parm_decls_oldstyle): Pedwarn for C2x.
2065 (store_parm_decls): Update comment about () not generating a
2066 prototype.
2067
c01bd174
JM
20682019-11-07 Joseph Myers <joseph@codesourcery.com>
2069
2070 * c-parser.c (c_parser_attribute_arguments): New function.
2071 Factored out of c_parser_gnu_attribute.
2072 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
2073 (c_parser_balanced_token_sequence, c_parser_std_attribute)
2074 (c_parser_std_attribute_specifier): New functions.
2075 (c_parser_transaction_attributes): Use
2076 c_parser_std_attribute_specifier.
2077
471c5330
JM
20782019-11-07 Joseph Myers <joseph@codesourcery.com>
2079
2080 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
2081 lex_joined_string and translate_strings_p.
2082 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
2083 c_lex_with_flags.
2084 (c_parser_string_literal): New function.
2085 (c_parser_static_assert_declaration_no_semi): Use
2086 c_parser_string_literal. Do not set lex_untranslated_string.
2087 (c_parser_asm_string_literal): Use c_parser_string_literal.
2088 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
2089 (c_parser_gnu_attributes): Set and restore translate_strings_p
2090 instead of lex_untranslated_string.
2091 (c_parser_asm_statement): Do not set lex_untranslated_string.
2092 (c_parser_asm_operands): Likewise.
2093 (c_parser_has_attribute_expression): Set and restore
2094 translate_strings_p instead of lex_untranslated_string.
2095 (c_parser_postfix_expression): Use c_parser_string_literal.
2096 (pragma_lex): Likewise.
2097 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
2098 (c_parse_file): Set translate_strings_p.
2099 * gimple-parser.c (c_parser_gimple_postfix_expression)
2100 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
2101 * c-parser.c (c_parser_string_literal): Declare function.
2102
d0c464d2
JJ
21032019-11-02 Jakub Jelinek <jakub@redhat.com>
2104
2105 * c-parser.c (c_finish_omp_declare_variant): Use
2106 omp_get_context_selector instead of c_omp_get_context_selector.
2107
ac2cfa6c
RS
21082019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2109
2110 * c-tree.h (c_simulate_enum_decl): Declare.
2111 * c-decl.c (c_simulate_enum_decl): New function.
2112 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
2113
74078538
RS
21142019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2115
2116 * c-tree.h (c_simulate_builtin_function_decl): Declare.
2117 * c-decl.c (c_simulate_builtin_function_decl): New function.
2118 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
2119 to the above.
2120
ad1539d5
MS
21212019-10-28 Martin Sebor <msebor@redhat.com>
2122
2123 PR c/66970
2124 * c-decl.c (names_builtin_p): Define a new function.
2125
cb73e4e7
RB
21262019-10-28 Richard Biener <rguenther@suse.de>
2127
2128 PR c/92249
2129 * gimple-parser.c (c_parser_parse_gimple_body): Make
2130 current_bb the entry block initially to easier recover
2131 from errors.
2132 (c_parser_gimple_compound_statement): Adjust.
2133
135df52c
JJ
21342019-10-24 Jakub Jelinek <jakub@redhat.com>
2135
2136 * c-parser.c (c_finish_omp_declare_variant): Use
2137 omp_context_selector_matches instead of
2138 c_omp_context_selector_matches.
2139 * c-decl.c (c_decl_attributes): Add "omp declare target block"
2140 attribute in between declare target and end declare target
2141 pragmas.
2142
783bfe5e
JM
21432019-10-15 Joseph Myers <joseph@codesourcery.com>
2144
2145 * c-parser.c (c_parser_attribute_any_word): Rename to
2146 c_parser_gnu_attribute_any_word. All callers changed.
2147 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
2148 callers changed.
2149 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
2150 callers changed.
2151 (c_parser_declaration_or_fndef, c_parser_declspecs)
2152 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2153 (c_parser_struct_declaration, c_parser_declarator)
2154 (c_parser_gnu_attribute, c_parser_compound_statement)
2155 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
2156 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
2157 attribute-related syntax productions.
2158
56898e43
RS
21592019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2160
2161 * c-objc-common.c (useful_aka_type_p): Replace with...
2162 (get_aka_type): ...this new function. Given the original type,
2163 decide which aka type to print (if any). Only look through typedefs
2164 if user_facing_original_type_p.
2165 (print_type): Update accordingly.
2166
b9424661
JJ
21672019-10-14 Jakub Jelinek <jakub@redhat.com>
2168
2169 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
2170 into int NESTED, if it is 2, diagnose missing commas in between
2171 clauses.
2172 (c_parser_omp_context_selector): Pass 2 as last argument to
2173 c_parser_omp_all_clauses.
2174
20de9568
JJ
21752019-10-12 Jakub Jelinek <jakub@redhat.com>
2176
2177 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
2178 For simd properties, put them directly into TREE_VALUE.
2179 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
2180 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
2181 add "omp declare variant base" attribute rather than
2182 "omp declare variant".
2183
fe2bc27c
JM
21842019-10-11 Joseph Myers <joseph@codesourcery.com>
2185
2186 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
2187
94e7f906
JJ
21882019-10-10 Jakub Jelinek <jakub@redhat.com>
2189
2190 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
2191 true, terminate processing on closing paren and don't skip to end of
2192 pragma line.
2193 (c_parser_omp_declare_simd): Handle also declare variant.
2194 (omp_construct_selectors, omp_device_selectors,
2195 omp_implementation_selectors, omp_user_selectors): New variables.
2196 (c_parser_omp_context_selector,
2197 c_parser_omp_context_selector_specification,
2198 c_finish_omp_declare_variant): New functions.
2199 (c_finish_omp_declare_simd): Handle both declare simd and
2200 declare variant.
2201 (c_parser_omp_declare): Handle declare variant.
2202
93313b94
JM
22032019-10-02 Joseph Myers <joseph@codesourcery.com>
2204
2205 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
2206 CPP_COLON tokens.
2207
55879815
RS
22082019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2209
2210 * c-objc-common.c (useful_aka_type_p): New function.
2211 (print_type): Use it to decide whether an aka type is worth printing.
2212
59bc434a
JJ
22132019-09-27 Jakub Jelinek <jakub@redhat.com>
2214
2215 PR c++/88203
2216 * c-parser.c (c_parser_predefined_identifier): New function.
2217 (c_parser_postfix_expression): Use it.
2218 (c_parser_omp_variable_list): Parse predefined identifiers.
2219 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
2220 in shared and firstprivate clauses, even when they are predetermined
2221 shared.
2222
c6447c20
RS
22232019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2224
2225 * c-typeck.c (build_function_call_vec): Take the original function
2226 decl as an optional final parameter. Pass all built-in calls to
2227 check_builtin_function_arguments.
2228
522da4c2
EB
22292019-09-20 Eric Botcazou <ebotcazou@adacore.com>
2230
2231 PR c/91815
2232 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
2233 of identifiers in the external scope only for variables and functions.
2234
68e2c199
PK
22352019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2236
2237 PR c/78736
2238 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
2239
22f8849d
IS
22402019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2241
2242 PR pch/61250
2243 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
2244 after determining that the first token is not
2245 PRAGMA_GCC_PCH_PREPROCESS.
2246
db376f45
EB
22472019-08-22 Eric Botcazou <ebotcazou@adacore.com>
2248
2249 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
2250 FUNCTION_DECL to the right value in the presence of nested declarators.
2251
4d732405
RS
22522019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2253
2254 PR middle-end/91421
2255 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
2256
cb1180d5
RS
22572019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2258
2259 PR middle-end/91421
2260 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
2261 of a built_in_function.
2262 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
2263
77eb117f
JJ
22642019-08-10 Jakub Jelinek <jakub@redhat.com>
2265
2266 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
2267 (c_parser_omp_clause_device_type): New function.
2268 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2269 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2270 (c_parser_omp_declare_target): Handle device_type clauses. Remove
2271 diagnostics for declare target with clauses nested in clause-less
2272 declare target declaration-definition-seq.
2273 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2274
2c3b8bad
JJ
22752019-08-09 Jakub Jelinek <jakub@redhat.com>
2276
bb522e2e
JJ
2277 * c-parser.c (check_no_duplicate_clause): Simplify using
2278 omp_find_clause.
2279 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
2280 directive name modifiers.
2281 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2282
2c3b8bad
JJ
2283 PR c/91401
2284 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2285 check_no_duplicate_clause call. Comment it out, instead emit a
2286 warning for duplicate dist_schedule clauses.
2287
99769e7f
RS
22882019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2289
2290 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2291
8860d270
JJ
22922019-08-08 Jakub Jelinek <jakub@redhat.com>
2293
2294 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2295 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2296 instead of generic_head to track duplicates.
2297
398e3feb
JJ
22982019-08-07 Jakub Jelinek <jakub@redhat.com>
2299
2300 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2301 (c_parser_omp_clause_use_device_addr): New function.
2302 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2303 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2304 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2305 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2306 map or use_device_* clauses.
2307 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2308 in OpenMP, require pointer type rather than pointer or array type.
2309 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2310
a28351e7
JJ
23112019-07-31 Jakub Jelinek <jakub@redhat.com>
2312
2313 PR c/91192
2314 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2315 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2316 case.
2317
6343b6bf
ML
23182019-07-25 Martin Liska <mliska@suse.cz>
2319 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2320
2321 PR c++/23383
2322 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2323
cb50701e
ML
23242019-07-25 Martin Liska <mliska@suse.cz>
2325
2326 * c-decl.c (merge_decls): Use new macros
2327 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2328
62e3e66f
RB
23292019-07-23 Richard Biener <rguenther@suse.de>
2330
2331 PR tree-optimization/83518
2332 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2333 a CFG also rebuild cgraph edges.
2334
554a530f
JJ
23352019-07-20 Jakub Jelinek <jakub@redhat.com>
2336
2337 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2338 (c_parser_omp_clause_bind): New function.
2339 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2340 (OMP_LOOP_CLAUSE_MASK): Define.
2341 (c_parser_omp_loop): New function.
2342 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2343 loop combined with parallel or teams.
2344 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2345 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2346
d119bf79
RS
23472019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2348
2349 PR c/53633
2350 * c-decl.c (finish_function): Check targetm.warn_func_return
2351 before issuing a -Wreturn-type warning.
2352
ab20d992 23532019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
2354
2355 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2356 (c_parser_compound_statement): Call it.
2357
1fdd6f04
JJ
23582019-07-12 Jakub Jelinek <jakub@redhat.com>
2359
2360 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2361 (c_parser_omp_clause_order): New function.
2362 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2363 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2364 PRAGMA_OMP_CLAUSE_ORDER.
2365 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2366
8389386c
RB
23672019-07-10 Richard Biener <rguenther@suse.de>
2368
2369 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2370 _Literal (int *) &x for address literals.
2371
99b1c316
MS
23722019-07-09 Martin Sebor <msebor@redhat.com>
2373
2374 PR c++/61339
2375 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2376 to class.
2377 (field_decl_cmp): Same.
2378 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2379 * c-tree.h: Same.
2380 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2381
6c1dae73
MS
23822019-07-09 Martin Sebor <msebor@redhat.com>
2383
2384 PR c++/61339
2385 * c-decl.c: Change class-key from class to struct and vice versa
2386 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2387 * gimple-parser.c: Same.
2388
69b5279e
RB
23892019-07-01 Richard Biener <rguenther@suse.de>
2390
2391 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2392 _Literal (char *) &"foo" for address literals pointing to
2393 STRING_CSTs.
2394
ab20d992
JJ
23952019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2396
2397 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2398 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2399 C incompatibility if alternate "__intN__" form is used.
2400
1e3d475e
MS
24012019-06-24 Martin Sebor <msebor@redhat.com>
2402
2403 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2404
bf38f7e9
JJ
24052019-06-10 Jakub Jelinek <jakub@redhat.com>
2406
2407 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2408 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2409 (c_parser_omp_scan_loop_body): New function.
2410 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2411 inscan reduction clauses.
2412 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2413 non-inscan reductions on the same construct, or inscan reductions with
2414 ordered or schedule clauses, or inscan array reductions.
2415
65985d78
MS
24162019-06-05 Martin Sebor <msebor@redhat.com>
2417
2418 PR c/90737
2419 * c-typeck.c (c_finish_return): Only consider functions returning
2420 pointers as candidates for -Wreturn-local-addr.
2421
0ecf545c
MS
24222019-06-05 Martin Sebor <msebor@redhat.com>
2423
2424 * c-decl.c (start_decl): Adjust quoting and hyphenation
2425 in diagnostics.
2426 (finish_decl): Same.
2427 (finish_enum): Same.
2428 (start_function): Same.
2429 (declspecs_add_type): Same.
2430 * c-parser.c (warn_for_abs): Same.
2431 * c-typeck.c (build_binary_op): Same.
2432
e03436e7
TS
24332019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2434
b48f44bf
TS
2435 PR c/89433
2436 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2437 marked with an OpenACC 'routine' directive.
2438
5bf04509
TS
2439 PR c/89433
2440 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2441 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2442
e03436e7
TS
2443 PR c/89433
2444 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2445 clauses from "omp declare target" attribute.
2446
a9c697b8
MS
24472019-05-16 Martin Sebor <msebor@redhat.com>
2448
ab20d992
JJ
2449 * c-decl.c (start_decl): Quote keywords, operators, and
2450 types in diagnostics.
2451 (finish_decl): Same.
2452 * c-parser.c (c_parser_asm_statement): Same.
2453 (c_parser_conditional_expression): Same.
2454 (c_parser_transaction_cancel): Same.
2455 * c-typeck.c (c_common_type): Same.
2456 (build_conditional_expr): Same.
2457 (digest_init): Same.
2458 (process_init_element): Same.
2459 (build_binary_op): Same.
a9c697b8 2460
c4499192
RB
24612019-05-17 Richard Biener <rguenther@suse.de>
2462
2463 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2464 (c_parser_gimple_unary_expression): Likewise.
2465 (c_parser_gimple_parentized_ternary_expression): New function.
2466
adfe6e4b
RB
24672019-05-16 Richard Biener <rguenther@suse.de>
2468
2469 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2470 (c_parser_gimple_unary_expression): Likewise.
2471
186dabf2
RB
24722019-05-15 Richard Biener <rguenther@suse.de>
2473
2474 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2475 __BIT_FIELD_REF.
2476
1158c5b4
RB
24772019-05-14 Richard Biener <rguenther@suse.de>
2478
2479 * gimple-parser.c (c_parser_gimple_statement): Remove
2480 questionable auto-promotion to VIEW_CONVERT_EXPR.
2481 (c_parser_gimple_typespec): Split out from __MEM parsing.
2482 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2483 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2484 as __VIEW_CONVERT with -gimple.
2485
fd4485aa
ML
24862019-05-09 Martin Liska <mliska@suse.cz>
2487
2488 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2489 __MAX.
2490 (c_parser_gimple_unary_expression): Parse also binary expression
2491 __MIN and __MAX.
2492 (c_parser_gimple_parentized_binary_expression): New function.
2493
d276406a
ML
24942019-05-09 Martin Liska <mliska@suse.cz>
2495
2496 * gimple-parser.c (struct gimple_parser): Add probability.
2497 for gimple_parser_edge.
2498 (gimple_parser::push_edge): Add new argument probability.
2499 (c_parser_gimple_parse_bb_spec): Parse also probability
2500 if present.
2501 (c_parser_parse_gimple_body): Set edge probability.
2502 (c_parser_gimple_compound_statement): Consume token
2503 before calling c_parser_gimple_goto_stmt.
2504 Parse BB counts.
2505 (c_parser_gimple_statement): Pass new argument.
2506 (c_parser_gimple_goto_stmt): Likewise.
2507 (c_parser_gimple_if_stmt): Likewise.
2508 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2509 * c-parser.c (c_parser_declaration_or_fndef): Pass
2510 hot_bb_threshold argument.
2511 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2512 field.
2513 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2514
f179b64e
JJ
25152019-04-26 Jakub Jelinek <jakub@redhat.com>
2516
2517 PR debug/90197
2518 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2519 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2520 (c_parser_do_statement): Likewise.
2521 (c_parser_for_statement): Likewise. Formatting fixes.
2522 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2523 emit DEBUG_BEGIN_STMTs if needed.
2524
e7178413
JJ
25252019-04-19 Jakub Jelinek <jakub@redhat.com>
2526
c280b7ee
JJ
2527 PR c/89888
2528 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2529 (c_start_case): Don't clear it.
2530 (do_case): Adjust c_add_case_label caller.
2531 (c_finish_case): Adjust c_do_switch_warnings caller.
2532
e7178413
JJ
2533 PR c++/90108
2534 * c-decl.c (merge_decls): If remove is main variant and
2535 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2536 variant that has newdecl as TYPE_NAME if any.
2537
60a2c645
JJ
25382019-04-12 Jakub Jelinek <jakub@redhat.com>
2539
2540 PR c/89933
2541 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2542 don't try to remove it from the variant list, but instead assert
2543 it has no variants.
2544
2a82beaa
RB
25452019-04-01 Richard Biener <rguenther@suse.de>
2546
2547 PR c/71598
2548 * c-tree.h (c_get_alias_set): Declare.
2549 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2550 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2551 as the underlying integer type.
2552
bec1da64
MS
25532019-03-19 Martin Sebor <msebor@redhat.com>
2554
2555 PR tree-optimization/89688
2556 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2557 kinds of initializers.
2558
855cd9b1
JJ
25592019-03-19 Jakub Jelinek <jakub@redhat.com>
2560
2561 PR c/89734
2562 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2563 return type even if quals_used is 0. Formatting fixes.
2564
baa09dc5
RB
25652019-03-14 Richard Biener <rguenther@suse.de>
2566
2567 * c-tree.h (enum c_declspec_il): New.
2568 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2569 enum bitfield.
2570 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2571 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2572 (c_parser_declspecs): Adjust.
2573 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2574 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2575 and bitmap.h.
2576 (struct gimple_parser): New.
2577 (gimple_parser::push_edge): New method.
2578 (c_parser_gimple_parse_bb_spec): New helper.
2579 (c_parser_parse_gimple_body): Get start pass and IL specification.
2580 Initialize SSA and CFG.
2581 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2582 Build a gimple_parser parsing state and pass it along.
2583 (c_parser_gimple_statement): Change intermittend __PHI internal
2584 function argument for the edge.
2585 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2586 (c_parser_gimple_goto_stmt): Record edges to build.
2587 (c_parser_gimple_if_stmt): Likewise.
2588 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2589 (c_parser_gimple_or_rtl_pass_list): Likewise.
2590
a3f9f006
ML
25912019-03-11 Martin Liska <mliska@suse.cz>
2592
2593 * c-decl.c (check_for_loop_decls): Wrap an option name
2594 in a string format message and fix GNU coding style.
2595 * c-parser.c (c_parser_declspecs): Likewise.
2596
1db01ff9
JJ
25972019-03-08 Jakub Jelinek <jakub@redhat.com>
2598
2599 PR tree-optimization/89550
2600 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2601 returned true.
2602 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2603 or warning returned true.
2604
66dcb747
JJ
26052019-02-28 Jakub Jelinek <jakub@redhat.com>
2606
2607 PR c/89525
2608 * c-typeck.c (convert_arguments): Call inform_declaration only if
2609 the previous warning_at call returned true.
2610
2263c9f2
TS
26112019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2612
2613 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2614 parameter. Adjust all users.
2615 (c_parser_oacc_simple_clause): Replace parser with loc formal
2616 parameter. Adjust all users.
2617
ab20d992 26182019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
2619
2620 PR c/87924
2621 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2622 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2623
5f88ba10
JJ
26242019-02-15 Jakub Jelinek <jakub@redhat.com>
2625
2626 PR c/89340
2627 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2628 before c_decl_attributes rather than after it.
2629
cfc30fd1
JJ
26302019-02-06 Jakub Jelinek <jakub@redhat.com>
2631
2632 PR c/89211
2633 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2634 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2635 instead of 3 nested ifs.
2636
fbe83e6b
JM
26372019-02-06 Joseph Myers <joseph@codesourcery.com>
2638
2639 PR c/88584
2640 * c-decl.c (finish_decl): Do not complete array types for arrays
2641 with external linkage not at file scope.
2642
f461f938
RB
26432019-02-05 Richard Biener <rguenther@suse.de>
2644
2645 PR c/88606
2646 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2647 all type variants when not supported.
2648
fe509359
JJ
26492019-01-30 Jakub Jelinek <jakub@redhat.com>
2650
2651 PR c/89061
2652 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2653 * c-decl.c (decl_jump_unsafe): Return false for
2654 C_DECL_COMPOUND_LITERAL_P decls.
2655 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2656
6a335b96
JJ
26572019-01-29 Jakub Jelinek <jakub@redhat.com>
2658
f4b7e754
JJ
2659 PR c/89045
2660 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2661 scope.
2662
6a335b96
JJ
2663 PR c/86125
2664 * c-decl.c (last_fileptr_type): Remove.
2665 (last_structptr_types): New variable.
2666 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2667 {old,new}rettype instead of the types themselves. Assert
2668 last_structptr_types array has the same number of elements
2669 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2670 argument oldtype and newtype. Instead of handling
2671 just fileptr_type_node specially, handle all builtin_structptr_types
2672 pointer nodes. Formatting fix.
2673
d8b5a1a0
MS
26742019-01-24 Martin Sebor <msebor@redhat.com>
2675
2676 PR c/86125
2677 PR c/88886
2678 PR middle-end/86308
2679 * c-decl.c (match_builtin_function_types): Add arguments.
2680 (diagnose_mismatched_decls): Diagnose mismatched declarations
2681 of built-ins more strictly.
2682
e21c4491
JJ
26832019-01-24 Jakub Jelinek <jakub@redhat.com>
2684
2685 PR c++/88976
2686 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2687 on #pragma omp cancel with different modifiers.
2688
420183d9
L
26892019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2690
2691 PR c/51628
2692 PR c/88664
2693 * c-typeck.c (convert_for_assignment): Upate the
2694 warn_for_address_or_pointer_of_packed_member call.
2695
17ad43dd
TH
26962019-01-16 Tom Honermann <tom@honermann.net>
2697 Jason Merrill <jason@redhat.com>
2698
2699 * c-typeck.c (digest_init): Revised the error message produced for
2700 ill-formed cases of array initialization with a string literal.
2701 (error_init): Make variadic.
2702
5f07d78a
JJ
27032019-01-12 Jakub Jelinek <jakub@redhat.com>
2704
2705 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2706
c4581bbf
JJ
27072019-01-07 Jakub Jelinek <jakub@redhat.com>
2708
2709 PR c/88701
2710 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2711 if current_function_decl is non-NULL.
2712
65c5b1eb
JM
27132019-01-07 Joseph Myers <joseph@codesourcery.com>
2714
2715 PR c/88720
2716 PR c/88726
2717 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2718 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2719 functions declared but never defined only for external scope, not
2720 for other scopes.
2721
d8fcab68
JJ
27222019-01-07 Jakub Jelinek <jakub@redhat.com>
2723
2724 PR c++/85052
2725 * c-parser.c (c_parser_postfix_expression): Parse
2726 __builtin_convertvector.
2727
a5544970
JJ
27282019-01-01 Jakub Jelinek <jakub@redhat.com>
2729
2730 Update copyright years.
2731
da77eace
L
27322018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2733
2734 PR c/51628
2735 * c-typeck.c (convert_for_assignment): Call
2736 warn_for_address_or_pointer_of_packed_member.
2737
1edf8866
SB
27382018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2739
2740 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2741 a more specific error message (instead of just falling through).
2742
db4fd626
SB
27432018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2744
2745 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2746 asm qualifier is first seen; use that to give nicer "duplicate asm
2747 qualifier" messages. Delete 'quals" variable, instead pass the
2748 "is_volatile_ flag to build_asm_stmt directly.
2749 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2750 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2751
9c9cfcbb
SB
27522018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2753
2754 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2755 "done" boolean variable.
2756
a14feb3c
DM
27572018-12-19 David Malcolm <dmalcolm@redhat.com>
2758
2759 PR c++/87504
2760 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2761 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2762 (build_binary_op): Use struct op_location_t and
2763 class binary_op_rich_location.
2764
6d939173
JJ
27652018-12-11 Jakub Jelinek <jakub@redhat.com>
2766
2767 PR sanitizer/88426
2768 * c-convert.c (convert): Call c_fully_fold before calling
2769 ubsan_instrument_float_cast.
2770
b7055028
SB
27712018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2772
2773 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2774 setting "quals".
2775
5b76e75f
SB
27762018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2777
2778 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2779 after asm. Pass a flag for it to build_asm_expr.
2780 * c-tree.h (build_asm_expr): Update declaration.
2781 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2782 set ASM_INLINE_P.
2783
30bd42b9
SB
27842018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2785
2786 PR inline-asm/55681
2787 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2788 combination of volatile and goto, in any order, without repetitions.
2789
9df6c0e4
JB
27902018-12-04 James Norris <jnorris@codesourcery.com>
2791 Cesar Philippidis <cesar@codesourcery.com>
2792 Julian Brown <julian@codesourcery.com>
2793
2794 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2795 code.
2796
f44697b7
RB
27972018-11-30 Richard Biener <rguenther@suse.de>
2798
2799 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2800 _Literal (type) { ... } as empty aggregate or vector constructor.
2801
550dfbdc
MS
28022018-11-29 Martin Sebor <msebor@redhat.com>
2803
2804 PR c/88091
2805 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2806 (convert_arguments): Add comments. Pass additional argument to
2807 the function above.
2808
673670da
MS
28092018-11-29 Martin Sebor <msebor@redhat.com>
2810
2811 PR c/88172
2812 PR testsuite/88208
2813 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2814
db1d09b0
MS
28152018-11-23 Martin Sebor <msebor@redhat.com>
2816
2817 PR testsuite/88098
2818 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2819 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2820
98f08eb8
MS
28212018-11-20 Martin Sebor <msebor@redhat.com>
2822
2823 * c-parser.c (c_parser_has_attribute_expression): New function.
2824 (c_parser_attribute): New function.
2825 (c_parser_attributes): Move code into c_parser_attribute.
2826 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2827
cd5da983
MS
28282018-11-15 Martin Sebor <msebor@redhat.com>
2829
2830 PR c/83656
2831 * c-decl.c (header_for_builtin_fn): Declare.
2832 (diagnose_mismatched_decls): Diagnose declarations of built-in
2833 functions without a prototype.
2834 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2835 (convert_argument): Same.
2836 (convert_arguments): Factor code out into convert_argument.
2837 Detect mismatches between built-in formal arguments in calls
2838 to built-in without prototype.
2839 (build_conditional_expr): Same.
2840 (type_or_builtin_type): New function.
2841 (convert_for_assignment): Add argument. Conditionally issue
2842 warnings instead of errors for mismatches.
2843
620e594b
DM
28442018-11-13 David Malcolm <dmalcolm@redhat.com>
2845
2846 * c-decl.c: Replace "source_location" with "location_t".
2847 * c-tree.h: Likewise.
2848 * c-typeck.c: Likewise.
2849 * gimple-parser.c: Likewise.
2850
3179ebae
JJ
28512018-11-09 Jakub Jelinek <jakub@redhat.com>
2852
81a227c6
JJ
2853 * c-parser.c (c_parser_omp_clause_final): Use
2854 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2855 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2856 parsing instead of c_parser_paren_condition.
2857 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2858 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2859 c_fully_fold instead of c_parser_condition.
2860 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2861 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2862 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2863 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2864 c_parser_expr_no_commas instead of c_parser_expression.
2865
98c91c56
JJ
2866 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2867 reduction clause with inscan modifier.
2868
3179ebae
JJ
2869 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2870 clauses other than atomic_default_mem_order.
2871
28567c40
JJ
28722018-11-08 Jakub Jelinek <jakub@redhat.com>
2873
2874 * c-parser.c: Include memmode.h.
2875 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2876 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2877 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2878 task_reduction clauses.
2879 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2880 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2881 section, or lvalue assignment expression.
2882 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2883 (c_parser_omp_clause_lastprivate): Parse optional
2884 conditional: modifier.
2885 (c_parser_omp_clause_hint): Require constant integer expression rather
2886 than just integer expression.
2887 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2888 clause.
2889 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2890 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2891 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2892 functions.
2893 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2894 iterators. Parse mutexinoutset and depobj kinds.
2895 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2896 callers.
2897 (c_parser_omp_all_clauses): Likewise. Handle
2898 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2899 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2900 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2901 default memory order from requires directive if any. Adjust
2902 c_finish_omp_atomic caller.
2903 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2904 (c_parser_omp_flush): Parse flush with memory-order-clause.
2905 (c_parser_omp_for_loop): Allow NE_EXPR even in
2906 OpenMP loops, adjust c_finish_omp_for caller.
2907 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2908 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2909 Allow to be called while parsing combined parallel master.
2910 Parse combined master taskloop{, simd}.
2911 (c_parser_omp_parallel): Parse combined
2912 parallel master{, taskloop{, simd}} constructs.
2913 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2914 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2915 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2916 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2917 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2918 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2919 around teams body. Use SET_EXPR_LOCATION.
2920 (c_parser_omp_target_data): Allow target data
2921 with only use_device_ptr clauses.
2922 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2923 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2924 (c_parser_omp_requires): New function.
2925 (c_finish_taskloop_clauses): New function.
2926 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2927 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2928 declaration. Disallow in_reduction clause when combined with parallel
2929 master.
2930 (c_parser_omp_construct): Adjust c_parser_omp_master and
2931 c_parser_omp_taskgroup callers.
2932 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2933 other than cancel.
2934 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2935 like OMP_CLAUSE_REDUCTION.
2936 (handle_omp_array_sections): Likewise. Call save_expr on array
2937 reductions before calling build_index_type. Handle depend clauses
2938 with iterators.
2939 (struct c_find_omp_var_s): New type.
2940 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2941 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2942 with static, runtime or auto schedule kinds. Call save_expr for whole
2943 array reduction sizes. Diagnose reductions with zero sized elements
2944 or variable length structures. Diagnose nogroup clause used with
2945 reduction clause(s). Handle depend clause with
2946 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2947 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2948 some different type for other kinds. Use build_unary_op with
2949 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2950 Handle depend clauses with iterators. Remove no longer needed special
2951 case that predetermined const qualified vars may be specified in
2952 firstprivate clause. Complain if const qualified vars are mentioned
2953 in data-sharing clauses other than firstprivate or shared. Use
2954 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2955 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2956 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2957 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2958
7e2de6df
DM
29592018-10-29 David Malcolm <dmalcolm@redhat.com>
2960
2961 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2962 logic for change to name_hint::operator bool.
2963 (undeclared_variable): Likewise.
2964 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2965 (c_parser_parameter_declaration): Likewise.
2966
9f936c86
JM
29672018-10-17 Joseph Myers <joseph@codesourcery.com>
2968
2969 * c-errors.c (pedwarn_c11): New function.
2970 * c-parser.c (disable_extension_diagnostics): Save
2971 warn_c11_c2x_compat and set it to 0.
2972 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2973 (c_parser_static_assert_declaration_no_semi): Handle
2974 _Static_assert without string constant.
2975 * c-tree.h (pedwarn_c11): New prototype.
2976
033eb567
DM
29772018-10-17 David Malcolm <dmalcolm@redhat.com>
2978
2979 * Make-lang.in (selftest-c): New.
2980 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2981 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2982 from gcc/Makefile.in.
2983
0edf3afe
RB
29842018-10-02 Richard Biener <rguenther@suse.de>
2985
2986 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2987
8313a764
JM
29882018-09-26 Joseph Myers <joseph@codesourcery.com>
2989
2990 PR c/87390
2991 * c-typeck.c (build_binary_op): Use excess precision for
2992 comparisons of integers and floating-point for C11 and later.
2993
ce6f0888
MJ
29942018-09-26 Martin Jambor <mjambor@suse.cz>
2995
2996 PR c/87347
2997 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2998 comment.
ce6f0888 2999
9c4a4b3c
DM
30002018-09-17 David Malcolm <dmalcolm@redhat.com>
3001
3002 * c-objc-common.c (range_label_for_type_mismatch::get_text):
3003 Update for new param.
3004 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
3005 Likewise.
3006
80c6d1f4
MJ
30072018-09-17 Martin Jambor <mjambor@suse.cz>
3008
3009 PR c/63886
3010 * c-parser.c: (warn_for_abs): New function.
3011 (c_parser_postfix_expression_after_primary): Call it.
3012
4a426e36
BE
30132018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3014
3015 * c-typeck.c (digest_init): Shorten overlength strings.
3016
6d900107
BE
30172018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3018
3019 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
3020
b5764229
BE
30212018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3022
3023 * c-decl.c (finish_decl): Call braced_list_to_string here ...
3024 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
3025
22eea6b2
AM
30262018-08-30 Alexander Monakov <amonakov@ispras.ru>
3027
3028 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
3029 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
3030
85204e23
DM
30312018-08-27 David Malcolm <dmalcolm@redhat.com>
3032
3033 PR 87091
3034 * c-decl.c (implicitly_declare): Update call to
3035 maybe_add_include_fixit to suggest overriding the location, as it
3036 is for a note.
3037 * c-objc-common.c (c_tree_printer): Update for conversion of
3038 show_caret_p to a tri-state.
3039
3d78e008
ML
30402018-08-27 Martin Liska <mliska@suse.cz>
3041
3042 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
3043 fndecl_built_in_p and remove check for FUNCTION_DECL if
3044 possible.
3d78e008
ML
3045 (diagnose_mismatched_decls): Likewise.
3046 (merge_decls): Likewise.
3047 (warn_if_shadowing): Likewise.
3048 (pushdecl): Likewise.
3049 (implicitly_declare): Likewise.
3050 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3051 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
3052 * c-typeck.c (build_function_call_vec): Likewise.
3053 (convert_arguments): Likewise.
3054
097f82ec
DM
30552018-08-20 David Malcolm <dmalcolm@redhat.com>
3056
3057 PR other/84889
3058 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
3059 (diagnose_mismatched_decls): Likewise, in various places.
3060 (warn_if_shadowing): Likewise.
3061 (implicit_decl_warning): Likewise.
3062 (implicitly_declare): Likewise.
3063 (undeclared_variable): Likewise.
3064 (declare_label): Likewise.
3065 (grokdeclarator): Likewise.
3066 (start_function): Likewise.
3067 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3068 (c_parser_parameter_declaration): Likewise.
3069 (c_parser_binary_expression): Likewise.
3070 * c-typeck.c (c_expr_sizeof_expr): Likewise.
3071 (parser_build_binary_op): Likewise.
3072 (build_unary_op): Likewise.
3073 (error_init): Likewise.
3074 (pedwarn_init): Likewise.
3075 (warning_init): Likewise.
3076 (convert_for_assignment): Likewise.
3077
96e6ae57
DM
30782018-08-15 David Malcolm <dmalcolm@redhat.com>
3079
3080 * c-objc-common.c: Include "gcc-rich-location.h".
3081 (c_tree_printer): Move implemenation of '%T' to...
3082 (print_type): ...this new function.
3083 (range_label_for_type_mismatch::get_text): New function.
3084 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
3085 range for the various ic_argpass cases.
3086 (class maybe_range_label_for_tree_type_mismatch): New class.
3087 (build_binary_op): Use it when calling binary_op_error.
3088
0cd020ae 30892018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 3090
0cd020ae
PK
3091 * c-decl.c (start_decl): Do not warn if variables is named as main
3092 and is a local variable.
3093
72733314
IS
30942018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3095
3096 PR c/19315
3097 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
3098 objects of unknown size.
3099
23aa9f7c
MS
31002018-08-13 Martin Sebor <msebor@redhat.com>
3101
3102 PR tree-optimization/71625
3103 * c-parser.c (c_parser_declaration_or_fndef): Call
3104 braced_list_to_string.
3105
e5e7e50d
BH
31062018-08-03 Bogdan Harjoc <harjoc@gmail.com>
3107
3108 PR c/86690
3109 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
3110 errors.
3111
8a45b051
MS
31122018-08-01 Martin Sebor <msebor@redhat.com>
3113
3114 PR tree-optimization/86650
3115 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
3116 and TREE_BLOCK (t) from within percent_K_format to this callsite.
3117
5922dcb5
JJ
31182018-08-01 Jakub Jelinek <jakub@redhat.com>
3119
3120 PR c/85704
3121 * c-typeck.c (init_field_decl_cmp): New function.
3122 (output_pending_init_elements): Use it for field comparisons
3123 instead of pure bit_position comparisons.
3124
9b452033
JJ
31252018-07-12 Jakub Jelinek <jakub@redhat.com>
3126
3127 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
3128 type here, instead add "omp declare target implicit" attribute.
3129 (finish_decl): Diagnose vars without mappable type here.
3130
ab20d992
JJ
31312018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3132 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
3133 Cesar Philippidis <cesar@codesourcery.com>
3134
3135 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
3136 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
3137 to their non-present_or_* counterparts. Make 'self' an alias to
3138 PRAGMA_OACC_CLAUSE_HOST.
3139 (c_parser_oacc_data_clause): Update GOMP mappings for
3140 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
3141 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
3142 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
3143 Remove support for present_or_* clauses.
3144 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3145 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
3146 (OACC_DECLARE_CLAUSE_MASK): Likewise.
3147 (OACC_DATA_CLAUSE_MASK): Likewise.
3148 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3149 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
3150 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
3151 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
3152 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
3153
e197e64e
KV
31542018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3155
3156 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
3157 * gimple-parser.c (c_parser_gimple_statement): Likewise.
3158 (c_parser_gimple_unary_expression): Likewise.
3159
487f2f61
JJ
31602018-06-15 Jakub Jelinek <jakub@redhat.com>
3161
3162 PR c/86093
3163 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
3164 before doing POINTER_DIFF_EXPR.
3165
e4d44a37
MP
31662018-06-07 Marek Polacek <polacek@redhat.com>
3167
3168 PR c/85318
3169 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
3170 for loop initial declarations.
3171
b67b9225
DP
31722018-05-30 David Pagan <dave.pagan@oracle.com>
3173
3174 PR c/55976
3175 * c-decl.c (grokdeclarator): Update check for return type warnings.
3176 (start_function): Likewise.
3177 (finish_function): Likewise.
3178 * c-typeck.c (c_finish_return): Update check for return type warnings.
3179 Pass OPT_Wreturn_type to pedwarn when appropriate.
3180
c566cc9f
RS
31812018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
3182
3183 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
3184 __FMA_EXPR handlng.
3185
e4f81565
RS
31862018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
3187
3188 * gimple-parser.c: Include internal-fn.h.
3189 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
3190 (c_parser_gimple_call_internal): New function.
3191 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
3192 Fix typos in comment.
3193
79e7b1fe
JJ
31942018-05-10 Jakub Jelinek <jakub@redhat.com>
3195
3196 PR c++/85662
3197 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
3198 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
3199 fold_convert_loc.
3200 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
3201 fold_offsetof_1, pass argtype as TYPE to it and drop the
3202 fold_convert_loc.
3203
f7584c81
DP
32042018-05-02 David Pagan <dave.pagan@oracle.com>
3205
3206 PR c/30552
3207 * c-decl.c (old_style_parameter_scope): New function.
3208 * c-parser.c (c_parser_postfix_expression): Check for statement
3209 expressions in old-style function parameter list declarations.
3210 * c-parser.h (old_style_parameter_scope): New extern declaration.
3211
b33a0cb3
JJ
32122018-04-25 Jakub Jelinek <jakub@redhat.com>
3213
3214 PR sanitizer/84307
3215 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
3216 it is not TREE_STATIC.
3217 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
3218 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
3219 its COMPOUND_LITERAL_EXPR_DECL.
3220
c5c5822a
JM
32212018-03-21 Joseph Myers <joseph@codesourcery.com>
3222
3223 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
3224 where all functions return the same _FloatN or _FloatNx type,
3225 treat integer types as _Float64 instead of double.
3226
aa1c9429
JJ
32272018-03-21 Jakub Jelinek <jakub@redhat.com>
3228
3229 PR c/84999
3230 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
3231 building vector comparison, diagnose it and return error_mark_node.
3232
9bb45a95
JJ
32332018-03-15 Jakub Jelinek <jakub@redhat.com>
3234
3235 PR c/84853
3236 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
3237 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
3238 INTEGER_TYPE element type.
3239
ada6bad9
DP
32402018-03-13 David Pagan <dave.pagan@oracle.com>
3241
3242 PR c/46921
3243 * c-typeck.c (output_init_element): Ensure field initializer
3244 expression is always evaluated if there are side effects.
3245
849bbdb9
JJ
32462018-03-06 Jakub Jelinek <jakub@redhat.com>
3247
3248 PR c/84721
3249 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
3250 !building_stmt_list_p ().
3251
d74641bd
RS
32522018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
3253
3254 PR c/84305
3255 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
3256 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
3257 and include the BIND_EXPR in the list of things that need to be
3258 pre-evaluated.
3259
0444aa9c
NS
32602018-02-09 Nathan Sidwell <nathan@acm.org>
3261
3262 PR c/84293
3263 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
3264 to strict_aliasing_warning.
3265
7c30b12a
PC
32662018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3267
3268 * c-typeck.c (really_start_incremental_init, push_init_level,
3269 set_nonincremental_init, output_init_element, process_init_element):
3270 Use DECL_UNNAMED_BIT_FIELD.
3271
2be4dfcb
MP
32722018-01-31 Marek Polacek <polacek@redhat.com>
3273
3274 PR c/81779
3275 * c-parser.c (c_parser_compound_statement_nostart): Call
3276 expansion_point_location_if_in_system_header.
3277
bb9869d5
DM
32782018-01-17 David Malcolm <dmalcolm@redhat.com>
3279
3280 PR c++/83814
3281 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3282 the C part.
3283
b4923738
JJ
32842018-01-13 Jakub Jelinek <jakub@redhat.com>
3285
3286 PR c/83801
3287 * c-tree.h (decl_constant_value_1): Add a bool argument.
3288 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3289 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3290 (decl_constant_value): Adjust caller.
3291 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3292 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3293 decl_constant_value returns initializer that has BLKmode or
3294 array type.
3295 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3296
928686b1
RS
32972018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3298 Alan Hayward <alan.hayward@arm.com>
3299 David Sherwood <david.sherwood@arm.com>
3300
3301 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3302 TYPE_VECTOR_SUBPARTS.
3303
85ec4feb
JJ
33042018-01-03 Jakub Jelinek <jakub@redhat.com>
3305
3306 Update copyright years.
3307
913884f7
JJ
33082018-01-01 Jakub Jelinek <jakub@redhat.com>
3309
3310 PR c/83595
3311 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3312 c_parser_conditional_expression, c_parser_cast_expression,
3313 c_parser_sizeof_expression, c_parser_alignof_expression,
3314 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3315 c_parser_transaction_expression): Use set_error () method instead
3316 of setting value member to error_mark_node.
3317
c6cfa2bf
MM
33182017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3319
3320 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3321 and _Float<N>X built-in functions.
3322
11d29d63
JJ
33232017-12-22 Jakub Jelinek <jakub@redhat.com>
3324
14ec014e
JJ
3325 PR debug/83550
3326 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3327 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3328 incomplete vars rather than after it.
3329
11d29d63
JJ
3330 PR debug/83547
3331 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3332 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3333 and consider empty ones if there are no other stmts. For
3334 -Wunused-value walk all statements before the one only followed by
3335 DEBUG_BEGIN_STMTs.
3336
170a8bd6 33372017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3338 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3339
3340 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3341 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3342 (c_parser_do_statement): Likewise.
3343 (c_parser_for_statement): Likewise.
3344 (c_parser_statement_after_labels): Adjust calls to above.
3345 (c_parse_pragma_ivdep): New static function.
3346 (c_parser_pragma_unroll): Likewise.
3347 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3348 <PRAGMA_UNROLL>: New case.
3349
01512446
JJ
33502017-12-19 Jakub Jelinek <jakub@redhat.com>
3351
3352 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3353 perform_integral_promotions, digest_init): Replace Yoda conditions
3354 with typical order conditions.
3355 * c-decl.c (check_bitfield_type_and_width): Likewise.
3356
c65e18d3
BE
33572017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3358
3359 * c-typeck.c (c_safe_arg_type_equiv_p,
3360 c_safe_function_type_cast_p): New function.
3361 (build_c_cast): Implement -Wcast-function-type.
3362
b7280579
RB
33632017-12-14 Richard Biener <rguenther@suse.de>
3364
3365 PR c/83415
3366 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3367 like REALPART_EXPR for the behavior of whether its operand
3368 is an lvalue.
3369
49e6a6c0
MP
33702017-12-12 Marek Polacek <polacek@redhat.com>
3371
3372 PR c/82679
3373 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3374
ab20d992 33752017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3376
3377 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3378 * c-parser.c (add_debug_begin_stmt): New.
3379 (c_parser_declaration_or_fndef): Call it.
3380 (c_parser_compound_statement_nostart): Likewise.
3381 (c_parser_statement_after_labels): Likewise.
3382 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3383
4b2b493f
JM
33842017-12-07 Joseph Myers <joseph@codesourcery.com>
3385
3386 * c-decl.c (build_compound_literal): Add parameter alignas_align
3387 and set alignment of decl if nonzero.
3388 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3389 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3390 qualifier.
3391 (c_parser_struct_declaration): Update syntax comment.
3392 (c_parser_type_name): Add alignas_ok argument and pass it to
3393 c_parser_declspecs.
3394 (c_parser_cast_expression): Pass true to c_parser_type_name and
3395 give error if a cast used an _Alignas specifier.
3396 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3397 give error if sizeof (type-name) used an _Alignas specifier.
3398 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3399 give error if _Alignof (type-name) used an _Alignas specifier.
3400 (c_parser_postfix_expression_after_paren_type): Check specified
3401 alignment for a compound literal and pass it to
3402 build_compound_literal.
3403 * c-parser.h (c_parser_type_name): Update prototype.
3404 * c-tree.h (build_compound_literal): Update prototype.
3405
5d9ae53d
MS
34062017-12-07 Martin Sebor <msebor@redhat.com>
3407
3408 PR c/81544
3409 * c-decl.c (c_decl_attributes): Look up existing declaration and
3410 pass it to decl_attributes.
3411
c79144f8
DM
34122017-12-06 David Malcolm <dmalcolm@redhat.com>
3413
3414 PR c/83236
3415 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3416 reserved for use by the implementation.
3417
613bc14f
DM
34182017-12-06 David Malcolm <dmalcolm@redhat.com>
3419
3420 * c-decl.c: Include "c-family/c-spellcheck.h".
3421
05abad4c
ML
34222017-12-05 Martin Liska <mliska@suse.cz>
3423 Jakub Jelinek <jakub@redhat.com>
3424
3425 * c-typeck.c (pointer_diff): Add new argument and instrument
3426 pointer subtraction.
3427 (build_binary_op): Similar for pointer comparison.
3428
cc6534d4
JJ
34292017-12-01 Jakub Jelinek <jakub@redhat.com>
3430
65791f42
JJ
3431 PR c/79153
3432 * c-parser.c: Include tree-iterator.h.
3433 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3434 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3435 on it.
3436
cc6534d4
JJ
3437 PR c/83222
3438 * c-tree.h (decl_constant_value_1): Declare.
3439 * c-typeck.c (decl_constant_value_1): New function.
3440 (decl_constant_value): Use it.
3441 * c-fold.c (c_fully_fold_internal): If in_init, use
3442 decl_constant_value_1 instead of decl_constant_value.
3443
5de73c05
JJ
34442017-11-30 Jakub Jelinek <jakub@redhat.com>
3445
3446 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3447
058f0b9e
JJ
34482017-11-28 Jakub Jelinek <jakub@redhat.com>
3449
3450 PR sanitizer/81275
3451 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3452 c_switch_covers_all_cases_p returns true.
3453
5e9d6aa4 34542017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3455 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3456
3457 * Make-lang.in (c/c-array-notation.o): Remove.
3458 * c-array-notation.c: Delete.
3459 * c-decl.c: Remove cilkplus condition.
3460 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3461 c_parser_cilk_verify_simd, c_parser_array_notation,
3462 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3463 c_parser_cilk_simd_fn_vector_attrs,
3464 c_finish_cilk_simd_fn_tokens): Delete.
3465 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3466 (c_parser_direct_declarator_inner): Ditto.
3467 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3468 (c_parser_attributes, c_parser_compound_statement,
3469 c_parser_statement_after_labels, c_parser_if_statement,
3470 c_parser_switch_statement, c_parser_while_statement,
3471 c_parser_do_statement, c_parser_for_statement,
3472 c_parser_unary_expression, c_parser_postfix_expression,
3473 c_parser_postfix_expression_after_primary,
3474 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3475 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3476 support.
3477 * c-typeck.c (build_array_ref, build_function_call_vec,
3478 convert_arguments,
3479 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3480 c_finish_loop, build_binary_op): Remove cilkplus support.
3481
9e851845
JJ
34822017-11-28 Jakub Jelinek <jakub@redhat.com>
3483
3484 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3485 of build3.
3486
ab20d992 34872017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
3488
3489 * Make-lang.in (c.install-plugin): Install backend import library.
3490
41521dee
JJ
34912017-11-23 Jakub Jelinek <jakub@redhat.com>
3492
3493 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3494 pragma_stmt context.
3495
ac9effed
EB
34962017-11-23 Mike Stump <mikestump@comcast.net>
3497 Eric Botcazou <ebotcazou@adacore.com>
3498
3499 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3500 ANNOTATE_EXPR.
3501 (c_parser_do_statement): Likewise.
3502 (c_parser_for_statement): Likewise.
3503
ce95abc4
DM
35042017-11-22 David Malcolm <dmalcolm@redhat.com>
3505
3506 PR c++/62170
3507 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3508 bool to bool *. Within '%T' handling, if showing an "aka", use
3509 "quoted" param to add appropriate quoting.
3510
974aedcc
MP
35112017-11-22 Marek Polacek <polacek@redhat.com>
3512
3513 PR c++/60336
3514 PR middle-end/67239
3515 PR target/68355
3516 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3517
d4300cc6
DM
35182017-11-21 David Malcolm <dmalcolm@redhat.com>
3519
3520 PR c/83056
3521 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3522 earlier failed lookups.
3523
1af4ebf5
MG
35242017-11-21 Marc Glisse <marc.glisse@inria.fr>
3525
3526 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3527 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3528
26edace6
DM
35292017-11-20 David Malcolm <dmalcolm@redhat.com>
3530
3531 PR c/81404
3532 * c-decl.c: Include "c-family/known-headers.h".
3533 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3534 to known-headers.cc.
3535 (class suggest_missing_header): Move to known-header.h.
3536 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3537 than get_c_name_hint.
3538
b1212255
DM
35392017-11-20 David Malcolm <dmalcolm@redhat.com>
3540
3541 * c-decl.c (get_c_name_hint): New function.
3542 (class suggest_missing_header): New class.
3543 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3544 suggest missing headers to the user.
3545
6c7a259b
DM
35462017-11-20 David Malcolm <dmalcolm@redhat.com>
3547
3548 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3549 Include "c-family/name-hint.h"
3550 (implicit_decl_warning): Convert "hint" from
3551 const char * to name_hint. Pass location to
3552 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3553 warning was not printed.
3554 (undeclared_variable): Likewise for "guessed_id".
3555 (lookup_name_fuzzy): Convert return type from const char *
3556 to name_hint. Add location_t param.
3557 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3558 Include "c-family/name-hint.h"
3559 (c_parser_declaration_or_fndef): Convert "hint" from
3560 const char * to name_hint. Pass location to lookup_name_fuzzy.
3561 (c_parser_parameter_declaration): Likewise.
3562
f9c59f7e
JJ
35632017-11-19 Jakub Jelinek <jakub@redhat.com>
3564
3565 PR c/66618
3566 PR c/69960
3567 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3568 where needed.
3569 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3570 handle_omp_array_sections): Likewise.
3571 (digest_init): Don't call decl_constant_value_for_optimization.
3572 * c-tree.h (decl_constant_value_for_optimization): Removed.
3573 * c-fold.c (c_fold_array_ref): New function.
3574 (c_fully_fold_internal): Add LVAL argument, propagate it through
3575 recursive calls. For VAR_P call decl_constant_value and
3576 unshare if not LVAL and either optimizing or IN_INIT. Remove
3577 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3578 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3579 (c_fully_fold): Add LVAL argument, pass it through to
3580 c_fully_fold_internal.
3581 (decl_constant_value_for_optimization): Removed.
3582
3ca0dc60
JM
35832017-11-15 Joseph Myers <joseph@codesourcery.com>
3584
3585 PR c/81156
3586 * c-parser.c (check_tgmath_function): New function.
3587 (enum tgmath_parm_kind): New enum.
3588 (c_parser_postfix_expression): Handle __builtin_tgmath.
3589
64a5912c
DM
35902017-10-31 David Malcolm <dmalcolm@redhat.com>
3591
3592 * c-decl.c (implicit_decl_warning): Update for renaming of
3593 pedwarn_at_rich_loc and warning_at_rich_loc.
3594 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3595 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3596 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3597 (c_parser_struct_or_union_specifier): Likewise for renaming of
3598 pedwarn_at_rich_loc.
3599 (c_parser_parameter_declaration): Likewise for renaming of
3600 error_at_rich_loc.
3601 * c-typeck.c (build_component_ref): Likewise.
3602 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3603 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3604 (set_init_label): Likewise for renaming of error_at_rich_loc.
3605
c1136864
RB
36062017-10-30 Richard Biener <rguenther@suse.de>
3607
3608 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3609 stmts.
3610
ee5fd23a
MM
36112017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3612
3613 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3614 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3615
1a59ccf2
DM
36162017-10-25 David Malcolm <dmalcolm@redhat.com>
3617
3618 PR c/7356
3619 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3620 semicolons.
3621
bc1a75dd
JJ
36222017-10-25 Jakub Jelinek <jakub@redhat.com>
3623
3624 PR libstdc++/81706
3625 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3626 newdecl to corresponding __builtin_ if any.
3627
ff1ff960
PC
36282017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3629
3630 PR c++/82466
3631 * c-decl.c (diagnose_mismatched_decls): Use
3632 OPT_Wbuiltin_declaration_mismatch.
3633
62e1c678
DM
36342017-10-12 David Malcolm <dmalcolm@redhat.com>
3635
3636 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3637 use it to guard calls to maybe_suggest_missing_token_insertion.
3638 (c_parser_parms_list_declarator): Override default value of new
3639 "type_is_unique" param to c_parser_require.
3640 (c_parser_asm_statement): Likewise.
3641 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3642 defaulting to true.
3643
a92f6726
NS
36442017-10-11 Nathan Sidwell <nathan@acm.org>
3645
3646 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3647
8e6cdc90
RS
36482017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3649
3650 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3651 operating on trees as wide_ints.
3652 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3653 (c_tree_equal): Likewise.
3654
8139a48e
DM
36552017-10-04 David Malcolm <dmalcolm@redhat.com>
3656
3657 * c-decl.c (push_parm_decl): Store c_parm's location into the
3658 PARAM_DECL.
3659 (build_c_parm): Add "loc" param and store it within the c_parm.
3660 * c-parser.c (struct c_parser): Add "last_token_location" field.
3661 (c_parser_consume_token): Store location of the token into the
3662 new field.
3663 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3664 when handling a FUNCTION_DECL, if it doesn't already have them.
3665 (c_parser_parameter_declaration): Generate a location for the
3666 parameter, and pass it to the call to build_c_parm.
3667 * c-tree.h (struct c_parm): Add field "loc".
3668 (build_c_parm): Add location_t param.
3669 * c-typeck.c (get_fndecl_argument_location): New function.
3670 (inform_for_arg): New function.
3671 (convert_for_assignment): Use inform_for_arg when dealing with
3672 ic_argpass.
3673
2a389958
JJ
36742017-09-29 Jakub Jelinek <jakub@redhat.com>
3675
7d386d45
JJ
3676 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3677 width is non-NULL.
3678 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3679 don't SET_DECL_C_BIT_FIELD here.
3680
2a389958
JJ
3681 PR c/82340
3682 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3683 instead of trying to set just TREE_READONLY manually.
3684
ebc6a85e
TV
36852017-09-16 Tom de Vries <tom@codesourcery.com>
3686
3687 PR c/81875
3688 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3689 cond itself.
3690
bb75facd
JM
36912017-09-15 Joseph Myers <joseph@codesourcery.com>
3692
3693 PR c/82071
3694 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3695 for C11.
3696 (build_conditional_expr): For C11, generate result with excess
3697 precision when one argument is an integer and the other is of a
3698 type using excess precision.
3699
1d933576
BE
37002017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3701
3702 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3703
267bbb6f
MP
37042017-09-13 Marek Polacek <polacek@redhat.com>
3705
3706 PR c/82167
3707 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3708 than expr.original_type.
3709
6836632e
NS
37102017-09-12 Nathan Sidwell <nathan@acm.org>
3711
3712 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3713 resort_sorted_fields): Moved from c-family/c-common.c.
3714 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3715
e035be33
JM
37162017-09-01 Joseph Myers <joseph@codesourcery.com>
3717
3718 PR c/82071
3719 * c-typeck.c (build_atomic_assign): Handle argument with excess
3720 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3721 argument passed to build_binary_op and convert_for_assignment but
3722 not for call to c_fully_fold.
3723 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3724 Ensure build_binary_op is called with argument with original
3725 semantic type. Avoid calling c_fully_fold with an
3726 EXCESS_PRECISION_EXPR from build_binary_op.
3727
d2e05fcb
JJ
37282017-09-01 Jakub Jelinek <jakub@redhat.com>
3729
3730 PR c/81887
3731 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3732
b397965c
RS
37332017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3734 Alan Hayward <alan.hayward@arm.com>
3735 David Sherwood <david.sherwood@arm.com>
3736
3737 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3738 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3739 m1 and m2 to the signed equivalent of a fixed-point
3740 SCALAR_TYPE_MODE.
3741
14e18d71
DM
37422017-08-24 David Malcolm <dmalcolm@redhat.com>
3743
3744 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3745 than CAN_HAVE_LOCATION_P when determining whether to use the
3746 location_t value within "value".
3747
7f204c0f
DM
37482017-08-21 David Malcolm <dmalcolm@redhat.com>
3749
3750 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3751 rather than peeking the location of the first token.
3752 * c-tree.h (c_expr::get_location): New method.
3753
2f687306
DM
37542017-08-21 David Malcolm <dmalcolm@redhat.com>
3755
3756 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3757 to check_function_arguments.
3758
3e7b80d7
MP
37592017-08-18 Marek Polacek <polacek@redhat.com>
3760
3761 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3762 commentary.
3763
00aa1fa2
L
37642017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3765
3766 PR c/53037
3767 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3768 (check_bitfield_type_and_width): Don't allow bit-field with
3769 warn_if_not_aligned type.
3770
da67acb9
MS
37712017-08-14 Martin Sebor <msebor@redhat.com>
3772
3773 PR c/81117
3774 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3775
bb85aa74
MP
37762017-08-11 Marek Polacek <polacek@redhat.com>
3777
3778 PR c/81795
3779 * c-decl.c (pushtag): Only print inform if the warning was printed.
3780 (grokdeclarator): Likewise.
3781
32129a17
DM
37822017-08-10 David Malcolm <dmalcolm@redhat.com>
3783
3784 * c-parser.c (c_parser_error): Rename to...
3785 (c_parser_error_richloc): ...this, making static, and adding
3786 "richloc" parameter, passing it to the c_parse_error call,
3787 rather than calling c_parser_set_source_position_from_token.
3788 (c_parser_error): Reintroduce, reimplementing in terms of the
3789 above, converting return type from void to bool.
3790 (class token_pair): New class.
3791 (struct matching_paren_traits): New struct.
3792 (matching_parens): New typedef.
3793 (struct matching_brace_traits): New struct.
3794 (matching_braces): New typedef.
3795 (get_matching_symbol): New function.
3796 (c_parser_require): Add param MATCHING_LOCATION, using it to
3797 highlight matching "opening" tokens for missing "closing" tokens.
3798 (c_parser_skip_until_found): Likewise.
3799 (c_parser_static_assert_declaration_no_semi): Convert explicit
3800 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3801 class matching_parens, so that the pertinent open parenthesis is
3802 highlighted when there are problems locating the close
3803 parenthesis.
3804 (c_parser_struct_or_union_specifier): Likewise.
3805 (c_parser_typeof_specifier): Likewise.
3806 (c_parser_alignas_specifier): Likewise.
3807 (c_parser_simple_asm_expr): Likewise.
3808 (c_parser_braced_init): Likewise, for matching_braces.
3809 (c_parser_paren_condition): Likewise, for matching_parens.
3810 (c_parser_switch_statement): Likewise.
3811 (c_parser_for_statement): Likewise.
3812 (c_parser_asm_statement): Likewise.
3813 (c_parser_asm_operands): Likewise.
3814 (c_parser_cast_expression): Likewise.
3815 (c_parser_sizeof_expression): Likewise.
3816 (c_parser_alignof_expression): Likewise.
3817 (c_parser_generic_selection): Likewise.
3818 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3819 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3820 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3821 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3822 c_parser_skip_until_found call.
3823 (c_parser_objc_class_definition): Use class matching_parens as
3824 above.
3825 (c_parser_objc_method_decl): Likewise.
3826 (c_parser_objc_try_catch_finally_statement): Likewise.
3827 (c_parser_objc_synchronized_statement): Likewise.
3828 (c_parser_objc_at_property_declaration): Likewise.
3829 (c_parser_oacc_wait_list): Likewise.
3830 (c_parser_omp_var_list_parens): Likewise.
3831 (c_parser_omp_clause_collapse): Likewise.
3832 (c_parser_omp_clause_default): Likewise.
3833 (c_parser_omp_clause_if): Likewise.
3834 (c_parser_omp_clause_num_threads): Likewise.
3835 (c_parser_omp_clause_num_tasks): Likewise.
3836 (c_parser_omp_clause_grainsize): Likewise.
3837 (c_parser_omp_clause_priority): Likewise.
3838 (c_parser_omp_clause_hint): Likewise.
3839 (c_parser_omp_clause_defaultmap): Likewise.
3840 (c_parser_oacc_single_int_clause): Likewise.
3841 (c_parser_omp_clause_ordered): Likewise.
3842 (c_parser_omp_clause_reduction): Likewise.
3843 (c_parser_omp_clause_schedule): Likewise.
3844 (c_parser_omp_clause_num_teams): Likewise.
3845 (c_parser_omp_clause_thread_limit): Likewise.
3846 (c_parser_omp_clause_aligned): Likewise.
3847 (c_parser_omp_clause_linear): Likewise.
3848 (c_parser_omp_clause_safelen): Likewise.
3849 (c_parser_omp_clause_simdlen): Likewise.
3850 (c_parser_omp_clause_depend): Likewise.
3851 (c_parser_omp_clause_map): Likewise.
3852 (c_parser_omp_clause_device): Likewise.
3853 (c_parser_omp_clause_dist_schedule): Likewise.
3854 (c_parser_omp_clause_proc_bind): Likewise.
3855 (c_parser_omp_clause_uniform): Likewise.
3856 (c_parser_omp_for_loop): Likewise.
3857 (c_parser_cilk_clause_vectorlength): Likewise.
3858 (c_parser_cilk_clause_linear): Likewise.
3859 (c_parser_transaction_expression): Likewise.
3860 * c-parser.h (c_parser_require): Add param matching_location with
3861 default UNKNOWN_LOCATION.
3862 (c_parser_error): Convert return type from void to bool.
3863 (c_parser_skip_until_found): Add param matching_location with
3864 default UNKNOWN_LOCATION.
3865
30af3a2b
MP
38662017-08-09 Marek Polacek <polacek@redhat.com>
3867
3868 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3869 * c-tree.h (build_external_ref): Update declaration.
3870 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3871 (build_external_ref): Change the type of a parameter to bool.
3872 (parser_build_binary_op): Use true/false instead of 1/0.
3873 (pointer_diff): Likewise.
3874 (build_modify_expr): Likewise.
3875 (set_designator): Change the type of a parameter to bool.
3876 (set_init_index): Use true/false instead of 1/0.
3877 (set_init_label): Likewise.
3878 (output_init_element): Change the type of a parameter to bool.
3879 (output_pending_init_elements): Use true/false instead of 1/0.
3880 (process_init_element): Likewise.
3881 (build_binary_op): Change the type of a parameter to bool.
3882
296c53ac
MP
38832017-08-09 Marek Polacek <polacek@redhat.com>
3884
3885 PR c/81233
3886 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3887 Call emit_diagnostic_valist instead of pedwarn.
3888 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3889 Print the relevant types in diagnostics.
3890
a32c8316
MP
38912017-08-09 Marek Polacek <polacek@redhat.com>
3892
3893 PR c/81417
3894 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3895 build_conditional_expr.
a32c8316
MP
3896 * c-parser.c (c_parser_conditional_expression): Create locations for
3897 EXP1 and EXP2 from their source ranges. Pass the locations down to
3898 build_conditional_expr.
3899 * c-tree.h (build_conditional_expr): Update declaration.
3900 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3901 For -Wsign-compare, also print the types.
3902
314e6352
ML
39032017-08-08 Martin Liska <mliska@suse.cz>
3904
3905 * c-convert.c: Include header files.
3906 * c-typeck.c: Likewise.
3907
577eec56
ML
39082017-08-07 Martin Liska <mliska@suse.cz>
3909
3910 * c-parser.c (c_parser_attributes): Canonicalize name of an
3911 attribute.
3912
f7b6353a
MP
39132017-08-02 Marek Polacek <polacek@redhat.com>
3914
3915 PR c/81289
3916 * c-parser.c (c_parser_unary_expression): Use set_error.
3917
8a6eab34
MP
3918 PR c/81448
3919 PR c/81306
3920 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3921 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3922
ab20d992 39232017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3924 Martin Liska <mliska@suse.cz>
3925
3926 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3927 statement.
7fef86d3 3928
f34ebeb2
ML
39292017-07-31 Martin Liska <mliska@suse.cz>
3930
3931 PR sanitize/81530
3932 * c-convert.c (convert): Guard condition with flag_sanitize_p
3933 also with current_function_decl non-null equality.
3934 * c-decl.c (grokdeclarator): Likewise.
3935 * c-typeck.c (build_binary_op): Likewise.
3936
8595f67b
MP
39372017-07-25 Marek Polacek <polacek@redhat.com>
3938
3939 * c-decl.c (grokfield): Remove local variable.
3940
d49718d6
MP
39412017-07-25 Marek Polacek <polacek@redhat.com>
3942
3943 PR c/81364
3944 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3945 macro expansion if the body is in { }.
3946 (c_parser_while_statement): Likewise.
3947 (c_parser_for_statement): Likewise.
3948
ff22eb12
NS
39492017-07-18 Nathan Sidwell <nathan@acm.org>
3950
3951 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3952
eea77d1f
DM
39532017-07-14 David Malcolm <dmalcolm@redhat.com>
3954
3955 * c-decl.c (implicitly_declare): When suggesting a missing
3956 #include, provide a fix-it hint.
3957
b6f43128
DM
39582017-07-06 David Malcolm <dmalcolm@redhat.com>
3959
3960 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3961 and call that instead.
3962 * c-tree.h (selftest::run_c_tests): New decl.
3963
3e2becc4
MP
39642017-06-26 Marek Polacek <polacek@redhat.com>
3965
3966 PR c/80116
3967 * c-parser.c (c_parser_if_body): Set the location of the
3968 body of the conditional after parsing all the labels. Call
3969 warn_for_multistatement_macros.
3970 (c_parser_else_body): Likewise.
3971 (c_parser_switch_statement): Likewise.
3972 (c_parser_while_statement): Likewise.
3973 (c_parser_for_statement): Likewise.
3974 (c_parser_statement): Add a default argument. Save the location
3975 after labels have been parsed.
3976 (c_parser_c99_block_statement): Likewise.
3977
343ae898
RB
39782017-06-19 Richard Biener <rguenther@suse.de>
3979
3980 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3981 negated _Literals to parse _Literal (int) -1.
3982
45b2222a
ML
39832017-06-13 Martin Liska <mliska@suse.cz>
3984
3985 PR sanitize/78204
3986 * c-convert.c (convert): Use sanitize_flags_p.
3987 * c-decl.c (grokdeclarator): Likewise.
3988 * c-typeck.c (convert_for_assignment): Likewise.
3989 (c_finish_return): Likewise.
3990 (build_binary_op): Likewise.
3991
8ab7005b
JJ
39922017-06-08 Jakub Jelinek <jakub@redhat.com>
3993
3994 PR c/81006
3995 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3996 to sizetype before size_binop.
3997
363dc72c
JJ
39982017-06-07 Jakub Jelinek <jakub@redhat.com>
3999
4000 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
4001 of TDI_generic.
4002
dc949728
MP
40032017-06-06 Marek Polacek <polacek@redhat.com>
4004
4005 PR c/79983
4006 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
4007 ref.
4008 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
4009
40ffd95f
BE
40102017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4011
4012 * c-parser.c (c_parser_binary_expression): Implement the
4013 -Wsizeof_pointer_div warning.
4014 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
4015 from a parenthesized expression.
4016 (c_parser_expr_list): Use c_last_sizeof_loc.
4017 * c-tree.h (c_last_sizeof_loc): New external.
4018 * c-typeck.c (c_last_sizeof_loc): New variable.
4019 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
4020
9fc5e7a4
MM
40212017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
4022
4023 PR testsuite/80580
4024 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
4025
f012c8ef
DM
40262017-05-30 David Malcolm <dmalcolm@redhat.com>
4027
4028 * c-objc-common.c (c_tree_printer): Gain bool and const char **
4029 parameters.
4030
3cd211af
MS
40312017-05-24 Martin Sebor <msebor@redhat.com>
4032
4033 PR c/80731
4034 * c-fold.c (c_fully_fold_internal): Adjust.
4035 * c-typeck.c (parser_build_unary_op): Adjust.
4036
fd71a9a2
TS
40372017-05-23 Thomas Schwinge <thomas@codesourcery.com>
4038
4039 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
4040 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
4041 "VECTOR_LENGTH".
4042
92fa0f9e
MP
40432017-05-23 Marek Polacek <polacek@redhat.com>
4044
4045 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
4046 quotes.
4047
d11c168a
JJ
40482017-05-22 Jakub Jelinek <jakub@redhat.com>
4049
4050 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
4051 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
4052 it returned invariant. Call tree_invariant_p unconditionally
4053 afterwards to decide whether to return expr or op0.
4054
58aca9d9
NS
40552017-05-22 Nathan Sidwell <nathan@acm.org>
4056
4057 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
4058
7fd549d2
TS
40592017-05-19 Thomas Schwinge <thomas@codesourcery.com>
4060
4061 * c-parser.c (c_parser_omp_clause_default): Handle
4062 "OMP_CLAUSE_DEFAULT_PRESENT".
4063
6ecd2339
BE
40642017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4065
4066 * config-lang.in (gtfiles): Add c-family/c-format.c.
4067
8a57ecff
NS
40682017-05-18 Nathan Sidwell <nathan@acm.org>
4069
4070 * c-decl.c (pushdecl_top_level): Delete unused function.
4071
6574d78e
MP
40722017-05-18 Marek Polacek <polacek@redhat.com>
4073
4074 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
4075 (check_earlier_gotos): Likewise.
4076 (define_label): Likewise.
4077 (pending_xref_error): Likewise.
4078 (smallest_type_quals_location): Likewise.
4079 (grokdeclarator): Likewise.
4080 (grokparms): Likewise.
4081 (identifier_global_value): Likewise.
4082 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
4083 (find_init_member): Likewise.
4084
e3455240
MP
40852017-05-18 Marek Polacek <polacek@redhat.com>
4086
4087 * c-decl.c (start_decl): Use false/true instead of 0/1.
4088 (grokdeclarator): Likewise.
4089 (finish_struct): Likewise.
4090 (start_function): Change the return type to bool. Use false/true
4091 instead of 0/1.
4092 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
4093 * c-tree.h (start_function): Update.
4094 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
4095 (set_designator): Change the return type to bool. Use false/true
4096 instead of 0/1.
4097
3fa8871b
MP
40982017-05-17 Marek Polacek <polacek@redhat.com>
4099
4100 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
4101 * c-typeck.c: Likewise.
4102
142473df
MP
41032017-05-17 Marek Polacek <polacek@redhat.com>
4104
4105 PR sanitizer/80659
4106 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
4107 DECL_IGNORED_P even for non-static compound literals.
4108
1a817418
ML
41092017-05-17 Martin Liska <mliska@suse.cz>
4110
4111 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
4112 use it instead of int type.
4113
b2fa0a8b
MP
41142017-05-17 Marek Polacek <polacek@redhat.com>
4115
4116 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
4117 call c_fully_fold.
4118 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 4119 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
4120 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
4121 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
4122 save_expr.
4123 (c_parser_conditional_expression): Likewise.
4124 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
4125 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
4126 (process_init_element): Likewise.
4127 (build_binary_op): Likewise.
4128 (handle_omp_array_sections_1): Likewise.
4129
1e47f02b
TS
41302017-05-12 Thomas Schwinge <thomas@codesourcery.com>
4131
4132 * c-parser.c (c_parser_omp_clause_num_gangs)
4133 (c_parser_omp_clause_num_workers)
4134 (c_parser_omp_clause_vector_length): Merge functions into...
4135 (c_parser_oacc_single_int_clause): ... this new function. Adjust
4136 all users.
4137
c24e924f
NS
41382017-05-11 Nathan Sidwell <nathan@acm.org>
4139
4140 * gimple-parser.c: Don't #include tree-dump.h.
4141
c587104e
MM
41422017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4143
4144 PR testsuite/80580
4145 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
4146
67ac9a9d
MM
41472017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4148
4149 PR testsuite/80580
4150 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4151 incorrect __MEM syntax.
4152
ac4eb40f
MM
41532017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4154
4155 PR testsuite/80580
4156 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
4157 type of unary '*'.
4158
641da50a
NS
41592017-05-09 Nathan Sidwell <nathan@acm.org>
4160
4161 * c-tree.h (pushdecl): Declare.
4162
56d35585
DM
41632017-05-05 David Malcolm <dmalcolm@redhat.com>
4164
4165 * c-decl.c (warn_defaults_to): Replace report_diagnostic
4166 with diagnostic_report_diagnostic.
4167 * c-errors.c (pedwarn_c99): Likewise.
4168 (pedwarn_c90): Likewise.
4169
815d9cc6
XR
41702017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4171
92a285c1 4172 PR c++/80038
815d9cc6
XR
4173 * c-gimplify.c (c_gimplify_expr): Remove calls to
4174 cilk_gimplifY_call_params_in_spawned_fn.
4175
1c4ea66f
DM
41762017-04-25 David Malcolm <dmalcolm@redhat.com>
4177
4178 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
4179 hint for removing extra semicolon.
4180
666f7903
JJ
41812017-04-21 Jakub Jelinek <jakub@redhat.com>
4182
4183 PR c/80468
4184 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
4185 enabled, set specs->type to integer_type_node.
4186
5764ee3c
JW
41872017-04-03 Jonathan Wakely <jwakely@redhat.com>
4188
4189 * c-array-notation.c: Fix typo in comment.
4190
10fa8dfb
MP
41912017-03-29 Marek Polacek <polacek@redhat.com>
4192
4193 PR c/79730
4194 * c-decl.c (finish_decl): Check VAR_P.
4195
a9e4a1a5
JJ
41962017-03-27 Jakub Jelinek <jakub@redhat.com>
4197
4198 PR middle-end/80162
4199 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
4200 * c-typeck.c (c_mark_addressable): Likewise. Look through
4201 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
4202 to ARRAY_TYPE.
4203 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
4204
ee3ff394
MP
42052017-03-23 Marek Polacek <polacek@redhat.com>
4206
4207 * c-tree.h: Remove a C_RID_YYCODE reference.
4208
4d1b8e70
JJ
42092017-03-21 Jakub Jelinek <jakub@redhat.com>
4210
4211 PR c/80097
4212 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
4213 optional COMPOUND_EXPR with ubsan instrumentation.
4214
31dc71a8
MP
42152017-03-17 Marek Polacek <polacek@redhat.com>
4216
4217 * c-parser.c: Add C11 references.
4218
d579c385
MP
42192017-03-15 Marek Polacek <polacek@redhat.com>
4220
4221 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
4222
85059a38
MP
42232017-03-11 Marek Polacek <polacek@redhat.com>
4224
4225 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
4226
2f6f187a
DM
42272017-03-10 David Malcolm <dmalcolm@redhat.com>
4228
4229 PR translation/79848
4230 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
4231 "%qs".
4232 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
4233
36618428
MP
42342017-03-09 Marek Polacek <polacek@redhat.com>
4235
4236 PR sanitizer/79757
4237 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
4238 parameter declarations with initializers.
4239
01e5af5a
JJ
42402017-03-09 Jakub Jelinek <jakub@redhat.com>
4241
4242 PR c/79969
4243 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
4244 TYPE_STUB_DECL.
4245
a71dbc63
JJ
42462017-03-07 Jakub Jelinek <jakub@redhat.com>
4247
4248 PR c/79834
4249 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
4250 for "may only be used in compound statements" diagnostics, change it
4251 such that the same translatable string is used for all pragmas. For
4252 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
4253 diagnostics.
4254 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
4255 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
4256 "may only be used in compound statements" diagnostics, such that the
4257 same translatable string is used for all pragmas.
4258
1ff4bae6
MP
42592017-03-04 Marek Polacek <polacek@redhat.com>
4260
4261 PR c/79847
4262 * c-decl.c (implicit_decl_warning): Add missing space.
4263
7f5a7d78
MP
42642017-03-03 Marek Polacek <polacek@redhat.com>
4265
4266 PR c/79758
4267 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
4268 current_function_prototype_arg_types is error_mark_node. Fix
4269 formatting. Use TREE_VALUE instead of TREE_TYPE.
4270
883c8f06
JJ
42712017-03-03 Jakub Jelinek <jakub@redhat.com>
4272
79c9b7a8
JJ
4273 PR c/79837
4274 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
4275 %<min%> or %<max%> in the diagnostics, instead mention identifier.
4276 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
4277 diagnostics.
4278
883c8f06
JJ
4279 PR c/79836
4280 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
4281 instead of %<_Generic>.
4282 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4283 (c_parser_omp_target_exit_data): Use %<release%> instead of
4284 %<release>.
4285
324ff1a0
JJ
42862017-02-28 Jakub Jelinek <jakub@redhat.com>
4287
4288 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4289 instead of just cond ? "..." : "...".
4290 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4291 for "enter"/"exit" keyword.
4292 (c_finish_oacc_routine): Don't use %s to supply portions of the
4293 message.
4294
4227c9ad
JJ
42952017-02-24 Jakub Jelinek <jakub@redhat.com>
4296
4297 PR c++/79588
4298 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4299 handle -Wrestrict here.
4300 * c-typeck.c (build_function_call_vec): Adjust
4301 check_function_arguments caller.
4302
5d972e66
RB
43032017-02-23 Richard Biener <rguenther@suse.de>
4304
4305 PR c/79684
4306 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4307 to initialize c_exprs to return.
4308 (c_parser_gimple_binary_expression): Likewise.
4309 (c_parser_gimple_unary_expression): Likewise.
4310 (c_parser_gimple_postfix_expression): Likewise.
4311
61ac5ebe
MP
43122017-02-22 Marek Polacek <polacek@redhat.com>
4313
4314 PR c/79662
4315 * c-typeck.c (convert_arguments): Handle error_mark_node.
4316
41d1b0b1
PK
43172017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4318
4319 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4320 value of c_parser_parse_ssa_name against error_mark_node and emit
4321 error if ssa name is anonymous and written as default definition.
4322
eab1f169
PK
43232017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4324
4325 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4326 FMA_EXPR.
4327
bcac0b4d
JJ
43282017-02-16 Jakub Jelinek <jakub@redhat.com>
4329
4330 PR c++/79512
4331 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4332 ignore #pragma omp target even when not followed by identifier.
4333
1be33173
PK
43342017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4335
4336 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4337 (c_parser_gimple_unary_expression): Likewise.
4338
aa326bfb
JJ
43392017-02-13 Jakub Jelinek <jakub@redhat.com>
4340
4341 * c-parser.c (c_parser_oacc_declare): Add missing space in
4342 diagnostics.
4343
8a398bc5
PK
43442017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4345
4346 PR c/79478
4347 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4348 set_c_expr_source_range when parsing ssa-name.
4349
3dcde5ef 43502017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 4351 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
4352
4353 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4354 building IL when arguments are error_mark_node.
4355 (c_parser_gimple_unary_expression): Likewise.
4356 (c_parser_gimple_if_stmt): Likewise.
4357 (c_parser_gimple_switch_stmt): Likewise.
4358 (c_parser_gimple_return_stmt): Likewise.
4359 (c_parser_parse_ssa_name): When name lookup fails do not build
4360 an SSA name. Use undeclared rather than not declared in error
4361 reporting.
4362
192b048b
MP
43632017-02-09 Marek Polacek <polacek@redhat.com>
4364
4365 PR c/79428
4366 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4367 instead of c_parser_skip_until_found.
4368
56f71478
JJ
43692017-02-09 Jakub Jelinek <jakub@redhat.com>
4370
4371 PR c/79431
4372 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4373 symtab_node::get on automatic variables.
4374
02889d23
CLT
43752016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4376 Chung-Lin Tang <cltang@codesourcery.com>
4377
4378 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4379 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4380 semantic checking.
4381 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4382
7af4b20d
RB
43832017-02-07 Richard Biener <rguenther@suse.de>
4384
4385 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4386 (c_parser_gimple_postfix_expression_after_primary):
4387 Do not use c_build_function_call_vec to avoid folding and promotion.
4388 Simplify.
4389
e5e391d6
MO
43902017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4391
4392 PR lto/79061
4393 * c-decl.c (pop_scope): Pass main_input_filename to
4394 build_translation_unit_decl.
4395
c2e84327
DM
43962017-01-24 David Malcolm <dmalcolm@redhat.com>
4397
4398 * c-parser.c: Include "read-rtl-function.h" and
4399 "run-rtl-passes.h".
4400 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4401 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4402 production. Update for renaming of field "gimple_pass" to
4403 "gimple_or_rtl_pass". If __RTL was seen, call
4404 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4405 to an auto_timevar, to cope with early exit.
4406 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4407 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4408 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4409 Handle RID_RTL.
4410 (c_parser_parse_rtl_body): New function.
4411 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4412 (struct c_declspecs): Rename field "gimple_pass" to
4413 "gimple_or_rtl_pass". Add field "rtl_p".
4414 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4415 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4416 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4417 (c_parser_gimple_or_rtl_pass_list): ...this.
4418
2ebd93e1
MP
44192017-01-20 Marek Polacek <polacek@redhat.com>
4420
4421 PR c/64279
4422 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4423
b1c95bb5
RB
44242017-01-13 Richard Biener <rguenther@suse.de>
4425
4426 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4427 nops.
4428
25329913
RB
44292017-01-13 Richard Biener <rguenther@suse.de>
4430
4431 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4432 _Literal ( type-name ) number.
4433
6bb4ea5c
RB
44342017-01-12 Richard Biener <rguenther@suse.de>
4435
4436 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4437 __MEM.
4438
6b5b4e9c
JJ
44392017-01-11 Jakub Jelinek <jakub@redhat.com>
4440
4441 PR c++/72813
4442 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4443 PCH file.
4444
e3252775
RB
44452017-01-11 Richard Biener <rguenther@suse.de>
4446
4447 PR bootstrap/79052
4448 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4449 returns on parse errors.
4450
a9342885
MP
44512017-01-04 Marek Polacek <polacek@redhat.com>
4452
4453 PR c++/64767
4454 * c-parser.c (c_parser_postfix_expression): Mark zero character
4455 constants by setting original_type in c_expr.
4456 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4457 with a zero character constant.
4458 (char_type_p): New function.
4459
5dd9a9d0
DM
44602017-01-04 David Malcolm <dmalcolm@redhat.com>
4461
4462 * c-parser.c (c_parser_declaration_or_fndef): Create a
4463 rich_location at init_loc and parse it to start_init.
4464 (last_init_list_comma): New global.
4465 (c_parser_braced_init): Update last_init_list_comma when parsing
4466 commas. Pass it to pop_init_level. Pass location of closing
4467 brace to pop_init_level.
4468 (c_parser_postfix_expression_after_paren_type): Create a
4469 rich_location at type_loc and parse it to start_init.
4470 (c_parser_omp_declare_reduction): Likewise for loc.
4471 * c-tree.h (start_init): Add rich_location * param.
4472 (pop_init_level): Add location_t param.
4473 * c-typeck.c (struct initializer_stack): Add field
4474 "missing_brace_richloc".
4475 (start_init): Add richloc param, use it to initialize
4476 the stack node's missing_brace_richloc.
4477 (last_init_list_comma): New decl.
4478 (finish_implicit_inits): Pass last_init_list_comma to
4479 pop_init_level.
4480 (push_init_level): When finding missing open braces, add fix-it
4481 hints to the richloc.
4482 (pop_init_level): Add "insert_before" param and pass it
4483 when calling pop_init_level. Add fixits about missing
4484 close braces to any richloc. Use the richloc for the
4485 -Wmissing-braces warning.
4486 (set_designator): Pass last_init_list_comma to pop_init_level.
4487 (process_init_element): Likewise.
4488
cbe34bb5
JJ
44892017-01-01 Jakub Jelinek <jakub@redhat.com>
4490
4491 Update copyright years.
4492
d17680f3
JJ
44932016-12-21 Jakub Jelinek <jakub@redhat.com>
4494
0dba7960
JJ
4495 PR bootstrap/78817
4496 * c-typeck.c (build_function_call_vec): If check_function_arguments
4497 returns true, set TREE_NO_WARNING on CALL_EXPR.
4498
d17680f3
JJ
4499 PR c/77767
4500 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4501 to *expr instead of overwriting it.
4502
aa90531e
RB
45032016-12-20 Richard Biener <rguenther@suse.de>
4504
4505 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4506 error recovery.
4507 (c_parser_gimple_statement): Only build assigns for non-error
4508 stmts.
4509 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4510
629b3d75
MJ
45112016-12-14 Martin Jambor <mjambor@suse.cz>
4512
4513 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4514 omp-low.h.
4515 (c_finish_oacc_routine): Adjusted call to
4516 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4517 to use their new names.
4518 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4519 use its new name.
4520 (c_parser_oacc_update): Likewise.
4521 (c_parser_omp_simd): Likewise.
4522 (c_parser_omp_target_update): Likewise.
4523 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4524 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4525 name.
4526 (c_finish_omp_cancellation_point): Likewise.
4527 * gimple-parser.c: Do not include omp-low.h
4528
c5af52eb
CP
45292016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4530 James Norris <jnorris@codesourcery.com>
4531
4532 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4533 EXIT_DATA,WAIT} are not used in compound statements.
4534 (c_parser_oacc_enter_exit_data): Update diagnostics.
4535
48330c93
BE
45362016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4537
4538 PR c++/71973
4539 * c-decl.c (diagnose_mismatched_decls): Use
4540 OPT_Wbuiltin_declaration_mismatch here too.
4541
899ca90e 45422016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
4543 Alan Hayward <alan.hayward@arm.com>
4544 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
4545
4546 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4547 (make_label, finish_struct): Likewise.
4548
1ee62b92 45492016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 4550 Richard Biener <rguenther@suse.de>
22b15758 4551
8e745a17
JJ
4552 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4553 * config-lang.in (gtfiles): Add c/c-parser.h.
4554 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4555 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4556 * c-parser.c (enum c_id_kind, struct c_token,
4557 c_parser_next_token_is, c_parser_next_token_is_not,
4558 c_parser_next_token_is_keyword,
4559 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4560 Split out to ...
4561 * c-parser.h: ... new header.
4562 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 4563 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
4564 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4565 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4566 c_parser_error, c_parser_require, c_parser_skip_until_found,
4567 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4568 c_parser_type_name): Export.
4569 (c_parser_tokens_buf): New function.
4570 (c_parser_error): Likewise.
4571 (c_parser_set_error): Likewise.
4572 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
4573 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4574 via c_parser_parse_gimple_body.
8e745a17
JJ
4575 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4576 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4577 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4578 c_parser_error, c_parser_require, c_parser_skip_until_found,
4579 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4580 c_parser_type_name): Declare.
1ee62b92
PG
4581 (struct c_parser): Declare forward.
4582 (c_parser_tokens_buf): Declare.
8e745a17
JJ
4583 (c_parser_error): Likewise.
4584 (c_parser_set_error): Likewise.
4585 * gimple-parser.c: New file.
4586 * gimple-parser.h: Likewise.
1ee62b92 4587
22b15758
UB
45882016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4589
4590 PR c/35503
4591 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4592 warn_for_restrict.
4593
84ff4775
LCW
45942016-09-11 Le-Chun Wu <lcwu@google.com>
4595 Mark Wielaard <mjw@redhat.com>
4596
4597 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4598 to the given -Wshadow= variant.
4599
4d0cdd0c
TP
46002016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4601
4602 * c-typeck.c: Include memmodel.h.
4603
1202f33e
JJ
46042016-10-13 Jakub Jelinek <jakub@redhat.com>
4605
4606 PR target/77957
4607 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4608 instead of lhd_return_null_tree_v.
4609
8a14afd0
BS
46102016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4611
4612 PR c++/69733
4613 * c-decl.c (smallest_type_quals_location): New static function.
4614 (grokdeclarator): Try to find the correct location for an ignored
4615 qualifier.
4616
81fea426
MP
46172016-09-26 Marek Polacek <polacek@redhat.com>
4618
4619 PR c/7652
4620 * c-decl.c (pop_scope): Add gcc_fallthrough.
4621
46222016-09-26 Marek Polacek <polacek@redhat.com>
4623
4624 PR c/7652
4625 * c-parser.c (struct c_token): Add flags field.
4626 (c_lex_one_token): Pass it to c_lex_with_flags.
4627 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4628 into IFN_FALLTHROUGH.
4629 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4630 attribute fallthrough after a case label or default label.
4631 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4632
9a2300e9
MP
46332016-09-24 Marek Polacek <polacek@redhat.com>
4634
4635 PR c/77490
4636 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4637 have boolean value. Warn about ++/-- on booleans.
4638
7de76362
JJ
46392016-09-23 Jakub Jelinek <jakub@redhat.com>
4640
4641 * c-parser.c (incomplete_record_decls): Remove unnecessary
4642 = vNULL initialization of file scope vec.
4643
5b73d2ab
MP
46442016-09-16 Marek Polacek <polacek@redhat.com>
4645
4646 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4647
e51fbec3
MP
46482016-09-14 Marek Polacek <polacek@redhat.com>
4649
4650 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4651 (fix_array_notation_expr): Likewise.
4652 * c-decl.c (finish_decl): Likewise.
4653 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4654 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4655 (function_to_pointer_conversion): Use false instead of 0.
4656 (convert_lvalue_to_rvalue): Likewise.
4657 (parser_build_unary_op): Likewise.
4658 (build_atomic_assign): Likewise.
4659 (build_unary_op): Change nonconvert parameter type to bool, use
4660 true/false instead of 1/0.
4661 (build_binary_op): Use true instead of 1.
4662
254830ba
DM
46632016-09-13 David Malcolm <dmalcolm@redhat.com>
4664
4665 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4666 of add_fixit_insert to add_fixit_insert_before.
4667
4c13ba17
MP
46682016-09-13 Marek Polacek <polacek@redhat.com>
4669
4670 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4671 it.
4672
54dcdb88
BE
46732016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4674
4675 PR c++/77496
4676 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4677 COMPOUND_EXPR to warn_for_omitted_condop.
4678
e5106e27
DM
46792016-09-07 David Malcolm <dmalcolm@redhat.com>
4680
4681 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4682 c_get_substring_location for this new langhook.
4683
9dc5773f
JJ
46842016-09-02 Jakub Jelinek <jakub@redhat.com>
4685
4686 PR c/65467
4687 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4688 flag_openmp.
4689 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4690 instead of mark_exp_read on low_bound/length expression.
4691 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4692 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4693 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4694 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4695 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4696 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4697 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4698 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4699 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4700 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4701 instead of mark_expr_read.
4702 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4703 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4704 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4705 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4706 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4707 array section bases outside of depend clause, for depend clause
4708 use convert_lvalue_to_rvalue on the base.
4709 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4710 linear, aligned, map, to and from clauses.
4711 (c_omp_clause_copy_ctor): New function.
4712
295844f6
MP
47132016-09-01 Marek Polacek <polacek@redhat.com>
4714
4715 PR c/7652
4716 * c-typeck.c (composite_type): Add FALLTHRU comment.
4717
089af25c
DM
47182016-08-31 David Malcolm <dmalcolm@redhat.com>
4719
4720 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4721 to the insertion fixits for "struct", "union", and "enum".
4722
f9087798
DM
47232016-08-30 David Malcolm <dmalcolm@redhat.com>
4724
4725 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4726 rather than add_fixit_misspelled_id.
4727 (undeclared_variable): Likewise.
4728 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4729 now-redundant "here" params from add_fixit_insert method calls.
4730 (c_parser_parameter_declaration): Likewise.
4731 * c-typeck.c (build_component_ref): Remove now-redundant range
4732 param from add_fixit_replace method calls.
4733
ebef225f
MP
47342016-08-25 Marek Polacek <polacek@redhat.com>
4735
4736 * c-typeck.c (parser_build_binary_op): Pass LHS to
4737 warn_logical_not_parentheses.
4738
fe377a48
MP
47392016-08-25 Marek Polacek <polacek@redhat.com>
4740
4741 PR c/77323
4742 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4743 or _FloatN or _FloatNx is not supported.
4744 (finish_declspecs): Set type to integer_type_node when _FloatN or
4745 _FloatNx is not supported.
4746
c65699ef
JM
47472016-08-19 Joseph Myers <joseph@codesourcery.com>
4748
4749 PR c/32187
4750 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4751 (struct c_declspecs): Add field floatn_nx_idx.
4752 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4753 and _FloatNx type specifiers.
4754 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4755 (c_parser_declspecs, c_parser_attribute_any_word)
4756 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4757 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4758 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4759 narrower than double.
4760
2f1364c2
JJ
47612016-08-12 Jakub Jelinek <jakub@redhat.com>
4762 Martin Liska <mliska@suse.cz>
4763
4764 PR c/67410
4765 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4766 % to determine val element to change. Assert that
4767 wchar_bytes * charwidth fits into val array.
4768
191816a3
MP
47692016-08-12 Marek Polacek <polacek@redhat.com>
4770
4771 PR c/7652
4772 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4773 (c_parser_postfix_expression): Likewise.
4774 * c-typeck.c (build_unary_op): Adjust fall through comment.
4775 (c_mark_addressable): Likewise.
4776
b95a64bb
JJ
47772016-08-11 Jakub Jelinek <jakub@redhat.com>
4778
4779 PR c/72816
4780 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4781 array member through typedef, for orig_qual_indirect == 0 clear
4782 orig_qual_type.
4783
895aa8e1
DM
47842016-08-08 David Malcolm <dmalcolm@redhat.com>
4785
4786 PR c/64955
4787 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4788 this up to selftest::run_c_tests.
4789 (selftest::run_c_tests): New function.
4790
0b212d8c
TS
47912016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4792
ae9281fc
TS
4793 * c-parser.c (struct oacc_routine_data): Add error_seen and
4794 fndecl_seen members.
4795 (c_finish_oacc_routine): Use these.
4796 (c_parser_declaration_or_fndef): Adjust.
4797 (c_parser_oacc_routine): Likewise. Support more C language
4798 constructs, and improve diagnostics. Move pragma context
4799 checking...
4800 (c_parser_pragma): ... here.
4801
0b212d8c
TS
4802 * c-parser.c (struct oacc_routine_data): New.
4803 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4804 Simplify code.
4805 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4806 declare target" attribute.
4807
76e2c821
JB
48082016-08-01 Jan Beulich <jbeulich@suse.com>
4809
4810 * c-fold.c (c_fully_fold_internal): Also emit shift count
4811 warnings for vector types.
4812 * c-typeck.c (build_binary_op): Likewise.
4813
f618a472
MP
48142016-07-29 Marek Polacek <polacek@redhat.com>
4815
4816 PR c/71742
4817 * c-decl.c (finish_struct): Rephrase an error message.
4818
efd0786f
MP
4819 PR c/71853
4820 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4821 to error node for invalid code.
4822
e00dceaf
MP
4823 PR c/71573
4824 * c-decl.c (implicitly_declare): Return decl early not only for
4825 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4826
673a107a
JJ
48272016-07-29 Jakub Jelinek <jakub@redhat.com>
4828
4829 PR c/71969
4830 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4831 on GNU extern inline functions.
4832
a5b5c8b6
MP
48332016-07-29 Marek Polacek <polacek@redhat.com>
4834
4835 PR c/71583
4836 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4837 check expr.value.
4838
e3fe09c1
UB
48392016-07-22 Uros Bizjak <ubizjak@gmail.com>
4840
4841 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4842
7c8f7eaa
DM
48432016-07-20 David Malcolm <dmalcolm@redhat.com>
4844
4845 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4846 spellcheck-tree.h
4847 (best_macro_match): Likewise, converting from a typedef to a
4848 subclass.
4849 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4850 (lookup_name_fuzzy): Update for change of best_macro_match to a
4851 subclass with a ctor that calls cpp_forall_identifiers.
4852
de6a69ee
DM
48532016-07-20 David Malcolm <dmalcolm@redhat.com>
4854
4855 * c-decl.c (implicit_decl_warning): Update for conversion of
4856 return type of lookup_name_fuzzy to const char *.
4857 (undeclared_variable): Likewise.
4858 (lookup_name_fuzzy): Convert return type from tree to
4859 const char *.
4860 * c-parser.c (c_parser_declaration_or_fndef): Update for
4861 conversion of return type of lookup_name_fuzzy to const char *.
4862 (c_parser_parameter_declaration): Likewise.
4863
b1c9c068
CP
48642016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4865
4866 * c-parser.c (c_parser_oacc_declare): Don't scan for
4867 GOMP_MAP_POINTER.
4868 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4869 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4870 zero-length subarrays.
4871
ddbbcb19
JJ
48722016-07-15 Jakub Jelinek <jakub@redhat.com>
4873
4874 PR c/71858
4875 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4876 instead of FUZZY_LOOKUP_NAME.
4877 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4878 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4879
dd36b877
JJ
48802016-07-14 Jakub Jelinek <jakub@redhat.com>
4881
4882 PR c/71858
4883 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4884
8c681247
TS
48852016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4886
4887 * c-parser.c (c_parser_generic_selection): Make type of variable
4888 auto_vec.
4889 (c_parser_omp_declare_simd): Likewise.
4890
bf4fa671
TS
48912016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4892
4893 * c-decl.c (struct c_struct_parse_info): Change member types
4894 from vec to auto_vec.
4895 (start_struct): Adjust.
4896 (finish_struct): Likewise.
4897
557e8c49
JJ
48982016-07-02 Jakub Jelinek <jakub@redhat.com>
4899
4900 PR c/71719
4901 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4902
54d19c3b
TS
49032016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4904
4905 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4906 Move pragma context checking into...
4907 (c_parser_omp_cancellation_point): ... here, and improve
4908 diagnostic messages.
4909 * c-typeck.c (c_finish_omp_cancel)
4910 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4911
152ef731
JJ
49122016-06-29 Jakub Jelinek <jakub@redhat.com>
4913
4914 PR c/71685
4915 * c-typeck.c (c_build_qualified_type): Don't clear
4916 C_TYPE_INCOMPLETE_VARS for the main variant.
4917
49182016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4919
4920 PR c/71552
4921 * c-typeck.c (output_init_element): Diagnose incompatible types
4922 before non-constant initializers.
4923
e9ac1f86
JJ
49242016-06-28 Jakub Jelinek <jakub@redhat.com>
4925
4926 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4927
277d7ee0
AK
49282016-06-23 Andi Kleen <ak@linux.intel.com>
4929
4930 * Make-lang.in: Add support for autofdo.
4931
1a4f11c8
DM
49322016-06-22 David Malcolm <dmalcolm@redhat.com>
4933
4934 PR c/70339
4935 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4936 (implicit_decl_warning): When issuing warnings for implicit
4937 declarations, attempt to provide a suggestion via
4938 lookup_name_fuzzy.
4939 (undeclared_variable): Likewise when issuing errors.
4940 (lookup_name_in_scope): Likewise.
4941 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4942 (best_macro_match): New typedef.
4943 (find_closest_macro_cpp_cb): New function.
4944 (lookup_name_fuzzy): New function.
4945 * c-parser.c: Include gcc-rich-location.h.
4946 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4947 (c_keyword_starts_typename): ...this new function.
4948 (c_parser_declaration_or_fndef): When issuing errors about
4949 missing "struct" etc, add a fixit. For other kinds of errors,
4950 attempt to provide a suggestion via lookup_name_fuzzy.
4951 (c_parser_parms_declarator): When looking ahead to detect typos in
4952 type names, also reject CPP_KEYWORD.
4953 (c_parser_parameter_declaration): When issuing errors about
4954 unknown type names, attempt to provide a suggestion via
4955 lookup_name_fuzzy.
4956 * c-tree.h (c_keyword_starts_typename): New prototype.
4957
5a578671
JM
49582016-06-20 Joseph Myers <joseph@codesourcery.com>
4959
4960 PR c/71601
4961 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4962 c_common_type returns error_mark_node.
4963
3f8257db 49642016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4965
4966 PR c/69507
4967 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4968 __alignof__ (expression).
4969
6a3f203c
DM
49702016-06-14 David Malcolm <dmalcolm@redhat.com>
4971
4972 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4973
264757fb
DM
49742016-06-14 David Malcolm <dmalcolm@redhat.com>
4975
4976 * c-typeck.c (build_component_ref): Simplify fixit code by
4977 using gcc_rich_location::add_fixit_misspelled_id.
4978 (set_init_label): Likewise.
4979
f7e4f2e3
DM
49802016-06-13 David Malcolm <dmalcolm@redhat.com>
4981
4982 * c-parser.c (c_parser_initelt): Provide location of name for new
4983 location_t param of set_init_label.
4984 * c-tree.h (set_init_label): Add location_t param.
4985 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4986 param and use it when issuing error messages about unrecognized
4987 field names. Attempt to provide a fixit hint if appropriate,
4988 otherwise update the error message to provide the type name.
4989
4b1ffdb1
TS
49902016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4991
4992 PR c/71381
4993 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4994 Loosen checking.
4995
44a845ca
MS
49962016-06-08 Martin Sebor <msebor@redhat.com>
4997 Jakub Jelinek <jakub@redhat.com>
4998
4999 PR c++/70507
5000 PR c/68120
5001 * c-typeck.c (convert_arguments): Don't promote last argument
5002 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5003
92a5f2ba
MP
50042016-06-08 Marek Polacek <polacek@redhat.com>
5005
5006 PR c/71418
5007 * c-decl.c (grokdeclarator): Check TYPE_P.
5008
08203f73
MP
5009 PR c/71426
5010 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
5011 code.
5012
6ffd47b7
DM
50132016-06-07 David Malcolm <dmalcolm@redhat.com>
5014
5015 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
5016 and structure element reference, capture the location of the
5017 element name token and pass it to build_component_ref.
5018 (c_parser_postfix_expression_after_primary): Likewise for
5019 structure element dereference.
5020 (c_parser_omp_variable_list): Likewise for
5021 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
5022 * c-tree.h (build_component_ref): Add location_t param.
5023 * c-typeck.c (build_component_ref): Add location_t param
5024 COMPONENT_LOC. Use it, if available, when issuing hints about
5025 mispelled member names to provide a fixit replacement hint.
5026
1f40cff3
MP
50272016-06-06 Marek Polacek <polacek@redhat.com>
5028
5029 PR c/71362
5030 * c-parser.c (c_parser_direct_declarator): Set location.
5031
5545a907
MP
50322016-06-06 Marek Polacek <polacek@redhat.com>
5033
5034 * c-typeck.c (comptypes_internal): Handle comparisons of
5035 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
5036 TYPE_REF_CAN_ALIAS_ALL.
5037
b605f663
CLT
50382016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
5039
5040 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
5041 arguments as addressable when async clause exists.
5042
00631022
JJ
50432016-05-30 Jakub Jelinek <jakub@redhat.com>
5044
5045 PR c++/71349
5046 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
5047 when combined with target construct.
5048
7211a097
JJ
50492016-05-26 Jakub Jelinek <jakub@redhat.com>
5050
5051 * c-parser.c (c_parser_omp_clause_schedule): Warn if
5052 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
5053
95efe6b6
MP
50542016-05-25 Marek Polacek <polacek@redhat.com>
5055
5056 PR c/71265
5057 * c-decl.c (c_make_fname_decl): Don't check seen_error.
5058
a23faf7a
MP
5059 PR c/71266
5060 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
5061
e46c7770
CP
50622016-05-24 Cesar Philippidis <cesar@codesourcery.com>
5063
5064 * c-parser.c (c_parser_oacc_declare): Add support for
5065 GOMP_MAP_FIRSTPRIVATE_POINTER.
5066 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
5067 argument with enum c_omp_region_type ort.
5068 (handle_omp_array_sections): Likewise. Update call to
5069 handle_omp_array_sections_1.
5070 (c_finish_omp_clauses): Add specific errors and warning messages for
5071 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
5072 call to handle_omp_array_sections.
5073
a04e69c0
TS
50742016-05-24 Thomas Schwinge <thomas@codesourcery.com>
5075
5076 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
5077
f17a223d
RB
50782016-05-24 Richard Biener <rguenther@suse.de>
5079
5080 PR middle-end/70434
5081 PR c/69504
5082 * c-typeck.c (build_array_ref): Do not complain about indexing
5083 non-lvalue vectors. Adjust for function name change.
5084
79063edd
MS
50852016-05-20 Martin Sebor <msebor@redhat.com>
5086
5087 PR c/71115
5088 * c-typeck.c (error_init): Use
5089 expansion_point_location_if_in_system_header.
5090 (warning_init): Same.
5091
8a40fef3
DM
50922016-05-19 David Malcolm <dmalcolm@redhat.com>
5093
5094 PR c/71171
5095 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
5096 in error-handling.
5097 (c_parser_postfix_expression): Likewise.
5098 * c-tree.h (c_expr::set_error): New method.
5099 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
5100 that result's range is initialized.
5101
e9892350
JG
51022016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
5103
5104 * c-typeck.c (parser_build_unary_op): Fix formatting.
5105
8fad45f5
MW
51062016-05-16 Matthew Wahab <matthew.wahab@arm.com>
5107
5108 * c-decl.c (grokdeclarator): Remove errmsg and use of
5109 targetm.invalid_return_type.
5110 (grokparms): Remove errmsg and use of
5111 targetm.invalid_parameter_type.
5112
aa4b467b
JM
51132016-05-13 Joseph Myers <joseph@codesourcery.com>
5114
5115 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
5116 function return type.
5117
4f2e1536
MP
51182016-05-12 Marek Polacek <polacek@redhat.com>
5119
5120 PR c/70756
5121 * c-decl.c (build_compound_literal): Pass LOC down to
5122 c_incomplete_type_error.
5123 * c-tree.h (require_complete_type): Adjust declaration.
5124 (c_incomplete_type_error): Likewise.
5125 * c-typeck.c (require_complete_type): Add location parameter, pass it
5126 down to c_incomplete_type_error.
5127 (c_incomplete_type_error): Add location parameter, pass it down to
5128 error_at.
5129 (build_component_ref): Pass location down to c_incomplete_type_error.
5130 (default_conversion): Pass location down to require_complete_type.
5131 (build_array_ref): Likewise.
5132 (build_function_call_vec): Likewise.
5133 (convert_arguments): Likewise.
5134 (build_unary_op): Likewise.
5135 (build_c_cast): Likewise.
5136 (build_modify_expr): Likewise.
5137 (convert_for_assignment): Likewise.
5138 (c_finish_omp_clauses): Likewise.
5139
d6e83a8d
MM
51402016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5141
5142 PR c/43651
5143 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
5144 is enabled.
5145 * c-errors.c (pedwarn_c90): Return true if warned.
5146 * c-tree.h (pedwarn_c90): Change return type to bool.
5147 (enum c_declspec_word): Add new enumerator cdw_atomic.
5148
5c3a10fb
MP
51492016-05-11 Marek Polacek <polacek@redhat.com>
5150
5151 PR c++/71024
5152 * c-decl.c (diagnose_mismatched_decls): Factor out code to
5153 diagnose_mismatched_attributes and call it.
5154
cf68d92c
MP
51552016-05-10 Marek Polacek <polacek@redhat.com>
5156
5157 PR c/70255
5158 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
5159 on a declaration following the definition.
5160
351f85c5
JJ
51612016-05-05 Jakub Jelinek <jakub@redhat.com>
5162
5163 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
5164 parse it through to c_parser_c99_block_statement.
5165 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
5166 caller.
5167
deef7113
MP
51682016-05-04 Marek Polacek <polacek@redhat.com>
5169
5170 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
5171 OPT_Wdangling_else.
5172
de55efd5
MP
51732016-05-04 Marek Polacek <polacek@redhat.com>
5174
5175 PR c/48778
5176 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
5177 for macro expansions.
5178
79ce98bc
MP
51792016-05-03 Marek Polacek <polacek@redhat.com>
5180
5181 PR c/70859
5182 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
5183 check_builtin_function_arguments.
5184
fb2647aa
RB
51852016-05-03 Richard Biener <rguenther@suse.de>
5186
5187 * Make-lang.in (cc1-checksum.c): For stage-final re-use
5188 the checksum from the previous stage.
5189
77886428
CP
51902016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5191
5192 * c-parser.c (c_parser_oacc_all_clauses): Update call to
5193 c_finish_omp_clauses.
5194 (c_parser_omp_all_clauses): Likewise.
5195 (c_parser_oacc_cache): Likewise.
5196 (c_parser_oacc_loop): Likewise.
5197 (omp_split_clauses): Likewise.
5198 (c_parser_omp_declare_target): Likewise.
5199 (c_parser_cilk_all_clauses): Likewise.
5200 (c_parser_cilk_for): Likewise.
5201 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
5202 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
5203
7176a4a0
MP
52042016-05-02 Marek Polacek <polacek@redhat.com>
5205
5206 PR c/70851
5207 * c-decl.c (grokdeclarator): Diagnose when array's size has an
5208 incomplete type.
5209
e7ff0319
CP
52102016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5211
5212 PR middle-end/70626
5213 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
5214 OACC_LOOP_CLAUSE_MASK.
5215 (c_parser_oacc_kernels_parallel): Update call to
5216 c_oacc_split_loop_clauses.
5217
9f405ce1
AM
52182016-04-28 Andrew MacLeod <amacleod@redhat.com>
5219
5220 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
5221 argument to build_modify_expr in two cases.
5222
c1e1f433
BS
52232016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5224
5225 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5226 warn_for_memset instead of warning directly here.
5227
2448a956
MP
52282016-04-26 Marek Polacek <polacek@redhat.com>
5229
5230 PR c/67784
5231 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
5232 out of ...
5233 (c_parser_for_statement): ... here.
5234 (c_parser_if_statement): Use it.
5235 (c_parser_switch_statement): Use it.
5236 (c_parser_while_statement): Use it.
5237
b02a5e26
MP
5238 PR c/70791
5239 * c-decl.c (pushdecl): Pass LOCUS down to warning.
5240
477d4906
IV
52412016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5242
5243 PR c++/69363
5244 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
5245 instead of c_finish_cilk_clauses.
5246 * c-tree.h (c_finish_omp_clauses): Add new default argument.
5247 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
5248 floating-point variables in the linear clause for Cilk Plus.
5249
fe37c7af
MM
52502016-04-18 Michael Matz <matz@suse.de>
5251
5252 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
5253 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
5254
949505a9
MP
52552016-04-15 Marek Polacek <polacek@redhat.com>
5256
5257 PR c/70671
5258 * c-typeck.c (build_unary_op): Pass location down to error and
5259 warning call.
5260
dda1bf61
JJ
52612016-04-15 Jakub Jelinek <jakub@redhat.com>
5262
5263 PR c/70436
5264 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
5265 where needed.
5266 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
5267 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
5268 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
5269 Adjust c_parser_pragma callers.
5270 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
5271 caller.
5272 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
5273 c_parser_statement.
5274 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
5275 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
5276 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
5277 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
5278 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
5279 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
5280 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
5281 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5282 down where needed.
5283 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5284 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5285 calls.
5286
99cd9857
MP
52872016-04-13 Marek Polacek <polacek@redhat.com>
5288
5289 PR c/70436
5290 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5291 adjust callers.
5292 (c_parser_statement): Likewise.
5293 (c_parser_c99_block_statement): Likewise.
5294 (c_parser_while_statement): Likewise.
5295 (c_parser_for_statement): Likewise.
5296 (c_parser_if_body): Don't set IF_P here.
5297 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5298 about dangling else here.
5299 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5300 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5301 warn about dangling else here.
5302
f13355da
MP
53032016-04-04 Marek Polacek <polacek@redhat.com>
5304
5305 PR c/70307
5306 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5307
5fde6a45
MP
53082016-03-31 Marek Polacek <polacek@redhat.com>
5309
5310 PR c/70297
5311 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5312
4bbf545b
DM
53132016-03-18 David Malcolm <dmalcolm@redhat.com>
5314
5315 PR c/70281
5316 * c-parser.c (c_parser_postfix_expression): Set the source range
5317 for uses of "__builtin_types_compatible_p".
5318
fcc2b74f
JJ
53192016-03-17 Jakub Jelinek <jakub@redhat.com>
5320
5321 PR c/70280
5322 * c-typeck.c (composite_type): Don't count void_list_node
5323 into len, if the list is terminated by void_list_node, start
5324 with void_list_node instead of NULL for newargs. Stop
5325 at void_list_node.
5326
ab4c578f
MP
53272016-03-16 Marek Polacek <polacek@redhat.com>
5328
5329 PR c/70093
5330 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5331 nested functions returning VM types.
5332
96b3c82d
CP
53332016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5334
5335 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5336 when calling c_finish_omp_clauses.
5337
29b9828f
BS
53382016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5339
5340 PR c/69824
5341 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5342 for later.
5343
7ff6ca38
MP
53442016-03-04 Marek Polacek <polacek@redhat.com>
5345
5346 PR c/69798
5347 * c-parser.c (c_parser_postfix_expression): Call
5348 c_parser_cast_expression rather than c_parser_postfix_expression.
5349
686e2237
JJ
53502016-03-01 Jakub Jelinek <jakub@redhat.com>
5351
5352 PR c/69796
5353 PR c/69974
5354 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5355 of incomplete decls to error_mark_node.
5356
0b05329b
MP
53572016-02-24 Marek Polacek <polacek@redhat.com>
5358
5359 PR c/69819
5360 * c-decl.c (finish_decl): Don't update the copy of the type of a
5361 different decl type.
5362
067fbd8b
JJ
53632016-02-23 Jakub Jelinek <jakub@redhat.com>
5364
5365 PR objc/69844
5366 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5367 in id_kind reclassification.
5368
bf14eba2
JJ
53692016-02-16 Jakub Jelinek <jakub@redhat.com>
5370
5371 PR c/69835
5372 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5373
ba539195
JN
53742016-02-16 James Norris <jnorris@codesourcery.com>
5375
5376 PR c/64748
5377 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5378
16595a1f
BS
53792016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5380
f48dfe98
BS
5381 * c-decl.c (build_null_declspecs): Zero the entire struct.
5382
16595a1f
BS
5383 PR c/69522
5384 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5385 callers changed. If nested_p is true, use it to call
5386 finish_implicit_inits.
5387 * c-tree.h (finish_implicit_inits): Declare.
5388 * c-typeck.c (finish_implicit_inits): New function. Move code
5389 from ...
5390 (push_init_level): ... here.
5391 (set_designator, process_init_element): Call finish_implicit_inits.
5392
66756373
JJ
53932016-02-11 Jakub Jelinek <jakub@redhat.com>
5394
5395 PR c/69768
5396 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5397 arguments for -Waddress warning.
5398
1066e9b5
JJ
53992016-02-04 Jakub Jelinek <jakub@redhat.com>
5400
5401 PR c/69669
5402 * c-decl.c (finish_enum): When honoring mode attribute,
5403 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5404
3a5d2ba4
JJ
54052016-01-29 Jakub Jelinek <jakub@redhat.com>
5406
5407 PR debug/69518
5408 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5409 all type variants, not just TYPE_MAIN_VARIANT.
5410
cbdd8ae0
JJ
54112016-01-27 Jakub Jelinek <jakub@redhat.com>
5412
5413 PR debug/66869
5414 * c-decl.c (c_write_global_declarations_1): Warn with
5415 warn_unused_function if static prototype without definition
5416 is not C_DECL_USED.
5417
fa74a4bc
MP
54182016-01-27 Marek Polacek <polacek@redhat.com>
5419
5420 PR c/68062
5421 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5422 to unsigned, if needed. Add -Wsign-compare warning.
5423
13f92e8d
JJ
54242016-01-26 Jakub Jelinek <jakub@redhat.com>
5425
5426 PR tree-optimization/69483
5427 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5428
cd8e73dc 54292016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
5430
5431 PR c/24293
5432 * c-tree.h (incomplete_record_decls): Declare.
5433 * c-parser.c (incomplete_record_decls): Define.
5434 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5435 report error if any decl has zero size.
5436 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5437 or enum type to incomplete_record_decls.
5438
e6d6ec9e
TV
54392016-01-14 Tom de Vries <tom@codesourcery.com>
5440
5441 PR tree-optimization/68773
5442 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5443 set force_output.
5444
00083992
MP
54452016-01-14 Marek Polacek <polacek@redhat.com>
5446
5447 PR c/69262
5448 * c-decl.c (grokdeclarator): Provide more information for invalid
5449 array declarations.
5450
7443cf13
DM
54512016-01-06 David Malcolm <dmalcolm@redhat.com>
5452
5453 * c-parser.c (c_parser_unary_expression): For dereferences, build
5454 a combined location before calling build_indirect_ref, so that
5455 error reports cover the full range, manually updating the c_expr
5456 src_range.
5457
6b131d5b
MP
54582016-01-06 Marek Polacek <polacek@redhat.com>
5459
5460 PR sanitizer/69099
5461 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5462 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5463 NULL.
5464
818ab71a
JJ
54652016-01-04 Jakub Jelinek <jakub@redhat.com>
5466
5467 Update copyright years.
5468
2fe0a208
MP
54692016-01-04 Marek Polacek <polacek@redhat.com>
5470
5471 PR c/68908
5472 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5473 optimization to use __atomic_fetch_* built-in if possible.
5474
c7b48c8a
TS
54752015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5476
5477 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5478 into...
5479 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5480 all users.
5481
fda5652f
MP
54822015-12-22 Marek Polacek <polacek@redhat.com>
5483
5484 PR c/69002
5485 * c-typeck.c (build_component_ref): Warn when acessing elements of
5486 atomic structures or unions.
5487
745e411d
DM
54882015-12-21 David Malcolm <dmalcolm@redhat.com>
5489
5490 * c-typeck.c: Include "gcc-rich-location.h".
5491 (build_binary_op): In the two places that call binary_op_error,
5492 create a gcc_rich_location and populate it with the location of
5493 the binary op and its two operands.
5494
94c40e19
DM
54952015-12-16 David Malcolm <dmalcolm@redhat.com>
5496
5497 * c-parser.c (c_parser_statement_after_labels): When calling
5498 c_finish_return, Use the return expression's location if it has
5499 one, falling back to the location of the first token within it.
5500 * c-typeck.c (c_finish_return): When issuing warnings about
5501 the incorrect presence/absence of a return value, issue a note
5502 showing the declaration of the function.
5503
de67c4c3
DM
55042015-12-16 David Malcolm <dmalcolm@redhat.com>
5505
5506 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5507 to 4.
5508 (c_parser_peek_nth_token): New function.
5509 (c_parser_peek_conflict_marker): New function.
5510 (c_parser_error): Detect conflict markers and report them as such.
5511
a10704e1
DM
55122015-12-16 David Malcolm <dmalcolm@redhat.com>
5513
5514 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5515 to preserve range information for the primary expression
5516 in the call to c_parser_postfix_expression_after_primary.
5517
8062bca6
DM
55182015-12-16 David Malcolm <dmalcolm@redhat.com>
5519
5520 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5521 expression location, falling back on the first token location,
5522 rather than always using the latter.
5523
d06f8b75
MP
55242015-12-16 Marek Polacek <polacek@redhat.com>
5525
5526 PR c/64637
5527 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5528 available.
5529
2994fb91
MP
55302015-12-15 Marek Polacek <polacek@redhat.com>
5531
5532 PR c/68907
5533 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5534 artificial decl.
5535
a1b93f8d
DM
55362015-12-08 David Malcolm <dmalcolm@redhat.com>
5537
5538 * c-parser.c (c_parser_alignof_expression): Capture location of
5539 closing parenthesis (if any), or of end of unary expression, and
5540 use it to build a src_range for the expression.
5541
46c6e1e2
DM
55422015-12-08 David Malcolm <dmalcolm@redhat.com>
5543
5544 PR c/68757
5545 * c-parser.c (c_parser_get_builtin_args): Add
5546 "out_close_paren_loc" param, and write back to it.
5547 (c_parser_postfix_expression): Capture the closing
5548 parenthesis location for RID_CHOOSE_EXPR,
5549 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5550 RID_BUILTIN_SHUFFLE and use it to set the source range
5551 for such expressions; within RID_BUILTIN_COMPLEX set
5552 the underlying location.
5553
66189108
MP
55542015-12-07 Marek Polacek <polacek@redhat.com>
5555
5556 PR c/68668
5557 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5558 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5559
f187980b
EB
55602015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5561
5562 * c-tree.h (c_build_va_arg): Adjust prototype.
5563 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5564 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5565 parameter, adjust throughout and issue an error if EXPR is a component
5566 with reverse storage order.
5567
4250754e
JM
55682015-12-02 Jason Merrill <jason@redhat.com>
5569
5570 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5571 (c_fully_fold_internal, decl_constant_value_for_optimization):
5572 Move from c-common.c.
5573 * c-tree.h: Declare decl_constant_value_for_optimization.
5574 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5575
e9e32ee6
JM
55762015-12-02 Joseph Myers <joseph@codesourcery.com>
5577
5578 PR c/68162
5579 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5580 following link from declarator to next declarator. Track original
5581 qualified type and pass it to c_build_qualified_type.
5582 * c-typeck.c (c_build_qualified_type): Add arguments
5583 orig_qual_type and orig_qual_indirect.
5584
ff7a55bf
TS
55852015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5586
5587 * c-parser.c (c_parser_omp_clause_name)
5588 (c_parser_oacc_all_clauses): Alphabetical sorting.
5589
657e4e47
JJ
55902015-12-02 Jakub Jelinek <jakub@redhat.com>
5591
5592 PR c/68533
5593 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5594 for diagnostics.
5595
37d5ad46
JB
55962015-12-01 Julian Brown <julian@codesourcery.com>
5597 Cesar Philippidis <cesar@codesourcery.com>
5598 James Norris <James_Norris@mentor.com>
5599
5600 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5601 (c_parser_oacc_clause_use_device): New function.
5602 (c_parser_oacc_all_clauses): Add use_device support.
5603 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5604 (c_parser_oacc_host_data): New function.
5605 (c_parser_omp_construct): Add host_data support.
5606 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5607 * c-typeck.c (c_finish_oacc_host_data): New function.
5608 (c_finish_omp_clauses): Add use_device support.
5609
a4850ce9
JH
56102015-11-29 Jan Hubicka <hubicka@ucw.cz>
5611
5612 PR c/67106
5613 * c-decl.c: Set TYPE_PACKED in variants.
5614
b58d3df2
ML
56152015-11-27 Martin Liska <mliska@suse.cz>
5616
5617 PR c++/68312
5618 * c-array-notation.c (fix_builtin_array_notation_fn):
5619 Use release_vec_vec instead of vec::release.
5620 (build_array_notation_expr): Likewise.
5621 (fix_conditional_array_notations_1): Likewise.
5622 (fix_array_notation_expr): Likewise.
5623 (fix_array_notation_call_expr): Likewise.
5624
aec17bfe
JJ
56252015-11-27 Jakub Jelinek <jakub@redhat.com>
5626
5627 PR c/63326
5628 * c-parser.c (c_parser_compound_statement_nostart): If
5629 last_label is true, use pragma_stmt instead of pragma_compound
5630 as second c_parser_pragma argument.
5631 (c_parser_omp_ordered, c_parser_omp_target_update,
5632 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5633 false as second argument to c_parser_skip_to_pragma_eol after
5634 diagnosing standalone directives used in pragma_stmt context.
5635
688c4de0
IV
56362015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5637
5638 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5639 with "if (ENABLE_OFFLOADING)".
5640
cbd03aee
DM
56412015-11-23 David Malcolm <dmalcolm@redhat.com>
5642
5643 PR objc/68438
5644 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5645 for various Objective-C constructs: Class.name syntax,
5646 @selector(), @protocol(), @encode(), and [] message syntax.
5647
a87a86e1
DM
56482015-11-20 David Malcolm <dmalcolm@redhat.com>
5649
5650 PR 62314
5651 * c-typeck.c (should_suggest_deref_p): New function.
5652 (build_component_ref): Special-case POINTER_TYPE when
5653 generating a "not a structure of union" error message, and
5654 suggest a "->" rather than a ".", providing a fix-it hint.
5655
8ece8dfb
DM
56562015-11-19 David Malcolm <dmalcolm@redhat.com>
5657
5658 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5659 candidate into a new function, find_closest_identifier.
5660
433068cc
MP
56612015-11-19 Marek Polacek <polacek@redhat.com>
5662
5663 PR c/68412
5664 * c-typeck.c (parser_build_binary_op): Properly handle
5665 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5666
bef08b71
DM
56672015-11-17 David Malcolm <dmalcolm@redhat.com>
5668
5669 * c-parser.c (set_c_expr_source_range): Bulletproof both
5670 overloaded implementations against NULL expr->value.
5671 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5672 values.
5673 (c_parser_unary_expression): Likewise when handling addresses of
5674 labels.
5675 (c_parser_postfix_expression): Likewise for statement expressions,
5676 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5677 __builtin_va_arg, and for __builtin_offset_of.
5678 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5679 src_range using the range of the braced initializer.
5680 (c_parser_transaction_expression): Set src_range for "ret" to a
5681 sane pair of values.
5682
fff77217
KY
56832015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5684
5685 * c-parser.c (c_finish_omp_declare_simd): Look for
5686 "simd" attribute as well. Update error message.
5687
1d899da2
TS
56882015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5689
5690 * c-parser.c (c_parser_omp_declare_target): Adjust.
5691
e4606348
JJ
56922015-11-14 Jakub Jelinek <jakub@redhat.com>
5693
5694 * c-typeck.c (c_finish_omp_clauses): Don't mark
5695 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5696
3e636daf
MP
56972015-11-14 Marek Polacek <polacek@redhat.com>
5698
5699 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5700 * c-typeck.c: Likewise.
5701
ebedc9a3
DM
57022015-11-13 David Malcolm <dmalcolm@redhat.com>
5703
5704 * c-decl.c (warn_defaults_to): Pass line_table to
5705 rich_location ctor.
5706 * c-errors.c (pedwarn_c99): Likewise.
5707 (pedwarn_c90): Likewise.
5708 * c-parser.c (set_c_expr_source_range): New functions.
5709 (c_token::get_range): New method.
5710 (c_token::get_finish): New method.
5711 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5712 based on the range from the start of the LHS to the end of the
5713 RHS.
5714 (c_parser_conditional_expression): Likewise, based on the range
5715 from the start of the cond.value to the end of exp2.value.
5716 (c_parser_binary_expression): Call set_c_expr_source_range on
5717 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5718 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5719 based on the cast_loc through to the end of the expr.
5720 (c_parser_unary_expression): Likewise, based on the
5721 op_loc through to the end of op.
5722 (c_parser_sizeof_expression) Likewise, based on the start of the
5723 sizeof token through to either the closing paren or the end of
5724 expr.
5725 (c_parser_postfix_expression): Likewise, using the token range,
5726 or from the open paren through to the close paren for
5727 parenthesized expressions.
5728 (c_parser_postfix_expression_after_primary): Likewise, for
5729 various kinds of expression.
5730 * c-tree.h (struct c_expr): Add field "src_range".
5731 (c_expr::get_start): New method.
5732 (c_expr::get_finish): New method.
5733 (set_c_expr_source_range): New decls.
5734 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5735 on ret for prefix unary ops.
5736 (parser_build_binary_op): Likewise, running from the start of
5737 arg1.value through to the end of arg2.value.
5738
ec8b536f
MP
57392015-11-13 Marek Polacek <polacek@redhat.com>
5740
5741 PR c/68320
5742 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5743
277fe616
DM
57442015-11-13 David Malcolm <dmalcolm@redhat.com>
5745
5746 * c-typeck.c: Include spellcheck.h.
5747 (lookup_field_fuzzy_find_candidates): New function.
5748 (lookup_field_fuzzy): New function.
5749 (build_component_ref): If the field was not found, try using
5750 lookup_field_fuzzy and potentially offer a suggestion.
5751
6e232ba4
JN
57522015-11-12 James Norris <jnorris@codesourcery.com>
5753 Joseph Myers <joseph@codesourcery.com>
5754
5755 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5756 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5757 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5758 and PRAGMA_OMP_CLAUSE_LINK.
5759 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5760 and PRAGMA_OACC_CLAUSE_LINK.
5761 (OACC_DECLARE_CLAUSE_MASK): New definition.
5762 (c_parser_oacc_declare): New function.
5763
9be4f715
MP
57642015-11-12 Marek Polacek <polacek@redhat.com>
5765
5766 PR c/67784
5767 * c-parser.c (c_parser_for_statement): Reclassify the token in
5768 a correct scope.
5769
e78bede6
MP
57702015-11-11 Marek Polacek <polacek@redhat.com>
5771
5772 PR c/68107
5773 PR c++/68266
5774 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5775 checking the size of an array.
5776
69f293c9
AM
57772015-11-11 Andrew MacLeod <amacleod@redhat.com>
5778
5779 * c-array-notation.c: Remove unused header files.
5780 * c-aux-info.c: Likewise.
5781 * c-convert.c: Likewise.
5782 * c-decl.c: Likewise.
5783 * c-errors.c: Likewise.
5784 * c-lang.c: Likewise.
5785 * c-objc-common.c: Likewise.
5786 * c-parser.c: Likewise.
5787 * c-typeck.c: Likewise.
5788 * gccspec.c: Likewise.
5789
3a40d81d
NS
57902015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5791 Cesar Philippidis <cesar@codesourcery.com>
5792 James Norris <jnorris@codesourcery.com>
5793 Julian Brown <julian@codesourcery.com>
5794 Nathan Sidwell <nathan@codesourcery.com>
5795
3a40d81d
NS
5796 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5797 routine arg.
5798 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5799 (c_parser_pragma): Parse 'acc routine'.
5800 (OACC_ROUTINE_CLAUSE_MARK): Define.
5801 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5802
fc402eec
AA
58032015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5804
5805 PR debug/67192
5806 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5807 location of the backward-goto to the start of the loop body.
5808
f6b0b3db
AA
58092015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5810
5811 PR debug/67192
5812 * c-parser.c (c_parser_while_statement): Finish the loop before
5813 parsing ahead for misleading indentation.
5814 (c_parser_for_statement): Likewise.
5815
ee45a32d
EB
58162015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5817
5818 * c-decl.c (finish_struct): If the structure has reverse storage
5819 order, rewrite the type of array fields with scalar component. Call
5820 maybe_apply_pragma_scalar_storage_order on entry.
5821 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5822 errors on bit-fields and reverse SSO here and not...
5823 (c_mark_addressable): ...here.
5824 (output_init_element): Adjust call to initializer_constant_valid_p.
5825 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5826
8a645150
DM
58272015-11-06 David Malcolm <dmalcolm@redhat.com>
5828
5829 * c-decl.c (warn_defaults_to): Update for change in signature
5830 of diagnostic_set_info.
5831 * c-errors.c (pedwarn_c99): Likewise.
5832 (pedwarn_c90): Likewise.
5833 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5834 for textinfo::set_location.
5835
7a5e4956
CP
58362015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5837 Thomas Schwinge <thomas@codesourcery.com>
5838 James Norris <jnorris@codesourcery.com>
5839
5840 * c-parser.c (c_parser_omp_clause_name): Add support for
5841 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5842 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5843 default(none) in OpenACC.
5844 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5845 arguments.
5846 (c_parser_oacc_clause_tile): New function.
5847 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5848 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5849 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5850 TILE}.
5851 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5852 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5853 FIRSTPRIVATE}.
5854 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5855 (c_parser_oacc_update): Update the error message for missing clauses.
5856 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5857 and OMP_CLAUSE_INDEPENDENT.
5858
bfcfbfa0
MP
58592015-11-05 Marek Polacek <polacek@redhat.com>
5860
5861 PR c/68090
5862 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5863 deal with pre-evaluation on invalid types.
5864
e01d41e5
JJ
58652015-11-05 Jakub Jelinek <jakub@redhat.com>
5866 Ilya Verbin <ilya.verbin@intel.com>
5867
5868 * c-parser.c: Include context.h and gimple-expr.h.
5869 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5870 monotonic together with nonmonotonic.
5871 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5872 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5873 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5874 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5875 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5876 expressions on combined target teams before the target.
5877 (c_parser_omp_declare_target): If decl has "omp declare target" or
5878 "omp declare target link" attribute, and cgraph or varpool node already
5879 exists, then set corresponding flags. Call c_finish_omp_clauses
5880 in the parenthesized extended-list syntax case.
5881 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5882 declare target.
5883 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5884 on OMP_CLAUSE_REDUCTION array sections.
5885 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5886 into the constant offset, or for variable low-bound using
5887 POINTER_PLUS_EXPR. For structure element based array sections use
5888 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5889 (c_finish_omp_clauses): Drop generic_field_head, structure
5890 elements are now always mapped even as array section bases,
5891 diagnose same var in data sharing and mapping clauses. Diagnose if
5892 linear step on declare simd is neither a constant nor a uniform
5893 parameter. Look through POINTER_PLUS_EXPR for array section
5894 reductions. Diagnose the same var or function appearing multiple
5895 times on the same directive. Fix up wording for the to clause if t
5896 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5897 modifier on kinds other than dynamic or guided or nonmonotonic
5898 modifier together with ordered clause.
5899
4bf9e5a8
TS
59002015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5901 Chung-Lin Tang <cltang@codesourcery.com>
5902
5903 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5904
2adfab87
AM
59052015-10-29 Andrew MacLeod <amacleod@redhat.com>
5906
5907 * c-array-notation.c: Reorder #include's and remove duplicates.
5908 * c-aux-info.c: Likewise.
5909 * c-convert.c: Likewise.
5910 * c-decl.c: Likewise.
5911 * c-errors.c: Likewise.
5912 * c-lang.c: Likewise.
5913 * c-objc-common.c: Likewise.
5914 * c-parser.c: Likewise.
5915 * c-typeck.c: Likewise.
5916
e922069e
JW
59172015-10-26 Jim Wilson <jim.wilson@linaro.org>
5918
5919 PR debug/66068
5920 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5921 after calling build_qualified_type.
5922
765dd391
CP
59232015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5924 Thomas Schwinge <thomas@codesourcery.com>
5925 James Norris <jnorris@codesourcery.com>
5926 Joseph Myers <joseph@codesourcery.com>
5927 Julian Brown <julian@codesourcery.com>
5928 Bernd Schmidt <bschmidt@redhat.com>
5929
5930 * c-parser.c (c_parser_oacc_shape_clause): New.
5931 (c_parser_oacc_simple_clause): New.
5932 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5933 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5934
88bae6f4
TS
59352015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5936 James Norris <jnorris@codesourcery.com>
5937 Cesar Philippidis <cesar@codesourcery.com>
5938
5939 PR c/64765
5940 PR c/64880
5941 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5942 parameters, and handle these. Adjust all users.
5943 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5944 into...
5945 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5946 all users.
5947 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5948 declare functions.
5949 (c_finish_omp_construct): Declare function.
5950 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5951 Merge functions into...
5952 (c_finish_omp_construct): ... this new function.
5953
a8fc2579
RB
59542015-10-22 Richard Biener <rguenther@suse.de>
5955
5956 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5957 before folding a MINUS_EXPR.
5958
e9122ef6
MP
59592015-10-21 Marek Polacek <polacek@redhat.com>
5960
5961 PR c/68024
5962 * c-decl.c (start_function): Warn about vararg functions without
5963 a prototype.
5964
9f47c7e5
IE
59652015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5966
5967 * c-typeck.c (build_conditional_expr): Use boolean vector
5968 type for vector comparison.
5969 (build_vec_cmp): New.
5970 (build_binary_op): Use build_vec_cmp for comparison.
5971
fa60eeb9
MP
59722015-10-20 Marek Polacek <polacek@redhat.com>
5973
5974 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5975
2c7020eb
MP
59762015-10-20 Marek Polacek <polacek@redhat.com>
5977
5978 PR c/67964
5979 * c-parser.c (c_parser_attributes): Break out of the loop if the
5980 token after an attribute isn't a comma.
5981
d9a6bd32
JJ
59822015-10-13 Jakub Jelinek <jakub@redhat.com>
5983 Aldy Hernandez <aldyh@redhat.com>
5984
5985 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5986 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5987 (c_parser_omp_variable_list): Handle structure elements for
5988 map, to and from clauses. Handle array sections in reduction
5989 clause. Formatting fixes.
5990 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5991 if clause modifiers.
5992 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5993 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5994 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5995 c_parser_omp_clause_is_device_ptr): New functions.
5996 (c_parser_omp_clause_ordered): Parse optional parameter.
5997 (c_parser_omp_clause_reduction): Handle array reductions.
5998 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5999 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
6000 functions.
6001 (c_parser_omp_clause_linear): Parse linear clause modifiers.
6002 (c_parser_omp_clause_depend_sink): New function.
6003 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
6004 (c_parser_omp_clause_map): Parse release/delete map kinds and
6005 optional always modifier.
6006 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
6007 and c_finish_omp_clauses callers.
6008 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
6009 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
6010 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
6011 (OMP_CRITICAL_CLAUSE_MASK): Define.
6012 (c_parser_omp_critical): Parse critical clauses.
6013 (c_parser_omp_for_loop): Handle doacross loops, adjust
6014 c_finish_omp_for and c_finish_omp_clauses callers.
6015 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
6016 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
6017 (OMP_FOR_CLAUSE_MASK): Add linear clause.
6018 (c_parser_omp_for): Disallow ordered clause when combined with
6019 distribute. Disallow linear clause when combined with distribute
6020 and not combined with simd.
6021 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
6022 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
6023 parse clauses and if depend clause is found, don't parse a body.
6024 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
6025 Allow target parallel without for after it.
6026 (OMP_TASK_CLAUSE_MASK): Add priority clause.
6027 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
6028 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
6029 invalid kinds.
6030 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
6031 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
6032 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
6033 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
6034 functions.
6035 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
6036 defaultmap and is_device_ptr clauses.
6037 (c_parser_omp_target): Parse target parallel and target simd. Set
6038 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
6039 and target exit data. Diagnose invalid map kinds.
6040 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
6041 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
6042 construct.
6043 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
6044 &omp_priv.
6045 (OMP_TASKLOOP_CLAUSE_MASK): Define.
6046 (c_parser_omp_taskloop): New function.
6047 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
6048 handle PRAGMA_OMP_TASKLOOP.
6049 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
6050 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
6051 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
6052 Add IS_OMP argument, handle structure element bases, diagnose
6053 bitfields, pass IS_OMP recursively, diagnose known zero length
6054 array sections in depend clauses, handle array sections in reduction
6055 clause, diagnose negative length even for pointers.
6056 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
6057 types, pass IS_OMP down to handle_omp_array_sections_1, handle
6058 array sections in reduction clause, set
6059 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
6060 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
6061 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
6062 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
6063
21ba0cea
MP
60642015-10-06 Marek Polacek <polacek@redhat.com>
6065
6066 * c-parser.c (c_parser_statement_after_labels): Use
6067 protected_set_expr_location.
6068 (c_parser_omp_clause_num_gangs): Likewise.
6069 (c_parser_omp_clause_num_threads): Likewise.
6070 (c_parser_omp_clause_num_workers): Likewise.
6071 (c_parser_omp_clause_vector_length): Likewise.
6072 (c_parser_omp_clause_num_teams): Likewise.
6073 (c_parser_omp_clause_thread_limit): Likewise.
6074 * c-typeck.c (build_c_cast): Likewise.
6075 (c_cast_expr): Likewise.
6076
624d31fe
RS
60772015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6078
6079 * c-typeck.c (c_tree_equal): Use real_equal instead of
6080 REAL_VALUES_EQUAL.
6081
b8fd7909
JM
60822015-10-04 Jason Merrill <jason@redhat.com>
6083
6084 * c-parser.c (c_lex_one_token): Handle @synchronized.
6085 * c-decl.c (match_builtin_function_types): A declaration of a built-in
6086 can change whether the function is transaction_safe.
6087
1c7485af
MP
60882015-10-02 Marek Polacek <polacek@redhat.com>
6089
6090 PR c/67730
6091 * c-typeck.c (convert_for_assignment): Use the expansion point
6092 location throughout.
6093
3e3b8d63
MP
60942015-10-02 Marek Polacek <polacek@redhat.com>
6095
6096 PR c/64249
6097 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
6098 and pass it down to c_parser_if_statement.
6099 (c_parser_else_body): Add CHAIN parameter and pass it down to
6100 c_parser_statement_after_labels.
6101 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
6102 duplicated if-else-if conditions.
6103
aabef2de
MP
61042015-10-01 Marek Polacek <polacek@redhat.com>
6105
6106 * c-typeck.c (convert_for_assignment): Improve commentary.
6107
de8ddd5f
MP
61082015-09-30 Marek Polacek <polacek@redhat.com>
6109
6110 PR c/67730
6111 * c-typeck.c (c_finish_return): Use the expansion point location for
6112 certain "return with value" warnings.
6113
c4914de6
MLI
61142015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6115
6116 * c-parser.c (pragma_lex): Add loc argument.
6117
0e36f5c7
MP
61182015-09-15 Marek Polacek <polacek@redhat.com>
6119
6120 PR c/67580
6121 * c-decl.c (tag_exists_p): New function.
6122 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
6123 struct/union/enum keywords are missing.
6124 * c-tree.h (tag_exists_p): Declare.
6125
2f3bb934
MP
61262015-09-15 Marek Polacek <polacek@redhat.com>
6127
6128 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
6129 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
6130 Return NULL_TREE instead of 0.
6131 (lookup_name): Return NULL_TREE instead of 0.
6132 (lookup_name_in_scope): Likewise.
6133 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
6134 (parser_xref_tag): Use false instead of 0.
6135 (start_struct): Use true instead of 1.
6136 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
6137
aa256c4a
MP
61382015-09-14 Marek Polacek <polacek@redhat.com>
6139
6140 * c-typeck.c (set_nonincremental_init_from_string): Use
6141 HOST_WIDE_INT_M1U when shifting a negative value.
6142
dbb68221
MW
61432015-09-09 Mark Wielaard <mjw@redhat.com>
6144
6145 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
6146 parm against NULL.
6147
a8a098ac
JJ
61482015-09-10 Jakub Jelinek <jakub@redhat.com>
6149
6150 PR c/67502
6151 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
6152 into OMP_FOR_PRE_BODY rather than before the loop.
6153
f4b189d5
JJ
61542015-09-09 Jakub Jelinek <jakub@redhat.com>
6155
0bb99c11
JJ
6156 PR c/67501
6157 * c-parser.c (c_parser_oacc_all_clauses,
6158 c_parser_omp_all_clauses): Remove invalid clause from
6159 list of clauses even if parser->error is set.
6160
fce5e5e3
JJ
6161 PR c/67500
6162 * c-parser.c (c_parser_omp_clause_aligned,
6163 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
6164 test for errors.
6165 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
6166 error_mark_node.
6167
f4b189d5
JJ
6168 PR c/67495
6169 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
6170 instead of c_parser_unary_expression. If the result is !lvalue_p,
6171 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
6172
b2aaf235
MP
61732015-09-04 Marek Polacek <polacek@redhat.com>
6174
6175 PR sanitizer/67279
6176 * c-typeck.c (build_binary_op): Don't instrument static initializers.
6177
1807ffc1
MS
61782015-09-03 Martin Sebor <msebor@redhat.com>
6179
6180 PR c/66516
8b652e65
JJ
6181 * c-typeck.c (convert_arguments, parser_build_unary_op,
6182 build_conditional_expr, c_cast_expr, convert_for_assignment,
6183 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
6184 reject_gcc_builtin.
6185 (c_decl_implicit): Define.
6186
d04ff417
MP
61872015-09-02 Marek Polacek <polacek@redhat.com>
6188
6189 PR c/67432
6190 * c-parser.c (c_parser_enum_specifier): Give a better error for
6191 an empty enum.
6192
a79683d5
TS
61932015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6194
6195 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
6196
191a6b94
MP
61972015-08-12 Marek Polacek <polacek@redhat.com>
6198
6199 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
6200 LOC to it.
6201
420a9d9b
MP
62022015-08-03 Marek Polacek <polacek@redhat.com>
6203
6204 PR c/67088
6205 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
6206 Use it.
6207 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
6208
992118a1
PP
62092015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6210
6211 * c-parser.c (c_parser_if_body): Take token_indent_info
6212 argument. Call warn_for_misleading_indentation even when the
6213 body is a semicolon. Extract token_indent_infos corresponding
6214 to the guard, body and next tokens. Adjust call to
6215 warn_for_misleading_indentation accordingly.
6216 (c_parser_else_body): Likewise.
6217 (c_parser_if_statement): Likewise.
6218 (c_parser_while_statement): Likewise.
6219 (c_parser_for_statement): Likewise.
6220
46308474
LFSM
62212015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
6222 Manuel López-Ibáñez <manu@gcc.gnu.org>
6223
6224 * c-decl.c (get_parm_info): Remove static var. Update warning
6225 message.
6226
05b28fd6
MP
62272015-07-27 Marek Polacek <polacek@redhat.com>
6228
6229 PR c++/66555
6230 PR c/54979
6231 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
6232
451b5e48
MP
62332015-07-20 Marek Polacek <polacek@redhat.com>
6234
6235 PR c++/55095
6236 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
6237 (build_binary_op): Warn about left shift overflows.
6238
1916bcb5
AM
62392015-07-09 Andrew MacLeod <amacleod@redhat.com>
6240
6241 * c-array-notation.c: Adjust includes for flags.h changes.
6242 * c-objc-common.c: Likewise.
6243
c7131fb2
AM
62442015-07-07 Andrew MacLeod <amacleod@redhat.com>
6245
6246 * c-array-notation.c: Adjust includes.
6247 * c-aux-info.c: Likewise.
6248 * c-convert.c: Likewise.
6249 * c-decl.c: Likewise.
6250 * c-errors.c: Likewise.
6251 * c-lang.c: Likewise.
6252 * c-objc-common.c: Likewise.
6253 * c-parser.c: Likewise.
6254 * c-typeck.c: Likewise.
6255
da2e71c9
MLI
62562015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6257
6258 PR fortran/66605
6259 * c-decl.c (finish_function): Call do_warn_unused_parameter.
6260
b155cfd9
MP
62612015-06-29 Marek Polacek <polacek@redhat.com>
6262
6263 PR c/66322
6264 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
6265 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
6266 about -Wswitch-bool here.
6267 (do_case): Update c_add_case_label call.
6268 (c_finish_case): Update c_do_switch_warnings call.
6269
31521951
MP
62702015-06-27 Marek Polacek <polacek@redhat.com>
6271
6272 * c-typeck.c: Use VECTOR_TYPE_P throughout.
6273
22d03525
MP
62742015-06-26 Marek Polacek <polacek@redhat.com>
6275
6276 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6277 INDIRECT_REF_P.
6278 * c-typeck.c (array_to_pointer_conversion): Likewise.
6279 (build_unary_op): Likewise.
6280 (c_finish_return): Likewise.
6281
f0889939
AM
62822015-06-25 Andrew MacLeod <amacleod@redhat.com>
6283
6284 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6285 * c-parser.c: Likewise.
6286
8d67ee55
RS
62872015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6288
6289 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6290 instead of pointer_hash.
6291 (detect_field_duplicates): Likewise.
6292
0ae9bd27
MP
62932015-06-25 Marek Polacek <polacek@redhat.com>
6294
6295 * c-array-notation.c: Use VAR_P throughout.
6296 * c-decl.c: Likewise.
6297 * c-objc-common.c: Likewise.
6298 * c-parser.c: Likewise.
6299 * c-typeck.c: Likewise.
6300
62f9079a
MP
63012015-06-25 Marek Polacek <polacek@redhat.com>
6302
6303 * c-decl.c: Use is_global_var throughout.
6304 * c-parser.c: Likewise.
6305 * c-typeck.c: Likewise.
6306
abb226c9
AM
63072015-06-17 Andrew MacLeod <amacleod@redhat.com>
6308
6309 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6310 * c-aux-info.c: Likewise.
6311 * c-convert.c: Likewise.
6312 * c-decl.c: Likewise.
6313 * c-errors.c: Likewise.
6314 * c-lang.c: Likewise.
6315 * c-objc-common.c: Likewise.
6316 * c-parser.c: Likewise.
6317 * c-typeck.c: Likewise.
6318
8cbababc
JH
63192015-06-11 Jan Hubicka <hubicka@ucw.cz>
6320
6321 PR middle-end/66325
6322 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6323 variants.
6324
a0349665
PMR
63252015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6326
6327 * c-decl.c (pop_scope): Register the main translation unit
6328 through the new debug hook.
6329
13fdf2e2
AM
63302015-06-08 Andrew MacLeod <amacleod@redhat.com>
6331
6332 * c-array-notation.c : Adjust include files.
6333 * c-aux-info.c : Likewise.
6334 * c-convert.c : Likewise.
6335 * c-decl.c : Likewise.
6336 * c-errors.c : Likewise.
6337 * c-lang.c : Likewise.
6338 * c-lang.h : Likewise.
6339 * c-objc-common.c : Likewise.
6340 * c-parser.c : Likewise.
6341 * c-typeck.c : Likewise.
6342
d7438551
AH
63432015-06-05 Aldy Hernandez <aldyh@redhat.com>
6344
6345 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6346 immediately clobber it.
6347 (c_write_global_declarations_1): Remove call to
6348 check_global_declaration_1.
6349 (c_write_global_declarations_2): Remove.
6350 (c_write_final_cleanups): Rename from c_write_global_declarations.
6351 Remove call to finalize_compilation_unit.
6352 Remove calls to debugging hooks.
6353 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6354 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6355 * c-tree.h: Remove c_write_global_declarations.
6356
ecb9f223
AM
63572015-06-04 Andrew MacLeod <amacleod@redhat.com>
6358
6359 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6360 * c-aux-info.c: Likewise.
6361 * c-convert.c: Likewise.
6362 * c-decl.c: Likewise.
6363 * c-errors.c: Likewise.
6364 * c-lang.c: Likewise.
6365 * c-objc-common.c: Likewise.
6366 * c-parser.c: Likewise.
6367 * c-typeck.c: Likewise.
6368
9482b620
MP
63692015-06-04 Marek Polacek <polacek@redhat.com>
6370
6371 PR c/66341
6372 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6373 it is a lvalue.
6374
bc51ace3
PK
63752015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6376
6377 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6378 Warn for empty struct.
6379 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6380
ea5b45b6
AT
63812015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6382
6383 * c-decl.c (start_function): Call plugin before parsing.
6384 (finish_function): Call plugin after parsing.
6385
c2d47482
PK
63862015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6387
6388 PR c/49551
6389 * c-decl.c (merge_decls): Merge DECL_COMMON.
6390
a95492ab
JW
63912015-05-22 Jim Wilson <jim.wilson@linaro.org>
6392
6393 * Make-lang.in (check_gcc_pallelize): Define.
6394
fd5c817a
MP
63952015-05-22 Marek Polacek <polacek@redhat.com>
6396
6397 PR c/47043
6398 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6399 attributes.
6400
c7b70a3c
MP
64012015-05-21 Marek Polacek <polacek@redhat.com>
6402
6403 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6404 DECL_BUILT_IN.
6405
21b634ae
MP
64062015-05-20 Marek Polacek <polacek@redhat.com>
6407
6408 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6409 * c-typeck.c: Likewise.
6410
296a8c2f
MP
64112015-05-19 Marek Polacek <polacek@redhat.com>
6412
6413 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6414
41b37d5e
JJ
64152015-05-19 Jakub Jelinek <jakub@redhat.com>
6416
6417 PR middle-end/66199
6418 * c-parser.c (c_parser_omp_for_loop): Don't add
6419 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6420 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6421 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6422 constructs.
6423
fab27f52
MM
64242015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6425
6426 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 6427 swaps.
fab27f52 6428
40de31cf
MLI
64292015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6430
6431 PR fortran/44054
6432 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6433 accessor function.
6434
3aa3c9fc
MP
64352015-05-14 Marek Polacek <polacek@redhat.com>
6436
6437 PR c/66066
6438 PR c/66127
6439 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6440 rather than with 0.
6441
c3388e62
DM
64422015-05-12 David Malcolm <dmalcolm@redhat.com>
6443
6444 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6445 to add a call to warn_for_misleading_indentation.
6446 (c_parser_else_body): Likewise, adding param "else_loc".
6447 (c_parser_if_statement): Check for misleading indentation.
6448 (c_parser_while_statement): Likewise.
6449 (c_parser_for_statement): Likewise.
6450
755e528f
MP
64512015-05-08 Marek Polacek <polacek@redhat.com>
6452
6453 PR c/64918
6454 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6455 (output_init_element): Likewise.
6456
0173bd2a
MP
64572015-05-07 Marek Polacek <polacek@redhat.com>
6458
6459 PR c/65179
6460 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6461 value.
6462
9babc352
MP
64632015-04-30 Marek Polacek <polacek@redhat.com>
6464
6465 * c-typeck.c (set_init_label): Call error_at instead of error and
6466 pass LOC to it.
6467
ac9f18db
MP
6468 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6469 the type of a decl.
6470
ec3fba51
MP
6471 * c-typeck.c (c_build_va_arg): Clarify the error message.
6472
b811915d
TS
64732015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6474
6475 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6476 OMP_STANDALONE_CLAUSES.
6477
f3075008
MP
64782015-04-28 Marek Polacek <polacek@redhat.com>
6479
6480 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6481
4e81b788
MP
64822015-04-28 Marek Polacek <polacek@redhat.com>
6483
6484 PR c/65901
6485 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6486
6c1db78e
MP
64872015-04-25 Marek Polacek <polacek@redhat.com>
6488
6489 PR c/52085
6490 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6491 attribute.
6492
5c4abbb8
MP
64932015-04-23 Marek Polacek <polacek@redhat.com>
6494
6495 PR c/65345
6496 * c-decl.c (set_labels_context_r): New function.
6497 (store_parm_decls): Call it via walk_tree_without_duplicates.
6498 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6499 instead of create_tmp_var. Build TARGET_EXPR instead of
6500 COMPOUND_EXPR.
6501 (build_atomic_assign): Use create_tmp_var_raw instead of
6502 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6503
06aca1d5
IV
65042015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6505
6506 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6507 (c_parser_omp_target_update): Add missed %> to error_at ().
6508
8fba1830
BRF
65092015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6510
6511 PR target/55143
6512 * c-decl.c (c_default_pointer_mode): Remove definition.
6513 * c-tree.h (c_default_pointer_mode): Remove declaration.
6514
62021f64
TB
65152015-03-27 Tobias Burnus <burnus@net-b.de>
6516
6517 PR c/65586
6518 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6519 error out.
6520 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6521 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6522 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6523
9b65e171
JJ
65242015-03-19 Jakub Jelinek <jakub@redhat.com>
6525
6526 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6527 attribute for DECL_EXTERNAL VAR_DECLs.
6528
17958621
JJ
65292015-03-11 Jakub Jelinek <jakub@redhat.com>
6530
6531 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6532 argument.
6533
7ccb1a11
JJ
65342015-03-10 Jakub Jelinek <jakub@redhat.com>
6535
6536 PR c/65120
6537 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6538 before preparing arguments to warn_logical_not_parentheses.
6539
01177669
JJ
65402015-03-09 Jakub Jelinek <jakub@redhat.com>
6541
6542 PR c/65120
6543 * c-typeck.c (parser_build_binary_op): Don't warn for
6544 !!x == y or !b == y where b is _Bool.
6545
802ac282
MP
65462015-03-09 Marek Polacek <polacek@redhat.com>
6547
6548 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6549 * c-decl.c (grokdeclarator): Likewise.
6550 * c-typeck.c (build_binary_op): Likewise.
6551
e5165b60
MP
65522015-02-27 Marek Polacek <polacek@redhat.com>
6553
6554 PR c/65228
6555 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6556
065d214c
MP
65572015-02-14 Marek Polacek <polacek@redhat.com>
6558
6559 PR c/64768
6560 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6561 declared through a typedef name.
6562
e5d9235b
MP
65632015-02-13 Marek Polacek <polacek@redhat.com>
6564
6565 PR c/65050
6566 * c-decl.c (grokdeclarator): Print also the type when giving
6567 the error message about array's incomplete element type.
6568
fa01ffcc
JJ
65692015-02-11 Jakub Jelinek <jakub@redhat.com>
6570
6571 PR c/64824
6572 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6573 check in the POP macro.
6574
c3e38a03
MP
65752015-02-09 Marek Polacek <polacek@redhat.com>
6576
6577 PR c/64856
6578 * c-typeck.c (process_init_element): Don't always wrap
6579 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6580 initializing a range of elements.
6581
4886ec8e
JJ
65822015-02-04 Jakub Jelinek <jakub@redhat.com>
6583
6584 PR c/64824
6585 PR c/64868
6586 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6587
c3e38a03 65882015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
6589
6590 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6591 processing enum declaration.
6592
7b33f0c8
MP
65932015-01-29 Marek Polacek <polacek@redhat.com>
6594
6595 PR c/64709
6596 * c-typeck.c (pop_init_level): If constructor_elements has
6597 exactly one element with integer_zerop value, set constructor_zeroinit
6598 to 1. Remove braces around warning_init call.
6599
dea63e49
JJ
66002015-01-27 Jakub Jelinek <jakub@redhat.com>
6601
6602 PR c/64766
6603 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6604 of FUNCTION_DECLs with error_mark_node.
6605
d38f7dce
JJ
66062015-01-26 Jakub Jelinek <jakub@redhat.com>
6607
6608 PR c/64778
6609 * c-typeck.c (convert_arguments): Return -1 if there are
6610 error_args, even if we've diagnosed too many arguments.
6611
cbf5d0e7
RB
66122015-01-21 Richard Biener <rguenther@suse.de>
6613
6614 PR middle-end/64313
6615 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6616 for builtins the user declared correctly.
6617
41dbbb37
TS
66182015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6619 Bernd Schmidt <bernds@codesourcery.com>
6620 Cesar Philippidis <cesar@codesourcery.com>
6621 James Norris <jnorris@codesourcery.com>
6622 Jakub Jelinek <jakub@redhat.com>
6623 Ilmir Usmanov <i.usmanov@samsung.com>
6624
6625 * c-parser.c: Include "gomp-constants.h".
6626 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6627 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6628 Use OMP_CLAUSE_SET_MAP_KIND.
6629 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6630 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6631 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6632 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6633 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6634 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6635 "copyout", "create", "delete", "deviceptr", "gang", "host",
6636 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6637 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6638 "present_or_create", "pcreate", "seq", "self", "vector",
6639 "vector_length", "wait", "worker".
6640 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6641 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6642 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6643 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6644 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6645 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6646 (c_parser_oacc_data_clause_deviceptr)
6647 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6648 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6649 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6650 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6651 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6652 (c_parser_oacc_parallel, c_parser_oacc_update)
6653 (c_parser_oacc_wait): New functions.
6654 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6655 (c_finish_oacc_data): New prototypes.
6656 * c-typeck.c: Include "gomp-constants.h".
6657 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6658 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6659 OMP_CLAUSE_SET_MAP_KIND.
6660 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6661 (c_finish_oacc_data): New functions.
6662 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6663 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6664 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6665 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6666 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6667 GOMP_MAP_FORCE_DEVICEPTR.
6668
adfac8df
JJ
66692015-01-09 Michael Collison <michael.collison@linaro.org>
6670
6671 * c-array-notation.c: Include hash-set.h, machmode.h,
6672 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6673 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6674 * c-aux-info.c: Ditto.
6675 * c-convert.c: Ditto.
6676 * c-decl.c: Ditto.
6677 * c-errors.c: Ditto.
6678 * c-lang.c: Dittoxs.
6679 * c-objc-common.c: Ditto.
6680 * c-parser.c: Ditto.
6681 * c-typeck.c: Include hash-set.h, machmode.h,
6682 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6683 fold-const.h, wide-int.h, inchash.h, real.h and
6684 fixed-value.h due to flattening of tree.h.
6685
2cc901dc
MP
66862015-01-07 Marek Polacek <polacek@redhat.com>
6687
6688 PR c/64417
6689 * c-typeck.c (process_init_element): Disallow initialization of
6690 a flexible array member with a string constant if the structure
6691 is in an array.
6692
5624e564
JJ
66932015-01-05 Jakub Jelinek <jakub@redhat.com>
6694
e5341100
JJ
6695 PR sanitizer/64344
6696 * c-typeck.c (convert_for_assignment, c_finish_return): For
6697 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6698 types also set in_late_binary_op around convert call.
6699 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6700 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6701 result on expr as last argument to ubsan_instrument_float_cast,
6702 if in_late_binary_op, don't use c_save_expr but save_expr.
6703
5624e564
JJ
6704 Update copyright years.
6705
5bd012f8
MP
67062015-01-05 Marek Polacek <polacek@redhat.com>
6707
6708 PR c/64423
6709 * c-typeck.c (build_array_ref): Pass loc down to
6710 warn_array_subscript_with_type_char.
6711
3f8257db 67122014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6713
6714 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 6715 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 6716 element type.
8e745a17 6717 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 6718 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 6719 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 6720 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6721 to PEDWARN_FOR_QUALIFIERS.
768952be 6722
8f94a8c4
JJ
67232014-12-17 Jakub Jelinek <jakub@redhat.com>
6724
6725 PR sanitizer/64289
6726 * c-convert.c: Include ubsan.h.
6727 (convert): For real -> integral casts and
6728 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6729 instead instrument the float cast directly.
6730
b731b390
JJ
67312014-11-29 Jakub Jelinek <jakub@redhat.com>
6732
6733 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6734 c_finish_stmt_expr): Remove NULL last argument from
6735 create_tmp_var_raw and create_tmp_var calls.
6736 * c-array-notation.c (fix_builtin_array_notation_fn,
6737 build_array_notation_expr, fix_conditional_array_notations_1,
6738 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6739
541e35a6
MP
67402014-11-28 Marek Polacek <polacek@redhat.com>
6741
6742 PR c/63862
6743 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6744 convert the right operand to integer type.
6745
b286be94
MP
67462014-11-25 Marek Polacek <polacek@redhat.com>
6747
6748 PR c/63877
6749 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6750 for inline functions.
6751
aa7da51a
JJ
67522014-11-21 Jakub Jelinek <jakub@redhat.com>
6753
6754 PR target/63764
6755 * c-typeck.c (build_array_ref): Adjust
6756 convert_vector_to_pointer_for_subscript caller. If it returns true,
6757 call non_lvalue_loc on the result.
6758
d876207f
RB
67592014-11-11 Richard Biener <rguenther@suse.de>
6760
6761 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6762 to true.
6763
e5e44252
AK
67642014-11-10 Andi Kleen <ak@linux.intel.com>
6765
6766 PR c/60804
6767 * c-parser.c (c_parser_statement_after_labels): Call
6768 check_no_cilk.
6769 (c_parser_if_statement): Dito.
6770 (c_parser_switch_statement): Dito.
6771 (c_parser_while_statement): Dito.
6772 (c_parser_do_statement): Dito.
6773 (c_parser_for_statement): Dito.
6774 * c-typeck.c (c_finish_loop): Dito.
6775
13c21655
PC
67762014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6777
6778 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6779 OPT_Wshift_count_overflow in the warnings.
6780
2d51fcef
MP
67812014-10-30 Marek Polacek <polacek@redhat.com>
6782
6783 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6784 print the stripped version as well, if they're not the same.
6785
ef4bddc2
RS
67862014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6787
6788 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6789 machine_mode.
6790
c582198b
AM
67912014-10-28 Andrew MacLeod <amacleod@redhat.com>
6792
6793 * c-decl.c: Adjust include files.
6794 * c-parser.c: Ditto.
6795
ddc8de03
PM
67962014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6797 Tom Tromey <tromey@redhat.com>
6798
6799 * c-tree.h (enum c_oracle_request): New.
6800 (c_binding_oracle_function): New typedef.
6801 (c_binding_oracle, c_pushtag, c_bind): Declare.
6802 * c-decl.c (c_binding_oracle): New global.
6803 (I_SYMBOL_CHECKED): New macro.
6804 (i_symbol_binding): New function.
6805 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6806 (I_TAG_CHECKED): New macro.
6807 (i_tag_binding): New function.
6808 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6809 (I_LABEL_CHECKED): New macro.
6810 (i_label_binding): New function.
6811 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6812 (c_print_identifier): Save and restore c_binding_oracle.
6813 (c_pushtag, c_bind): New functions.
6814
60393bbc
AM
68152014-10-27 Andrew MacLeod <amacleod@redhat.com>
6816
6817 * c-typeck.c: Adjust include files.
6818
d723bb7c
MLI
68192014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6820
6821 PR c++/53061
6822 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6823 initialization here...
6824 (c_initialize_diagnostics): ... but here. Set defaults after
6825 building pretty-printer.
6826
1bc5a451
MP
68272014-10-23 Marek Polacek <polacek@redhat.com>
6828
6829 PR c/63626
6830 * c-decl.c (pop_scope): Don't print warning in external_scope.
6831
4435bb92
MP
68322014-10-19 Marek Polacek <polacek@redhat.com>
6833
6834 PR c/63567
6835 * c-typeck.c (output_init_element): Allow initializing objects with
6836 static storage duration with compound literals even in C99 and add
6837 pedwarn for it.
6838
7278465e
MP
68392014-10-17 Marek Polacek <polacek@redhat.com>
6840
6841 PR c/63567
6842 * c-typeck.c (digest_init): Allow initializing objects with static
6843 storage duration with compound literals even in C99 and add pedwarn
6844 for it.
6845
d9b7be2e
MP
68462014-10-17 Marek Polacek <polacek@redhat.com>
6847
6848 PR c/63543
6849 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6850 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6851 error multiple times. Print the type.
6852
f406ae1f
MP
68532014-10-17 Marek Polacek <polacek@redhat.com>
6854
6855 PR c/63549
6856 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6857 type.
6858
92574c7c
MP
68592014-10-17 Marek Polacek <polacek@redhat.com>
6860
6861 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6862 (start_function): Use OPT_Wimplicit_int instead of 0.
6863 (store_parm_decls_oldstyle): Likewise.
6864
1bc4a978
MT
68652014-10-17 Alan Modra <amodra@gmail.com>
6866
6867 PR middle-end/61848
6868 * c-decl.c (merge_decls): Don't merge section name or tls model
6869 to newdecl symtab node, instead merge to olddecl. Override
6870 existing olddecl section name. Set tls_model for all thread-local
6871 vars, not just OMP thread-private ones. Remove incorrect comment.
6872
83685514
AM
68732014-10-16 Andrew MacLeod <amacleod@redhat.com>
6874
6875 * c-decl.c: Adjust include files.
6876
78a7c317
DD
68772014-10-14 DJ Delorie <dj@redhat.com>
6878
6879 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6880 (c_token_starts_typename): Check all __intN, not just __int128.
6881 (c_token_starts_declspecs): Likewise.
6882 (c_parser_declspecs): Likewise.
6883 (c_parser_attribute_any_word): Likewise.
6884 (c_parser_objc_selector): Likewise.
6885 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6886 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6887 is specified.
6888 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6889 __int128.
6890 (finish_declspecs): Likewise.
6891
74d98c1e
AB
68922014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6893
8e745a17 6894 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6895 the duplicate code.
8e745a17 6896 (c_parser_statement): Call the new function.
74d98c1e 6897
84937de2
MP
68982014-10-09 Marek Polacek <polacek@redhat.com>
6899
6900 PR c/63480
6901 * c-typeck.c (pop_init_level): Don't warn about initializing
6902 with { }.
6903
0382aaa0
MP
69042014-10-07 Marek Polacek <polacek@redhat.com>
6905
6906 PR c/59717
6907 * c-decl.c (header_for_builtin_fn): New function.
6908 (implicitly_declare): Suggest which header to include.
6909
7a0ca710
MP
69102014-10-07 Marek Polacek <polacek@redhat.com>
6911
6912 * c-convert.c (convert): Use error_operand_p.
6913 * c-typeck.c (require_complete_type): Likewise.
6914 (really_atomic_lvalue): Likewise.
6915 (digest_init): Likewise.
6916 (handle_omp_array_sections_1): Likewise.
6917
6bc8a126
MP
69182014-10-03 Marek Polacek <polacek@redhat.com>
6919
6920 PR c/63453
6921 * c-decl.c (pop_scope): Don't warn about "inline function declared
6922 but never defined" for functions marked with gnu_inline attribute.
6923
d90c0a59
JJ
69242014-09-25 Jakub Jelinek <jakub@redhat.com>
6925
6926 PR c++/63249
6927 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6928 on low_bound and length.
6929
083e891e
MP
69302014-09-24 Marek Polacek <polacek@redhat.com>
6931
6932 PR c/61405
6933 PR c/53874
6934 * c-parser.c: Don't define CPP_KEYWORD.
6935 (c_parser_switch_statement): Pass original type to c_finish_case.
6936 * c-tree.h (c_finish_case): Update declaration.
6937 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6938 conditionally to c_do_switch_warnings.
6939
8d95fe25
MP
69402014-09-03 Marek Polacek <polacek@redhat.com>
6941
6942 PR c/62024
6943 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6944 conversions.
6945
9a771876
JJ
69462014-09-02 Jakub Jelinek <jakub@redhat.com>
6947 Balaji V. Iyer <balaji.v.iyer@intel.com>
6948 Igor Zamyatin <igor.zamyatin@intel.com>
6949
6950 * c-parser.c (c_parser_cilk_for): New function.
6951 (c_parser_cilk_grainsize): Likewise.
6952 (c_get_temp_regvar): Likewise.
6953 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6954 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6955 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6956 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6957 case.
6958
b7679d96
CG
69592014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6960
6961 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6962 with using HOST_WIDE_INT without truncation to 'int'
6963
59ea0364
MP
69642014-08-22 Marek Polacek <polacek@redhat.com>
6965
6966 PR c++/62199
6967 * c-typeck.c (parser_build_binary_op): Adjust call to
6968 warn_logical_not_parentheses.
6969
671a475e
IZ
69702014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6971
6972 PR other/62008
6973 * c-parser.c (c_parser_array_notation): Check for correct
6974 type of an array added.
6975
04159acf
MP
69762014-08-19 Marek Polacek <polacek@redhat.com>
6977
6978 PR c++/62153
6979 * c-typeck.c (build_binary_op): If either operand of a comparison
6980 is a boolean expression, call maybe_warn_bool_compare.
6981
c77935ee
PP
69822014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6983
6984 PR c/45584
6985 * c-typeck.c (build_c_cast): Do a conversion even when the
6986 TYPE_MAIN_VARIANTs are the same.
6987
35aff4fb
MP
69882014-08-19 Marek Polacek <polacek@redhat.com>
6989
6990 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6991 pedwarn_c99 instead of pedwarn.
6992 (grokfield): Likewise.
6993 (warn_defaults_to): New function.
6994 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6995 Unconditionally call pedwarn_c99 instead of pedwarn.
6996 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6997 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6998 check flag_isoc11 before.
6999 * c-errors.c (pedwarn_c99): Change the return type to bool.
7000 Handle -Wc99-c11-compat.
7001 * c-parser.c (disable_extension_diagnostics): Handle
7002 warn_c99_c11_compat.
7003 (restore_extension_diagnostics): Likewise.
7004 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
7005 instead of pedwarn, don't check flag_isoc11 before.
7006 (c_parser_declspecs): Likewise.
7007 (c_parser_alignas_specifier): Likewise.
7008 (c_parser_alignof_expression): Likewise.
7009 (c_parser_generic_selection): Likewise.
7010 * c-tree.h (pedwarn_c99): Update declaration.
7011 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
7012 of pedwarn_c99.
7013
177cce46
MP
70142014-08-19 Marek Polacek <polacek@redhat.com>
7015
7016 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
7017 to pedwarn_c90.
7018 * c-errors.c: Include "opts.h".
7019 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
7020 * c-parser.c (disable_extension_diagnostics): Handle negative value
7021 of warn_c90_c99_compat, too.
7022 (restore_extension_diagnostics): Likewise.
7023 (c_parser_compound_statement_nostart): Pass
7024 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
7025
6dc99c33
MP
70262014-08-12 Marek Polacek <polacek@redhat.com>
7027
7028 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
7029 Add pedwarn.
7030 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
7031 Likewise.
7032 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
7033
3f8257db 70342014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
7035
7036 PR c/51849
7037 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
7038 Call pedwarn_c90 instead of pedwarn.
7039 (check_bitfield_type_and_width): Likewise.
7040 (declspecs_add_qual): Likewise.
7041 (declspecs_add_type): Likewise.
7042 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
7043 Adjust to only call pedwarn_c90.
7044 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
7045 pedwarn_c90 instead of pedwarn.
7046 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
7047 * c-parser.c (disable_extension_diagnostics): Handle
7048 warn_c90_c99_compat.
7049 (restore_extension_diagnostics): Likewise.
7050 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
7051 pedwarn_c90 instead of pedwarn.
7052 (c_parser_initelt): Likewise.
7053 (c_parser_postfix_expression): Likewise.
7054 (c_parser_postfix_expression_after_paren_type): Likewise.
7055 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
7056 * c-tree.h: Fix formatting.
7057 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
7058 pedwarn_c90 instead of pedwarn.
7059
9f25a338
TS
70602014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7061
7062 * c-typeck.c: Remove include of pointer-set.h.
7063
044331a8
MP
70642014-08-07 Marek Polacek <polacek@redhat.com>
7065
7066 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
7067
b787e7a2
TS
70682014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7069
7070 * c-typeck.c: Use hash_map instead of pointer_map.
7071
6e2830c3
TS
70722014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7073
7074 * c-decl.c: Use hash_set instead of pointer_set.
7075
a7ee52fb
IZ
70762014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7077
7078 PR middle-end/61455
7079 * c-array-notation.c (expand_array_notations): Handling
7080 of DECL_EXPR added.
7081
b4dfdc11
MG
70822014-07-31 Marc Glisse <marc.glisse@inria.fr>
7083
7084 PR c++/60517
7085 * c-typeck.c (c_finish_return): Return 0 instead of the address of
7086 a local variable.
7087
976d5a22
TT
70882014-07-30 Tom Tromey <tromey@redhat.com>
7089
7090 * c-typeck.c (struct constructor_stack) <designator_depth>: New
7091 field.
7092 (really_start_incremental_init, push_init_level): Initialize
7093 designator_depth.
7094 (pop_init_level): Set global designator_depth.
7095 (process_init_element): Check for designated_init attribute.
7096
30281de2
MP
70972014-07-20 Marek Polacek <polacek@redhat.com>
7098
7099 PR c/61852
7100 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
7101 (implicitly_declare): Pass location to implicit_decl_warning.
7102
b108f48f
JJ
71032014-07-14 Jakub Jelinek <jakub@redhat.com>
7104
7105 PR middle-end/61294
7106 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
7107 If non-NULL, call c_parser_check_literal_zero.
7108 (c_parser_check_literal_zero): New function.
7109 (c_parser_postfix_expression_after_primary): Adjust
7110 c_parser_expr_list caller, handle -Wmemset-transposed-args.
7111
773ec47f
MP
71122014-07-06 Marek Polacek <polacek@redhat.com>
7113
7114 PR c/6940
7115 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
7116 * c-tree.h (C_ARRAY_PARAMETER): Define.
7117 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
7118 function parameter.
7119
22e1cf1c 71202014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 7121 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
7122
7123 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
7124 releasing symbol.
7125
52ec0ea3
MP
71262014-07-01 Marek Polacek <polacek@redhat.com>
7127
7128 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
7129 instead of 0 to WARN_FOR_ASSIGNMENT.
7130
d5c3d343
MP
71312014-07-01 Marek Polacek <polacek@redhat.com>
7132
7133 PR c/58286
7134 * c-typeck.c (convert_for_assignment): Pass
7135 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
7136
6a7253a4
MP
71372014-06-30 Marek Polacek <polacek@redhat.com>
7138
7139 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
7140 has no_sanitize_undefined attribute.
7141
5e88a8f4
IZ
71422014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
7143
7144 PR middle-end/57541
7145 * c-array-notation.c (fix_builtin_array_notation_fn):
7146 Check for 0 arguments in builtin call. Check that bultin argument is
7147 correct.
7148 * c-parser.c (c_parser_array_notation): Check for incorrect initial
7149 index.
7150
9698b078
SH
71512014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
7152
7153 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
7154 qualifiers in __auto_type for atomic types.
7155 (c_parser_typeof_specifier): Discard all type qualifiers in
7156 __typeof__ for atomic types.
7157
6e07c515
MP
71582014-06-25 Marek Polacek <polacek@redhat.com>
7159
7160 PR c/61162
7161 * c-parser.c (c_parser_statement_after_labels): Pass the location of
7162 the return expression to c_finish_return.
7163
da6f124d
JJ
71642014-06-25 Jakub Jelinek <jakub@redhat.com>
7165
7166 * c-typeck.c (c_finish_omp_clauses): Make sure
7167 OMP_CLAUSE_LINEAR_STEP has correct type.
7168
c203e8a7
TS
71692014-06-24 Trevor Saunders <tsaunders@mozilla.com>
7170
7171 * c-decl.c: Adjust.
7172
56ad0e38
JJ
71732014-06-24 Jakub Jelinek <jakub@redhat.com>
7174
7175 * c-parser.c (c_parser_omp_for_loop): For
7176 #pragma omp parallel for simd move lastprivate clause from parallel
7177 to for rather than simd.
7178
47c2554f
MP
71792014-06-23 Marek Polacek <polacek@redhat.com>
7180
7181 * c-typeck.c (parser_build_binary_op): Don't call
7182 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
7183
56363ffd
JH
71842014-06-15 Jan Hubicka <hubicka@ucw.cz>
7185
7186 * c-parser.c (c_parser_omp_threadprivate): Likewise.
7187 * c-decl.c (merge_decls): Likewise.
7188
d7ff7ae5
MP
71892014-06-09 Marek Polacek <polacek@redhat.com>
7190
7191 PR c/36446
7192 * c-typeck.c (error_init): Call inform instead of error_at.
7193 (pedwarn_init): Call inform instead of pedwarn.
7194 (warning_init): Call inform instead of warning_at.
7195
24d047a3
JH
71962014-06-07 Jan Hubicka <hubicka@ucw.cz>
7197
7198 * c-decl.c (merge_decls): Use set_decl_section_name.
7199 (duplicate_decls): Remove node if it exists.
7200
9bac5cbb
G
72012014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
7202
7203 PR c/53119
7204 * c-typeck.c (push_init_level, process_init_element,
7205 pop_init_level): Correct check for zero initialization, move
7206 missing brace warning to respect zero initialization.
7207
8ffcdea8
MP
72082014-06-05 Marek Polacek <polacek@redhat.com>
7209
7210 PR c/56724
7211 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
7212
742938c9
MP
72132014-06-05 Marek Polacek <polacek@redhat.com>
7214
7215 PR c/49706
7216 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 7217 on the left hand side operand of a comparison.
742938c9 7218
6447c55d
MP
72192014-06-05 Marek Polacek <polacek@redhat.com>
7220
7221 PR c/48062
7222 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
7223 Print note only if the warning was printed.
7224
9dc7743c
IZ
72252014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
7226
7227 PR c/58942
7228 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
7229 with a pointer.
7230
fedfecef
MP
72312014-06-03 Marek Polacek <polacek@redhat.com>
7232
7233 PR c/60439
7234 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
7235 c_start_case.
7236 * c-tree.h (c_start_case): Update.
7237 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
7238 switch condition has boolean value.
7239
9b2b7279
AM
72402014-06-02 Andrew MacLeod <amacleod@redhat.com>
7241
7242 * c-decl.c: Include builtins.h.
7243 * c-parser.c: Likewise.
7244
5c1bc275
MP
72452014-05-27 Marek Polacek <polacek@redhat.com>
7246
7247 PR c/56724
7248 * c-typeck.c (convert_arguments): Get location of a parameter. Change
7249 error and warning calls to error_at and warning_at. Pass location of
7250 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
7251 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
7252 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
7253
97563bc8
IZ
72542014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
7255
7256 PR c/61191
7257 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
7258 function parameters.
7259
aede2c10
JH
72602014-05-23 Jan Hubicka <hubicka@ucw.cz>
7261
7262 * c-decl.c (merge_decls): Preserve symtab node pointers.
7263 (duplicate_decls): Free new decl.
7264
edbba2ce
TS
72652014-05-23 Thomas Schwinge <thomas@codesourcery.com>
7266
f3316c6d
TS
7267 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
7268 initialization.
7269
edbba2ce
TS
7270 * c-parser.c (c_parser_omp_target): Return bool values.
7271
68c81f24
TS
72722014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7273
7274 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
7275 num_teams_loc variable to num_thread_limit_loc.
7276
632f2871
RS
72772014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7278
7279 * c-array-notation.c (expand_array_notations): Use void_node
7280 instead of void_zero_node.
7281
766090c2
TS
72822014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7283
7284 * c-decl.c (finish_struct): Adjust.
7285 (finish_enum): Likewise.
7286 (bind): Adjust.
7287 (record_inline_static): Likewise.
7288 (push_scope): Likewise.
7289 (make_label): Likewise.
7290 (lookup_label_for_goto): Likewise.
7291 (finish_struct): Likewise.
7292 (finish_enum): Likewise.
7293 (store_parm_decls): Likewise.
7294 (c_push_function_context): Likewise.
7295 * c-lang.h: Remove usage of variable_size gty attribute.
7296 * c-parser.c (c_parse_init): Adjust.
7297 (c_parse_file): Likewise.
7298
2b107f6b
MP
72992014-05-13 Marek Polacek <polacek@redhat.com>
7300
7301 PR c/61162
7302 * c-typeck.c (convert_for_assignment): Pass location to
7303 WARN_FOR_ASSIGNMENT instead of input_location.
7304
d033409e
MP
73052014-05-10 Marek Polacek <polacek@redhat.com>
7306
7307 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7308 maybe_warn_string_init.
7309 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7310 maybe_warn_string_init.
7311 * c-tree.h (maybe_warn_string_init): Update declaration.
7312 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7313 Call pedwarn_init with loc instead of with input_location.
7314 (digest_init): Pass init_loc to maybe_warn_string_init.
7315 (pop_init_level): Call pedwarn_init with loc instead of with
7316 input_location.
7317 (set_init_index): Likewise.
7318 (process_init_element): Likewise.
7319
ea58ef42
MP
73202014-05-09 Marek Polacek <polacek@redhat.com>
7321
7322 PR c/61096
7323 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7324 (c_parser_initelt): Pass location to set_init_label. Pass array index
7325 location to set_init_index.
7326 * c-tree.h (push_init_level): Update declaration.
7327 (pop_init_level): Likewise.
7328 (set_init_index): Likewise.
7329 (set_init_label): Likewise.
7330 * c-typeck.c (error_init): Add location parameter. Call error_at
7331 instead of error.
7332 (digest_init): Pass init_loc to error_init.
7333 (really_start_incremental_init):
7334 (push_init_level): Add location parameter. Pass loc to pop_init_level
7335 and error_init.
7336 (pop_init_level): Likewise.
7337 (set_designator): Add location parameter. Pass loc to pop_init_level,
7338 push_init_level, and error_init.
7339 (set_init_index): Add location parameter. Pass loc to error_init and
7340 set_designator.
7341 (set_init_label): Likewise.
7342 (output_init_element): Pass loc to error_init.
7343 (process_init_element): Pass loc to error_init, pop_init_level,
7344 pedwarn_init, and push_init_level.
7345
661a0813
MP
73462014-05-09 Marek Polacek <polacek@redhat.com>
7347
7348 PR c/50459
7349 * c-parser.c (c_parser_attributes): Parse the arguments as an
7350 expression-list if the attribute takes identifier.
7351
2793eeab
MP
73522014-05-08 Marek Polacek <polacek@redhat.com>
7353
7354 PR c/61053
7355 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7356 TYPE_ALIGN_UNIT.
7357
f827930a
MP
73582014-05-08 Marek Polacek <polacek@redhat.com>
7359
7360 PR c/61077
7361 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7362 of main.
7363
1d60af08
KZ
73642014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7365 Mike Stump <mikestump@comcast.net>
7366 Richard Sandiford <rdsandiford@googlemail.com>
7367
7368 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7369 (finish_enum): Use wide-int interfaces.
7370 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7371 * c-typeck.c (build_c_cast): Likewise.
7372 (set_nonincremental_init_from_string): Likewise.
7373 (c_tree_equal): Likewise.
7374
a0e24419
MP
73752014-05-02 Marek Polacek <polacek@redhat.com>
7376
7377 PR c/25801
7378 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7379 Return size_one_node when the type is not complete.
7380 (pointer_diff): Remove comment.
7381 (build_unary_op): Improve error messages.
7382
19fc9faa
MP
73832014-05-02 Marek Polacek <polacek@redhat.com>
7384
7385 * c-typeck.c (c_finish_return): Separate warning_at calls.
7386
63bc4e87
MP
73872014-05-02 Marek Polacek <polacek@redhat.com>
7388
7389 * c-tree.h (error_init): Remove declaration.
7390 (pedwarn_init): Likewise.
7391 * c-typeck.c (error_init): Make static and move above.
7392 (pedwarn_init): Likewise.
7393 (warning_init): Move above.
7394 (maybe_warn_string_init): Likewise.
7395
4bd2511b
JL
73962014-05-01 Jeff Law <law@redhat.com>
7397
7398 Revert:
7399
7400 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7401 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7402 avoid goto.
7403
6a358dcb
MP
74042014-05-02 Marek Polacek <polacek@redhat.com>
7405
7406 PR c/60784
7407 * c-typeck.c (push_init_level): Set constructor_designated to
7408 p->designated for structures.
7409
ae5ebda4
MP
74102014-05-01 Marek Polacek <polacek@redhat.com>
7411
7412 PR c/60915
7413 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7414 function-definition has an attribute after the declarator.
7415
96b40f8d
MP
74162014-05-01 Marek Polacek <polacek@redhat.com>
7417
7418 PR c/60257
7419 * c-typeck.c (warning_init): Add location_t parameter. Call
7420 warning_at instead of warning.
7421 (push_init_level): Pass input_location to warning_init.
7422 (add_pending_init): Add location_t parameter. Pass loc to
7423 warning_init.
7424 (set_nonincremental_init): Pass input_location to add_pending_init.
7425 (set_nonincremental_init_from_string): Likewise.
7426 (output_init_element): Pass loc to warning_init and to
7427 add_pending_init.
7428
32e00768
MP
74292014-05-01 Marek Polacek <polacek@redhat.com>
7430
7431 PR c/43395
7432 * c-typeck.c (c_finish_return): Distinguish between label and variable
7433 when warning about returning local address.
7434
c9379ce2
MP
74352014-05-01 Marek Polacek <polacek@redhat.com>
7436
7437 PR c/29467
7438 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7439 in C89 mode.
7440
d00887e8
MP
74412014-05-01 Marek Polacek <polacek@redhat.com>
7442
7443 PR c/43245
7444 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7445 instead of 0 to WARN_FOR_QUALIFIERS.
7446
5436fa2e
MP
74472014-05-01 Marek Polacek <polacek@redhat.com>
7448
7449 PR c/56989
7450 * c-typeck.c (default_conversion): Use better location for
7451 error call.
7452
f8ed5150
MP
74532014-04-30 Marek Polacek <polacek@redhat.com>
7454
7455 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7456 also when SANITIZE_FLOAT_DIVIDE is on.
7457
8337d1db
MP
74582014-04-30 Marek Polacek <polacek@redhat.com>
7459
7460 PR c/60139
7461 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7462 and pedwarn_init. Use loc insted of input_location.
7463
c4bdc42f
MP
74642014-04-30 Marek Polacek <polacek@redhat.com>
7465
7466 PR c/60351
7467 * c-typeck.c (build_binary_op): Use location when warning about
7468 shift count.
7469
45484dcf
MP
74702014-04-25 Marek Polacek <polacek@redhat.com>
7471
7472 PR c/18079
7473 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7474 always_inline/noinline and hot/cold attributes.
7475
34cf811f
MP
74762014-04-25 Marek Polacek <polacek@redhat.com>
7477
7478 PR c/60114
7479 * c-parser.c (c_parser_initelt): Pass input_location to
7480 process_init_element.
7481 (c_parser_initval): Pass loc to process_init_element.
7482 * c-tree.h (process_init_element): Adjust declaration.
7483 * c-typeck.c (push_init_level): Pass input_location to
7484 process_init_element.
7485 (pop_init_level): Likewise.
7486 (set_designator): Likewise.
7487 (output_init_element): Add location_t parameter. Pass loc to
7488 digest_init.
7489 (output_pending_init_elements): Pass input_location to
7490 output_init_element.
7491 (process_init_element): Add location_t parameter. Pass loc to
7492 output_init_element.
7493
42056eac
JJ
74942014-04-24 Jakub Jelinek <jakub@redhat.com>
7495
7496 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7497 atomic-clause, allow comma in between atomic-clause and
7498 seq_cst.
7499
e162a134
JJ
75002014-04-22 Jakub Jelinek <jakub@redhat.com>
7501
7502 PR c/59073
7503 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7504 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7505
2f6babac
IZ
75062014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7507
7508 PR middle-end/60469
7509 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7510 create_tmp_var instead build_decl for creating temps.
7511 (build_array_notation_expr): Likewise.
7512 (fix_conditional_array_notations_1): Likewise.
7513 (fix_array_notation_expr): Likewise.
7514 (fix_array_notation_call_expr): Likewise.
7515
8edbfaa6
JJ
75162014-03-28 Jakub Jelinek <jakub@redhat.com>
7517
7518 PR c++/60689
7519 * c-tree.h (c_build_function_call_vec): New prototype.
7520 * c-typeck.c (build_function_call_vec): Don't call
7521 resolve_overloaded_builtin here.
7522 (c_build_function_call_vec): New wrapper function around
7523 build_function_call_vec. Call resolve_overloaded_builtin here.
7524 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7525 Call c_build_function_call_vec instead of build_function_call_vec.
7526 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7527 * c-decl.c (finish_decl): Likewise.
7528
7485aeea
MLI
75292014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7530
7531 PR c/55383
7532 * c-typeck.c: Use correct format string in cast-qual warning
7533
b17a8b07
TS
75342014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7535
7536 * c-decl.c (c_decl_attributes): Use
7537 lang_hooks.types.omp_mappable_type.
7538 * c-typeck.c (c_finish_omp_clauses): Likewise.
7539
3af9c5e9
MP
75402014-03-06 Marek Polacek <polacek@redhat.com>
7541
7542 PR c/60197
7543 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7544 of checking tree code.
7545
1c9f5f33
PK
75462014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7547
7548 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7549 (c_parser_parameter_declaration): Likewise.
7550
cc28fc7f
MP
75512014-02-19 Marek Polacek <polacek@redhat.com>
7552
7553 PR c/60195
7554 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7555 Call mark_exp_read on exp.value.
7556 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7557 TREE_ADDRESSABLE on old instead of val.
7558 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7559
b581c05c
PK
75602014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7561
7562 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7563 C_EXPR_APPEND by vec_safe_push.
7564 * c-tree.h (C_EXPR_APPEND): Remove.
7565
81e5eca8
MP
75662014-01-31 Marek Polacek <polacek@redhat.com>
7567
7568 PR c/59963
7569 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7570 build_function_call_vec.
7571 (build_function_call): Likewise.
7572 (build_atomic_assign): Likewise.
7573 (build_function_call_vec): Add arg_loc parameter. Use it.
7574 (convert_arguments): Likewise.
7575 (convert_for_assignment): Rename rhs_loc to expr_loc.
7576 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7577 (c_parser_objc_keywordexpr): Likewise.
7578 (c_parser_postfix_expression_after_primary): Call
7579 build_function_call_vec with expr_loc rather than op_loc.
7580 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7581 build_function_call_vec.
7582 (c_parser_expr_list): Add locations parameter. Fill it with locations
7583 of function arguments.
7584 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7585
68fca595
MP
75862014-01-30 Marek Polacek <polacek@redhat.com>
7587
7588 PR c/59940
7589 * c-typeck.c (build_function_call_vec): Use loc parameter.
7590 (convert_arguments): Add location parameter. Use it.
7591 (ep_convert_and_check): Likewise.
7592 (build_atomic_assign): Adjust convert_for_assignment call.
7593 (build_modify_expr): Likewise.
7594 (digest_init): Likewise.
7595 (c_finish_return): Likewise.
7596 (build_conditional_expr): Adjust ep_convert_and_check calls.
7597 (convert_for_assignment): Add rhs_loc parameter. Use it.
7598 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7599 calls.
7600
fa337f3a
RB
76012014-01-30 Richard Biener <rguenther@suse.de>
7602
7603 PR c/59905
7604 * c-typeck.c (build_function_call_vec): Do not replace calls
7605 to a function via an incompatible type with a runtime abort.
7606
b72271b9
BI
76072014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7608
7609 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7610 flag_enable_cilkplus with flag_cilkplus.
7611 (c_parser_direct_declarator_inner): Likewise.
7612 (c_parser_attribute_any_word): Likewise.
7613 (c_parser_attributes): Likewise.
7614 (c_parser_compound_statement): Likewise.
7615 (c_parser_statement_after_labels): Likewise.
7616 (c_parser_if_statement): Likewise.
7617 (c_parser_switch_statement): Likewise.
7618 (c_parser_do_statement): Likewise.
7619 (c_parser_for_statement): Likewise.
7620 (c_parser_unary_expression): Likewise.
7621 (c_parser_postfix_expression): Likewise.
7622 (c_parser_postfix_expression_after_primary): Likewise.
7623 (c_parser_postfix_expression_after_primary): Likewise.
7624 (c_parser_omp_clause_name): Likewise.
7625 (c_finish_omp_declare_simd): Likewise.
7626 (c_parser_cilk_verify_simd): Likewise.
7627 * c-typeck.c (build_array_ref): Likewise.
7628 (build_function_call_vec): Likewise.
7629 (convert_arguments): Likewise.
7630 (build_compound_expr): Likewise.
7631 (c_finish_return): Likewise.
7632 (c_finish_if_stmt): Likewise.
7633 (c_finish_loop): Likewise.
7634 (build_binary_op): Likewise.
7635
393e8e8b
MP
76362014-01-23 Marek Polacek <polacek@redhat.com>
7637
7638 PR c/59846
7639 * c-typeck.c (parser_build_binary_op): Use location instead of
7640 input_location.
7641 (build_binary_op): Pass location to shorten_compare.
7642
f04dda30
MP
76432014-01-23 Marek Polacek <polacek@redhat.com>
7644
7645 PR c/58346
7646 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7647 an empty aggregate.
7648
789eadcd
MP
76492014-01-23 Marek Polacek <polacek@redhat.com>
7650
7651 PR c/59871
7652 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7653 of a comma expression.
7654 (emit_side_effect_warnings): Likewise.
7655
40f14e9f
BI
76562014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7657
7658 PR c/59825
7659 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7660 function to use walk_tree and moved a lot of its functionality to
7661 expand_array_notations.
7662 (expand_array_notations): New function.
7663
74558dd9
BI
76642014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7665
7666 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7667 attribute an attribute without value.
7668
652fea39
JJ
76692014-01-23 Jakub Jelinek <jakub@redhat.com>
7670
7671 PR middle-end/58809
7672 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7673 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7674
f34f1c87
MP
76752014-01-22 Marek Polacek <polacek@redhat.com>
7676
7677 PR c/59891
7678 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7679 of remove_c_maybe_const_expr on op1 and op2.
7680
241f845a
JJ
76812014-01-15 Jakub Jelinek <jakub@redhat.com>
7682
7683 PR c/58943
7684 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7685 effects, preevaluate rhs using SAVE_EXPR first.
7686
9a74f20c
BI
76872014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7688
7689 PR c++/59631
7690 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7691 statements with if-elseif statements.
7692
96066ce1
MP
76932014-01-06 Marek Polacek <polacek@redhat.com>
7694
7695 PR c/57773
7696 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7697 defined bit-field types only in ISO C.
7698
23a5b65a
RS
76992014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7700
7701 Update copyright years
7702
f9030485
RS
77032014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7704
7705 * c-array-notation.c: Use the standard form for the copyright notice.
7706
41958c28
BI
77072013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7708
7709 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7710 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7711 field in parser is not empty. If not-empty, call the function
7712 c_parser_finish_omp_declare_simd.
7713 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7714 between SIMD-enabled functions and #pragma simd. Added new parameter.
7715 (c_parser_cilk_all_clauses): Modified the usage of the function
7716 c_parser_cilk_clause_vectorlength as mentioned above.
7717 (c_parser_cilk_simd_fn_vector_attrs): New function.
7718 (c_finish_cilk_simd_fn_tokens): Likewise.
7719 (is_cilkplus_vector_p): Likewise.
7720 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7721 "nomask," and "mask" strings in clause name.
7722 (c_parser_omp_all_clauses): Added 3 new case statements:
7723 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7724 PRAGMA_CILK_CLAUSE_NOMASK.
7725 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7726 check for vector attribute and if so call the function
7727 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7728 called the function c_finish_cilk_simd_fn_tokens.
7729 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7730 parser field is non-empty. If so, parse them as you would parse
7731 the omp declare simd pragma.
7732 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7733 Added a check when step is a parameter and flag it as error.
7734 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7735 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7736 pragma_omp_clause.
7737
cef0fd0e
TS
77382013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7739
7740 * c-parser.c (c_parser_omp_parallel): Fix description.
7741
12893402
BI
77422013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7743
7744 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7745 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7746 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7747 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7748
296674db
JM
77492013-12-04 Joseph Myers <joseph@codesourcery.com>
7750
7751 PR c/52023
7752 * c-parser.c (c_parser_alignas_specifier): Use
7753 c_sizeof_or_alignof_type instead of c_alignof.
7754 (c_parser_alignof_expression): Likewise, with min_alignof
7755 parameter depending on alignof spelling used.
7756
edd28054
MP
77572013-12-04 Marek Polacek <polacek@redhat.com>
7758
7759 PR c/54113
7760 * c-decl.c (start_function): Don't warn for missing prototype for
7761 inline functions.
7762
da0fc454
MP
77632013-12-03 Marek Polacek <polacek@redhat.com>
7764
7765 PR c/59351
7766 * c-decl.c (build_compound_literal): Allow compound literals with
7767 empty initial value.
7768
4c2ecab0
JM
77692013-12-02 Joseph Myers <joseph@codesourcery.com>
7770
7771 PR c/58235
7772 * c-typeck.c (build_modify_expr): Diagnose assignment to
7773 expression with array type.
7774
340baef7
JM
77752013-11-29 Joseph Myers <joseph@codesourcery.com>
7776
7777 PR c/42262
7778 * c-typeck.c (process_init_element): Do not treat a string as
7779 initializing a whole array when used with a designator for an
7780 individual element.
7781
6763b9f7
JM
77822013-11-29 Joseph Myers <joseph@codesourcery.com>
7783
7784 PR c/57574
7785 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7786 an inline function following a static declaration.
7787
e7bd1de1
JJ
77882013-11-28 Jakub Jelinek <jakub@redhat.com>
7789
7790 PR c/59310
7791 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7792 to p_name before calling c_parser_omp_teams instead of after.
7793 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7794 argument. Remove unused p_name variable.
7795
0136f8f0
AH
77962013-11-27 Aldy Hernandez <aldyh@redhat.com>
7797 Jakub Jelinek <jakub@redhat.com>
7798
7799 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7800 external_scope is NULL.
7801
241b71bb
TV
78022013-11-27 Tom de Vries <tom@codesourcery.com>
7803 Marc Glisse <marc.glisse@inria.fr>
7804
7805 PR c++/59032
7806 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7807
2fb9a547
AM
78082013-11-22 Andrew MacLeod <amacleod@redhat.com>
7809
7810 * c-typeck.c: Add required include files from gimple.h.
7811
8400e75e
DM
78122013-11-22 David Malcolm <dmalcolm@redhat.com>
7813
7814 * c-decl.c (define_label, shadow_tag_warned)
7815 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7816 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7817 (declspecs_add_type): Remove use of in_system_header macro.
7818 * c-parser.c (c_parser_unary_expression): Likewise.
7819 * c-typeck.c (store_init_value, process_init_element)
7820 (c_start_case): Likewise.
7821
7822 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7823 macro.
7824
7825 * c-parser.c (c_parser_set_source_position_from_token): Remove
7826 reference to in_system_header from comment.
7827
386b1f1f
RS
78282013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7829
7830 * c-decl.c (grokdeclarator): Update comment to refer to
7831 tree_to_[su]hwi rather than tree_low_cst.
7832
ae7e9ddd
RS
78332013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7834
7835 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7836 tree_to_uhwi throughout.
7837
9439e9a1
RS
78382013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7839
7840 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7841 throughout.
7842
9541ffee
RS
78432013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7844
7845 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7846 throughout.
7847
c02065fc
AH
78482013-11-15 Aldy Hernandez <aldyh@redhat.com>
7849
7850 * c-parser.c (c_parser_cilk_simd): New.
7851 (c_parser_cilk_verify_simd): New.
7852 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7853 (c_parser_omp_for_loop): Add case for NE_EXPR.
7854 Set c_break_label for CILK_SIMD.
7855 (c_parser_cilk_clause_vectorlength): New.
7856 (c_parser_cilk_clause_linear): New.
7857 (c_parser_cilk_clause_name): New.
7858 (c_parser_cilk_all_clauses): New.
7859 * c-typeck.c (build_unary_op): Pass location argument to
7860 readonly_error.
7861 (build_modify_expr): Same.
7862 (build_asm_expr): Same.
7863 (c_finish_bc_stmt): Error on break/continue in loops.
7864
18f429e2
AM
78652013-11-14 Andrew MacLeod <amacleod@redhat.com>
7866
7867 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7868
d8a2d370
DN
78692013-11-14 Diego Novillo <dnovillo@google.com>
7870
7871 * c-decl.c: Include print-tree.h.
7872 Include stor-layout.h.
7873 Include varasm.h.
7874 Include attribs.h.
7875 Include stringpool.h.
7876 * c-lang.c: Include fold-const.h.
7877 * c-parser.c: Include stringpool.h.
7878 Include attribs.h.
7879 Include stor-layout.h.
7880 Include varasm.h.
7881 Include trans-mem.h.
7882 * c-typeck.c: Include stor-layout.h.
7883 Include trans-mem.h.
7884 Include varasm.h.
7885 Include stmt.h.
7886
38b7bc7f
JM
78872013-11-13 Joseph Myers <joseph@codesourcery.com>
7888
7889 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7890 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7891 __auto_type.
7892 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7893 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7894 RID_AUTO_TYPE.
7895 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7896 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7897 (c_parser_declarator, c_parser_direct_declarator_inner)
7898 (c_parser_parameter_declaration, c_parser_type_name): All callers
7899 changed.
7900 (c_parser_declaration_or_fndef): Handle declarations with type
7901 determined from the initializer.
7902
45b0be94
AM
79032013-11-12 Andrew MacLeod <amacleod@redhat.com>
7904
18f429e2 7905 * c-typeck.c: Include gimplify.h.
45b0be94 7906
582d9b50
JM
79072013-11-12 Joseph Myers <joseph@codesourcery.com>
7908
7909 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7910 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7911 comment.
7912 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7913 or _Thread_local as appropriate in diagnostics.
7914 (build_null_declspecs): Initialize ret->thread_gnu_p.
7915 (declspecs_add_scspec): Handle either __thread or _Thread_local
7916 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7917 pedantic. Do not disallow _Thread_local extern and _Thread_local
7918 static.
7919
267bac10
JM
79202013-11-07 Joseph Myers <joseph@codesourcery.com>
7921 Andrew MacLeod <amacleod@redhat.com>
7922
7923 * c-aux-info.c (gen_type): Handle atomic qualifier.
7924 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7925 qualifiers when compating types.
7926 (shadow_tag_warned): Handle atomic_p in declspecs.
7927 (quals_from_declspecs): Likewise.
7928 (start_decl): Use c_type_promotes_to when promoting argument
7929 types.
7930 (grokdeclarator): Handle _Atomic.
7931 (get_parm_info): Diagnose any qualifier on "void" as only
7932 parameter.
7933 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7934 comparing types. Use c_type_promotes_to when promoting argument
7935 types.
7936 (finish_function): Use c_type_promotes_to when promoting argument
7937 types.
7938 (build_null_declspecs): Handle atomic_p in declspecs.
7939 (declspecs_add_qual): Handle RID_ATOMIC.
7940 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7941 (c_token_starts_declspecs): Handle RID_ATOMIC.
7942 (c_parser_declspecs): Handle atomic type specifiers and
7943 qualifiers.
7944 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7945 from types of expressions with atomic type.
7946 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7947 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7948 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7949 (c_parser_statement_after_labels, c_parser_switch_statement)
7950 (c_parser_for_statement, c_parser_expr_no_commas)
7951 (c_parser_conditional_expression, c_parser_binary_expression)
7952 (c_parser_cast_expression, c_parser_unary_expression)
7953 (c_parser_postfix_expression)
7954 (c_parser_postfix_expression_after_primary, c_parser_expression):
7955 Use convert_lvalue_to_rvalue.
7956 (c_parser_expression_conv, c_parser_expr_list): Document
7957 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7958 (c_parser_objc_synchronized_statement): Use
7959 convert_lvalue_to_rvalue.
7960 (c_parser_objc_selector): Handle RID_ATOMIC.
7961 (c_parser_objc_receiver, c_parser_array_notation): Use
7962 convert_lvalue_to_rvalue.
7963 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7964 _Atomic (type-name).
7965 (struct c_declspecs): Add atomic_p field.
7966 (convert_lvalue_to_rvalue): Declare.
7967 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7968 corresponding atomic types.
7969 (qualify_type): Don't add _Atomic qualifiers from second argument.
7970 (comp_target_types): Do not allow _Atomic mismatches.
7971 (type_lists_compatible_p): Do not remove atomic qualifiers when
7972 comparing types.
7973 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7974 (build_atomic_assign): New functions.
7975 (build_unary_op): Use build_atomic_assign for atomic increment and
7976 decrement.
7977 (build_conditional_expr): Do not treat _Atomic void as a qualified
7978 version of void.
7979 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7980 (find_anonymous_field_with_type, convert_to_anonymous_field)
7981 (convert_for_assignment): Do not remove atomic qualifiers when
7982 comparing types.
7983 (digest_init): Do not accept initialization of arrays of atomic
7984 elements by string constants.
7985 (build_asm_expr): Use convert_lvalue_to_rvalue.
7986 (build_binary_op): Do not treat _Atomic void as a qualified
7987 version of void.
7988
0c249d4b
DD
79892013-11-06 DJ Delorie <dj@redhat.com>
7990
7991 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7992 both explicit and builtin, print the location of the explicit one.
7993
6d7f7e0a
TB
79942013-11-05 Tobias Burnus <burnus@net-b.de>
7995
7996 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7997 c_parser_omp_distribute, c_parser_omp_teams,
7998 c_parser_omp_target, c_parser_omp_declare): Handle
7999 -fopenmp-simd.
8000
b906f4ca
MP
80012013-11-03 Marek Polacek <polacek@redhat.com>
8002
8003 * c-decl.c (grokdeclarator): Add VLA instrumentation.
8004
ee1d5a02
JJ
80052013-11-01 Jakub Jelinek <jakub@redhat.com>
8006
8007 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
8008 check_dup_generic at the end, unless remove is true.
8009 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
8010 remove = true;.
8011 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
8012
5a9785fb
JJ
80132013-10-31 Jakub Jelinek <jakub@redhat.com>
8014
8015 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
8016 with decl that is not pointer nor array.
8017
939b37da
BI
80182013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8019
8020 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
8021 a spawning function is found.
8022 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
8023 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
8024 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8025 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
8026 case.
8027 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
8028 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
8029 expr.
8030 (c_finish_return): Added a check to reject _Cilk_spawn in return
8031 expression.
8032 (build_cilk_spawn): New function.
8033 (build_cilk_sync): Likewise.
8034 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 8035
d4af74d4
TB
80362013-10-27 Tobias Burnus <burnus@net-b.de>
8037
8038 PR other/33426
8039 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
8040 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
8041 (c_parser_statement_after_labels): Update calls.
8042
d73749df 80432013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8044
8045 PR other/33426
8046 * c-parser.c (c_parser_pragma, c_parser_for_statement):
8047 Handle PRAGMA_IVDEP.
8048 (c_parser_statement_after_labels): Update call.
8049
f28aa681
MP
80502013-10-24 Marek Polacek <polacek@redhat.com>
8051
8052 * c-parser.c (c_parser_struct_declaration): Add a comment.
8053 (c_parser_declarator): Don't allow _Alignas here.
8054
0645c1a2
AM
80552013-10-17 Andrew MacLeod <amacleod@redhat.com>
8056
8057 * c-parser.c: Include omp-low.h.
8058 * c-typeck.c: Likewise.
8059
568a31f2
MP
80602013-10-17 Marek Polacek <polacek@redhat.com>
8061
8062 PR c/58267
8063 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
8064 Document syntax of the array-declarator.
8065 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
8066 are not permitted.
8067 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
8068 (c_parser_struct_declaration): Likewise.
8069 (c_parser_declarator): Likewise.
8070 (c_parser_direct_declarator_inner): Likewise.
8071 (c_parser_parameter_declaration): Likewise.
8072 (c_parser_type_name): Likewise.
8073
acf0174b
JJ
80742013-10-11 Jakub Jelinek <jakub@redhat.com>
8075
8076 * c-lang.h (current_omp_declare_target_attribute): New extern
8077 decl.
8078 * c-parser.c: Include c-lang.h.
8079 (struct c_parser): Change tokens to c_token *.
8080 Add tokens_buf field. Change tokens_avail type to unsigned int.
8081 (c_parser_consume_token): If parser->tokens isn't
8082 &parser->tokens_buf[0], increment parser->tokens.
8083 (c_parser_consume_pragma): Likewise.
8084 (enum pragma_context): Add pragma_struct and pragma_param.
8085 (c_parser_external_declaration): Adjust
8086 c_parser_declaration_or_fndef caller.
8087 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
8088 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
8089 Adjust recursive call.
8090 (c_parser_struct_or_union_specifier): Use pragma_struct instead
8091 of pragma_external.
8092 (c_parser_parameter_declaration): Use pragma_param instead of
8093 pragma_external.
8094 (c_parser_compound_statement_nostart, c_parser_label,
8095 c_parser_for_statement): Adjust
8096 c_parser_declaration_or_fndef callers.
8097 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
8098 it through to c_parser_conditional_expression.
8099 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
8100 pass it through to c_parser_binary_expression. Adjust recursive
8101 call.
8102 (c_parser_binary_expression): Remove prec argument, add
8103 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
8104 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
8105 binop matches it, use build2 instead of parser_build_binary_op.
8106 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
8107 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
8108 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
8109 Handle pragma_struct and pragma_param the same as pragma_external.
8110 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
8111 (c_parser_omp_variable_list): Parse array sections for
8112 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
8113 (c_parser_omp_clause_collapse): Fully fold collapse expression.
8114 (c_parser_omp_clause_reduction): Handle user defined reductions.
8115 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
8116 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
8117 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
8118 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
8119 c_parser_omp_clause_depend, c_parser_omp_clause_map,
8120 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
8121 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
8122 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
8123 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
8124 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
8125 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
8126 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
8127 (c_parser_omp_for_loop): Add CODE argument, pass it through
8128 to c_finish_omp_for. Change last argument to cclauses,
8129 and adjust uses to grab parallel clauses from the array of all
8130 the split clauses. Adjust c_parser_binary_expression,
8131 c_parser_declaration_or_fndef and c_finish_omp_for callers.
8132 (omp_split_clauses): New function.
8133 (c_parser_omp_simd): New function.
8134 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
8135 Allow the function to be called also when parsing combined constructs,
8136 and call c_parser_omp_simd when parsing for simd.
8137 (c_parser_omp_sections_scope): If section-sequence doesn't start with
8138 #pragma omp section, require exactly one structured-block instead of
8139 sequence of statements.
8140 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
8141 Allow the function to be called also when parsing combined constructs.
8142 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
8143 Allow the function to be called also when parsing combined
8144 constructs.
8145 (c_parser_omp_taskgroup, c_parser_omp_cancel,
8146 c_parser_omp_cancellation_point, c_parser_omp_distribute,
8147 c_parser_omp_teams, c_parser_omp_target_data,
8148 c_parser_omp_target_update, c_parser_omp_target,
8149 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
8150 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
8151 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
8152 (c_parser_omp_construct): Add p_name and mask vars. Handle
8153 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
8154 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
8155 and c_parser_omp_sections callers.
8156 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
8157 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
8158 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
8159 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
8160 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
8161 OMP_CLAUSE_DEPEND.
8162 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
8163 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
8164 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
8165 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
8166 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
8167 * c-typeck.c: Include tree-inline.h.
8168 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
8169 handle_omp_array_sections_1, handle_omp_array_sections,
8170 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
8171 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
8172 user defined reductions.
8173 (c_tree_equal): New function.
8174 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
8175 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
8176 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
8177 c_check_omp_declare_reduction_r): New prototypes.
8178 * c-decl.c (current_omp_declare_target_attribute): New variable.
8179 (c_decl_attributes): New function.
8180 (start_decl, start_function): Use it instead of decl_attributes.
8181 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
8182 c_omp_reduction_decl, c_omp_reduction_lookup,
8183 c_check_omp_declare_reduction_r): New functions.
8184
0a6c2227
TT
81852013-09-25 Tom Tromey <tromey@redhat.com>
8186
8187 * Make-lang.in (c/gccspec.o): Remove.
8188 (CFLAGS-c/gccspec.o): New variable.
8189 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
8190 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
8191 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
8192
f3bc55f0
TT
81932013-09-25 Tom Tromey <tromey@redhat.com>
8194
8195 * Make-lang.in (c/gccspec.o): Don't use subshell.
8196
a24d975c
MP
81972013-09-18 Marek Polacek <polacek@redhat.com>
8198
8199 PR sanitize/58443
8200 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
8201 Remove unnecessary check.
8202
ce6923c5
MP
82032013-09-18 Marek Polacek <polacek@redhat.com>
8204
8205 PR sanitizer/58411
8206 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
8207 no_sanitize_undefined attribute.
8208
a1e51df9
KT
82092013-09-13 Kai Tietz <ktietz@redhat.com>
8210
8211 PR target/57848
8212 * c-decl.c (c_builtin_function_ext_scope): Remove
8213 wrong assumption that it is never called on prexisting
8214 symbol.
8215
0af94e6f
JR
82162013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8217
8218 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
8219
20059c8b
GDR
82202013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8221
8222 * c-objc-common.c (c_tree_printer): Tidy.
8223
de5a5fa1
MP
82242013-08-30 Marek Polacek <polacek@redhat.com>
8225
8226 * c-typeck.c (build_binary_op): Add division by zero and shift
8227 instrumentation.
8228
2531a1d9 82292013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 8230 Joseph Myers <joseph@codesourcery.com>
2531a1d9 8231
6e2bcc98 8232 PR c/35649
2531a1d9
JR
8233 * c-typeck.c (c_common_type): Prefer double_type_node over
8234 other REAL_TYPE types with the same precision.
8235 (convert_arguments): Likewise.
8236
025311c4
GDR
82372013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
8238
8239 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
8240 (c_initialize_diagnostics): Call a destructor for the early printer.
8241
da6ca2b5
GDR
82422013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8243
8244 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
8245 printer initialization.
8246
318cda85 82472013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 8248
318cda85
BI
8249 PR c/57490
8250 * c-array-notation.c (fix_conditional_array_notations_1): Added a
8251 check for truth values.
8252 (expand_array_notation_exprs): Added truth values case. Removed an
8253 unwanted else. Added for-loop to walk through subtrees in default
8254 case.
8255
b066401f
GDR
82562013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8257
8258 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
8259
fb48aadc
JM
82602013-07-23 Joseph Myers <joseph@codesourcery.com>
8261
8262 * c-parser.c (struct c_generic_association): Fix typo.
8263
433cc7b0
TT
82642013-07-23 Tom Tromey <tromey@redhat.com>
8265 Joseph Myers <joseph@codesourcery.com>
8266
8267 * c-parser.c (struct c_generic_association): New.
8268 (c_generic_association_d): New typedef.
8269 (c_parser_generic_selection): New function.
8270 (c_parser_postfix_expression): Handle RID_GENERIC.
8271
26d40c3d
JM
82722013-07-13 Jason Merrill <jason@redhat.com>
8273
8274 PR c++/57793
8275 * c-decl.c (finish_struct): Check for too-large class.
8276
ecdbd01a 82772013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8278
8279 PR c/57821
8280 * c-typeck.c (set_init_index): When folding, check for index overflow.
8281
1141ed3f
BI
82822013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8283
8284 * c-parser.c (c_parser_array_notation): Removed rejection of array
8285 notations in an array of function pointers.
8286
713b46fa
BI
82872013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8288
8289 * c-array-notation.c (make_triplet_val_inv): New function.
8290 (create_cmp_incr): Likewise.
8291 (create_array_refs): Likewise.
8292 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8293 Also modularized common parts between functions and called the function.
8294 (build_array_notation_expr): Likewise.
8295 (fix_conditional_array_notations_1): Likewise.
8296 (fix_array_notation_expr): Likewise.
8297 (fix_array_notation_call_expr): Likewise.
8298
92f20202
MP
82992013-06-18 Marek Polacek <polacek@redhat.com>
8300
8301 PR c/57630
8302 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8303
73a23b06
BI
83042013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8305
8306 * c-array-notation.c (build_array_notation_expr): Reject array notation
8307 mismatch between LHS and RHS even inside a call_expr. Also, removed
8308 a couple while statements that were dead code.
8309
00b8517d
BI
83102013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8311
8312 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8313 excessive precision expressions in function parameters. Also removed
8314 couple unwanted while statements.
8315
1509bdda
BI
83162013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8317
8318 * c-array-notation.c (expand_array_notation_exprs): Added
8319 ARRAY_NOTATION_REF case.
ab20d992 8320
d60f1706
BI
83212013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8322
8323 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8324 function to c-family/array-notation-common.c.
8325 (is_cilkplus_reduce_builtin): Likewise.
8326 (find_rank): Likewise.
8327 (extract_array_notation_exprs): Likewise.
8328 (replace_array_notations): Likewise.
8329 (find_inv_trees): Likewise.
8330 (replace_inv_trees): Likewise.
8331 (contains_array_notation_expr): Likewise.
8332 (find_correct_array_notation_type): Likewise.
8333 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8334 (struct inv_list): Moved this to c-family/array-notation-common.c.
8335 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 8336
6d6efbb3
BI
83372013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8338
8339 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8340 reduction functions outside the for-loop. Added a check if the fundecl
8341 is non-NULL. Finally, removed an unwanted if-statement, and made the
8342 body unconditional.
8343
25c22937
BI
83442013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8345
8346 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8347 condition of the if-statement matches the rank of else-block and then-
8348 block when array notations are used.
8349 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8350 expression after the entire function body is parsed.
8351 (c_parser_expr_no_commas): Delayed creating array notation expressions
8352 to the end of function parsing.
8353 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8354 whole if-statement instead of just the condition.
ab20d992 8355 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 8356
edd25645
BI
83572013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8358
8359 PR c/57474
8360 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8361 array to NULL_TREE if they are unused. Also added a check for the
8362 field to be NULL before its fields are used in future.
ab20d992 8363
065ce7f1
RO
83642013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8365
8366 PR bootstrap/57450
8367 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8368 (build_array_notation_expr): Likewise.
8369
36536d79
BI
83702013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8371
8372 * c-typeck.c (build_array_ref): Added a check to see if array's
8373 index is greater than one. If true, then emit an error.
8374 (build_function_call_vec): Exclude error reporting and checking
8375 for builtin array-notation functions.
8376 (convert_arguments): Likewise.
8377 (c_finish_return): Added a check for array notations as a return
8378 expression. If true, then emit an error.
8379 (c_finish_loop): Added a check for array notations in a loop
8380 condition. If true then emit an error.
8381 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8382 (build_binary_op): Added a check for array notation expr inside
8383 op1 and op0. If present, we call another function to find correct
8384 type.
8385 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8386 * c-parser.c (c_parser_compound_statement): Check if array
8387 notation code is used in tree, if so, then transform them into
8388 appropriate C code.
8389 (c_parser_expr_no_commas): Check if array notation is used in LHS
8390 or RHS, if so, then build array notation expression instead of
8391 regular modify.
8392 (c_parser_postfix_expression_after_primary): Added a check for
8393 colon(s) after square braces, if so then handle it like an array
8394 notation. Also, break up array notations in unary op if found.
8395 (c_parser_direct_declarator_inner): Added a check for array
8396 notation.
8397 (c_parser_compound_statement): Added a check for array notation in
8398 a stmt. If one is present, then expand array notation expr.
8399 (c_parser_if_statement): Likewise.
8400 (c_parser_switch_statement): Added a check for array notations in
8401 a switch statement's condition. If true, then output an error.
8402 (c_parser_while_statement): Similarly, but for a while.
8403 (c_parser_do_statement): Similarly, but for a do-while.
8404 (c_parser_for_statement): Similarly, but for a for-loop.
8405 (c_parser_unary_expression): Check if array notation is used in a
8406 pre-increment or pre-decrement expression. If true, then expand
8407 them.
8408 (c_parser_array_notation): New function.
8409 * c-array-notation.c: New file.
8410 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 8411
cd192ccc
MS
84122013-05-23 Mike Stump <mikestump@comcast.net>
8413
8414 * c-typeck.c (convert_for_assignment): Handle references to memory
8415 spaces better.
8416
427b248d
JM
84172013-05-16 Jason Merrill <jason@redhat.com>
8418
8419 * Make-lang.in (cc1$(exeext)): Use link mutex.
8420
44d90fe1
PC
84212013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8422
8423 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8424 to simply use OPT_Wpointer_arith.
8425 (build_unary_op): Likewise.
8426
4e7d7b3d
JJ
84272013-04-03 Jakub Jelinek <jakub@redhat.com>
8428
8429 PR c/19449
8430 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8431 argument. If set, or it temporarily for parsing of the first
8432 argument into force_folding_builtin_constant_p.
8433 (c_parser_postfix_expression): Adjust callers.
8434
839b422f
RB
84352013-03-21 Richard Biener <rguenther@suse.de>
8436
8437 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8438 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8439
2ee028f1
MP
84402013-02-12 Marek Polacek <polacek@redhat.com>
8441
8442 PR c/44938
8443 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8444 origtypes to NULL.
8445
8824edff
JJ
84462013-01-24 Jakub Jelinek <jakub@redhat.com>
8447
8448 PR c/56078
8449 * c-typeck.c (set_nonincremental_init_from_string): If
8450 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8451 returned false.
8452 (process_init_element): Likewise.
8453
eadd3d0d
JJ
84542012-12-20 Jakub Jelinek <jakub@redhat.com>
8455
8456 PR c++/55619
8457 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8458 argument, don't call default_function_array_conversion
8459 nor c_fully_fold here.
8460 (c_parser_asm_statement): Adjust callers.
8461 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8462 and outputs here, and call default_function_array_conversion
8463 on inputs that don't need to be addressable.
8464
f8a93a2e
JJ
84652012-12-18 Jakub Jelinek <jakub@redhat.com>
8466
8467 PR c/39464
8468 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8469 warning require that both c_common_unsigned_type as well as
8470 c_common_signed_type is the same for both mvl and mvr types.
8471
9771b263
DN
84722012-11-16 Diego Novillo <dnovillo@google.com>
8473
8474 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8475
8476 * c-common.c: Use new vec API in vec.h.
8477 * c-common.h: Likewise.
8478 * c-gimplify.c: Likewise.
8479 * c-pragma.c: Likewise.
8480 * c-pretty-print.c: Likewise.
8481 * c-pretty-print.h: Likewise.
8482 * c-semantics.c: Likewise.
8483 * c-decl.c: Likewise.
8484 * c-parser.c: Likewise.
8485 * c-tree.h: Likewise.
8486 * c-typeck.c: Likewise.
8487
880661a4
JW
84882012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8489
8490 PR c++/54930
8491 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8492
077d1abe
MLI
84932012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8494
8495 PR c/53066
8496 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8497 shadows a function, unless the variable is a function or a
8498 pointer-to-function.
8499
3a785c97
JJ
85002012-10-12 Jakub Jelinek <jakub@redhat.com>
8501
8502 PR c/54381
8503 * c-parser.c (struct c_tree_loc_pair): Removed.
8504 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8505 add location_t * and tree * arguments, fill in array of 3
8506 sizeof_arg trees and corresponding locs.
8507 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8508 c_parser_expr_list callers.
8509 (c_parser_postfix_expression_after_primary): Likewise. Pass
8510 array of 3 sizeof_arg trees and locs (corresponding to first
8511 3 arguments) to sizeof_pointer_memaccess_warning.
8512
703c8606
LC
85132012-10-09 Lawrence Crowl <crowl@google.com>
8514
8515 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8516 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8517 hash table.
8518
5d9de0d0
PC
85192012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8520
8521 PR c++/54194
8522 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8523 call.
8524
a212e43f
MG
85252012-10-09 Marc Glisse <marc.glisse@inria.fr>
8526
8527 PR c++/54427
8528 * c-typeck.c: Include c-common.h.
8529 (enum stv_conv): Moved to c-common.h.
8530 (scalar_to_vector): Moved to c-common.c.
8531 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8532 * Make-lang.in: c-typeck.c depends on c-common.h.
8533
3b78de56
AC
85342012-10-04 Arnaud Charlet <charlet@adacore.com>
8535
8536 * c-decl.c (c_write_global_declarations): Fix handling of
8537 -fdump-ada-spec*.
8538
78c60e3d
SS
85392012-09-30 Sharad Singhai <singhai@google.com>
8540
8541 * c-decl.c (c_write_global_declarations): Use a different method
8542 to determine if the dump has ben initialized.
8543
9f33203d
JM
85442012-09-14 Joseph Myers <joseph@codesourcery.com>
8545
8546 PR c/54552
8547 * c-typeck.c (c_cast_expr): When casting to a type requiring
8548 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8549 c_fully_fold first.
8550
a27d595d
JM
85512012-09-14 Joseph Myers <joseph@codesourcery.com>
8552
8553 PR c/54103
8554 * c-typeck.c (build_unary_op): Pass original argument of
8555 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8556 any C_MAYBE_CONST_EXPR, if it has integer operands.
8557 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8558 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8559 to c_objc_common_truthvalue_conversion, then remove any
8560 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8561 c_objc_common_truthvalue_conversion not
8562 c_common_truthvalue_conversion.
8563 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8564 call note_integer_operands for arguments with integer operands
8565 that are not integer constants.
8566
9feb29df
JJ
85672012-09-13 Jakub Jelinek <jakub@redhat.com>
8568
8569 PR c/54559
8570 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8571 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8572
d409320c
JJ
85732012-08-31 Jakub Jelinek <jakub@redhat.com>
8574
8575 PR c/54428
8576 * c-convert.c (convert): Don't call fold_convert_loc if
8577 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8578 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8579 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8580
6265d07c
JJ
85812012-08-24 Jakub Jelinek <jakub@redhat.com>
8582
8583 PR c/54355
8584 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8585 for nested and empty_ok arguments in the call to
8586 c_parser_declaration_or_fndef.
8587
1a4049e7
JJ
85882012-08-17 Jakub Jelinek <jakub@redhat.com>
8589
8590 * c-tree.h (c_last_sizeof_arg): Declare.
8591 * c-parser.c (struct c_tree_loc_pair): New type.
8592 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8593 non-NULL.
8594 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8595 (c_parser_postfix_expression_after_primary): Likewise. Call
8596 sizeof_pointer_memaccess_warning if needed.
8597 (sizeof_ptr_memacc_comptypes): New function.
8598 * c-typeck.c (c_last_sizeof_arg): New global variable.
8599 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8600
0229aee9
UB
86012012-07-24 Uros Bizjak <ubizjak@gmail.com>
8602
8603 * c-lang.h (lang_decl): Add variable_size GTY option.
8604
7ee2468b
SB
86052012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8606
8607 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8608 * Make-lang.in: Fix dependencies.
8609
d4a10d0a
SB
86102012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8611
8612 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8613 and add language Makefile hooks.
8614 * config-lang.in: New file.
8615 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8616 add the required "normal" config-lang.in rules.
8617 * c-lang.h: Moved from gcc/ to here.
8618 * c-tree.h: Likewise.
8619 * c-objc-common.c: Likewise.
8620 * c-objc-common.h: Likewise.
8621 * c-typeck.c: Likewise.
8622 * c-convert.c: Likewise.
8623 * c-lang.c: Likewise.
8624 * c-aux-info.c: Likewise.
8625 * c-errors.c: Likewise.
8626 * gccspec.c: Likewise.
8627 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8628 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8629\f
877e3c2a 8630Copyright (C) 2012-2022 Free Software Foundation, Inc.
d4a10d0a
SB
8631
8632Copying and distribution of this file, with or without modification,
8633are permitted in any medium without royalty provided the copyright
8634notice and this notice are preserved.