]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Fortran: Fix ICE with automatic reallocation [PR100245]
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
c64b0947
GA
12022-09-02 David Malcolm <dmalcolm@redhat.com>
2
3 PR c/90885
4 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
5 (c_parser_expr_no_commas): Likewise.
6 (c_parser_conditional_expression): Likewise.
7 (c_parser_binary_expression): Clear m_decimal when popping the
8 stack.
9 (c_parser_unary_expression): Clear ret.m_decimal.
10 (c_parser_has_attribute_expression): Likewise for result.
11 (c_parser_predefined_identifier): Likewise for expr.
12 (c_parser_postfix_expression): Likewise for expr.
13 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
14 token.
15 * c-tree.h (c_expr::m_decimal): New bitfield.
16 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
17 (parser_build_binary_op): Call check_for_xor_used_as_pow.
18
bb0a1556
GA
192022-09-01 Joseph Myers <joseph@codesourcery.com>
20
21 * c-decl.cc (grokparms): Handle () in a function declaration the
22 same as (void) for C2X.
23
542c60c4
GA
242022-08-31 Joseph Myers <joseph@codesourcery.com>
25
26 * c-parser.cc (c_parser_label): Pass attributes to do_case.
27 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
28 c_add_case_label.
29
16f542d6
GA
302022-08-26 Jakub Jelinek <jakub@redhat.com>
31
32 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
33
5d4389dc
GA
342022-08-25 Marek Polacek <polacek@redhat.com>
35
36 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
37 Give a better diagnostic when converting to nullptr_t.
38 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
39 initialization.
40 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
41 (c_parser_postfix_expression): Handle RID_NULLPTR.
42 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
43 nullptr_node.
44 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
45 (build_conditional_expr): Handle the case when the second/third operand
46 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
47 (convert_for_assignment): Handle converting an expression of type
48 nullptr_t to pointer/bool.
49 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
50 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
51
522022-08-25 Joseph Myers <joseph@codesourcery.com>
53
54 * c-decl.cc (start_decl): Do not diagnose initialization of
55 variable-sized objects here.
56 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
57 callers changed.
58 (c_parser_initializer): Diagnose initialization of variable-sized
59 objects other than with braced initializer.
60 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
61 braces and update diagnostic text. Diagnose initialization of
62 variable-sized objects with nonempty braces.
63 * c-typeck.cc (digest_init): Update diagnostic for initialization
64 of variable-sized objects.
65 (really_start_incremental_init, set_designator)
66 (process_init_element): Update comments.
67 (pop_init_level): Allow scalar empty initializers.
68
0342f034
GA
692022-08-17 Tobias Burnus <tobias@codesourcery.com>
70 Chung-Lin Tang <cltang@codesourcery.com>
71
72 PR c++/104493
73 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
74 instead of removed langhook.
75 * c-typeck.cc (c_finish_omp_clauses): Likewise.
76
5cd525f0
GA
772022-08-11 Marek Polacek <polacek@redhat.com>
78
79 PR middle-end/102633
80 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
81 Call suppress_warning.
82 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
83 (c_parser_omp_declare_reduction): Pass omp_priv down to
84 c_parser_initializer.
85
5f17badb
GA
862022-08-08 Tom Honermann <tom@honermann.net>
87
88 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
89 of CPP_UTF8STRING when char8_t support is enabled.
90 * c-typeck.cc (digest_init): Allow initialization of an array
91 of character type by a string literal with type array of
92 char8_t.
93
32510382
GA
942022-08-01 David Malcolm <dmalcolm@redhat.com>
95
96 * c-typeck.cc (build_c_cast): Quote names of address spaces in
97 diagnostics.
98 (convert_for_assignment): Add a note to address space mismatch
99 diagnostics, specifying the expected and actual types.
100
b53ebbc5
GA
1012022-07-10 Lewis Hyatt <lhyatt@gmail.com>
102
103 PR preprocessor/97498
104 * c-parser.cc (c_parser_pragma): Set input_location to the
105 location of the pragma, rather than the start of the line.
106
8467574d
GA
1072022-07-04 Tobias Burnus <tobias@codesourcery.com>
108 Chung-Lin Tang <cltang@codesourcery.com>
109 Thomas Schwinge <thomas@codesourcery.com>
110
111 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
112 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
113 OMP_REQUIRES_TARGET_USED.
114 (c_parser_omp_requires): Remove sorry.
115
ed974488
GA
1162022-07-01 Tobias Burnus <tobias@codesourcery.com>
117
118 * c-parser.cc (c_parser_omp_target_enter_data,
119 c_parser_omp_target_exit_data): Accept tofrom
120 map-type modifier but use 'to' / 'from' internally.
121
bc7e9f76
GA
1222022-06-16 David Malcolm <dmalcolm@redhat.com>
123
124 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
125 group the warning with any note.
126 (warn_about_goto): Likewise to group error or warning with note.
127 Bail out if the warning wasn't emitted, to avoid emitting orphan
128 notes.
129 (lookup_label_for_goto): Add auto_diagnostic_group to
130 group the error with the note.
131 (check_earlier_gotos): Likewise.
132 (c_check_switch_jump_warnings): Likewise for any error/warning.
133 Conditionalize emission of the notes.
134 (diagnose_uninitialized_cst_member): Likewise for warning,
135 conditionalizing emission of the note.
136 (grokdeclarator): Add auto_diagnostic_group to group the "array
137 type has incomplete element type" error with any note.
138 (parser_xref_tag): Add auto_diagnostic_group to group warnings
139 with their notes. Conditionalize emission of notes.
140 (start_struct): Add auto_diagnostic_group to group the
141 "redefinition of" errors with any note.
142 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
143 (check_for_loop_decls): Likewise for pre-C99 error.
144
445ba599
GA
1452022-06-07 Jakub Jelinek <jakub@redhat.com>
146
147 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
148 style linear clause modifiers. Set
149 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
150 old style modifiers are used.
151 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
152 with val modifier on simd or for if the old style modifiers are
153 used.
154
b168441c
GA
1552022-06-02 David Malcolm <dmalcolm@redhat.com>
156
157 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
158 (c_get_sarif_source_language): New.
159 * c-tree.h (c_get_sarif_source_language): New decl.
160
820ead45
GA
1612022-05-31 Jason Merrill <jason@redhat.com>
162
163 * Make-lang.in (c.tags): Look at *.cc.
164
1652022-05-31 Jakub Jelinek <jakub@redhat.com>
166
167 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
168 clauses.
169
37b3b5da
GA
1702022-05-28 Jakub Jelinek <jakub@redhat.com>
171
172 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
173 seen first, use "%<to%>" or "%<enter%>" depending on
174 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
175 "%<to%> or %<enter%>" wording.
176
d9176e64
GA
1772022-05-27 Jakub Jelinek <jakub@redhat.com>
178
179 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
180 (c_parser_omp_all_clauses): For to clause on declare target, use
181 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
182 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
183 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
184 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
185 OMP_CLAUSE_TO_DECLARE.
186 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
187 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
188 name in diagnostics instead of
189 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
190
3dff965c
GA
1912022-05-25 Jakub Jelinek <jakub@redhat.com>
192
193 PR c/91134
194 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
195 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
196 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
197 diagnostic and fixit hint if DATUM has pointer type.
198 * c-parser.cc (c_parser_postfix_expression,
199 c_parser_omp_variable_list): Adjust build_component_ref callers.
200 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
201 Likewise.
202
768f49a2
GA
2032022-05-24 Jakub Jelinek <jakub@redhat.com>
204
205 PR c/105378
206 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
207
1cda629f
GA
2082022-05-18 Marek Polacek <polacek@redhat.com>
209
210 PR c/105131
211 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
212 mismatches.
213 * c-tree.h (comptypes_check_enum_int): Declare.
214 * c-typeck.cc (comptypes): No longer static.
215
3d9439b1
GA
2162022-05-17 Marek Polacek <polacek@redhat.com>
217
218 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
219 its value.
220
2212022-05-17 Jakub Jelinek <jakub@redhat.com>
222
223 * c-parser.cc (c_parser_omp_clause_depend): Parse
224 inoutset depend-kind.
225 (c_parser_omp_depobj): Likewise.
226
702bd11f
GA
2272022-05-16 Martin Liska <mliska@suse.cz>
228
229 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
230
49ace834
GA
2312022-05-12 Jakub Jelinek <jakub@redhat.com>
232
233 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
234 if flag_openmp.
235 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
236 in postfix expressions.
237 (c_parser_omp_variable_list): Handle omp_all_memory in depend
238 clause.
239 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
240 keyword in depend clause as null_pointer_node, diagnose invalid
241 uses.
242
bd022ff9
GA
2432022-05-09 Martin Liska <mliska@suse.cz>
244
245 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
246 macros.
247 (c_parser_binary_expression): Likewise.
248
a1947c92
GA
2492022-05-07 Marek Polacek <polacek@redhat.com>
250
251 PR c++/101833
252 PR c++/47634
253 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
254
405eda0d
GA
2552022-04-08 Jakub Jelinek <jakub@redhat.com>
256
257 PR c/105149
258 * c-typeck.cc (c_build_va_arg): Reject function types.
259
a2287813
GA
2602022-03-22 Marek Polacek <polacek@redhat.com>
261
262 PR c/82283
263 PR c/84685
264 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
265 (start_init): Set it.
266 (finish_init): Restore constructor_designated.
267 (push_init_level): Set constructor_designated to the value of
268 constructor_designated in the upper constructor_stack.
269
57eeedda
GA
2702022-03-12 Thomas Schwinge <thomas@codesourcery.com>
271
272 PR other/65095
273 * c-typeck.cc (handle_omp_array_sections_1)
274 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
275 instead of 'c_omp_map_clause_name'.
276
8cc4f9cd
GA
2772022-03-09 Joseph Myers <joseph@codesourcery.com>
278
279 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
280 differently from earlier standards for unprototyped function type
281 compatibility.
282
2832022-03-09 Jakub Jelinek <jakub@redhat.com>
284
285 PR c/104711
286 * c-fold.cc (c_fully_fold_internal): Don't emit
287 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
288 * c-typeck.cc (build_binary_op): Likewise.
289
e6533e2e
GA
2902022-03-07 Jakub Jelinek <jakub@redhat.com>
291
292 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
293 literal.
294
4bf3bac1
GA
2952022-02-23 Richard Biener <rguenther@suse.de>
296
297 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
298 SSA names without definition.
299 (c_parser_gimple_declaration): Handle pointer typed SSA names.
300
0bdb0498
GA
3012022-02-17 Jakub Jelinek <jakub@redhat.com>
302
303 PR c/104532
304 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
305 convert_lvalue_to_rvalue and build_indirect_ref instead of
306 build_simple_mem_ref.
307
e8d68f0a
GA
3082022-02-11 Richard Biener <rguenther@suse.de>
309
310 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
311 VEC_COND_EXPRs.
312
a645583d
GA
3132022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
314
315 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
316 clause.
317 (c_parser_omp_variable_list): Handle array sections.
318 (c_parser_omp_clause_has_device_addr): Added.
319 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
320 case.
321 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
322 OMP_CLAUSE_MASK.
323 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
324 (c_finish_omp_clauses): Handle array sections.
325
3adf509f
GA
3262022-02-09 Jakub Jelinek <jakub@redhat.com>
327
328 PR c/104427
329 * c-parser.cc (c_parser_postfix_expression)
330 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
331 instead of build1_loc to build PAREN_EXPR.
332 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
333 * c-fold.cc (c_fully_fold_internal): Likewise.
334
fc829782
GA
3352022-01-17 Martin Liska <mliska@suse.cz>
336
337 * Make-lang.in: Rename .c names to .cc.
338 * c-convert.cc: Likewise.
339 * c-decl.cc (struct lang_identifier): Likewise.
340 (pop_scope): Likewise.
341 (finish_decl): Likewise.
342 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
343 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
344 * c-parser.h (GCC_C_PARSER_H): Likewise.
345 * c-tree.h (c_keyword_starts_typename): Likewise.
346 (finish_declspecs): Likewise.
347 (c_get_alias_set): Likewise.
348 (enum c_oracle_request): Likewise.
349 (tag_exists_p): Likewise.
350 (set_c_expr_source_range): Likewise.
351 * c-typeck.cc (c_common_type): Likewise.
352 (c_finish_omp_clauses): Likewise.
353 * config-lang.in: Likewise.
354
3552022-01-17 Martin Liska <mliska@suse.cz>
356
357 * c-aux-info.c: Moved to...
358 * c-aux-info.cc: ...here.
359 * c-convert.c: Moved to...
360 * c-convert.cc: ...here.
361 * c-decl.c: Moved to...
362 * c-decl.cc: ...here.
363 * c-errors.c: Moved to...
364 * c-errors.cc: ...here.
365 * c-fold.c: Moved to...
366 * c-fold.cc: ...here.
367 * c-lang.c: Moved to...
368 * c-lang.cc: ...here.
369 * c-objc-common.c: Moved to...
370 * c-objc-common.cc: ...here.
371 * c-parser.c: Moved to...
372 * c-parser.cc: ...here.
373 * c-typeck.c: Moved to...
374 * c-typeck.cc: ...here.
375 * gccspec.c: Moved to...
376 * gccspec.cc: ...here.
377 * gimple-parser.c: Moved to...
378 * gimple-parser.cc: ...here.
379
3802022-01-17 Andrew Stubbs <ams@codesourcery.com>
381
382 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
383
617db51d
GA
3842022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
385
386 PR c++/103705
387 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
388 outer node for ARRAY_REFs.
389
62eb5308
GA
3902022-01-01 Jakub Jelinek <jakub@redhat.com>
391
392 PR objc/103639
393 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
394 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
395
2554e2da
GA
3962021-12-17 Marek Polacek <polacek@redhat.com>
397
398 PR c/103649
399 * c-decl.c (c_warn_unused_attributes): Don't warn for
400 attribute_ignored_p.
401 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
402 arguments when the attribute is ignored.
403
9c6586bc
GA
4042021-12-14 Jakub Jelinek <jakub@redhat.com>
405
406 PR c/103587
407 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
408 consume the pragma and silently skip to the pragma eol.
409
c8dcf64b
GA
4102021-12-12 Jonathan Wakely <jwakely@redhat.com>
411
412 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
413 * c-parser.c: Likewise.
414
4b4839e3
GA
4152021-12-09 Jakub Jelinek <jakub@redhat.com>
416
417 PR pch/71934
418 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
419 to resort_data.new_value.
420
641ff219
GA
4212021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
422
423 * c-parser.c (struct omp_dim): New struct type for use inside
424 c_parser_omp_variable_list.
425 (c_parser_omp_variable_list): Allow multiple levels of array and
426 component accesses in array section base-pointer expression.
427 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
428 c_parser_omp_var_list_parens.
429 (c_parser_omp_clause_from): Likewise.
430 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
431 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
432 POINTER_PLUS_EXPR.
433 (c_finish_omp_clauses): Extend allowed ranged of expressions
434 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
435
4362021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
437
438 PR middle-end/92120
439 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
440 call to c_parser_omp_variable_list to 'true'.
441 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
442 array base handling.
443 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
444
c177e806
GA
4452021-11-30 Thomas Schwinge <thomas@codesourcery.com>
446
447 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
448 orphan loop" checking.
449
4502021-11-30 Cesar Philippidis <cesar@codesourcery.com>
451 Thomas Schwinge <thomas@codesourcery.com>
452
453 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
454 OpenACC gang reductions.
455
4562021-11-30 Richard Biener <rguenther@suse.de>
457
458 * gimple-parser.c (c_parser_gimple_postfix_expression):
459 avoid unreachable code after break.
460
87cd82c8
GA
4612021-11-29 Eric Gallager <egallager@gcc.gnu.org>
462
463 PR other/103021
464 * Make-lang.in: Use ETAGS variable in TAGS target.
465
4662021-11-29 Richard Biener <rguenther@suse.de>
467
468 * c-typeck.c (c_tree_equal): Remove unreachable return.
469 * c-parser.c (get_matching_symbol): Likewise.
470
e1d43592
GA
4712021-11-23 Jakub Jelinek <jakub@redhat.com>
472
473 * c-typeck.c (c_clone_omp_udr): Don't initialize
474 id.transform_lang_insert_block.
475
9c077398
GA
4762021-11-19 Martin Sebor <msebor@redhat.com>
477
478 PR c++/33925
479 PR c/102867
480 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
481 code resulting from macro expansion.
482
4832021-11-19 Martin Liska <mliska@suse.cz>
484
485 Revert:
486 2021-11-19 Martin Liska <mliska@suse.cz>
487
488 * c-parser.c (add_debug_begin_stmt): Use option directly.
489
483092d3
GA
4902021-11-18 Matthias Kretz <m.kretz@gsi.de>
491
492 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
493 * c-parser.c (c_parser_postfix_expression): Likewise.
494
4952021-11-18 Martin Liska <mliska@suse.cz>
496
497 * c-parser.c (add_debug_begin_stmt): Use option directly.
498
280d2838
GA
4992021-11-17 Martin Sebor <msebor@redhat.com>
500
501 PR c/101702
502 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
503 bounds before deciding if they're constant.
504
e2b57363
GA
5052021-11-15 Jakub Jelinek <jakub@redhat.com>
506
507 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
508 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
509
b39265d4
GA
5102021-11-11 Jakub Jelinek <jakub@redhat.com>
511
512 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
513 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
514 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
515 OMP_CLAUSE_NUM_TEAMS_EXPR.
516 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
517 combined target teams even lower-bound expression.
518
5192021-11-11 Richard Biener <rguenther@suse.de>
520
521 * gimple-parser.c: Shuffle bitmap.h include.
522
18ae471f
GA
5232021-11-03 Joseph Myers <joseph@codesourcery.com>
524
525 PR c/103031
526 * c-convert.c (c_convert): New function, based on convert.
527 (convert): Make into wrapper of c_convert.
528 (convert_init): New function.
529 * c-typeck.c (enum impl_conv): Add ic_init_const.
530 (convert_for_assignment): Handle ic_init_const like ic_init. Add
531 new argument to convert_and_check call.
532 (digest_init): Pass ic_init_const to convert_for_assignment for
533 initializers required to be constant.
534
b4df2dd3
GA
5352021-11-02 Richard Sandiford <richard.sandiford@arm.com>
536
537 * c-tree.h (c_simulate_record_decl): Declare.
538 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
539 * c-decl.c (c_simulate_record_decl): New function.
540
c2bd5d8a
GA
5412021-10-22 Eric Gallager <egallager@gcc.gnu.org>
542
543 PR other/102663
544 * Make-lang.in: Add dummy c.install-dvi target.
545
93d183a5
GA
5462021-10-15 Richard Biener <rguenther@suse.de>
547
548 PR c/102763
549 * gimple-parser.c
550 (c_parser_gimple_postfix_expression_after_primary): Check
551 for a pointer do be dereferenced by ->.
552
5d5885c9
GA
5532021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
554
555 * c-parser.c (c_finish_omp_declare_variant): Change call from
556 c_omp_check_context_selector to omp_check_context_selector. Change
557 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
558
c9db17b8
GA
5592021-10-09 Jakub Jelinek <jakub@redhat.com>
560
561 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
562 (c_parser_omp_scan_loop_body): Use it.
563 (c_parser_omp_sections_scope): Likewise.
564
50e20ee6
GA
5652021-10-07 Richard Biener <rguenther@suse.de>
566
567 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
568
bb6194e0
GA
5692021-10-05 Richard Biener <rguenther@suse.de>
570
571 PR c/102605
572 * gimple-parser.c (c_parser_gimple_postfix_expression):
573 Accept more address _Literals.
574
da9c5f78
GA
5752021-10-04 Marek Polacek <polacek@redhat.com>
576
577 PR c++/97573
578 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
579
9d116bcc
GA
5802021-10-01 Martin Sebor <msebor@redhat.com>
581
582 PR c/102103
583 * c-typeck.c (maybe_warn_for_null_address): New function.
584 (build_binary_op): Call it.
585
5862021-10-01 Jakub Jelinek <jakub@redhat.com>
587 Richard Biener <rguenther@suse.de>
588
589 PR sanitizer/102515
590 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
591 for division even for SANITIZE_SI_OVERFLOW.
592
5932021-10-01 Jakub Jelinek <jakub@redhat.com>
594
595 * c-parser.c (c_parser_omp_clause_order): Set
596 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
597
fd133479
GA
5982021-09-28 Andrew Pinski <apinski@marvell.com>
599
600 PR c/32122
601 * c-parser.c (c_parser_statement_after_labels): Pass
602 the c_expr instead of the tree to c_finish_goto_ptr.
603 * c-typeck.c (c_finish_goto_ptr): Change the second
604 argument type to c_expr.
605 * c-tree.h (c_finish_goto_ptr): Likewise.
606 Error out if the expression was not of a pointer type.
607
e4777439
GA
6082021-09-22 Jakub Jelinek <jakub@redhat.com>
609
610 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
611 modifiers.
612
cf74e7b5
GA
6132021-09-18 Jakub Jelinek <jakub@redhat.com>
614
615 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
616 and reproducible modifiers.
617 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
618
6192021-09-18 Jakub Jelinek <jakub@redhat.com>
620
621 * c-parser.c (c_parser_omp_clause_default): Handle private and
622 firstprivate arguments, adjust diagnostics on unknown argument.
623
0a4cb439
GA
6242021-09-17 Jakub Jelinek <jakub@redhat.com>
625
626 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
627 is true.
628
a26206ec
GA
6292021-09-10 Jakub Jelinek <jakub@redhat.com>
630
631 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
632 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
633 don't call build_conditional_expr, instead build a COND_EXPR directly.
634 (c_parser_binary_expression): Avoid calling parser_build_binary_op
635 if omp_atomic_lhs even in more cases for >, < or ==.
636 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
637 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
638 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
639 * c-typeck.c (build_binary_op): For flag_openmp only handle
640 MIN_EXPR/MAX_EXPR.
641
b2748138
GA
6422021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
643
644 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
645 directive.
646
e11c6046
GA
6472021-09-01 Iain Sandoe <iain@sandoe.co.uk>
648
649 * c-decl.c (enum deprecated_states): Add unavailable state.
650 (merge_decls): Copy unavailability.
651 (quals_from_declspecs): Handle unavailable case.
652 (start_decl): Amend the logic handling suppression of nested
653 deprecation states to include unavailability.
654 (smallest_type_quals_location): Amend comment.
655 (grokdeclarator): Handle the unavailable deprecation state.
656 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
657 * c-tree.h (struct c_declspecs): Add unavailable_p.
658 * c-typeck.c (build_component_ref): Handle unavailability.
659 (build_external_ref): Likewise.
660
6612021-09-01 Roger Sayle <roger@nextmovesoftware.com>
662 Joseph Myers <joseph@codesourcery.com>
663
664 PR c/79412
665 * c-decl.c (duplicate_decls): On significant mismatches, mark the
666 types of both (non-function) decls as error_mark_node, so that the
667 middle-end can see the code is malformed.
668 (free_attr_access_data): Don't process if the type has been set to
669 error_mark_node.
670
6d51ee43
GA
6712021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
672
673 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
674 and 'ancestor' in 'target device' clauses.
675
38b19c5b
GA
6762021-08-23 Jakub Jelinek <jakub@redhat.com>
677
678 * c-parser.c (c_parser_omp_clause_num_tasks,
679 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
680
5b2876f9
GA
6812021-08-22 Martin Uecker <muecker@gwdg.de>
682
683 PR c/98397
684 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
685 for pointers to arrays with qualifiers.
686 (build_conditional_expr): For C23 don't lose qualifiers for pointers
687 to arrays when the other pointer is a void pointer. Update warnings.
688 (convert_for_assignment): Update warnings for C2X when converting from
689 void* with qualifiers to a pointer to array with the same qualifiers.
690
7c9e1645
GA
6912021-08-20 Jakub Jelinek <jakub@redhat.com>
692
693 * c-parser.c (c_parser_omp_error): New function.
694 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
695
6962021-08-20 Jakub Jelinek <jakub@redhat.com>
697
698 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
699 comma at the end of list.
700 (c_parser_omp_requires): Likewise.
701
b57fba5e
GA
7022021-08-19 Jakub Jelinek <jakub@redhat.com>
703
704 * c-parser.c (c_parser_omp_requires): Don't call
705 c_parser_peek_2nd_token and optionally consume token if current
706 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
707
6e529985
GA
7082021-08-18 Jakub Jelinek <jakub@redhat.com>
709
710 * c-parser.c (c_parser_omp_nothing): New function.
711 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
712
7132021-08-18 Jakub Jelinek <jakub@redhat.com>
714
715 * c-parser.c (c_parser_statement_after_labels): Add restart label
716 near the start of the function. If c_parser_pragma returns false,
717 goto restart.
718 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
719 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
720 return what c_parser_omp_declare returned. Return true instead of
721 false after emitting errors that the directive is not allowed in
722 pragma_stmt context.
723 (c_parser_omp_ordered): Return true instead of
724 false after emitting errors that the directive is not allowed in
725 pragma_stmt context.
726 (c_parser_omp_target_update): Likewise.
727 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
728 Change return type from tree to bool, return false if the
729 directive should be ignored in pragma_stmt contexts.
730 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
731 return their result directly.
732 (c_parser_omp_cancellation_point): Change return type from void to
733 bool, return false if the directive should be ignored in pragma_stmt
734 contexts.
735 (c_parser_omp_declare): Likewise.
736
2d14d64b
GA
7372021-08-17 Jakub Jelinek <jakub@redhat.com>
738
739 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
740 (c_parser_omp_scope): New function.
741 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
742
72be20e2
GA
7432021-08-12 Jakub Jelinek <jakub@redhat.com>
744
745 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
746 (c_parser_omp_clause_filter): New function.
747 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
748 (OMP_MASKED_CLAUSE_MASK): Define.
749 (c_parser_omp_masked): New function.
750 (c_parser_omp_parallel): Handle parallel masked.
751 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
752 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
753
7542021-08-12 Martin Uecker <muecker@gwdg.de>
755
756 PR c/101838
757 PR c/29970
758 * c-typeck.c (c_expr_sizeof_type): Evaluate
759 size expressions for structs of variable size.
760
7612021-08-12 Tobias Burnus <tobias@codesourcery.com>
762
763 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
764 'primary' as alias for 'master'.
765
3ae564ea
GA
7662021-08-10 Martin Uecker <muecker@gwdg.de>
767
768 PR c/29970
769 * c-typeck.c (c_expr_sizeof_expr): Evaluate
770 size expressions for structs of variable size.
771
f92f4778
GA
7722021-08-06 Tamar Christina <tamar.christina@arm.com>
773
774 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
775 * c-tree.h (c_simulate_enum_decl): Likewise.
776
7772021-08-06 Martin Sebor <msebor@redhat.com>
778
779 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
780 vec arguments to by-reference.
781 (c_finish_omp_declare_simd): Same.
782 (c_parser_compound_statement_nostart): Same.
783 (c_parser_for_statement): Same.
784 (c_parser_objc_methodprotolist): Same.
785 (c_parser_oacc_routine): Same.
786 (c_parser_omp_for_loop): Same.
787 (c_parser_omp_declare_simd): Same.
788
419c6c68
GA
7892021-07-21 Thomas Schwinge <thomas@codesourcery.com>
790 Joseph Myers <joseph@codesourcery.com>
791 Cesar Philippidis <cesar@codesourcery.com>
792
793 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
794 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
795 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
796 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
797
92d45509
GA
7982021-07-20 Martin Sebor <msebor@redhat.com>
799
800 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
801 by-const-reference.
802 * c-typeck.c (c_build_function_call_vec): Same.
803
d97d71a1
GA
8042021-07-15 Martin Sebor <msebor@redhat.com>
805
806 PR c/101289
807 PR c/97548
808 * c-decl.c (get_parm_array_spec): Strip nops.
809
6fba0eea
GA
8102021-07-06 Martin Sebor <msebor@redhat.com>
811
812 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
813
7a60a6e8
GA
8142021-07-02 Jakub Jelinek <jakub@redhat.com>
815
816 PR c/101297
817 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
818 appears before a CPP_NAME.
819
90708f87
GA
8202021-06-25 Martin Sebor <msebor@redhat.com>
821
822 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
823 warning_suppressed_p, suppress_warning, and copy_no_warning.
824 (diagnose_mismatched_decls): Same.
825 (duplicate_decls): Same.
826 (grokdeclarator): Same.
827 (finish_function): Same.
828 (c_write_global_declarations_1): Same.
829 * c-fold.c (c_fully_fold_internal): Same.
830 * c-parser.c (c_parser_expr_no_commas): Same.
831 (c_parser_postfix_expression): Same.
832 * c-typeck.c (array_to_pointer_conversion): Same.
833 (function_to_pointer_conversion): Same.
834 (default_function_array_conversion): Same.
835 (convert_lvalue_to_rvalue): Same.
836 (default_conversion): Same.
837 (build_indirect_ref): Same.
838 (build_function_call_vec): Same.
839 (build_atomic_assign): Same.
840 (build_unary_op): Same.
841 (c_finish_return): Same.
842 (emit_side_effect_warnings): Same.
843 (c_finish_stmt_expr): Same.
844 (c_omp_clause_copy_ctor): Same.
845
9aa8327e
GA
8462021-06-24 Jakub Jelinek <jakub@redhat.com>
847
848 PR c/101176
849 * c-parser.c (c_parser_has_attribute_expression): Set source range for
850 the result.
851
8522021-06-24 Jakub Jelinek <jakub@redhat.com>
853
854 PR c/101171
855 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
856 error_mark_node.
857
8582021-06-24 Jakub Jelinek <jakub@redhat.com>
859
860 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
861 C_ORT_OMP for clauses on target construct.
862 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
863 (c_parser_omp_target): For non-combined target add
864 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
865 C_ORT_OMP_TARGET to c_finish_omp_clauses.
866 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
867 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
868 never present on C_ORT_*DECLARE_SIMD.
869 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
870 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
871 corresponding map clauses.
872
2f080224
GA
8732021-06-21 Jakub Jelinek <jakub@redhat.com>
874
875 PR inline-asm/100785
876 * c-typeck.c (c_mark_addressable): Diagnose trying to make
877 bit-fields addressable.
878
ede6c356
GA
8792021-06-15 Robin Dapp <rdapp@linux.ibm.com>
880
881 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
882 similar.
883
8dc48181
GA
8842021-06-14 Tobias Burnus <tobias@codesourcery.com>
885
886 PR c/100913
887 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
888 var in the error case.
889
438aac59
GA
8902021-06-07 Eric Botcazou <ebotcazou@adacore.com>
891
892 PR c/100920
893 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
894 spot built-in functions.
895
7d6987e9
GA
8962021-06-06 Jakub Jelinek <jakub@redhat.com>
897
898 PR c/100902
899 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
900 even when target is combined with other constructs.
901
9022021-06-06 Eric Botcazou <ebotcazou@adacore.com>
903
904 PR c/100920
905 * c-decl.c (finish_struct): Fix thinko in previous change.
906 * c-typeck.c (convert_for_assignment): Do not warn on pointer
907 assignment and initialization for storage order purposes if the
908 RHS is a call to a DECL_IS_MALLOC function.
909
600f90cb
GA
9102021-06-04 Martin Sebor <msebor@redhat.com>
911
912 PR c/100783
913 * c-objc-common.c (print_type): Handle erroneous types.
914
440c8a0a
GA
9152021-06-03 Jakub Jelinek <jakub@redhat.com>
916
917 PR c++/100859
918 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
919 after depend only cases.
920
ee682192
GA
9212021-05-31 Richard Biener <rguenther@suse.de>
922
923 PR c++/88601
924 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
925 * c-parser.c (c_parser_postfix_expression): Likewise.
926
48166757
GA
9272021-05-28 Richard Biener <rguenther@suse.de>
928
929 PR c/100803
930 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
931 invalid if conditions.
932
9332021-05-28 Jakub Jelinek <jakub@redhat.com>
934
935 PR middle-end/99928
936 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
937 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
938 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
939 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
940 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
941 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
942 if present in map_head, map_field_head or map_firstprivate_head
943 bitmaps.
944
9452021-05-28 Tobias Burnus <tobias@codesourcery.com>
946
947 * c-parser.c (c_parser_omp_clause_affinity): New.
948 (c_parser_omp_clause_name, c_parser_omp_variable_list,
949 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
950 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
951 c_finish_omp_clauses): Likewise.
952
01c59ef2
GA
9532021-05-26 Eric Botcazou <ebotcazou@adacore.com>
954
955 PR c/100653
956 * c-decl.c (finish_struct): Warn for a union containing an aggregate
957 field with a differing scalar storage order.
958
2832d51b
GA
9592021-05-21 Jakub Jelinek <jakub@redhat.com>
960
961 PR middle-end/99928
962 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
963 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
964 if a decl is mentioned both in map clause and in such firstprivate
965 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
966
65f32e5d
GA
9672021-05-19 Jakub Jelinek <jakub@redhat.com>
968
969 PR middle-end/99928
970 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
971 master when combined with taskloop.
972 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
973 parallel master when not combined with taskloop.
974
a8daf9a1
GA
9752021-05-18 Richard Biener <rguenther@suse.de>
976
977 PR c/100522
978 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
979 Diagnose calls to non-functions.
980 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
981
a7ffc1ef
GA
9822021-05-17 Richard Biener <rguenther@suse.de>
983
984 PR c/100625
985 * gimple-parser.c (c_parser_gimple_label): Avoid building
986 a GIMPLE label with NULL label decl.
987
f9af11c7
GA
9882021-05-13 Martin Sebor <msebor@redhat.com>
989
990 PR c/100550
991 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
992
0ff3a0f2
GA
9932021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
994
995 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
996 'close'.
997
aa891c56
GA
9982021-05-10 Martin Liska <mliska@suse.cz>
999
1000 * c-aux-info.c (affix_data_type): Use startswith
1001 function instead of strncmp.
1002 * c-typeck.c (build_function_call_vec): Likewise.
1003 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
1004
62d87a32
GA
10052021-05-07 Eric Botcazou <ebotcazou@adacore.com>
1006
1007 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
1008 on the address of a pointer field in a record with reverse SSO.
1009
99e8df7a
GA
10102021-05-04 Tobias Burnus <tobias@codesourcery.com>
1011
1012 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
1013 for || and && reductions.
1014
3c8e539d
GA
10152021-04-29 Joseph Myers <joseph@codesourcery.com>
1016
1017 * c-typeck.c (function_types_compatible_p): For C2X, treat
1018 unprototyped function as compatible with non-variadic prototyped
1019 function even if some argument types are changed by the default
1020 argument promotions.
1021
ee351f7f
GA
10222021-04-15 Martin Sebor <msebor@redhat.com>
1023
1024 PR c/99420
1025 PR c/99972
1026 * c-decl.c (pushdecl): Always propagate type attribute.
1027
10282021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1029
1030 PR c/98852
1031 * c-typeck.c (c_common_type): Do not drop attributes that
1032 affect type identity.
1033
1d54b138
GA
10342021-04-10 Jakub Jelinek <jakub@redhat.com>
1035
1036 PR c/99990
1037 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
1038 error_mark_node.
1039
4493b1c1
GA
10402021-03-25 Jakub Jelinek <jakub@redhat.com>
1041
1042 PR c++/99565
1043 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
1044 to operand_equal_p.
1045
5f256a70
GA
10462021-03-19 Jakub Jelinek <jakub@redhat.com>
1047
1048 PR c/99588
1049 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
1050 with modifycode NOP_EXPR produces and mark the _Atomic var as read
1051 if found.
1052 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
1053 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
1054 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
1055
3c5b6d24
GA
10562021-03-15 Tobias Burnus <tobias@codesourcery.com>
1057
1058 PR c++/99509
1059 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
1060 ensure that the varpool node is marked as offloadable.
1061
ceae9533
GA
10622021-03-05 Tobias Burnus <tobias@codesourcery.com>
1063
1064 PR c/99137
1065 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
1066
4028d01a
GA
10672021-02-24 Martin Sebor <msebor@redhat.com>
1068
1069 PR middle-end/97172
1070 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
1071
bf81237e
GA
10722021-02-18 Jakub Jelinek <jakub@redhat.com>
1073
1074 PR c/99136
1075 * c-typeck.c (c_finish_return): Don't wrap retval into
1076 EXCESS_PRECISION_EXPR in functions that return void.
1077
0c5cdb31
GA
10782021-02-11 Marek Polacek <polacek@redhat.com>
1079
1080 * c-parser.c (c_parser_if_statement): Use vec_free.
1081
a19dd5e6
GA
10822021-02-04 Martin Sebor <msebor@redhat.com>
1083
1084 PR c/97882
1085 * c-decl.c (locate_old_decl): Add type to diagnostic output.
1086 (diagnose_mismatched_decls): Same.
1087 (start_function): Introduce temporaries for better readability.
1088 * c-typeck.c (comptypes_internal): Only consider complete enum
1089 types in comparisons with integers.
1090
f7884fb1
GA
10912021-02-01 Martin Sebor <msebor@redhat.com>
1092
1093 PR middle-end/97172
1094 * c-decl.c (free_attr_access_data): New function.
1095 (c_parse_final_cleanups): Call free_attr_access_data.
1096
59cf67d1
GA
10972021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1098
1099 * c-parser.c (c_parser_omp_clause_detach): New.
1100 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
1101 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
1102 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
1103 clause. Prevent use of detach with mergeable and overriding the
1104 data sharing mode of the event handle.
1105
2f7f0d32
GA
11062021-01-15 Jakub Jelinek <jakub@redhat.com>
1107
1108 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
1109 unqualified element type and then call c_build_qualified_type on the
1110 ARRAY_TYPE.
1111
7d187e4f
GA
11122021-01-07 Richard Biener <rguenther@suse.de>
1113
1114 * gimple-parser.c (c_parser_gimple_compound_statement): Only
1115 reallocate loop array if it is too small.
1116
eefe499f
GA
11172020-12-16 Martin Uecker <muecker@gwdg.de>
1118
1119 PR c/98047
1120 * c-typeck.c (build_modify_expr): Drop qualifiers.
1121
11222020-12-16 Martin Uecker <muecker@gwdg.de>
1123
1124 PR c/98260
1125 * c-parser.c (c_parser_expression): Look into
1126 nop expression when marking expressions as read.
1127
d52945ce
GA
11282020-12-14 Martin Liska <mliska@suse.cz>
1129
1130 PR sanitizer/98204
1131 * c-typeck.c (pointer_diff): Do not emit a top-level
1132 sanitization.
1133 (build_binary_op): Likewise.
1134
ca2bd949
GA
11352020-12-09 Tobias Burnus <tobias@codesourcery.com>
1136
1137 * c-parser.c (c_parser_omp_allocate): New.
1138 (c_parser_omp_construct): Call it.
1139
11402020-12-09 Richard Biener <rguenther@suse.de>
1141
1142 PR c/98200
1143 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
1144 early on error.
1145
bc8a7013
GA
11462020-12-07 Martin Uecker <muecker@gwdg.de>
1147
1148 PR c/97981
1149 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
1150 that drops qualifiers to the end of the function.
1151
d48df6f2
GA
11522020-11-26 Martin Uecker <muecker@gwdg.de>
1153
1154 PR c/65455
1155 PR c/92935
1156 * c-parser.c (c_parser_declaration_or_fndef): Remove
1157 redundant code to drop qualifiers of _Atomic types for __auto_type.
1158 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
1159 types for __typeof__.
1160
1e2c9a27
GA
11612020-11-24 Jakub Jelinek <jakub@redhat.com>
1162
1163 PR c/97958
1164 * c-parser.c (c_parser_binary_expression): For omp atomic binary
1165 expressions, use make_node instead of build2 to avoid checking build2
1166 performs.
1167
8e6198d0
GA
11682020-11-23 Joseph Myers <joseph@codesourcery.com>
1169
1170 PR c/95630
1171 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
1172 for comparisons of complete and incomplete pointers.
1173
7a97e2fc
GA
11742020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1175
1176 * c-aux-info.c (gen_type): Support opaque types.
1177
82e5048e
GA
11782020-11-20 Martin Sebor <msebor@redhat.com>
1179
1180 PR middle-end/97879
1181 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
1182
11832020-11-20 Jakub Jelinek <jakub@redhat.com>
1184
1185 PR other/97911
1186 * Make-lang.in (c.serial): Change from goal to a variable.
1187 (.PHONY): Drop c.serial.
1188
11892020-11-20 Martin Uecker <muecker@gwdg.de>
1190
1191 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
1192
d62586ee
GA
11932020-11-19 Jakub Jelinek <jakub@redhat.com>
1194
1195 PR c/97860
1196 * c-decl.c (get_parm_array_spec): Bail out of nelts is
1197 error_operand_p.
1198
25bb75f8
GA
11992020-11-18 Jakub Jelinek <jakub@redhat.com>
1200
1201 * Make-lang.in (c.serial): New goal.
1202 (.PHONY): Add c.serial c.prev.
1203 (cc1$(exeext)): Call LINK_PROGRESS.
1204
77f67db2
GA
12052020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1206
1207 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1208 goto too.
1209 * c-typeck.c (build_asm_expr): Remove an assert checking output
1210 absence for asm goto.
1211
12122020-11-13 Jakub Jelinek <jakub@redhat.com>
1213
1214 * c-typeck.c (c_finish_omp_clauses): Don't clear
1215 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1216
12172020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1218
1219 PR objc/77404
1220 * c-parser.c (c_parser_objc_class_definition): Pass the
1221 location of the class name to the interface declaration.
1222
bb622641
GA
12232020-11-10 Strager Neds <strager.nds@gmail.com>
1224
1225 * c-decl.c (merge_decls): Use new overload of
1226 set_decl_section_name.
1227
12282020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1229
1230 * c-parser.c (c_parser_omp_target_data): Add use of
1231 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1232 handled map clause kind.
1233 (c_parser_omp_target_enter_data): Likewise.
1234 (c_parser_omp_target_exit_data): Likewise.
1235 (c_parser_omp_target): Likewise.
1236 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1237 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1238 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1239 same struct field access to co-exist on OpenMP construct.
1240
2da7ee05
GA
12412020-11-07 Martin Uecker <muecker@gwdg.de>
1242
1243 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1244 (c_parser_all_labels): Likewise.
1245
44cab2d8
GA
12462020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1247
1248 * c-parser.c (c_parser_objc_at_property_declaration):
1249 Improve parsing fidelity. Associate better location info
1250 with @property attributes. Clean up the interface to
1251 objc_add_property_declaration ().
1252
12532020-11-06 Nathan Sidwell <nathan@acm.org>
1254
1255 * c-decl.c (diagnose_mismatched_decls): Rename
1256 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1257 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1258 (collect_source_refs): Likewise.
1259 * c-typeck.c (inform_declaration, inform_for_arg)
1260 (convert_for_assignment): Likewise.
1261
12622020-11-06 Tobias Burnus <tobias@codesourcery.com>
1263
1264 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1265 OpenACC matching.
1266 (c_parser_omp_construct): Update call.
1267
35c125cb
GA
12682020-11-04 Jakub Jelinek <jakub@redhat.com>
1269
1270 PR c++/97670
1271 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1272 find underlying decl to clear in the aligned_head bitmap.
1273
12742020-11-04 Joseph Myers <joseph@codesourcery.com>
1275
1276 * c-decl.c (handle_nodiscard_attribute): New.
1277 (std_attribute_table): Add nodiscard.
1278 * c-parser.c (c_parser_std_attribute): Expect argument to
1279 nodiscard attribute to be a string. Do not special-case ignoring
1280 nodiscard.
1281 * c-typeck.c (maybe_warn_nodiscard): New.
1282 (build_compound_expr, emit_side_effect_warnings): Call
1283 maybe_warn_nodiscard.
1284 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1285 emit_side_effect_warnings if warn_unused_result.
1286
4f0606fe
GA
12872020-10-29 Asher Gordon <AsDaGo@posteo.net>
1288
1289 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1290 with XDELETE.
1291 (finish_init): Likewise.
1292 (pop_init_level): Likewise.
1293
e93aae4a
GA
12942020-10-28 Joseph Myers <joseph@codesourcery.com>
1295
1296 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1297 error_at for omitted parameter name.
1298
12992020-10-28 Jakub Jelinek <jakub@redhat.com>
1300
1301 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1302 (c_parser_omp_clause_allocate): New function.
1303 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1304 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1305 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1306 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1307 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1308 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1309 PRAGMA_OMP_CLAUSE_ALLOCATE.
1310 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1311
89bb01e7
GA
13122020-10-27 Joseph Myers <joseph@codesourcery.com>
1313
1314 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1315 standard attributes.
1316
efe71fcc
GA
13172020-10-23 Marek Polacek <polacek@redhat.com>
1318
1319 PR c++/91741
1320 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1321 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1322 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1323 * c-tree.h (char_type_p): Declare.
1324 * c-typeck.c (char_type_p): No longer static.
1325
13262020-10-23 Martin Sebor <msebor@redhat.com>
1327
1328 PR middle-end/97552
1329 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1330
2fe5b7d1
GA
13312020-09-19 Martin Sebor <msebor@redhat.com>
1332
1333 PR c/50584
1334 * c-decl.c (lookup_last_decl): Define new function.
1335 (c_decl_attributes): Call it.
1336 (start_decl): Add argument and use it.
1337 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1338 (get_parm_array_spec): Define new function.
1339 (push_parm_decl): Call get_parm_array_spec.
1340 (start_function): Call warn_parm_array_mismatch. Build attribute
1341 access and add it to current function.
1342 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1343 in forms of array parameters.
1344 * c-tree.h (start_decl): Add argument.
1345
13462020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1347
1348 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1349 with...
1350 (in_statement): New.
1351 (start_function): Adjust for above change.
1352 (c_push_function_context, c_pop_function_context): Likewise.
1353 * c-lang.h (struct language_function): Likewise.
1354 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1355 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1356 New.
1357 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1358 (c_parser_switch_statement): Adjust break/switch context handling
1359 and calls to renamed functions.
1360 (c_parser_while_statement): Adjust break/switch context handling and
1361 build a WHILE_STMT.
1362 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1363 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1364 (c_parser_omp_for_loop): Adjust break/switch context handling.
1365 * c-tree.h (c_break_label, c_cont_label): Delete.
1366 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1367 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1368 (in_statement, switch_statement_break_seen_p): Declare.
1369 (c_start_case, c_finish_case): Renamed to...
1370 (c_start_switch, c_finish_switch).
1371 (c_finish_bc_stmt): Adjust arguments.
1372 * c-typeck.c (build_function_call_vec): Don't try to print
1373 statements with %qE format.
1374 (struct c_switch): Rename switch_expr field to switch_stmt.
1375 Add break_stmt_seen_p field.
1376 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1377 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1378 (do_case): Update for changes to struct c_switch.
1379 (c_finish_case): Rename to c_finish_switch. Update for changes to
1380 struct c_switch and change of representation from SWITCH_EXPR to
1381 SWITCH_STMT.
1382 (c_finish_loop): Delete.
1383 (c_finish_bc_stmt): Update to reflect changes to break/continue
1384 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1385 of a GOTO_EXPR except for objc foreach loops.
1386
e1a4a8a0
GA
13872020-09-01 Jakub Jelinek <jakub@redhat.com>
1388
1389 PR c++/96867
1390 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1391 only on PARM_DECLs.
1392
8f7ea26a
GA
13932020-08-28 Martin Sebor <msebor@redhat.com>
1394
1395 PR c/96596
1396 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1397 argument type.
1398
8b394f01
GA
13992020-08-27 Martin Liska <mliska@suse.cz>
1400
1401 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1402 growth function to true.
1403
db0f6efe
GA
14042020-08-25 Tobias Burnus <tobias@codesourcery.com>
1405
1406 PR c/96678
1407 * c-typeck.c (handle_omp_array_sections_1): Talk about
1408 array function parameter in the error message.
1409
5c265693
GA
14102020-08-18 Jakub Jelinek <jakub@redhat.com>
1411
1412 PR c/96571
1413 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1414 to int, holding index of the match. Call mark_exp_read on the selector
1415 expression and on expressions other than the selected one.
1416
4967ca2f
GA
14172020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1418
1419 PR c/96377
1420 * c-typeck.c (process_init_element): Split test for whether to
1421 recurse into a record, union or array into...
1422 (initialize_elementwise_p): ...this new function. Don't recurse
1423 into a vector type if the initialization value is also a vector.
1424
48cc2e46
GA
14252020-07-31 Richard Biener <rguenther@suse.de>
1426
1427 PR debug/96383
1428 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1429 Define to c_common_finalize_early_debug.
1430
3ea9abca
GA
14312020-07-22 Tobias Burnus <tobias@codesourcery.com>
1432
1433 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1434 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1435 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1436
30430061
GA
14372020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1438
1439 PR target/95237
1440 * c-decl.c (finish_decl): Call target hook
1441 lower_local_decl_alignment to lower local decl alignment.
1442
3f8ca9cb
GA
14432020-07-09 Julian Brown <julian@codesourcery.com>
1444 Thomas Schwinge <thomas@codesourcery.com>
1445
1446 PR middle-end/95270
1447 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1448 for standalone attach/detach clauses.
1449
a82c4c4c 14502020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1451
1452 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1453 set, warn for conversion between pointers that point to incompatible
1454 scalar storage orders.
1455
f60ee68d
GA
14562020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1457
1458 * c-parser.c (c_parser_statement_after_labels): Pass correct
1459 parameters to c_parser_do_statement.
1460
56638b9b
GA
14612020-06-16 Jakub Jelinek <jakub@redhat.com>
1462
1463 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1464 c_in_omp_for.
1465 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1466 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1467 c_finish_omp_for.
1468 * c-tree.h (c_in_omp_for): Declare.
1469 * c-typeck.c (c_in_omp_for): Define.
1470 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1471 (digest_init): Likewise.
1472 (build_binary_op): Likewise.
1473
14742020-06-16 Jakub Jelinek <jakub@redhat.com>
1475
1476 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1477 from kind by comma rather than colon.
1478
1a59f3db
GA
14792020-06-05 Mark Wielaard <mark@klomp.org>
1480
1481 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1482 an undeclared builtin, then add a fixit header hint, if found.
1483 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1484 warning_at about implicit builtin declaration type mismatch.
1485
9a5b7438
GA
14862020-06-03 Mark Wielaard <mark@klomp.org>
1487
1488 * c-parser.c (struct c_parser): Add seen_string_literal
1489 bitfield.
1490 (c_parser_consume_token): Reset seen_string_literal.
1491 (c_parser_error_richloc): Add name_hint if seen_string_literal
1492 and next token is a CPP_NAME and we have a missing header
1493 suggestion for the name.
1494 (c_parser_string_literal): Set seen_string_literal.
1495
14962020-06-03 Mark Wielaard <mark@klomp.org>
1497
1498 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1499 scope with matching_parens after CPP_OPEN_PAREN.
1500
15012020-06-03 Tobias Burnus <tobias@codesourcery.com>
1502
1503 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1504
53ffb43a
GA
15052020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1506
1507 * Make-lang.in: Remove extra slash.
1508
8f66f175
ML
15092020-05-19 Martin Liska <mliska@suse.cz>
1510
1511 * c-parser.c: Fix typo.
1512
49ddde69
JJ
15132020-05-14 Jakub Jelinek <jakub@redhat.com>
1514
1515 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1516
eb72dc66
RB
15172020-05-07 Richard Biener <rguenther@suse.de>
1518
1519 PR middle-end/94703
1520 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1521 DECL_GIMPLE_REG_P.
1522
bf915591
JJ
15232020-04-30 Jakub Jelinek <jakub@redhat.com>
1524
1525 PR c/94842
1526 * c-decl.c (set_labels_context_r): In addition to context-less
1527 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1528 parent function if any.
1529 (store_parm_decls): Adjust comment.
1530
e1113ffb
JJ
15312020-04-19 Jakub Jelinek <jakub@redhat.com>
1532
1533 PR objc/94637
1534 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1535 two CPP_COLON tokens.
1536
2e389749
JJ
15372020-04-17 Jakub Jelinek <jakub@redhat.com>
1538
1539 PR other/94629
1540 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1541 to data.clauses.
1542
2dc9294c
JJ
15432020-04-15 Jakub Jelinek <jakub@redhat.com>
1544
1545 PR c/94593
1546 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1547 requires directive when not at file scope.
1548
13e41d8b
TB
15492020-04-08 Tobias Burnus <tobias@codesourcery.com>
1550
1551 PR middle-end/94120
1552 * c-decl.c (c_check_in_current_scope): New function.
1553 * c-tree.h (c_check_in_current_scope): Declare it.
1554 * c-parser.c (c_parser_oacc_declare): Add check that variables
1555 are declared in the same scope as the directive. Fix handling
1556 of namespace vars.
1557
4df50a05
JJ
15582020-04-07 Jakub Jelinek <jakub@redhat.com>
1559
1560 PR c++/94512
1561 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1562 if c_parser_omp_master succeeded.
1563
5db9e893
JJ
15642020-03-23 Jakub Jelinek <jakub@redhat.com>
1565
1566 PR gcov-profile/94029
1567 PR c/94239
1568 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1569 the function_start_locus location. Don't do that afterwards for the
1570 __GIMPLE body parsing.
1571
9def91e9
JJ
15722020-03-19 Jakub Jelinek <jakub@redhat.com>
1573
1574 PR gcov-profile/94029
1575 * c-tree.h (finish_function): Add location_t argument defaulted to
1576 input_location.
1577 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1578 set it to the locus of closing } if non-NULL.
1579 (c_parser_compound_statement_nostart): Return locus of closing }.
1580 (c_parser_parse_rtl_body): Likewise.
1581 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1582 finish_function.
1583 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1584 input_location to set function_end_locus.
1585
046c5890
JJ
15862020-03-17 Jakub Jelinek <jakub@redhat.com>
1587
1588 PR c/94172
1589 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1590 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1591 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1592 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1593 ENUMERAL_TYPEs.
1594 (finish_incomplete_vars): New function, moved from finish_struct. Use
1595 relayout_decl instead of layout_decl.
1596 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1597 being TYPE_VFIELD. Use finish_incomplete_vars.
1598 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1599 finish_incomplete_vars.
1600 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1601 also on ENUMERAL_TYPEs.
1602
c015ff8c
JJ
16032020-03-16 Jakub Jelinek <jakub@redhat.com>
1604
1605 PR c/94179
1606 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1607
f2e9fe5f
MS
16082020-03-13 Martin Sebor <msebor@redhat.com>
1609
1610 PR c/94040
1611 * c-decl.c (builtin_structptr_type_count): New constant.
1612 (match_builtin_function_types): Reject decls that are incompatible
1613 in types pointed to by pointers.
1614 (diagnose_mismatched_decls): Adjust comments.
1615
c9d70946
JM
16162020-03-05 Joseph Myers <joseph@codesourcery.com>
1617
1618 PR c/93577
1619 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1620 empty when initialized type is error_mark_node.
1621 (set_designator, process_init_element): Ignore initializers for
1622 elements of a variable-size type or of error_mark_node.
1623
726e292d
MS
16242020-03-01 Martin Sebor <msebor@redhat.com>
1625
1626 PR middle-end/93926
1627 * c-decl.c (types_close_enough_to_match): New function.
1628 (match_builtin_function_types):
1629 (diagnose_mismatched_decls): Add missing inform call to a warning.
1630
a499c2f8
MS
16312020-03-01 Martin Sebor <msebor@redhat.com>
1632
1633 PR c/93812
1634 * c-typeck.c (build_functype_attribute_variant): New function.
1635 (composite_type): Call it.
1636
9c3da8cc
JJ
16372020-02-25 Jakub Jelinek <jakub@redhat.com>
1638
1639 PR other/93912
1640 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1641 Rename last argument from probablity to probability.
1642
bacdd5e9
JJ
16432020-02-13 Jakub Jelinek <jakub@redhat.com>
1644
1645 PR c/93576
1646 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1647 *expr if it has side effects.
1648
f9eb0973
JL
16492020-01-30 Jeff Law <law@redhat.com>
1650
1651 PR c/88660
1652 * c-parser.c (c_parser_switch_statement): Make sure to request
1653 marking the switch expr as used.
1654
ac68e287
JM
16552020-01-22 Joseph Myers <joseph@codesourcery.com>
1656
1657 PR c/93348
1658 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1659 argument with integer operands.
1660
852f0ae8
KK
16612020-01-16 Kerem Kat <keremkat@gmail.com>
1662
1663 PR c/92833
1664 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1665 to support 4 available tokens.
1666
e2346a33
JM
16672020-01-15 Joseph Myers <joseph@codesourcery.com>
1668
1669 PR c/93072
1670 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1671 determine whether to set DECL_CONTEXT.
1672
3d77686d
JM
16732020-01-13 Joseph Myers <joseph@codesourcery.com>
1674
1675 PR c/93241
1676 * c-typeck.c (build_c_cast): Check for expressions with integer
1677 operands that can occur in an unevaluated part of an integer
1678 constant expression and call note_integer_operands as needed.
1679
f74c4b2c
RB
16802019-01-08 Richard Biener <rguenther@suse.de>
1681
1682 PR middle-end/93199
1683 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1684 permanently.
1685
8d9254fc
JJ
16862020-01-01 Jakub Jelinek <jakub@redhat.com>
1687
1688 Update copyright years.
1689
39292e25
EB
16902019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1691
1692 * c-decl.c (collect_source_ref_cb): Delete.
1693 (for_each_global_decl): Rename into...
1694 (collect_source_refs): ...this. Call collect_source_ref directly.
1695 (c_parse_final_cleanups): Always call collect_source_ref on the main
1696 input filename.
1697
519d7496
JB
16982019-12-19 Julian Brown <julian@codesourcery.com>
1699 Cesar Philippidis <cesar@codesourcery.com>
1700
1701 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1702 detach clauses.
1703 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1704 Allow deref (->) in variable lists if true.
1705 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1706 Pass to c_parser_omp_variable_list.
1707 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1708 call to c_parser_omp_variable_list.
1709 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1710 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1711 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1712 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1713 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1714 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1715 and detach. Support deref.
1716 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1717 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1718 (c_oacc_check_attachments): New function.
1719 (c_finish_omp_clauses): Check attach/detach arguments for being
1720 pointers using above. Support deref.
1721
a6163563
JB
17222019-12-19 Julian Brown <julian@codesourcery.com>
1723 Maciej W. Rozycki <macro@codesourcery.com>
1724 Tobias Burnus <tobias@codesourcery.com>
1725 Thomas Schwinge <thomas@codesourcery.com>
1726
1727 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1728 (c_parser_oacc_data_clause): Likewise.
1729 (c_parser_oacc_all_clauses): Likewise.
1730 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1731 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1732 PRAGMA_OACC_CLAUSE_NO_CREATE.
1733 * c-typeck.c (handle_omp_array_sections): Support
1734 GOMP_MAP_NO_ALLOC.
1735
d68f5d45
DM
17362019-12-09 David Malcolm <dmalcolm@redhat.com>
1737
1738 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1739 Replace label_text ctor calls.
1740
4691bf46
JM
17412019-12-04 Joseph Myers <joseph@codesourcery.com>
1742
1743 PR c/36941
1744 PR c/88827
1745 * c-typeck.c (convert_lvalue_to_rvalue): Call
1746 require_complete_type for arguments not of void types.
1747 (build_indirect_ref): Do not diagnose dereferencing pointers to
1748 incomplete types.
1749 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1750
85d11957
JM
17512019-12-03 Joseph Myers <joseph@codesourcery.com>
1752
1753 PR c/88704
1754 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1755 old-style parameter definitions.
1756
4569f8b3
SL
17572019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1758
1759 PR target/92499
1760
1761 * c-decl.c (flexible_array_type_p): Move to common code.
1762
65ef05d0
RS
17632019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1764
1765 * c-decl.c (start_decl): Allow initialization of variables whose
1766 size is a POLY_INT_CST.
1767 (finish_decl): Use verify_type_context to check whether the target
1768 allows variables with a particular type to have static or thread-local
1769 storage duration. Don't raise a second error if such variables do
1770 not have a constant size.
1771 (grokdeclarator): Use verify_type_context to check whether the
1772 target allows fields or array elements to have a particular type.
1773 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1774 the target allows pointer difference for the types involved.
1775 (build_unary_op): Likewise for pointer increment and decrement.
1776
34b43828
JM
17772019-11-29 Joseph Myers <joseph@codesourcery.com>
1778
1779 * c-parser.c (struct c_parser): Add members raw_tokens and
1780 raw_tokens_used.
1781 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1782 using previously-lexed raw tokens.
1783 (c_parser_peek_nth_token_raw)
1784 (c_parser_check_balanced_raw_token_sequence): New functions.
1785 (c_parser_nth_token_starts_std_attributes): Use
1786 c_parser_check_balanced_raw_token_sequence for Objective-C.
1787
5b8d9367
JM
17882019-11-25 Joseph Myers <joseph@codesourcery.com>
1789
1790 PR c/91985
1791 * c-decl.c (finish_declspecs): Use int instead of decimal
1792 floating-point types if decimal floating-point not supported.
1793
1723e1be
JM
17942019-11-25 Joseph Myers <joseph@codesourcery.com>
1795
1796 * c-tree.h (struct c_declarator): Use a structure for id member.
1797 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1798 declarators at the start, not when handling individual declarators
1799 later. Use u.id.id instead of u.id.
1800 (grokfield): Use u.id.id instead of u.id.
1801 (build_id_declarator): Set u.id.id and u.id.attrs.
1802 (finish_declspecs): Handle postfix attributes in case of typedef
1803 name or typeof used.
1804 * c-parser.c (c_parser_direct_declarator)
1805 (c_parser_direct_declarator_inner): Place declarator for
1806 attributes inside that for function or array, not outside. Set
1807 u.id.attrs for identifiers.
1808 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1809 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1810 instead of u.id.
1811
bdaf8be1
JJ
18122019-11-22 Jakub Jelinek <jakub@redhat.com>
1813
1814 PR c/90677
1815 * c-decl.c (identifier_global_tag): Define.
1816
3e00ba47
RB
18172019-11-20 Richard Biener <rguenther@suse.de>
1818
1819 PR c/92088
1820 * c-decl.c (grokdeclarator): Prevent inlining of nested
1821 function with VLA arguments.
1822
8c5b727a
JM
18232019-11-20 Joseph Myers <joseph@codesourcery.com>
1824
1825 * c-decl.c (c_warn_type_attributes): New function.
1826 (groktypename, grokdeclarator, finish_declspecs): Call
1827 c_warn_type_attributes before applying attributes to types.
1828 * c-tree.h (c_warn_type_attributes): Declare.
1829
192961ff
JM
18302019-11-19 Joseph Myers <joseph@codesourcery.com>
1831
1832 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1833 standard attributes.
1834 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1835 pedwarn for unknown standard attributes and return error_mark_node
1836 for them.
1837
20a38017
MM
18382019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1839
1840 * c-parser.c (c_parser_parse_rtl_body): Always call
1841 run_rtl_passes, even if startwith pass is not provided.
1842
d5fbe5e0
JM
18432019-11-15 Joseph Myers <joseph@codesourcery.com>
1844
1845 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1846 duplicate standard attributes.
1847
97cc1187
JM
18482019-11-15 Joseph Myers <joseph@codesourcery.com>
1849
1850 * c-decl.c (std_attribute_table): Add maybe_unused.
1851
f8aea5e3
JM
18522019-11-15 Joseph Myers <joseph@codesourcery.com>
1853
1854 * c-decl.c (std_attribute_table): Add fallthrough.
1855 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1856 attribute at top level.
1857
2cc94aa8
JM
18582019-11-15 Joseph Myers <joseph@codesourcery.com>
1859
1860 * c-decl.c (std_attribute_table): New.
1861 (c_init_decl_processing): Register attributes from
1862 std_attribute_table.
1863 * c-parser.c (c_parser_attribute_arguments): Add arguments
1864 require_string and allow_empty_args. All callers changed.
1865 (c_parser_std_attribute): Set require_string argument for
1866 "deprecated" attribute.
1867
7c5890cc
JM
18682019-11-14 Joseph Myers <joseph@codesourcery.com>
1869
1870 * c-parser.c (c_parser_postfix_expression)
1871 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1872 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1873
e8738f4e
RS
18742019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1875
1876 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1877 of build_same_sized_truth_vector_type.
1878 (build_vec_cmp): Likewise.
1879
b2417b59
JJ
18802019-11-14 Jakub Jelinek <jakub@redhat.com>
1881
bedb7f04
JJ
1882 * c-parser.c (c_parser_omp_context_selector): Don't require score
1883 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1884 negative score.
1885
b2417b59
JJ
1886 * c-parser.c (c_parser_omp_context_selector): Rename
1887 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1888 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1889 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1890 and string literals.
1891
4e03c3a7
JM
18922019-11-14 Joseph Myers <joseph@codesourcery.com>
1893
1894 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1895 ctsk_tagfirstref_attrs.
1896 (struct c_declspecs): Update description of attrs. Add
1897 postfix_attrs and non_std_attrs_seen_p. Increase size of
1898 typespec_kind bit-field.
1899 (c_warn_unused_attributes): New declaration.
1900 (parser_xref_tag): Update prototype.
1901 * c-decl.c (c_warn_unused_attributes): New function.
1902 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1903 ctsk_tagref_attrs. Handle attribute declarations.
1904 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1905 (grokdeclarator): Handle standard attributes.
1906 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1907 attributes to incomplete type reference.
1908 (xref_tag): Update call to parser_xref_tag.
1909 (declspecs_add_addrspace, declspecs_add_type)
1910 (declspecs_add_scspec, declspecs_add_attrs): Set
1911 non_std_attrs_seen_p.
1912 (finish_declspecs): Apply postfix standard attributes to type.
1913 * c-parser.c (c_token_starts_declspecs)
1914 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1915 (c_parser_next_tokens_start_declaration): Update comments.
1916 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1917 parser->tokens[2] to parser->tokens[1].
1918 (c_parser_nth_token_starts_std_attributes)
1919 (c_parser_std_attribute_specifier_sequence): New functions.
1920 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1921 attrs. All callers changed. Handle standard attributes.
1922 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1923 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1924 All callers changed.
1925 (c_parser_declspecs): Add arguments start_std_attr_ok and
1926 end_std_attr_ok. All callers changed. Handle standard
1927 attributes.
1928 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1929 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1930 (c_parser_compound_statement_nostart, c_parser_all_labels)
1931 (c_parser_label, c_parser_statement, c_parser_for_statement):
1932 Handle standard attributes.
1933 * c-parser.h (c_parser_declspecs): Update prototype.
1934 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1935 c_parser_declspecs.
1936
0c29cac4
ML
19372019-11-12 Martin Liska <mliska@suse.cz>
1938
1939 * gimple-parser.c: Do not include params.h.
1940
028d4092
ML
19412019-11-12 Martin Liska <mliska@suse.cz>
1942
1943 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1944 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1945 macro.
1946
62aee289
MR
19472019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1948 Frederik Harwath <frederik@codesourcery.com>
1949
1950 gcc/c/
1951 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1952 (c_parser_oacc_kernels_parallel): Rename function to...
1953 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1954 (c_parser_omp_construct): Update accordingly.
1955
1956
7cec9588
JJ
19572019-11-11 Jakub Jelinek <jakub@redhat.com>
1958
1959 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1960 without corresponding end declare target.
1961
f486280c
RS
19622019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1963
1964 * c-convert.c (convert): Only handle vector conversions if one of
1965 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1966 allows it.
1967 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1968 vectors satisfy gnu_vector_type_p.
1969 (build_unary_op): Only allow unary operators to be applied to
1970 vectors if they satisfy gnu_vector_type_p.
1971 (digest_init): Only allow by-element initialization of vectors
1972 if they satisfy gnu_vector_type_p.
1973 (really_start_incremental_init): Likewise.
1974 (push_init_level): Likewise.
1975 (pop_init_level): Likewise.
1976 (process_init_element): Likewise.
1977 (build_binary_op): Only allow binary operators to be applied to
1978 vectors if they satisfy gnu_vector_type_p.
1979
017c6491
JM
19802019-11-08 Joseph Myers <joseph@codesourcery.com>
1981
1982 * c-decl.c (grokparms): Convert () in a function definition to
1983 (void) for C2x.
1984 (store_parm_decls_oldstyle): Pedwarn for C2x.
1985 (store_parm_decls): Update comment about () not generating a
1986 prototype.
1987
c01bd174
JM
19882019-11-07 Joseph Myers <joseph@codesourcery.com>
1989
1990 * c-parser.c (c_parser_attribute_arguments): New function.
1991 Factored out of c_parser_gnu_attribute.
1992 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1993 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1994 (c_parser_std_attribute_specifier): New functions.
1995 (c_parser_transaction_attributes): Use
1996 c_parser_std_attribute_specifier.
1997
471c5330
JM
19982019-11-07 Joseph Myers <joseph@codesourcery.com>
1999
2000 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
2001 lex_joined_string and translate_strings_p.
2002 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
2003 c_lex_with_flags.
2004 (c_parser_string_literal): New function.
2005 (c_parser_static_assert_declaration_no_semi): Use
2006 c_parser_string_literal. Do not set lex_untranslated_string.
2007 (c_parser_asm_string_literal): Use c_parser_string_literal.
2008 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
2009 (c_parser_gnu_attributes): Set and restore translate_strings_p
2010 instead of lex_untranslated_string.
2011 (c_parser_asm_statement): Do not set lex_untranslated_string.
2012 (c_parser_asm_operands): Likewise.
2013 (c_parser_has_attribute_expression): Set and restore
2014 translate_strings_p instead of lex_untranslated_string.
2015 (c_parser_postfix_expression): Use c_parser_string_literal.
2016 (pragma_lex): Likewise.
2017 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
2018 (c_parse_file): Set translate_strings_p.
2019 * gimple-parser.c (c_parser_gimple_postfix_expression)
2020 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
2021 * c-parser.c (c_parser_string_literal): Declare function.
2022
d0c464d2
JJ
20232019-11-02 Jakub Jelinek <jakub@redhat.com>
2024
2025 * c-parser.c (c_finish_omp_declare_variant): Use
2026 omp_get_context_selector instead of c_omp_get_context_selector.
2027
ac2cfa6c
RS
20282019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2029
2030 * c-tree.h (c_simulate_enum_decl): Declare.
2031 * c-decl.c (c_simulate_enum_decl): New function.
2032 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
2033
74078538
RS
20342019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2035
2036 * c-tree.h (c_simulate_builtin_function_decl): Declare.
2037 * c-decl.c (c_simulate_builtin_function_decl): New function.
2038 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
2039 to the above.
2040
ad1539d5
MS
20412019-10-28 Martin Sebor <msebor@redhat.com>
2042
2043 PR c/66970
2044 * c-decl.c (names_builtin_p): Define a new function.
2045
cb73e4e7
RB
20462019-10-28 Richard Biener <rguenther@suse.de>
2047
2048 PR c/92249
2049 * gimple-parser.c (c_parser_parse_gimple_body): Make
2050 current_bb the entry block initially to easier recover
2051 from errors.
2052 (c_parser_gimple_compound_statement): Adjust.
2053
135df52c
JJ
20542019-10-24 Jakub Jelinek <jakub@redhat.com>
2055
2056 * c-parser.c (c_finish_omp_declare_variant): Use
2057 omp_context_selector_matches instead of
2058 c_omp_context_selector_matches.
2059 * c-decl.c (c_decl_attributes): Add "omp declare target block"
2060 attribute in between declare target and end declare target
2061 pragmas.
2062
783bfe5e
JM
20632019-10-15 Joseph Myers <joseph@codesourcery.com>
2064
2065 * c-parser.c (c_parser_attribute_any_word): Rename to
2066 c_parser_gnu_attribute_any_word. All callers changed.
2067 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
2068 callers changed.
2069 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
2070 callers changed.
2071 (c_parser_declaration_or_fndef, c_parser_declspecs)
2072 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2073 (c_parser_struct_declaration, c_parser_declarator)
2074 (c_parser_gnu_attribute, c_parser_compound_statement)
2075 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
2076 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
2077 attribute-related syntax productions.
2078
56898e43
RS
20792019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2080
2081 * c-objc-common.c (useful_aka_type_p): Replace with...
2082 (get_aka_type): ...this new function. Given the original type,
2083 decide which aka type to print (if any). Only look through typedefs
2084 if user_facing_original_type_p.
2085 (print_type): Update accordingly.
2086
b9424661
JJ
20872019-10-14 Jakub Jelinek <jakub@redhat.com>
2088
2089 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
2090 into int NESTED, if it is 2, diagnose missing commas in between
2091 clauses.
2092 (c_parser_omp_context_selector): Pass 2 as last argument to
2093 c_parser_omp_all_clauses.
2094
20de9568
JJ
20952019-10-12 Jakub Jelinek <jakub@redhat.com>
2096
2097 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
2098 For simd properties, put them directly into TREE_VALUE.
2099 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
2100 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
2101 add "omp declare variant base" attribute rather than
2102 "omp declare variant".
2103
fe2bc27c
JM
21042019-10-11 Joseph Myers <joseph@codesourcery.com>
2105
2106 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
2107
94e7f906
JJ
21082019-10-10 Jakub Jelinek <jakub@redhat.com>
2109
2110 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
2111 true, terminate processing on closing paren and don't skip to end of
2112 pragma line.
2113 (c_parser_omp_declare_simd): Handle also declare variant.
2114 (omp_construct_selectors, omp_device_selectors,
2115 omp_implementation_selectors, omp_user_selectors): New variables.
2116 (c_parser_omp_context_selector,
2117 c_parser_omp_context_selector_specification,
2118 c_finish_omp_declare_variant): New functions.
2119 (c_finish_omp_declare_simd): Handle both declare simd and
2120 declare variant.
2121 (c_parser_omp_declare): Handle declare variant.
2122
93313b94
JM
21232019-10-02 Joseph Myers <joseph@codesourcery.com>
2124
2125 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
2126 CPP_COLON tokens.
2127
55879815
RS
21282019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2129
2130 * c-objc-common.c (useful_aka_type_p): New function.
2131 (print_type): Use it to decide whether an aka type is worth printing.
2132
59bc434a
JJ
21332019-09-27 Jakub Jelinek <jakub@redhat.com>
2134
2135 PR c++/88203
2136 * c-parser.c (c_parser_predefined_identifier): New function.
2137 (c_parser_postfix_expression): Use it.
2138 (c_parser_omp_variable_list): Parse predefined identifiers.
2139 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
2140 in shared and firstprivate clauses, even when they are predetermined
2141 shared.
2142
c6447c20
RS
21432019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2144
2145 * c-typeck.c (build_function_call_vec): Take the original function
2146 decl as an optional final parameter. Pass all built-in calls to
2147 check_builtin_function_arguments.
2148
522da4c2
EB
21492019-09-20 Eric Botcazou <ebotcazou@adacore.com>
2150
2151 PR c/91815
2152 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
2153 of identifiers in the external scope only for variables and functions.
2154
68e2c199
PK
21552019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2156
2157 PR c/78736
2158 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
2159
22f8849d
IS
21602019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2161
2162 PR pch/61250
2163 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
2164 after determining that the first token is not
2165 PRAGMA_GCC_PCH_PREPROCESS.
2166
db376f45
EB
21672019-08-22 Eric Botcazou <ebotcazou@adacore.com>
2168
2169 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
2170 FUNCTION_DECL to the right value in the presence of nested declarators.
2171
4d732405
RS
21722019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2173
2174 PR middle-end/91421
2175 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
2176
cb1180d5
RS
21772019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2178
2179 PR middle-end/91421
2180 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
2181 of a built_in_function.
2182 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
2183
77eb117f
JJ
21842019-08-10 Jakub Jelinek <jakub@redhat.com>
2185
2186 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
2187 (c_parser_omp_clause_device_type): New function.
2188 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2189 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2190 (c_parser_omp_declare_target): Handle device_type clauses. Remove
2191 diagnostics for declare target with clauses nested in clause-less
2192 declare target declaration-definition-seq.
2193 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2194
2c3b8bad
JJ
21952019-08-09 Jakub Jelinek <jakub@redhat.com>
2196
bb522e2e
JJ
2197 * c-parser.c (check_no_duplicate_clause): Simplify using
2198 omp_find_clause.
2199 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
2200 directive name modifiers.
2201 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2202
2c3b8bad
JJ
2203 PR c/91401
2204 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2205 check_no_duplicate_clause call. Comment it out, instead emit a
2206 warning for duplicate dist_schedule clauses.
2207
99769e7f
RS
22082019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2209
2210 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2211
8860d270
JJ
22122019-08-08 Jakub Jelinek <jakub@redhat.com>
2213
2214 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2215 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2216 instead of generic_head to track duplicates.
2217
398e3feb
JJ
22182019-08-07 Jakub Jelinek <jakub@redhat.com>
2219
2220 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2221 (c_parser_omp_clause_use_device_addr): New function.
2222 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2223 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2224 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2225 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2226 map or use_device_* clauses.
2227 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2228 in OpenMP, require pointer type rather than pointer or array type.
2229 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2230
a28351e7
JJ
22312019-07-31 Jakub Jelinek <jakub@redhat.com>
2232
2233 PR c/91192
2234 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2235 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2236 case.
2237
6343b6bf
ML
22382019-07-25 Martin Liska <mliska@suse.cz>
2239 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2240
2241 PR c++/23383
2242 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2243
cb50701e
ML
22442019-07-25 Martin Liska <mliska@suse.cz>
2245
2246 * c-decl.c (merge_decls): Use new macros
2247 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2248
62e3e66f
RB
22492019-07-23 Richard Biener <rguenther@suse.de>
2250
2251 PR tree-optimization/83518
2252 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2253 a CFG also rebuild cgraph edges.
2254
554a530f
JJ
22552019-07-20 Jakub Jelinek <jakub@redhat.com>
2256
2257 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2258 (c_parser_omp_clause_bind): New function.
2259 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2260 (OMP_LOOP_CLAUSE_MASK): Define.
2261 (c_parser_omp_loop): New function.
2262 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2263 loop combined with parallel or teams.
2264 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2265 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2266
d119bf79
RS
22672019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2268
2269 PR c/53633
2270 * c-decl.c (finish_function): Check targetm.warn_func_return
2271 before issuing a -Wreturn-type warning.
2272
ab20d992 22732019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
2274
2275 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2276 (c_parser_compound_statement): Call it.
2277
1fdd6f04
JJ
22782019-07-12 Jakub Jelinek <jakub@redhat.com>
2279
2280 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2281 (c_parser_omp_clause_order): New function.
2282 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2283 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2284 PRAGMA_OMP_CLAUSE_ORDER.
2285 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2286
8389386c
RB
22872019-07-10 Richard Biener <rguenther@suse.de>
2288
2289 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2290 _Literal (int *) &x for address literals.
2291
99b1c316
MS
22922019-07-09 Martin Sebor <msebor@redhat.com>
2293
2294 PR c++/61339
2295 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2296 to class.
2297 (field_decl_cmp): Same.
2298 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2299 * c-tree.h: Same.
2300 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2301
6c1dae73
MS
23022019-07-09 Martin Sebor <msebor@redhat.com>
2303
2304 PR c++/61339
2305 * c-decl.c: Change class-key from class to struct and vice versa
2306 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2307 * gimple-parser.c: Same.
2308
69b5279e
RB
23092019-07-01 Richard Biener <rguenther@suse.de>
2310
2311 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2312 _Literal (char *) &"foo" for address literals pointing to
2313 STRING_CSTs.
2314
ab20d992
JJ
23152019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2316
2317 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2318 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2319 C incompatibility if alternate "__intN__" form is used.
2320
1e3d475e
MS
23212019-06-24 Martin Sebor <msebor@redhat.com>
2322
2323 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2324
bf38f7e9
JJ
23252019-06-10 Jakub Jelinek <jakub@redhat.com>
2326
2327 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2328 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2329 (c_parser_omp_scan_loop_body): New function.
2330 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2331 inscan reduction clauses.
2332 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2333 non-inscan reductions on the same construct, or inscan reductions with
2334 ordered or schedule clauses, or inscan array reductions.
2335
65985d78
MS
23362019-06-05 Martin Sebor <msebor@redhat.com>
2337
2338 PR c/90737
2339 * c-typeck.c (c_finish_return): Only consider functions returning
2340 pointers as candidates for -Wreturn-local-addr.
2341
0ecf545c
MS
23422019-06-05 Martin Sebor <msebor@redhat.com>
2343
2344 * c-decl.c (start_decl): Adjust quoting and hyphenation
2345 in diagnostics.
2346 (finish_decl): Same.
2347 (finish_enum): Same.
2348 (start_function): Same.
2349 (declspecs_add_type): Same.
2350 * c-parser.c (warn_for_abs): Same.
2351 * c-typeck.c (build_binary_op): Same.
2352
e03436e7
TS
23532019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2354
b48f44bf
TS
2355 PR c/89433
2356 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2357 marked with an OpenACC 'routine' directive.
2358
5bf04509
TS
2359 PR c/89433
2360 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2361 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2362
e03436e7
TS
2363 PR c/89433
2364 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2365 clauses from "omp declare target" attribute.
2366
a9c697b8
MS
23672019-05-16 Martin Sebor <msebor@redhat.com>
2368
ab20d992
JJ
2369 * c-decl.c (start_decl): Quote keywords, operators, and
2370 types in diagnostics.
2371 (finish_decl): Same.
2372 * c-parser.c (c_parser_asm_statement): Same.
2373 (c_parser_conditional_expression): Same.
2374 (c_parser_transaction_cancel): Same.
2375 * c-typeck.c (c_common_type): Same.
2376 (build_conditional_expr): Same.
2377 (digest_init): Same.
2378 (process_init_element): Same.
2379 (build_binary_op): Same.
a9c697b8 2380
c4499192
RB
23812019-05-17 Richard Biener <rguenther@suse.de>
2382
2383 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2384 (c_parser_gimple_unary_expression): Likewise.
2385 (c_parser_gimple_parentized_ternary_expression): New function.
2386
adfe6e4b
RB
23872019-05-16 Richard Biener <rguenther@suse.de>
2388
2389 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2390 (c_parser_gimple_unary_expression): Likewise.
2391
186dabf2
RB
23922019-05-15 Richard Biener <rguenther@suse.de>
2393
2394 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2395 __BIT_FIELD_REF.
2396
1158c5b4
RB
23972019-05-14 Richard Biener <rguenther@suse.de>
2398
2399 * gimple-parser.c (c_parser_gimple_statement): Remove
2400 questionable auto-promotion to VIEW_CONVERT_EXPR.
2401 (c_parser_gimple_typespec): Split out from __MEM parsing.
2402 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2403 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2404 as __VIEW_CONVERT with -gimple.
2405
fd4485aa
ML
24062019-05-09 Martin Liska <mliska@suse.cz>
2407
2408 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2409 __MAX.
2410 (c_parser_gimple_unary_expression): Parse also binary expression
2411 __MIN and __MAX.
2412 (c_parser_gimple_parentized_binary_expression): New function.
2413
d276406a
ML
24142019-05-09 Martin Liska <mliska@suse.cz>
2415
2416 * gimple-parser.c (struct gimple_parser): Add probability.
2417 for gimple_parser_edge.
2418 (gimple_parser::push_edge): Add new argument probability.
2419 (c_parser_gimple_parse_bb_spec): Parse also probability
2420 if present.
2421 (c_parser_parse_gimple_body): Set edge probability.
2422 (c_parser_gimple_compound_statement): Consume token
2423 before calling c_parser_gimple_goto_stmt.
2424 Parse BB counts.
2425 (c_parser_gimple_statement): Pass new argument.
2426 (c_parser_gimple_goto_stmt): Likewise.
2427 (c_parser_gimple_if_stmt): Likewise.
2428 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2429 * c-parser.c (c_parser_declaration_or_fndef): Pass
2430 hot_bb_threshold argument.
2431 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2432 field.
2433 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2434
f179b64e
JJ
24352019-04-26 Jakub Jelinek <jakub@redhat.com>
2436
2437 PR debug/90197
2438 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2439 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2440 (c_parser_do_statement): Likewise.
2441 (c_parser_for_statement): Likewise. Formatting fixes.
2442 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2443 emit DEBUG_BEGIN_STMTs if needed.
2444
e7178413
JJ
24452019-04-19 Jakub Jelinek <jakub@redhat.com>
2446
c280b7ee
JJ
2447 PR c/89888
2448 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2449 (c_start_case): Don't clear it.
2450 (do_case): Adjust c_add_case_label caller.
2451 (c_finish_case): Adjust c_do_switch_warnings caller.
2452
e7178413
JJ
2453 PR c++/90108
2454 * c-decl.c (merge_decls): If remove is main variant and
2455 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2456 variant that has newdecl as TYPE_NAME if any.
2457
60a2c645
JJ
24582019-04-12 Jakub Jelinek <jakub@redhat.com>
2459
2460 PR c/89933
2461 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2462 don't try to remove it from the variant list, but instead assert
2463 it has no variants.
2464
2a82beaa
RB
24652019-04-01 Richard Biener <rguenther@suse.de>
2466
2467 PR c/71598
2468 * c-tree.h (c_get_alias_set): Declare.
2469 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2470 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2471 as the underlying integer type.
2472
bec1da64
MS
24732019-03-19 Martin Sebor <msebor@redhat.com>
2474
2475 PR tree-optimization/89688
2476 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2477 kinds of initializers.
2478
855cd9b1
JJ
24792019-03-19 Jakub Jelinek <jakub@redhat.com>
2480
2481 PR c/89734
2482 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2483 return type even if quals_used is 0. Formatting fixes.
2484
baa09dc5
RB
24852019-03-14 Richard Biener <rguenther@suse.de>
2486
2487 * c-tree.h (enum c_declspec_il): New.
2488 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2489 enum bitfield.
2490 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2491 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2492 (c_parser_declspecs): Adjust.
2493 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2494 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2495 and bitmap.h.
2496 (struct gimple_parser): New.
2497 (gimple_parser::push_edge): New method.
2498 (c_parser_gimple_parse_bb_spec): New helper.
2499 (c_parser_parse_gimple_body): Get start pass and IL specification.
2500 Initialize SSA and CFG.
2501 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2502 Build a gimple_parser parsing state and pass it along.
2503 (c_parser_gimple_statement): Change intermittend __PHI internal
2504 function argument for the edge.
2505 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2506 (c_parser_gimple_goto_stmt): Record edges to build.
2507 (c_parser_gimple_if_stmt): Likewise.
2508 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2509 (c_parser_gimple_or_rtl_pass_list): Likewise.
2510
a3f9f006
ML
25112019-03-11 Martin Liska <mliska@suse.cz>
2512
2513 * c-decl.c (check_for_loop_decls): Wrap an option name
2514 in a string format message and fix GNU coding style.
2515 * c-parser.c (c_parser_declspecs): Likewise.
2516
1db01ff9
JJ
25172019-03-08 Jakub Jelinek <jakub@redhat.com>
2518
2519 PR tree-optimization/89550
2520 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2521 returned true.
2522 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2523 or warning returned true.
2524
66dcb747
JJ
25252019-02-28 Jakub Jelinek <jakub@redhat.com>
2526
2527 PR c/89525
2528 * c-typeck.c (convert_arguments): Call inform_declaration only if
2529 the previous warning_at call returned true.
2530
2263c9f2
TS
25312019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2532
2533 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2534 parameter. Adjust all users.
2535 (c_parser_oacc_simple_clause): Replace parser with loc formal
2536 parameter. Adjust all users.
2537
ab20d992 25382019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
2539
2540 PR c/87924
2541 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2542 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2543
5f88ba10
JJ
25442019-02-15 Jakub Jelinek <jakub@redhat.com>
2545
2546 PR c/89340
2547 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2548 before c_decl_attributes rather than after it.
2549
cfc30fd1
JJ
25502019-02-06 Jakub Jelinek <jakub@redhat.com>
2551
2552 PR c/89211
2553 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2554 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2555 instead of 3 nested ifs.
2556
fbe83e6b
JM
25572019-02-06 Joseph Myers <joseph@codesourcery.com>
2558
2559 PR c/88584
2560 * c-decl.c (finish_decl): Do not complete array types for arrays
2561 with external linkage not at file scope.
2562
f461f938
RB
25632019-02-05 Richard Biener <rguenther@suse.de>
2564
2565 PR c/88606
2566 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2567 all type variants when not supported.
2568
fe509359
JJ
25692019-01-30 Jakub Jelinek <jakub@redhat.com>
2570
2571 PR c/89061
2572 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2573 * c-decl.c (decl_jump_unsafe): Return false for
2574 C_DECL_COMPOUND_LITERAL_P decls.
2575 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2576
6a335b96
JJ
25772019-01-29 Jakub Jelinek <jakub@redhat.com>
2578
f4b7e754
JJ
2579 PR c/89045
2580 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2581 scope.
2582
6a335b96
JJ
2583 PR c/86125
2584 * c-decl.c (last_fileptr_type): Remove.
2585 (last_structptr_types): New variable.
2586 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2587 {old,new}rettype instead of the types themselves. Assert
2588 last_structptr_types array has the same number of elements
2589 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2590 argument oldtype and newtype. Instead of handling
2591 just fileptr_type_node specially, handle all builtin_structptr_types
2592 pointer nodes. Formatting fix.
2593
d8b5a1a0
MS
25942019-01-24 Martin Sebor <msebor@redhat.com>
2595
2596 PR c/86125
2597 PR c/88886
2598 PR middle-end/86308
2599 * c-decl.c (match_builtin_function_types): Add arguments.
2600 (diagnose_mismatched_decls): Diagnose mismatched declarations
2601 of built-ins more strictly.
2602
e21c4491
JJ
26032019-01-24 Jakub Jelinek <jakub@redhat.com>
2604
2605 PR c++/88976
2606 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2607 on #pragma omp cancel with different modifiers.
2608
420183d9
L
26092019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2610
2611 PR c/51628
2612 PR c/88664
2613 * c-typeck.c (convert_for_assignment): Upate the
2614 warn_for_address_or_pointer_of_packed_member call.
2615
17ad43dd
TH
26162019-01-16 Tom Honermann <tom@honermann.net>
2617 Jason Merrill <jason@redhat.com>
2618
2619 * c-typeck.c (digest_init): Revised the error message produced for
2620 ill-formed cases of array initialization with a string literal.
2621 (error_init): Make variadic.
2622
5f07d78a
JJ
26232019-01-12 Jakub Jelinek <jakub@redhat.com>
2624
2625 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2626
c4581bbf
JJ
26272019-01-07 Jakub Jelinek <jakub@redhat.com>
2628
2629 PR c/88701
2630 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2631 if current_function_decl is non-NULL.
2632
65c5b1eb
JM
26332019-01-07 Joseph Myers <joseph@codesourcery.com>
2634
2635 PR c/88720
2636 PR c/88726
2637 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2638 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2639 functions declared but never defined only for external scope, not
2640 for other scopes.
2641
d8fcab68
JJ
26422019-01-07 Jakub Jelinek <jakub@redhat.com>
2643
2644 PR c++/85052
2645 * c-parser.c (c_parser_postfix_expression): Parse
2646 __builtin_convertvector.
2647
a5544970
JJ
26482019-01-01 Jakub Jelinek <jakub@redhat.com>
2649
2650 Update copyright years.
2651
da77eace
L
26522018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2653
2654 PR c/51628
2655 * c-typeck.c (convert_for_assignment): Call
2656 warn_for_address_or_pointer_of_packed_member.
2657
1edf8866
SB
26582018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2659
2660 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2661 a more specific error message (instead of just falling through).
2662
db4fd626
SB
26632018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2664
2665 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2666 asm qualifier is first seen; use that to give nicer "duplicate asm
2667 qualifier" messages. Delete 'quals" variable, instead pass the
2668 "is_volatile_ flag to build_asm_stmt directly.
2669 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2670 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2671
9c9cfcbb
SB
26722018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2673
2674 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2675 "done" boolean variable.
2676
a14feb3c
DM
26772018-12-19 David Malcolm <dmalcolm@redhat.com>
2678
2679 PR c++/87504
2680 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2681 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2682 (build_binary_op): Use struct op_location_t and
2683 class binary_op_rich_location.
2684
6d939173
JJ
26852018-12-11 Jakub Jelinek <jakub@redhat.com>
2686
2687 PR sanitizer/88426
2688 * c-convert.c (convert): Call c_fully_fold before calling
2689 ubsan_instrument_float_cast.
2690
b7055028
SB
26912018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2692
2693 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2694 setting "quals".
2695
5b76e75f
SB
26962018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2697
2698 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2699 after asm. Pass a flag for it to build_asm_expr.
2700 * c-tree.h (build_asm_expr): Update declaration.
2701 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2702 set ASM_INLINE_P.
2703
30bd42b9
SB
27042018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2705
2706 PR inline-asm/55681
2707 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2708 combination of volatile and goto, in any order, without repetitions.
2709
9df6c0e4
JB
27102018-12-04 James Norris <jnorris@codesourcery.com>
2711 Cesar Philippidis <cesar@codesourcery.com>
2712 Julian Brown <julian@codesourcery.com>
2713
2714 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2715 code.
2716
f44697b7
RB
27172018-11-30 Richard Biener <rguenther@suse.de>
2718
2719 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2720 _Literal (type) { ... } as empty aggregate or vector constructor.
2721
550dfbdc
MS
27222018-11-29 Martin Sebor <msebor@redhat.com>
2723
2724 PR c/88091
2725 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2726 (convert_arguments): Add comments. Pass additional argument to
2727 the function above.
2728
673670da
MS
27292018-11-29 Martin Sebor <msebor@redhat.com>
2730
2731 PR c/88172
2732 PR testsuite/88208
2733 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2734
db1d09b0
MS
27352018-11-23 Martin Sebor <msebor@redhat.com>
2736
2737 PR testsuite/88098
2738 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2739 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2740
98f08eb8
MS
27412018-11-20 Martin Sebor <msebor@redhat.com>
2742
2743 * c-parser.c (c_parser_has_attribute_expression): New function.
2744 (c_parser_attribute): New function.
2745 (c_parser_attributes): Move code into c_parser_attribute.
2746 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2747
cd5da983
MS
27482018-11-15 Martin Sebor <msebor@redhat.com>
2749
2750 PR c/83656
2751 * c-decl.c (header_for_builtin_fn): Declare.
2752 (diagnose_mismatched_decls): Diagnose declarations of built-in
2753 functions without a prototype.
2754 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2755 (convert_argument): Same.
2756 (convert_arguments): Factor code out into convert_argument.
2757 Detect mismatches between built-in formal arguments in calls
2758 to built-in without prototype.
2759 (build_conditional_expr): Same.
2760 (type_or_builtin_type): New function.
2761 (convert_for_assignment): Add argument. Conditionally issue
2762 warnings instead of errors for mismatches.
2763
620e594b
DM
27642018-11-13 David Malcolm <dmalcolm@redhat.com>
2765
2766 * c-decl.c: Replace "source_location" with "location_t".
2767 * c-tree.h: Likewise.
2768 * c-typeck.c: Likewise.
2769 * gimple-parser.c: Likewise.
2770
3179ebae
JJ
27712018-11-09 Jakub Jelinek <jakub@redhat.com>
2772
81a227c6
JJ
2773 * c-parser.c (c_parser_omp_clause_final): Use
2774 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2775 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2776 parsing instead of c_parser_paren_condition.
2777 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2778 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2779 c_fully_fold instead of c_parser_condition.
2780 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2781 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2782 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2783 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2784 c_parser_expr_no_commas instead of c_parser_expression.
2785
98c91c56
JJ
2786 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2787 reduction clause with inscan modifier.
2788
3179ebae
JJ
2789 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2790 clauses other than atomic_default_mem_order.
2791
28567c40
JJ
27922018-11-08 Jakub Jelinek <jakub@redhat.com>
2793
2794 * c-parser.c: Include memmode.h.
2795 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2796 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2797 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2798 task_reduction clauses.
2799 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2800 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2801 section, or lvalue assignment expression.
2802 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2803 (c_parser_omp_clause_lastprivate): Parse optional
2804 conditional: modifier.
2805 (c_parser_omp_clause_hint): Require constant integer expression rather
2806 than just integer expression.
2807 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2808 clause.
2809 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2810 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2811 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2812 functions.
2813 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2814 iterators. Parse mutexinoutset and depobj kinds.
2815 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2816 callers.
2817 (c_parser_omp_all_clauses): Likewise. Handle
2818 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2819 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2820 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2821 default memory order from requires directive if any. Adjust
2822 c_finish_omp_atomic caller.
2823 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2824 (c_parser_omp_flush): Parse flush with memory-order-clause.
2825 (c_parser_omp_for_loop): Allow NE_EXPR even in
2826 OpenMP loops, adjust c_finish_omp_for caller.
2827 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2828 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2829 Allow to be called while parsing combined parallel master.
2830 Parse combined master taskloop{, simd}.
2831 (c_parser_omp_parallel): Parse combined
2832 parallel master{, taskloop{, simd}} constructs.
2833 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2834 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2835 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2836 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2837 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2838 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2839 around teams body. Use SET_EXPR_LOCATION.
2840 (c_parser_omp_target_data): Allow target data
2841 with only use_device_ptr clauses.
2842 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2843 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2844 (c_parser_omp_requires): New function.
2845 (c_finish_taskloop_clauses): New function.
2846 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2847 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2848 declaration. Disallow in_reduction clause when combined with parallel
2849 master.
2850 (c_parser_omp_construct): Adjust c_parser_omp_master and
2851 c_parser_omp_taskgroup callers.
2852 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2853 other than cancel.
2854 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2855 like OMP_CLAUSE_REDUCTION.
2856 (handle_omp_array_sections): Likewise. Call save_expr on array
2857 reductions before calling build_index_type. Handle depend clauses
2858 with iterators.
2859 (struct c_find_omp_var_s): New type.
2860 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2861 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2862 with static, runtime or auto schedule kinds. Call save_expr for whole
2863 array reduction sizes. Diagnose reductions with zero sized elements
2864 or variable length structures. Diagnose nogroup clause used with
2865 reduction clause(s). Handle depend clause with
2866 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2867 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2868 some different type for other kinds. Use build_unary_op with
2869 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2870 Handle depend clauses with iterators. Remove no longer needed special
2871 case that predetermined const qualified vars may be specified in
2872 firstprivate clause. Complain if const qualified vars are mentioned
2873 in data-sharing clauses other than firstprivate or shared. Use
2874 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2875 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2876 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2877 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2878
7e2de6df
DM
28792018-10-29 David Malcolm <dmalcolm@redhat.com>
2880
2881 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2882 logic for change to name_hint::operator bool.
2883 (undeclared_variable): Likewise.
2884 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2885 (c_parser_parameter_declaration): Likewise.
2886
9f936c86
JM
28872018-10-17 Joseph Myers <joseph@codesourcery.com>
2888
2889 * c-errors.c (pedwarn_c11): New function.
2890 * c-parser.c (disable_extension_diagnostics): Save
2891 warn_c11_c2x_compat and set it to 0.
2892 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2893 (c_parser_static_assert_declaration_no_semi): Handle
2894 _Static_assert without string constant.
2895 * c-tree.h (pedwarn_c11): New prototype.
2896
033eb567
DM
28972018-10-17 David Malcolm <dmalcolm@redhat.com>
2898
2899 * Make-lang.in (selftest-c): New.
2900 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2901 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2902 from gcc/Makefile.in.
2903
0edf3afe
RB
29042018-10-02 Richard Biener <rguenther@suse.de>
2905
2906 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2907
8313a764
JM
29082018-09-26 Joseph Myers <joseph@codesourcery.com>
2909
2910 PR c/87390
2911 * c-typeck.c (build_binary_op): Use excess precision for
2912 comparisons of integers and floating-point for C11 and later.
2913
ce6f0888
MJ
29142018-09-26 Martin Jambor <mjambor@suse.cz>
2915
2916 PR c/87347
2917 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2918 comment.
ce6f0888 2919
9c4a4b3c
DM
29202018-09-17 David Malcolm <dmalcolm@redhat.com>
2921
2922 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2923 Update for new param.
2924 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2925 Likewise.
2926
80c6d1f4
MJ
29272018-09-17 Martin Jambor <mjambor@suse.cz>
2928
2929 PR c/63886
2930 * c-parser.c: (warn_for_abs): New function.
2931 (c_parser_postfix_expression_after_primary): Call it.
2932
4a426e36
BE
29332018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2934
2935 * c-typeck.c (digest_init): Shorten overlength strings.
2936
6d900107
BE
29372018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2938
2939 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2940
b5764229
BE
29412018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2942
2943 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2944 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2945
22eea6b2
AM
29462018-08-30 Alexander Monakov <amonakov@ispras.ru>
2947
2948 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2949 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2950
85204e23
DM
29512018-08-27 David Malcolm <dmalcolm@redhat.com>
2952
2953 PR 87091
2954 * c-decl.c (implicitly_declare): Update call to
2955 maybe_add_include_fixit to suggest overriding the location, as it
2956 is for a note.
2957 * c-objc-common.c (c_tree_printer): Update for conversion of
2958 show_caret_p to a tri-state.
2959
3d78e008
ML
29602018-08-27 Martin Liska <mliska@suse.cz>
2961
2962 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2963 fndecl_built_in_p and remove check for FUNCTION_DECL if
2964 possible.
3d78e008
ML
2965 (diagnose_mismatched_decls): Likewise.
2966 (merge_decls): Likewise.
2967 (warn_if_shadowing): Likewise.
2968 (pushdecl): Likewise.
2969 (implicitly_declare): Likewise.
2970 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2971 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2972 * c-typeck.c (build_function_call_vec): Likewise.
2973 (convert_arguments): Likewise.
2974
097f82ec
DM
29752018-08-20 David Malcolm <dmalcolm@redhat.com>
2976
2977 PR other/84889
2978 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2979 (diagnose_mismatched_decls): Likewise, in various places.
2980 (warn_if_shadowing): Likewise.
2981 (implicit_decl_warning): Likewise.
2982 (implicitly_declare): Likewise.
2983 (undeclared_variable): Likewise.
2984 (declare_label): Likewise.
2985 (grokdeclarator): Likewise.
2986 (start_function): Likewise.
2987 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2988 (c_parser_parameter_declaration): Likewise.
2989 (c_parser_binary_expression): Likewise.
2990 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2991 (parser_build_binary_op): Likewise.
2992 (build_unary_op): Likewise.
2993 (error_init): Likewise.
2994 (pedwarn_init): Likewise.
2995 (warning_init): Likewise.
2996 (convert_for_assignment): Likewise.
2997
96e6ae57
DM
29982018-08-15 David Malcolm <dmalcolm@redhat.com>
2999
3000 * c-objc-common.c: Include "gcc-rich-location.h".
3001 (c_tree_printer): Move implemenation of '%T' to...
3002 (print_type): ...this new function.
3003 (range_label_for_type_mismatch::get_text): New function.
3004 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
3005 range for the various ic_argpass cases.
3006 (class maybe_range_label_for_tree_type_mismatch): New class.
3007 (build_binary_op): Use it when calling binary_op_error.
3008
0cd020ae 30092018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 3010
0cd020ae
PK
3011 * c-decl.c (start_decl): Do not warn if variables is named as main
3012 and is a local variable.
3013
72733314
IS
30142018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3015
3016 PR c/19315
3017 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
3018 objects of unknown size.
3019
23aa9f7c
MS
30202018-08-13 Martin Sebor <msebor@redhat.com>
3021
3022 PR tree-optimization/71625
3023 * c-parser.c (c_parser_declaration_or_fndef): Call
3024 braced_list_to_string.
3025
e5e7e50d
BH
30262018-08-03 Bogdan Harjoc <harjoc@gmail.com>
3027
3028 PR c/86690
3029 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
3030 errors.
3031
8a45b051
MS
30322018-08-01 Martin Sebor <msebor@redhat.com>
3033
3034 PR tree-optimization/86650
3035 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
3036 and TREE_BLOCK (t) from within percent_K_format to this callsite.
3037
5922dcb5
JJ
30382018-08-01 Jakub Jelinek <jakub@redhat.com>
3039
3040 PR c/85704
3041 * c-typeck.c (init_field_decl_cmp): New function.
3042 (output_pending_init_elements): Use it for field comparisons
3043 instead of pure bit_position comparisons.
3044
9b452033
JJ
30452018-07-12 Jakub Jelinek <jakub@redhat.com>
3046
3047 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
3048 type here, instead add "omp declare target implicit" attribute.
3049 (finish_decl): Diagnose vars without mappable type here.
3050
ab20d992
JJ
30512018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3052 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
3053 Cesar Philippidis <cesar@codesourcery.com>
3054
3055 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
3056 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
3057 to their non-present_or_* counterparts. Make 'self' an alias to
3058 PRAGMA_OACC_CLAUSE_HOST.
3059 (c_parser_oacc_data_clause): Update GOMP mappings for
3060 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
3061 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
3062 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
3063 Remove support for present_or_* clauses.
3064 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3065 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
3066 (OACC_DECLARE_CLAUSE_MASK): Likewise.
3067 (OACC_DATA_CLAUSE_MASK): Likewise.
3068 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3069 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
3070 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
3071 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
3072 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
3073
e197e64e
KV
30742018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3075
3076 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
3077 * gimple-parser.c (c_parser_gimple_statement): Likewise.
3078 (c_parser_gimple_unary_expression): Likewise.
3079
487f2f61
JJ
30802018-06-15 Jakub Jelinek <jakub@redhat.com>
3081
3082 PR c/86093
3083 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
3084 before doing POINTER_DIFF_EXPR.
3085
e4d44a37
MP
30862018-06-07 Marek Polacek <polacek@redhat.com>
3087
3088 PR c/85318
3089 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
3090 for loop initial declarations.
3091
b67b9225
DP
30922018-05-30 David Pagan <dave.pagan@oracle.com>
3093
3094 PR c/55976
3095 * c-decl.c (grokdeclarator): Update check for return type warnings.
3096 (start_function): Likewise.
3097 (finish_function): Likewise.
3098 * c-typeck.c (c_finish_return): Update check for return type warnings.
3099 Pass OPT_Wreturn_type to pedwarn when appropriate.
3100
c566cc9f
RS
31012018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
3102
3103 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
3104 __FMA_EXPR handlng.
3105
e4f81565
RS
31062018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
3107
3108 * gimple-parser.c: Include internal-fn.h.
3109 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
3110 (c_parser_gimple_call_internal): New function.
3111 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
3112 Fix typos in comment.
3113
79e7b1fe
JJ
31142018-05-10 Jakub Jelinek <jakub@redhat.com>
3115
3116 PR c++/85662
3117 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
3118 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
3119 fold_convert_loc.
3120 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
3121 fold_offsetof_1, pass argtype as TYPE to it and drop the
3122 fold_convert_loc.
3123
f7584c81
DP
31242018-05-02 David Pagan <dave.pagan@oracle.com>
3125
3126 PR c/30552
3127 * c-decl.c (old_style_parameter_scope): New function.
3128 * c-parser.c (c_parser_postfix_expression): Check for statement
3129 expressions in old-style function parameter list declarations.
3130 * c-parser.h (old_style_parameter_scope): New extern declaration.
3131
b33a0cb3
JJ
31322018-04-25 Jakub Jelinek <jakub@redhat.com>
3133
3134 PR sanitizer/84307
3135 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
3136 it is not TREE_STATIC.
3137 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
3138 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
3139 its COMPOUND_LITERAL_EXPR_DECL.
3140
c5c5822a
JM
31412018-03-21 Joseph Myers <joseph@codesourcery.com>
3142
3143 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
3144 where all functions return the same _FloatN or _FloatNx type,
3145 treat integer types as _Float64 instead of double.
3146
aa1c9429
JJ
31472018-03-21 Jakub Jelinek <jakub@redhat.com>
3148
3149 PR c/84999
3150 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
3151 building vector comparison, diagnose it and return error_mark_node.
3152
9bb45a95
JJ
31532018-03-15 Jakub Jelinek <jakub@redhat.com>
3154
3155 PR c/84853
3156 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
3157 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
3158 INTEGER_TYPE element type.
3159
ada6bad9
DP
31602018-03-13 David Pagan <dave.pagan@oracle.com>
3161
3162 PR c/46921
3163 * c-typeck.c (output_init_element): Ensure field initializer
3164 expression is always evaluated if there are side effects.
3165
849bbdb9
JJ
31662018-03-06 Jakub Jelinek <jakub@redhat.com>
3167
3168 PR c/84721
3169 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
3170 !building_stmt_list_p ().
3171
d74641bd
RS
31722018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
3173
3174 PR c/84305
3175 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
3176 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
3177 and include the BIND_EXPR in the list of things that need to be
3178 pre-evaluated.
3179
0444aa9c
NS
31802018-02-09 Nathan Sidwell <nathan@acm.org>
3181
3182 PR c/84293
3183 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
3184 to strict_aliasing_warning.
3185
7c30b12a
PC
31862018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3187
3188 * c-typeck.c (really_start_incremental_init, push_init_level,
3189 set_nonincremental_init, output_init_element, process_init_element):
3190 Use DECL_UNNAMED_BIT_FIELD.
3191
2be4dfcb
MP
31922018-01-31 Marek Polacek <polacek@redhat.com>
3193
3194 PR c/81779
3195 * c-parser.c (c_parser_compound_statement_nostart): Call
3196 expansion_point_location_if_in_system_header.
3197
bb9869d5
DM
31982018-01-17 David Malcolm <dmalcolm@redhat.com>
3199
3200 PR c++/83814
3201 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3202 the C part.
3203
b4923738
JJ
32042018-01-13 Jakub Jelinek <jakub@redhat.com>
3205
3206 PR c/83801
3207 * c-tree.h (decl_constant_value_1): Add a bool argument.
3208 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3209 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3210 (decl_constant_value): Adjust caller.
3211 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3212 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3213 decl_constant_value returns initializer that has BLKmode or
3214 array type.
3215 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3216
928686b1
RS
32172018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3218 Alan Hayward <alan.hayward@arm.com>
3219 David Sherwood <david.sherwood@arm.com>
3220
3221 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3222 TYPE_VECTOR_SUBPARTS.
3223
85ec4feb
JJ
32242018-01-03 Jakub Jelinek <jakub@redhat.com>
3225
3226 Update copyright years.
3227
913884f7
JJ
32282018-01-01 Jakub Jelinek <jakub@redhat.com>
3229
3230 PR c/83595
3231 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3232 c_parser_conditional_expression, c_parser_cast_expression,
3233 c_parser_sizeof_expression, c_parser_alignof_expression,
3234 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3235 c_parser_transaction_expression): Use set_error () method instead
3236 of setting value member to error_mark_node.
3237
c6cfa2bf
MM
32382017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3239
3240 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3241 and _Float<N>X built-in functions.
3242
11d29d63
JJ
32432017-12-22 Jakub Jelinek <jakub@redhat.com>
3244
14ec014e
JJ
3245 PR debug/83550
3246 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3247 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3248 incomplete vars rather than after it.
3249
11d29d63
JJ
3250 PR debug/83547
3251 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3252 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3253 and consider empty ones if there are no other stmts. For
3254 -Wunused-value walk all statements before the one only followed by
3255 DEBUG_BEGIN_STMTs.
3256
170a8bd6 32572017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3258 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3259
3260 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3261 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3262 (c_parser_do_statement): Likewise.
3263 (c_parser_for_statement): Likewise.
3264 (c_parser_statement_after_labels): Adjust calls to above.
3265 (c_parse_pragma_ivdep): New static function.
3266 (c_parser_pragma_unroll): Likewise.
3267 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3268 <PRAGMA_UNROLL>: New case.
3269
01512446
JJ
32702017-12-19 Jakub Jelinek <jakub@redhat.com>
3271
3272 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3273 perform_integral_promotions, digest_init): Replace Yoda conditions
3274 with typical order conditions.
3275 * c-decl.c (check_bitfield_type_and_width): Likewise.
3276
c65e18d3
BE
32772017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3278
3279 * c-typeck.c (c_safe_arg_type_equiv_p,
3280 c_safe_function_type_cast_p): New function.
3281 (build_c_cast): Implement -Wcast-function-type.
3282
b7280579
RB
32832017-12-14 Richard Biener <rguenther@suse.de>
3284
3285 PR c/83415
3286 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3287 like REALPART_EXPR for the behavior of whether its operand
3288 is an lvalue.
3289
49e6a6c0
MP
32902017-12-12 Marek Polacek <polacek@redhat.com>
3291
3292 PR c/82679
3293 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3294
ab20d992 32952017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3296
3297 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3298 * c-parser.c (add_debug_begin_stmt): New.
3299 (c_parser_declaration_or_fndef): Call it.
3300 (c_parser_compound_statement_nostart): Likewise.
3301 (c_parser_statement_after_labels): Likewise.
3302 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3303
4b2b493f
JM
33042017-12-07 Joseph Myers <joseph@codesourcery.com>
3305
3306 * c-decl.c (build_compound_literal): Add parameter alignas_align
3307 and set alignment of decl if nonzero.
3308 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3309 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3310 qualifier.
3311 (c_parser_struct_declaration): Update syntax comment.
3312 (c_parser_type_name): Add alignas_ok argument and pass it to
3313 c_parser_declspecs.
3314 (c_parser_cast_expression): Pass true to c_parser_type_name and
3315 give error if a cast used an _Alignas specifier.
3316 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3317 give error if sizeof (type-name) used an _Alignas specifier.
3318 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3319 give error if _Alignof (type-name) used an _Alignas specifier.
3320 (c_parser_postfix_expression_after_paren_type): Check specified
3321 alignment for a compound literal and pass it to
3322 build_compound_literal.
3323 * c-parser.h (c_parser_type_name): Update prototype.
3324 * c-tree.h (build_compound_literal): Update prototype.
3325
5d9ae53d
MS
33262017-12-07 Martin Sebor <msebor@redhat.com>
3327
3328 PR c/81544
3329 * c-decl.c (c_decl_attributes): Look up existing declaration and
3330 pass it to decl_attributes.
3331
c79144f8
DM
33322017-12-06 David Malcolm <dmalcolm@redhat.com>
3333
3334 PR c/83236
3335 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3336 reserved for use by the implementation.
3337
613bc14f
DM
33382017-12-06 David Malcolm <dmalcolm@redhat.com>
3339
3340 * c-decl.c: Include "c-family/c-spellcheck.h".
3341
05abad4c
ML
33422017-12-05 Martin Liska <mliska@suse.cz>
3343 Jakub Jelinek <jakub@redhat.com>
3344
3345 * c-typeck.c (pointer_diff): Add new argument and instrument
3346 pointer subtraction.
3347 (build_binary_op): Similar for pointer comparison.
3348
cc6534d4
JJ
33492017-12-01 Jakub Jelinek <jakub@redhat.com>
3350
65791f42
JJ
3351 PR c/79153
3352 * c-parser.c: Include tree-iterator.h.
3353 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3354 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3355 on it.
3356
cc6534d4
JJ
3357 PR c/83222
3358 * c-tree.h (decl_constant_value_1): Declare.
3359 * c-typeck.c (decl_constant_value_1): New function.
3360 (decl_constant_value): Use it.
3361 * c-fold.c (c_fully_fold_internal): If in_init, use
3362 decl_constant_value_1 instead of decl_constant_value.
3363
5de73c05
JJ
33642017-11-30 Jakub Jelinek <jakub@redhat.com>
3365
3366 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3367
058f0b9e
JJ
33682017-11-28 Jakub Jelinek <jakub@redhat.com>
3369
3370 PR sanitizer/81275
3371 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3372 c_switch_covers_all_cases_p returns true.
3373
5e9d6aa4 33742017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3375 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3376
3377 * Make-lang.in (c/c-array-notation.o): Remove.
3378 * c-array-notation.c: Delete.
3379 * c-decl.c: Remove cilkplus condition.
3380 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3381 c_parser_cilk_verify_simd, c_parser_array_notation,
3382 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3383 c_parser_cilk_simd_fn_vector_attrs,
3384 c_finish_cilk_simd_fn_tokens): Delete.
3385 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3386 (c_parser_direct_declarator_inner): Ditto.
3387 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3388 (c_parser_attributes, c_parser_compound_statement,
3389 c_parser_statement_after_labels, c_parser_if_statement,
3390 c_parser_switch_statement, c_parser_while_statement,
3391 c_parser_do_statement, c_parser_for_statement,
3392 c_parser_unary_expression, c_parser_postfix_expression,
3393 c_parser_postfix_expression_after_primary,
3394 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3395 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3396 support.
3397 * c-typeck.c (build_array_ref, build_function_call_vec,
3398 convert_arguments,
3399 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3400 c_finish_loop, build_binary_op): Remove cilkplus support.
3401
9e851845
JJ
34022017-11-28 Jakub Jelinek <jakub@redhat.com>
3403
3404 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3405 of build3.
3406
ab20d992 34072017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
3408
3409 * Make-lang.in (c.install-plugin): Install backend import library.
3410
41521dee
JJ
34112017-11-23 Jakub Jelinek <jakub@redhat.com>
3412
3413 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3414 pragma_stmt context.
3415
ac9effed
EB
34162017-11-23 Mike Stump <mikestump@comcast.net>
3417 Eric Botcazou <ebotcazou@adacore.com>
3418
3419 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3420 ANNOTATE_EXPR.
3421 (c_parser_do_statement): Likewise.
3422 (c_parser_for_statement): Likewise.
3423
ce95abc4
DM
34242017-11-22 David Malcolm <dmalcolm@redhat.com>
3425
3426 PR c++/62170
3427 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3428 bool to bool *. Within '%T' handling, if showing an "aka", use
3429 "quoted" param to add appropriate quoting.
3430
974aedcc
MP
34312017-11-22 Marek Polacek <polacek@redhat.com>
3432
3433 PR c++/60336
3434 PR middle-end/67239
3435 PR target/68355
3436 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3437
d4300cc6
DM
34382017-11-21 David Malcolm <dmalcolm@redhat.com>
3439
3440 PR c/83056
3441 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3442 earlier failed lookups.
3443
1af4ebf5
MG
34442017-11-21 Marc Glisse <marc.glisse@inria.fr>
3445
3446 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3447 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3448
26edace6
DM
34492017-11-20 David Malcolm <dmalcolm@redhat.com>
3450
3451 PR c/81404
3452 * c-decl.c: Include "c-family/known-headers.h".
3453 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3454 to known-headers.cc.
3455 (class suggest_missing_header): Move to known-header.h.
3456 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3457 than get_c_name_hint.
3458
b1212255
DM
34592017-11-20 David Malcolm <dmalcolm@redhat.com>
3460
3461 * c-decl.c (get_c_name_hint): New function.
3462 (class suggest_missing_header): New class.
3463 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3464 suggest missing headers to the user.
3465
6c7a259b
DM
34662017-11-20 David Malcolm <dmalcolm@redhat.com>
3467
3468 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3469 Include "c-family/name-hint.h"
3470 (implicit_decl_warning): Convert "hint" from
3471 const char * to name_hint. Pass location to
3472 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3473 warning was not printed.
3474 (undeclared_variable): Likewise for "guessed_id".
3475 (lookup_name_fuzzy): Convert return type from const char *
3476 to name_hint. Add location_t param.
3477 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3478 Include "c-family/name-hint.h"
3479 (c_parser_declaration_or_fndef): Convert "hint" from
3480 const char * to name_hint. Pass location to lookup_name_fuzzy.
3481 (c_parser_parameter_declaration): Likewise.
3482
f9c59f7e
JJ
34832017-11-19 Jakub Jelinek <jakub@redhat.com>
3484
3485 PR c/66618
3486 PR c/69960
3487 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3488 where needed.
3489 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3490 handle_omp_array_sections): Likewise.
3491 (digest_init): Don't call decl_constant_value_for_optimization.
3492 * c-tree.h (decl_constant_value_for_optimization): Removed.
3493 * c-fold.c (c_fold_array_ref): New function.
3494 (c_fully_fold_internal): Add LVAL argument, propagate it through
3495 recursive calls. For VAR_P call decl_constant_value and
3496 unshare if not LVAL and either optimizing or IN_INIT. Remove
3497 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3498 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3499 (c_fully_fold): Add LVAL argument, pass it through to
3500 c_fully_fold_internal.
3501 (decl_constant_value_for_optimization): Removed.
3502
3ca0dc60
JM
35032017-11-15 Joseph Myers <joseph@codesourcery.com>
3504
3505 PR c/81156
3506 * c-parser.c (check_tgmath_function): New function.
3507 (enum tgmath_parm_kind): New enum.
3508 (c_parser_postfix_expression): Handle __builtin_tgmath.
3509
64a5912c
DM
35102017-10-31 David Malcolm <dmalcolm@redhat.com>
3511
3512 * c-decl.c (implicit_decl_warning): Update for renaming of
3513 pedwarn_at_rich_loc and warning_at_rich_loc.
3514 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3515 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3516 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3517 (c_parser_struct_or_union_specifier): Likewise for renaming of
3518 pedwarn_at_rich_loc.
3519 (c_parser_parameter_declaration): Likewise for renaming of
3520 error_at_rich_loc.
3521 * c-typeck.c (build_component_ref): Likewise.
3522 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3523 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3524 (set_init_label): Likewise for renaming of error_at_rich_loc.
3525
c1136864
RB
35262017-10-30 Richard Biener <rguenther@suse.de>
3527
3528 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3529 stmts.
3530
ee5fd23a
MM
35312017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3532
3533 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3534 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3535
1a59ccf2
DM
35362017-10-25 David Malcolm <dmalcolm@redhat.com>
3537
3538 PR c/7356
3539 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3540 semicolons.
3541
bc1a75dd
JJ
35422017-10-25 Jakub Jelinek <jakub@redhat.com>
3543
3544 PR libstdc++/81706
3545 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3546 newdecl to corresponding __builtin_ if any.
3547
ff1ff960
PC
35482017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3549
3550 PR c++/82466
3551 * c-decl.c (diagnose_mismatched_decls): Use
3552 OPT_Wbuiltin_declaration_mismatch.
3553
62e1c678
DM
35542017-10-12 David Malcolm <dmalcolm@redhat.com>
3555
3556 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3557 use it to guard calls to maybe_suggest_missing_token_insertion.
3558 (c_parser_parms_list_declarator): Override default value of new
3559 "type_is_unique" param to c_parser_require.
3560 (c_parser_asm_statement): Likewise.
3561 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3562 defaulting to true.
3563
a92f6726
NS
35642017-10-11 Nathan Sidwell <nathan@acm.org>
3565
3566 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3567
8e6cdc90
RS
35682017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3569
3570 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3571 operating on trees as wide_ints.
3572 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3573 (c_tree_equal): Likewise.
3574
8139a48e
DM
35752017-10-04 David Malcolm <dmalcolm@redhat.com>
3576
3577 * c-decl.c (push_parm_decl): Store c_parm's location into the
3578 PARAM_DECL.
3579 (build_c_parm): Add "loc" param and store it within the c_parm.
3580 * c-parser.c (struct c_parser): Add "last_token_location" field.
3581 (c_parser_consume_token): Store location of the token into the
3582 new field.
3583 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3584 when handling a FUNCTION_DECL, if it doesn't already have them.
3585 (c_parser_parameter_declaration): Generate a location for the
3586 parameter, and pass it to the call to build_c_parm.
3587 * c-tree.h (struct c_parm): Add field "loc".
3588 (build_c_parm): Add location_t param.
3589 * c-typeck.c (get_fndecl_argument_location): New function.
3590 (inform_for_arg): New function.
3591 (convert_for_assignment): Use inform_for_arg when dealing with
3592 ic_argpass.
3593
2a389958
JJ
35942017-09-29 Jakub Jelinek <jakub@redhat.com>
3595
7d386d45
JJ
3596 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3597 width is non-NULL.
3598 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3599 don't SET_DECL_C_BIT_FIELD here.
3600
2a389958
JJ
3601 PR c/82340
3602 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3603 instead of trying to set just TREE_READONLY manually.
3604
ebc6a85e
TV
36052017-09-16 Tom de Vries <tom@codesourcery.com>
3606
3607 PR c/81875
3608 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3609 cond itself.
3610
bb75facd
JM
36112017-09-15 Joseph Myers <joseph@codesourcery.com>
3612
3613 PR c/82071
3614 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3615 for C11.
3616 (build_conditional_expr): For C11, generate result with excess
3617 precision when one argument is an integer and the other is of a
3618 type using excess precision.
3619
1d933576
BE
36202017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3621
3622 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3623
267bbb6f
MP
36242017-09-13 Marek Polacek <polacek@redhat.com>
3625
3626 PR c/82167
3627 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3628 than expr.original_type.
3629
6836632e
NS
36302017-09-12 Nathan Sidwell <nathan@acm.org>
3631
3632 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3633 resort_sorted_fields): Moved from c-family/c-common.c.
3634 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3635
e035be33
JM
36362017-09-01 Joseph Myers <joseph@codesourcery.com>
3637
3638 PR c/82071
3639 * c-typeck.c (build_atomic_assign): Handle argument with excess
3640 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3641 argument passed to build_binary_op and convert_for_assignment but
3642 not for call to c_fully_fold.
3643 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3644 Ensure build_binary_op is called with argument with original
3645 semantic type. Avoid calling c_fully_fold with an
3646 EXCESS_PRECISION_EXPR from build_binary_op.
3647
d2e05fcb
JJ
36482017-09-01 Jakub Jelinek <jakub@redhat.com>
3649
3650 PR c/81887
3651 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3652
b397965c
RS
36532017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3654 Alan Hayward <alan.hayward@arm.com>
3655 David Sherwood <david.sherwood@arm.com>
3656
3657 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3658 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3659 m1 and m2 to the signed equivalent of a fixed-point
3660 SCALAR_TYPE_MODE.
3661
14e18d71
DM
36622017-08-24 David Malcolm <dmalcolm@redhat.com>
3663
3664 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3665 than CAN_HAVE_LOCATION_P when determining whether to use the
3666 location_t value within "value".
3667
7f204c0f
DM
36682017-08-21 David Malcolm <dmalcolm@redhat.com>
3669
3670 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3671 rather than peeking the location of the first token.
3672 * c-tree.h (c_expr::get_location): New method.
3673
2f687306
DM
36742017-08-21 David Malcolm <dmalcolm@redhat.com>
3675
3676 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3677 to check_function_arguments.
3678
3e7b80d7
MP
36792017-08-18 Marek Polacek <polacek@redhat.com>
3680
3681 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3682 commentary.
3683
00aa1fa2
L
36842017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3685
3686 PR c/53037
3687 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3688 (check_bitfield_type_and_width): Don't allow bit-field with
3689 warn_if_not_aligned type.
3690
da67acb9
MS
36912017-08-14 Martin Sebor <msebor@redhat.com>
3692
3693 PR c/81117
3694 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3695
bb85aa74
MP
36962017-08-11 Marek Polacek <polacek@redhat.com>
3697
3698 PR c/81795
3699 * c-decl.c (pushtag): Only print inform if the warning was printed.
3700 (grokdeclarator): Likewise.
3701
32129a17
DM
37022017-08-10 David Malcolm <dmalcolm@redhat.com>
3703
3704 * c-parser.c (c_parser_error): Rename to...
3705 (c_parser_error_richloc): ...this, making static, and adding
3706 "richloc" parameter, passing it to the c_parse_error call,
3707 rather than calling c_parser_set_source_position_from_token.
3708 (c_parser_error): Reintroduce, reimplementing in terms of the
3709 above, converting return type from void to bool.
3710 (class token_pair): New class.
3711 (struct matching_paren_traits): New struct.
3712 (matching_parens): New typedef.
3713 (struct matching_brace_traits): New struct.
3714 (matching_braces): New typedef.
3715 (get_matching_symbol): New function.
3716 (c_parser_require): Add param MATCHING_LOCATION, using it to
3717 highlight matching "opening" tokens for missing "closing" tokens.
3718 (c_parser_skip_until_found): Likewise.
3719 (c_parser_static_assert_declaration_no_semi): Convert explicit
3720 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3721 class matching_parens, so that the pertinent open parenthesis is
3722 highlighted when there are problems locating the close
3723 parenthesis.
3724 (c_parser_struct_or_union_specifier): Likewise.
3725 (c_parser_typeof_specifier): Likewise.
3726 (c_parser_alignas_specifier): Likewise.
3727 (c_parser_simple_asm_expr): Likewise.
3728 (c_parser_braced_init): Likewise, for matching_braces.
3729 (c_parser_paren_condition): Likewise, for matching_parens.
3730 (c_parser_switch_statement): Likewise.
3731 (c_parser_for_statement): Likewise.
3732 (c_parser_asm_statement): Likewise.
3733 (c_parser_asm_operands): Likewise.
3734 (c_parser_cast_expression): Likewise.
3735 (c_parser_sizeof_expression): Likewise.
3736 (c_parser_alignof_expression): Likewise.
3737 (c_parser_generic_selection): Likewise.
3738 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3739 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3740 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3741 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3742 c_parser_skip_until_found call.
3743 (c_parser_objc_class_definition): Use class matching_parens as
3744 above.
3745 (c_parser_objc_method_decl): Likewise.
3746 (c_parser_objc_try_catch_finally_statement): Likewise.
3747 (c_parser_objc_synchronized_statement): Likewise.
3748 (c_parser_objc_at_property_declaration): Likewise.
3749 (c_parser_oacc_wait_list): Likewise.
3750 (c_parser_omp_var_list_parens): Likewise.
3751 (c_parser_omp_clause_collapse): Likewise.
3752 (c_parser_omp_clause_default): Likewise.
3753 (c_parser_omp_clause_if): Likewise.
3754 (c_parser_omp_clause_num_threads): Likewise.
3755 (c_parser_omp_clause_num_tasks): Likewise.
3756 (c_parser_omp_clause_grainsize): Likewise.
3757 (c_parser_omp_clause_priority): Likewise.
3758 (c_parser_omp_clause_hint): Likewise.
3759 (c_parser_omp_clause_defaultmap): Likewise.
3760 (c_parser_oacc_single_int_clause): Likewise.
3761 (c_parser_omp_clause_ordered): Likewise.
3762 (c_parser_omp_clause_reduction): Likewise.
3763 (c_parser_omp_clause_schedule): Likewise.
3764 (c_parser_omp_clause_num_teams): Likewise.
3765 (c_parser_omp_clause_thread_limit): Likewise.
3766 (c_parser_omp_clause_aligned): Likewise.
3767 (c_parser_omp_clause_linear): Likewise.
3768 (c_parser_omp_clause_safelen): Likewise.
3769 (c_parser_omp_clause_simdlen): Likewise.
3770 (c_parser_omp_clause_depend): Likewise.
3771 (c_parser_omp_clause_map): Likewise.
3772 (c_parser_omp_clause_device): Likewise.
3773 (c_parser_omp_clause_dist_schedule): Likewise.
3774 (c_parser_omp_clause_proc_bind): Likewise.
3775 (c_parser_omp_clause_uniform): Likewise.
3776 (c_parser_omp_for_loop): Likewise.
3777 (c_parser_cilk_clause_vectorlength): Likewise.
3778 (c_parser_cilk_clause_linear): Likewise.
3779 (c_parser_transaction_expression): Likewise.
3780 * c-parser.h (c_parser_require): Add param matching_location with
3781 default UNKNOWN_LOCATION.
3782 (c_parser_error): Convert return type from void to bool.
3783 (c_parser_skip_until_found): Add param matching_location with
3784 default UNKNOWN_LOCATION.
3785
30af3a2b
MP
37862017-08-09 Marek Polacek <polacek@redhat.com>
3787
3788 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3789 * c-tree.h (build_external_ref): Update declaration.
3790 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3791 (build_external_ref): Change the type of a parameter to bool.
3792 (parser_build_binary_op): Use true/false instead of 1/0.
3793 (pointer_diff): Likewise.
3794 (build_modify_expr): Likewise.
3795 (set_designator): Change the type of a parameter to bool.
3796 (set_init_index): Use true/false instead of 1/0.
3797 (set_init_label): Likewise.
3798 (output_init_element): Change the type of a parameter to bool.
3799 (output_pending_init_elements): Use true/false instead of 1/0.
3800 (process_init_element): Likewise.
3801 (build_binary_op): Change the type of a parameter to bool.
3802
296c53ac
MP
38032017-08-09 Marek Polacek <polacek@redhat.com>
3804
3805 PR c/81233
3806 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3807 Call emit_diagnostic_valist instead of pedwarn.
3808 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3809 Print the relevant types in diagnostics.
3810
a32c8316
MP
38112017-08-09 Marek Polacek <polacek@redhat.com>
3812
3813 PR c/81417
3814 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3815 build_conditional_expr.
a32c8316
MP
3816 * c-parser.c (c_parser_conditional_expression): Create locations for
3817 EXP1 and EXP2 from their source ranges. Pass the locations down to
3818 build_conditional_expr.
3819 * c-tree.h (build_conditional_expr): Update declaration.
3820 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3821 For -Wsign-compare, also print the types.
3822
314e6352
ML
38232017-08-08 Martin Liska <mliska@suse.cz>
3824
3825 * c-convert.c: Include header files.
3826 * c-typeck.c: Likewise.
3827
577eec56
ML
38282017-08-07 Martin Liska <mliska@suse.cz>
3829
3830 * c-parser.c (c_parser_attributes): Canonicalize name of an
3831 attribute.
3832
f7b6353a
MP
38332017-08-02 Marek Polacek <polacek@redhat.com>
3834
3835 PR c/81289
3836 * c-parser.c (c_parser_unary_expression): Use set_error.
3837
8a6eab34
MP
3838 PR c/81448
3839 PR c/81306
3840 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3841 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3842
ab20d992 38432017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3844 Martin Liska <mliska@suse.cz>
3845
3846 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3847 statement.
7fef86d3 3848
f34ebeb2
ML
38492017-07-31 Martin Liska <mliska@suse.cz>
3850
3851 PR sanitize/81530
3852 * c-convert.c (convert): Guard condition with flag_sanitize_p
3853 also with current_function_decl non-null equality.
3854 * c-decl.c (grokdeclarator): Likewise.
3855 * c-typeck.c (build_binary_op): Likewise.
3856
8595f67b
MP
38572017-07-25 Marek Polacek <polacek@redhat.com>
3858
3859 * c-decl.c (grokfield): Remove local variable.
3860
d49718d6
MP
38612017-07-25 Marek Polacek <polacek@redhat.com>
3862
3863 PR c/81364
3864 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3865 macro expansion if the body is in { }.
3866 (c_parser_while_statement): Likewise.
3867 (c_parser_for_statement): Likewise.
3868
ff22eb12
NS
38692017-07-18 Nathan Sidwell <nathan@acm.org>
3870
3871 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3872
eea77d1f
DM
38732017-07-14 David Malcolm <dmalcolm@redhat.com>
3874
3875 * c-decl.c (implicitly_declare): When suggesting a missing
3876 #include, provide a fix-it hint.
3877
b6f43128
DM
38782017-07-06 David Malcolm <dmalcolm@redhat.com>
3879
3880 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3881 and call that instead.
3882 * c-tree.h (selftest::run_c_tests): New decl.
3883
3e2becc4
MP
38842017-06-26 Marek Polacek <polacek@redhat.com>
3885
3886 PR c/80116
3887 * c-parser.c (c_parser_if_body): Set the location of the
3888 body of the conditional after parsing all the labels. Call
3889 warn_for_multistatement_macros.
3890 (c_parser_else_body): Likewise.
3891 (c_parser_switch_statement): Likewise.
3892 (c_parser_while_statement): Likewise.
3893 (c_parser_for_statement): Likewise.
3894 (c_parser_statement): Add a default argument. Save the location
3895 after labels have been parsed.
3896 (c_parser_c99_block_statement): Likewise.
3897
343ae898
RB
38982017-06-19 Richard Biener <rguenther@suse.de>
3899
3900 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3901 negated _Literals to parse _Literal (int) -1.
3902
45b2222a
ML
39032017-06-13 Martin Liska <mliska@suse.cz>
3904
3905 PR sanitize/78204
3906 * c-convert.c (convert): Use sanitize_flags_p.
3907 * c-decl.c (grokdeclarator): Likewise.
3908 * c-typeck.c (convert_for_assignment): Likewise.
3909 (c_finish_return): Likewise.
3910 (build_binary_op): Likewise.
3911
8ab7005b
JJ
39122017-06-08 Jakub Jelinek <jakub@redhat.com>
3913
3914 PR c/81006
3915 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3916 to sizetype before size_binop.
3917
363dc72c
JJ
39182017-06-07 Jakub Jelinek <jakub@redhat.com>
3919
3920 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3921 of TDI_generic.
3922
dc949728
MP
39232017-06-06 Marek Polacek <polacek@redhat.com>
3924
3925 PR c/79983
3926 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3927 ref.
3928 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3929
40ffd95f
BE
39302017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3931
3932 * c-parser.c (c_parser_binary_expression): Implement the
3933 -Wsizeof_pointer_div warning.
3934 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3935 from a parenthesized expression.
3936 (c_parser_expr_list): Use c_last_sizeof_loc.
3937 * c-tree.h (c_last_sizeof_loc): New external.
3938 * c-typeck.c (c_last_sizeof_loc): New variable.
3939 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3940
9fc5e7a4
MM
39412017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3942
3943 PR testsuite/80580
3944 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3945
f012c8ef
DM
39462017-05-30 David Malcolm <dmalcolm@redhat.com>
3947
3948 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3949 parameters.
3950
3cd211af
MS
39512017-05-24 Martin Sebor <msebor@redhat.com>
3952
3953 PR c/80731
3954 * c-fold.c (c_fully_fold_internal): Adjust.
3955 * c-typeck.c (parser_build_unary_op): Adjust.
3956
fd71a9a2
TS
39572017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3958
3959 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3960 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3961 "VECTOR_LENGTH".
3962
92fa0f9e
MP
39632017-05-23 Marek Polacek <polacek@redhat.com>
3964
3965 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3966 quotes.
3967
d11c168a
JJ
39682017-05-22 Jakub Jelinek <jakub@redhat.com>
3969
3970 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3971 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3972 it returned invariant. Call tree_invariant_p unconditionally
3973 afterwards to decide whether to return expr or op0.
3974
58aca9d9
NS
39752017-05-22 Nathan Sidwell <nathan@acm.org>
3976
3977 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3978
7fd549d2
TS
39792017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3980
3981 * c-parser.c (c_parser_omp_clause_default): Handle
3982 "OMP_CLAUSE_DEFAULT_PRESENT".
3983
6ecd2339
BE
39842017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3985
3986 * config-lang.in (gtfiles): Add c-family/c-format.c.
3987
8a57ecff
NS
39882017-05-18 Nathan Sidwell <nathan@acm.org>
3989
3990 * c-decl.c (pushdecl_top_level): Delete unused function.
3991
6574d78e
MP
39922017-05-18 Marek Polacek <polacek@redhat.com>
3993
3994 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3995 (check_earlier_gotos): Likewise.
3996 (define_label): Likewise.
3997 (pending_xref_error): Likewise.
3998 (smallest_type_quals_location): Likewise.
3999 (grokdeclarator): Likewise.
4000 (grokparms): Likewise.
4001 (identifier_global_value): Likewise.
4002 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
4003 (find_init_member): Likewise.
4004
e3455240
MP
40052017-05-18 Marek Polacek <polacek@redhat.com>
4006
4007 * c-decl.c (start_decl): Use false/true instead of 0/1.
4008 (grokdeclarator): Likewise.
4009 (finish_struct): Likewise.
4010 (start_function): Change the return type to bool. Use false/true
4011 instead of 0/1.
4012 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
4013 * c-tree.h (start_function): Update.
4014 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
4015 (set_designator): Change the return type to bool. Use false/true
4016 instead of 0/1.
4017
3fa8871b
MP
40182017-05-17 Marek Polacek <polacek@redhat.com>
4019
4020 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
4021 * c-typeck.c: Likewise.
4022
142473df
MP
40232017-05-17 Marek Polacek <polacek@redhat.com>
4024
4025 PR sanitizer/80659
4026 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
4027 DECL_IGNORED_P even for non-static compound literals.
4028
1a817418
ML
40292017-05-17 Martin Liska <mliska@suse.cz>
4030
4031 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
4032 use it instead of int type.
4033
b2fa0a8b
MP
40342017-05-17 Marek Polacek <polacek@redhat.com>
4035
4036 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
4037 call c_fully_fold.
4038 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 4039 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
4040 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
4041 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
4042 save_expr.
4043 (c_parser_conditional_expression): Likewise.
4044 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
4045 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
4046 (process_init_element): Likewise.
4047 (build_binary_op): Likewise.
4048 (handle_omp_array_sections_1): Likewise.
4049
1e47f02b
TS
40502017-05-12 Thomas Schwinge <thomas@codesourcery.com>
4051
4052 * c-parser.c (c_parser_omp_clause_num_gangs)
4053 (c_parser_omp_clause_num_workers)
4054 (c_parser_omp_clause_vector_length): Merge functions into...
4055 (c_parser_oacc_single_int_clause): ... this new function. Adjust
4056 all users.
4057
c24e924f
NS
40582017-05-11 Nathan Sidwell <nathan@acm.org>
4059
4060 * gimple-parser.c: Don't #include tree-dump.h.
4061
c587104e
MM
40622017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4063
4064 PR testsuite/80580
4065 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
4066
67ac9a9d
MM
40672017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4068
4069 PR testsuite/80580
4070 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4071 incorrect __MEM syntax.
4072
ac4eb40f
MM
40732017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4074
4075 PR testsuite/80580
4076 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
4077 type of unary '*'.
4078
641da50a
NS
40792017-05-09 Nathan Sidwell <nathan@acm.org>
4080
4081 * c-tree.h (pushdecl): Declare.
4082
56d35585
DM
40832017-05-05 David Malcolm <dmalcolm@redhat.com>
4084
4085 * c-decl.c (warn_defaults_to): Replace report_diagnostic
4086 with diagnostic_report_diagnostic.
4087 * c-errors.c (pedwarn_c99): Likewise.
4088 (pedwarn_c90): Likewise.
4089
815d9cc6
XR
40902017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4091
92a285c1 4092 PR c++/80038
815d9cc6
XR
4093 * c-gimplify.c (c_gimplify_expr): Remove calls to
4094 cilk_gimplifY_call_params_in_spawned_fn.
4095
1c4ea66f
DM
40962017-04-25 David Malcolm <dmalcolm@redhat.com>
4097
4098 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
4099 hint for removing extra semicolon.
4100
666f7903
JJ
41012017-04-21 Jakub Jelinek <jakub@redhat.com>
4102
4103 PR c/80468
4104 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
4105 enabled, set specs->type to integer_type_node.
4106
5764ee3c
JW
41072017-04-03 Jonathan Wakely <jwakely@redhat.com>
4108
4109 * c-array-notation.c: Fix typo in comment.
4110
10fa8dfb
MP
41112017-03-29 Marek Polacek <polacek@redhat.com>
4112
4113 PR c/79730
4114 * c-decl.c (finish_decl): Check VAR_P.
4115
a9e4a1a5
JJ
41162017-03-27 Jakub Jelinek <jakub@redhat.com>
4117
4118 PR middle-end/80162
4119 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
4120 * c-typeck.c (c_mark_addressable): Likewise. Look through
4121 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
4122 to ARRAY_TYPE.
4123 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
4124
ee3ff394
MP
41252017-03-23 Marek Polacek <polacek@redhat.com>
4126
4127 * c-tree.h: Remove a C_RID_YYCODE reference.
4128
4d1b8e70
JJ
41292017-03-21 Jakub Jelinek <jakub@redhat.com>
4130
4131 PR c/80097
4132 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
4133 optional COMPOUND_EXPR with ubsan instrumentation.
4134
31dc71a8
MP
41352017-03-17 Marek Polacek <polacek@redhat.com>
4136
4137 * c-parser.c: Add C11 references.
4138
d579c385
MP
41392017-03-15 Marek Polacek <polacek@redhat.com>
4140
4141 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
4142
85059a38
MP
41432017-03-11 Marek Polacek <polacek@redhat.com>
4144
4145 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
4146
2f6f187a
DM
41472017-03-10 David Malcolm <dmalcolm@redhat.com>
4148
4149 PR translation/79848
4150 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
4151 "%qs".
4152 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
4153
36618428
MP
41542017-03-09 Marek Polacek <polacek@redhat.com>
4155
4156 PR sanitizer/79757
4157 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
4158 parameter declarations with initializers.
4159
01e5af5a
JJ
41602017-03-09 Jakub Jelinek <jakub@redhat.com>
4161
4162 PR c/79969
4163 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
4164 TYPE_STUB_DECL.
4165
a71dbc63
JJ
41662017-03-07 Jakub Jelinek <jakub@redhat.com>
4167
4168 PR c/79834
4169 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
4170 for "may only be used in compound statements" diagnostics, change it
4171 such that the same translatable string is used for all pragmas. For
4172 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
4173 diagnostics.
4174 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
4175 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
4176 "may only be used in compound statements" diagnostics, such that the
4177 same translatable string is used for all pragmas.
4178
1ff4bae6
MP
41792017-03-04 Marek Polacek <polacek@redhat.com>
4180
4181 PR c/79847
4182 * c-decl.c (implicit_decl_warning): Add missing space.
4183
7f5a7d78
MP
41842017-03-03 Marek Polacek <polacek@redhat.com>
4185
4186 PR c/79758
4187 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
4188 current_function_prototype_arg_types is error_mark_node. Fix
4189 formatting. Use TREE_VALUE instead of TREE_TYPE.
4190
883c8f06
JJ
41912017-03-03 Jakub Jelinek <jakub@redhat.com>
4192
79c9b7a8
JJ
4193 PR c/79837
4194 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
4195 %<min%> or %<max%> in the diagnostics, instead mention identifier.
4196 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
4197 diagnostics.
4198
883c8f06
JJ
4199 PR c/79836
4200 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
4201 instead of %<_Generic>.
4202 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4203 (c_parser_omp_target_exit_data): Use %<release%> instead of
4204 %<release>.
4205
324ff1a0
JJ
42062017-02-28 Jakub Jelinek <jakub@redhat.com>
4207
4208 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4209 instead of just cond ? "..." : "...".
4210 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4211 for "enter"/"exit" keyword.
4212 (c_finish_oacc_routine): Don't use %s to supply portions of the
4213 message.
4214
4227c9ad
JJ
42152017-02-24 Jakub Jelinek <jakub@redhat.com>
4216
4217 PR c++/79588
4218 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4219 handle -Wrestrict here.
4220 * c-typeck.c (build_function_call_vec): Adjust
4221 check_function_arguments caller.
4222
5d972e66
RB
42232017-02-23 Richard Biener <rguenther@suse.de>
4224
4225 PR c/79684
4226 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4227 to initialize c_exprs to return.
4228 (c_parser_gimple_binary_expression): Likewise.
4229 (c_parser_gimple_unary_expression): Likewise.
4230 (c_parser_gimple_postfix_expression): Likewise.
4231
61ac5ebe
MP
42322017-02-22 Marek Polacek <polacek@redhat.com>
4233
4234 PR c/79662
4235 * c-typeck.c (convert_arguments): Handle error_mark_node.
4236
41d1b0b1
PK
42372017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4238
4239 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4240 value of c_parser_parse_ssa_name against error_mark_node and emit
4241 error if ssa name is anonymous and written as default definition.
4242
eab1f169
PK
42432017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4244
4245 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4246 FMA_EXPR.
4247
bcac0b4d
JJ
42482017-02-16 Jakub Jelinek <jakub@redhat.com>
4249
4250 PR c++/79512
4251 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4252 ignore #pragma omp target even when not followed by identifier.
4253
1be33173
PK
42542017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4255
4256 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4257 (c_parser_gimple_unary_expression): Likewise.
4258
aa326bfb
JJ
42592017-02-13 Jakub Jelinek <jakub@redhat.com>
4260
4261 * c-parser.c (c_parser_oacc_declare): Add missing space in
4262 diagnostics.
4263
8a398bc5
PK
42642017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4265
4266 PR c/79478
4267 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4268 set_c_expr_source_range when parsing ssa-name.
4269
3dcde5ef 42702017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 4271 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
4272
4273 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4274 building IL when arguments are error_mark_node.
4275 (c_parser_gimple_unary_expression): Likewise.
4276 (c_parser_gimple_if_stmt): Likewise.
4277 (c_parser_gimple_switch_stmt): Likewise.
4278 (c_parser_gimple_return_stmt): Likewise.
4279 (c_parser_parse_ssa_name): When name lookup fails do not build
4280 an SSA name. Use undeclared rather than not declared in error
4281 reporting.
4282
192b048b
MP
42832017-02-09 Marek Polacek <polacek@redhat.com>
4284
4285 PR c/79428
4286 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4287 instead of c_parser_skip_until_found.
4288
56f71478
JJ
42892017-02-09 Jakub Jelinek <jakub@redhat.com>
4290
4291 PR c/79431
4292 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4293 symtab_node::get on automatic variables.
4294
02889d23
CLT
42952016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4296 Chung-Lin Tang <cltang@codesourcery.com>
4297
4298 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4299 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4300 semantic checking.
4301 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4302
7af4b20d
RB
43032017-02-07 Richard Biener <rguenther@suse.de>
4304
4305 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4306 (c_parser_gimple_postfix_expression_after_primary):
4307 Do not use c_build_function_call_vec to avoid folding and promotion.
4308 Simplify.
4309
e5e391d6
MO
43102017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4311
4312 PR lto/79061
4313 * c-decl.c (pop_scope): Pass main_input_filename to
4314 build_translation_unit_decl.
4315
c2e84327
DM
43162017-01-24 David Malcolm <dmalcolm@redhat.com>
4317
4318 * c-parser.c: Include "read-rtl-function.h" and
4319 "run-rtl-passes.h".
4320 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4321 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4322 production. Update for renaming of field "gimple_pass" to
4323 "gimple_or_rtl_pass". If __RTL was seen, call
4324 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4325 to an auto_timevar, to cope with early exit.
4326 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4327 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4328 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4329 Handle RID_RTL.
4330 (c_parser_parse_rtl_body): New function.
4331 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4332 (struct c_declspecs): Rename field "gimple_pass" to
4333 "gimple_or_rtl_pass". Add field "rtl_p".
4334 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4335 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4336 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4337 (c_parser_gimple_or_rtl_pass_list): ...this.
4338
2ebd93e1
MP
43392017-01-20 Marek Polacek <polacek@redhat.com>
4340
4341 PR c/64279
4342 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4343
b1c95bb5
RB
43442017-01-13 Richard Biener <rguenther@suse.de>
4345
4346 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4347 nops.
4348
25329913
RB
43492017-01-13 Richard Biener <rguenther@suse.de>
4350
4351 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4352 _Literal ( type-name ) number.
4353
6bb4ea5c
RB
43542017-01-12 Richard Biener <rguenther@suse.de>
4355
4356 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4357 __MEM.
4358
6b5b4e9c
JJ
43592017-01-11 Jakub Jelinek <jakub@redhat.com>
4360
4361 PR c++/72813
4362 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4363 PCH file.
4364
e3252775
RB
43652017-01-11 Richard Biener <rguenther@suse.de>
4366
4367 PR bootstrap/79052
4368 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4369 returns on parse errors.
4370
a9342885
MP
43712017-01-04 Marek Polacek <polacek@redhat.com>
4372
4373 PR c++/64767
4374 * c-parser.c (c_parser_postfix_expression): Mark zero character
4375 constants by setting original_type in c_expr.
4376 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4377 with a zero character constant.
4378 (char_type_p): New function.
4379
5dd9a9d0
DM
43802017-01-04 David Malcolm <dmalcolm@redhat.com>
4381
4382 * c-parser.c (c_parser_declaration_or_fndef): Create a
4383 rich_location at init_loc and parse it to start_init.
4384 (last_init_list_comma): New global.
4385 (c_parser_braced_init): Update last_init_list_comma when parsing
4386 commas. Pass it to pop_init_level. Pass location of closing
4387 brace to pop_init_level.
4388 (c_parser_postfix_expression_after_paren_type): Create a
4389 rich_location at type_loc and parse it to start_init.
4390 (c_parser_omp_declare_reduction): Likewise for loc.
4391 * c-tree.h (start_init): Add rich_location * param.
4392 (pop_init_level): Add location_t param.
4393 * c-typeck.c (struct initializer_stack): Add field
4394 "missing_brace_richloc".
4395 (start_init): Add richloc param, use it to initialize
4396 the stack node's missing_brace_richloc.
4397 (last_init_list_comma): New decl.
4398 (finish_implicit_inits): Pass last_init_list_comma to
4399 pop_init_level.
4400 (push_init_level): When finding missing open braces, add fix-it
4401 hints to the richloc.
4402 (pop_init_level): Add "insert_before" param and pass it
4403 when calling pop_init_level. Add fixits about missing
4404 close braces to any richloc. Use the richloc for the
4405 -Wmissing-braces warning.
4406 (set_designator): Pass last_init_list_comma to pop_init_level.
4407 (process_init_element): Likewise.
4408
cbe34bb5
JJ
44092017-01-01 Jakub Jelinek <jakub@redhat.com>
4410
4411 Update copyright years.
4412
d17680f3
JJ
44132016-12-21 Jakub Jelinek <jakub@redhat.com>
4414
0dba7960
JJ
4415 PR bootstrap/78817
4416 * c-typeck.c (build_function_call_vec): If check_function_arguments
4417 returns true, set TREE_NO_WARNING on CALL_EXPR.
4418
d17680f3
JJ
4419 PR c/77767
4420 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4421 to *expr instead of overwriting it.
4422
aa90531e
RB
44232016-12-20 Richard Biener <rguenther@suse.de>
4424
4425 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4426 error recovery.
4427 (c_parser_gimple_statement): Only build assigns for non-error
4428 stmts.
4429 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4430
629b3d75
MJ
44312016-12-14 Martin Jambor <mjambor@suse.cz>
4432
4433 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4434 omp-low.h.
4435 (c_finish_oacc_routine): Adjusted call to
4436 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4437 to use their new names.
4438 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4439 use its new name.
4440 (c_parser_oacc_update): Likewise.
4441 (c_parser_omp_simd): Likewise.
4442 (c_parser_omp_target_update): Likewise.
4443 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4444 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4445 name.
4446 (c_finish_omp_cancellation_point): Likewise.
4447 * gimple-parser.c: Do not include omp-low.h
4448
c5af52eb
CP
44492016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4450 James Norris <jnorris@codesourcery.com>
4451
4452 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4453 EXIT_DATA,WAIT} are not used in compound statements.
4454 (c_parser_oacc_enter_exit_data): Update diagnostics.
4455
48330c93
BE
44562016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4457
4458 PR c++/71973
4459 * c-decl.c (diagnose_mismatched_decls): Use
4460 OPT_Wbuiltin_declaration_mismatch here too.
4461
899ca90e 44622016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
4463 Alan Hayward <alan.hayward@arm.com>
4464 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
4465
4466 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4467 (make_label, finish_struct): Likewise.
4468
1ee62b92 44692016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 4470 Richard Biener <rguenther@suse.de>
22b15758 4471
8e745a17
JJ
4472 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4473 * config-lang.in (gtfiles): Add c/c-parser.h.
4474 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4475 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4476 * c-parser.c (enum c_id_kind, struct c_token,
4477 c_parser_next_token_is, c_parser_next_token_is_not,
4478 c_parser_next_token_is_keyword,
4479 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4480 Split out to ...
4481 * c-parser.h: ... new header.
4482 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 4483 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
4484 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4485 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4486 c_parser_error, c_parser_require, c_parser_skip_until_found,
4487 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4488 c_parser_type_name): Export.
4489 (c_parser_tokens_buf): New function.
4490 (c_parser_error): Likewise.
4491 (c_parser_set_error): Likewise.
4492 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
4493 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4494 via c_parser_parse_gimple_body.
8e745a17
JJ
4495 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4496 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4497 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4498 c_parser_error, c_parser_require, c_parser_skip_until_found,
4499 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4500 c_parser_type_name): Declare.
1ee62b92
PG
4501 (struct c_parser): Declare forward.
4502 (c_parser_tokens_buf): Declare.
8e745a17
JJ
4503 (c_parser_error): Likewise.
4504 (c_parser_set_error): Likewise.
4505 * gimple-parser.c: New file.
4506 * gimple-parser.h: Likewise.
1ee62b92 4507
22b15758
UB
45082016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4509
4510 PR c/35503
4511 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4512 warn_for_restrict.
4513
84ff4775
LCW
45142016-09-11 Le-Chun Wu <lcwu@google.com>
4515 Mark Wielaard <mjw@redhat.com>
4516
4517 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4518 to the given -Wshadow= variant.
4519
4d0cdd0c
TP
45202016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4521
4522 * c-typeck.c: Include memmodel.h.
4523
1202f33e
JJ
45242016-10-13 Jakub Jelinek <jakub@redhat.com>
4525
4526 PR target/77957
4527 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4528 instead of lhd_return_null_tree_v.
4529
8a14afd0
BS
45302016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4531
4532 PR c++/69733
4533 * c-decl.c (smallest_type_quals_location): New static function.
4534 (grokdeclarator): Try to find the correct location for an ignored
4535 qualifier.
4536
81fea426
MP
45372016-09-26 Marek Polacek <polacek@redhat.com>
4538
4539 PR c/7652
4540 * c-decl.c (pop_scope): Add gcc_fallthrough.
4541
45422016-09-26 Marek Polacek <polacek@redhat.com>
4543
4544 PR c/7652
4545 * c-parser.c (struct c_token): Add flags field.
4546 (c_lex_one_token): Pass it to c_lex_with_flags.
4547 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4548 into IFN_FALLTHROUGH.
4549 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4550 attribute fallthrough after a case label or default label.
4551 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4552
9a2300e9
MP
45532016-09-24 Marek Polacek <polacek@redhat.com>
4554
4555 PR c/77490
4556 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4557 have boolean value. Warn about ++/-- on booleans.
4558
7de76362
JJ
45592016-09-23 Jakub Jelinek <jakub@redhat.com>
4560
4561 * c-parser.c (incomplete_record_decls): Remove unnecessary
4562 = vNULL initialization of file scope vec.
4563
5b73d2ab
MP
45642016-09-16 Marek Polacek <polacek@redhat.com>
4565
4566 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4567
e51fbec3
MP
45682016-09-14 Marek Polacek <polacek@redhat.com>
4569
4570 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4571 (fix_array_notation_expr): Likewise.
4572 * c-decl.c (finish_decl): Likewise.
4573 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4574 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4575 (function_to_pointer_conversion): Use false instead of 0.
4576 (convert_lvalue_to_rvalue): Likewise.
4577 (parser_build_unary_op): Likewise.
4578 (build_atomic_assign): Likewise.
4579 (build_unary_op): Change nonconvert parameter type to bool, use
4580 true/false instead of 1/0.
4581 (build_binary_op): Use true instead of 1.
4582
254830ba
DM
45832016-09-13 David Malcolm <dmalcolm@redhat.com>
4584
4585 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4586 of add_fixit_insert to add_fixit_insert_before.
4587
4c13ba17
MP
45882016-09-13 Marek Polacek <polacek@redhat.com>
4589
4590 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4591 it.
4592
54dcdb88
BE
45932016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4594
4595 PR c++/77496
4596 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4597 COMPOUND_EXPR to warn_for_omitted_condop.
4598
e5106e27
DM
45992016-09-07 David Malcolm <dmalcolm@redhat.com>
4600
4601 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4602 c_get_substring_location for this new langhook.
4603
9dc5773f
JJ
46042016-09-02 Jakub Jelinek <jakub@redhat.com>
4605
4606 PR c/65467
4607 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4608 flag_openmp.
4609 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4610 instead of mark_exp_read on low_bound/length expression.
4611 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4612 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4613 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4614 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4615 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4616 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4617 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4618 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4619 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4620 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4621 instead of mark_expr_read.
4622 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4623 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4624 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4625 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4626 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4627 array section bases outside of depend clause, for depend clause
4628 use convert_lvalue_to_rvalue on the base.
4629 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4630 linear, aligned, map, to and from clauses.
4631 (c_omp_clause_copy_ctor): New function.
4632
295844f6
MP
46332016-09-01 Marek Polacek <polacek@redhat.com>
4634
4635 PR c/7652
4636 * c-typeck.c (composite_type): Add FALLTHRU comment.
4637
089af25c
DM
46382016-08-31 David Malcolm <dmalcolm@redhat.com>
4639
4640 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4641 to the insertion fixits for "struct", "union", and "enum".
4642
f9087798
DM
46432016-08-30 David Malcolm <dmalcolm@redhat.com>
4644
4645 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4646 rather than add_fixit_misspelled_id.
4647 (undeclared_variable): Likewise.
4648 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4649 now-redundant "here" params from add_fixit_insert method calls.
4650 (c_parser_parameter_declaration): Likewise.
4651 * c-typeck.c (build_component_ref): Remove now-redundant range
4652 param from add_fixit_replace method calls.
4653
ebef225f
MP
46542016-08-25 Marek Polacek <polacek@redhat.com>
4655
4656 * c-typeck.c (parser_build_binary_op): Pass LHS to
4657 warn_logical_not_parentheses.
4658
fe377a48
MP
46592016-08-25 Marek Polacek <polacek@redhat.com>
4660
4661 PR c/77323
4662 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4663 or _FloatN or _FloatNx is not supported.
4664 (finish_declspecs): Set type to integer_type_node when _FloatN or
4665 _FloatNx is not supported.
4666
c65699ef
JM
46672016-08-19 Joseph Myers <joseph@codesourcery.com>
4668
4669 PR c/32187
4670 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4671 (struct c_declspecs): Add field floatn_nx_idx.
4672 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4673 and _FloatNx type specifiers.
4674 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4675 (c_parser_declspecs, c_parser_attribute_any_word)
4676 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4677 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4678 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4679 narrower than double.
4680
2f1364c2
JJ
46812016-08-12 Jakub Jelinek <jakub@redhat.com>
4682 Martin Liska <mliska@suse.cz>
4683
4684 PR c/67410
4685 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4686 % to determine val element to change. Assert that
4687 wchar_bytes * charwidth fits into val array.
4688
191816a3
MP
46892016-08-12 Marek Polacek <polacek@redhat.com>
4690
4691 PR c/7652
4692 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4693 (c_parser_postfix_expression): Likewise.
4694 * c-typeck.c (build_unary_op): Adjust fall through comment.
4695 (c_mark_addressable): Likewise.
4696
b95a64bb
JJ
46972016-08-11 Jakub Jelinek <jakub@redhat.com>
4698
4699 PR c/72816
4700 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4701 array member through typedef, for orig_qual_indirect == 0 clear
4702 orig_qual_type.
4703
895aa8e1
DM
47042016-08-08 David Malcolm <dmalcolm@redhat.com>
4705
4706 PR c/64955
4707 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4708 this up to selftest::run_c_tests.
4709 (selftest::run_c_tests): New function.
4710
0b212d8c
TS
47112016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4712
ae9281fc
TS
4713 * c-parser.c (struct oacc_routine_data): Add error_seen and
4714 fndecl_seen members.
4715 (c_finish_oacc_routine): Use these.
4716 (c_parser_declaration_or_fndef): Adjust.
4717 (c_parser_oacc_routine): Likewise. Support more C language
4718 constructs, and improve diagnostics. Move pragma context
4719 checking...
4720 (c_parser_pragma): ... here.
4721
0b212d8c
TS
4722 * c-parser.c (struct oacc_routine_data): New.
4723 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4724 Simplify code.
4725 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4726 declare target" attribute.
4727
76e2c821
JB
47282016-08-01 Jan Beulich <jbeulich@suse.com>
4729
4730 * c-fold.c (c_fully_fold_internal): Also emit shift count
4731 warnings for vector types.
4732 * c-typeck.c (build_binary_op): Likewise.
4733
f618a472
MP
47342016-07-29 Marek Polacek <polacek@redhat.com>
4735
4736 PR c/71742
4737 * c-decl.c (finish_struct): Rephrase an error message.
4738
efd0786f
MP
4739 PR c/71853
4740 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4741 to error node for invalid code.
4742
e00dceaf
MP
4743 PR c/71573
4744 * c-decl.c (implicitly_declare): Return decl early not only for
4745 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4746
673a107a
JJ
47472016-07-29 Jakub Jelinek <jakub@redhat.com>
4748
4749 PR c/71969
4750 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4751 on GNU extern inline functions.
4752
a5b5c8b6
MP
47532016-07-29 Marek Polacek <polacek@redhat.com>
4754
4755 PR c/71583
4756 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4757 check expr.value.
4758
e3fe09c1
UB
47592016-07-22 Uros Bizjak <ubizjak@gmail.com>
4760
4761 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4762
7c8f7eaa
DM
47632016-07-20 David Malcolm <dmalcolm@redhat.com>
4764
4765 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4766 spellcheck-tree.h
4767 (best_macro_match): Likewise, converting from a typedef to a
4768 subclass.
4769 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4770 (lookup_name_fuzzy): Update for change of best_macro_match to a
4771 subclass with a ctor that calls cpp_forall_identifiers.
4772
de6a69ee
DM
47732016-07-20 David Malcolm <dmalcolm@redhat.com>
4774
4775 * c-decl.c (implicit_decl_warning): Update for conversion of
4776 return type of lookup_name_fuzzy to const char *.
4777 (undeclared_variable): Likewise.
4778 (lookup_name_fuzzy): Convert return type from tree to
4779 const char *.
4780 * c-parser.c (c_parser_declaration_or_fndef): Update for
4781 conversion of return type of lookup_name_fuzzy to const char *.
4782 (c_parser_parameter_declaration): Likewise.
4783
b1c9c068
CP
47842016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4785
4786 * c-parser.c (c_parser_oacc_declare): Don't scan for
4787 GOMP_MAP_POINTER.
4788 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4789 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4790 zero-length subarrays.
4791
ddbbcb19
JJ
47922016-07-15 Jakub Jelinek <jakub@redhat.com>
4793
4794 PR c/71858
4795 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4796 instead of FUZZY_LOOKUP_NAME.
4797 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4798 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4799
dd36b877
JJ
48002016-07-14 Jakub Jelinek <jakub@redhat.com>
4801
4802 PR c/71858
4803 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4804
8c681247
TS
48052016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4806
4807 * c-parser.c (c_parser_generic_selection): Make type of variable
4808 auto_vec.
4809 (c_parser_omp_declare_simd): Likewise.
4810
bf4fa671
TS
48112016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4812
4813 * c-decl.c (struct c_struct_parse_info): Change member types
4814 from vec to auto_vec.
4815 (start_struct): Adjust.
4816 (finish_struct): Likewise.
4817
557e8c49
JJ
48182016-07-02 Jakub Jelinek <jakub@redhat.com>
4819
4820 PR c/71719
4821 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4822
54d19c3b
TS
48232016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4824
4825 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4826 Move pragma context checking into...
4827 (c_parser_omp_cancellation_point): ... here, and improve
4828 diagnostic messages.
4829 * c-typeck.c (c_finish_omp_cancel)
4830 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4831
152ef731
JJ
48322016-06-29 Jakub Jelinek <jakub@redhat.com>
4833
4834 PR c/71685
4835 * c-typeck.c (c_build_qualified_type): Don't clear
4836 C_TYPE_INCOMPLETE_VARS for the main variant.
4837
48382016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4839
4840 PR c/71552
4841 * c-typeck.c (output_init_element): Diagnose incompatible types
4842 before non-constant initializers.
4843
e9ac1f86
JJ
48442016-06-28 Jakub Jelinek <jakub@redhat.com>
4845
4846 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4847
277d7ee0
AK
48482016-06-23 Andi Kleen <ak@linux.intel.com>
4849
4850 * Make-lang.in: Add support for autofdo.
4851
1a4f11c8
DM
48522016-06-22 David Malcolm <dmalcolm@redhat.com>
4853
4854 PR c/70339
4855 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4856 (implicit_decl_warning): When issuing warnings for implicit
4857 declarations, attempt to provide a suggestion via
4858 lookup_name_fuzzy.
4859 (undeclared_variable): Likewise when issuing errors.
4860 (lookup_name_in_scope): Likewise.
4861 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4862 (best_macro_match): New typedef.
4863 (find_closest_macro_cpp_cb): New function.
4864 (lookup_name_fuzzy): New function.
4865 * c-parser.c: Include gcc-rich-location.h.
4866 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4867 (c_keyword_starts_typename): ...this new function.
4868 (c_parser_declaration_or_fndef): When issuing errors about
4869 missing "struct" etc, add a fixit. For other kinds of errors,
4870 attempt to provide a suggestion via lookup_name_fuzzy.
4871 (c_parser_parms_declarator): When looking ahead to detect typos in
4872 type names, also reject CPP_KEYWORD.
4873 (c_parser_parameter_declaration): When issuing errors about
4874 unknown type names, attempt to provide a suggestion via
4875 lookup_name_fuzzy.
4876 * c-tree.h (c_keyword_starts_typename): New prototype.
4877
5a578671
JM
48782016-06-20 Joseph Myers <joseph@codesourcery.com>
4879
4880 PR c/71601
4881 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4882 c_common_type returns error_mark_node.
4883
3f8257db 48842016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4885
4886 PR c/69507
4887 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4888 __alignof__ (expression).
4889
6a3f203c
DM
48902016-06-14 David Malcolm <dmalcolm@redhat.com>
4891
4892 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4893
264757fb
DM
48942016-06-14 David Malcolm <dmalcolm@redhat.com>
4895
4896 * c-typeck.c (build_component_ref): Simplify fixit code by
4897 using gcc_rich_location::add_fixit_misspelled_id.
4898 (set_init_label): Likewise.
4899
f7e4f2e3
DM
49002016-06-13 David Malcolm <dmalcolm@redhat.com>
4901
4902 * c-parser.c (c_parser_initelt): Provide location of name for new
4903 location_t param of set_init_label.
4904 * c-tree.h (set_init_label): Add location_t param.
4905 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4906 param and use it when issuing error messages about unrecognized
4907 field names. Attempt to provide a fixit hint if appropriate,
4908 otherwise update the error message to provide the type name.
4909
4b1ffdb1
TS
49102016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4911
4912 PR c/71381
4913 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4914 Loosen checking.
4915
44a845ca
MS
49162016-06-08 Martin Sebor <msebor@redhat.com>
4917 Jakub Jelinek <jakub@redhat.com>
4918
4919 PR c++/70507
4920 PR c/68120
4921 * c-typeck.c (convert_arguments): Don't promote last argument
4922 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4923
92a5f2ba
MP
49242016-06-08 Marek Polacek <polacek@redhat.com>
4925
4926 PR c/71418
4927 * c-decl.c (grokdeclarator): Check TYPE_P.
4928
08203f73
MP
4929 PR c/71426
4930 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4931 code.
4932
6ffd47b7
DM
49332016-06-07 David Malcolm <dmalcolm@redhat.com>
4934
4935 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4936 and structure element reference, capture the location of the
4937 element name token and pass it to build_component_ref.
4938 (c_parser_postfix_expression_after_primary): Likewise for
4939 structure element dereference.
4940 (c_parser_omp_variable_list): Likewise for
4941 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4942 * c-tree.h (build_component_ref): Add location_t param.
4943 * c-typeck.c (build_component_ref): Add location_t param
4944 COMPONENT_LOC. Use it, if available, when issuing hints about
4945 mispelled member names to provide a fixit replacement hint.
4946
1f40cff3
MP
49472016-06-06 Marek Polacek <polacek@redhat.com>
4948
4949 PR c/71362
4950 * c-parser.c (c_parser_direct_declarator): Set location.
4951
5545a907
MP
49522016-06-06 Marek Polacek <polacek@redhat.com>
4953
4954 * c-typeck.c (comptypes_internal): Handle comparisons of
4955 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4956 TYPE_REF_CAN_ALIAS_ALL.
4957
b605f663
CLT
49582016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4959
4960 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4961 arguments as addressable when async clause exists.
4962
00631022
JJ
49632016-05-30 Jakub Jelinek <jakub@redhat.com>
4964
4965 PR c++/71349
4966 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4967 when combined with target construct.
4968
7211a097
JJ
49692016-05-26 Jakub Jelinek <jakub@redhat.com>
4970
4971 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4972 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4973
95efe6b6
MP
49742016-05-25 Marek Polacek <polacek@redhat.com>
4975
4976 PR c/71265
4977 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4978
a23faf7a
MP
4979 PR c/71266
4980 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4981
e46c7770
CP
49822016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4983
4984 * c-parser.c (c_parser_oacc_declare): Add support for
4985 GOMP_MAP_FIRSTPRIVATE_POINTER.
4986 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4987 argument with enum c_omp_region_type ort.
4988 (handle_omp_array_sections): Likewise. Update call to
4989 handle_omp_array_sections_1.
4990 (c_finish_omp_clauses): Add specific errors and warning messages for
4991 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4992 call to handle_omp_array_sections.
4993
a04e69c0
TS
49942016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4995
4996 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4997
f17a223d
RB
49982016-05-24 Richard Biener <rguenther@suse.de>
4999
5000 PR middle-end/70434
5001 PR c/69504
5002 * c-typeck.c (build_array_ref): Do not complain about indexing
5003 non-lvalue vectors. Adjust for function name change.
5004
79063edd
MS
50052016-05-20 Martin Sebor <msebor@redhat.com>
5006
5007 PR c/71115
5008 * c-typeck.c (error_init): Use
5009 expansion_point_location_if_in_system_header.
5010 (warning_init): Same.
5011
8a40fef3
DM
50122016-05-19 David Malcolm <dmalcolm@redhat.com>
5013
5014 PR c/71171
5015 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
5016 in error-handling.
5017 (c_parser_postfix_expression): Likewise.
5018 * c-tree.h (c_expr::set_error): New method.
5019 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
5020 that result's range is initialized.
5021
e9892350
JG
50222016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
5023
5024 * c-typeck.c (parser_build_unary_op): Fix formatting.
5025
8fad45f5
MW
50262016-05-16 Matthew Wahab <matthew.wahab@arm.com>
5027
5028 * c-decl.c (grokdeclarator): Remove errmsg and use of
5029 targetm.invalid_return_type.
5030 (grokparms): Remove errmsg and use of
5031 targetm.invalid_parameter_type.
5032
aa4b467b
JM
50332016-05-13 Joseph Myers <joseph@codesourcery.com>
5034
5035 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
5036 function return type.
5037
4f2e1536
MP
50382016-05-12 Marek Polacek <polacek@redhat.com>
5039
5040 PR c/70756
5041 * c-decl.c (build_compound_literal): Pass LOC down to
5042 c_incomplete_type_error.
5043 * c-tree.h (require_complete_type): Adjust declaration.
5044 (c_incomplete_type_error): Likewise.
5045 * c-typeck.c (require_complete_type): Add location parameter, pass it
5046 down to c_incomplete_type_error.
5047 (c_incomplete_type_error): Add location parameter, pass it down to
5048 error_at.
5049 (build_component_ref): Pass location down to c_incomplete_type_error.
5050 (default_conversion): Pass location down to require_complete_type.
5051 (build_array_ref): Likewise.
5052 (build_function_call_vec): Likewise.
5053 (convert_arguments): Likewise.
5054 (build_unary_op): Likewise.
5055 (build_c_cast): Likewise.
5056 (build_modify_expr): Likewise.
5057 (convert_for_assignment): Likewise.
5058 (c_finish_omp_clauses): Likewise.
5059
d6e83a8d
MM
50602016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5061
5062 PR c/43651
5063 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
5064 is enabled.
5065 * c-errors.c (pedwarn_c90): Return true if warned.
5066 * c-tree.h (pedwarn_c90): Change return type to bool.
5067 (enum c_declspec_word): Add new enumerator cdw_atomic.
5068
5c3a10fb
MP
50692016-05-11 Marek Polacek <polacek@redhat.com>
5070
5071 PR c++/71024
5072 * c-decl.c (diagnose_mismatched_decls): Factor out code to
5073 diagnose_mismatched_attributes and call it.
5074
cf68d92c
MP
50752016-05-10 Marek Polacek <polacek@redhat.com>
5076
5077 PR c/70255
5078 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
5079 on a declaration following the definition.
5080
351f85c5
JJ
50812016-05-05 Jakub Jelinek <jakub@redhat.com>
5082
5083 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
5084 parse it through to c_parser_c99_block_statement.
5085 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
5086 caller.
5087
deef7113
MP
50882016-05-04 Marek Polacek <polacek@redhat.com>
5089
5090 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
5091 OPT_Wdangling_else.
5092
de55efd5
MP
50932016-05-04 Marek Polacek <polacek@redhat.com>
5094
5095 PR c/48778
5096 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
5097 for macro expansions.
5098
79ce98bc
MP
50992016-05-03 Marek Polacek <polacek@redhat.com>
5100
5101 PR c/70859
5102 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
5103 check_builtin_function_arguments.
5104
fb2647aa
RB
51052016-05-03 Richard Biener <rguenther@suse.de>
5106
5107 * Make-lang.in (cc1-checksum.c): For stage-final re-use
5108 the checksum from the previous stage.
5109
77886428
CP
51102016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5111
5112 * c-parser.c (c_parser_oacc_all_clauses): Update call to
5113 c_finish_omp_clauses.
5114 (c_parser_omp_all_clauses): Likewise.
5115 (c_parser_oacc_cache): Likewise.
5116 (c_parser_oacc_loop): Likewise.
5117 (omp_split_clauses): Likewise.
5118 (c_parser_omp_declare_target): Likewise.
5119 (c_parser_cilk_all_clauses): Likewise.
5120 (c_parser_cilk_for): Likewise.
5121 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
5122 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
5123
7176a4a0
MP
51242016-05-02 Marek Polacek <polacek@redhat.com>
5125
5126 PR c/70851
5127 * c-decl.c (grokdeclarator): Diagnose when array's size has an
5128 incomplete type.
5129
e7ff0319
CP
51302016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5131
5132 PR middle-end/70626
5133 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
5134 OACC_LOOP_CLAUSE_MASK.
5135 (c_parser_oacc_kernels_parallel): Update call to
5136 c_oacc_split_loop_clauses.
5137
9f405ce1
AM
51382016-04-28 Andrew MacLeod <amacleod@redhat.com>
5139
5140 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
5141 argument to build_modify_expr in two cases.
5142
c1e1f433
BS
51432016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5144
5145 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5146 warn_for_memset instead of warning directly here.
5147
2448a956
MP
51482016-04-26 Marek Polacek <polacek@redhat.com>
5149
5150 PR c/67784
5151 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
5152 out of ...
5153 (c_parser_for_statement): ... here.
5154 (c_parser_if_statement): Use it.
5155 (c_parser_switch_statement): Use it.
5156 (c_parser_while_statement): Use it.
5157
b02a5e26
MP
5158 PR c/70791
5159 * c-decl.c (pushdecl): Pass LOCUS down to warning.
5160
477d4906
IV
51612016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5162
5163 PR c++/69363
5164 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
5165 instead of c_finish_cilk_clauses.
5166 * c-tree.h (c_finish_omp_clauses): Add new default argument.
5167 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
5168 floating-point variables in the linear clause for Cilk Plus.
5169
fe37c7af
MM
51702016-04-18 Michael Matz <matz@suse.de>
5171
5172 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
5173 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
5174
949505a9
MP
51752016-04-15 Marek Polacek <polacek@redhat.com>
5176
5177 PR c/70671
5178 * c-typeck.c (build_unary_op): Pass location down to error and
5179 warning call.
5180
dda1bf61
JJ
51812016-04-15 Jakub Jelinek <jakub@redhat.com>
5182
5183 PR c/70436
5184 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
5185 where needed.
5186 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
5187 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
5188 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
5189 Adjust c_parser_pragma callers.
5190 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
5191 caller.
5192 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
5193 c_parser_statement.
5194 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
5195 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
5196 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
5197 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
5198 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
5199 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
5200 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
5201 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5202 down where needed.
5203 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5204 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5205 calls.
5206
99cd9857
MP
52072016-04-13 Marek Polacek <polacek@redhat.com>
5208
5209 PR c/70436
5210 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5211 adjust callers.
5212 (c_parser_statement): Likewise.
5213 (c_parser_c99_block_statement): Likewise.
5214 (c_parser_while_statement): Likewise.
5215 (c_parser_for_statement): Likewise.
5216 (c_parser_if_body): Don't set IF_P here.
5217 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5218 about dangling else here.
5219 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5220 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5221 warn about dangling else here.
5222
f13355da
MP
52232016-04-04 Marek Polacek <polacek@redhat.com>
5224
5225 PR c/70307
5226 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5227
5fde6a45
MP
52282016-03-31 Marek Polacek <polacek@redhat.com>
5229
5230 PR c/70297
5231 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5232
4bbf545b
DM
52332016-03-18 David Malcolm <dmalcolm@redhat.com>
5234
5235 PR c/70281
5236 * c-parser.c (c_parser_postfix_expression): Set the source range
5237 for uses of "__builtin_types_compatible_p".
5238
fcc2b74f
JJ
52392016-03-17 Jakub Jelinek <jakub@redhat.com>
5240
5241 PR c/70280
5242 * c-typeck.c (composite_type): Don't count void_list_node
5243 into len, if the list is terminated by void_list_node, start
5244 with void_list_node instead of NULL for newargs. Stop
5245 at void_list_node.
5246
ab4c578f
MP
52472016-03-16 Marek Polacek <polacek@redhat.com>
5248
5249 PR c/70093
5250 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5251 nested functions returning VM types.
5252
96b3c82d
CP
52532016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5254
5255 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5256 when calling c_finish_omp_clauses.
5257
29b9828f
BS
52582016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5259
5260 PR c/69824
5261 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5262 for later.
5263
7ff6ca38
MP
52642016-03-04 Marek Polacek <polacek@redhat.com>
5265
5266 PR c/69798
5267 * c-parser.c (c_parser_postfix_expression): Call
5268 c_parser_cast_expression rather than c_parser_postfix_expression.
5269
686e2237
JJ
52702016-03-01 Jakub Jelinek <jakub@redhat.com>
5271
5272 PR c/69796
5273 PR c/69974
5274 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5275 of incomplete decls to error_mark_node.
5276
0b05329b
MP
52772016-02-24 Marek Polacek <polacek@redhat.com>
5278
5279 PR c/69819
5280 * c-decl.c (finish_decl): Don't update the copy of the type of a
5281 different decl type.
5282
067fbd8b
JJ
52832016-02-23 Jakub Jelinek <jakub@redhat.com>
5284
5285 PR objc/69844
5286 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5287 in id_kind reclassification.
5288
bf14eba2
JJ
52892016-02-16 Jakub Jelinek <jakub@redhat.com>
5290
5291 PR c/69835
5292 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5293
ba539195
JN
52942016-02-16 James Norris <jnorris@codesourcery.com>
5295
5296 PR c/64748
5297 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5298
16595a1f
BS
52992016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5300
f48dfe98
BS
5301 * c-decl.c (build_null_declspecs): Zero the entire struct.
5302
16595a1f
BS
5303 PR c/69522
5304 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5305 callers changed. If nested_p is true, use it to call
5306 finish_implicit_inits.
5307 * c-tree.h (finish_implicit_inits): Declare.
5308 * c-typeck.c (finish_implicit_inits): New function. Move code
5309 from ...
5310 (push_init_level): ... here.
5311 (set_designator, process_init_element): Call finish_implicit_inits.
5312
66756373
JJ
53132016-02-11 Jakub Jelinek <jakub@redhat.com>
5314
5315 PR c/69768
5316 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5317 arguments for -Waddress warning.
5318
1066e9b5
JJ
53192016-02-04 Jakub Jelinek <jakub@redhat.com>
5320
5321 PR c/69669
5322 * c-decl.c (finish_enum): When honoring mode attribute,
5323 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5324
3a5d2ba4
JJ
53252016-01-29 Jakub Jelinek <jakub@redhat.com>
5326
5327 PR debug/69518
5328 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5329 all type variants, not just TYPE_MAIN_VARIANT.
5330
cbdd8ae0
JJ
53312016-01-27 Jakub Jelinek <jakub@redhat.com>
5332
5333 PR debug/66869
5334 * c-decl.c (c_write_global_declarations_1): Warn with
5335 warn_unused_function if static prototype without definition
5336 is not C_DECL_USED.
5337
fa74a4bc
MP
53382016-01-27 Marek Polacek <polacek@redhat.com>
5339
5340 PR c/68062
5341 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5342 to unsigned, if needed. Add -Wsign-compare warning.
5343
13f92e8d
JJ
53442016-01-26 Jakub Jelinek <jakub@redhat.com>
5345
5346 PR tree-optimization/69483
5347 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5348
cd8e73dc 53492016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
5350
5351 PR c/24293
5352 * c-tree.h (incomplete_record_decls): Declare.
5353 * c-parser.c (incomplete_record_decls): Define.
5354 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5355 report error if any decl has zero size.
5356 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5357 or enum type to incomplete_record_decls.
5358
e6d6ec9e
TV
53592016-01-14 Tom de Vries <tom@codesourcery.com>
5360
5361 PR tree-optimization/68773
5362 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5363 set force_output.
5364
00083992
MP
53652016-01-14 Marek Polacek <polacek@redhat.com>
5366
5367 PR c/69262
5368 * c-decl.c (grokdeclarator): Provide more information for invalid
5369 array declarations.
5370
7443cf13
DM
53712016-01-06 David Malcolm <dmalcolm@redhat.com>
5372
5373 * c-parser.c (c_parser_unary_expression): For dereferences, build
5374 a combined location before calling build_indirect_ref, so that
5375 error reports cover the full range, manually updating the c_expr
5376 src_range.
5377
6b131d5b
MP
53782016-01-06 Marek Polacek <polacek@redhat.com>
5379
5380 PR sanitizer/69099
5381 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5382 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5383 NULL.
5384
818ab71a
JJ
53852016-01-04 Jakub Jelinek <jakub@redhat.com>
5386
5387 Update copyright years.
5388
2fe0a208
MP
53892016-01-04 Marek Polacek <polacek@redhat.com>
5390
5391 PR c/68908
5392 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5393 optimization to use __atomic_fetch_* built-in if possible.
5394
c7b48c8a
TS
53952015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5396
5397 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5398 into...
5399 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5400 all users.
5401
fda5652f
MP
54022015-12-22 Marek Polacek <polacek@redhat.com>
5403
5404 PR c/69002
5405 * c-typeck.c (build_component_ref): Warn when acessing elements of
5406 atomic structures or unions.
5407
745e411d
DM
54082015-12-21 David Malcolm <dmalcolm@redhat.com>
5409
5410 * c-typeck.c: Include "gcc-rich-location.h".
5411 (build_binary_op): In the two places that call binary_op_error,
5412 create a gcc_rich_location and populate it with the location of
5413 the binary op and its two operands.
5414
94c40e19
DM
54152015-12-16 David Malcolm <dmalcolm@redhat.com>
5416
5417 * c-parser.c (c_parser_statement_after_labels): When calling
5418 c_finish_return, Use the return expression's location if it has
5419 one, falling back to the location of the first token within it.
5420 * c-typeck.c (c_finish_return): When issuing warnings about
5421 the incorrect presence/absence of a return value, issue a note
5422 showing the declaration of the function.
5423
de67c4c3
DM
54242015-12-16 David Malcolm <dmalcolm@redhat.com>
5425
5426 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5427 to 4.
5428 (c_parser_peek_nth_token): New function.
5429 (c_parser_peek_conflict_marker): New function.
5430 (c_parser_error): Detect conflict markers and report them as such.
5431
a10704e1
DM
54322015-12-16 David Malcolm <dmalcolm@redhat.com>
5433
5434 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5435 to preserve range information for the primary expression
5436 in the call to c_parser_postfix_expression_after_primary.
5437
8062bca6
DM
54382015-12-16 David Malcolm <dmalcolm@redhat.com>
5439
5440 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5441 expression location, falling back on the first token location,
5442 rather than always using the latter.
5443
d06f8b75
MP
54442015-12-16 Marek Polacek <polacek@redhat.com>
5445
5446 PR c/64637
5447 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5448 available.
5449
2994fb91
MP
54502015-12-15 Marek Polacek <polacek@redhat.com>
5451
5452 PR c/68907
5453 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5454 artificial decl.
5455
a1b93f8d
DM
54562015-12-08 David Malcolm <dmalcolm@redhat.com>
5457
5458 * c-parser.c (c_parser_alignof_expression): Capture location of
5459 closing parenthesis (if any), or of end of unary expression, and
5460 use it to build a src_range for the expression.
5461
46c6e1e2
DM
54622015-12-08 David Malcolm <dmalcolm@redhat.com>
5463
5464 PR c/68757
5465 * c-parser.c (c_parser_get_builtin_args): Add
5466 "out_close_paren_loc" param, and write back to it.
5467 (c_parser_postfix_expression): Capture the closing
5468 parenthesis location for RID_CHOOSE_EXPR,
5469 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5470 RID_BUILTIN_SHUFFLE and use it to set the source range
5471 for such expressions; within RID_BUILTIN_COMPLEX set
5472 the underlying location.
5473
66189108
MP
54742015-12-07 Marek Polacek <polacek@redhat.com>
5475
5476 PR c/68668
5477 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5478 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5479
f187980b
EB
54802015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5481
5482 * c-tree.h (c_build_va_arg): Adjust prototype.
5483 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5484 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5485 parameter, adjust throughout and issue an error if EXPR is a component
5486 with reverse storage order.
5487
4250754e
JM
54882015-12-02 Jason Merrill <jason@redhat.com>
5489
5490 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5491 (c_fully_fold_internal, decl_constant_value_for_optimization):
5492 Move from c-common.c.
5493 * c-tree.h: Declare decl_constant_value_for_optimization.
5494 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5495
e9e32ee6
JM
54962015-12-02 Joseph Myers <joseph@codesourcery.com>
5497
5498 PR c/68162
5499 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5500 following link from declarator to next declarator. Track original
5501 qualified type and pass it to c_build_qualified_type.
5502 * c-typeck.c (c_build_qualified_type): Add arguments
5503 orig_qual_type and orig_qual_indirect.
5504
ff7a55bf
TS
55052015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5506
5507 * c-parser.c (c_parser_omp_clause_name)
5508 (c_parser_oacc_all_clauses): Alphabetical sorting.
5509
657e4e47
JJ
55102015-12-02 Jakub Jelinek <jakub@redhat.com>
5511
5512 PR c/68533
5513 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5514 for diagnostics.
5515
37d5ad46
JB
55162015-12-01 Julian Brown <julian@codesourcery.com>
5517 Cesar Philippidis <cesar@codesourcery.com>
5518 James Norris <James_Norris@mentor.com>
5519
5520 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5521 (c_parser_oacc_clause_use_device): New function.
5522 (c_parser_oacc_all_clauses): Add use_device support.
5523 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5524 (c_parser_oacc_host_data): New function.
5525 (c_parser_omp_construct): Add host_data support.
5526 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5527 * c-typeck.c (c_finish_oacc_host_data): New function.
5528 (c_finish_omp_clauses): Add use_device support.
5529
a4850ce9
JH
55302015-11-29 Jan Hubicka <hubicka@ucw.cz>
5531
5532 PR c/67106
5533 * c-decl.c: Set TYPE_PACKED in variants.
5534
b58d3df2
ML
55352015-11-27 Martin Liska <mliska@suse.cz>
5536
5537 PR c++/68312
5538 * c-array-notation.c (fix_builtin_array_notation_fn):
5539 Use release_vec_vec instead of vec::release.
5540 (build_array_notation_expr): Likewise.
5541 (fix_conditional_array_notations_1): Likewise.
5542 (fix_array_notation_expr): Likewise.
5543 (fix_array_notation_call_expr): Likewise.
5544
aec17bfe
JJ
55452015-11-27 Jakub Jelinek <jakub@redhat.com>
5546
5547 PR c/63326
5548 * c-parser.c (c_parser_compound_statement_nostart): If
5549 last_label is true, use pragma_stmt instead of pragma_compound
5550 as second c_parser_pragma argument.
5551 (c_parser_omp_ordered, c_parser_omp_target_update,
5552 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5553 false as second argument to c_parser_skip_to_pragma_eol after
5554 diagnosing standalone directives used in pragma_stmt context.
5555
688c4de0
IV
55562015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5557
5558 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5559 with "if (ENABLE_OFFLOADING)".
5560
cbd03aee
DM
55612015-11-23 David Malcolm <dmalcolm@redhat.com>
5562
5563 PR objc/68438
5564 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5565 for various Objective-C constructs: Class.name syntax,
5566 @selector(), @protocol(), @encode(), and [] message syntax.
5567
a87a86e1
DM
55682015-11-20 David Malcolm <dmalcolm@redhat.com>
5569
5570 PR 62314
5571 * c-typeck.c (should_suggest_deref_p): New function.
5572 (build_component_ref): Special-case POINTER_TYPE when
5573 generating a "not a structure of union" error message, and
5574 suggest a "->" rather than a ".", providing a fix-it hint.
5575
8ece8dfb
DM
55762015-11-19 David Malcolm <dmalcolm@redhat.com>
5577
5578 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5579 candidate into a new function, find_closest_identifier.
5580
433068cc
MP
55812015-11-19 Marek Polacek <polacek@redhat.com>
5582
5583 PR c/68412
5584 * c-typeck.c (parser_build_binary_op): Properly handle
5585 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5586
bef08b71
DM
55872015-11-17 David Malcolm <dmalcolm@redhat.com>
5588
5589 * c-parser.c (set_c_expr_source_range): Bulletproof both
5590 overloaded implementations against NULL expr->value.
5591 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5592 values.
5593 (c_parser_unary_expression): Likewise when handling addresses of
5594 labels.
5595 (c_parser_postfix_expression): Likewise for statement expressions,
5596 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5597 __builtin_va_arg, and for __builtin_offset_of.
5598 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5599 src_range using the range of the braced initializer.
5600 (c_parser_transaction_expression): Set src_range for "ret" to a
5601 sane pair of values.
5602
fff77217
KY
56032015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5604
5605 * c-parser.c (c_finish_omp_declare_simd): Look for
5606 "simd" attribute as well. Update error message.
5607
1d899da2
TS
56082015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5609
5610 * c-parser.c (c_parser_omp_declare_target): Adjust.
5611
e4606348
JJ
56122015-11-14 Jakub Jelinek <jakub@redhat.com>
5613
5614 * c-typeck.c (c_finish_omp_clauses): Don't mark
5615 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5616
3e636daf
MP
56172015-11-14 Marek Polacek <polacek@redhat.com>
5618
5619 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5620 * c-typeck.c: Likewise.
5621
ebedc9a3
DM
56222015-11-13 David Malcolm <dmalcolm@redhat.com>
5623
5624 * c-decl.c (warn_defaults_to): Pass line_table to
5625 rich_location ctor.
5626 * c-errors.c (pedwarn_c99): Likewise.
5627 (pedwarn_c90): Likewise.
5628 * c-parser.c (set_c_expr_source_range): New functions.
5629 (c_token::get_range): New method.
5630 (c_token::get_finish): New method.
5631 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5632 based on the range from the start of the LHS to the end of the
5633 RHS.
5634 (c_parser_conditional_expression): Likewise, based on the range
5635 from the start of the cond.value to the end of exp2.value.
5636 (c_parser_binary_expression): Call set_c_expr_source_range on
5637 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5638 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5639 based on the cast_loc through to the end of the expr.
5640 (c_parser_unary_expression): Likewise, based on the
5641 op_loc through to the end of op.
5642 (c_parser_sizeof_expression) Likewise, based on the start of the
5643 sizeof token through to either the closing paren or the end of
5644 expr.
5645 (c_parser_postfix_expression): Likewise, using the token range,
5646 or from the open paren through to the close paren for
5647 parenthesized expressions.
5648 (c_parser_postfix_expression_after_primary): Likewise, for
5649 various kinds of expression.
5650 * c-tree.h (struct c_expr): Add field "src_range".
5651 (c_expr::get_start): New method.
5652 (c_expr::get_finish): New method.
5653 (set_c_expr_source_range): New decls.
5654 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5655 on ret for prefix unary ops.
5656 (parser_build_binary_op): Likewise, running from the start of
5657 arg1.value through to the end of arg2.value.
5658
ec8b536f
MP
56592015-11-13 Marek Polacek <polacek@redhat.com>
5660
5661 PR c/68320
5662 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5663
277fe616
DM
56642015-11-13 David Malcolm <dmalcolm@redhat.com>
5665
5666 * c-typeck.c: Include spellcheck.h.
5667 (lookup_field_fuzzy_find_candidates): New function.
5668 (lookup_field_fuzzy): New function.
5669 (build_component_ref): If the field was not found, try using
5670 lookup_field_fuzzy and potentially offer a suggestion.
5671
6e232ba4
JN
56722015-11-12 James Norris <jnorris@codesourcery.com>
5673 Joseph Myers <joseph@codesourcery.com>
5674
5675 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5676 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5677 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5678 and PRAGMA_OMP_CLAUSE_LINK.
5679 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5680 and PRAGMA_OACC_CLAUSE_LINK.
5681 (OACC_DECLARE_CLAUSE_MASK): New definition.
5682 (c_parser_oacc_declare): New function.
5683
9be4f715
MP
56842015-11-12 Marek Polacek <polacek@redhat.com>
5685
5686 PR c/67784
5687 * c-parser.c (c_parser_for_statement): Reclassify the token in
5688 a correct scope.
5689
e78bede6
MP
56902015-11-11 Marek Polacek <polacek@redhat.com>
5691
5692 PR c/68107
5693 PR c++/68266
5694 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5695 checking the size of an array.
5696
69f293c9
AM
56972015-11-11 Andrew MacLeod <amacleod@redhat.com>
5698
5699 * c-array-notation.c: Remove unused header files.
5700 * c-aux-info.c: Likewise.
5701 * c-convert.c: Likewise.
5702 * c-decl.c: Likewise.
5703 * c-errors.c: Likewise.
5704 * c-lang.c: Likewise.
5705 * c-objc-common.c: Likewise.
5706 * c-parser.c: Likewise.
5707 * c-typeck.c: Likewise.
5708 * gccspec.c: Likewise.
5709
3a40d81d
NS
57102015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5711 Cesar Philippidis <cesar@codesourcery.com>
5712 James Norris <jnorris@codesourcery.com>
5713 Julian Brown <julian@codesourcery.com>
5714 Nathan Sidwell <nathan@codesourcery.com>
5715
3a40d81d
NS
5716 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5717 routine arg.
5718 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5719 (c_parser_pragma): Parse 'acc routine'.
5720 (OACC_ROUTINE_CLAUSE_MARK): Define.
5721 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5722
fc402eec
AA
57232015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5724
5725 PR debug/67192
5726 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5727 location of the backward-goto to the start of the loop body.
5728
f6b0b3db
AA
57292015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5730
5731 PR debug/67192
5732 * c-parser.c (c_parser_while_statement): Finish the loop before
5733 parsing ahead for misleading indentation.
5734 (c_parser_for_statement): Likewise.
5735
ee45a32d
EB
57362015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5737
5738 * c-decl.c (finish_struct): If the structure has reverse storage
5739 order, rewrite the type of array fields with scalar component. Call
5740 maybe_apply_pragma_scalar_storage_order on entry.
5741 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5742 errors on bit-fields and reverse SSO here and not...
5743 (c_mark_addressable): ...here.
5744 (output_init_element): Adjust call to initializer_constant_valid_p.
5745 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5746
8a645150
DM
57472015-11-06 David Malcolm <dmalcolm@redhat.com>
5748
5749 * c-decl.c (warn_defaults_to): Update for change in signature
5750 of diagnostic_set_info.
5751 * c-errors.c (pedwarn_c99): Likewise.
5752 (pedwarn_c90): Likewise.
5753 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5754 for textinfo::set_location.
5755
7a5e4956
CP
57562015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5757 Thomas Schwinge <thomas@codesourcery.com>
5758 James Norris <jnorris@codesourcery.com>
5759
5760 * c-parser.c (c_parser_omp_clause_name): Add support for
5761 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5762 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5763 default(none) in OpenACC.
5764 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5765 arguments.
5766 (c_parser_oacc_clause_tile): New function.
5767 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5768 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5769 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5770 TILE}.
5771 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5772 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5773 FIRSTPRIVATE}.
5774 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5775 (c_parser_oacc_update): Update the error message for missing clauses.
5776 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5777 and OMP_CLAUSE_INDEPENDENT.
5778
bfcfbfa0
MP
57792015-11-05 Marek Polacek <polacek@redhat.com>
5780
5781 PR c/68090
5782 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5783 deal with pre-evaluation on invalid types.
5784
e01d41e5
JJ
57852015-11-05 Jakub Jelinek <jakub@redhat.com>
5786 Ilya Verbin <ilya.verbin@intel.com>
5787
5788 * c-parser.c: Include context.h and gimple-expr.h.
5789 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5790 monotonic together with nonmonotonic.
5791 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5792 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5793 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5794 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5795 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5796 expressions on combined target teams before the target.
5797 (c_parser_omp_declare_target): If decl has "omp declare target" or
5798 "omp declare target link" attribute, and cgraph or varpool node already
5799 exists, then set corresponding flags. Call c_finish_omp_clauses
5800 in the parenthesized extended-list syntax case.
5801 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5802 declare target.
5803 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5804 on OMP_CLAUSE_REDUCTION array sections.
5805 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5806 into the constant offset, or for variable low-bound using
5807 POINTER_PLUS_EXPR. For structure element based array sections use
5808 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5809 (c_finish_omp_clauses): Drop generic_field_head, structure
5810 elements are now always mapped even as array section bases,
5811 diagnose same var in data sharing and mapping clauses. Diagnose if
5812 linear step on declare simd is neither a constant nor a uniform
5813 parameter. Look through POINTER_PLUS_EXPR for array section
5814 reductions. Diagnose the same var or function appearing multiple
5815 times on the same directive. Fix up wording for the to clause if t
5816 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5817 modifier on kinds other than dynamic or guided or nonmonotonic
5818 modifier together with ordered clause.
5819
4bf9e5a8
TS
58202015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5821 Chung-Lin Tang <cltang@codesourcery.com>
5822
5823 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5824
2adfab87
AM
58252015-10-29 Andrew MacLeod <amacleod@redhat.com>
5826
5827 * c-array-notation.c: Reorder #include's and remove duplicates.
5828 * c-aux-info.c: Likewise.
5829 * c-convert.c: Likewise.
5830 * c-decl.c: Likewise.
5831 * c-errors.c: Likewise.
5832 * c-lang.c: Likewise.
5833 * c-objc-common.c: Likewise.
5834 * c-parser.c: Likewise.
5835 * c-typeck.c: Likewise.
5836
e922069e
JW
58372015-10-26 Jim Wilson <jim.wilson@linaro.org>
5838
5839 PR debug/66068
5840 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5841 after calling build_qualified_type.
5842
765dd391
CP
58432015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5844 Thomas Schwinge <thomas@codesourcery.com>
5845 James Norris <jnorris@codesourcery.com>
5846 Joseph Myers <joseph@codesourcery.com>
5847 Julian Brown <julian@codesourcery.com>
5848 Bernd Schmidt <bschmidt@redhat.com>
5849
5850 * c-parser.c (c_parser_oacc_shape_clause): New.
5851 (c_parser_oacc_simple_clause): New.
5852 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5853 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5854
88bae6f4
TS
58552015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5856 James Norris <jnorris@codesourcery.com>
5857 Cesar Philippidis <cesar@codesourcery.com>
5858
5859 PR c/64765
5860 PR c/64880
5861 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5862 parameters, and handle these. Adjust all users.
5863 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5864 into...
5865 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5866 all users.
5867 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5868 declare functions.
5869 (c_finish_omp_construct): Declare function.
5870 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5871 Merge functions into...
5872 (c_finish_omp_construct): ... this new function.
5873
a8fc2579
RB
58742015-10-22 Richard Biener <rguenther@suse.de>
5875
5876 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5877 before folding a MINUS_EXPR.
5878
e9122ef6
MP
58792015-10-21 Marek Polacek <polacek@redhat.com>
5880
5881 PR c/68024
5882 * c-decl.c (start_function): Warn about vararg functions without
5883 a prototype.
5884
9f47c7e5
IE
58852015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5886
5887 * c-typeck.c (build_conditional_expr): Use boolean vector
5888 type for vector comparison.
5889 (build_vec_cmp): New.
5890 (build_binary_op): Use build_vec_cmp for comparison.
5891
fa60eeb9
MP
58922015-10-20 Marek Polacek <polacek@redhat.com>
5893
5894 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5895
2c7020eb
MP
58962015-10-20 Marek Polacek <polacek@redhat.com>
5897
5898 PR c/67964
5899 * c-parser.c (c_parser_attributes): Break out of the loop if the
5900 token after an attribute isn't a comma.
5901
d9a6bd32
JJ
59022015-10-13 Jakub Jelinek <jakub@redhat.com>
5903 Aldy Hernandez <aldyh@redhat.com>
5904
5905 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5906 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5907 (c_parser_omp_variable_list): Handle structure elements for
5908 map, to and from clauses. Handle array sections in reduction
5909 clause. Formatting fixes.
5910 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5911 if clause modifiers.
5912 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5913 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5914 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5915 c_parser_omp_clause_is_device_ptr): New functions.
5916 (c_parser_omp_clause_ordered): Parse optional parameter.
5917 (c_parser_omp_clause_reduction): Handle array reductions.
5918 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5919 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5920 functions.
5921 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5922 (c_parser_omp_clause_depend_sink): New function.
5923 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5924 (c_parser_omp_clause_map): Parse release/delete map kinds and
5925 optional always modifier.
5926 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5927 and c_finish_omp_clauses callers.
5928 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5929 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5930 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5931 (OMP_CRITICAL_CLAUSE_MASK): Define.
5932 (c_parser_omp_critical): Parse critical clauses.
5933 (c_parser_omp_for_loop): Handle doacross loops, adjust
5934 c_finish_omp_for and c_finish_omp_clauses callers.
5935 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5936 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5937 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5938 (c_parser_omp_for): Disallow ordered clause when combined with
5939 distribute. Disallow linear clause when combined with distribute
5940 and not combined with simd.
5941 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5942 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5943 parse clauses and if depend clause is found, don't parse a body.
5944 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5945 Allow target parallel without for after it.
5946 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5947 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5948 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5949 invalid kinds.
5950 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5951 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5952 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5953 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5954 functions.
5955 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5956 defaultmap and is_device_ptr clauses.
5957 (c_parser_omp_target): Parse target parallel and target simd. Set
5958 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5959 and target exit data. Diagnose invalid map kinds.
5960 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5961 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5962 construct.
5963 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5964 &omp_priv.
5965 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5966 (c_parser_omp_taskloop): New function.
5967 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5968 handle PRAGMA_OMP_TASKLOOP.
5969 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5970 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5971 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5972 Add IS_OMP argument, handle structure element bases, diagnose
5973 bitfields, pass IS_OMP recursively, diagnose known zero length
5974 array sections in depend clauses, handle array sections in reduction
5975 clause, diagnose negative length even for pointers.
5976 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5977 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5978 array sections in reduction clause, set
5979 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5980 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5981 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5982 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5983
21ba0cea
MP
59842015-10-06 Marek Polacek <polacek@redhat.com>
5985
5986 * c-parser.c (c_parser_statement_after_labels): Use
5987 protected_set_expr_location.
5988 (c_parser_omp_clause_num_gangs): Likewise.
5989 (c_parser_omp_clause_num_threads): Likewise.
5990 (c_parser_omp_clause_num_workers): Likewise.
5991 (c_parser_omp_clause_vector_length): Likewise.
5992 (c_parser_omp_clause_num_teams): Likewise.
5993 (c_parser_omp_clause_thread_limit): Likewise.
5994 * c-typeck.c (build_c_cast): Likewise.
5995 (c_cast_expr): Likewise.
5996
624d31fe
RS
59972015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5998
5999 * c-typeck.c (c_tree_equal): Use real_equal instead of
6000 REAL_VALUES_EQUAL.
6001
b8fd7909
JM
60022015-10-04 Jason Merrill <jason@redhat.com>
6003
6004 * c-parser.c (c_lex_one_token): Handle @synchronized.
6005 * c-decl.c (match_builtin_function_types): A declaration of a built-in
6006 can change whether the function is transaction_safe.
6007
1c7485af
MP
60082015-10-02 Marek Polacek <polacek@redhat.com>
6009
6010 PR c/67730
6011 * c-typeck.c (convert_for_assignment): Use the expansion point
6012 location throughout.
6013
3e3b8d63
MP
60142015-10-02 Marek Polacek <polacek@redhat.com>
6015
6016 PR c/64249
6017 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
6018 and pass it down to c_parser_if_statement.
6019 (c_parser_else_body): Add CHAIN parameter and pass it down to
6020 c_parser_statement_after_labels.
6021 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
6022 duplicated if-else-if conditions.
6023
aabef2de
MP
60242015-10-01 Marek Polacek <polacek@redhat.com>
6025
6026 * c-typeck.c (convert_for_assignment): Improve commentary.
6027
de8ddd5f
MP
60282015-09-30 Marek Polacek <polacek@redhat.com>
6029
6030 PR c/67730
6031 * c-typeck.c (c_finish_return): Use the expansion point location for
6032 certain "return with value" warnings.
6033
c4914de6
MLI
60342015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6035
6036 * c-parser.c (pragma_lex): Add loc argument.
6037
0e36f5c7
MP
60382015-09-15 Marek Polacek <polacek@redhat.com>
6039
6040 PR c/67580
6041 * c-decl.c (tag_exists_p): New function.
6042 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
6043 struct/union/enum keywords are missing.
6044 * c-tree.h (tag_exists_p): Declare.
6045
2f3bb934
MP
60462015-09-15 Marek Polacek <polacek@redhat.com>
6047
6048 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
6049 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
6050 Return NULL_TREE instead of 0.
6051 (lookup_name): Return NULL_TREE instead of 0.
6052 (lookup_name_in_scope): Likewise.
6053 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
6054 (parser_xref_tag): Use false instead of 0.
6055 (start_struct): Use true instead of 1.
6056 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
6057
aa256c4a
MP
60582015-09-14 Marek Polacek <polacek@redhat.com>
6059
6060 * c-typeck.c (set_nonincremental_init_from_string): Use
6061 HOST_WIDE_INT_M1U when shifting a negative value.
6062
dbb68221
MW
60632015-09-09 Mark Wielaard <mjw@redhat.com>
6064
6065 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
6066 parm against NULL.
6067
a8a098ac
JJ
60682015-09-10 Jakub Jelinek <jakub@redhat.com>
6069
6070 PR c/67502
6071 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
6072 into OMP_FOR_PRE_BODY rather than before the loop.
6073
f4b189d5
JJ
60742015-09-09 Jakub Jelinek <jakub@redhat.com>
6075
0bb99c11
JJ
6076 PR c/67501
6077 * c-parser.c (c_parser_oacc_all_clauses,
6078 c_parser_omp_all_clauses): Remove invalid clause from
6079 list of clauses even if parser->error is set.
6080
fce5e5e3
JJ
6081 PR c/67500
6082 * c-parser.c (c_parser_omp_clause_aligned,
6083 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
6084 test for errors.
6085 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
6086 error_mark_node.
6087
f4b189d5
JJ
6088 PR c/67495
6089 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
6090 instead of c_parser_unary_expression. If the result is !lvalue_p,
6091 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
6092
b2aaf235
MP
60932015-09-04 Marek Polacek <polacek@redhat.com>
6094
6095 PR sanitizer/67279
6096 * c-typeck.c (build_binary_op): Don't instrument static initializers.
6097
1807ffc1
MS
60982015-09-03 Martin Sebor <msebor@redhat.com>
6099
6100 PR c/66516
8b652e65
JJ
6101 * c-typeck.c (convert_arguments, parser_build_unary_op,
6102 build_conditional_expr, c_cast_expr, convert_for_assignment,
6103 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
6104 reject_gcc_builtin.
6105 (c_decl_implicit): Define.
6106
d04ff417
MP
61072015-09-02 Marek Polacek <polacek@redhat.com>
6108
6109 PR c/67432
6110 * c-parser.c (c_parser_enum_specifier): Give a better error for
6111 an empty enum.
6112
a79683d5
TS
61132015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6114
6115 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
6116
191a6b94
MP
61172015-08-12 Marek Polacek <polacek@redhat.com>
6118
6119 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
6120 LOC to it.
6121
420a9d9b
MP
61222015-08-03 Marek Polacek <polacek@redhat.com>
6123
6124 PR c/67088
6125 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
6126 Use it.
6127 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
6128
992118a1
PP
61292015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6130
6131 * c-parser.c (c_parser_if_body): Take token_indent_info
6132 argument. Call warn_for_misleading_indentation even when the
6133 body is a semicolon. Extract token_indent_infos corresponding
6134 to the guard, body and next tokens. Adjust call to
6135 warn_for_misleading_indentation accordingly.
6136 (c_parser_else_body): Likewise.
6137 (c_parser_if_statement): Likewise.
6138 (c_parser_while_statement): Likewise.
6139 (c_parser_for_statement): Likewise.
6140
46308474
LFSM
61412015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
6142 Manuel López-Ibáñez <manu@gcc.gnu.org>
6143
6144 * c-decl.c (get_parm_info): Remove static var. Update warning
6145 message.
6146
05b28fd6
MP
61472015-07-27 Marek Polacek <polacek@redhat.com>
6148
6149 PR c++/66555
6150 PR c/54979
6151 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
6152
451b5e48
MP
61532015-07-20 Marek Polacek <polacek@redhat.com>
6154
6155 PR c++/55095
6156 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
6157 (build_binary_op): Warn about left shift overflows.
6158
1916bcb5
AM
61592015-07-09 Andrew MacLeod <amacleod@redhat.com>
6160
6161 * c-array-notation.c: Adjust includes for flags.h changes.
6162 * c-objc-common.c: Likewise.
6163
c7131fb2
AM
61642015-07-07 Andrew MacLeod <amacleod@redhat.com>
6165
6166 * c-array-notation.c: Adjust includes.
6167 * c-aux-info.c: Likewise.
6168 * c-convert.c: Likewise.
6169 * c-decl.c: Likewise.
6170 * c-errors.c: Likewise.
6171 * c-lang.c: Likewise.
6172 * c-objc-common.c: Likewise.
6173 * c-parser.c: Likewise.
6174 * c-typeck.c: Likewise.
6175
da2e71c9
MLI
61762015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6177
6178 PR fortran/66605
6179 * c-decl.c (finish_function): Call do_warn_unused_parameter.
6180
b155cfd9
MP
61812015-06-29 Marek Polacek <polacek@redhat.com>
6182
6183 PR c/66322
6184 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
6185 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
6186 about -Wswitch-bool here.
6187 (do_case): Update c_add_case_label call.
6188 (c_finish_case): Update c_do_switch_warnings call.
6189
31521951
MP
61902015-06-27 Marek Polacek <polacek@redhat.com>
6191
6192 * c-typeck.c: Use VECTOR_TYPE_P throughout.
6193
22d03525
MP
61942015-06-26 Marek Polacek <polacek@redhat.com>
6195
6196 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6197 INDIRECT_REF_P.
6198 * c-typeck.c (array_to_pointer_conversion): Likewise.
6199 (build_unary_op): Likewise.
6200 (c_finish_return): Likewise.
6201
f0889939
AM
62022015-06-25 Andrew MacLeod <amacleod@redhat.com>
6203
6204 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6205 * c-parser.c: Likewise.
6206
8d67ee55
RS
62072015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6208
6209 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6210 instead of pointer_hash.
6211 (detect_field_duplicates): Likewise.
6212
0ae9bd27
MP
62132015-06-25 Marek Polacek <polacek@redhat.com>
6214
6215 * c-array-notation.c: Use VAR_P throughout.
6216 * c-decl.c: Likewise.
6217 * c-objc-common.c: Likewise.
6218 * c-parser.c: Likewise.
6219 * c-typeck.c: Likewise.
6220
62f9079a
MP
62212015-06-25 Marek Polacek <polacek@redhat.com>
6222
6223 * c-decl.c: Use is_global_var throughout.
6224 * c-parser.c: Likewise.
6225 * c-typeck.c: Likewise.
6226
abb226c9
AM
62272015-06-17 Andrew MacLeod <amacleod@redhat.com>
6228
6229 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6230 * c-aux-info.c: Likewise.
6231 * c-convert.c: Likewise.
6232 * c-decl.c: Likewise.
6233 * c-errors.c: Likewise.
6234 * c-lang.c: Likewise.
6235 * c-objc-common.c: Likewise.
6236 * c-parser.c: Likewise.
6237 * c-typeck.c: Likewise.
6238
8cbababc
JH
62392015-06-11 Jan Hubicka <hubicka@ucw.cz>
6240
6241 PR middle-end/66325
6242 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6243 variants.
6244
a0349665
PMR
62452015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6246
6247 * c-decl.c (pop_scope): Register the main translation unit
6248 through the new debug hook.
6249
13fdf2e2
AM
62502015-06-08 Andrew MacLeod <amacleod@redhat.com>
6251
6252 * c-array-notation.c : Adjust include files.
6253 * c-aux-info.c : Likewise.
6254 * c-convert.c : Likewise.
6255 * c-decl.c : Likewise.
6256 * c-errors.c : Likewise.
6257 * c-lang.c : Likewise.
6258 * c-lang.h : Likewise.
6259 * c-objc-common.c : Likewise.
6260 * c-parser.c : Likewise.
6261 * c-typeck.c : Likewise.
6262
d7438551
AH
62632015-06-05 Aldy Hernandez <aldyh@redhat.com>
6264
6265 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6266 immediately clobber it.
6267 (c_write_global_declarations_1): Remove call to
6268 check_global_declaration_1.
6269 (c_write_global_declarations_2): Remove.
6270 (c_write_final_cleanups): Rename from c_write_global_declarations.
6271 Remove call to finalize_compilation_unit.
6272 Remove calls to debugging hooks.
6273 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6274 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6275 * c-tree.h: Remove c_write_global_declarations.
6276
ecb9f223
AM
62772015-06-04 Andrew MacLeod <amacleod@redhat.com>
6278
6279 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6280 * c-aux-info.c: Likewise.
6281 * c-convert.c: Likewise.
6282 * c-decl.c: Likewise.
6283 * c-errors.c: Likewise.
6284 * c-lang.c: Likewise.
6285 * c-objc-common.c: Likewise.
6286 * c-parser.c: Likewise.
6287 * c-typeck.c: Likewise.
6288
9482b620
MP
62892015-06-04 Marek Polacek <polacek@redhat.com>
6290
6291 PR c/66341
6292 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6293 it is a lvalue.
6294
bc51ace3
PK
62952015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6296
6297 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6298 Warn for empty struct.
6299 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6300
ea5b45b6
AT
63012015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6302
6303 * c-decl.c (start_function): Call plugin before parsing.
6304 (finish_function): Call plugin after parsing.
6305
c2d47482
PK
63062015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6307
6308 PR c/49551
6309 * c-decl.c (merge_decls): Merge DECL_COMMON.
6310
a95492ab
JW
63112015-05-22 Jim Wilson <jim.wilson@linaro.org>
6312
6313 * Make-lang.in (check_gcc_pallelize): Define.
6314
fd5c817a
MP
63152015-05-22 Marek Polacek <polacek@redhat.com>
6316
6317 PR c/47043
6318 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6319 attributes.
6320
c7b70a3c
MP
63212015-05-21 Marek Polacek <polacek@redhat.com>
6322
6323 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6324 DECL_BUILT_IN.
6325
21b634ae
MP
63262015-05-20 Marek Polacek <polacek@redhat.com>
6327
6328 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6329 * c-typeck.c: Likewise.
6330
296a8c2f
MP
63312015-05-19 Marek Polacek <polacek@redhat.com>
6332
6333 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6334
41b37d5e
JJ
63352015-05-19 Jakub Jelinek <jakub@redhat.com>
6336
6337 PR middle-end/66199
6338 * c-parser.c (c_parser_omp_for_loop): Don't add
6339 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6340 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6341 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6342 constructs.
6343
fab27f52
MM
63442015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6345
6346 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 6347 swaps.
fab27f52 6348
40de31cf
MLI
63492015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6350
6351 PR fortran/44054
6352 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6353 accessor function.
6354
3aa3c9fc
MP
63552015-05-14 Marek Polacek <polacek@redhat.com>
6356
6357 PR c/66066
6358 PR c/66127
6359 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6360 rather than with 0.
6361
c3388e62
DM
63622015-05-12 David Malcolm <dmalcolm@redhat.com>
6363
6364 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6365 to add a call to warn_for_misleading_indentation.
6366 (c_parser_else_body): Likewise, adding param "else_loc".
6367 (c_parser_if_statement): Check for misleading indentation.
6368 (c_parser_while_statement): Likewise.
6369 (c_parser_for_statement): Likewise.
6370
755e528f
MP
63712015-05-08 Marek Polacek <polacek@redhat.com>
6372
6373 PR c/64918
6374 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6375 (output_init_element): Likewise.
6376
0173bd2a
MP
63772015-05-07 Marek Polacek <polacek@redhat.com>
6378
6379 PR c/65179
6380 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6381 value.
6382
9babc352
MP
63832015-04-30 Marek Polacek <polacek@redhat.com>
6384
6385 * c-typeck.c (set_init_label): Call error_at instead of error and
6386 pass LOC to it.
6387
ac9f18db
MP
6388 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6389 the type of a decl.
6390
ec3fba51
MP
6391 * c-typeck.c (c_build_va_arg): Clarify the error message.
6392
b811915d
TS
63932015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6394
6395 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6396 OMP_STANDALONE_CLAUSES.
6397
f3075008
MP
63982015-04-28 Marek Polacek <polacek@redhat.com>
6399
6400 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6401
4e81b788
MP
64022015-04-28 Marek Polacek <polacek@redhat.com>
6403
6404 PR c/65901
6405 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6406
6c1db78e
MP
64072015-04-25 Marek Polacek <polacek@redhat.com>
6408
6409 PR c/52085
6410 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6411 attribute.
6412
5c4abbb8
MP
64132015-04-23 Marek Polacek <polacek@redhat.com>
6414
6415 PR c/65345
6416 * c-decl.c (set_labels_context_r): New function.
6417 (store_parm_decls): Call it via walk_tree_without_duplicates.
6418 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6419 instead of create_tmp_var. Build TARGET_EXPR instead of
6420 COMPOUND_EXPR.
6421 (build_atomic_assign): Use create_tmp_var_raw instead of
6422 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6423
06aca1d5
IV
64242015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6425
6426 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6427 (c_parser_omp_target_update): Add missed %> to error_at ().
6428
8fba1830
BRF
64292015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6430
6431 PR target/55143
6432 * c-decl.c (c_default_pointer_mode): Remove definition.
6433 * c-tree.h (c_default_pointer_mode): Remove declaration.
6434
62021f64
TB
64352015-03-27 Tobias Burnus <burnus@net-b.de>
6436
6437 PR c/65586
6438 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6439 error out.
6440 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6441 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6442 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6443
9b65e171
JJ
64442015-03-19 Jakub Jelinek <jakub@redhat.com>
6445
6446 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6447 attribute for DECL_EXTERNAL VAR_DECLs.
6448
17958621
JJ
64492015-03-11 Jakub Jelinek <jakub@redhat.com>
6450
6451 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6452 argument.
6453
7ccb1a11
JJ
64542015-03-10 Jakub Jelinek <jakub@redhat.com>
6455
6456 PR c/65120
6457 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6458 before preparing arguments to warn_logical_not_parentheses.
6459
01177669
JJ
64602015-03-09 Jakub Jelinek <jakub@redhat.com>
6461
6462 PR c/65120
6463 * c-typeck.c (parser_build_binary_op): Don't warn for
6464 !!x == y or !b == y where b is _Bool.
6465
802ac282
MP
64662015-03-09 Marek Polacek <polacek@redhat.com>
6467
6468 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6469 * c-decl.c (grokdeclarator): Likewise.
6470 * c-typeck.c (build_binary_op): Likewise.
6471
e5165b60
MP
64722015-02-27 Marek Polacek <polacek@redhat.com>
6473
6474 PR c/65228
6475 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6476
065d214c
MP
64772015-02-14 Marek Polacek <polacek@redhat.com>
6478
6479 PR c/64768
6480 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6481 declared through a typedef name.
6482
e5d9235b
MP
64832015-02-13 Marek Polacek <polacek@redhat.com>
6484
6485 PR c/65050
6486 * c-decl.c (grokdeclarator): Print also the type when giving
6487 the error message about array's incomplete element type.
6488
fa01ffcc
JJ
64892015-02-11 Jakub Jelinek <jakub@redhat.com>
6490
6491 PR c/64824
6492 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6493 check in the POP macro.
6494
c3e38a03
MP
64952015-02-09 Marek Polacek <polacek@redhat.com>
6496
6497 PR c/64856
6498 * c-typeck.c (process_init_element): Don't always wrap
6499 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6500 initializing a range of elements.
6501
4886ec8e
JJ
65022015-02-04 Jakub Jelinek <jakub@redhat.com>
6503
6504 PR c/64824
6505 PR c/64868
6506 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6507
c3e38a03 65082015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
6509
6510 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6511 processing enum declaration.
6512
7b33f0c8
MP
65132015-01-29 Marek Polacek <polacek@redhat.com>
6514
6515 PR c/64709
6516 * c-typeck.c (pop_init_level): If constructor_elements has
6517 exactly one element with integer_zerop value, set constructor_zeroinit
6518 to 1. Remove braces around warning_init call.
6519
dea63e49
JJ
65202015-01-27 Jakub Jelinek <jakub@redhat.com>
6521
6522 PR c/64766
6523 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6524 of FUNCTION_DECLs with error_mark_node.
6525
d38f7dce
JJ
65262015-01-26 Jakub Jelinek <jakub@redhat.com>
6527
6528 PR c/64778
6529 * c-typeck.c (convert_arguments): Return -1 if there are
6530 error_args, even if we've diagnosed too many arguments.
6531
cbf5d0e7
RB
65322015-01-21 Richard Biener <rguenther@suse.de>
6533
6534 PR middle-end/64313
6535 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6536 for builtins the user declared correctly.
6537
41dbbb37
TS
65382015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6539 Bernd Schmidt <bernds@codesourcery.com>
6540 Cesar Philippidis <cesar@codesourcery.com>
6541 James Norris <jnorris@codesourcery.com>
6542 Jakub Jelinek <jakub@redhat.com>
6543 Ilmir Usmanov <i.usmanov@samsung.com>
6544
6545 * c-parser.c: Include "gomp-constants.h".
6546 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6547 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6548 Use OMP_CLAUSE_SET_MAP_KIND.
6549 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6550 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6551 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6552 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6553 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6554 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6555 "copyout", "create", "delete", "deviceptr", "gang", "host",
6556 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6557 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6558 "present_or_create", "pcreate", "seq", "self", "vector",
6559 "vector_length", "wait", "worker".
6560 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6561 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6562 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6563 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6564 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6565 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6566 (c_parser_oacc_data_clause_deviceptr)
6567 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6568 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6569 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6570 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6571 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6572 (c_parser_oacc_parallel, c_parser_oacc_update)
6573 (c_parser_oacc_wait): New functions.
6574 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6575 (c_finish_oacc_data): New prototypes.
6576 * c-typeck.c: Include "gomp-constants.h".
6577 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6578 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6579 OMP_CLAUSE_SET_MAP_KIND.
6580 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6581 (c_finish_oacc_data): New functions.
6582 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6583 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6584 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6585 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6586 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6587 GOMP_MAP_FORCE_DEVICEPTR.
6588
adfac8df
JJ
65892015-01-09 Michael Collison <michael.collison@linaro.org>
6590
6591 * c-array-notation.c: Include hash-set.h, machmode.h,
6592 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6593 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6594 * c-aux-info.c: Ditto.
6595 * c-convert.c: Ditto.
6596 * c-decl.c: Ditto.
6597 * c-errors.c: Ditto.
6598 * c-lang.c: Dittoxs.
6599 * c-objc-common.c: Ditto.
6600 * c-parser.c: Ditto.
6601 * c-typeck.c: Include hash-set.h, machmode.h,
6602 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6603 fold-const.h, wide-int.h, inchash.h, real.h and
6604 fixed-value.h due to flattening of tree.h.
6605
2cc901dc
MP
66062015-01-07 Marek Polacek <polacek@redhat.com>
6607
6608 PR c/64417
6609 * c-typeck.c (process_init_element): Disallow initialization of
6610 a flexible array member with a string constant if the structure
6611 is in an array.
6612
5624e564
JJ
66132015-01-05 Jakub Jelinek <jakub@redhat.com>
6614
e5341100
JJ
6615 PR sanitizer/64344
6616 * c-typeck.c (convert_for_assignment, c_finish_return): For
6617 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6618 types also set in_late_binary_op around convert call.
6619 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6620 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6621 result on expr as last argument to ubsan_instrument_float_cast,
6622 if in_late_binary_op, don't use c_save_expr but save_expr.
6623
5624e564
JJ
6624 Update copyright years.
6625
5bd012f8
MP
66262015-01-05 Marek Polacek <polacek@redhat.com>
6627
6628 PR c/64423
6629 * c-typeck.c (build_array_ref): Pass loc down to
6630 warn_array_subscript_with_type_char.
6631
3f8257db 66322014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6633
6634 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 6635 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 6636 element type.
8e745a17 6637 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 6638 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 6639 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 6640 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6641 to PEDWARN_FOR_QUALIFIERS.
768952be 6642
8f94a8c4
JJ
66432014-12-17 Jakub Jelinek <jakub@redhat.com>
6644
6645 PR sanitizer/64289
6646 * c-convert.c: Include ubsan.h.
6647 (convert): For real -> integral casts and
6648 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6649 instead instrument the float cast directly.
6650
b731b390
JJ
66512014-11-29 Jakub Jelinek <jakub@redhat.com>
6652
6653 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6654 c_finish_stmt_expr): Remove NULL last argument from
6655 create_tmp_var_raw and create_tmp_var calls.
6656 * c-array-notation.c (fix_builtin_array_notation_fn,
6657 build_array_notation_expr, fix_conditional_array_notations_1,
6658 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6659
541e35a6
MP
66602014-11-28 Marek Polacek <polacek@redhat.com>
6661
6662 PR c/63862
6663 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6664 convert the right operand to integer type.
6665
b286be94
MP
66662014-11-25 Marek Polacek <polacek@redhat.com>
6667
6668 PR c/63877
6669 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6670 for inline functions.
6671
aa7da51a
JJ
66722014-11-21 Jakub Jelinek <jakub@redhat.com>
6673
6674 PR target/63764
6675 * c-typeck.c (build_array_ref): Adjust
6676 convert_vector_to_pointer_for_subscript caller. If it returns true,
6677 call non_lvalue_loc on the result.
6678
d876207f
RB
66792014-11-11 Richard Biener <rguenther@suse.de>
6680
6681 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6682 to true.
6683
e5e44252
AK
66842014-11-10 Andi Kleen <ak@linux.intel.com>
6685
6686 PR c/60804
6687 * c-parser.c (c_parser_statement_after_labels): Call
6688 check_no_cilk.
6689 (c_parser_if_statement): Dito.
6690 (c_parser_switch_statement): Dito.
6691 (c_parser_while_statement): Dito.
6692 (c_parser_do_statement): Dito.
6693 (c_parser_for_statement): Dito.
6694 * c-typeck.c (c_finish_loop): Dito.
6695
13c21655
PC
66962014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6697
6698 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6699 OPT_Wshift_count_overflow in the warnings.
6700
2d51fcef
MP
67012014-10-30 Marek Polacek <polacek@redhat.com>
6702
6703 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6704 print the stripped version as well, if they're not the same.
6705
ef4bddc2
RS
67062014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6707
6708 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6709 machine_mode.
6710
c582198b
AM
67112014-10-28 Andrew MacLeod <amacleod@redhat.com>
6712
6713 * c-decl.c: Adjust include files.
6714 * c-parser.c: Ditto.
6715
ddc8de03
PM
67162014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6717 Tom Tromey <tromey@redhat.com>
6718
6719 * c-tree.h (enum c_oracle_request): New.
6720 (c_binding_oracle_function): New typedef.
6721 (c_binding_oracle, c_pushtag, c_bind): Declare.
6722 * c-decl.c (c_binding_oracle): New global.
6723 (I_SYMBOL_CHECKED): New macro.
6724 (i_symbol_binding): New function.
6725 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6726 (I_TAG_CHECKED): New macro.
6727 (i_tag_binding): New function.
6728 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6729 (I_LABEL_CHECKED): New macro.
6730 (i_label_binding): New function.
6731 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6732 (c_print_identifier): Save and restore c_binding_oracle.
6733 (c_pushtag, c_bind): New functions.
6734
60393bbc
AM
67352014-10-27 Andrew MacLeod <amacleod@redhat.com>
6736
6737 * c-typeck.c: Adjust include files.
6738
d723bb7c
MLI
67392014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6740
6741 PR c++/53061
6742 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6743 initialization here...
6744 (c_initialize_diagnostics): ... but here. Set defaults after
6745 building pretty-printer.
6746
1bc5a451
MP
67472014-10-23 Marek Polacek <polacek@redhat.com>
6748
6749 PR c/63626
6750 * c-decl.c (pop_scope): Don't print warning in external_scope.
6751
4435bb92
MP
67522014-10-19 Marek Polacek <polacek@redhat.com>
6753
6754 PR c/63567
6755 * c-typeck.c (output_init_element): Allow initializing objects with
6756 static storage duration with compound literals even in C99 and add
6757 pedwarn for it.
6758
7278465e
MP
67592014-10-17 Marek Polacek <polacek@redhat.com>
6760
6761 PR c/63567
6762 * c-typeck.c (digest_init): Allow initializing objects with static
6763 storage duration with compound literals even in C99 and add pedwarn
6764 for it.
6765
d9b7be2e
MP
67662014-10-17 Marek Polacek <polacek@redhat.com>
6767
6768 PR c/63543
6769 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6770 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6771 error multiple times. Print the type.
6772
f406ae1f
MP
67732014-10-17 Marek Polacek <polacek@redhat.com>
6774
6775 PR c/63549
6776 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6777 type.
6778
92574c7c
MP
67792014-10-17 Marek Polacek <polacek@redhat.com>
6780
6781 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6782 (start_function): Use OPT_Wimplicit_int instead of 0.
6783 (store_parm_decls_oldstyle): Likewise.
6784
1bc4a978
MT
67852014-10-17 Alan Modra <amodra@gmail.com>
6786
6787 PR middle-end/61848
6788 * c-decl.c (merge_decls): Don't merge section name or tls model
6789 to newdecl symtab node, instead merge to olddecl. Override
6790 existing olddecl section name. Set tls_model for all thread-local
6791 vars, not just OMP thread-private ones. Remove incorrect comment.
6792
83685514
AM
67932014-10-16 Andrew MacLeod <amacleod@redhat.com>
6794
6795 * c-decl.c: Adjust include files.
6796
78a7c317
DD
67972014-10-14 DJ Delorie <dj@redhat.com>
6798
6799 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6800 (c_token_starts_typename): Check all __intN, not just __int128.
6801 (c_token_starts_declspecs): Likewise.
6802 (c_parser_declspecs): Likewise.
6803 (c_parser_attribute_any_word): Likewise.
6804 (c_parser_objc_selector): Likewise.
6805 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6806 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6807 is specified.
6808 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6809 __int128.
6810 (finish_declspecs): Likewise.
6811
74d98c1e
AB
68122014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6813
8e745a17 6814 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6815 the duplicate code.
8e745a17 6816 (c_parser_statement): Call the new function.
74d98c1e 6817
84937de2
MP
68182014-10-09 Marek Polacek <polacek@redhat.com>
6819
6820 PR c/63480
6821 * c-typeck.c (pop_init_level): Don't warn about initializing
6822 with { }.
6823
0382aaa0
MP
68242014-10-07 Marek Polacek <polacek@redhat.com>
6825
6826 PR c/59717
6827 * c-decl.c (header_for_builtin_fn): New function.
6828 (implicitly_declare): Suggest which header to include.
6829
7a0ca710
MP
68302014-10-07 Marek Polacek <polacek@redhat.com>
6831
6832 * c-convert.c (convert): Use error_operand_p.
6833 * c-typeck.c (require_complete_type): Likewise.
6834 (really_atomic_lvalue): Likewise.
6835 (digest_init): Likewise.
6836 (handle_omp_array_sections_1): Likewise.
6837
6bc8a126
MP
68382014-10-03 Marek Polacek <polacek@redhat.com>
6839
6840 PR c/63453
6841 * c-decl.c (pop_scope): Don't warn about "inline function declared
6842 but never defined" for functions marked with gnu_inline attribute.
6843
d90c0a59
JJ
68442014-09-25 Jakub Jelinek <jakub@redhat.com>
6845
6846 PR c++/63249
6847 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6848 on low_bound and length.
6849
083e891e
MP
68502014-09-24 Marek Polacek <polacek@redhat.com>
6851
6852 PR c/61405
6853 PR c/53874
6854 * c-parser.c: Don't define CPP_KEYWORD.
6855 (c_parser_switch_statement): Pass original type to c_finish_case.
6856 * c-tree.h (c_finish_case): Update declaration.
6857 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6858 conditionally to c_do_switch_warnings.
6859
8d95fe25
MP
68602014-09-03 Marek Polacek <polacek@redhat.com>
6861
6862 PR c/62024
6863 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6864 conversions.
6865
9a771876
JJ
68662014-09-02 Jakub Jelinek <jakub@redhat.com>
6867 Balaji V. Iyer <balaji.v.iyer@intel.com>
6868 Igor Zamyatin <igor.zamyatin@intel.com>
6869
6870 * c-parser.c (c_parser_cilk_for): New function.
6871 (c_parser_cilk_grainsize): Likewise.
6872 (c_get_temp_regvar): Likewise.
6873 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6874 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6875 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6876 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6877 case.
6878
b7679d96
CG
68792014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6880
6881 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6882 with using HOST_WIDE_INT without truncation to 'int'
6883
59ea0364
MP
68842014-08-22 Marek Polacek <polacek@redhat.com>
6885
6886 PR c++/62199
6887 * c-typeck.c (parser_build_binary_op): Adjust call to
6888 warn_logical_not_parentheses.
6889
671a475e
IZ
68902014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6891
6892 PR other/62008
6893 * c-parser.c (c_parser_array_notation): Check for correct
6894 type of an array added.
6895
04159acf
MP
68962014-08-19 Marek Polacek <polacek@redhat.com>
6897
6898 PR c++/62153
6899 * c-typeck.c (build_binary_op): If either operand of a comparison
6900 is a boolean expression, call maybe_warn_bool_compare.
6901
c77935ee
PP
69022014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6903
6904 PR c/45584
6905 * c-typeck.c (build_c_cast): Do a conversion even when the
6906 TYPE_MAIN_VARIANTs are the same.
6907
35aff4fb
MP
69082014-08-19 Marek Polacek <polacek@redhat.com>
6909
6910 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6911 pedwarn_c99 instead of pedwarn.
6912 (grokfield): Likewise.
6913 (warn_defaults_to): New function.
6914 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6915 Unconditionally call pedwarn_c99 instead of pedwarn.
6916 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6917 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6918 check flag_isoc11 before.
6919 * c-errors.c (pedwarn_c99): Change the return type to bool.
6920 Handle -Wc99-c11-compat.
6921 * c-parser.c (disable_extension_diagnostics): Handle
6922 warn_c99_c11_compat.
6923 (restore_extension_diagnostics): Likewise.
6924 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6925 instead of pedwarn, don't check flag_isoc11 before.
6926 (c_parser_declspecs): Likewise.
6927 (c_parser_alignas_specifier): Likewise.
6928 (c_parser_alignof_expression): Likewise.
6929 (c_parser_generic_selection): Likewise.
6930 * c-tree.h (pedwarn_c99): Update declaration.
6931 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6932 of pedwarn_c99.
6933
177cce46
MP
69342014-08-19 Marek Polacek <polacek@redhat.com>
6935
6936 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6937 to pedwarn_c90.
6938 * c-errors.c: Include "opts.h".
6939 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6940 * c-parser.c (disable_extension_diagnostics): Handle negative value
6941 of warn_c90_c99_compat, too.
6942 (restore_extension_diagnostics): Likewise.
6943 (c_parser_compound_statement_nostart): Pass
6944 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6945
6dc99c33
MP
69462014-08-12 Marek Polacek <polacek@redhat.com>
6947
6948 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6949 Add pedwarn.
6950 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6951 Likewise.
6952 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6953
3f8257db 69542014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6955
6956 PR c/51849
6957 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6958 Call pedwarn_c90 instead of pedwarn.
6959 (check_bitfield_type_and_width): Likewise.
6960 (declspecs_add_qual): Likewise.
6961 (declspecs_add_type): Likewise.
6962 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6963 Adjust to only call pedwarn_c90.
6964 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6965 pedwarn_c90 instead of pedwarn.
6966 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6967 * c-parser.c (disable_extension_diagnostics): Handle
6968 warn_c90_c99_compat.
6969 (restore_extension_diagnostics): Likewise.
6970 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6971 pedwarn_c90 instead of pedwarn.
6972 (c_parser_initelt): Likewise.
6973 (c_parser_postfix_expression): Likewise.
6974 (c_parser_postfix_expression_after_paren_type): Likewise.
6975 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6976 * c-tree.h: Fix formatting.
6977 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6978 pedwarn_c90 instead of pedwarn.
6979
9f25a338
TS
69802014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6981
6982 * c-typeck.c: Remove include of pointer-set.h.
6983
044331a8
MP
69842014-08-07 Marek Polacek <polacek@redhat.com>
6985
6986 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6987
b787e7a2
TS
69882014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6989
6990 * c-typeck.c: Use hash_map instead of pointer_map.
6991
6e2830c3
TS
69922014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6993
6994 * c-decl.c: Use hash_set instead of pointer_set.
6995
a7ee52fb
IZ
69962014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6997
6998 PR middle-end/61455
6999 * c-array-notation.c (expand_array_notations): Handling
7000 of DECL_EXPR added.
7001
b4dfdc11
MG
70022014-07-31 Marc Glisse <marc.glisse@inria.fr>
7003
7004 PR c++/60517
7005 * c-typeck.c (c_finish_return): Return 0 instead of the address of
7006 a local variable.
7007
976d5a22
TT
70082014-07-30 Tom Tromey <tromey@redhat.com>
7009
7010 * c-typeck.c (struct constructor_stack) <designator_depth>: New
7011 field.
7012 (really_start_incremental_init, push_init_level): Initialize
7013 designator_depth.
7014 (pop_init_level): Set global designator_depth.
7015 (process_init_element): Check for designated_init attribute.
7016
30281de2
MP
70172014-07-20 Marek Polacek <polacek@redhat.com>
7018
7019 PR c/61852
7020 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
7021 (implicitly_declare): Pass location to implicit_decl_warning.
7022
b108f48f
JJ
70232014-07-14 Jakub Jelinek <jakub@redhat.com>
7024
7025 PR middle-end/61294
7026 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
7027 If non-NULL, call c_parser_check_literal_zero.
7028 (c_parser_check_literal_zero): New function.
7029 (c_parser_postfix_expression_after_primary): Adjust
7030 c_parser_expr_list caller, handle -Wmemset-transposed-args.
7031
773ec47f
MP
70322014-07-06 Marek Polacek <polacek@redhat.com>
7033
7034 PR c/6940
7035 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
7036 * c-tree.h (C_ARRAY_PARAMETER): Define.
7037 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
7038 function parameter.
7039
22e1cf1c 70402014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 7041 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
7042
7043 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
7044 releasing symbol.
7045
52ec0ea3
MP
70462014-07-01 Marek Polacek <polacek@redhat.com>
7047
7048 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
7049 instead of 0 to WARN_FOR_ASSIGNMENT.
7050
d5c3d343
MP
70512014-07-01 Marek Polacek <polacek@redhat.com>
7052
7053 PR c/58286
7054 * c-typeck.c (convert_for_assignment): Pass
7055 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
7056
6a7253a4
MP
70572014-06-30 Marek Polacek <polacek@redhat.com>
7058
7059 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
7060 has no_sanitize_undefined attribute.
7061
5e88a8f4
IZ
70622014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
7063
7064 PR middle-end/57541
7065 * c-array-notation.c (fix_builtin_array_notation_fn):
7066 Check for 0 arguments in builtin call. Check that bultin argument is
7067 correct.
7068 * c-parser.c (c_parser_array_notation): Check for incorrect initial
7069 index.
7070
9698b078
SH
70712014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
7072
7073 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
7074 qualifiers in __auto_type for atomic types.
7075 (c_parser_typeof_specifier): Discard all type qualifiers in
7076 __typeof__ for atomic types.
7077
6e07c515
MP
70782014-06-25 Marek Polacek <polacek@redhat.com>
7079
7080 PR c/61162
7081 * c-parser.c (c_parser_statement_after_labels): Pass the location of
7082 the return expression to c_finish_return.
7083
da6f124d
JJ
70842014-06-25 Jakub Jelinek <jakub@redhat.com>
7085
7086 * c-typeck.c (c_finish_omp_clauses): Make sure
7087 OMP_CLAUSE_LINEAR_STEP has correct type.
7088
c203e8a7
TS
70892014-06-24 Trevor Saunders <tsaunders@mozilla.com>
7090
7091 * c-decl.c: Adjust.
7092
56ad0e38
JJ
70932014-06-24 Jakub Jelinek <jakub@redhat.com>
7094
7095 * c-parser.c (c_parser_omp_for_loop): For
7096 #pragma omp parallel for simd move lastprivate clause from parallel
7097 to for rather than simd.
7098
47c2554f
MP
70992014-06-23 Marek Polacek <polacek@redhat.com>
7100
7101 * c-typeck.c (parser_build_binary_op): Don't call
7102 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
7103
56363ffd
JH
71042014-06-15 Jan Hubicka <hubicka@ucw.cz>
7105
7106 * c-parser.c (c_parser_omp_threadprivate): Likewise.
7107 * c-decl.c (merge_decls): Likewise.
7108
d7ff7ae5
MP
71092014-06-09 Marek Polacek <polacek@redhat.com>
7110
7111 PR c/36446
7112 * c-typeck.c (error_init): Call inform instead of error_at.
7113 (pedwarn_init): Call inform instead of pedwarn.
7114 (warning_init): Call inform instead of warning_at.
7115
24d047a3
JH
71162014-06-07 Jan Hubicka <hubicka@ucw.cz>
7117
7118 * c-decl.c (merge_decls): Use set_decl_section_name.
7119 (duplicate_decls): Remove node if it exists.
7120
9bac5cbb
G
71212014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
7122
7123 PR c/53119
7124 * c-typeck.c (push_init_level, process_init_element,
7125 pop_init_level): Correct check for zero initialization, move
7126 missing brace warning to respect zero initialization.
7127
8ffcdea8
MP
71282014-06-05 Marek Polacek <polacek@redhat.com>
7129
7130 PR c/56724
7131 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
7132
742938c9
MP
71332014-06-05 Marek Polacek <polacek@redhat.com>
7134
7135 PR c/49706
7136 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 7137 on the left hand side operand of a comparison.
742938c9 7138
6447c55d
MP
71392014-06-05 Marek Polacek <polacek@redhat.com>
7140
7141 PR c/48062
7142 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
7143 Print note only if the warning was printed.
7144
9dc7743c
IZ
71452014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
7146
7147 PR c/58942
7148 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
7149 with a pointer.
7150
fedfecef
MP
71512014-06-03 Marek Polacek <polacek@redhat.com>
7152
7153 PR c/60439
7154 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
7155 c_start_case.
7156 * c-tree.h (c_start_case): Update.
7157 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
7158 switch condition has boolean value.
7159
9b2b7279
AM
71602014-06-02 Andrew MacLeod <amacleod@redhat.com>
7161
7162 * c-decl.c: Include builtins.h.
7163 * c-parser.c: Likewise.
7164
5c1bc275
MP
71652014-05-27 Marek Polacek <polacek@redhat.com>
7166
7167 PR c/56724
7168 * c-typeck.c (convert_arguments): Get location of a parameter. Change
7169 error and warning calls to error_at and warning_at. Pass location of
7170 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
7171 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
7172 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
7173
97563bc8
IZ
71742014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
7175
7176 PR c/61191
7177 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
7178 function parameters.
7179
aede2c10
JH
71802014-05-23 Jan Hubicka <hubicka@ucw.cz>
7181
7182 * c-decl.c (merge_decls): Preserve symtab node pointers.
7183 (duplicate_decls): Free new decl.
7184
edbba2ce
TS
71852014-05-23 Thomas Schwinge <thomas@codesourcery.com>
7186
f3316c6d
TS
7187 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
7188 initialization.
7189
edbba2ce
TS
7190 * c-parser.c (c_parser_omp_target): Return bool values.
7191
68c81f24
TS
71922014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7193
7194 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
7195 num_teams_loc variable to num_thread_limit_loc.
7196
632f2871
RS
71972014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7198
7199 * c-array-notation.c (expand_array_notations): Use void_node
7200 instead of void_zero_node.
7201
766090c2
TS
72022014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7203
7204 * c-decl.c (finish_struct): Adjust.
7205 (finish_enum): Likewise.
7206 (bind): Adjust.
7207 (record_inline_static): Likewise.
7208 (push_scope): Likewise.
7209 (make_label): Likewise.
7210 (lookup_label_for_goto): Likewise.
7211 (finish_struct): Likewise.
7212 (finish_enum): Likewise.
7213 (store_parm_decls): Likewise.
7214 (c_push_function_context): Likewise.
7215 * c-lang.h: Remove usage of variable_size gty attribute.
7216 * c-parser.c (c_parse_init): Adjust.
7217 (c_parse_file): Likewise.
7218
2b107f6b
MP
72192014-05-13 Marek Polacek <polacek@redhat.com>
7220
7221 PR c/61162
7222 * c-typeck.c (convert_for_assignment): Pass location to
7223 WARN_FOR_ASSIGNMENT instead of input_location.
7224
d033409e
MP
72252014-05-10 Marek Polacek <polacek@redhat.com>
7226
7227 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7228 maybe_warn_string_init.
7229 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7230 maybe_warn_string_init.
7231 * c-tree.h (maybe_warn_string_init): Update declaration.
7232 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7233 Call pedwarn_init with loc instead of with input_location.
7234 (digest_init): Pass init_loc to maybe_warn_string_init.
7235 (pop_init_level): Call pedwarn_init with loc instead of with
7236 input_location.
7237 (set_init_index): Likewise.
7238 (process_init_element): Likewise.
7239
ea58ef42
MP
72402014-05-09 Marek Polacek <polacek@redhat.com>
7241
7242 PR c/61096
7243 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7244 (c_parser_initelt): Pass location to set_init_label. Pass array index
7245 location to set_init_index.
7246 * c-tree.h (push_init_level): Update declaration.
7247 (pop_init_level): Likewise.
7248 (set_init_index): Likewise.
7249 (set_init_label): Likewise.
7250 * c-typeck.c (error_init): Add location parameter. Call error_at
7251 instead of error.
7252 (digest_init): Pass init_loc to error_init.
7253 (really_start_incremental_init):
7254 (push_init_level): Add location parameter. Pass loc to pop_init_level
7255 and error_init.
7256 (pop_init_level): Likewise.
7257 (set_designator): Add location parameter. Pass loc to pop_init_level,
7258 push_init_level, and error_init.
7259 (set_init_index): Add location parameter. Pass loc to error_init and
7260 set_designator.
7261 (set_init_label): Likewise.
7262 (output_init_element): Pass loc to error_init.
7263 (process_init_element): Pass loc to error_init, pop_init_level,
7264 pedwarn_init, and push_init_level.
7265
661a0813
MP
72662014-05-09 Marek Polacek <polacek@redhat.com>
7267
7268 PR c/50459
7269 * c-parser.c (c_parser_attributes): Parse the arguments as an
7270 expression-list if the attribute takes identifier.
7271
2793eeab
MP
72722014-05-08 Marek Polacek <polacek@redhat.com>
7273
7274 PR c/61053
7275 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7276 TYPE_ALIGN_UNIT.
7277
f827930a
MP
72782014-05-08 Marek Polacek <polacek@redhat.com>
7279
7280 PR c/61077
7281 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7282 of main.
7283
1d60af08
KZ
72842014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7285 Mike Stump <mikestump@comcast.net>
7286 Richard Sandiford <rdsandiford@googlemail.com>
7287
7288 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7289 (finish_enum): Use wide-int interfaces.
7290 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7291 * c-typeck.c (build_c_cast): Likewise.
7292 (set_nonincremental_init_from_string): Likewise.
7293 (c_tree_equal): Likewise.
7294
a0e24419
MP
72952014-05-02 Marek Polacek <polacek@redhat.com>
7296
7297 PR c/25801
7298 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7299 Return size_one_node when the type is not complete.
7300 (pointer_diff): Remove comment.
7301 (build_unary_op): Improve error messages.
7302
19fc9faa
MP
73032014-05-02 Marek Polacek <polacek@redhat.com>
7304
7305 * c-typeck.c (c_finish_return): Separate warning_at calls.
7306
63bc4e87
MP
73072014-05-02 Marek Polacek <polacek@redhat.com>
7308
7309 * c-tree.h (error_init): Remove declaration.
7310 (pedwarn_init): Likewise.
7311 * c-typeck.c (error_init): Make static and move above.
7312 (pedwarn_init): Likewise.
7313 (warning_init): Move above.
7314 (maybe_warn_string_init): Likewise.
7315
4bd2511b
JL
73162014-05-01 Jeff Law <law@redhat.com>
7317
7318 Revert:
7319
7320 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7321 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7322 avoid goto.
7323
6a358dcb
MP
73242014-05-02 Marek Polacek <polacek@redhat.com>
7325
7326 PR c/60784
7327 * c-typeck.c (push_init_level): Set constructor_designated to
7328 p->designated for structures.
7329
ae5ebda4
MP
73302014-05-01 Marek Polacek <polacek@redhat.com>
7331
7332 PR c/60915
7333 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7334 function-definition has an attribute after the declarator.
7335
96b40f8d
MP
73362014-05-01 Marek Polacek <polacek@redhat.com>
7337
7338 PR c/60257
7339 * c-typeck.c (warning_init): Add location_t parameter. Call
7340 warning_at instead of warning.
7341 (push_init_level): Pass input_location to warning_init.
7342 (add_pending_init): Add location_t parameter. Pass loc to
7343 warning_init.
7344 (set_nonincremental_init): Pass input_location to add_pending_init.
7345 (set_nonincremental_init_from_string): Likewise.
7346 (output_init_element): Pass loc to warning_init and to
7347 add_pending_init.
7348
32e00768
MP
73492014-05-01 Marek Polacek <polacek@redhat.com>
7350
7351 PR c/43395
7352 * c-typeck.c (c_finish_return): Distinguish between label and variable
7353 when warning about returning local address.
7354
c9379ce2
MP
73552014-05-01 Marek Polacek <polacek@redhat.com>
7356
7357 PR c/29467
7358 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7359 in C89 mode.
7360
d00887e8
MP
73612014-05-01 Marek Polacek <polacek@redhat.com>
7362
7363 PR c/43245
7364 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7365 instead of 0 to WARN_FOR_QUALIFIERS.
7366
5436fa2e
MP
73672014-05-01 Marek Polacek <polacek@redhat.com>
7368
7369 PR c/56989
7370 * c-typeck.c (default_conversion): Use better location for
7371 error call.
7372
f8ed5150
MP
73732014-04-30 Marek Polacek <polacek@redhat.com>
7374
7375 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7376 also when SANITIZE_FLOAT_DIVIDE is on.
7377
8337d1db
MP
73782014-04-30 Marek Polacek <polacek@redhat.com>
7379
7380 PR c/60139
7381 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7382 and pedwarn_init. Use loc insted of input_location.
7383
c4bdc42f
MP
73842014-04-30 Marek Polacek <polacek@redhat.com>
7385
7386 PR c/60351
7387 * c-typeck.c (build_binary_op): Use location when warning about
7388 shift count.
7389
45484dcf
MP
73902014-04-25 Marek Polacek <polacek@redhat.com>
7391
7392 PR c/18079
7393 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7394 always_inline/noinline and hot/cold attributes.
7395
34cf811f
MP
73962014-04-25 Marek Polacek <polacek@redhat.com>
7397
7398 PR c/60114
7399 * c-parser.c (c_parser_initelt): Pass input_location to
7400 process_init_element.
7401 (c_parser_initval): Pass loc to process_init_element.
7402 * c-tree.h (process_init_element): Adjust declaration.
7403 * c-typeck.c (push_init_level): Pass input_location to
7404 process_init_element.
7405 (pop_init_level): Likewise.
7406 (set_designator): Likewise.
7407 (output_init_element): Add location_t parameter. Pass loc to
7408 digest_init.
7409 (output_pending_init_elements): Pass input_location to
7410 output_init_element.
7411 (process_init_element): Add location_t parameter. Pass loc to
7412 output_init_element.
7413
42056eac
JJ
74142014-04-24 Jakub Jelinek <jakub@redhat.com>
7415
7416 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7417 atomic-clause, allow comma in between atomic-clause and
7418 seq_cst.
7419
e162a134
JJ
74202014-04-22 Jakub Jelinek <jakub@redhat.com>
7421
7422 PR c/59073
7423 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7424 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7425
2f6babac
IZ
74262014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7427
7428 PR middle-end/60469
7429 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7430 create_tmp_var instead build_decl for creating temps.
7431 (build_array_notation_expr): Likewise.
7432 (fix_conditional_array_notations_1): Likewise.
7433 (fix_array_notation_expr): Likewise.
7434 (fix_array_notation_call_expr): Likewise.
7435
8edbfaa6
JJ
74362014-03-28 Jakub Jelinek <jakub@redhat.com>
7437
7438 PR c++/60689
7439 * c-tree.h (c_build_function_call_vec): New prototype.
7440 * c-typeck.c (build_function_call_vec): Don't call
7441 resolve_overloaded_builtin here.
7442 (c_build_function_call_vec): New wrapper function around
7443 build_function_call_vec. Call resolve_overloaded_builtin here.
7444 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7445 Call c_build_function_call_vec instead of build_function_call_vec.
7446 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7447 * c-decl.c (finish_decl): Likewise.
7448
7485aeea
MLI
74492014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7450
7451 PR c/55383
7452 * c-typeck.c: Use correct format string in cast-qual warning
7453
b17a8b07
TS
74542014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7455
7456 * c-decl.c (c_decl_attributes): Use
7457 lang_hooks.types.omp_mappable_type.
7458 * c-typeck.c (c_finish_omp_clauses): Likewise.
7459
3af9c5e9
MP
74602014-03-06 Marek Polacek <polacek@redhat.com>
7461
7462 PR c/60197
7463 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7464 of checking tree code.
7465
1c9f5f33
PK
74662014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7467
7468 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7469 (c_parser_parameter_declaration): Likewise.
7470
cc28fc7f
MP
74712014-02-19 Marek Polacek <polacek@redhat.com>
7472
7473 PR c/60195
7474 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7475 Call mark_exp_read on exp.value.
7476 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7477 TREE_ADDRESSABLE on old instead of val.
7478 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7479
b581c05c
PK
74802014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7481
7482 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7483 C_EXPR_APPEND by vec_safe_push.
7484 * c-tree.h (C_EXPR_APPEND): Remove.
7485
81e5eca8
MP
74862014-01-31 Marek Polacek <polacek@redhat.com>
7487
7488 PR c/59963
7489 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7490 build_function_call_vec.
7491 (build_function_call): Likewise.
7492 (build_atomic_assign): Likewise.
7493 (build_function_call_vec): Add arg_loc parameter. Use it.
7494 (convert_arguments): Likewise.
7495 (convert_for_assignment): Rename rhs_loc to expr_loc.
7496 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7497 (c_parser_objc_keywordexpr): Likewise.
7498 (c_parser_postfix_expression_after_primary): Call
7499 build_function_call_vec with expr_loc rather than op_loc.
7500 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7501 build_function_call_vec.
7502 (c_parser_expr_list): Add locations parameter. Fill it with locations
7503 of function arguments.
7504 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7505
68fca595
MP
75062014-01-30 Marek Polacek <polacek@redhat.com>
7507
7508 PR c/59940
7509 * c-typeck.c (build_function_call_vec): Use loc parameter.
7510 (convert_arguments): Add location parameter. Use it.
7511 (ep_convert_and_check): Likewise.
7512 (build_atomic_assign): Adjust convert_for_assignment call.
7513 (build_modify_expr): Likewise.
7514 (digest_init): Likewise.
7515 (c_finish_return): Likewise.
7516 (build_conditional_expr): Adjust ep_convert_and_check calls.
7517 (convert_for_assignment): Add rhs_loc parameter. Use it.
7518 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7519 calls.
7520
fa337f3a
RB
75212014-01-30 Richard Biener <rguenther@suse.de>
7522
7523 PR c/59905
7524 * c-typeck.c (build_function_call_vec): Do not replace calls
7525 to a function via an incompatible type with a runtime abort.
7526
b72271b9
BI
75272014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7528
7529 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7530 flag_enable_cilkplus with flag_cilkplus.
7531 (c_parser_direct_declarator_inner): Likewise.
7532 (c_parser_attribute_any_word): Likewise.
7533 (c_parser_attributes): Likewise.
7534 (c_parser_compound_statement): Likewise.
7535 (c_parser_statement_after_labels): Likewise.
7536 (c_parser_if_statement): Likewise.
7537 (c_parser_switch_statement): Likewise.
7538 (c_parser_do_statement): Likewise.
7539 (c_parser_for_statement): Likewise.
7540 (c_parser_unary_expression): Likewise.
7541 (c_parser_postfix_expression): Likewise.
7542 (c_parser_postfix_expression_after_primary): Likewise.
7543 (c_parser_postfix_expression_after_primary): Likewise.
7544 (c_parser_omp_clause_name): Likewise.
7545 (c_finish_omp_declare_simd): Likewise.
7546 (c_parser_cilk_verify_simd): Likewise.
7547 * c-typeck.c (build_array_ref): Likewise.
7548 (build_function_call_vec): Likewise.
7549 (convert_arguments): Likewise.
7550 (build_compound_expr): Likewise.
7551 (c_finish_return): Likewise.
7552 (c_finish_if_stmt): Likewise.
7553 (c_finish_loop): Likewise.
7554 (build_binary_op): Likewise.
7555
393e8e8b
MP
75562014-01-23 Marek Polacek <polacek@redhat.com>
7557
7558 PR c/59846
7559 * c-typeck.c (parser_build_binary_op): Use location instead of
7560 input_location.
7561 (build_binary_op): Pass location to shorten_compare.
7562
f04dda30
MP
75632014-01-23 Marek Polacek <polacek@redhat.com>
7564
7565 PR c/58346
7566 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7567 an empty aggregate.
7568
789eadcd
MP
75692014-01-23 Marek Polacek <polacek@redhat.com>
7570
7571 PR c/59871
7572 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7573 of a comma expression.
7574 (emit_side_effect_warnings): Likewise.
7575
40f14e9f
BI
75762014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7577
7578 PR c/59825
7579 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7580 function to use walk_tree and moved a lot of its functionality to
7581 expand_array_notations.
7582 (expand_array_notations): New function.
7583
74558dd9
BI
75842014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7585
7586 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7587 attribute an attribute without value.
7588
652fea39
JJ
75892014-01-23 Jakub Jelinek <jakub@redhat.com>
7590
7591 PR middle-end/58809
7592 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7593 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7594
f34f1c87
MP
75952014-01-22 Marek Polacek <polacek@redhat.com>
7596
7597 PR c/59891
7598 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7599 of remove_c_maybe_const_expr on op1 and op2.
7600
241f845a
JJ
76012014-01-15 Jakub Jelinek <jakub@redhat.com>
7602
7603 PR c/58943
7604 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7605 effects, preevaluate rhs using SAVE_EXPR first.
7606
9a74f20c
BI
76072014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7608
7609 PR c++/59631
7610 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7611 statements with if-elseif statements.
7612
96066ce1
MP
76132014-01-06 Marek Polacek <polacek@redhat.com>
7614
7615 PR c/57773
7616 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7617 defined bit-field types only in ISO C.
7618
23a5b65a
RS
76192014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7620
7621 Update copyright years
7622
f9030485
RS
76232014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7624
7625 * c-array-notation.c: Use the standard form for the copyright notice.
7626
41958c28
BI
76272013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7628
7629 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7630 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7631 field in parser is not empty. If not-empty, call the function
7632 c_parser_finish_omp_declare_simd.
7633 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7634 between SIMD-enabled functions and #pragma simd. Added new parameter.
7635 (c_parser_cilk_all_clauses): Modified the usage of the function
7636 c_parser_cilk_clause_vectorlength as mentioned above.
7637 (c_parser_cilk_simd_fn_vector_attrs): New function.
7638 (c_finish_cilk_simd_fn_tokens): Likewise.
7639 (is_cilkplus_vector_p): Likewise.
7640 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7641 "nomask," and "mask" strings in clause name.
7642 (c_parser_omp_all_clauses): Added 3 new case statements:
7643 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7644 PRAGMA_CILK_CLAUSE_NOMASK.
7645 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7646 check for vector attribute and if so call the function
7647 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7648 called the function c_finish_cilk_simd_fn_tokens.
7649 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7650 parser field is non-empty. If so, parse them as you would parse
7651 the omp declare simd pragma.
7652 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7653 Added a check when step is a parameter and flag it as error.
7654 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7655 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7656 pragma_omp_clause.
7657
cef0fd0e
TS
76582013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7659
7660 * c-parser.c (c_parser_omp_parallel): Fix description.
7661
12893402
BI
76622013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7663
7664 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7665 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7666 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7667 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7668
296674db
JM
76692013-12-04 Joseph Myers <joseph@codesourcery.com>
7670
7671 PR c/52023
7672 * c-parser.c (c_parser_alignas_specifier): Use
7673 c_sizeof_or_alignof_type instead of c_alignof.
7674 (c_parser_alignof_expression): Likewise, with min_alignof
7675 parameter depending on alignof spelling used.
7676
edd28054
MP
76772013-12-04 Marek Polacek <polacek@redhat.com>
7678
7679 PR c/54113
7680 * c-decl.c (start_function): Don't warn for missing prototype for
7681 inline functions.
7682
da0fc454
MP
76832013-12-03 Marek Polacek <polacek@redhat.com>
7684
7685 PR c/59351
7686 * c-decl.c (build_compound_literal): Allow compound literals with
7687 empty initial value.
7688
4c2ecab0
JM
76892013-12-02 Joseph Myers <joseph@codesourcery.com>
7690
7691 PR c/58235
7692 * c-typeck.c (build_modify_expr): Diagnose assignment to
7693 expression with array type.
7694
340baef7
JM
76952013-11-29 Joseph Myers <joseph@codesourcery.com>
7696
7697 PR c/42262
7698 * c-typeck.c (process_init_element): Do not treat a string as
7699 initializing a whole array when used with a designator for an
7700 individual element.
7701
6763b9f7
JM
77022013-11-29 Joseph Myers <joseph@codesourcery.com>
7703
7704 PR c/57574
7705 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7706 an inline function following a static declaration.
7707
e7bd1de1
JJ
77082013-11-28 Jakub Jelinek <jakub@redhat.com>
7709
7710 PR c/59310
7711 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7712 to p_name before calling c_parser_omp_teams instead of after.
7713 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7714 argument. Remove unused p_name variable.
7715
0136f8f0
AH
77162013-11-27 Aldy Hernandez <aldyh@redhat.com>
7717 Jakub Jelinek <jakub@redhat.com>
7718
7719 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7720 external_scope is NULL.
7721
241b71bb
TV
77222013-11-27 Tom de Vries <tom@codesourcery.com>
7723 Marc Glisse <marc.glisse@inria.fr>
7724
7725 PR c++/59032
7726 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7727
2fb9a547
AM
77282013-11-22 Andrew MacLeod <amacleod@redhat.com>
7729
7730 * c-typeck.c: Add required include files from gimple.h.
7731
8400e75e
DM
77322013-11-22 David Malcolm <dmalcolm@redhat.com>
7733
7734 * c-decl.c (define_label, shadow_tag_warned)
7735 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7736 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7737 (declspecs_add_type): Remove use of in_system_header macro.
7738 * c-parser.c (c_parser_unary_expression): Likewise.
7739 * c-typeck.c (store_init_value, process_init_element)
7740 (c_start_case): Likewise.
7741
7742 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7743 macro.
7744
7745 * c-parser.c (c_parser_set_source_position_from_token): Remove
7746 reference to in_system_header from comment.
7747
386b1f1f
RS
77482013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7749
7750 * c-decl.c (grokdeclarator): Update comment to refer to
7751 tree_to_[su]hwi rather than tree_low_cst.
7752
ae7e9ddd
RS
77532013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7754
7755 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7756 tree_to_uhwi throughout.
7757
9439e9a1
RS
77582013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7759
7760 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7761 throughout.
7762
9541ffee
RS
77632013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7764
7765 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7766 throughout.
7767
c02065fc
AH
77682013-11-15 Aldy Hernandez <aldyh@redhat.com>
7769
7770 * c-parser.c (c_parser_cilk_simd): New.
7771 (c_parser_cilk_verify_simd): New.
7772 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7773 (c_parser_omp_for_loop): Add case for NE_EXPR.
7774 Set c_break_label for CILK_SIMD.
7775 (c_parser_cilk_clause_vectorlength): New.
7776 (c_parser_cilk_clause_linear): New.
7777 (c_parser_cilk_clause_name): New.
7778 (c_parser_cilk_all_clauses): New.
7779 * c-typeck.c (build_unary_op): Pass location argument to
7780 readonly_error.
7781 (build_modify_expr): Same.
7782 (build_asm_expr): Same.
7783 (c_finish_bc_stmt): Error on break/continue in loops.
7784
18f429e2
AM
77852013-11-14 Andrew MacLeod <amacleod@redhat.com>
7786
7787 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7788
d8a2d370
DN
77892013-11-14 Diego Novillo <dnovillo@google.com>
7790
7791 * c-decl.c: Include print-tree.h.
7792 Include stor-layout.h.
7793 Include varasm.h.
7794 Include attribs.h.
7795 Include stringpool.h.
7796 * c-lang.c: Include fold-const.h.
7797 * c-parser.c: Include stringpool.h.
7798 Include attribs.h.
7799 Include stor-layout.h.
7800 Include varasm.h.
7801 Include trans-mem.h.
7802 * c-typeck.c: Include stor-layout.h.
7803 Include trans-mem.h.
7804 Include varasm.h.
7805 Include stmt.h.
7806
38b7bc7f
JM
78072013-11-13 Joseph Myers <joseph@codesourcery.com>
7808
7809 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7810 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7811 __auto_type.
7812 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7813 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7814 RID_AUTO_TYPE.
7815 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7816 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7817 (c_parser_declarator, c_parser_direct_declarator_inner)
7818 (c_parser_parameter_declaration, c_parser_type_name): All callers
7819 changed.
7820 (c_parser_declaration_or_fndef): Handle declarations with type
7821 determined from the initializer.
7822
45b0be94
AM
78232013-11-12 Andrew MacLeod <amacleod@redhat.com>
7824
18f429e2 7825 * c-typeck.c: Include gimplify.h.
45b0be94 7826
582d9b50
JM
78272013-11-12 Joseph Myers <joseph@codesourcery.com>
7828
7829 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7830 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7831 comment.
7832 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7833 or _Thread_local as appropriate in diagnostics.
7834 (build_null_declspecs): Initialize ret->thread_gnu_p.
7835 (declspecs_add_scspec): Handle either __thread or _Thread_local
7836 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7837 pedantic. Do not disallow _Thread_local extern and _Thread_local
7838 static.
7839
267bac10
JM
78402013-11-07 Joseph Myers <joseph@codesourcery.com>
7841 Andrew MacLeod <amacleod@redhat.com>
7842
7843 * c-aux-info.c (gen_type): Handle atomic qualifier.
7844 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7845 qualifiers when compating types.
7846 (shadow_tag_warned): Handle atomic_p in declspecs.
7847 (quals_from_declspecs): Likewise.
7848 (start_decl): Use c_type_promotes_to when promoting argument
7849 types.
7850 (grokdeclarator): Handle _Atomic.
7851 (get_parm_info): Diagnose any qualifier on "void" as only
7852 parameter.
7853 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7854 comparing types. Use c_type_promotes_to when promoting argument
7855 types.
7856 (finish_function): Use c_type_promotes_to when promoting argument
7857 types.
7858 (build_null_declspecs): Handle atomic_p in declspecs.
7859 (declspecs_add_qual): Handle RID_ATOMIC.
7860 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7861 (c_token_starts_declspecs): Handle RID_ATOMIC.
7862 (c_parser_declspecs): Handle atomic type specifiers and
7863 qualifiers.
7864 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7865 from types of expressions with atomic type.
7866 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7867 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7868 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7869 (c_parser_statement_after_labels, c_parser_switch_statement)
7870 (c_parser_for_statement, c_parser_expr_no_commas)
7871 (c_parser_conditional_expression, c_parser_binary_expression)
7872 (c_parser_cast_expression, c_parser_unary_expression)
7873 (c_parser_postfix_expression)
7874 (c_parser_postfix_expression_after_primary, c_parser_expression):
7875 Use convert_lvalue_to_rvalue.
7876 (c_parser_expression_conv, c_parser_expr_list): Document
7877 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7878 (c_parser_objc_synchronized_statement): Use
7879 convert_lvalue_to_rvalue.
7880 (c_parser_objc_selector): Handle RID_ATOMIC.
7881 (c_parser_objc_receiver, c_parser_array_notation): Use
7882 convert_lvalue_to_rvalue.
7883 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7884 _Atomic (type-name).
7885 (struct c_declspecs): Add atomic_p field.
7886 (convert_lvalue_to_rvalue): Declare.
7887 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7888 corresponding atomic types.
7889 (qualify_type): Don't add _Atomic qualifiers from second argument.
7890 (comp_target_types): Do not allow _Atomic mismatches.
7891 (type_lists_compatible_p): Do not remove atomic qualifiers when
7892 comparing types.
7893 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7894 (build_atomic_assign): New functions.
7895 (build_unary_op): Use build_atomic_assign for atomic increment and
7896 decrement.
7897 (build_conditional_expr): Do not treat _Atomic void as a qualified
7898 version of void.
7899 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7900 (find_anonymous_field_with_type, convert_to_anonymous_field)
7901 (convert_for_assignment): Do not remove atomic qualifiers when
7902 comparing types.
7903 (digest_init): Do not accept initialization of arrays of atomic
7904 elements by string constants.
7905 (build_asm_expr): Use convert_lvalue_to_rvalue.
7906 (build_binary_op): Do not treat _Atomic void as a qualified
7907 version of void.
7908
0c249d4b
DD
79092013-11-06 DJ Delorie <dj@redhat.com>
7910
7911 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7912 both explicit and builtin, print the location of the explicit one.
7913
6d7f7e0a
TB
79142013-11-05 Tobias Burnus <burnus@net-b.de>
7915
7916 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7917 c_parser_omp_distribute, c_parser_omp_teams,
7918 c_parser_omp_target, c_parser_omp_declare): Handle
7919 -fopenmp-simd.
7920
b906f4ca
MP
79212013-11-03 Marek Polacek <polacek@redhat.com>
7922
7923 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7924
ee1d5a02
JJ
79252013-11-01 Jakub Jelinek <jakub@redhat.com>
7926
7927 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7928 check_dup_generic at the end, unless remove is true.
7929 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7930 remove = true;.
7931 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7932
5a9785fb
JJ
79332013-10-31 Jakub Jelinek <jakub@redhat.com>
7934
7935 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7936 with decl that is not pointer nor array.
7937
939b37da
BI
79382013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7939
7940 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7941 a spawning function is found.
7942 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7943 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7944 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7945 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7946 case.
7947 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7948 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7949 expr.
7950 (c_finish_return): Added a check to reject _Cilk_spawn in return
7951 expression.
7952 (build_cilk_spawn): New function.
7953 (build_cilk_sync): Likewise.
7954 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7955
d4af74d4
TB
79562013-10-27 Tobias Burnus <burnus@net-b.de>
7957
7958 PR other/33426
7959 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7960 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7961 (c_parser_statement_after_labels): Update calls.
7962
d73749df 79632013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7964
7965 PR other/33426
7966 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7967 Handle PRAGMA_IVDEP.
7968 (c_parser_statement_after_labels): Update call.
7969
f28aa681
MP
79702013-10-24 Marek Polacek <polacek@redhat.com>
7971
7972 * c-parser.c (c_parser_struct_declaration): Add a comment.
7973 (c_parser_declarator): Don't allow _Alignas here.
7974
0645c1a2
AM
79752013-10-17 Andrew MacLeod <amacleod@redhat.com>
7976
7977 * c-parser.c: Include omp-low.h.
7978 * c-typeck.c: Likewise.
7979
568a31f2
MP
79802013-10-17 Marek Polacek <polacek@redhat.com>
7981
7982 PR c/58267
7983 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7984 Document syntax of the array-declarator.
7985 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7986 are not permitted.
7987 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7988 (c_parser_struct_declaration): Likewise.
7989 (c_parser_declarator): Likewise.
7990 (c_parser_direct_declarator_inner): Likewise.
7991 (c_parser_parameter_declaration): Likewise.
7992 (c_parser_type_name): Likewise.
7993
acf0174b
JJ
79942013-10-11 Jakub Jelinek <jakub@redhat.com>
7995
7996 * c-lang.h (current_omp_declare_target_attribute): New extern
7997 decl.
7998 * c-parser.c: Include c-lang.h.
7999 (struct c_parser): Change tokens to c_token *.
8000 Add tokens_buf field. Change tokens_avail type to unsigned int.
8001 (c_parser_consume_token): If parser->tokens isn't
8002 &parser->tokens_buf[0], increment parser->tokens.
8003 (c_parser_consume_pragma): Likewise.
8004 (enum pragma_context): Add pragma_struct and pragma_param.
8005 (c_parser_external_declaration): Adjust
8006 c_parser_declaration_or_fndef caller.
8007 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
8008 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
8009 Adjust recursive call.
8010 (c_parser_struct_or_union_specifier): Use pragma_struct instead
8011 of pragma_external.
8012 (c_parser_parameter_declaration): Use pragma_param instead of
8013 pragma_external.
8014 (c_parser_compound_statement_nostart, c_parser_label,
8015 c_parser_for_statement): Adjust
8016 c_parser_declaration_or_fndef callers.
8017 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
8018 it through to c_parser_conditional_expression.
8019 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
8020 pass it through to c_parser_binary_expression. Adjust recursive
8021 call.
8022 (c_parser_binary_expression): Remove prec argument, add
8023 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
8024 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
8025 binop matches it, use build2 instead of parser_build_binary_op.
8026 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
8027 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
8028 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
8029 Handle pragma_struct and pragma_param the same as pragma_external.
8030 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
8031 (c_parser_omp_variable_list): Parse array sections for
8032 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
8033 (c_parser_omp_clause_collapse): Fully fold collapse expression.
8034 (c_parser_omp_clause_reduction): Handle user defined reductions.
8035 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
8036 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
8037 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
8038 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
8039 c_parser_omp_clause_depend, c_parser_omp_clause_map,
8040 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
8041 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
8042 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
8043 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
8044 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
8045 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
8046 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
8047 (c_parser_omp_for_loop): Add CODE argument, pass it through
8048 to c_finish_omp_for. Change last argument to cclauses,
8049 and adjust uses to grab parallel clauses from the array of all
8050 the split clauses. Adjust c_parser_binary_expression,
8051 c_parser_declaration_or_fndef and c_finish_omp_for callers.
8052 (omp_split_clauses): New function.
8053 (c_parser_omp_simd): New function.
8054 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
8055 Allow the function to be called also when parsing combined constructs,
8056 and call c_parser_omp_simd when parsing for simd.
8057 (c_parser_omp_sections_scope): If section-sequence doesn't start with
8058 #pragma omp section, require exactly one structured-block instead of
8059 sequence of statements.
8060 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
8061 Allow the function to be called also when parsing combined constructs.
8062 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
8063 Allow the function to be called also when parsing combined
8064 constructs.
8065 (c_parser_omp_taskgroup, c_parser_omp_cancel,
8066 c_parser_omp_cancellation_point, c_parser_omp_distribute,
8067 c_parser_omp_teams, c_parser_omp_target_data,
8068 c_parser_omp_target_update, c_parser_omp_target,
8069 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
8070 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
8071 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
8072 (c_parser_omp_construct): Add p_name and mask vars. Handle
8073 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
8074 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
8075 and c_parser_omp_sections callers.
8076 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
8077 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
8078 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
8079 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
8080 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
8081 OMP_CLAUSE_DEPEND.
8082 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
8083 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
8084 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
8085 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
8086 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
8087 * c-typeck.c: Include tree-inline.h.
8088 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
8089 handle_omp_array_sections_1, handle_omp_array_sections,
8090 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
8091 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
8092 user defined reductions.
8093 (c_tree_equal): New function.
8094 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
8095 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
8096 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
8097 c_check_omp_declare_reduction_r): New prototypes.
8098 * c-decl.c (current_omp_declare_target_attribute): New variable.
8099 (c_decl_attributes): New function.
8100 (start_decl, start_function): Use it instead of decl_attributes.
8101 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
8102 c_omp_reduction_decl, c_omp_reduction_lookup,
8103 c_check_omp_declare_reduction_r): New functions.
8104
0a6c2227
TT
81052013-09-25 Tom Tromey <tromey@redhat.com>
8106
8107 * Make-lang.in (c/gccspec.o): Remove.
8108 (CFLAGS-c/gccspec.o): New variable.
8109 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
8110 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
8111 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
8112
f3bc55f0
TT
81132013-09-25 Tom Tromey <tromey@redhat.com>
8114
8115 * Make-lang.in (c/gccspec.o): Don't use subshell.
8116
a24d975c
MP
81172013-09-18 Marek Polacek <polacek@redhat.com>
8118
8119 PR sanitize/58443
8120 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
8121 Remove unnecessary check.
8122
ce6923c5
MP
81232013-09-18 Marek Polacek <polacek@redhat.com>
8124
8125 PR sanitizer/58411
8126 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
8127 no_sanitize_undefined attribute.
8128
a1e51df9
KT
81292013-09-13 Kai Tietz <ktietz@redhat.com>
8130
8131 PR target/57848
8132 * c-decl.c (c_builtin_function_ext_scope): Remove
8133 wrong assumption that it is never called on prexisting
8134 symbol.
8135
0af94e6f
JR
81362013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8137
8138 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
8139
20059c8b
GDR
81402013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8141
8142 * c-objc-common.c (c_tree_printer): Tidy.
8143
de5a5fa1
MP
81442013-08-30 Marek Polacek <polacek@redhat.com>
8145
8146 * c-typeck.c (build_binary_op): Add division by zero and shift
8147 instrumentation.
8148
2531a1d9 81492013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 8150 Joseph Myers <joseph@codesourcery.com>
2531a1d9 8151
6e2bcc98 8152 PR c/35649
2531a1d9
JR
8153 * c-typeck.c (c_common_type): Prefer double_type_node over
8154 other REAL_TYPE types with the same precision.
8155 (convert_arguments): Likewise.
8156
025311c4
GDR
81572013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
8158
8159 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
8160 (c_initialize_diagnostics): Call a destructor for the early printer.
8161
da6ca2b5
GDR
81622013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8163
8164 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
8165 printer initialization.
8166
318cda85 81672013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 8168
318cda85
BI
8169 PR c/57490
8170 * c-array-notation.c (fix_conditional_array_notations_1): Added a
8171 check for truth values.
8172 (expand_array_notation_exprs): Added truth values case. Removed an
8173 unwanted else. Added for-loop to walk through subtrees in default
8174 case.
8175
b066401f
GDR
81762013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8177
8178 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
8179
fb48aadc
JM
81802013-07-23 Joseph Myers <joseph@codesourcery.com>
8181
8182 * c-parser.c (struct c_generic_association): Fix typo.
8183
433cc7b0
TT
81842013-07-23 Tom Tromey <tromey@redhat.com>
8185 Joseph Myers <joseph@codesourcery.com>
8186
8187 * c-parser.c (struct c_generic_association): New.
8188 (c_generic_association_d): New typedef.
8189 (c_parser_generic_selection): New function.
8190 (c_parser_postfix_expression): Handle RID_GENERIC.
8191
26d40c3d
JM
81922013-07-13 Jason Merrill <jason@redhat.com>
8193
8194 PR c++/57793
8195 * c-decl.c (finish_struct): Check for too-large class.
8196
ecdbd01a 81972013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8198
8199 PR c/57821
8200 * c-typeck.c (set_init_index): When folding, check for index overflow.
8201
1141ed3f
BI
82022013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8203
8204 * c-parser.c (c_parser_array_notation): Removed rejection of array
8205 notations in an array of function pointers.
8206
713b46fa
BI
82072013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8208
8209 * c-array-notation.c (make_triplet_val_inv): New function.
8210 (create_cmp_incr): Likewise.
8211 (create_array_refs): Likewise.
8212 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8213 Also modularized common parts between functions and called the function.
8214 (build_array_notation_expr): Likewise.
8215 (fix_conditional_array_notations_1): Likewise.
8216 (fix_array_notation_expr): Likewise.
8217 (fix_array_notation_call_expr): Likewise.
8218
92f20202
MP
82192013-06-18 Marek Polacek <polacek@redhat.com>
8220
8221 PR c/57630
8222 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8223
73a23b06
BI
82242013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8225
8226 * c-array-notation.c (build_array_notation_expr): Reject array notation
8227 mismatch between LHS and RHS even inside a call_expr. Also, removed
8228 a couple while statements that were dead code.
8229
00b8517d
BI
82302013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8231
8232 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8233 excessive precision expressions in function parameters. Also removed
8234 couple unwanted while statements.
8235
1509bdda
BI
82362013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8237
8238 * c-array-notation.c (expand_array_notation_exprs): Added
8239 ARRAY_NOTATION_REF case.
ab20d992 8240
d60f1706
BI
82412013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8242
8243 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8244 function to c-family/array-notation-common.c.
8245 (is_cilkplus_reduce_builtin): Likewise.
8246 (find_rank): Likewise.
8247 (extract_array_notation_exprs): Likewise.
8248 (replace_array_notations): Likewise.
8249 (find_inv_trees): Likewise.
8250 (replace_inv_trees): Likewise.
8251 (contains_array_notation_expr): Likewise.
8252 (find_correct_array_notation_type): Likewise.
8253 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8254 (struct inv_list): Moved this to c-family/array-notation-common.c.
8255 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 8256
6d6efbb3
BI
82572013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8258
8259 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8260 reduction functions outside the for-loop. Added a check if the fundecl
8261 is non-NULL. Finally, removed an unwanted if-statement, and made the
8262 body unconditional.
8263
25c22937
BI
82642013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8265
8266 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8267 condition of the if-statement matches the rank of else-block and then-
8268 block when array notations are used.
8269 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8270 expression after the entire function body is parsed.
8271 (c_parser_expr_no_commas): Delayed creating array notation expressions
8272 to the end of function parsing.
8273 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8274 whole if-statement instead of just the condition.
ab20d992 8275 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 8276
edd25645
BI
82772013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8278
8279 PR c/57474
8280 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8281 array to NULL_TREE if they are unused. Also added a check for the
8282 field to be NULL before its fields are used in future.
ab20d992 8283
065ce7f1
RO
82842013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8285
8286 PR bootstrap/57450
8287 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8288 (build_array_notation_expr): Likewise.
8289
36536d79
BI
82902013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8291
8292 * c-typeck.c (build_array_ref): Added a check to see if array's
8293 index is greater than one. If true, then emit an error.
8294 (build_function_call_vec): Exclude error reporting and checking
8295 for builtin array-notation functions.
8296 (convert_arguments): Likewise.
8297 (c_finish_return): Added a check for array notations as a return
8298 expression. If true, then emit an error.
8299 (c_finish_loop): Added a check for array notations in a loop
8300 condition. If true then emit an error.
8301 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8302 (build_binary_op): Added a check for array notation expr inside
8303 op1 and op0. If present, we call another function to find correct
8304 type.
8305 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8306 * c-parser.c (c_parser_compound_statement): Check if array
8307 notation code is used in tree, if so, then transform them into
8308 appropriate C code.
8309 (c_parser_expr_no_commas): Check if array notation is used in LHS
8310 or RHS, if so, then build array notation expression instead of
8311 regular modify.
8312 (c_parser_postfix_expression_after_primary): Added a check for
8313 colon(s) after square braces, if so then handle it like an array
8314 notation. Also, break up array notations in unary op if found.
8315 (c_parser_direct_declarator_inner): Added a check for array
8316 notation.
8317 (c_parser_compound_statement): Added a check for array notation in
8318 a stmt. If one is present, then expand array notation expr.
8319 (c_parser_if_statement): Likewise.
8320 (c_parser_switch_statement): Added a check for array notations in
8321 a switch statement's condition. If true, then output an error.
8322 (c_parser_while_statement): Similarly, but for a while.
8323 (c_parser_do_statement): Similarly, but for a do-while.
8324 (c_parser_for_statement): Similarly, but for a for-loop.
8325 (c_parser_unary_expression): Check if array notation is used in a
8326 pre-increment or pre-decrement expression. If true, then expand
8327 them.
8328 (c_parser_array_notation): New function.
8329 * c-array-notation.c: New file.
8330 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 8331
cd192ccc
MS
83322013-05-23 Mike Stump <mikestump@comcast.net>
8333
8334 * c-typeck.c (convert_for_assignment): Handle references to memory
8335 spaces better.
8336
427b248d
JM
83372013-05-16 Jason Merrill <jason@redhat.com>
8338
8339 * Make-lang.in (cc1$(exeext)): Use link mutex.
8340
44d90fe1
PC
83412013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8342
8343 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8344 to simply use OPT_Wpointer_arith.
8345 (build_unary_op): Likewise.
8346
4e7d7b3d
JJ
83472013-04-03 Jakub Jelinek <jakub@redhat.com>
8348
8349 PR c/19449
8350 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8351 argument. If set, or it temporarily for parsing of the first
8352 argument into force_folding_builtin_constant_p.
8353 (c_parser_postfix_expression): Adjust callers.
8354
839b422f
RB
83552013-03-21 Richard Biener <rguenther@suse.de>
8356
8357 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8358 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8359
2ee028f1
MP
83602013-02-12 Marek Polacek <polacek@redhat.com>
8361
8362 PR c/44938
8363 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8364 origtypes to NULL.
8365
8824edff
JJ
83662013-01-24 Jakub Jelinek <jakub@redhat.com>
8367
8368 PR c/56078
8369 * c-typeck.c (set_nonincremental_init_from_string): If
8370 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8371 returned false.
8372 (process_init_element): Likewise.
8373
eadd3d0d
JJ
83742012-12-20 Jakub Jelinek <jakub@redhat.com>
8375
8376 PR c++/55619
8377 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8378 argument, don't call default_function_array_conversion
8379 nor c_fully_fold here.
8380 (c_parser_asm_statement): Adjust callers.
8381 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8382 and outputs here, and call default_function_array_conversion
8383 on inputs that don't need to be addressable.
8384
f8a93a2e
JJ
83852012-12-18 Jakub Jelinek <jakub@redhat.com>
8386
8387 PR c/39464
8388 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8389 warning require that both c_common_unsigned_type as well as
8390 c_common_signed_type is the same for both mvl and mvr types.
8391
9771b263
DN
83922012-11-16 Diego Novillo <dnovillo@google.com>
8393
8394 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8395
8396 * c-common.c: Use new vec API in vec.h.
8397 * c-common.h: Likewise.
8398 * c-gimplify.c: Likewise.
8399 * c-pragma.c: Likewise.
8400 * c-pretty-print.c: Likewise.
8401 * c-pretty-print.h: Likewise.
8402 * c-semantics.c: Likewise.
8403 * c-decl.c: Likewise.
8404 * c-parser.c: Likewise.
8405 * c-tree.h: Likewise.
8406 * c-typeck.c: Likewise.
8407
880661a4
JW
84082012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8409
8410 PR c++/54930
8411 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8412
077d1abe
MLI
84132012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8414
8415 PR c/53066
8416 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8417 shadows a function, unless the variable is a function or a
8418 pointer-to-function.
8419
3a785c97
JJ
84202012-10-12 Jakub Jelinek <jakub@redhat.com>
8421
8422 PR c/54381
8423 * c-parser.c (struct c_tree_loc_pair): Removed.
8424 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8425 add location_t * and tree * arguments, fill in array of 3
8426 sizeof_arg trees and corresponding locs.
8427 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8428 c_parser_expr_list callers.
8429 (c_parser_postfix_expression_after_primary): Likewise. Pass
8430 array of 3 sizeof_arg trees and locs (corresponding to first
8431 3 arguments) to sizeof_pointer_memaccess_warning.
8432
703c8606
LC
84332012-10-09 Lawrence Crowl <crowl@google.com>
8434
8435 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8436 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8437 hash table.
8438
5d9de0d0
PC
84392012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8440
8441 PR c++/54194
8442 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8443 call.
8444
a212e43f
MG
84452012-10-09 Marc Glisse <marc.glisse@inria.fr>
8446
8447 PR c++/54427
8448 * c-typeck.c: Include c-common.h.
8449 (enum stv_conv): Moved to c-common.h.
8450 (scalar_to_vector): Moved to c-common.c.
8451 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8452 * Make-lang.in: c-typeck.c depends on c-common.h.
8453
3b78de56
AC
84542012-10-04 Arnaud Charlet <charlet@adacore.com>
8455
8456 * c-decl.c (c_write_global_declarations): Fix handling of
8457 -fdump-ada-spec*.
8458
78c60e3d
SS
84592012-09-30 Sharad Singhai <singhai@google.com>
8460
8461 * c-decl.c (c_write_global_declarations): Use a different method
8462 to determine if the dump has ben initialized.
8463
9f33203d
JM
84642012-09-14 Joseph Myers <joseph@codesourcery.com>
8465
8466 PR c/54552
8467 * c-typeck.c (c_cast_expr): When casting to a type requiring
8468 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8469 c_fully_fold first.
8470
a27d595d
JM
84712012-09-14 Joseph Myers <joseph@codesourcery.com>
8472
8473 PR c/54103
8474 * c-typeck.c (build_unary_op): Pass original argument of
8475 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8476 any C_MAYBE_CONST_EXPR, if it has integer operands.
8477 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8478 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8479 to c_objc_common_truthvalue_conversion, then remove any
8480 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8481 c_objc_common_truthvalue_conversion not
8482 c_common_truthvalue_conversion.
8483 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8484 call note_integer_operands for arguments with integer operands
8485 that are not integer constants.
8486
9feb29df
JJ
84872012-09-13 Jakub Jelinek <jakub@redhat.com>
8488
8489 PR c/54559
8490 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8491 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8492
d409320c
JJ
84932012-08-31 Jakub Jelinek <jakub@redhat.com>
8494
8495 PR c/54428
8496 * c-convert.c (convert): Don't call fold_convert_loc if
8497 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8498 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8499 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8500
6265d07c
JJ
85012012-08-24 Jakub Jelinek <jakub@redhat.com>
8502
8503 PR c/54355
8504 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8505 for nested and empty_ok arguments in the call to
8506 c_parser_declaration_or_fndef.
8507
1a4049e7
JJ
85082012-08-17 Jakub Jelinek <jakub@redhat.com>
8509
8510 * c-tree.h (c_last_sizeof_arg): Declare.
8511 * c-parser.c (struct c_tree_loc_pair): New type.
8512 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8513 non-NULL.
8514 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8515 (c_parser_postfix_expression_after_primary): Likewise. Call
8516 sizeof_pointer_memaccess_warning if needed.
8517 (sizeof_ptr_memacc_comptypes): New function.
8518 * c-typeck.c (c_last_sizeof_arg): New global variable.
8519 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8520
0229aee9
UB
85212012-07-24 Uros Bizjak <ubizjak@gmail.com>
8522
8523 * c-lang.h (lang_decl): Add variable_size GTY option.
8524
7ee2468b
SB
85252012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8526
8527 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8528 * Make-lang.in: Fix dependencies.
8529
d4a10d0a
SB
85302012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8531
8532 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8533 and add language Makefile hooks.
8534 * config-lang.in: New file.
8535 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8536 add the required "normal" config-lang.in rules.
8537 * c-lang.h: Moved from gcc/ to here.
8538 * c-tree.h: Likewise.
8539 * c-objc-common.c: Likewise.
8540 * c-objc-common.h: Likewise.
8541 * c-typeck.c: Likewise.
8542 * c-convert.c: Likewise.
8543 * c-lang.c: Likewise.
8544 * c-aux-info.c: Likewise.
8545 * c-errors.c: Likewise.
8546 * gccspec.c: Likewise.
8547 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8548 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8549\f
877e3c2a 8550Copyright (C) 2012-2022 Free Software Foundation, Inc.
d4a10d0a
SB
8551
8552Copying and distribution of this file, with or without modification,
8553are permitted in any medium without royalty provided the copyright
8554notice and this notice are preserved.