]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
i386: Replace long with long long for 64-bit integer
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
542c60c4
GA
12022-08-31 Joseph Myers <joseph@codesourcery.com>
2
3 * c-parser.cc (c_parser_label): Pass attributes to do_case.
4 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
5 c_add_case_label.
6
16f542d6
GA
72022-08-26 Jakub Jelinek <jakub@redhat.com>
8
9 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
10
5d4389dc
GA
112022-08-25 Marek Polacek <polacek@redhat.com>
12
13 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
14 Give a better diagnostic when converting to nullptr_t.
15 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
16 initialization.
17 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
18 (c_parser_postfix_expression): Handle RID_NULLPTR.
19 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
20 nullptr_node.
21 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
22 (build_conditional_expr): Handle the case when the second/third operand
23 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
24 (convert_for_assignment): Handle converting an expression of type
25 nullptr_t to pointer/bool.
26 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
27 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
28
292022-08-25 Joseph Myers <joseph@codesourcery.com>
30
31 * c-decl.cc (start_decl): Do not diagnose initialization of
32 variable-sized objects here.
33 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
34 callers changed.
35 (c_parser_initializer): Diagnose initialization of variable-sized
36 objects other than with braced initializer.
37 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
38 braces and update diagnostic text. Diagnose initialization of
39 variable-sized objects with nonempty braces.
40 * c-typeck.cc (digest_init): Update diagnostic for initialization
41 of variable-sized objects.
42 (really_start_incremental_init, set_designator)
43 (process_init_element): Update comments.
44 (pop_init_level): Allow scalar empty initializers.
45
0342f034
GA
462022-08-17 Tobias Burnus <tobias@codesourcery.com>
47 Chung-Lin Tang <cltang@codesourcery.com>
48
49 PR c++/104493
50 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
51 instead of removed langhook.
52 * c-typeck.cc (c_finish_omp_clauses): Likewise.
53
5cd525f0
GA
542022-08-11 Marek Polacek <polacek@redhat.com>
55
56 PR middle-end/102633
57 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
58 Call suppress_warning.
59 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
60 (c_parser_omp_declare_reduction): Pass omp_priv down to
61 c_parser_initializer.
62
5f17badb
GA
632022-08-08 Tom Honermann <tom@honermann.net>
64
65 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
66 of CPP_UTF8STRING when char8_t support is enabled.
67 * c-typeck.cc (digest_init): Allow initialization of an array
68 of character type by a string literal with type array of
69 char8_t.
70
32510382
GA
712022-08-01 David Malcolm <dmalcolm@redhat.com>
72
73 * c-typeck.cc (build_c_cast): Quote names of address spaces in
74 diagnostics.
75 (convert_for_assignment): Add a note to address space mismatch
76 diagnostics, specifying the expected and actual types.
77
b53ebbc5
GA
782022-07-10 Lewis Hyatt <lhyatt@gmail.com>
79
80 PR preprocessor/97498
81 * c-parser.cc (c_parser_pragma): Set input_location to the
82 location of the pragma, rather than the start of the line.
83
8467574d
GA
842022-07-04 Tobias Burnus <tobias@codesourcery.com>
85 Chung-Lin Tang <cltang@codesourcery.com>
86 Thomas Schwinge <thomas@codesourcery.com>
87
88 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
89 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
90 OMP_REQUIRES_TARGET_USED.
91 (c_parser_omp_requires): Remove sorry.
92
ed974488
GA
932022-07-01 Tobias Burnus <tobias@codesourcery.com>
94
95 * c-parser.cc (c_parser_omp_target_enter_data,
96 c_parser_omp_target_exit_data): Accept tofrom
97 map-type modifier but use 'to' / 'from' internally.
98
bc7e9f76
GA
992022-06-16 David Malcolm <dmalcolm@redhat.com>
100
101 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
102 group the warning with any note.
103 (warn_about_goto): Likewise to group error or warning with note.
104 Bail out if the warning wasn't emitted, to avoid emitting orphan
105 notes.
106 (lookup_label_for_goto): Add auto_diagnostic_group to
107 group the error with the note.
108 (check_earlier_gotos): Likewise.
109 (c_check_switch_jump_warnings): Likewise for any error/warning.
110 Conditionalize emission of the notes.
111 (diagnose_uninitialized_cst_member): Likewise for warning,
112 conditionalizing emission of the note.
113 (grokdeclarator): Add auto_diagnostic_group to group the "array
114 type has incomplete element type" error with any note.
115 (parser_xref_tag): Add auto_diagnostic_group to group warnings
116 with their notes. Conditionalize emission of notes.
117 (start_struct): Add auto_diagnostic_group to group the
118 "redefinition of" errors with any note.
119 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
120 (check_for_loop_decls): Likewise for pre-C99 error.
121
445ba599
GA
1222022-06-07 Jakub Jelinek <jakub@redhat.com>
123
124 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
125 style linear clause modifiers. Set
126 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
127 old style modifiers are used.
128 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
129 with val modifier on simd or for if the old style modifiers are
130 used.
131
b168441c
GA
1322022-06-02 David Malcolm <dmalcolm@redhat.com>
133
134 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
135 (c_get_sarif_source_language): New.
136 * c-tree.h (c_get_sarif_source_language): New decl.
137
820ead45
GA
1382022-05-31 Jason Merrill <jason@redhat.com>
139
140 * Make-lang.in (c.tags): Look at *.cc.
141
1422022-05-31 Jakub Jelinek <jakub@redhat.com>
143
144 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
145 clauses.
146
37b3b5da
GA
1472022-05-28 Jakub Jelinek <jakub@redhat.com>
148
149 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
150 seen first, use "%<to%>" or "%<enter%>" depending on
151 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
152 "%<to%> or %<enter%>" wording.
153
d9176e64
GA
1542022-05-27 Jakub Jelinek <jakub@redhat.com>
155
156 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
157 (c_parser_omp_all_clauses): For to clause on declare target, use
158 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
159 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
160 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
161 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
162 OMP_CLAUSE_TO_DECLARE.
163 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
164 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
165 name in diagnostics instead of
166 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
167
3dff965c
GA
1682022-05-25 Jakub Jelinek <jakub@redhat.com>
169
170 PR c/91134
171 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
172 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
173 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
174 diagnostic and fixit hint if DATUM has pointer type.
175 * c-parser.cc (c_parser_postfix_expression,
176 c_parser_omp_variable_list): Adjust build_component_ref callers.
177 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
178 Likewise.
179
768f49a2
GA
1802022-05-24 Jakub Jelinek <jakub@redhat.com>
181
182 PR c/105378
183 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
184
1cda629f
GA
1852022-05-18 Marek Polacek <polacek@redhat.com>
186
187 PR c/105131
188 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
189 mismatches.
190 * c-tree.h (comptypes_check_enum_int): Declare.
191 * c-typeck.cc (comptypes): No longer static.
192
3d9439b1
GA
1932022-05-17 Marek Polacek <polacek@redhat.com>
194
195 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
196 its value.
197
1982022-05-17 Jakub Jelinek <jakub@redhat.com>
199
200 * c-parser.cc (c_parser_omp_clause_depend): Parse
201 inoutset depend-kind.
202 (c_parser_omp_depobj): Likewise.
203
702bd11f
GA
2042022-05-16 Martin Liska <mliska@suse.cz>
205
206 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
207
49ace834
GA
2082022-05-12 Jakub Jelinek <jakub@redhat.com>
209
210 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
211 if flag_openmp.
212 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
213 in postfix expressions.
214 (c_parser_omp_variable_list): Handle omp_all_memory in depend
215 clause.
216 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
217 keyword in depend clause as null_pointer_node, diagnose invalid
218 uses.
219
bd022ff9
GA
2202022-05-09 Martin Liska <mliska@suse.cz>
221
222 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
223 macros.
224 (c_parser_binary_expression): Likewise.
225
a1947c92
GA
2262022-05-07 Marek Polacek <polacek@redhat.com>
227
228 PR c++/101833
229 PR c++/47634
230 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
231
405eda0d
GA
2322022-04-08 Jakub Jelinek <jakub@redhat.com>
233
234 PR c/105149
235 * c-typeck.cc (c_build_va_arg): Reject function types.
236
a2287813
GA
2372022-03-22 Marek Polacek <polacek@redhat.com>
238
239 PR c/82283
240 PR c/84685
241 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
242 (start_init): Set it.
243 (finish_init): Restore constructor_designated.
244 (push_init_level): Set constructor_designated to the value of
245 constructor_designated in the upper constructor_stack.
246
57eeedda
GA
2472022-03-12 Thomas Schwinge <thomas@codesourcery.com>
248
249 PR other/65095
250 * c-typeck.cc (handle_omp_array_sections_1)
251 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
252 instead of 'c_omp_map_clause_name'.
253
8cc4f9cd
GA
2542022-03-09 Joseph Myers <joseph@codesourcery.com>
255
256 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
257 differently from earlier standards for unprototyped function type
258 compatibility.
259
2602022-03-09 Jakub Jelinek <jakub@redhat.com>
261
262 PR c/104711
263 * c-fold.cc (c_fully_fold_internal): Don't emit
264 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
265 * c-typeck.cc (build_binary_op): Likewise.
266
e6533e2e
GA
2672022-03-07 Jakub Jelinek <jakub@redhat.com>
268
269 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
270 literal.
271
4bf3bac1
GA
2722022-02-23 Richard Biener <rguenther@suse.de>
273
274 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
275 SSA names without definition.
276 (c_parser_gimple_declaration): Handle pointer typed SSA names.
277
0bdb0498
GA
2782022-02-17 Jakub Jelinek <jakub@redhat.com>
279
280 PR c/104532
281 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
282 convert_lvalue_to_rvalue and build_indirect_ref instead of
283 build_simple_mem_ref.
284
e8d68f0a
GA
2852022-02-11 Richard Biener <rguenther@suse.de>
286
287 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
288 VEC_COND_EXPRs.
289
a645583d
GA
2902022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
291
292 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
293 clause.
294 (c_parser_omp_variable_list): Handle array sections.
295 (c_parser_omp_clause_has_device_addr): Added.
296 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
297 case.
298 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
299 OMP_CLAUSE_MASK.
300 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
301 (c_finish_omp_clauses): Handle array sections.
302
3adf509f
GA
3032022-02-09 Jakub Jelinek <jakub@redhat.com>
304
305 PR c/104427
306 * c-parser.cc (c_parser_postfix_expression)
307 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
308 instead of build1_loc to build PAREN_EXPR.
309 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
310 * c-fold.cc (c_fully_fold_internal): Likewise.
311
fc829782
GA
3122022-01-17 Martin Liska <mliska@suse.cz>
313
314 * Make-lang.in: Rename .c names to .cc.
315 * c-convert.cc: Likewise.
316 * c-decl.cc (struct lang_identifier): Likewise.
317 (pop_scope): Likewise.
318 (finish_decl): Likewise.
319 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
320 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
321 * c-parser.h (GCC_C_PARSER_H): Likewise.
322 * c-tree.h (c_keyword_starts_typename): Likewise.
323 (finish_declspecs): Likewise.
324 (c_get_alias_set): Likewise.
325 (enum c_oracle_request): Likewise.
326 (tag_exists_p): Likewise.
327 (set_c_expr_source_range): Likewise.
328 * c-typeck.cc (c_common_type): Likewise.
329 (c_finish_omp_clauses): Likewise.
330 * config-lang.in: Likewise.
331
3322022-01-17 Martin Liska <mliska@suse.cz>
333
334 * c-aux-info.c: Moved to...
335 * c-aux-info.cc: ...here.
336 * c-convert.c: Moved to...
337 * c-convert.cc: ...here.
338 * c-decl.c: Moved to...
339 * c-decl.cc: ...here.
340 * c-errors.c: Moved to...
341 * c-errors.cc: ...here.
342 * c-fold.c: Moved to...
343 * c-fold.cc: ...here.
344 * c-lang.c: Moved to...
345 * c-lang.cc: ...here.
346 * c-objc-common.c: Moved to...
347 * c-objc-common.cc: ...here.
348 * c-parser.c: Moved to...
349 * c-parser.cc: ...here.
350 * c-typeck.c: Moved to...
351 * c-typeck.cc: ...here.
352 * gccspec.c: Moved to...
353 * gccspec.cc: ...here.
354 * gimple-parser.c: Moved to...
355 * gimple-parser.cc: ...here.
356
3572022-01-17 Andrew Stubbs <ams@codesourcery.com>
358
359 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
360
617db51d
GA
3612022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
362
363 PR c++/103705
364 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
365 outer node for ARRAY_REFs.
366
62eb5308
GA
3672022-01-01 Jakub Jelinek <jakub@redhat.com>
368
369 PR objc/103639
370 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
371 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
372
2554e2da
GA
3732021-12-17 Marek Polacek <polacek@redhat.com>
374
375 PR c/103649
376 * c-decl.c (c_warn_unused_attributes): Don't warn for
377 attribute_ignored_p.
378 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
379 arguments when the attribute is ignored.
380
9c6586bc
GA
3812021-12-14 Jakub Jelinek <jakub@redhat.com>
382
383 PR c/103587
384 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
385 consume the pragma and silently skip to the pragma eol.
386
c8dcf64b
GA
3872021-12-12 Jonathan Wakely <jwakely@redhat.com>
388
389 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
390 * c-parser.c: Likewise.
391
4b4839e3
GA
3922021-12-09 Jakub Jelinek <jakub@redhat.com>
393
394 PR pch/71934
395 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
396 to resort_data.new_value.
397
641ff219
GA
3982021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
399
400 * c-parser.c (struct omp_dim): New struct type for use inside
401 c_parser_omp_variable_list.
402 (c_parser_omp_variable_list): Allow multiple levels of array and
403 component accesses in array section base-pointer expression.
404 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
405 c_parser_omp_var_list_parens.
406 (c_parser_omp_clause_from): Likewise.
407 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
408 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
409 POINTER_PLUS_EXPR.
410 (c_finish_omp_clauses): Extend allowed ranged of expressions
411 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
412
4132021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
414
415 PR middle-end/92120
416 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
417 call to c_parser_omp_variable_list to 'true'.
418 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
419 array base handling.
420 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
421
c177e806
GA
4222021-11-30 Thomas Schwinge <thomas@codesourcery.com>
423
424 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
425 orphan loop" checking.
426
4272021-11-30 Cesar Philippidis <cesar@codesourcery.com>
428 Thomas Schwinge <thomas@codesourcery.com>
429
430 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
431 OpenACC gang reductions.
432
4332021-11-30 Richard Biener <rguenther@suse.de>
434
435 * gimple-parser.c (c_parser_gimple_postfix_expression):
436 avoid unreachable code after break.
437
87cd82c8
GA
4382021-11-29 Eric Gallager <egallager@gcc.gnu.org>
439
440 PR other/103021
441 * Make-lang.in: Use ETAGS variable in TAGS target.
442
4432021-11-29 Richard Biener <rguenther@suse.de>
444
445 * c-typeck.c (c_tree_equal): Remove unreachable return.
446 * c-parser.c (get_matching_symbol): Likewise.
447
e1d43592
GA
4482021-11-23 Jakub Jelinek <jakub@redhat.com>
449
450 * c-typeck.c (c_clone_omp_udr): Don't initialize
451 id.transform_lang_insert_block.
452
9c077398
GA
4532021-11-19 Martin Sebor <msebor@redhat.com>
454
455 PR c++/33925
456 PR c/102867
457 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
458 code resulting from macro expansion.
459
4602021-11-19 Martin Liska <mliska@suse.cz>
461
462 Revert:
463 2021-11-19 Martin Liska <mliska@suse.cz>
464
465 * c-parser.c (add_debug_begin_stmt): Use option directly.
466
483092d3
GA
4672021-11-18 Matthias Kretz <m.kretz@gsi.de>
468
469 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
470 * c-parser.c (c_parser_postfix_expression): Likewise.
471
4722021-11-18 Martin Liska <mliska@suse.cz>
473
474 * c-parser.c (add_debug_begin_stmt): Use option directly.
475
280d2838
GA
4762021-11-17 Martin Sebor <msebor@redhat.com>
477
478 PR c/101702
479 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
480 bounds before deciding if they're constant.
481
e2b57363
GA
4822021-11-15 Jakub Jelinek <jakub@redhat.com>
483
484 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
485 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
486
b39265d4
GA
4872021-11-11 Jakub Jelinek <jakub@redhat.com>
488
489 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
490 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
491 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
492 OMP_CLAUSE_NUM_TEAMS_EXPR.
493 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
494 combined target teams even lower-bound expression.
495
4962021-11-11 Richard Biener <rguenther@suse.de>
497
498 * gimple-parser.c: Shuffle bitmap.h include.
499
18ae471f
GA
5002021-11-03 Joseph Myers <joseph@codesourcery.com>
501
502 PR c/103031
503 * c-convert.c (c_convert): New function, based on convert.
504 (convert): Make into wrapper of c_convert.
505 (convert_init): New function.
506 * c-typeck.c (enum impl_conv): Add ic_init_const.
507 (convert_for_assignment): Handle ic_init_const like ic_init. Add
508 new argument to convert_and_check call.
509 (digest_init): Pass ic_init_const to convert_for_assignment for
510 initializers required to be constant.
511
b4df2dd3
GA
5122021-11-02 Richard Sandiford <richard.sandiford@arm.com>
513
514 * c-tree.h (c_simulate_record_decl): Declare.
515 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
516 * c-decl.c (c_simulate_record_decl): New function.
517
c2bd5d8a
GA
5182021-10-22 Eric Gallager <egallager@gcc.gnu.org>
519
520 PR other/102663
521 * Make-lang.in: Add dummy c.install-dvi target.
522
93d183a5
GA
5232021-10-15 Richard Biener <rguenther@suse.de>
524
525 PR c/102763
526 * gimple-parser.c
527 (c_parser_gimple_postfix_expression_after_primary): Check
528 for a pointer do be dereferenced by ->.
529
5d5885c9
GA
5302021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
531
532 * c-parser.c (c_finish_omp_declare_variant): Change call from
533 c_omp_check_context_selector to omp_check_context_selector. Change
534 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
535
c9db17b8
GA
5362021-10-09 Jakub Jelinek <jakub@redhat.com>
537
538 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
539 (c_parser_omp_scan_loop_body): Use it.
540 (c_parser_omp_sections_scope): Likewise.
541
50e20ee6
GA
5422021-10-07 Richard Biener <rguenther@suse.de>
543
544 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
545
bb6194e0
GA
5462021-10-05 Richard Biener <rguenther@suse.de>
547
548 PR c/102605
549 * gimple-parser.c (c_parser_gimple_postfix_expression):
550 Accept more address _Literals.
551
da9c5f78
GA
5522021-10-04 Marek Polacek <polacek@redhat.com>
553
554 PR c++/97573
555 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
556
9d116bcc
GA
5572021-10-01 Martin Sebor <msebor@redhat.com>
558
559 PR c/102103
560 * c-typeck.c (maybe_warn_for_null_address): New function.
561 (build_binary_op): Call it.
562
5632021-10-01 Jakub Jelinek <jakub@redhat.com>
564 Richard Biener <rguenther@suse.de>
565
566 PR sanitizer/102515
567 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
568 for division even for SANITIZE_SI_OVERFLOW.
569
5702021-10-01 Jakub Jelinek <jakub@redhat.com>
571
572 * c-parser.c (c_parser_omp_clause_order): Set
573 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
574
fd133479
GA
5752021-09-28 Andrew Pinski <apinski@marvell.com>
576
577 PR c/32122
578 * c-parser.c (c_parser_statement_after_labels): Pass
579 the c_expr instead of the tree to c_finish_goto_ptr.
580 * c-typeck.c (c_finish_goto_ptr): Change the second
581 argument type to c_expr.
582 * c-tree.h (c_finish_goto_ptr): Likewise.
583 Error out if the expression was not of a pointer type.
584
e4777439
GA
5852021-09-22 Jakub Jelinek <jakub@redhat.com>
586
587 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
588 modifiers.
589
cf74e7b5
GA
5902021-09-18 Jakub Jelinek <jakub@redhat.com>
591
592 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
593 and reproducible modifiers.
594 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
595
5962021-09-18 Jakub Jelinek <jakub@redhat.com>
597
598 * c-parser.c (c_parser_omp_clause_default): Handle private and
599 firstprivate arguments, adjust diagnostics on unknown argument.
600
0a4cb439
GA
6012021-09-17 Jakub Jelinek <jakub@redhat.com>
602
603 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
604 is true.
605
a26206ec
GA
6062021-09-10 Jakub Jelinek <jakub@redhat.com>
607
608 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
609 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
610 don't call build_conditional_expr, instead build a COND_EXPR directly.
611 (c_parser_binary_expression): Avoid calling parser_build_binary_op
612 if omp_atomic_lhs even in more cases for >, < or ==.
613 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
614 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
615 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
616 * c-typeck.c (build_binary_op): For flag_openmp only handle
617 MIN_EXPR/MAX_EXPR.
618
b2748138
GA
6192021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
620
621 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
622 directive.
623
e11c6046
GA
6242021-09-01 Iain Sandoe <iain@sandoe.co.uk>
625
626 * c-decl.c (enum deprecated_states): Add unavailable state.
627 (merge_decls): Copy unavailability.
628 (quals_from_declspecs): Handle unavailable case.
629 (start_decl): Amend the logic handling suppression of nested
630 deprecation states to include unavailability.
631 (smallest_type_quals_location): Amend comment.
632 (grokdeclarator): Handle the unavailable deprecation state.
633 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
634 * c-tree.h (struct c_declspecs): Add unavailable_p.
635 * c-typeck.c (build_component_ref): Handle unavailability.
636 (build_external_ref): Likewise.
637
6382021-09-01 Roger Sayle <roger@nextmovesoftware.com>
639 Joseph Myers <joseph@codesourcery.com>
640
641 PR c/79412
642 * c-decl.c (duplicate_decls): On significant mismatches, mark the
643 types of both (non-function) decls as error_mark_node, so that the
644 middle-end can see the code is malformed.
645 (free_attr_access_data): Don't process if the type has been set to
646 error_mark_node.
647
6d51ee43
GA
6482021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
649
650 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
651 and 'ancestor' in 'target device' clauses.
652
38b19c5b
GA
6532021-08-23 Jakub Jelinek <jakub@redhat.com>
654
655 * c-parser.c (c_parser_omp_clause_num_tasks,
656 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
657
5b2876f9
GA
6582021-08-22 Martin Uecker <muecker@gwdg.de>
659
660 PR c/98397
661 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
662 for pointers to arrays with qualifiers.
663 (build_conditional_expr): For C23 don't lose qualifiers for pointers
664 to arrays when the other pointer is a void pointer. Update warnings.
665 (convert_for_assignment): Update warnings for C2X when converting from
666 void* with qualifiers to a pointer to array with the same qualifiers.
667
7c9e1645
GA
6682021-08-20 Jakub Jelinek <jakub@redhat.com>
669
670 * c-parser.c (c_parser_omp_error): New function.
671 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
672
6732021-08-20 Jakub Jelinek <jakub@redhat.com>
674
675 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
676 comma at the end of list.
677 (c_parser_omp_requires): Likewise.
678
b57fba5e
GA
6792021-08-19 Jakub Jelinek <jakub@redhat.com>
680
681 * c-parser.c (c_parser_omp_requires): Don't call
682 c_parser_peek_2nd_token and optionally consume token if current
683 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
684
6e529985
GA
6852021-08-18 Jakub Jelinek <jakub@redhat.com>
686
687 * c-parser.c (c_parser_omp_nothing): New function.
688 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
689
6902021-08-18 Jakub Jelinek <jakub@redhat.com>
691
692 * c-parser.c (c_parser_statement_after_labels): Add restart label
693 near the start of the function. If c_parser_pragma returns false,
694 goto restart.
695 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
696 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
697 return what c_parser_omp_declare returned. Return true instead of
698 false after emitting errors that the directive is not allowed in
699 pragma_stmt context.
700 (c_parser_omp_ordered): Return true instead of
701 false after emitting errors that the directive is not allowed in
702 pragma_stmt context.
703 (c_parser_omp_target_update): Likewise.
704 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
705 Change return type from tree to bool, return false if the
706 directive should be ignored in pragma_stmt contexts.
707 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
708 return their result directly.
709 (c_parser_omp_cancellation_point): Change return type from void to
710 bool, return false if the directive should be ignored in pragma_stmt
711 contexts.
712 (c_parser_omp_declare): Likewise.
713
2d14d64b
GA
7142021-08-17 Jakub Jelinek <jakub@redhat.com>
715
716 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
717 (c_parser_omp_scope): New function.
718 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
719
72be20e2
GA
7202021-08-12 Jakub Jelinek <jakub@redhat.com>
721
722 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
723 (c_parser_omp_clause_filter): New function.
724 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
725 (OMP_MASKED_CLAUSE_MASK): Define.
726 (c_parser_omp_masked): New function.
727 (c_parser_omp_parallel): Handle parallel masked.
728 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
729 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
730
7312021-08-12 Martin Uecker <muecker@gwdg.de>
732
733 PR c/101838
734 PR c/29970
735 * c-typeck.c (c_expr_sizeof_type): Evaluate
736 size expressions for structs of variable size.
737
7382021-08-12 Tobias Burnus <tobias@codesourcery.com>
739
740 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
741 'primary' as alias for 'master'.
742
3ae564ea
GA
7432021-08-10 Martin Uecker <muecker@gwdg.de>
744
745 PR c/29970
746 * c-typeck.c (c_expr_sizeof_expr): Evaluate
747 size expressions for structs of variable size.
748
f92f4778
GA
7492021-08-06 Tamar Christina <tamar.christina@arm.com>
750
751 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
752 * c-tree.h (c_simulate_enum_decl): Likewise.
753
7542021-08-06 Martin Sebor <msebor@redhat.com>
755
756 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
757 vec arguments to by-reference.
758 (c_finish_omp_declare_simd): Same.
759 (c_parser_compound_statement_nostart): Same.
760 (c_parser_for_statement): Same.
761 (c_parser_objc_methodprotolist): Same.
762 (c_parser_oacc_routine): Same.
763 (c_parser_omp_for_loop): Same.
764 (c_parser_omp_declare_simd): Same.
765
419c6c68
GA
7662021-07-21 Thomas Schwinge <thomas@codesourcery.com>
767 Joseph Myers <joseph@codesourcery.com>
768 Cesar Philippidis <cesar@codesourcery.com>
769
770 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
771 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
772 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
773 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
774
92d45509
GA
7752021-07-20 Martin Sebor <msebor@redhat.com>
776
777 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
778 by-const-reference.
779 * c-typeck.c (c_build_function_call_vec): Same.
780
d97d71a1
GA
7812021-07-15 Martin Sebor <msebor@redhat.com>
782
783 PR c/101289
784 PR c/97548
785 * c-decl.c (get_parm_array_spec): Strip nops.
786
6fba0eea
GA
7872021-07-06 Martin Sebor <msebor@redhat.com>
788
789 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
790
7a60a6e8
GA
7912021-07-02 Jakub Jelinek <jakub@redhat.com>
792
793 PR c/101297
794 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
795 appears before a CPP_NAME.
796
90708f87
GA
7972021-06-25 Martin Sebor <msebor@redhat.com>
798
799 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
800 warning_suppressed_p, suppress_warning, and copy_no_warning.
801 (diagnose_mismatched_decls): Same.
802 (duplicate_decls): Same.
803 (grokdeclarator): Same.
804 (finish_function): Same.
805 (c_write_global_declarations_1): Same.
806 * c-fold.c (c_fully_fold_internal): Same.
807 * c-parser.c (c_parser_expr_no_commas): Same.
808 (c_parser_postfix_expression): Same.
809 * c-typeck.c (array_to_pointer_conversion): Same.
810 (function_to_pointer_conversion): Same.
811 (default_function_array_conversion): Same.
812 (convert_lvalue_to_rvalue): Same.
813 (default_conversion): Same.
814 (build_indirect_ref): Same.
815 (build_function_call_vec): Same.
816 (build_atomic_assign): Same.
817 (build_unary_op): Same.
818 (c_finish_return): Same.
819 (emit_side_effect_warnings): Same.
820 (c_finish_stmt_expr): Same.
821 (c_omp_clause_copy_ctor): Same.
822
9aa8327e
GA
8232021-06-24 Jakub Jelinek <jakub@redhat.com>
824
825 PR c/101176
826 * c-parser.c (c_parser_has_attribute_expression): Set source range for
827 the result.
828
8292021-06-24 Jakub Jelinek <jakub@redhat.com>
830
831 PR c/101171
832 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
833 error_mark_node.
834
8352021-06-24 Jakub Jelinek <jakub@redhat.com>
836
837 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
838 C_ORT_OMP for clauses on target construct.
839 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
840 (c_parser_omp_target): For non-combined target add
841 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
842 C_ORT_OMP_TARGET to c_finish_omp_clauses.
843 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
844 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
845 never present on C_ORT_*DECLARE_SIMD.
846 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
847 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
848 corresponding map clauses.
849
2f080224
GA
8502021-06-21 Jakub Jelinek <jakub@redhat.com>
851
852 PR inline-asm/100785
853 * c-typeck.c (c_mark_addressable): Diagnose trying to make
854 bit-fields addressable.
855
ede6c356
GA
8562021-06-15 Robin Dapp <rdapp@linux.ibm.com>
857
858 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
859 similar.
860
8dc48181
GA
8612021-06-14 Tobias Burnus <tobias@codesourcery.com>
862
863 PR c/100913
864 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
865 var in the error case.
866
438aac59
GA
8672021-06-07 Eric Botcazou <ebotcazou@adacore.com>
868
869 PR c/100920
870 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
871 spot built-in functions.
872
7d6987e9
GA
8732021-06-06 Jakub Jelinek <jakub@redhat.com>
874
875 PR c/100902
876 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
877 even when target is combined with other constructs.
878
8792021-06-06 Eric Botcazou <ebotcazou@adacore.com>
880
881 PR c/100920
882 * c-decl.c (finish_struct): Fix thinko in previous change.
883 * c-typeck.c (convert_for_assignment): Do not warn on pointer
884 assignment and initialization for storage order purposes if the
885 RHS is a call to a DECL_IS_MALLOC function.
886
600f90cb
GA
8872021-06-04 Martin Sebor <msebor@redhat.com>
888
889 PR c/100783
890 * c-objc-common.c (print_type): Handle erroneous types.
891
440c8a0a
GA
8922021-06-03 Jakub Jelinek <jakub@redhat.com>
893
894 PR c++/100859
895 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
896 after depend only cases.
897
ee682192
GA
8982021-05-31 Richard Biener <rguenther@suse.de>
899
900 PR c++/88601
901 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
902 * c-parser.c (c_parser_postfix_expression): Likewise.
903
48166757
GA
9042021-05-28 Richard Biener <rguenther@suse.de>
905
906 PR c/100803
907 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
908 invalid if conditions.
909
9102021-05-28 Jakub Jelinek <jakub@redhat.com>
911
912 PR middle-end/99928
913 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
914 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
915 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
916 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
917 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
918 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
919 if present in map_head, map_field_head or map_firstprivate_head
920 bitmaps.
921
9222021-05-28 Tobias Burnus <tobias@codesourcery.com>
923
924 * c-parser.c (c_parser_omp_clause_affinity): New.
925 (c_parser_omp_clause_name, c_parser_omp_variable_list,
926 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
927 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
928 c_finish_omp_clauses): Likewise.
929
01c59ef2
GA
9302021-05-26 Eric Botcazou <ebotcazou@adacore.com>
931
932 PR c/100653
933 * c-decl.c (finish_struct): Warn for a union containing an aggregate
934 field with a differing scalar storage order.
935
2832d51b
GA
9362021-05-21 Jakub Jelinek <jakub@redhat.com>
937
938 PR middle-end/99928
939 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
940 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
941 if a decl is mentioned both in map clause and in such firstprivate
942 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
943
65f32e5d
GA
9442021-05-19 Jakub Jelinek <jakub@redhat.com>
945
946 PR middle-end/99928
947 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
948 master when combined with taskloop.
949 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
950 parallel master when not combined with taskloop.
951
a8daf9a1
GA
9522021-05-18 Richard Biener <rguenther@suse.de>
953
954 PR c/100522
955 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
956 Diagnose calls to non-functions.
957 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
958
a7ffc1ef
GA
9592021-05-17 Richard Biener <rguenther@suse.de>
960
961 PR c/100625
962 * gimple-parser.c (c_parser_gimple_label): Avoid building
963 a GIMPLE label with NULL label decl.
964
f9af11c7
GA
9652021-05-13 Martin Sebor <msebor@redhat.com>
966
967 PR c/100550
968 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
969
0ff3a0f2
GA
9702021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
971
972 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
973 'close'.
974
aa891c56
GA
9752021-05-10 Martin Liska <mliska@suse.cz>
976
977 * c-aux-info.c (affix_data_type): Use startswith
978 function instead of strncmp.
979 * c-typeck.c (build_function_call_vec): Likewise.
980 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
981
62d87a32
GA
9822021-05-07 Eric Botcazou <ebotcazou@adacore.com>
983
984 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
985 on the address of a pointer field in a record with reverse SSO.
986
99e8df7a
GA
9872021-05-04 Tobias Burnus <tobias@codesourcery.com>
988
989 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
990 for || and && reductions.
991
3c8e539d
GA
9922021-04-29 Joseph Myers <joseph@codesourcery.com>
993
994 * c-typeck.c (function_types_compatible_p): For C2X, treat
995 unprototyped function as compatible with non-variadic prototyped
996 function even if some argument types are changed by the default
997 argument promotions.
998
ee351f7f
GA
9992021-04-15 Martin Sebor <msebor@redhat.com>
1000
1001 PR c/99420
1002 PR c/99972
1003 * c-decl.c (pushdecl): Always propagate type attribute.
1004
10052021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1006
1007 PR c/98852
1008 * c-typeck.c (c_common_type): Do not drop attributes that
1009 affect type identity.
1010
1d54b138
GA
10112021-04-10 Jakub Jelinek <jakub@redhat.com>
1012
1013 PR c/99990
1014 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
1015 error_mark_node.
1016
4493b1c1
GA
10172021-03-25 Jakub Jelinek <jakub@redhat.com>
1018
1019 PR c++/99565
1020 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
1021 to operand_equal_p.
1022
5f256a70
GA
10232021-03-19 Jakub Jelinek <jakub@redhat.com>
1024
1025 PR c/99588
1026 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
1027 with modifycode NOP_EXPR produces and mark the _Atomic var as read
1028 if found.
1029 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
1030 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
1031 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
1032
3c5b6d24
GA
10332021-03-15 Tobias Burnus <tobias@codesourcery.com>
1034
1035 PR c++/99509
1036 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
1037 ensure that the varpool node is marked as offloadable.
1038
ceae9533
GA
10392021-03-05 Tobias Burnus <tobias@codesourcery.com>
1040
1041 PR c/99137
1042 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
1043
4028d01a
GA
10442021-02-24 Martin Sebor <msebor@redhat.com>
1045
1046 PR middle-end/97172
1047 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
1048
bf81237e
GA
10492021-02-18 Jakub Jelinek <jakub@redhat.com>
1050
1051 PR c/99136
1052 * c-typeck.c (c_finish_return): Don't wrap retval into
1053 EXCESS_PRECISION_EXPR in functions that return void.
1054
0c5cdb31
GA
10552021-02-11 Marek Polacek <polacek@redhat.com>
1056
1057 * c-parser.c (c_parser_if_statement): Use vec_free.
1058
a19dd5e6
GA
10592021-02-04 Martin Sebor <msebor@redhat.com>
1060
1061 PR c/97882
1062 * c-decl.c (locate_old_decl): Add type to diagnostic output.
1063 (diagnose_mismatched_decls): Same.
1064 (start_function): Introduce temporaries for better readability.
1065 * c-typeck.c (comptypes_internal): Only consider complete enum
1066 types in comparisons with integers.
1067
f7884fb1
GA
10682021-02-01 Martin Sebor <msebor@redhat.com>
1069
1070 PR middle-end/97172
1071 * c-decl.c (free_attr_access_data): New function.
1072 (c_parse_final_cleanups): Call free_attr_access_data.
1073
59cf67d1
GA
10742021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1075
1076 * c-parser.c (c_parser_omp_clause_detach): New.
1077 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
1078 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
1079 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
1080 clause. Prevent use of detach with mergeable and overriding the
1081 data sharing mode of the event handle.
1082
2f7f0d32
GA
10832021-01-15 Jakub Jelinek <jakub@redhat.com>
1084
1085 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
1086 unqualified element type and then call c_build_qualified_type on the
1087 ARRAY_TYPE.
1088
7d187e4f
GA
10892021-01-07 Richard Biener <rguenther@suse.de>
1090
1091 * gimple-parser.c (c_parser_gimple_compound_statement): Only
1092 reallocate loop array if it is too small.
1093
eefe499f
GA
10942020-12-16 Martin Uecker <muecker@gwdg.de>
1095
1096 PR c/98047
1097 * c-typeck.c (build_modify_expr): Drop qualifiers.
1098
10992020-12-16 Martin Uecker <muecker@gwdg.de>
1100
1101 PR c/98260
1102 * c-parser.c (c_parser_expression): Look into
1103 nop expression when marking expressions as read.
1104
d52945ce
GA
11052020-12-14 Martin Liska <mliska@suse.cz>
1106
1107 PR sanitizer/98204
1108 * c-typeck.c (pointer_diff): Do not emit a top-level
1109 sanitization.
1110 (build_binary_op): Likewise.
1111
ca2bd949
GA
11122020-12-09 Tobias Burnus <tobias@codesourcery.com>
1113
1114 * c-parser.c (c_parser_omp_allocate): New.
1115 (c_parser_omp_construct): Call it.
1116
11172020-12-09 Richard Biener <rguenther@suse.de>
1118
1119 PR c/98200
1120 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
1121 early on error.
1122
bc8a7013
GA
11232020-12-07 Martin Uecker <muecker@gwdg.de>
1124
1125 PR c/97981
1126 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
1127 that drops qualifiers to the end of the function.
1128
d48df6f2
GA
11292020-11-26 Martin Uecker <muecker@gwdg.de>
1130
1131 PR c/65455
1132 PR c/92935
1133 * c-parser.c (c_parser_declaration_or_fndef): Remove
1134 redundant code to drop qualifiers of _Atomic types for __auto_type.
1135 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
1136 types for __typeof__.
1137
1e2c9a27
GA
11382020-11-24 Jakub Jelinek <jakub@redhat.com>
1139
1140 PR c/97958
1141 * c-parser.c (c_parser_binary_expression): For omp atomic binary
1142 expressions, use make_node instead of build2 to avoid checking build2
1143 performs.
1144
8e6198d0
GA
11452020-11-23 Joseph Myers <joseph@codesourcery.com>
1146
1147 PR c/95630
1148 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
1149 for comparisons of complete and incomplete pointers.
1150
7a97e2fc
GA
11512020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1152
1153 * c-aux-info.c (gen_type): Support opaque types.
1154
82e5048e
GA
11552020-11-20 Martin Sebor <msebor@redhat.com>
1156
1157 PR middle-end/97879
1158 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
1159
11602020-11-20 Jakub Jelinek <jakub@redhat.com>
1161
1162 PR other/97911
1163 * Make-lang.in (c.serial): Change from goal to a variable.
1164 (.PHONY): Drop c.serial.
1165
11662020-11-20 Martin Uecker <muecker@gwdg.de>
1167
1168 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
1169
d62586ee
GA
11702020-11-19 Jakub Jelinek <jakub@redhat.com>
1171
1172 PR c/97860
1173 * c-decl.c (get_parm_array_spec): Bail out of nelts is
1174 error_operand_p.
1175
25bb75f8
GA
11762020-11-18 Jakub Jelinek <jakub@redhat.com>
1177
1178 * Make-lang.in (c.serial): New goal.
1179 (.PHONY): Add c.serial c.prev.
1180 (cc1$(exeext)): Call LINK_PROGRESS.
1181
77f67db2
GA
11822020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1183
1184 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1185 goto too.
1186 * c-typeck.c (build_asm_expr): Remove an assert checking output
1187 absence for asm goto.
1188
11892020-11-13 Jakub Jelinek <jakub@redhat.com>
1190
1191 * c-typeck.c (c_finish_omp_clauses): Don't clear
1192 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1193
11942020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1195
1196 PR objc/77404
1197 * c-parser.c (c_parser_objc_class_definition): Pass the
1198 location of the class name to the interface declaration.
1199
bb622641
GA
12002020-11-10 Strager Neds <strager.nds@gmail.com>
1201
1202 * c-decl.c (merge_decls): Use new overload of
1203 set_decl_section_name.
1204
12052020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1206
1207 * c-parser.c (c_parser_omp_target_data): Add use of
1208 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1209 handled map clause kind.
1210 (c_parser_omp_target_enter_data): Likewise.
1211 (c_parser_omp_target_exit_data): Likewise.
1212 (c_parser_omp_target): Likewise.
1213 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1214 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1215 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1216 same struct field access to co-exist on OpenMP construct.
1217
2da7ee05
GA
12182020-11-07 Martin Uecker <muecker@gwdg.de>
1219
1220 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1221 (c_parser_all_labels): Likewise.
1222
44cab2d8
GA
12232020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1224
1225 * c-parser.c (c_parser_objc_at_property_declaration):
1226 Improve parsing fidelity. Associate better location info
1227 with @property attributes. Clean up the interface to
1228 objc_add_property_declaration ().
1229
12302020-11-06 Nathan Sidwell <nathan@acm.org>
1231
1232 * c-decl.c (diagnose_mismatched_decls): Rename
1233 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1234 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1235 (collect_source_refs): Likewise.
1236 * c-typeck.c (inform_declaration, inform_for_arg)
1237 (convert_for_assignment): Likewise.
1238
12392020-11-06 Tobias Burnus <tobias@codesourcery.com>
1240
1241 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1242 OpenACC matching.
1243 (c_parser_omp_construct): Update call.
1244
35c125cb
GA
12452020-11-04 Jakub Jelinek <jakub@redhat.com>
1246
1247 PR c++/97670
1248 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1249 find underlying decl to clear in the aligned_head bitmap.
1250
12512020-11-04 Joseph Myers <joseph@codesourcery.com>
1252
1253 * c-decl.c (handle_nodiscard_attribute): New.
1254 (std_attribute_table): Add nodiscard.
1255 * c-parser.c (c_parser_std_attribute): Expect argument to
1256 nodiscard attribute to be a string. Do not special-case ignoring
1257 nodiscard.
1258 * c-typeck.c (maybe_warn_nodiscard): New.
1259 (build_compound_expr, emit_side_effect_warnings): Call
1260 maybe_warn_nodiscard.
1261 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1262 emit_side_effect_warnings if warn_unused_result.
1263
4f0606fe
GA
12642020-10-29 Asher Gordon <AsDaGo@posteo.net>
1265
1266 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1267 with XDELETE.
1268 (finish_init): Likewise.
1269 (pop_init_level): Likewise.
1270
e93aae4a
GA
12712020-10-28 Joseph Myers <joseph@codesourcery.com>
1272
1273 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1274 error_at for omitted parameter name.
1275
12762020-10-28 Jakub Jelinek <jakub@redhat.com>
1277
1278 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1279 (c_parser_omp_clause_allocate): New function.
1280 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1281 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1282 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1283 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1284 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1285 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1286 PRAGMA_OMP_CLAUSE_ALLOCATE.
1287 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1288
89bb01e7
GA
12892020-10-27 Joseph Myers <joseph@codesourcery.com>
1290
1291 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1292 standard attributes.
1293
efe71fcc
GA
12942020-10-23 Marek Polacek <polacek@redhat.com>
1295
1296 PR c++/91741
1297 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1298 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1299 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1300 * c-tree.h (char_type_p): Declare.
1301 * c-typeck.c (char_type_p): No longer static.
1302
13032020-10-23 Martin Sebor <msebor@redhat.com>
1304
1305 PR middle-end/97552
1306 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1307
2fe5b7d1
GA
13082020-09-19 Martin Sebor <msebor@redhat.com>
1309
1310 PR c/50584
1311 * c-decl.c (lookup_last_decl): Define new function.
1312 (c_decl_attributes): Call it.
1313 (start_decl): Add argument and use it.
1314 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1315 (get_parm_array_spec): Define new function.
1316 (push_parm_decl): Call get_parm_array_spec.
1317 (start_function): Call warn_parm_array_mismatch. Build attribute
1318 access and add it to current function.
1319 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1320 in forms of array parameters.
1321 * c-tree.h (start_decl): Add argument.
1322
13232020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1324
1325 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1326 with...
1327 (in_statement): New.
1328 (start_function): Adjust for above change.
1329 (c_push_function_context, c_pop_function_context): Likewise.
1330 * c-lang.h (struct language_function): Likewise.
1331 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1332 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1333 New.
1334 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1335 (c_parser_switch_statement): Adjust break/switch context handling
1336 and calls to renamed functions.
1337 (c_parser_while_statement): Adjust break/switch context handling and
1338 build a WHILE_STMT.
1339 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1340 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1341 (c_parser_omp_for_loop): Adjust break/switch context handling.
1342 * c-tree.h (c_break_label, c_cont_label): Delete.
1343 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1344 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1345 (in_statement, switch_statement_break_seen_p): Declare.
1346 (c_start_case, c_finish_case): Renamed to...
1347 (c_start_switch, c_finish_switch).
1348 (c_finish_bc_stmt): Adjust arguments.
1349 * c-typeck.c (build_function_call_vec): Don't try to print
1350 statements with %qE format.
1351 (struct c_switch): Rename switch_expr field to switch_stmt.
1352 Add break_stmt_seen_p field.
1353 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1354 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1355 (do_case): Update for changes to struct c_switch.
1356 (c_finish_case): Rename to c_finish_switch. Update for changes to
1357 struct c_switch and change of representation from SWITCH_EXPR to
1358 SWITCH_STMT.
1359 (c_finish_loop): Delete.
1360 (c_finish_bc_stmt): Update to reflect changes to break/continue
1361 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1362 of a GOTO_EXPR except for objc foreach loops.
1363
e1a4a8a0
GA
13642020-09-01 Jakub Jelinek <jakub@redhat.com>
1365
1366 PR c++/96867
1367 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1368 only on PARM_DECLs.
1369
8f7ea26a
GA
13702020-08-28 Martin Sebor <msebor@redhat.com>
1371
1372 PR c/96596
1373 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1374 argument type.
1375
8b394f01
GA
13762020-08-27 Martin Liska <mliska@suse.cz>
1377
1378 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1379 growth function to true.
1380
db0f6efe
GA
13812020-08-25 Tobias Burnus <tobias@codesourcery.com>
1382
1383 PR c/96678
1384 * c-typeck.c (handle_omp_array_sections_1): Talk about
1385 array function parameter in the error message.
1386
5c265693
GA
13872020-08-18 Jakub Jelinek <jakub@redhat.com>
1388
1389 PR c/96571
1390 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1391 to int, holding index of the match. Call mark_exp_read on the selector
1392 expression and on expressions other than the selected one.
1393
4967ca2f
GA
13942020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1395
1396 PR c/96377
1397 * c-typeck.c (process_init_element): Split test for whether to
1398 recurse into a record, union or array into...
1399 (initialize_elementwise_p): ...this new function. Don't recurse
1400 into a vector type if the initialization value is also a vector.
1401
48cc2e46
GA
14022020-07-31 Richard Biener <rguenther@suse.de>
1403
1404 PR debug/96383
1405 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1406 Define to c_common_finalize_early_debug.
1407
3ea9abca
GA
14082020-07-22 Tobias Burnus <tobias@codesourcery.com>
1409
1410 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1411 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1412 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1413
30430061
GA
14142020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1415
1416 PR target/95237
1417 * c-decl.c (finish_decl): Call target hook
1418 lower_local_decl_alignment to lower local decl alignment.
1419
3f8ca9cb
GA
14202020-07-09 Julian Brown <julian@codesourcery.com>
1421 Thomas Schwinge <thomas@codesourcery.com>
1422
1423 PR middle-end/95270
1424 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1425 for standalone attach/detach clauses.
1426
a82c4c4c 14272020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1428
1429 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1430 set, warn for conversion between pointers that point to incompatible
1431 scalar storage orders.
1432
f60ee68d
GA
14332020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1434
1435 * c-parser.c (c_parser_statement_after_labels): Pass correct
1436 parameters to c_parser_do_statement.
1437
56638b9b
GA
14382020-06-16 Jakub Jelinek <jakub@redhat.com>
1439
1440 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1441 c_in_omp_for.
1442 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1443 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1444 c_finish_omp_for.
1445 * c-tree.h (c_in_omp_for): Declare.
1446 * c-typeck.c (c_in_omp_for): Define.
1447 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1448 (digest_init): Likewise.
1449 (build_binary_op): Likewise.
1450
14512020-06-16 Jakub Jelinek <jakub@redhat.com>
1452
1453 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1454 from kind by comma rather than colon.
1455
1a59f3db
GA
14562020-06-05 Mark Wielaard <mark@klomp.org>
1457
1458 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1459 an undeclared builtin, then add a fixit header hint, if found.
1460 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1461 warning_at about implicit builtin declaration type mismatch.
1462
9a5b7438
GA
14632020-06-03 Mark Wielaard <mark@klomp.org>
1464
1465 * c-parser.c (struct c_parser): Add seen_string_literal
1466 bitfield.
1467 (c_parser_consume_token): Reset seen_string_literal.
1468 (c_parser_error_richloc): Add name_hint if seen_string_literal
1469 and next token is a CPP_NAME and we have a missing header
1470 suggestion for the name.
1471 (c_parser_string_literal): Set seen_string_literal.
1472
14732020-06-03 Mark Wielaard <mark@klomp.org>
1474
1475 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1476 scope with matching_parens after CPP_OPEN_PAREN.
1477
14782020-06-03 Tobias Burnus <tobias@codesourcery.com>
1479
1480 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1481
53ffb43a
GA
14822020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1483
1484 * Make-lang.in: Remove extra slash.
1485
8f66f175
ML
14862020-05-19 Martin Liska <mliska@suse.cz>
1487
1488 * c-parser.c: Fix typo.
1489
49ddde69
JJ
14902020-05-14 Jakub Jelinek <jakub@redhat.com>
1491
1492 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1493
eb72dc66
RB
14942020-05-07 Richard Biener <rguenther@suse.de>
1495
1496 PR middle-end/94703
1497 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1498 DECL_GIMPLE_REG_P.
1499
bf915591
JJ
15002020-04-30 Jakub Jelinek <jakub@redhat.com>
1501
1502 PR c/94842
1503 * c-decl.c (set_labels_context_r): In addition to context-less
1504 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1505 parent function if any.
1506 (store_parm_decls): Adjust comment.
1507
e1113ffb
JJ
15082020-04-19 Jakub Jelinek <jakub@redhat.com>
1509
1510 PR objc/94637
1511 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1512 two CPP_COLON tokens.
1513
2e389749
JJ
15142020-04-17 Jakub Jelinek <jakub@redhat.com>
1515
1516 PR other/94629
1517 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1518 to data.clauses.
1519
2dc9294c
JJ
15202020-04-15 Jakub Jelinek <jakub@redhat.com>
1521
1522 PR c/94593
1523 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1524 requires directive when not at file scope.
1525
13e41d8b
TB
15262020-04-08 Tobias Burnus <tobias@codesourcery.com>
1527
1528 PR middle-end/94120
1529 * c-decl.c (c_check_in_current_scope): New function.
1530 * c-tree.h (c_check_in_current_scope): Declare it.
1531 * c-parser.c (c_parser_oacc_declare): Add check that variables
1532 are declared in the same scope as the directive. Fix handling
1533 of namespace vars.
1534
4df50a05
JJ
15352020-04-07 Jakub Jelinek <jakub@redhat.com>
1536
1537 PR c++/94512
1538 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1539 if c_parser_omp_master succeeded.
1540
5db9e893
JJ
15412020-03-23 Jakub Jelinek <jakub@redhat.com>
1542
1543 PR gcov-profile/94029
1544 PR c/94239
1545 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1546 the function_start_locus location. Don't do that afterwards for the
1547 __GIMPLE body parsing.
1548
9def91e9
JJ
15492020-03-19 Jakub Jelinek <jakub@redhat.com>
1550
1551 PR gcov-profile/94029
1552 * c-tree.h (finish_function): Add location_t argument defaulted to
1553 input_location.
1554 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1555 set it to the locus of closing } if non-NULL.
1556 (c_parser_compound_statement_nostart): Return locus of closing }.
1557 (c_parser_parse_rtl_body): Likewise.
1558 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1559 finish_function.
1560 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1561 input_location to set function_end_locus.
1562
046c5890
JJ
15632020-03-17 Jakub Jelinek <jakub@redhat.com>
1564
1565 PR c/94172
1566 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1567 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1568 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1569 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1570 ENUMERAL_TYPEs.
1571 (finish_incomplete_vars): New function, moved from finish_struct. Use
1572 relayout_decl instead of layout_decl.
1573 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1574 being TYPE_VFIELD. Use finish_incomplete_vars.
1575 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1576 finish_incomplete_vars.
1577 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1578 also on ENUMERAL_TYPEs.
1579
c015ff8c
JJ
15802020-03-16 Jakub Jelinek <jakub@redhat.com>
1581
1582 PR c/94179
1583 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1584
f2e9fe5f
MS
15852020-03-13 Martin Sebor <msebor@redhat.com>
1586
1587 PR c/94040
1588 * c-decl.c (builtin_structptr_type_count): New constant.
1589 (match_builtin_function_types): Reject decls that are incompatible
1590 in types pointed to by pointers.
1591 (diagnose_mismatched_decls): Adjust comments.
1592
c9d70946
JM
15932020-03-05 Joseph Myers <joseph@codesourcery.com>
1594
1595 PR c/93577
1596 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1597 empty when initialized type is error_mark_node.
1598 (set_designator, process_init_element): Ignore initializers for
1599 elements of a variable-size type or of error_mark_node.
1600
726e292d
MS
16012020-03-01 Martin Sebor <msebor@redhat.com>
1602
1603 PR middle-end/93926
1604 * c-decl.c (types_close_enough_to_match): New function.
1605 (match_builtin_function_types):
1606 (diagnose_mismatched_decls): Add missing inform call to a warning.
1607
a499c2f8
MS
16082020-03-01 Martin Sebor <msebor@redhat.com>
1609
1610 PR c/93812
1611 * c-typeck.c (build_functype_attribute_variant): New function.
1612 (composite_type): Call it.
1613
9c3da8cc
JJ
16142020-02-25 Jakub Jelinek <jakub@redhat.com>
1615
1616 PR other/93912
1617 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1618 Rename last argument from probablity to probability.
1619
bacdd5e9
JJ
16202020-02-13 Jakub Jelinek <jakub@redhat.com>
1621
1622 PR c/93576
1623 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1624 *expr if it has side effects.
1625
f9eb0973
JL
16262020-01-30 Jeff Law <law@redhat.com>
1627
1628 PR c/88660
1629 * c-parser.c (c_parser_switch_statement): Make sure to request
1630 marking the switch expr as used.
1631
ac68e287
JM
16322020-01-22 Joseph Myers <joseph@codesourcery.com>
1633
1634 PR c/93348
1635 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1636 argument with integer operands.
1637
852f0ae8
KK
16382020-01-16 Kerem Kat <keremkat@gmail.com>
1639
1640 PR c/92833
1641 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1642 to support 4 available tokens.
1643
e2346a33
JM
16442020-01-15 Joseph Myers <joseph@codesourcery.com>
1645
1646 PR c/93072
1647 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1648 determine whether to set DECL_CONTEXT.
1649
3d77686d
JM
16502020-01-13 Joseph Myers <joseph@codesourcery.com>
1651
1652 PR c/93241
1653 * c-typeck.c (build_c_cast): Check for expressions with integer
1654 operands that can occur in an unevaluated part of an integer
1655 constant expression and call note_integer_operands as needed.
1656
f74c4b2c
RB
16572019-01-08 Richard Biener <rguenther@suse.de>
1658
1659 PR middle-end/93199
1660 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1661 permanently.
1662
8d9254fc
JJ
16632020-01-01 Jakub Jelinek <jakub@redhat.com>
1664
1665 Update copyright years.
1666
39292e25
EB
16672019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1668
1669 * c-decl.c (collect_source_ref_cb): Delete.
1670 (for_each_global_decl): Rename into...
1671 (collect_source_refs): ...this. Call collect_source_ref directly.
1672 (c_parse_final_cleanups): Always call collect_source_ref on the main
1673 input filename.
1674
519d7496
JB
16752019-12-19 Julian Brown <julian@codesourcery.com>
1676 Cesar Philippidis <cesar@codesourcery.com>
1677
1678 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1679 detach clauses.
1680 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1681 Allow deref (->) in variable lists if true.
1682 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1683 Pass to c_parser_omp_variable_list.
1684 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1685 call to c_parser_omp_variable_list.
1686 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1687 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1688 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1689 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1690 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1691 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1692 and detach. Support deref.
1693 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1694 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1695 (c_oacc_check_attachments): New function.
1696 (c_finish_omp_clauses): Check attach/detach arguments for being
1697 pointers using above. Support deref.
1698
a6163563
JB
16992019-12-19 Julian Brown <julian@codesourcery.com>
1700 Maciej W. Rozycki <macro@codesourcery.com>
1701 Tobias Burnus <tobias@codesourcery.com>
1702 Thomas Schwinge <thomas@codesourcery.com>
1703
1704 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1705 (c_parser_oacc_data_clause): Likewise.
1706 (c_parser_oacc_all_clauses): Likewise.
1707 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1708 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1709 PRAGMA_OACC_CLAUSE_NO_CREATE.
1710 * c-typeck.c (handle_omp_array_sections): Support
1711 GOMP_MAP_NO_ALLOC.
1712
d68f5d45
DM
17132019-12-09 David Malcolm <dmalcolm@redhat.com>
1714
1715 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1716 Replace label_text ctor calls.
1717
4691bf46
JM
17182019-12-04 Joseph Myers <joseph@codesourcery.com>
1719
1720 PR c/36941
1721 PR c/88827
1722 * c-typeck.c (convert_lvalue_to_rvalue): Call
1723 require_complete_type for arguments not of void types.
1724 (build_indirect_ref): Do not diagnose dereferencing pointers to
1725 incomplete types.
1726 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1727
85d11957
JM
17282019-12-03 Joseph Myers <joseph@codesourcery.com>
1729
1730 PR c/88704
1731 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1732 old-style parameter definitions.
1733
4569f8b3
SL
17342019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1735
1736 PR target/92499
1737
1738 * c-decl.c (flexible_array_type_p): Move to common code.
1739
65ef05d0
RS
17402019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1741
1742 * c-decl.c (start_decl): Allow initialization of variables whose
1743 size is a POLY_INT_CST.
1744 (finish_decl): Use verify_type_context to check whether the target
1745 allows variables with a particular type to have static or thread-local
1746 storage duration. Don't raise a second error if such variables do
1747 not have a constant size.
1748 (grokdeclarator): Use verify_type_context to check whether the
1749 target allows fields or array elements to have a particular type.
1750 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1751 the target allows pointer difference for the types involved.
1752 (build_unary_op): Likewise for pointer increment and decrement.
1753
34b43828
JM
17542019-11-29 Joseph Myers <joseph@codesourcery.com>
1755
1756 * c-parser.c (struct c_parser): Add members raw_tokens and
1757 raw_tokens_used.
1758 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1759 using previously-lexed raw tokens.
1760 (c_parser_peek_nth_token_raw)
1761 (c_parser_check_balanced_raw_token_sequence): New functions.
1762 (c_parser_nth_token_starts_std_attributes): Use
1763 c_parser_check_balanced_raw_token_sequence for Objective-C.
1764
5b8d9367
JM
17652019-11-25 Joseph Myers <joseph@codesourcery.com>
1766
1767 PR c/91985
1768 * c-decl.c (finish_declspecs): Use int instead of decimal
1769 floating-point types if decimal floating-point not supported.
1770
1723e1be
JM
17712019-11-25 Joseph Myers <joseph@codesourcery.com>
1772
1773 * c-tree.h (struct c_declarator): Use a structure for id member.
1774 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1775 declarators at the start, not when handling individual declarators
1776 later. Use u.id.id instead of u.id.
1777 (grokfield): Use u.id.id instead of u.id.
1778 (build_id_declarator): Set u.id.id and u.id.attrs.
1779 (finish_declspecs): Handle postfix attributes in case of typedef
1780 name or typeof used.
1781 * c-parser.c (c_parser_direct_declarator)
1782 (c_parser_direct_declarator_inner): Place declarator for
1783 attributes inside that for function or array, not outside. Set
1784 u.id.attrs for identifiers.
1785 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1786 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1787 instead of u.id.
1788
bdaf8be1
JJ
17892019-11-22 Jakub Jelinek <jakub@redhat.com>
1790
1791 PR c/90677
1792 * c-decl.c (identifier_global_tag): Define.
1793
3e00ba47
RB
17942019-11-20 Richard Biener <rguenther@suse.de>
1795
1796 PR c/92088
1797 * c-decl.c (grokdeclarator): Prevent inlining of nested
1798 function with VLA arguments.
1799
8c5b727a
JM
18002019-11-20 Joseph Myers <joseph@codesourcery.com>
1801
1802 * c-decl.c (c_warn_type_attributes): New function.
1803 (groktypename, grokdeclarator, finish_declspecs): Call
1804 c_warn_type_attributes before applying attributes to types.
1805 * c-tree.h (c_warn_type_attributes): Declare.
1806
192961ff
JM
18072019-11-19 Joseph Myers <joseph@codesourcery.com>
1808
1809 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1810 standard attributes.
1811 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1812 pedwarn for unknown standard attributes and return error_mark_node
1813 for them.
1814
20a38017
MM
18152019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1816
1817 * c-parser.c (c_parser_parse_rtl_body): Always call
1818 run_rtl_passes, even if startwith pass is not provided.
1819
d5fbe5e0
JM
18202019-11-15 Joseph Myers <joseph@codesourcery.com>
1821
1822 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1823 duplicate standard attributes.
1824
97cc1187
JM
18252019-11-15 Joseph Myers <joseph@codesourcery.com>
1826
1827 * c-decl.c (std_attribute_table): Add maybe_unused.
1828
f8aea5e3
JM
18292019-11-15 Joseph Myers <joseph@codesourcery.com>
1830
1831 * c-decl.c (std_attribute_table): Add fallthrough.
1832 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1833 attribute at top level.
1834
2cc94aa8
JM
18352019-11-15 Joseph Myers <joseph@codesourcery.com>
1836
1837 * c-decl.c (std_attribute_table): New.
1838 (c_init_decl_processing): Register attributes from
1839 std_attribute_table.
1840 * c-parser.c (c_parser_attribute_arguments): Add arguments
1841 require_string and allow_empty_args. All callers changed.
1842 (c_parser_std_attribute): Set require_string argument for
1843 "deprecated" attribute.
1844
7c5890cc
JM
18452019-11-14 Joseph Myers <joseph@codesourcery.com>
1846
1847 * c-parser.c (c_parser_postfix_expression)
1848 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1849 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1850
e8738f4e
RS
18512019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1852
1853 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1854 of build_same_sized_truth_vector_type.
1855 (build_vec_cmp): Likewise.
1856
b2417b59
JJ
18572019-11-14 Jakub Jelinek <jakub@redhat.com>
1858
bedb7f04
JJ
1859 * c-parser.c (c_parser_omp_context_selector): Don't require score
1860 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1861 negative score.
1862
b2417b59
JJ
1863 * c-parser.c (c_parser_omp_context_selector): Rename
1864 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1865 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1866 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1867 and string literals.
1868
4e03c3a7
JM
18692019-11-14 Joseph Myers <joseph@codesourcery.com>
1870
1871 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1872 ctsk_tagfirstref_attrs.
1873 (struct c_declspecs): Update description of attrs. Add
1874 postfix_attrs and non_std_attrs_seen_p. Increase size of
1875 typespec_kind bit-field.
1876 (c_warn_unused_attributes): New declaration.
1877 (parser_xref_tag): Update prototype.
1878 * c-decl.c (c_warn_unused_attributes): New function.
1879 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1880 ctsk_tagref_attrs. Handle attribute declarations.
1881 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1882 (grokdeclarator): Handle standard attributes.
1883 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1884 attributes to incomplete type reference.
1885 (xref_tag): Update call to parser_xref_tag.
1886 (declspecs_add_addrspace, declspecs_add_type)
1887 (declspecs_add_scspec, declspecs_add_attrs): Set
1888 non_std_attrs_seen_p.
1889 (finish_declspecs): Apply postfix standard attributes to type.
1890 * c-parser.c (c_token_starts_declspecs)
1891 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1892 (c_parser_next_tokens_start_declaration): Update comments.
1893 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1894 parser->tokens[2] to parser->tokens[1].
1895 (c_parser_nth_token_starts_std_attributes)
1896 (c_parser_std_attribute_specifier_sequence): New functions.
1897 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1898 attrs. All callers changed. Handle standard attributes.
1899 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1900 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1901 All callers changed.
1902 (c_parser_declspecs): Add arguments start_std_attr_ok and
1903 end_std_attr_ok. All callers changed. Handle standard
1904 attributes.
1905 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1906 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1907 (c_parser_compound_statement_nostart, c_parser_all_labels)
1908 (c_parser_label, c_parser_statement, c_parser_for_statement):
1909 Handle standard attributes.
1910 * c-parser.h (c_parser_declspecs): Update prototype.
1911 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1912 c_parser_declspecs.
1913
0c29cac4
ML
19142019-11-12 Martin Liska <mliska@suse.cz>
1915
1916 * gimple-parser.c: Do not include params.h.
1917
028d4092
ML
19182019-11-12 Martin Liska <mliska@suse.cz>
1919
1920 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1921 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1922 macro.
1923
62aee289
MR
19242019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1925 Frederik Harwath <frederik@codesourcery.com>
1926
1927 gcc/c/
1928 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
1929 (c_parser_oacc_kernels_parallel): Rename function to...
1930 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
1931 (c_parser_omp_construct): Update accordingly.
1932
1933
7cec9588
JJ
19342019-11-11 Jakub Jelinek <jakub@redhat.com>
1935
1936 * c-parser.c (c_parser_translation_unit): Diagnose declare target
1937 without corresponding end declare target.
1938
f486280c
RS
19392019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1940
1941 * c-convert.c (convert): Only handle vector conversions if one of
1942 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
1943 allows it.
1944 * c-typeck.c (build_array_ref): Only allow vector indexing if the
1945 vectors satisfy gnu_vector_type_p.
1946 (build_unary_op): Only allow unary operators to be applied to
1947 vectors if they satisfy gnu_vector_type_p.
1948 (digest_init): Only allow by-element initialization of vectors
1949 if they satisfy gnu_vector_type_p.
1950 (really_start_incremental_init): Likewise.
1951 (push_init_level): Likewise.
1952 (pop_init_level): Likewise.
1953 (process_init_element): Likewise.
1954 (build_binary_op): Only allow binary operators to be applied to
1955 vectors if they satisfy gnu_vector_type_p.
1956
017c6491
JM
19572019-11-08 Joseph Myers <joseph@codesourcery.com>
1958
1959 * c-decl.c (grokparms): Convert () in a function definition to
1960 (void) for C2x.
1961 (store_parm_decls_oldstyle): Pedwarn for C2x.
1962 (store_parm_decls): Update comment about () not generating a
1963 prototype.
1964
c01bd174
JM
19652019-11-07 Joseph Myers <joseph@codesourcery.com>
1966
1967 * c-parser.c (c_parser_attribute_arguments): New function.
1968 Factored out of c_parser_gnu_attribute.
1969 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
1970 (c_parser_balanced_token_sequence, c_parser_std_attribute)
1971 (c_parser_std_attribute_specifier): New functions.
1972 (c_parser_transaction_attributes): Use
1973 c_parser_std_attribute_specifier.
1974
471c5330
JM
19752019-11-07 Joseph Myers <joseph@codesourcery.com>
1976
1977 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
1978 lex_joined_string and translate_strings_p.
1979 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
1980 c_lex_with_flags.
1981 (c_parser_string_literal): New function.
1982 (c_parser_static_assert_declaration_no_semi): Use
1983 c_parser_string_literal. Do not set lex_untranslated_string.
1984 (c_parser_asm_string_literal): Use c_parser_string_literal.
1985 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
1986 (c_parser_gnu_attributes): Set and restore translate_strings_p
1987 instead of lex_untranslated_string.
1988 (c_parser_asm_statement): Do not set lex_untranslated_string.
1989 (c_parser_asm_operands): Likewise.
1990 (c_parser_has_attribute_expression): Set and restore
1991 translate_strings_p instead of lex_untranslated_string.
1992 (c_parser_postfix_expression): Use c_parser_string_literal.
1993 (pragma_lex): Likewise.
1994 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
1995 (c_parse_file): Set translate_strings_p.
1996 * gimple-parser.c (c_parser_gimple_postfix_expression)
1997 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
1998 * c-parser.c (c_parser_string_literal): Declare function.
1999
d0c464d2
JJ
20002019-11-02 Jakub Jelinek <jakub@redhat.com>
2001
2002 * c-parser.c (c_finish_omp_declare_variant): Use
2003 omp_get_context_selector instead of c_omp_get_context_selector.
2004
ac2cfa6c
RS
20052019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2006
2007 * c-tree.h (c_simulate_enum_decl): Declare.
2008 * c-decl.c (c_simulate_enum_decl): New function.
2009 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
2010
74078538
RS
20112019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2012
2013 * c-tree.h (c_simulate_builtin_function_decl): Declare.
2014 * c-decl.c (c_simulate_builtin_function_decl): New function.
2015 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
2016 to the above.
2017
ad1539d5
MS
20182019-10-28 Martin Sebor <msebor@redhat.com>
2019
2020 PR c/66970
2021 * c-decl.c (names_builtin_p): Define a new function.
2022
cb73e4e7
RB
20232019-10-28 Richard Biener <rguenther@suse.de>
2024
2025 PR c/92249
2026 * gimple-parser.c (c_parser_parse_gimple_body): Make
2027 current_bb the entry block initially to easier recover
2028 from errors.
2029 (c_parser_gimple_compound_statement): Adjust.
2030
135df52c
JJ
20312019-10-24 Jakub Jelinek <jakub@redhat.com>
2032
2033 * c-parser.c (c_finish_omp_declare_variant): Use
2034 omp_context_selector_matches instead of
2035 c_omp_context_selector_matches.
2036 * c-decl.c (c_decl_attributes): Add "omp declare target block"
2037 attribute in between declare target and end declare target
2038 pragmas.
2039
783bfe5e
JM
20402019-10-15 Joseph Myers <joseph@codesourcery.com>
2041
2042 * c-parser.c (c_parser_attribute_any_word): Rename to
2043 c_parser_gnu_attribute_any_word. All callers changed.
2044 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
2045 callers changed.
2046 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
2047 callers changed.
2048 (c_parser_declaration_or_fndef, c_parser_declspecs)
2049 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2050 (c_parser_struct_declaration, c_parser_declarator)
2051 (c_parser_gnu_attribute, c_parser_compound_statement)
2052 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
2053 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
2054 attribute-related syntax productions.
2055
56898e43
RS
20562019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2057
2058 * c-objc-common.c (useful_aka_type_p): Replace with...
2059 (get_aka_type): ...this new function. Given the original type,
2060 decide which aka type to print (if any). Only look through typedefs
2061 if user_facing_original_type_p.
2062 (print_type): Update accordingly.
2063
b9424661
JJ
20642019-10-14 Jakub Jelinek <jakub@redhat.com>
2065
2066 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
2067 into int NESTED, if it is 2, diagnose missing commas in between
2068 clauses.
2069 (c_parser_omp_context_selector): Pass 2 as last argument to
2070 c_parser_omp_all_clauses.
2071
20de9568
JJ
20722019-10-12 Jakub Jelinek <jakub@redhat.com>
2073
2074 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
2075 For simd properties, put them directly into TREE_VALUE.
2076 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
2077 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
2078 add "omp declare variant base" attribute rather than
2079 "omp declare variant".
2080
fe2bc27c
JM
20812019-10-11 Joseph Myers <joseph@codesourcery.com>
2082
2083 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
2084
94e7f906
JJ
20852019-10-10 Jakub Jelinek <jakub@redhat.com>
2086
2087 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
2088 true, terminate processing on closing paren and don't skip to end of
2089 pragma line.
2090 (c_parser_omp_declare_simd): Handle also declare variant.
2091 (omp_construct_selectors, omp_device_selectors,
2092 omp_implementation_selectors, omp_user_selectors): New variables.
2093 (c_parser_omp_context_selector,
2094 c_parser_omp_context_selector_specification,
2095 c_finish_omp_declare_variant): New functions.
2096 (c_finish_omp_declare_simd): Handle both declare simd and
2097 declare variant.
2098 (c_parser_omp_declare): Handle declare variant.
2099
93313b94
JM
21002019-10-02 Joseph Myers <joseph@codesourcery.com>
2101
2102 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
2103 CPP_COLON tokens.
2104
55879815
RS
21052019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2106
2107 * c-objc-common.c (useful_aka_type_p): New function.
2108 (print_type): Use it to decide whether an aka type is worth printing.
2109
59bc434a
JJ
21102019-09-27 Jakub Jelinek <jakub@redhat.com>
2111
2112 PR c++/88203
2113 * c-parser.c (c_parser_predefined_identifier): New function.
2114 (c_parser_postfix_expression): Use it.
2115 (c_parser_omp_variable_list): Parse predefined identifiers.
2116 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
2117 in shared and firstprivate clauses, even when they are predetermined
2118 shared.
2119
c6447c20
RS
21202019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2121
2122 * c-typeck.c (build_function_call_vec): Take the original function
2123 decl as an optional final parameter. Pass all built-in calls to
2124 check_builtin_function_arguments.
2125
522da4c2
EB
21262019-09-20 Eric Botcazou <ebotcazou@adacore.com>
2127
2128 PR c/91815
2129 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
2130 of identifiers in the external scope only for variables and functions.
2131
68e2c199
PK
21322019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2133
2134 PR c/78736
2135 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
2136
22f8849d
IS
21372019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2138
2139 PR pch/61250
2140 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
2141 after determining that the first token is not
2142 PRAGMA_GCC_PCH_PREPROCESS.
2143
db376f45
EB
21442019-08-22 Eric Botcazou <ebotcazou@adacore.com>
2145
2146 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
2147 FUNCTION_DECL to the right value in the presence of nested declarators.
2148
4d732405
RS
21492019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2150
2151 PR middle-end/91421
2152 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
2153
cb1180d5
RS
21542019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2155
2156 PR middle-end/91421
2157 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
2158 of a built_in_function.
2159 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
2160
77eb117f
JJ
21612019-08-10 Jakub Jelinek <jakub@redhat.com>
2162
2163 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
2164 (c_parser_omp_clause_device_type): New function.
2165 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2166 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2167 (c_parser_omp_declare_target): Handle device_type clauses. Remove
2168 diagnostics for declare target with clauses nested in clause-less
2169 declare target declaration-definition-seq.
2170 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2171
2c3b8bad
JJ
21722019-08-09 Jakub Jelinek <jakub@redhat.com>
2173
bb522e2e
JJ
2174 * c-parser.c (check_no_duplicate_clause): Simplify using
2175 omp_find_clause.
2176 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
2177 directive name modifiers.
2178 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2179
2c3b8bad
JJ
2180 PR c/91401
2181 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2182 check_no_duplicate_clause call. Comment it out, instead emit a
2183 warning for duplicate dist_schedule clauses.
2184
99769e7f
RS
21852019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2186
2187 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2188
8860d270
JJ
21892019-08-08 Jakub Jelinek <jakub@redhat.com>
2190
2191 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2192 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2193 instead of generic_head to track duplicates.
2194
398e3feb
JJ
21952019-08-07 Jakub Jelinek <jakub@redhat.com>
2196
2197 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2198 (c_parser_omp_clause_use_device_addr): New function.
2199 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2200 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2201 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2202 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2203 map or use_device_* clauses.
2204 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2205 in OpenMP, require pointer type rather than pointer or array type.
2206 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2207
a28351e7
JJ
22082019-07-31 Jakub Jelinek <jakub@redhat.com>
2209
2210 PR c/91192
2211 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2212 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2213 case.
2214
6343b6bf
ML
22152019-07-25 Martin Liska <mliska@suse.cz>
2216 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2217
2218 PR c++/23383
2219 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2220
cb50701e
ML
22212019-07-25 Martin Liska <mliska@suse.cz>
2222
2223 * c-decl.c (merge_decls): Use new macros
2224 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2225
62e3e66f
RB
22262019-07-23 Richard Biener <rguenther@suse.de>
2227
2228 PR tree-optimization/83518
2229 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2230 a CFG also rebuild cgraph edges.
2231
554a530f
JJ
22322019-07-20 Jakub Jelinek <jakub@redhat.com>
2233
2234 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2235 (c_parser_omp_clause_bind): New function.
2236 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2237 (OMP_LOOP_CLAUSE_MASK): Define.
2238 (c_parser_omp_loop): New function.
2239 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2240 loop combined with parallel or teams.
2241 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2242 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2243
d119bf79
RS
22442019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2245
2246 PR c/53633
2247 * c-decl.c (finish_function): Check targetm.warn_func_return
2248 before issuing a -Wreturn-type warning.
2249
ab20d992 22502019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
2251
2252 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2253 (c_parser_compound_statement): Call it.
2254
1fdd6f04
JJ
22552019-07-12 Jakub Jelinek <jakub@redhat.com>
2256
2257 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2258 (c_parser_omp_clause_order): New function.
2259 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2260 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2261 PRAGMA_OMP_CLAUSE_ORDER.
2262 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2263
8389386c
RB
22642019-07-10 Richard Biener <rguenther@suse.de>
2265
2266 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2267 _Literal (int *) &x for address literals.
2268
99b1c316
MS
22692019-07-09 Martin Sebor <msebor@redhat.com>
2270
2271 PR c++/61339
2272 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2273 to class.
2274 (field_decl_cmp): Same.
2275 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2276 * c-tree.h: Same.
2277 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2278
6c1dae73
MS
22792019-07-09 Martin Sebor <msebor@redhat.com>
2280
2281 PR c++/61339
2282 * c-decl.c: Change class-key from class to struct and vice versa
2283 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2284 * gimple-parser.c: Same.
2285
69b5279e
RB
22862019-07-01 Richard Biener <rguenther@suse.de>
2287
2288 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2289 _Literal (char *) &"foo" for address literals pointing to
2290 STRING_CSTs.
2291
ab20d992
JJ
22922019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2293
2294 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2295 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2296 C incompatibility if alternate "__intN__" form is used.
2297
1e3d475e
MS
22982019-06-24 Martin Sebor <msebor@redhat.com>
2299
2300 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2301
bf38f7e9
JJ
23022019-06-10 Jakub Jelinek <jakub@redhat.com>
2303
2304 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2305 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2306 (c_parser_omp_scan_loop_body): New function.
2307 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2308 inscan reduction clauses.
2309 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2310 non-inscan reductions on the same construct, or inscan reductions with
2311 ordered or schedule clauses, or inscan array reductions.
2312
65985d78
MS
23132019-06-05 Martin Sebor <msebor@redhat.com>
2314
2315 PR c/90737
2316 * c-typeck.c (c_finish_return): Only consider functions returning
2317 pointers as candidates for -Wreturn-local-addr.
2318
0ecf545c
MS
23192019-06-05 Martin Sebor <msebor@redhat.com>
2320
2321 * c-decl.c (start_decl): Adjust quoting and hyphenation
2322 in diagnostics.
2323 (finish_decl): Same.
2324 (finish_enum): Same.
2325 (start_function): Same.
2326 (declspecs_add_type): Same.
2327 * c-parser.c (warn_for_abs): Same.
2328 * c-typeck.c (build_binary_op): Same.
2329
e03436e7
TS
23302019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2331
b48f44bf
TS
2332 PR c/89433
2333 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2334 marked with an OpenACC 'routine' directive.
2335
5bf04509
TS
2336 PR c/89433
2337 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2338 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2339
e03436e7
TS
2340 PR c/89433
2341 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2342 clauses from "omp declare target" attribute.
2343
a9c697b8
MS
23442019-05-16 Martin Sebor <msebor@redhat.com>
2345
ab20d992
JJ
2346 * c-decl.c (start_decl): Quote keywords, operators, and
2347 types in diagnostics.
2348 (finish_decl): Same.
2349 * c-parser.c (c_parser_asm_statement): Same.
2350 (c_parser_conditional_expression): Same.
2351 (c_parser_transaction_cancel): Same.
2352 * c-typeck.c (c_common_type): Same.
2353 (build_conditional_expr): Same.
2354 (digest_init): Same.
2355 (process_init_element): Same.
2356 (build_binary_op): Same.
a9c697b8 2357
c4499192
RB
23582019-05-17 Richard Biener <rguenther@suse.de>
2359
2360 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2361 (c_parser_gimple_unary_expression): Likewise.
2362 (c_parser_gimple_parentized_ternary_expression): New function.
2363
adfe6e4b
RB
23642019-05-16 Richard Biener <rguenther@suse.de>
2365
2366 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2367 (c_parser_gimple_unary_expression): Likewise.
2368
186dabf2
RB
23692019-05-15 Richard Biener <rguenther@suse.de>
2370
2371 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2372 __BIT_FIELD_REF.
2373
1158c5b4
RB
23742019-05-14 Richard Biener <rguenther@suse.de>
2375
2376 * gimple-parser.c (c_parser_gimple_statement): Remove
2377 questionable auto-promotion to VIEW_CONVERT_EXPR.
2378 (c_parser_gimple_typespec): Split out from __MEM parsing.
2379 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2380 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2381 as __VIEW_CONVERT with -gimple.
2382
fd4485aa
ML
23832019-05-09 Martin Liska <mliska@suse.cz>
2384
2385 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2386 __MAX.
2387 (c_parser_gimple_unary_expression): Parse also binary expression
2388 __MIN and __MAX.
2389 (c_parser_gimple_parentized_binary_expression): New function.
2390
d276406a
ML
23912019-05-09 Martin Liska <mliska@suse.cz>
2392
2393 * gimple-parser.c (struct gimple_parser): Add probability.
2394 for gimple_parser_edge.
2395 (gimple_parser::push_edge): Add new argument probability.
2396 (c_parser_gimple_parse_bb_spec): Parse also probability
2397 if present.
2398 (c_parser_parse_gimple_body): Set edge probability.
2399 (c_parser_gimple_compound_statement): Consume token
2400 before calling c_parser_gimple_goto_stmt.
2401 Parse BB counts.
2402 (c_parser_gimple_statement): Pass new argument.
2403 (c_parser_gimple_goto_stmt): Likewise.
2404 (c_parser_gimple_if_stmt): Likewise.
2405 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2406 * c-parser.c (c_parser_declaration_or_fndef): Pass
2407 hot_bb_threshold argument.
2408 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2409 field.
2410 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2411
f179b64e
JJ
24122019-04-26 Jakub Jelinek <jakub@redhat.com>
2413
2414 PR debug/90197
2415 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2416 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2417 (c_parser_do_statement): Likewise.
2418 (c_parser_for_statement): Likewise. Formatting fixes.
2419 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2420 emit DEBUG_BEGIN_STMTs if needed.
2421
e7178413
JJ
24222019-04-19 Jakub Jelinek <jakub@redhat.com>
2423
c280b7ee
JJ
2424 PR c/89888
2425 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2426 (c_start_case): Don't clear it.
2427 (do_case): Adjust c_add_case_label caller.
2428 (c_finish_case): Adjust c_do_switch_warnings caller.
2429
e7178413
JJ
2430 PR c++/90108
2431 * c-decl.c (merge_decls): If remove is main variant and
2432 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2433 variant that has newdecl as TYPE_NAME if any.
2434
60a2c645
JJ
24352019-04-12 Jakub Jelinek <jakub@redhat.com>
2436
2437 PR c/89933
2438 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2439 don't try to remove it from the variant list, but instead assert
2440 it has no variants.
2441
2a82beaa
RB
24422019-04-01 Richard Biener <rguenther@suse.de>
2443
2444 PR c/71598
2445 * c-tree.h (c_get_alias_set): Declare.
2446 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2447 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2448 as the underlying integer type.
2449
bec1da64
MS
24502019-03-19 Martin Sebor <msebor@redhat.com>
2451
2452 PR tree-optimization/89688
2453 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2454 kinds of initializers.
2455
855cd9b1
JJ
24562019-03-19 Jakub Jelinek <jakub@redhat.com>
2457
2458 PR c/89734
2459 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2460 return type even if quals_used is 0. Formatting fixes.
2461
baa09dc5
RB
24622019-03-14 Richard Biener <rguenther@suse.de>
2463
2464 * c-tree.h (enum c_declspec_il): New.
2465 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2466 enum bitfield.
2467 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2468 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2469 (c_parser_declspecs): Adjust.
2470 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2471 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2472 and bitmap.h.
2473 (struct gimple_parser): New.
2474 (gimple_parser::push_edge): New method.
2475 (c_parser_gimple_parse_bb_spec): New helper.
2476 (c_parser_parse_gimple_body): Get start pass and IL specification.
2477 Initialize SSA and CFG.
2478 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2479 Build a gimple_parser parsing state and pass it along.
2480 (c_parser_gimple_statement): Change intermittend __PHI internal
2481 function argument for the edge.
2482 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2483 (c_parser_gimple_goto_stmt): Record edges to build.
2484 (c_parser_gimple_if_stmt): Likewise.
2485 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2486 (c_parser_gimple_or_rtl_pass_list): Likewise.
2487
a3f9f006
ML
24882019-03-11 Martin Liska <mliska@suse.cz>
2489
2490 * c-decl.c (check_for_loop_decls): Wrap an option name
2491 in a string format message and fix GNU coding style.
2492 * c-parser.c (c_parser_declspecs): Likewise.
2493
1db01ff9
JJ
24942019-03-08 Jakub Jelinek <jakub@redhat.com>
2495
2496 PR tree-optimization/89550
2497 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2498 returned true.
2499 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2500 or warning returned true.
2501
66dcb747
JJ
25022019-02-28 Jakub Jelinek <jakub@redhat.com>
2503
2504 PR c/89525
2505 * c-typeck.c (convert_arguments): Call inform_declaration only if
2506 the previous warning_at call returned true.
2507
2263c9f2
TS
25082019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2509
2510 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2511 parameter. Adjust all users.
2512 (c_parser_oacc_simple_clause): Replace parser with loc formal
2513 parameter. Adjust all users.
2514
ab20d992 25152019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
2516
2517 PR c/87924
2518 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2519 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2520
5f88ba10
JJ
25212019-02-15 Jakub Jelinek <jakub@redhat.com>
2522
2523 PR c/89340
2524 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2525 before c_decl_attributes rather than after it.
2526
cfc30fd1
JJ
25272019-02-06 Jakub Jelinek <jakub@redhat.com>
2528
2529 PR c/89211
2530 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2531 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2532 instead of 3 nested ifs.
2533
fbe83e6b
JM
25342019-02-06 Joseph Myers <joseph@codesourcery.com>
2535
2536 PR c/88584
2537 * c-decl.c (finish_decl): Do not complete array types for arrays
2538 with external linkage not at file scope.
2539
f461f938
RB
25402019-02-05 Richard Biener <rguenther@suse.de>
2541
2542 PR c/88606
2543 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2544 all type variants when not supported.
2545
fe509359
JJ
25462019-01-30 Jakub Jelinek <jakub@redhat.com>
2547
2548 PR c/89061
2549 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2550 * c-decl.c (decl_jump_unsafe): Return false for
2551 C_DECL_COMPOUND_LITERAL_P decls.
2552 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2553
6a335b96
JJ
25542019-01-29 Jakub Jelinek <jakub@redhat.com>
2555
f4b7e754
JJ
2556 PR c/89045
2557 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2558 scope.
2559
6a335b96
JJ
2560 PR c/86125
2561 * c-decl.c (last_fileptr_type): Remove.
2562 (last_structptr_types): New variable.
2563 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2564 {old,new}rettype instead of the types themselves. Assert
2565 last_structptr_types array has the same number of elements
2566 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2567 argument oldtype and newtype. Instead of handling
2568 just fileptr_type_node specially, handle all builtin_structptr_types
2569 pointer nodes. Formatting fix.
2570
d8b5a1a0
MS
25712019-01-24 Martin Sebor <msebor@redhat.com>
2572
2573 PR c/86125
2574 PR c/88886
2575 PR middle-end/86308
2576 * c-decl.c (match_builtin_function_types): Add arguments.
2577 (diagnose_mismatched_decls): Diagnose mismatched declarations
2578 of built-ins more strictly.
2579
e21c4491
JJ
25802019-01-24 Jakub Jelinek <jakub@redhat.com>
2581
2582 PR c++/88976
2583 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2584 on #pragma omp cancel with different modifiers.
2585
420183d9
L
25862019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2587
2588 PR c/51628
2589 PR c/88664
2590 * c-typeck.c (convert_for_assignment): Upate the
2591 warn_for_address_or_pointer_of_packed_member call.
2592
17ad43dd
TH
25932019-01-16 Tom Honermann <tom@honermann.net>
2594 Jason Merrill <jason@redhat.com>
2595
2596 * c-typeck.c (digest_init): Revised the error message produced for
2597 ill-formed cases of array initialization with a string literal.
2598 (error_init): Make variadic.
2599
5f07d78a
JJ
26002019-01-12 Jakub Jelinek <jakub@redhat.com>
2601
2602 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2603
c4581bbf
JJ
26042019-01-07 Jakub Jelinek <jakub@redhat.com>
2605
2606 PR c/88701
2607 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2608 if current_function_decl is non-NULL.
2609
65c5b1eb
JM
26102019-01-07 Joseph Myers <joseph@codesourcery.com>
2611
2612 PR c/88720
2613 PR c/88726
2614 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2615 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2616 functions declared but never defined only for external scope, not
2617 for other scopes.
2618
d8fcab68
JJ
26192019-01-07 Jakub Jelinek <jakub@redhat.com>
2620
2621 PR c++/85052
2622 * c-parser.c (c_parser_postfix_expression): Parse
2623 __builtin_convertvector.
2624
a5544970
JJ
26252019-01-01 Jakub Jelinek <jakub@redhat.com>
2626
2627 Update copyright years.
2628
da77eace
L
26292018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2630
2631 PR c/51628
2632 * c-typeck.c (convert_for_assignment): Call
2633 warn_for_address_or_pointer_of_packed_member.
2634
1edf8866
SB
26352018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2636
2637 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2638 a more specific error message (instead of just falling through).
2639
db4fd626
SB
26402018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2641
2642 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2643 asm qualifier is first seen; use that to give nicer "duplicate asm
2644 qualifier" messages. Delete 'quals" variable, instead pass the
2645 "is_volatile_ flag to build_asm_stmt directly.
2646 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2647 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2648
9c9cfcbb
SB
26492018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2650
2651 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2652 "done" boolean variable.
2653
a14feb3c
DM
26542018-12-19 David Malcolm <dmalcolm@redhat.com>
2655
2656 PR c++/87504
2657 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2658 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2659 (build_binary_op): Use struct op_location_t and
2660 class binary_op_rich_location.
2661
6d939173
JJ
26622018-12-11 Jakub Jelinek <jakub@redhat.com>
2663
2664 PR sanitizer/88426
2665 * c-convert.c (convert): Call c_fully_fold before calling
2666 ubsan_instrument_float_cast.
2667
b7055028
SB
26682018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2669
2670 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2671 setting "quals".
2672
5b76e75f
SB
26732018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2674
2675 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2676 after asm. Pass a flag for it to build_asm_expr.
2677 * c-tree.h (build_asm_expr): Update declaration.
2678 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2679 set ASM_INLINE_P.
2680
30bd42b9
SB
26812018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2682
2683 PR inline-asm/55681
2684 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2685 combination of volatile and goto, in any order, without repetitions.
2686
9df6c0e4
JB
26872018-12-04 James Norris <jnorris@codesourcery.com>
2688 Cesar Philippidis <cesar@codesourcery.com>
2689 Julian Brown <julian@codesourcery.com>
2690
2691 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2692 code.
2693
f44697b7
RB
26942018-11-30 Richard Biener <rguenther@suse.de>
2695
2696 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2697 _Literal (type) { ... } as empty aggregate or vector constructor.
2698
550dfbdc
MS
26992018-11-29 Martin Sebor <msebor@redhat.com>
2700
2701 PR c/88091
2702 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2703 (convert_arguments): Add comments. Pass additional argument to
2704 the function above.
2705
673670da
MS
27062018-11-29 Martin Sebor <msebor@redhat.com>
2707
2708 PR c/88172
2709 PR testsuite/88208
2710 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2711
db1d09b0
MS
27122018-11-23 Martin Sebor <msebor@redhat.com>
2713
2714 PR testsuite/88098
2715 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2716 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2717
98f08eb8
MS
27182018-11-20 Martin Sebor <msebor@redhat.com>
2719
2720 * c-parser.c (c_parser_has_attribute_expression): New function.
2721 (c_parser_attribute): New function.
2722 (c_parser_attributes): Move code into c_parser_attribute.
2723 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2724
cd5da983
MS
27252018-11-15 Martin Sebor <msebor@redhat.com>
2726
2727 PR c/83656
2728 * c-decl.c (header_for_builtin_fn): Declare.
2729 (diagnose_mismatched_decls): Diagnose declarations of built-in
2730 functions without a prototype.
2731 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2732 (convert_argument): Same.
2733 (convert_arguments): Factor code out into convert_argument.
2734 Detect mismatches between built-in formal arguments in calls
2735 to built-in without prototype.
2736 (build_conditional_expr): Same.
2737 (type_or_builtin_type): New function.
2738 (convert_for_assignment): Add argument. Conditionally issue
2739 warnings instead of errors for mismatches.
2740
620e594b
DM
27412018-11-13 David Malcolm <dmalcolm@redhat.com>
2742
2743 * c-decl.c: Replace "source_location" with "location_t".
2744 * c-tree.h: Likewise.
2745 * c-typeck.c: Likewise.
2746 * gimple-parser.c: Likewise.
2747
3179ebae
JJ
27482018-11-09 Jakub Jelinek <jakub@redhat.com>
2749
81a227c6
JJ
2750 * c-parser.c (c_parser_omp_clause_final): Use
2751 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2752 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2753 parsing instead of c_parser_paren_condition.
2754 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2755 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2756 c_fully_fold instead of c_parser_condition.
2757 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2758 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2759 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2760 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2761 c_parser_expr_no_commas instead of c_parser_expression.
2762
98c91c56
JJ
2763 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2764 reduction clause with inscan modifier.
2765
3179ebae
JJ
2766 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2767 clauses other than atomic_default_mem_order.
2768
28567c40
JJ
27692018-11-08 Jakub Jelinek <jakub@redhat.com>
2770
2771 * c-parser.c: Include memmode.h.
2772 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2773 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2774 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2775 task_reduction clauses.
2776 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2777 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2778 section, or lvalue assignment expression.
2779 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2780 (c_parser_omp_clause_lastprivate): Parse optional
2781 conditional: modifier.
2782 (c_parser_omp_clause_hint): Require constant integer expression rather
2783 than just integer expression.
2784 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2785 clause.
2786 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2787 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2788 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2789 functions.
2790 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2791 iterators. Parse mutexinoutset and depobj kinds.
2792 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2793 callers.
2794 (c_parser_omp_all_clauses): Likewise. Handle
2795 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2796 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2797 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2798 default memory order from requires directive if any. Adjust
2799 c_finish_omp_atomic caller.
2800 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2801 (c_parser_omp_flush): Parse flush with memory-order-clause.
2802 (c_parser_omp_for_loop): Allow NE_EXPR even in
2803 OpenMP loops, adjust c_finish_omp_for caller.
2804 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2805 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2806 Allow to be called while parsing combined parallel master.
2807 Parse combined master taskloop{, simd}.
2808 (c_parser_omp_parallel): Parse combined
2809 parallel master{, taskloop{, simd}} constructs.
2810 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2811 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2812 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2813 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2814 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2815 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2816 around teams body. Use SET_EXPR_LOCATION.
2817 (c_parser_omp_target_data): Allow target data
2818 with only use_device_ptr clauses.
2819 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2820 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2821 (c_parser_omp_requires): New function.
2822 (c_finish_taskloop_clauses): New function.
2823 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2824 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2825 declaration. Disallow in_reduction clause when combined with parallel
2826 master.
2827 (c_parser_omp_construct): Adjust c_parser_omp_master and
2828 c_parser_omp_taskgroup callers.
2829 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2830 other than cancel.
2831 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2832 like OMP_CLAUSE_REDUCTION.
2833 (handle_omp_array_sections): Likewise. Call save_expr on array
2834 reductions before calling build_index_type. Handle depend clauses
2835 with iterators.
2836 (struct c_find_omp_var_s): New type.
2837 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2838 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2839 with static, runtime or auto schedule kinds. Call save_expr for whole
2840 array reduction sizes. Diagnose reductions with zero sized elements
2841 or variable length structures. Diagnose nogroup clause used with
2842 reduction clause(s). Handle depend clause with
2843 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2844 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2845 some different type for other kinds. Use build_unary_op with
2846 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2847 Handle depend clauses with iterators. Remove no longer needed special
2848 case that predetermined const qualified vars may be specified in
2849 firstprivate clause. Complain if const qualified vars are mentioned
2850 in data-sharing clauses other than firstprivate or shared. Use
2851 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2852 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2853 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2854 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2855
7e2de6df
DM
28562018-10-29 David Malcolm <dmalcolm@redhat.com>
2857
2858 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2859 logic for change to name_hint::operator bool.
2860 (undeclared_variable): Likewise.
2861 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2862 (c_parser_parameter_declaration): Likewise.
2863
9f936c86
JM
28642018-10-17 Joseph Myers <joseph@codesourcery.com>
2865
2866 * c-errors.c (pedwarn_c11): New function.
2867 * c-parser.c (disable_extension_diagnostics): Save
2868 warn_c11_c2x_compat and set it to 0.
2869 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2870 (c_parser_static_assert_declaration_no_semi): Handle
2871 _Static_assert without string constant.
2872 * c-tree.h (pedwarn_c11): New prototype.
2873
033eb567
DM
28742018-10-17 David Malcolm <dmalcolm@redhat.com>
2875
2876 * Make-lang.in (selftest-c): New.
2877 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2878 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2879 from gcc/Makefile.in.
2880
0edf3afe
RB
28812018-10-02 Richard Biener <rguenther@suse.de>
2882
2883 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2884
8313a764
JM
28852018-09-26 Joseph Myers <joseph@codesourcery.com>
2886
2887 PR c/87390
2888 * c-typeck.c (build_binary_op): Use excess precision for
2889 comparisons of integers and floating-point for C11 and later.
2890
ce6f0888
MJ
28912018-09-26 Martin Jambor <mjambor@suse.cz>
2892
2893 PR c/87347
2894 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2895 comment.
ce6f0888 2896
9c4a4b3c
DM
28972018-09-17 David Malcolm <dmalcolm@redhat.com>
2898
2899 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2900 Update for new param.
2901 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2902 Likewise.
2903
80c6d1f4
MJ
29042018-09-17 Martin Jambor <mjambor@suse.cz>
2905
2906 PR c/63886
2907 * c-parser.c: (warn_for_abs): New function.
2908 (c_parser_postfix_expression_after_primary): Call it.
2909
4a426e36
BE
29102018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2911
2912 * c-typeck.c (digest_init): Shorten overlength strings.
2913
6d900107
BE
29142018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2915
2916 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2917
b5764229
BE
29182018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2919
2920 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2921 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2922
22eea6b2
AM
29232018-08-30 Alexander Monakov <amonakov@ispras.ru>
2924
2925 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2926 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2927
85204e23
DM
29282018-08-27 David Malcolm <dmalcolm@redhat.com>
2929
2930 PR 87091
2931 * c-decl.c (implicitly_declare): Update call to
2932 maybe_add_include_fixit to suggest overriding the location, as it
2933 is for a note.
2934 * c-objc-common.c (c_tree_printer): Update for conversion of
2935 show_caret_p to a tri-state.
2936
3d78e008
ML
29372018-08-27 Martin Liska <mliska@suse.cz>
2938
2939 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
2940 fndecl_built_in_p and remove check for FUNCTION_DECL if
2941 possible.
3d78e008
ML
2942 (diagnose_mismatched_decls): Likewise.
2943 (merge_decls): Likewise.
2944 (warn_if_shadowing): Likewise.
2945 (pushdecl): Likewise.
2946 (implicitly_declare): Likewise.
2947 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2948 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
2949 * c-typeck.c (build_function_call_vec): Likewise.
2950 (convert_arguments): Likewise.
2951
097f82ec
DM
29522018-08-20 David Malcolm <dmalcolm@redhat.com>
2953
2954 PR other/84889
2955 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
2956 (diagnose_mismatched_decls): Likewise, in various places.
2957 (warn_if_shadowing): Likewise.
2958 (implicit_decl_warning): Likewise.
2959 (implicitly_declare): Likewise.
2960 (undeclared_variable): Likewise.
2961 (declare_label): Likewise.
2962 (grokdeclarator): Likewise.
2963 (start_function): Likewise.
2964 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2965 (c_parser_parameter_declaration): Likewise.
2966 (c_parser_binary_expression): Likewise.
2967 * c-typeck.c (c_expr_sizeof_expr): Likewise.
2968 (parser_build_binary_op): Likewise.
2969 (build_unary_op): Likewise.
2970 (error_init): Likewise.
2971 (pedwarn_init): Likewise.
2972 (warning_init): Likewise.
2973 (convert_for_assignment): Likewise.
2974
96e6ae57
DM
29752018-08-15 David Malcolm <dmalcolm@redhat.com>
2976
2977 * c-objc-common.c: Include "gcc-rich-location.h".
2978 (c_tree_printer): Move implemenation of '%T' to...
2979 (print_type): ...this new function.
2980 (range_label_for_type_mismatch::get_text): New function.
2981 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
2982 range for the various ic_argpass cases.
2983 (class maybe_range_label_for_tree_type_mismatch): New class.
2984 (build_binary_op): Use it when calling binary_op_error.
2985
0cd020ae 29862018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 2987
0cd020ae
PK
2988 * c-decl.c (start_decl): Do not warn if variables is named as main
2989 and is a local variable.
2990
72733314
IS
29912018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2992
2993 PR c/19315
2994 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
2995 objects of unknown size.
2996
23aa9f7c
MS
29972018-08-13 Martin Sebor <msebor@redhat.com>
2998
2999 PR tree-optimization/71625
3000 * c-parser.c (c_parser_declaration_or_fndef): Call
3001 braced_list_to_string.
3002
e5e7e50d
BH
30032018-08-03 Bogdan Harjoc <harjoc@gmail.com>
3004
3005 PR c/86690
3006 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
3007 errors.
3008
8a45b051
MS
30092018-08-01 Martin Sebor <msebor@redhat.com>
3010
3011 PR tree-optimization/86650
3012 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
3013 and TREE_BLOCK (t) from within percent_K_format to this callsite.
3014
5922dcb5
JJ
30152018-08-01 Jakub Jelinek <jakub@redhat.com>
3016
3017 PR c/85704
3018 * c-typeck.c (init_field_decl_cmp): New function.
3019 (output_pending_init_elements): Use it for field comparisons
3020 instead of pure bit_position comparisons.
3021
9b452033
JJ
30222018-07-12 Jakub Jelinek <jakub@redhat.com>
3023
3024 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
3025 type here, instead add "omp declare target implicit" attribute.
3026 (finish_decl): Diagnose vars without mappable type here.
3027
ab20d992
JJ
30282018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3029 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
3030 Cesar Philippidis <cesar@codesourcery.com>
3031
3032 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
3033 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
3034 to their non-present_or_* counterparts. Make 'self' an alias to
3035 PRAGMA_OACC_CLAUSE_HOST.
3036 (c_parser_oacc_data_clause): Update GOMP mappings for
3037 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
3038 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
3039 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
3040 Remove support for present_or_* clauses.
3041 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3042 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
3043 (OACC_DECLARE_CLAUSE_MASK): Likewise.
3044 (OACC_DATA_CLAUSE_MASK): Likewise.
3045 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3046 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
3047 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
3048 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
3049 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
3050
e197e64e
KV
30512018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3052
3053 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
3054 * gimple-parser.c (c_parser_gimple_statement): Likewise.
3055 (c_parser_gimple_unary_expression): Likewise.
3056
487f2f61
JJ
30572018-06-15 Jakub Jelinek <jakub@redhat.com>
3058
3059 PR c/86093
3060 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
3061 before doing POINTER_DIFF_EXPR.
3062
e4d44a37
MP
30632018-06-07 Marek Polacek <polacek@redhat.com>
3064
3065 PR c/85318
3066 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
3067 for loop initial declarations.
3068
b67b9225
DP
30692018-05-30 David Pagan <dave.pagan@oracle.com>
3070
3071 PR c/55976
3072 * c-decl.c (grokdeclarator): Update check for return type warnings.
3073 (start_function): Likewise.
3074 (finish_function): Likewise.
3075 * c-typeck.c (c_finish_return): Update check for return type warnings.
3076 Pass OPT_Wreturn_type to pedwarn when appropriate.
3077
c566cc9f
RS
30782018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
3079
3080 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
3081 __FMA_EXPR handlng.
3082
e4f81565
RS
30832018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
3084
3085 * gimple-parser.c: Include internal-fn.h.
3086 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
3087 (c_parser_gimple_call_internal): New function.
3088 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
3089 Fix typos in comment.
3090
79e7b1fe
JJ
30912018-05-10 Jakub Jelinek <jakub@redhat.com>
3092
3093 PR c++/85662
3094 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
3095 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
3096 fold_convert_loc.
3097 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
3098 fold_offsetof_1, pass argtype as TYPE to it and drop the
3099 fold_convert_loc.
3100
f7584c81
DP
31012018-05-02 David Pagan <dave.pagan@oracle.com>
3102
3103 PR c/30552
3104 * c-decl.c (old_style_parameter_scope): New function.
3105 * c-parser.c (c_parser_postfix_expression): Check for statement
3106 expressions in old-style function parameter list declarations.
3107 * c-parser.h (old_style_parameter_scope): New extern declaration.
3108
b33a0cb3
JJ
31092018-04-25 Jakub Jelinek <jakub@redhat.com>
3110
3111 PR sanitizer/84307
3112 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
3113 it is not TREE_STATIC.
3114 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
3115 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
3116 its COMPOUND_LITERAL_EXPR_DECL.
3117
c5c5822a
JM
31182018-03-21 Joseph Myers <joseph@codesourcery.com>
3119
3120 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
3121 where all functions return the same _FloatN or _FloatNx type,
3122 treat integer types as _Float64 instead of double.
3123
aa1c9429
JJ
31242018-03-21 Jakub Jelinek <jakub@redhat.com>
3125
3126 PR c/84999
3127 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
3128 building vector comparison, diagnose it and return error_mark_node.
3129
9bb45a95
JJ
31302018-03-15 Jakub Jelinek <jakub@redhat.com>
3131
3132 PR c/84853
3133 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
3134 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
3135 INTEGER_TYPE element type.
3136
ada6bad9
DP
31372018-03-13 David Pagan <dave.pagan@oracle.com>
3138
3139 PR c/46921
3140 * c-typeck.c (output_init_element): Ensure field initializer
3141 expression is always evaluated if there are side effects.
3142
849bbdb9
JJ
31432018-03-06 Jakub Jelinek <jakub@redhat.com>
3144
3145 PR c/84721
3146 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
3147 !building_stmt_list_p ().
3148
d74641bd
RS
31492018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
3150
3151 PR c/84305
3152 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
3153 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
3154 and include the BIND_EXPR in the list of things that need to be
3155 pre-evaluated.
3156
0444aa9c
NS
31572018-02-09 Nathan Sidwell <nathan@acm.org>
3158
3159 PR c/84293
3160 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
3161 to strict_aliasing_warning.
3162
7c30b12a
PC
31632018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3164
3165 * c-typeck.c (really_start_incremental_init, push_init_level,
3166 set_nonincremental_init, output_init_element, process_init_element):
3167 Use DECL_UNNAMED_BIT_FIELD.
3168
2be4dfcb
MP
31692018-01-31 Marek Polacek <polacek@redhat.com>
3170
3171 PR c/81779
3172 * c-parser.c (c_parser_compound_statement_nostart): Call
3173 expansion_point_location_if_in_system_header.
3174
bb9869d5
DM
31752018-01-17 David Malcolm <dmalcolm@redhat.com>
3176
3177 PR c++/83814
3178 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3179 the C part.
3180
b4923738
JJ
31812018-01-13 Jakub Jelinek <jakub@redhat.com>
3182
3183 PR c/83801
3184 * c-tree.h (decl_constant_value_1): Add a bool argument.
3185 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3186 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3187 (decl_constant_value): Adjust caller.
3188 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3189 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3190 decl_constant_value returns initializer that has BLKmode or
3191 array type.
3192 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3193
928686b1
RS
31942018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3195 Alan Hayward <alan.hayward@arm.com>
3196 David Sherwood <david.sherwood@arm.com>
3197
3198 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3199 TYPE_VECTOR_SUBPARTS.
3200
85ec4feb
JJ
32012018-01-03 Jakub Jelinek <jakub@redhat.com>
3202
3203 Update copyright years.
3204
913884f7
JJ
32052018-01-01 Jakub Jelinek <jakub@redhat.com>
3206
3207 PR c/83595
3208 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3209 c_parser_conditional_expression, c_parser_cast_expression,
3210 c_parser_sizeof_expression, c_parser_alignof_expression,
3211 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3212 c_parser_transaction_expression): Use set_error () method instead
3213 of setting value member to error_mark_node.
3214
c6cfa2bf
MM
32152017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3216
3217 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3218 and _Float<N>X built-in functions.
3219
11d29d63
JJ
32202017-12-22 Jakub Jelinek <jakub@redhat.com>
3221
14ec014e
JJ
3222 PR debug/83550
3223 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3224 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3225 incomplete vars rather than after it.
3226
11d29d63
JJ
3227 PR debug/83547
3228 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3229 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3230 and consider empty ones if there are no other stmts. For
3231 -Wunused-value walk all statements before the one only followed by
3232 DEBUG_BEGIN_STMTs.
3233
170a8bd6 32342017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3235 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3236
3237 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3238 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3239 (c_parser_do_statement): Likewise.
3240 (c_parser_for_statement): Likewise.
3241 (c_parser_statement_after_labels): Adjust calls to above.
3242 (c_parse_pragma_ivdep): New static function.
3243 (c_parser_pragma_unroll): Likewise.
3244 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3245 <PRAGMA_UNROLL>: New case.
3246
01512446
JJ
32472017-12-19 Jakub Jelinek <jakub@redhat.com>
3248
3249 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3250 perform_integral_promotions, digest_init): Replace Yoda conditions
3251 with typical order conditions.
3252 * c-decl.c (check_bitfield_type_and_width): Likewise.
3253
c65e18d3
BE
32542017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3255
3256 * c-typeck.c (c_safe_arg_type_equiv_p,
3257 c_safe_function_type_cast_p): New function.
3258 (build_c_cast): Implement -Wcast-function-type.
3259
b7280579
RB
32602017-12-14 Richard Biener <rguenther@suse.de>
3261
3262 PR c/83415
3263 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3264 like REALPART_EXPR for the behavior of whether its operand
3265 is an lvalue.
3266
49e6a6c0
MP
32672017-12-12 Marek Polacek <polacek@redhat.com>
3268
3269 PR c/82679
3270 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3271
ab20d992 32722017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3273
3274 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3275 * c-parser.c (add_debug_begin_stmt): New.
3276 (c_parser_declaration_or_fndef): Call it.
3277 (c_parser_compound_statement_nostart): Likewise.
3278 (c_parser_statement_after_labels): Likewise.
3279 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3280
4b2b493f
JM
32812017-12-07 Joseph Myers <joseph@codesourcery.com>
3282
3283 * c-decl.c (build_compound_literal): Add parameter alignas_align
3284 and set alignment of decl if nonzero.
3285 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3286 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3287 qualifier.
3288 (c_parser_struct_declaration): Update syntax comment.
3289 (c_parser_type_name): Add alignas_ok argument and pass it to
3290 c_parser_declspecs.
3291 (c_parser_cast_expression): Pass true to c_parser_type_name and
3292 give error if a cast used an _Alignas specifier.
3293 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3294 give error if sizeof (type-name) used an _Alignas specifier.
3295 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3296 give error if _Alignof (type-name) used an _Alignas specifier.
3297 (c_parser_postfix_expression_after_paren_type): Check specified
3298 alignment for a compound literal and pass it to
3299 build_compound_literal.
3300 * c-parser.h (c_parser_type_name): Update prototype.
3301 * c-tree.h (build_compound_literal): Update prototype.
3302
5d9ae53d
MS
33032017-12-07 Martin Sebor <msebor@redhat.com>
3304
3305 PR c/81544
3306 * c-decl.c (c_decl_attributes): Look up existing declaration and
3307 pass it to decl_attributes.
3308
c79144f8
DM
33092017-12-06 David Malcolm <dmalcolm@redhat.com>
3310
3311 PR c/83236
3312 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3313 reserved for use by the implementation.
3314
613bc14f
DM
33152017-12-06 David Malcolm <dmalcolm@redhat.com>
3316
3317 * c-decl.c: Include "c-family/c-spellcheck.h".
3318
05abad4c
ML
33192017-12-05 Martin Liska <mliska@suse.cz>
3320 Jakub Jelinek <jakub@redhat.com>
3321
3322 * c-typeck.c (pointer_diff): Add new argument and instrument
3323 pointer subtraction.
3324 (build_binary_op): Similar for pointer comparison.
3325
cc6534d4
JJ
33262017-12-01 Jakub Jelinek <jakub@redhat.com>
3327
65791f42
JJ
3328 PR c/79153
3329 * c-parser.c: Include tree-iterator.h.
3330 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3331 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3332 on it.
3333
cc6534d4
JJ
3334 PR c/83222
3335 * c-tree.h (decl_constant_value_1): Declare.
3336 * c-typeck.c (decl_constant_value_1): New function.
3337 (decl_constant_value): Use it.
3338 * c-fold.c (c_fully_fold_internal): If in_init, use
3339 decl_constant_value_1 instead of decl_constant_value.
3340
5de73c05
JJ
33412017-11-30 Jakub Jelinek <jakub@redhat.com>
3342
3343 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3344
058f0b9e
JJ
33452017-11-28 Jakub Jelinek <jakub@redhat.com>
3346
3347 PR sanitizer/81275
3348 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3349 c_switch_covers_all_cases_p returns true.
3350
5e9d6aa4 33512017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3352 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3353
3354 * Make-lang.in (c/c-array-notation.o): Remove.
3355 * c-array-notation.c: Delete.
3356 * c-decl.c: Remove cilkplus condition.
3357 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3358 c_parser_cilk_verify_simd, c_parser_array_notation,
3359 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3360 c_parser_cilk_simd_fn_vector_attrs,
3361 c_finish_cilk_simd_fn_tokens): Delete.
3362 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3363 (c_parser_direct_declarator_inner): Ditto.
3364 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3365 (c_parser_attributes, c_parser_compound_statement,
3366 c_parser_statement_after_labels, c_parser_if_statement,
3367 c_parser_switch_statement, c_parser_while_statement,
3368 c_parser_do_statement, c_parser_for_statement,
3369 c_parser_unary_expression, c_parser_postfix_expression,
3370 c_parser_postfix_expression_after_primary,
3371 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3372 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3373 support.
3374 * c-typeck.c (build_array_ref, build_function_call_vec,
3375 convert_arguments,
3376 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3377 c_finish_loop, build_binary_op): Remove cilkplus support.
3378
9e851845
JJ
33792017-11-28 Jakub Jelinek <jakub@redhat.com>
3380
3381 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3382 of build3.
3383
ab20d992 33842017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
3385
3386 * Make-lang.in (c.install-plugin): Install backend import library.
3387
41521dee
JJ
33882017-11-23 Jakub Jelinek <jakub@redhat.com>
3389
3390 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3391 pragma_stmt context.
3392
ac9effed
EB
33932017-11-23 Mike Stump <mikestump@comcast.net>
3394 Eric Botcazou <ebotcazou@adacore.com>
3395
3396 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3397 ANNOTATE_EXPR.
3398 (c_parser_do_statement): Likewise.
3399 (c_parser_for_statement): Likewise.
3400
ce95abc4
DM
34012017-11-22 David Malcolm <dmalcolm@redhat.com>
3402
3403 PR c++/62170
3404 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3405 bool to bool *. Within '%T' handling, if showing an "aka", use
3406 "quoted" param to add appropriate quoting.
3407
974aedcc
MP
34082017-11-22 Marek Polacek <polacek@redhat.com>
3409
3410 PR c++/60336
3411 PR middle-end/67239
3412 PR target/68355
3413 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3414
d4300cc6
DM
34152017-11-21 David Malcolm <dmalcolm@redhat.com>
3416
3417 PR c/83056
3418 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3419 earlier failed lookups.
3420
1af4ebf5
MG
34212017-11-21 Marc Glisse <marc.glisse@inria.fr>
3422
3423 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3424 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3425
26edace6
DM
34262017-11-20 David Malcolm <dmalcolm@redhat.com>
3427
3428 PR c/81404
3429 * c-decl.c: Include "c-family/known-headers.h".
3430 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3431 to known-headers.cc.
3432 (class suggest_missing_header): Move to known-header.h.
3433 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3434 than get_c_name_hint.
3435
b1212255
DM
34362017-11-20 David Malcolm <dmalcolm@redhat.com>
3437
3438 * c-decl.c (get_c_name_hint): New function.
3439 (class suggest_missing_header): New class.
3440 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3441 suggest missing headers to the user.
3442
6c7a259b
DM
34432017-11-20 David Malcolm <dmalcolm@redhat.com>
3444
3445 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3446 Include "c-family/name-hint.h"
3447 (implicit_decl_warning): Convert "hint" from
3448 const char * to name_hint. Pass location to
3449 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3450 warning was not printed.
3451 (undeclared_variable): Likewise for "guessed_id".
3452 (lookup_name_fuzzy): Convert return type from const char *
3453 to name_hint. Add location_t param.
3454 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3455 Include "c-family/name-hint.h"
3456 (c_parser_declaration_or_fndef): Convert "hint" from
3457 const char * to name_hint. Pass location to lookup_name_fuzzy.
3458 (c_parser_parameter_declaration): Likewise.
3459
f9c59f7e
JJ
34602017-11-19 Jakub Jelinek <jakub@redhat.com>
3461
3462 PR c/66618
3463 PR c/69960
3464 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3465 where needed.
3466 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3467 handle_omp_array_sections): Likewise.
3468 (digest_init): Don't call decl_constant_value_for_optimization.
3469 * c-tree.h (decl_constant_value_for_optimization): Removed.
3470 * c-fold.c (c_fold_array_ref): New function.
3471 (c_fully_fold_internal): Add LVAL argument, propagate it through
3472 recursive calls. For VAR_P call decl_constant_value and
3473 unshare if not LVAL and either optimizing or IN_INIT. Remove
3474 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3475 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3476 (c_fully_fold): Add LVAL argument, pass it through to
3477 c_fully_fold_internal.
3478 (decl_constant_value_for_optimization): Removed.
3479
3ca0dc60
JM
34802017-11-15 Joseph Myers <joseph@codesourcery.com>
3481
3482 PR c/81156
3483 * c-parser.c (check_tgmath_function): New function.
3484 (enum tgmath_parm_kind): New enum.
3485 (c_parser_postfix_expression): Handle __builtin_tgmath.
3486
64a5912c
DM
34872017-10-31 David Malcolm <dmalcolm@redhat.com>
3488
3489 * c-decl.c (implicit_decl_warning): Update for renaming of
3490 pedwarn_at_rich_loc and warning_at_rich_loc.
3491 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3492 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3493 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3494 (c_parser_struct_or_union_specifier): Likewise for renaming of
3495 pedwarn_at_rich_loc.
3496 (c_parser_parameter_declaration): Likewise for renaming of
3497 error_at_rich_loc.
3498 * c-typeck.c (build_component_ref): Likewise.
3499 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3500 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3501 (set_init_label): Likewise for renaming of error_at_rich_loc.
3502
c1136864
RB
35032017-10-30 Richard Biener <rguenther@suse.de>
3504
3505 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3506 stmts.
3507
ee5fd23a
MM
35082017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3509
3510 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3511 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3512
1a59ccf2
DM
35132017-10-25 David Malcolm <dmalcolm@redhat.com>
3514
3515 PR c/7356
3516 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3517 semicolons.
3518
bc1a75dd
JJ
35192017-10-25 Jakub Jelinek <jakub@redhat.com>
3520
3521 PR libstdc++/81706
3522 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3523 newdecl to corresponding __builtin_ if any.
3524
ff1ff960
PC
35252017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3526
3527 PR c++/82466
3528 * c-decl.c (diagnose_mismatched_decls): Use
3529 OPT_Wbuiltin_declaration_mismatch.
3530
62e1c678
DM
35312017-10-12 David Malcolm <dmalcolm@redhat.com>
3532
3533 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3534 use it to guard calls to maybe_suggest_missing_token_insertion.
3535 (c_parser_parms_list_declarator): Override default value of new
3536 "type_is_unique" param to c_parser_require.
3537 (c_parser_asm_statement): Likewise.
3538 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3539 defaulting to true.
3540
a92f6726
NS
35412017-10-11 Nathan Sidwell <nathan@acm.org>
3542
3543 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3544
8e6cdc90
RS
35452017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3546
3547 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3548 operating on trees as wide_ints.
3549 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3550 (c_tree_equal): Likewise.
3551
8139a48e
DM
35522017-10-04 David Malcolm <dmalcolm@redhat.com>
3553
3554 * c-decl.c (push_parm_decl): Store c_parm's location into the
3555 PARAM_DECL.
3556 (build_c_parm): Add "loc" param and store it within the c_parm.
3557 * c-parser.c (struct c_parser): Add "last_token_location" field.
3558 (c_parser_consume_token): Store location of the token into the
3559 new field.
3560 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3561 when handling a FUNCTION_DECL, if it doesn't already have them.
3562 (c_parser_parameter_declaration): Generate a location for the
3563 parameter, and pass it to the call to build_c_parm.
3564 * c-tree.h (struct c_parm): Add field "loc".
3565 (build_c_parm): Add location_t param.
3566 * c-typeck.c (get_fndecl_argument_location): New function.
3567 (inform_for_arg): New function.
3568 (convert_for_assignment): Use inform_for_arg when dealing with
3569 ic_argpass.
3570
2a389958
JJ
35712017-09-29 Jakub Jelinek <jakub@redhat.com>
3572
7d386d45
JJ
3573 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3574 width is non-NULL.
3575 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3576 don't SET_DECL_C_BIT_FIELD here.
3577
2a389958
JJ
3578 PR c/82340
3579 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3580 instead of trying to set just TREE_READONLY manually.
3581
ebc6a85e
TV
35822017-09-16 Tom de Vries <tom@codesourcery.com>
3583
3584 PR c/81875
3585 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3586 cond itself.
3587
bb75facd
JM
35882017-09-15 Joseph Myers <joseph@codesourcery.com>
3589
3590 PR c/82071
3591 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3592 for C11.
3593 (build_conditional_expr): For C11, generate result with excess
3594 precision when one argument is an integer and the other is of a
3595 type using excess precision.
3596
1d933576
BE
35972017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3598
3599 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3600
267bbb6f
MP
36012017-09-13 Marek Polacek <polacek@redhat.com>
3602
3603 PR c/82167
3604 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3605 than expr.original_type.
3606
6836632e
NS
36072017-09-12 Nathan Sidwell <nathan@acm.org>
3608
3609 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3610 resort_sorted_fields): Moved from c-family/c-common.c.
3611 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3612
e035be33
JM
36132017-09-01 Joseph Myers <joseph@codesourcery.com>
3614
3615 PR c/82071
3616 * c-typeck.c (build_atomic_assign): Handle argument with excess
3617 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3618 argument passed to build_binary_op and convert_for_assignment but
3619 not for call to c_fully_fold.
3620 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3621 Ensure build_binary_op is called with argument with original
3622 semantic type. Avoid calling c_fully_fold with an
3623 EXCESS_PRECISION_EXPR from build_binary_op.
3624
d2e05fcb
JJ
36252017-09-01 Jakub Jelinek <jakub@redhat.com>
3626
3627 PR c/81887
3628 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3629
b397965c
RS
36302017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3631 Alan Hayward <alan.hayward@arm.com>
3632 David Sherwood <david.sherwood@arm.com>
3633
3634 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3635 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3636 m1 and m2 to the signed equivalent of a fixed-point
3637 SCALAR_TYPE_MODE.
3638
14e18d71
DM
36392017-08-24 David Malcolm <dmalcolm@redhat.com>
3640
3641 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3642 than CAN_HAVE_LOCATION_P when determining whether to use the
3643 location_t value within "value".
3644
7f204c0f
DM
36452017-08-21 David Malcolm <dmalcolm@redhat.com>
3646
3647 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3648 rather than peeking the location of the first token.
3649 * c-tree.h (c_expr::get_location): New method.
3650
2f687306
DM
36512017-08-21 David Malcolm <dmalcolm@redhat.com>
3652
3653 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3654 to check_function_arguments.
3655
3e7b80d7
MP
36562017-08-18 Marek Polacek <polacek@redhat.com>
3657
3658 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3659 commentary.
3660
00aa1fa2
L
36612017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3662
3663 PR c/53037
3664 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3665 (check_bitfield_type_and_width): Don't allow bit-field with
3666 warn_if_not_aligned type.
3667
da67acb9
MS
36682017-08-14 Martin Sebor <msebor@redhat.com>
3669
3670 PR c/81117
3671 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3672
bb85aa74
MP
36732017-08-11 Marek Polacek <polacek@redhat.com>
3674
3675 PR c/81795
3676 * c-decl.c (pushtag): Only print inform if the warning was printed.
3677 (grokdeclarator): Likewise.
3678
32129a17
DM
36792017-08-10 David Malcolm <dmalcolm@redhat.com>
3680
3681 * c-parser.c (c_parser_error): Rename to...
3682 (c_parser_error_richloc): ...this, making static, and adding
3683 "richloc" parameter, passing it to the c_parse_error call,
3684 rather than calling c_parser_set_source_position_from_token.
3685 (c_parser_error): Reintroduce, reimplementing in terms of the
3686 above, converting return type from void to bool.
3687 (class token_pair): New class.
3688 (struct matching_paren_traits): New struct.
3689 (matching_parens): New typedef.
3690 (struct matching_brace_traits): New struct.
3691 (matching_braces): New typedef.
3692 (get_matching_symbol): New function.
3693 (c_parser_require): Add param MATCHING_LOCATION, using it to
3694 highlight matching "opening" tokens for missing "closing" tokens.
3695 (c_parser_skip_until_found): Likewise.
3696 (c_parser_static_assert_declaration_no_semi): Convert explicit
3697 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3698 class matching_parens, so that the pertinent open parenthesis is
3699 highlighted when there are problems locating the close
3700 parenthesis.
3701 (c_parser_struct_or_union_specifier): Likewise.
3702 (c_parser_typeof_specifier): Likewise.
3703 (c_parser_alignas_specifier): Likewise.
3704 (c_parser_simple_asm_expr): Likewise.
3705 (c_parser_braced_init): Likewise, for matching_braces.
3706 (c_parser_paren_condition): Likewise, for matching_parens.
3707 (c_parser_switch_statement): Likewise.
3708 (c_parser_for_statement): Likewise.
3709 (c_parser_asm_statement): Likewise.
3710 (c_parser_asm_operands): Likewise.
3711 (c_parser_cast_expression): Likewise.
3712 (c_parser_sizeof_expression): Likewise.
3713 (c_parser_alignof_expression): Likewise.
3714 (c_parser_generic_selection): Likewise.
3715 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3716 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3717 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3718 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3719 c_parser_skip_until_found call.
3720 (c_parser_objc_class_definition): Use class matching_parens as
3721 above.
3722 (c_parser_objc_method_decl): Likewise.
3723 (c_parser_objc_try_catch_finally_statement): Likewise.
3724 (c_parser_objc_synchronized_statement): Likewise.
3725 (c_parser_objc_at_property_declaration): Likewise.
3726 (c_parser_oacc_wait_list): Likewise.
3727 (c_parser_omp_var_list_parens): Likewise.
3728 (c_parser_omp_clause_collapse): Likewise.
3729 (c_parser_omp_clause_default): Likewise.
3730 (c_parser_omp_clause_if): Likewise.
3731 (c_parser_omp_clause_num_threads): Likewise.
3732 (c_parser_omp_clause_num_tasks): Likewise.
3733 (c_parser_omp_clause_grainsize): Likewise.
3734 (c_parser_omp_clause_priority): Likewise.
3735 (c_parser_omp_clause_hint): Likewise.
3736 (c_parser_omp_clause_defaultmap): Likewise.
3737 (c_parser_oacc_single_int_clause): Likewise.
3738 (c_parser_omp_clause_ordered): Likewise.
3739 (c_parser_omp_clause_reduction): Likewise.
3740 (c_parser_omp_clause_schedule): Likewise.
3741 (c_parser_omp_clause_num_teams): Likewise.
3742 (c_parser_omp_clause_thread_limit): Likewise.
3743 (c_parser_omp_clause_aligned): Likewise.
3744 (c_parser_omp_clause_linear): Likewise.
3745 (c_parser_omp_clause_safelen): Likewise.
3746 (c_parser_omp_clause_simdlen): Likewise.
3747 (c_parser_omp_clause_depend): Likewise.
3748 (c_parser_omp_clause_map): Likewise.
3749 (c_parser_omp_clause_device): Likewise.
3750 (c_parser_omp_clause_dist_schedule): Likewise.
3751 (c_parser_omp_clause_proc_bind): Likewise.
3752 (c_parser_omp_clause_uniform): Likewise.
3753 (c_parser_omp_for_loop): Likewise.
3754 (c_parser_cilk_clause_vectorlength): Likewise.
3755 (c_parser_cilk_clause_linear): Likewise.
3756 (c_parser_transaction_expression): Likewise.
3757 * c-parser.h (c_parser_require): Add param matching_location with
3758 default UNKNOWN_LOCATION.
3759 (c_parser_error): Convert return type from void to bool.
3760 (c_parser_skip_until_found): Add param matching_location with
3761 default UNKNOWN_LOCATION.
3762
30af3a2b
MP
37632017-08-09 Marek Polacek <polacek@redhat.com>
3764
3765 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3766 * c-tree.h (build_external_ref): Update declaration.
3767 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3768 (build_external_ref): Change the type of a parameter to bool.
3769 (parser_build_binary_op): Use true/false instead of 1/0.
3770 (pointer_diff): Likewise.
3771 (build_modify_expr): Likewise.
3772 (set_designator): Change the type of a parameter to bool.
3773 (set_init_index): Use true/false instead of 1/0.
3774 (set_init_label): Likewise.
3775 (output_init_element): Change the type of a parameter to bool.
3776 (output_pending_init_elements): Use true/false instead of 1/0.
3777 (process_init_element): Likewise.
3778 (build_binary_op): Change the type of a parameter to bool.
3779
296c53ac
MP
37802017-08-09 Marek Polacek <polacek@redhat.com>
3781
3782 PR c/81233
3783 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3784 Call emit_diagnostic_valist instead of pedwarn.
3785 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3786 Print the relevant types in diagnostics.
3787
a32c8316
MP
37882017-08-09 Marek Polacek <polacek@redhat.com>
3789
3790 PR c/81417
3791 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3792 build_conditional_expr.
a32c8316
MP
3793 * c-parser.c (c_parser_conditional_expression): Create locations for
3794 EXP1 and EXP2 from their source ranges. Pass the locations down to
3795 build_conditional_expr.
3796 * c-tree.h (build_conditional_expr): Update declaration.
3797 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3798 For -Wsign-compare, also print the types.
3799
314e6352
ML
38002017-08-08 Martin Liska <mliska@suse.cz>
3801
3802 * c-convert.c: Include header files.
3803 * c-typeck.c: Likewise.
3804
577eec56
ML
38052017-08-07 Martin Liska <mliska@suse.cz>
3806
3807 * c-parser.c (c_parser_attributes): Canonicalize name of an
3808 attribute.
3809
f7b6353a
MP
38102017-08-02 Marek Polacek <polacek@redhat.com>
3811
3812 PR c/81289
3813 * c-parser.c (c_parser_unary_expression): Use set_error.
3814
8a6eab34
MP
3815 PR c/81448
3816 PR c/81306
3817 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3818 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3819
ab20d992 38202017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3821 Martin Liska <mliska@suse.cz>
3822
3823 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3824 statement.
7fef86d3 3825
f34ebeb2
ML
38262017-07-31 Martin Liska <mliska@suse.cz>
3827
3828 PR sanitize/81530
3829 * c-convert.c (convert): Guard condition with flag_sanitize_p
3830 also with current_function_decl non-null equality.
3831 * c-decl.c (grokdeclarator): Likewise.
3832 * c-typeck.c (build_binary_op): Likewise.
3833
8595f67b
MP
38342017-07-25 Marek Polacek <polacek@redhat.com>
3835
3836 * c-decl.c (grokfield): Remove local variable.
3837
d49718d6
MP
38382017-07-25 Marek Polacek <polacek@redhat.com>
3839
3840 PR c/81364
3841 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3842 macro expansion if the body is in { }.
3843 (c_parser_while_statement): Likewise.
3844 (c_parser_for_statement): Likewise.
3845
ff22eb12
NS
38462017-07-18 Nathan Sidwell <nathan@acm.org>
3847
3848 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3849
eea77d1f
DM
38502017-07-14 David Malcolm <dmalcolm@redhat.com>
3851
3852 * c-decl.c (implicitly_declare): When suggesting a missing
3853 #include, provide a fix-it hint.
3854
b6f43128
DM
38552017-07-06 David Malcolm <dmalcolm@redhat.com>
3856
3857 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3858 and call that instead.
3859 * c-tree.h (selftest::run_c_tests): New decl.
3860
3e2becc4
MP
38612017-06-26 Marek Polacek <polacek@redhat.com>
3862
3863 PR c/80116
3864 * c-parser.c (c_parser_if_body): Set the location of the
3865 body of the conditional after parsing all the labels. Call
3866 warn_for_multistatement_macros.
3867 (c_parser_else_body): Likewise.
3868 (c_parser_switch_statement): Likewise.
3869 (c_parser_while_statement): Likewise.
3870 (c_parser_for_statement): Likewise.
3871 (c_parser_statement): Add a default argument. Save the location
3872 after labels have been parsed.
3873 (c_parser_c99_block_statement): Likewise.
3874
343ae898
RB
38752017-06-19 Richard Biener <rguenther@suse.de>
3876
3877 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3878 negated _Literals to parse _Literal (int) -1.
3879
45b2222a
ML
38802017-06-13 Martin Liska <mliska@suse.cz>
3881
3882 PR sanitize/78204
3883 * c-convert.c (convert): Use sanitize_flags_p.
3884 * c-decl.c (grokdeclarator): Likewise.
3885 * c-typeck.c (convert_for_assignment): Likewise.
3886 (c_finish_return): Likewise.
3887 (build_binary_op): Likewise.
3888
8ab7005b
JJ
38892017-06-08 Jakub Jelinek <jakub@redhat.com>
3890
3891 PR c/81006
3892 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3893 to sizetype before size_binop.
3894
363dc72c
JJ
38952017-06-07 Jakub Jelinek <jakub@redhat.com>
3896
3897 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3898 of TDI_generic.
3899
dc949728
MP
39002017-06-06 Marek Polacek <polacek@redhat.com>
3901
3902 PR c/79983
3903 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3904 ref.
3905 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3906
40ffd95f
BE
39072017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3908
3909 * c-parser.c (c_parser_binary_expression): Implement the
3910 -Wsizeof_pointer_div warning.
3911 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3912 from a parenthesized expression.
3913 (c_parser_expr_list): Use c_last_sizeof_loc.
3914 * c-tree.h (c_last_sizeof_loc): New external.
3915 * c-typeck.c (c_last_sizeof_loc): New variable.
3916 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3917
9fc5e7a4
MM
39182017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3919
3920 PR testsuite/80580
3921 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3922
f012c8ef
DM
39232017-05-30 David Malcolm <dmalcolm@redhat.com>
3924
3925 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3926 parameters.
3927
3cd211af
MS
39282017-05-24 Martin Sebor <msebor@redhat.com>
3929
3930 PR c/80731
3931 * c-fold.c (c_fully_fold_internal): Adjust.
3932 * c-typeck.c (parser_build_unary_op): Adjust.
3933
fd71a9a2
TS
39342017-05-23 Thomas Schwinge <thomas@codesourcery.com>
3935
3936 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
3937 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
3938 "VECTOR_LENGTH".
3939
92fa0f9e
MP
39402017-05-23 Marek Polacek <polacek@redhat.com>
3941
3942 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
3943 quotes.
3944
d11c168a
JJ
39452017-05-22 Jakub Jelinek <jakub@redhat.com>
3946
3947 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
3948 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
3949 it returned invariant. Call tree_invariant_p unconditionally
3950 afterwards to decide whether to return expr or op0.
3951
58aca9d9
NS
39522017-05-22 Nathan Sidwell <nathan@acm.org>
3953
3954 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
3955
7fd549d2
TS
39562017-05-19 Thomas Schwinge <thomas@codesourcery.com>
3957
3958 * c-parser.c (c_parser_omp_clause_default): Handle
3959 "OMP_CLAUSE_DEFAULT_PRESENT".
3960
6ecd2339
BE
39612017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3962
3963 * config-lang.in (gtfiles): Add c-family/c-format.c.
3964
8a57ecff
NS
39652017-05-18 Nathan Sidwell <nathan@acm.org>
3966
3967 * c-decl.c (pushdecl_top_level): Delete unused function.
3968
6574d78e
MP
39692017-05-18 Marek Polacek <polacek@redhat.com>
3970
3971 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
3972 (check_earlier_gotos): Likewise.
3973 (define_label): Likewise.
3974 (pending_xref_error): Likewise.
3975 (smallest_type_quals_location): Likewise.
3976 (grokdeclarator): Likewise.
3977 (grokparms): Likewise.
3978 (identifier_global_value): Likewise.
3979 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
3980 (find_init_member): Likewise.
3981
e3455240
MP
39822017-05-18 Marek Polacek <polacek@redhat.com>
3983
3984 * c-decl.c (start_decl): Use false/true instead of 0/1.
3985 (grokdeclarator): Likewise.
3986 (finish_struct): Likewise.
3987 (start_function): Change the return type to bool. Use false/true
3988 instead of 0/1.
3989 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
3990 * c-tree.h (start_function): Update.
3991 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
3992 (set_designator): Change the return type to bool. Use false/true
3993 instead of 0/1.
3994
3fa8871b
MP
39952017-05-17 Marek Polacek <polacek@redhat.com>
3996
3997 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
3998 * c-typeck.c: Likewise.
3999
142473df
MP
40002017-05-17 Marek Polacek <polacek@redhat.com>
4001
4002 PR sanitizer/80659
4003 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
4004 DECL_IGNORED_P even for non-static compound literals.
4005
1a817418
ML
40062017-05-17 Martin Liska <mliska@suse.cz>
4007
4008 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
4009 use it instead of int type.
4010
b2fa0a8b
MP
40112017-05-17 Marek Polacek <polacek@redhat.com>
4012
4013 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
4014 call c_fully_fold.
4015 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 4016 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
4017 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
4018 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
4019 save_expr.
4020 (c_parser_conditional_expression): Likewise.
4021 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
4022 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
4023 (process_init_element): Likewise.
4024 (build_binary_op): Likewise.
4025 (handle_omp_array_sections_1): Likewise.
4026
1e47f02b
TS
40272017-05-12 Thomas Schwinge <thomas@codesourcery.com>
4028
4029 * c-parser.c (c_parser_omp_clause_num_gangs)
4030 (c_parser_omp_clause_num_workers)
4031 (c_parser_omp_clause_vector_length): Merge functions into...
4032 (c_parser_oacc_single_int_clause): ... this new function. Adjust
4033 all users.
4034
c24e924f
NS
40352017-05-11 Nathan Sidwell <nathan@acm.org>
4036
4037 * gimple-parser.c: Don't #include tree-dump.h.
4038
c587104e
MM
40392017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4040
4041 PR testsuite/80580
4042 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
4043
67ac9a9d
MM
40442017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4045
4046 PR testsuite/80580
4047 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4048 incorrect __MEM syntax.
4049
ac4eb40f
MM
40502017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4051
4052 PR testsuite/80580
4053 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
4054 type of unary '*'.
4055
641da50a
NS
40562017-05-09 Nathan Sidwell <nathan@acm.org>
4057
4058 * c-tree.h (pushdecl): Declare.
4059
56d35585
DM
40602017-05-05 David Malcolm <dmalcolm@redhat.com>
4061
4062 * c-decl.c (warn_defaults_to): Replace report_diagnostic
4063 with diagnostic_report_diagnostic.
4064 * c-errors.c (pedwarn_c99): Likewise.
4065 (pedwarn_c90): Likewise.
4066
815d9cc6
XR
40672017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4068
92a285c1 4069 PR c++/80038
815d9cc6
XR
4070 * c-gimplify.c (c_gimplify_expr): Remove calls to
4071 cilk_gimplifY_call_params_in_spawned_fn.
4072
1c4ea66f
DM
40732017-04-25 David Malcolm <dmalcolm@redhat.com>
4074
4075 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
4076 hint for removing extra semicolon.
4077
666f7903
JJ
40782017-04-21 Jakub Jelinek <jakub@redhat.com>
4079
4080 PR c/80468
4081 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
4082 enabled, set specs->type to integer_type_node.
4083
5764ee3c
JW
40842017-04-03 Jonathan Wakely <jwakely@redhat.com>
4085
4086 * c-array-notation.c: Fix typo in comment.
4087
10fa8dfb
MP
40882017-03-29 Marek Polacek <polacek@redhat.com>
4089
4090 PR c/79730
4091 * c-decl.c (finish_decl): Check VAR_P.
4092
a9e4a1a5
JJ
40932017-03-27 Jakub Jelinek <jakub@redhat.com>
4094
4095 PR middle-end/80162
4096 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
4097 * c-typeck.c (c_mark_addressable): Likewise. Look through
4098 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
4099 to ARRAY_TYPE.
4100 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
4101
ee3ff394
MP
41022017-03-23 Marek Polacek <polacek@redhat.com>
4103
4104 * c-tree.h: Remove a C_RID_YYCODE reference.
4105
4d1b8e70
JJ
41062017-03-21 Jakub Jelinek <jakub@redhat.com>
4107
4108 PR c/80097
4109 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
4110 optional COMPOUND_EXPR with ubsan instrumentation.
4111
31dc71a8
MP
41122017-03-17 Marek Polacek <polacek@redhat.com>
4113
4114 * c-parser.c: Add C11 references.
4115
d579c385
MP
41162017-03-15 Marek Polacek <polacek@redhat.com>
4117
4118 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
4119
85059a38
MP
41202017-03-11 Marek Polacek <polacek@redhat.com>
4121
4122 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
4123
2f6f187a
DM
41242017-03-10 David Malcolm <dmalcolm@redhat.com>
4125
4126 PR translation/79848
4127 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
4128 "%qs".
4129 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
4130
36618428
MP
41312017-03-09 Marek Polacek <polacek@redhat.com>
4132
4133 PR sanitizer/79757
4134 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
4135 parameter declarations with initializers.
4136
01e5af5a
JJ
41372017-03-09 Jakub Jelinek <jakub@redhat.com>
4138
4139 PR c/79969
4140 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
4141 TYPE_STUB_DECL.
4142
a71dbc63
JJ
41432017-03-07 Jakub Jelinek <jakub@redhat.com>
4144
4145 PR c/79834
4146 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
4147 for "may only be used in compound statements" diagnostics, change it
4148 such that the same translatable string is used for all pragmas. For
4149 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
4150 diagnostics.
4151 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
4152 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
4153 "may only be used in compound statements" diagnostics, such that the
4154 same translatable string is used for all pragmas.
4155
1ff4bae6
MP
41562017-03-04 Marek Polacek <polacek@redhat.com>
4157
4158 PR c/79847
4159 * c-decl.c (implicit_decl_warning): Add missing space.
4160
7f5a7d78
MP
41612017-03-03 Marek Polacek <polacek@redhat.com>
4162
4163 PR c/79758
4164 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
4165 current_function_prototype_arg_types is error_mark_node. Fix
4166 formatting. Use TREE_VALUE instead of TREE_TYPE.
4167
883c8f06
JJ
41682017-03-03 Jakub Jelinek <jakub@redhat.com>
4169
79c9b7a8
JJ
4170 PR c/79837
4171 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
4172 %<min%> or %<max%> in the diagnostics, instead mention identifier.
4173 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
4174 diagnostics.
4175
883c8f06
JJ
4176 PR c/79836
4177 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
4178 instead of %<_Generic>.
4179 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4180 (c_parser_omp_target_exit_data): Use %<release%> instead of
4181 %<release>.
4182
324ff1a0
JJ
41832017-02-28 Jakub Jelinek <jakub@redhat.com>
4184
4185 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4186 instead of just cond ? "..." : "...".
4187 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4188 for "enter"/"exit" keyword.
4189 (c_finish_oacc_routine): Don't use %s to supply portions of the
4190 message.
4191
4227c9ad
JJ
41922017-02-24 Jakub Jelinek <jakub@redhat.com>
4193
4194 PR c++/79588
4195 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4196 handle -Wrestrict here.
4197 * c-typeck.c (build_function_call_vec): Adjust
4198 check_function_arguments caller.
4199
5d972e66
RB
42002017-02-23 Richard Biener <rguenther@suse.de>
4201
4202 PR c/79684
4203 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4204 to initialize c_exprs to return.
4205 (c_parser_gimple_binary_expression): Likewise.
4206 (c_parser_gimple_unary_expression): Likewise.
4207 (c_parser_gimple_postfix_expression): Likewise.
4208
61ac5ebe
MP
42092017-02-22 Marek Polacek <polacek@redhat.com>
4210
4211 PR c/79662
4212 * c-typeck.c (convert_arguments): Handle error_mark_node.
4213
41d1b0b1
PK
42142017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4215
4216 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4217 value of c_parser_parse_ssa_name against error_mark_node and emit
4218 error if ssa name is anonymous and written as default definition.
4219
eab1f169
PK
42202017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4221
4222 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4223 FMA_EXPR.
4224
bcac0b4d
JJ
42252017-02-16 Jakub Jelinek <jakub@redhat.com>
4226
4227 PR c++/79512
4228 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4229 ignore #pragma omp target even when not followed by identifier.
4230
1be33173
PK
42312017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4232
4233 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4234 (c_parser_gimple_unary_expression): Likewise.
4235
aa326bfb
JJ
42362017-02-13 Jakub Jelinek <jakub@redhat.com>
4237
4238 * c-parser.c (c_parser_oacc_declare): Add missing space in
4239 diagnostics.
4240
8a398bc5
PK
42412017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4242
4243 PR c/79478
4244 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4245 set_c_expr_source_range when parsing ssa-name.
4246
3dcde5ef 42472017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 4248 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
4249
4250 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4251 building IL when arguments are error_mark_node.
4252 (c_parser_gimple_unary_expression): Likewise.
4253 (c_parser_gimple_if_stmt): Likewise.
4254 (c_parser_gimple_switch_stmt): Likewise.
4255 (c_parser_gimple_return_stmt): Likewise.
4256 (c_parser_parse_ssa_name): When name lookup fails do not build
4257 an SSA name. Use undeclared rather than not declared in error
4258 reporting.
4259
192b048b
MP
42602017-02-09 Marek Polacek <polacek@redhat.com>
4261
4262 PR c/79428
4263 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4264 instead of c_parser_skip_until_found.
4265
56f71478
JJ
42662017-02-09 Jakub Jelinek <jakub@redhat.com>
4267
4268 PR c/79431
4269 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4270 symtab_node::get on automatic variables.
4271
02889d23
CLT
42722016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4273 Chung-Lin Tang <cltang@codesourcery.com>
4274
4275 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4276 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4277 semantic checking.
4278 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4279
7af4b20d
RB
42802017-02-07 Richard Biener <rguenther@suse.de>
4281
4282 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4283 (c_parser_gimple_postfix_expression_after_primary):
4284 Do not use c_build_function_call_vec to avoid folding and promotion.
4285 Simplify.
4286
e5e391d6
MO
42872017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4288
4289 PR lto/79061
4290 * c-decl.c (pop_scope): Pass main_input_filename to
4291 build_translation_unit_decl.
4292
c2e84327
DM
42932017-01-24 David Malcolm <dmalcolm@redhat.com>
4294
4295 * c-parser.c: Include "read-rtl-function.h" and
4296 "run-rtl-passes.h".
4297 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4298 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4299 production. Update for renaming of field "gimple_pass" to
4300 "gimple_or_rtl_pass". If __RTL was seen, call
4301 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4302 to an auto_timevar, to cope with early exit.
4303 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4304 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4305 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4306 Handle RID_RTL.
4307 (c_parser_parse_rtl_body): New function.
4308 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4309 (struct c_declspecs): Rename field "gimple_pass" to
4310 "gimple_or_rtl_pass". Add field "rtl_p".
4311 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4312 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4313 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4314 (c_parser_gimple_or_rtl_pass_list): ...this.
4315
2ebd93e1
MP
43162017-01-20 Marek Polacek <polacek@redhat.com>
4317
4318 PR c/64279
4319 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4320
b1c95bb5
RB
43212017-01-13 Richard Biener <rguenther@suse.de>
4322
4323 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4324 nops.
4325
25329913
RB
43262017-01-13 Richard Biener <rguenther@suse.de>
4327
4328 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4329 _Literal ( type-name ) number.
4330
6bb4ea5c
RB
43312017-01-12 Richard Biener <rguenther@suse.de>
4332
4333 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4334 __MEM.
4335
6b5b4e9c
JJ
43362017-01-11 Jakub Jelinek <jakub@redhat.com>
4337
4338 PR c++/72813
4339 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4340 PCH file.
4341
e3252775
RB
43422017-01-11 Richard Biener <rguenther@suse.de>
4343
4344 PR bootstrap/79052
4345 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4346 returns on parse errors.
4347
a9342885
MP
43482017-01-04 Marek Polacek <polacek@redhat.com>
4349
4350 PR c++/64767
4351 * c-parser.c (c_parser_postfix_expression): Mark zero character
4352 constants by setting original_type in c_expr.
4353 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4354 with a zero character constant.
4355 (char_type_p): New function.
4356
5dd9a9d0
DM
43572017-01-04 David Malcolm <dmalcolm@redhat.com>
4358
4359 * c-parser.c (c_parser_declaration_or_fndef): Create a
4360 rich_location at init_loc and parse it to start_init.
4361 (last_init_list_comma): New global.
4362 (c_parser_braced_init): Update last_init_list_comma when parsing
4363 commas. Pass it to pop_init_level. Pass location of closing
4364 brace to pop_init_level.
4365 (c_parser_postfix_expression_after_paren_type): Create a
4366 rich_location at type_loc and parse it to start_init.
4367 (c_parser_omp_declare_reduction): Likewise for loc.
4368 * c-tree.h (start_init): Add rich_location * param.
4369 (pop_init_level): Add location_t param.
4370 * c-typeck.c (struct initializer_stack): Add field
4371 "missing_brace_richloc".
4372 (start_init): Add richloc param, use it to initialize
4373 the stack node's missing_brace_richloc.
4374 (last_init_list_comma): New decl.
4375 (finish_implicit_inits): Pass last_init_list_comma to
4376 pop_init_level.
4377 (push_init_level): When finding missing open braces, add fix-it
4378 hints to the richloc.
4379 (pop_init_level): Add "insert_before" param and pass it
4380 when calling pop_init_level. Add fixits about missing
4381 close braces to any richloc. Use the richloc for the
4382 -Wmissing-braces warning.
4383 (set_designator): Pass last_init_list_comma to pop_init_level.
4384 (process_init_element): Likewise.
4385
cbe34bb5
JJ
43862017-01-01 Jakub Jelinek <jakub@redhat.com>
4387
4388 Update copyright years.
4389
d17680f3
JJ
43902016-12-21 Jakub Jelinek <jakub@redhat.com>
4391
0dba7960
JJ
4392 PR bootstrap/78817
4393 * c-typeck.c (build_function_call_vec): If check_function_arguments
4394 returns true, set TREE_NO_WARNING on CALL_EXPR.
4395
d17680f3
JJ
4396 PR c/77767
4397 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4398 to *expr instead of overwriting it.
4399
aa90531e
RB
44002016-12-20 Richard Biener <rguenther@suse.de>
4401
4402 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4403 error recovery.
4404 (c_parser_gimple_statement): Only build assigns for non-error
4405 stmts.
4406 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4407
629b3d75
MJ
44082016-12-14 Martin Jambor <mjambor@suse.cz>
4409
4410 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4411 omp-low.h.
4412 (c_finish_oacc_routine): Adjusted call to
4413 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4414 to use their new names.
4415 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4416 use its new name.
4417 (c_parser_oacc_update): Likewise.
4418 (c_parser_omp_simd): Likewise.
4419 (c_parser_omp_target_update): Likewise.
4420 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4421 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4422 name.
4423 (c_finish_omp_cancellation_point): Likewise.
4424 * gimple-parser.c: Do not include omp-low.h
4425
c5af52eb
CP
44262016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4427 James Norris <jnorris@codesourcery.com>
4428
4429 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4430 EXIT_DATA,WAIT} are not used in compound statements.
4431 (c_parser_oacc_enter_exit_data): Update diagnostics.
4432
48330c93
BE
44332016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4434
4435 PR c++/71973
4436 * c-decl.c (diagnose_mismatched_decls): Use
4437 OPT_Wbuiltin_declaration_mismatch here too.
4438
899ca90e 44392016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
4440 Alan Hayward <alan.hayward@arm.com>
4441 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
4442
4443 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4444 (make_label, finish_struct): Likewise.
4445
1ee62b92 44462016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 4447 Richard Biener <rguenther@suse.de>
22b15758 4448
8e745a17
JJ
4449 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4450 * config-lang.in (gtfiles): Add c/c-parser.h.
4451 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4452 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4453 * c-parser.c (enum c_id_kind, struct c_token,
4454 c_parser_next_token_is, c_parser_next_token_is_not,
4455 c_parser_next_token_is_keyword,
4456 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4457 Split out to ...
4458 * c-parser.h: ... new header.
4459 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 4460 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
4461 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4462 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4463 c_parser_error, c_parser_require, c_parser_skip_until_found,
4464 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4465 c_parser_type_name): Export.
4466 (c_parser_tokens_buf): New function.
4467 (c_parser_error): Likewise.
4468 (c_parser_set_error): Likewise.
4469 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
4470 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4471 via c_parser_parse_gimple_body.
8e745a17
JJ
4472 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4473 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4474 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4475 c_parser_error, c_parser_require, c_parser_skip_until_found,
4476 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4477 c_parser_type_name): Declare.
1ee62b92
PG
4478 (struct c_parser): Declare forward.
4479 (c_parser_tokens_buf): Declare.
8e745a17
JJ
4480 (c_parser_error): Likewise.
4481 (c_parser_set_error): Likewise.
4482 * gimple-parser.c: New file.
4483 * gimple-parser.h: Likewise.
1ee62b92 4484
22b15758
UB
44852016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4486
4487 PR c/35503
4488 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4489 warn_for_restrict.
4490
84ff4775
LCW
44912016-09-11 Le-Chun Wu <lcwu@google.com>
4492 Mark Wielaard <mjw@redhat.com>
4493
4494 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4495 to the given -Wshadow= variant.
4496
4d0cdd0c
TP
44972016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4498
4499 * c-typeck.c: Include memmodel.h.
4500
1202f33e
JJ
45012016-10-13 Jakub Jelinek <jakub@redhat.com>
4502
4503 PR target/77957
4504 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4505 instead of lhd_return_null_tree_v.
4506
8a14afd0
BS
45072016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4508
4509 PR c++/69733
4510 * c-decl.c (smallest_type_quals_location): New static function.
4511 (grokdeclarator): Try to find the correct location for an ignored
4512 qualifier.
4513
81fea426
MP
45142016-09-26 Marek Polacek <polacek@redhat.com>
4515
4516 PR c/7652
4517 * c-decl.c (pop_scope): Add gcc_fallthrough.
4518
45192016-09-26 Marek Polacek <polacek@redhat.com>
4520
4521 PR c/7652
4522 * c-parser.c (struct c_token): Add flags field.
4523 (c_lex_one_token): Pass it to c_lex_with_flags.
4524 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4525 into IFN_FALLTHROUGH.
4526 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4527 attribute fallthrough after a case label or default label.
4528 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4529
9a2300e9
MP
45302016-09-24 Marek Polacek <polacek@redhat.com>
4531
4532 PR c/77490
4533 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4534 have boolean value. Warn about ++/-- on booleans.
4535
7de76362
JJ
45362016-09-23 Jakub Jelinek <jakub@redhat.com>
4537
4538 * c-parser.c (incomplete_record_decls): Remove unnecessary
4539 = vNULL initialization of file scope vec.
4540
5b73d2ab
MP
45412016-09-16 Marek Polacek <polacek@redhat.com>
4542
4543 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4544
e51fbec3
MP
45452016-09-14 Marek Polacek <polacek@redhat.com>
4546
4547 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4548 (fix_array_notation_expr): Likewise.
4549 * c-decl.c (finish_decl): Likewise.
4550 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4551 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4552 (function_to_pointer_conversion): Use false instead of 0.
4553 (convert_lvalue_to_rvalue): Likewise.
4554 (parser_build_unary_op): Likewise.
4555 (build_atomic_assign): Likewise.
4556 (build_unary_op): Change nonconvert parameter type to bool, use
4557 true/false instead of 1/0.
4558 (build_binary_op): Use true instead of 1.
4559
254830ba
DM
45602016-09-13 David Malcolm <dmalcolm@redhat.com>
4561
4562 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4563 of add_fixit_insert to add_fixit_insert_before.
4564
4c13ba17
MP
45652016-09-13 Marek Polacek <polacek@redhat.com>
4566
4567 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4568 it.
4569
54dcdb88
BE
45702016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4571
4572 PR c++/77496
4573 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4574 COMPOUND_EXPR to warn_for_omitted_condop.
4575
e5106e27
DM
45762016-09-07 David Malcolm <dmalcolm@redhat.com>
4577
4578 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4579 c_get_substring_location for this new langhook.
4580
9dc5773f
JJ
45812016-09-02 Jakub Jelinek <jakub@redhat.com>
4582
4583 PR c/65467
4584 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4585 flag_openmp.
4586 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4587 instead of mark_exp_read on low_bound/length expression.
4588 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4589 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4590 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4591 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4592 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4593 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4594 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4595 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4596 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4597 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4598 instead of mark_expr_read.
4599 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4600 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4601 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4602 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4603 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4604 array section bases outside of depend clause, for depend clause
4605 use convert_lvalue_to_rvalue on the base.
4606 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4607 linear, aligned, map, to and from clauses.
4608 (c_omp_clause_copy_ctor): New function.
4609
295844f6
MP
46102016-09-01 Marek Polacek <polacek@redhat.com>
4611
4612 PR c/7652
4613 * c-typeck.c (composite_type): Add FALLTHRU comment.
4614
089af25c
DM
46152016-08-31 David Malcolm <dmalcolm@redhat.com>
4616
4617 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4618 to the insertion fixits for "struct", "union", and "enum".
4619
f9087798
DM
46202016-08-30 David Malcolm <dmalcolm@redhat.com>
4621
4622 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4623 rather than add_fixit_misspelled_id.
4624 (undeclared_variable): Likewise.
4625 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4626 now-redundant "here" params from add_fixit_insert method calls.
4627 (c_parser_parameter_declaration): Likewise.
4628 * c-typeck.c (build_component_ref): Remove now-redundant range
4629 param from add_fixit_replace method calls.
4630
ebef225f
MP
46312016-08-25 Marek Polacek <polacek@redhat.com>
4632
4633 * c-typeck.c (parser_build_binary_op): Pass LHS to
4634 warn_logical_not_parentheses.
4635
fe377a48
MP
46362016-08-25 Marek Polacek <polacek@redhat.com>
4637
4638 PR c/77323
4639 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4640 or _FloatN or _FloatNx is not supported.
4641 (finish_declspecs): Set type to integer_type_node when _FloatN or
4642 _FloatNx is not supported.
4643
c65699ef
JM
46442016-08-19 Joseph Myers <joseph@codesourcery.com>
4645
4646 PR c/32187
4647 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4648 (struct c_declspecs): Add field floatn_nx_idx.
4649 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4650 and _FloatNx type specifiers.
4651 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4652 (c_parser_declspecs, c_parser_attribute_any_word)
4653 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4654 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4655 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4656 narrower than double.
4657
2f1364c2
JJ
46582016-08-12 Jakub Jelinek <jakub@redhat.com>
4659 Martin Liska <mliska@suse.cz>
4660
4661 PR c/67410
4662 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4663 % to determine val element to change. Assert that
4664 wchar_bytes * charwidth fits into val array.
4665
191816a3
MP
46662016-08-12 Marek Polacek <polacek@redhat.com>
4667
4668 PR c/7652
4669 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4670 (c_parser_postfix_expression): Likewise.
4671 * c-typeck.c (build_unary_op): Adjust fall through comment.
4672 (c_mark_addressable): Likewise.
4673
b95a64bb
JJ
46742016-08-11 Jakub Jelinek <jakub@redhat.com>
4675
4676 PR c/72816
4677 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4678 array member through typedef, for orig_qual_indirect == 0 clear
4679 orig_qual_type.
4680
895aa8e1
DM
46812016-08-08 David Malcolm <dmalcolm@redhat.com>
4682
4683 PR c/64955
4684 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4685 this up to selftest::run_c_tests.
4686 (selftest::run_c_tests): New function.
4687
0b212d8c
TS
46882016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4689
ae9281fc
TS
4690 * c-parser.c (struct oacc_routine_data): Add error_seen and
4691 fndecl_seen members.
4692 (c_finish_oacc_routine): Use these.
4693 (c_parser_declaration_or_fndef): Adjust.
4694 (c_parser_oacc_routine): Likewise. Support more C language
4695 constructs, and improve diagnostics. Move pragma context
4696 checking...
4697 (c_parser_pragma): ... here.
4698
0b212d8c
TS
4699 * c-parser.c (struct oacc_routine_data): New.
4700 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4701 Simplify code.
4702 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4703 declare target" attribute.
4704
76e2c821
JB
47052016-08-01 Jan Beulich <jbeulich@suse.com>
4706
4707 * c-fold.c (c_fully_fold_internal): Also emit shift count
4708 warnings for vector types.
4709 * c-typeck.c (build_binary_op): Likewise.
4710
f618a472
MP
47112016-07-29 Marek Polacek <polacek@redhat.com>
4712
4713 PR c/71742
4714 * c-decl.c (finish_struct): Rephrase an error message.
4715
efd0786f
MP
4716 PR c/71853
4717 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4718 to error node for invalid code.
4719
e00dceaf
MP
4720 PR c/71573
4721 * c-decl.c (implicitly_declare): Return decl early not only for
4722 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4723
673a107a
JJ
47242016-07-29 Jakub Jelinek <jakub@redhat.com>
4725
4726 PR c/71969
4727 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4728 on GNU extern inline functions.
4729
a5b5c8b6
MP
47302016-07-29 Marek Polacek <polacek@redhat.com>
4731
4732 PR c/71583
4733 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4734 check expr.value.
4735
e3fe09c1
UB
47362016-07-22 Uros Bizjak <ubizjak@gmail.com>
4737
4738 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4739
7c8f7eaa
DM
47402016-07-20 David Malcolm <dmalcolm@redhat.com>
4741
4742 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4743 spellcheck-tree.h
4744 (best_macro_match): Likewise, converting from a typedef to a
4745 subclass.
4746 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4747 (lookup_name_fuzzy): Update for change of best_macro_match to a
4748 subclass with a ctor that calls cpp_forall_identifiers.
4749
de6a69ee
DM
47502016-07-20 David Malcolm <dmalcolm@redhat.com>
4751
4752 * c-decl.c (implicit_decl_warning): Update for conversion of
4753 return type of lookup_name_fuzzy to const char *.
4754 (undeclared_variable): Likewise.
4755 (lookup_name_fuzzy): Convert return type from tree to
4756 const char *.
4757 * c-parser.c (c_parser_declaration_or_fndef): Update for
4758 conversion of return type of lookup_name_fuzzy to const char *.
4759 (c_parser_parameter_declaration): Likewise.
4760
b1c9c068
CP
47612016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4762
4763 * c-parser.c (c_parser_oacc_declare): Don't scan for
4764 GOMP_MAP_POINTER.
4765 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4766 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4767 zero-length subarrays.
4768
ddbbcb19
JJ
47692016-07-15 Jakub Jelinek <jakub@redhat.com>
4770
4771 PR c/71858
4772 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4773 instead of FUZZY_LOOKUP_NAME.
4774 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4775 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4776
dd36b877
JJ
47772016-07-14 Jakub Jelinek <jakub@redhat.com>
4778
4779 PR c/71858
4780 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4781
8c681247
TS
47822016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4783
4784 * c-parser.c (c_parser_generic_selection): Make type of variable
4785 auto_vec.
4786 (c_parser_omp_declare_simd): Likewise.
4787
bf4fa671
TS
47882016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4789
4790 * c-decl.c (struct c_struct_parse_info): Change member types
4791 from vec to auto_vec.
4792 (start_struct): Adjust.
4793 (finish_struct): Likewise.
4794
557e8c49
JJ
47952016-07-02 Jakub Jelinek <jakub@redhat.com>
4796
4797 PR c/71719
4798 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4799
54d19c3b
TS
48002016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4801
4802 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4803 Move pragma context checking into...
4804 (c_parser_omp_cancellation_point): ... here, and improve
4805 diagnostic messages.
4806 * c-typeck.c (c_finish_omp_cancel)
4807 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4808
152ef731
JJ
48092016-06-29 Jakub Jelinek <jakub@redhat.com>
4810
4811 PR c/71685
4812 * c-typeck.c (c_build_qualified_type): Don't clear
4813 C_TYPE_INCOMPLETE_VARS for the main variant.
4814
48152016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4816
4817 PR c/71552
4818 * c-typeck.c (output_init_element): Diagnose incompatible types
4819 before non-constant initializers.
4820
e9ac1f86
JJ
48212016-06-28 Jakub Jelinek <jakub@redhat.com>
4822
4823 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4824
277d7ee0
AK
48252016-06-23 Andi Kleen <ak@linux.intel.com>
4826
4827 * Make-lang.in: Add support for autofdo.
4828
1a4f11c8
DM
48292016-06-22 David Malcolm <dmalcolm@redhat.com>
4830
4831 PR c/70339
4832 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4833 (implicit_decl_warning): When issuing warnings for implicit
4834 declarations, attempt to provide a suggestion via
4835 lookup_name_fuzzy.
4836 (undeclared_variable): Likewise when issuing errors.
4837 (lookup_name_in_scope): Likewise.
4838 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4839 (best_macro_match): New typedef.
4840 (find_closest_macro_cpp_cb): New function.
4841 (lookup_name_fuzzy): New function.
4842 * c-parser.c: Include gcc-rich-location.h.
4843 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4844 (c_keyword_starts_typename): ...this new function.
4845 (c_parser_declaration_or_fndef): When issuing errors about
4846 missing "struct" etc, add a fixit. For other kinds of errors,
4847 attempt to provide a suggestion via lookup_name_fuzzy.
4848 (c_parser_parms_declarator): When looking ahead to detect typos in
4849 type names, also reject CPP_KEYWORD.
4850 (c_parser_parameter_declaration): When issuing errors about
4851 unknown type names, attempt to provide a suggestion via
4852 lookup_name_fuzzy.
4853 * c-tree.h (c_keyword_starts_typename): New prototype.
4854
5a578671
JM
48552016-06-20 Joseph Myers <joseph@codesourcery.com>
4856
4857 PR c/71601
4858 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4859 c_common_type returns error_mark_node.
4860
3f8257db 48612016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4862
4863 PR c/69507
4864 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4865 __alignof__ (expression).
4866
6a3f203c
DM
48672016-06-14 David Malcolm <dmalcolm@redhat.com>
4868
4869 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4870
264757fb
DM
48712016-06-14 David Malcolm <dmalcolm@redhat.com>
4872
4873 * c-typeck.c (build_component_ref): Simplify fixit code by
4874 using gcc_rich_location::add_fixit_misspelled_id.
4875 (set_init_label): Likewise.
4876
f7e4f2e3
DM
48772016-06-13 David Malcolm <dmalcolm@redhat.com>
4878
4879 * c-parser.c (c_parser_initelt): Provide location of name for new
4880 location_t param of set_init_label.
4881 * c-tree.h (set_init_label): Add location_t param.
4882 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4883 param and use it when issuing error messages about unrecognized
4884 field names. Attempt to provide a fixit hint if appropriate,
4885 otherwise update the error message to provide the type name.
4886
4b1ffdb1
TS
48872016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4888
4889 PR c/71381
4890 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4891 Loosen checking.
4892
44a845ca
MS
48932016-06-08 Martin Sebor <msebor@redhat.com>
4894 Jakub Jelinek <jakub@redhat.com>
4895
4896 PR c++/70507
4897 PR c/68120
4898 * c-typeck.c (convert_arguments): Don't promote last argument
4899 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4900
92a5f2ba
MP
49012016-06-08 Marek Polacek <polacek@redhat.com>
4902
4903 PR c/71418
4904 * c-decl.c (grokdeclarator): Check TYPE_P.
4905
08203f73
MP
4906 PR c/71426
4907 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4908 code.
4909
6ffd47b7
DM
49102016-06-07 David Malcolm <dmalcolm@redhat.com>
4911
4912 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4913 and structure element reference, capture the location of the
4914 element name token and pass it to build_component_ref.
4915 (c_parser_postfix_expression_after_primary): Likewise for
4916 structure element dereference.
4917 (c_parser_omp_variable_list): Likewise for
4918 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4919 * c-tree.h (build_component_ref): Add location_t param.
4920 * c-typeck.c (build_component_ref): Add location_t param
4921 COMPONENT_LOC. Use it, if available, when issuing hints about
4922 mispelled member names to provide a fixit replacement hint.
4923
1f40cff3
MP
49242016-06-06 Marek Polacek <polacek@redhat.com>
4925
4926 PR c/71362
4927 * c-parser.c (c_parser_direct_declarator): Set location.
4928
5545a907
MP
49292016-06-06 Marek Polacek <polacek@redhat.com>
4930
4931 * c-typeck.c (comptypes_internal): Handle comparisons of
4932 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
4933 TYPE_REF_CAN_ALIAS_ALL.
4934
b605f663
CLT
49352016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
4936
4937 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
4938 arguments as addressable when async clause exists.
4939
00631022
JJ
49402016-05-30 Jakub Jelinek <jakub@redhat.com>
4941
4942 PR c++/71349
4943 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
4944 when combined with target construct.
4945
7211a097
JJ
49462016-05-26 Jakub Jelinek <jakub@redhat.com>
4947
4948 * c-parser.c (c_parser_omp_clause_schedule): Warn if
4949 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
4950
95efe6b6
MP
49512016-05-25 Marek Polacek <polacek@redhat.com>
4952
4953 PR c/71265
4954 * c-decl.c (c_make_fname_decl): Don't check seen_error.
4955
a23faf7a
MP
4956 PR c/71266
4957 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
4958
e46c7770
CP
49592016-05-24 Cesar Philippidis <cesar@codesourcery.com>
4960
4961 * c-parser.c (c_parser_oacc_declare): Add support for
4962 GOMP_MAP_FIRSTPRIVATE_POINTER.
4963 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
4964 argument with enum c_omp_region_type ort.
4965 (handle_omp_array_sections): Likewise. Update call to
4966 handle_omp_array_sections_1.
4967 (c_finish_omp_clauses): Add specific errors and warning messages for
4968 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
4969 call to handle_omp_array_sections.
4970
a04e69c0
TS
49712016-05-24 Thomas Schwinge <thomas@codesourcery.com>
4972
4973 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
4974
f17a223d
RB
49752016-05-24 Richard Biener <rguenther@suse.de>
4976
4977 PR middle-end/70434
4978 PR c/69504
4979 * c-typeck.c (build_array_ref): Do not complain about indexing
4980 non-lvalue vectors. Adjust for function name change.
4981
79063edd
MS
49822016-05-20 Martin Sebor <msebor@redhat.com>
4983
4984 PR c/71115
4985 * c-typeck.c (error_init): Use
4986 expansion_point_location_if_in_system_header.
4987 (warning_init): Same.
4988
8a40fef3
DM
49892016-05-19 David Malcolm <dmalcolm@redhat.com>
4990
4991 PR c/71171
4992 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
4993 in error-handling.
4994 (c_parser_postfix_expression): Likewise.
4995 * c-tree.h (c_expr::set_error): New method.
4996 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
4997 that result's range is initialized.
4998
e9892350
JG
49992016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
5000
5001 * c-typeck.c (parser_build_unary_op): Fix formatting.
5002
8fad45f5
MW
50032016-05-16 Matthew Wahab <matthew.wahab@arm.com>
5004
5005 * c-decl.c (grokdeclarator): Remove errmsg and use of
5006 targetm.invalid_return_type.
5007 (grokparms): Remove errmsg and use of
5008 targetm.invalid_parameter_type.
5009
aa4b467b
JM
50102016-05-13 Joseph Myers <joseph@codesourcery.com>
5011
5012 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
5013 function return type.
5014
4f2e1536
MP
50152016-05-12 Marek Polacek <polacek@redhat.com>
5016
5017 PR c/70756
5018 * c-decl.c (build_compound_literal): Pass LOC down to
5019 c_incomplete_type_error.
5020 * c-tree.h (require_complete_type): Adjust declaration.
5021 (c_incomplete_type_error): Likewise.
5022 * c-typeck.c (require_complete_type): Add location parameter, pass it
5023 down to c_incomplete_type_error.
5024 (c_incomplete_type_error): Add location parameter, pass it down to
5025 error_at.
5026 (build_component_ref): Pass location down to c_incomplete_type_error.
5027 (default_conversion): Pass location down to require_complete_type.
5028 (build_array_ref): Likewise.
5029 (build_function_call_vec): Likewise.
5030 (convert_arguments): Likewise.
5031 (build_unary_op): Likewise.
5032 (build_c_cast): Likewise.
5033 (build_modify_expr): Likewise.
5034 (convert_for_assignment): Likewise.
5035 (c_finish_omp_clauses): Likewise.
5036
d6e83a8d
MM
50372016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5038
5039 PR c/43651
5040 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
5041 is enabled.
5042 * c-errors.c (pedwarn_c90): Return true if warned.
5043 * c-tree.h (pedwarn_c90): Change return type to bool.
5044 (enum c_declspec_word): Add new enumerator cdw_atomic.
5045
5c3a10fb
MP
50462016-05-11 Marek Polacek <polacek@redhat.com>
5047
5048 PR c++/71024
5049 * c-decl.c (diagnose_mismatched_decls): Factor out code to
5050 diagnose_mismatched_attributes and call it.
5051
cf68d92c
MP
50522016-05-10 Marek Polacek <polacek@redhat.com>
5053
5054 PR c/70255
5055 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
5056 on a declaration following the definition.
5057
351f85c5
JJ
50582016-05-05 Jakub Jelinek <jakub@redhat.com>
5059
5060 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
5061 parse it through to c_parser_c99_block_statement.
5062 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
5063 caller.
5064
deef7113
MP
50652016-05-04 Marek Polacek <polacek@redhat.com>
5066
5067 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
5068 OPT_Wdangling_else.
5069
de55efd5
MP
50702016-05-04 Marek Polacek <polacek@redhat.com>
5071
5072 PR c/48778
5073 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
5074 for macro expansions.
5075
79ce98bc
MP
50762016-05-03 Marek Polacek <polacek@redhat.com>
5077
5078 PR c/70859
5079 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
5080 check_builtin_function_arguments.
5081
fb2647aa
RB
50822016-05-03 Richard Biener <rguenther@suse.de>
5083
5084 * Make-lang.in (cc1-checksum.c): For stage-final re-use
5085 the checksum from the previous stage.
5086
77886428
CP
50872016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5088
5089 * c-parser.c (c_parser_oacc_all_clauses): Update call to
5090 c_finish_omp_clauses.
5091 (c_parser_omp_all_clauses): Likewise.
5092 (c_parser_oacc_cache): Likewise.
5093 (c_parser_oacc_loop): Likewise.
5094 (omp_split_clauses): Likewise.
5095 (c_parser_omp_declare_target): Likewise.
5096 (c_parser_cilk_all_clauses): Likewise.
5097 (c_parser_cilk_for): Likewise.
5098 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
5099 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
5100
7176a4a0
MP
51012016-05-02 Marek Polacek <polacek@redhat.com>
5102
5103 PR c/70851
5104 * c-decl.c (grokdeclarator): Diagnose when array's size has an
5105 incomplete type.
5106
e7ff0319
CP
51072016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5108
5109 PR middle-end/70626
5110 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
5111 OACC_LOOP_CLAUSE_MASK.
5112 (c_parser_oacc_kernels_parallel): Update call to
5113 c_oacc_split_loop_clauses.
5114
9f405ce1
AM
51152016-04-28 Andrew MacLeod <amacleod@redhat.com>
5116
5117 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
5118 argument to build_modify_expr in two cases.
5119
c1e1f433
BS
51202016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5121
5122 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5123 warn_for_memset instead of warning directly here.
5124
2448a956
MP
51252016-04-26 Marek Polacek <polacek@redhat.com>
5126
5127 PR c/67784
5128 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
5129 out of ...
5130 (c_parser_for_statement): ... here.
5131 (c_parser_if_statement): Use it.
5132 (c_parser_switch_statement): Use it.
5133 (c_parser_while_statement): Use it.
5134
b02a5e26
MP
5135 PR c/70791
5136 * c-decl.c (pushdecl): Pass LOCUS down to warning.
5137
477d4906
IV
51382016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5139
5140 PR c++/69363
5141 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
5142 instead of c_finish_cilk_clauses.
5143 * c-tree.h (c_finish_omp_clauses): Add new default argument.
5144 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
5145 floating-point variables in the linear clause for Cilk Plus.
5146
fe37c7af
MM
51472016-04-18 Michael Matz <matz@suse.de>
5148
5149 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
5150 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
5151
949505a9
MP
51522016-04-15 Marek Polacek <polacek@redhat.com>
5153
5154 PR c/70671
5155 * c-typeck.c (build_unary_op): Pass location down to error and
5156 warning call.
5157
dda1bf61
JJ
51582016-04-15 Jakub Jelinek <jakub@redhat.com>
5159
5160 PR c/70436
5161 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
5162 where needed.
5163 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
5164 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
5165 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
5166 Adjust c_parser_pragma callers.
5167 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
5168 caller.
5169 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
5170 c_parser_statement.
5171 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
5172 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
5173 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
5174 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
5175 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
5176 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
5177 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
5178 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5179 down where needed.
5180 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5181 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5182 calls.
5183
99cd9857
MP
51842016-04-13 Marek Polacek <polacek@redhat.com>
5185
5186 PR c/70436
5187 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5188 adjust callers.
5189 (c_parser_statement): Likewise.
5190 (c_parser_c99_block_statement): Likewise.
5191 (c_parser_while_statement): Likewise.
5192 (c_parser_for_statement): Likewise.
5193 (c_parser_if_body): Don't set IF_P here.
5194 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5195 about dangling else here.
5196 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5197 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5198 warn about dangling else here.
5199
f13355da
MP
52002016-04-04 Marek Polacek <polacek@redhat.com>
5201
5202 PR c/70307
5203 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5204
5fde6a45
MP
52052016-03-31 Marek Polacek <polacek@redhat.com>
5206
5207 PR c/70297
5208 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5209
4bbf545b
DM
52102016-03-18 David Malcolm <dmalcolm@redhat.com>
5211
5212 PR c/70281
5213 * c-parser.c (c_parser_postfix_expression): Set the source range
5214 for uses of "__builtin_types_compatible_p".
5215
fcc2b74f
JJ
52162016-03-17 Jakub Jelinek <jakub@redhat.com>
5217
5218 PR c/70280
5219 * c-typeck.c (composite_type): Don't count void_list_node
5220 into len, if the list is terminated by void_list_node, start
5221 with void_list_node instead of NULL for newargs. Stop
5222 at void_list_node.
5223
ab4c578f
MP
52242016-03-16 Marek Polacek <polacek@redhat.com>
5225
5226 PR c/70093
5227 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5228 nested functions returning VM types.
5229
96b3c82d
CP
52302016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5231
5232 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5233 when calling c_finish_omp_clauses.
5234
29b9828f
BS
52352016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5236
5237 PR c/69824
5238 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5239 for later.
5240
7ff6ca38
MP
52412016-03-04 Marek Polacek <polacek@redhat.com>
5242
5243 PR c/69798
5244 * c-parser.c (c_parser_postfix_expression): Call
5245 c_parser_cast_expression rather than c_parser_postfix_expression.
5246
686e2237
JJ
52472016-03-01 Jakub Jelinek <jakub@redhat.com>
5248
5249 PR c/69796
5250 PR c/69974
5251 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5252 of incomplete decls to error_mark_node.
5253
0b05329b
MP
52542016-02-24 Marek Polacek <polacek@redhat.com>
5255
5256 PR c/69819
5257 * c-decl.c (finish_decl): Don't update the copy of the type of a
5258 different decl type.
5259
067fbd8b
JJ
52602016-02-23 Jakub Jelinek <jakub@redhat.com>
5261
5262 PR objc/69844
5263 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5264 in id_kind reclassification.
5265
bf14eba2
JJ
52662016-02-16 Jakub Jelinek <jakub@redhat.com>
5267
5268 PR c/69835
5269 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5270
ba539195
JN
52712016-02-16 James Norris <jnorris@codesourcery.com>
5272
5273 PR c/64748
5274 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5275
16595a1f
BS
52762016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5277
f48dfe98
BS
5278 * c-decl.c (build_null_declspecs): Zero the entire struct.
5279
16595a1f
BS
5280 PR c/69522
5281 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5282 callers changed. If nested_p is true, use it to call
5283 finish_implicit_inits.
5284 * c-tree.h (finish_implicit_inits): Declare.
5285 * c-typeck.c (finish_implicit_inits): New function. Move code
5286 from ...
5287 (push_init_level): ... here.
5288 (set_designator, process_init_element): Call finish_implicit_inits.
5289
66756373
JJ
52902016-02-11 Jakub Jelinek <jakub@redhat.com>
5291
5292 PR c/69768
5293 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5294 arguments for -Waddress warning.
5295
1066e9b5
JJ
52962016-02-04 Jakub Jelinek <jakub@redhat.com>
5297
5298 PR c/69669
5299 * c-decl.c (finish_enum): When honoring mode attribute,
5300 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5301
3a5d2ba4
JJ
53022016-01-29 Jakub Jelinek <jakub@redhat.com>
5303
5304 PR debug/69518
5305 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5306 all type variants, not just TYPE_MAIN_VARIANT.
5307
cbdd8ae0
JJ
53082016-01-27 Jakub Jelinek <jakub@redhat.com>
5309
5310 PR debug/66869
5311 * c-decl.c (c_write_global_declarations_1): Warn with
5312 warn_unused_function if static prototype without definition
5313 is not C_DECL_USED.
5314
fa74a4bc
MP
53152016-01-27 Marek Polacek <polacek@redhat.com>
5316
5317 PR c/68062
5318 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5319 to unsigned, if needed. Add -Wsign-compare warning.
5320
13f92e8d
JJ
53212016-01-26 Jakub Jelinek <jakub@redhat.com>
5322
5323 PR tree-optimization/69483
5324 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5325
cd8e73dc 53262016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
5327
5328 PR c/24293
5329 * c-tree.h (incomplete_record_decls): Declare.
5330 * c-parser.c (incomplete_record_decls): Define.
5331 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5332 report error if any decl has zero size.
5333 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5334 or enum type to incomplete_record_decls.
5335
e6d6ec9e
TV
53362016-01-14 Tom de Vries <tom@codesourcery.com>
5337
5338 PR tree-optimization/68773
5339 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5340 set force_output.
5341
00083992
MP
53422016-01-14 Marek Polacek <polacek@redhat.com>
5343
5344 PR c/69262
5345 * c-decl.c (grokdeclarator): Provide more information for invalid
5346 array declarations.
5347
7443cf13
DM
53482016-01-06 David Malcolm <dmalcolm@redhat.com>
5349
5350 * c-parser.c (c_parser_unary_expression): For dereferences, build
5351 a combined location before calling build_indirect_ref, so that
5352 error reports cover the full range, manually updating the c_expr
5353 src_range.
5354
6b131d5b
MP
53552016-01-06 Marek Polacek <polacek@redhat.com>
5356
5357 PR sanitizer/69099
5358 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5359 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5360 NULL.
5361
818ab71a
JJ
53622016-01-04 Jakub Jelinek <jakub@redhat.com>
5363
5364 Update copyright years.
5365
2fe0a208
MP
53662016-01-04 Marek Polacek <polacek@redhat.com>
5367
5368 PR c/68908
5369 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5370 optimization to use __atomic_fetch_* built-in if possible.
5371
c7b48c8a
TS
53722015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5373
5374 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5375 into...
5376 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5377 all users.
5378
fda5652f
MP
53792015-12-22 Marek Polacek <polacek@redhat.com>
5380
5381 PR c/69002
5382 * c-typeck.c (build_component_ref): Warn when acessing elements of
5383 atomic structures or unions.
5384
745e411d
DM
53852015-12-21 David Malcolm <dmalcolm@redhat.com>
5386
5387 * c-typeck.c: Include "gcc-rich-location.h".
5388 (build_binary_op): In the two places that call binary_op_error,
5389 create a gcc_rich_location and populate it with the location of
5390 the binary op and its two operands.
5391
94c40e19
DM
53922015-12-16 David Malcolm <dmalcolm@redhat.com>
5393
5394 * c-parser.c (c_parser_statement_after_labels): When calling
5395 c_finish_return, Use the return expression's location if it has
5396 one, falling back to the location of the first token within it.
5397 * c-typeck.c (c_finish_return): When issuing warnings about
5398 the incorrect presence/absence of a return value, issue a note
5399 showing the declaration of the function.
5400
de67c4c3
DM
54012015-12-16 David Malcolm <dmalcolm@redhat.com>
5402
5403 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5404 to 4.
5405 (c_parser_peek_nth_token): New function.
5406 (c_parser_peek_conflict_marker): New function.
5407 (c_parser_error): Detect conflict markers and report them as such.
5408
a10704e1
DM
54092015-12-16 David Malcolm <dmalcolm@redhat.com>
5410
5411 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5412 to preserve range information for the primary expression
5413 in the call to c_parser_postfix_expression_after_primary.
5414
8062bca6
DM
54152015-12-16 David Malcolm <dmalcolm@redhat.com>
5416
5417 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5418 expression location, falling back on the first token location,
5419 rather than always using the latter.
5420
d06f8b75
MP
54212015-12-16 Marek Polacek <polacek@redhat.com>
5422
5423 PR c/64637
5424 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5425 available.
5426
2994fb91
MP
54272015-12-15 Marek Polacek <polacek@redhat.com>
5428
5429 PR c/68907
5430 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5431 artificial decl.
5432
a1b93f8d
DM
54332015-12-08 David Malcolm <dmalcolm@redhat.com>
5434
5435 * c-parser.c (c_parser_alignof_expression): Capture location of
5436 closing parenthesis (if any), or of end of unary expression, and
5437 use it to build a src_range for the expression.
5438
46c6e1e2
DM
54392015-12-08 David Malcolm <dmalcolm@redhat.com>
5440
5441 PR c/68757
5442 * c-parser.c (c_parser_get_builtin_args): Add
5443 "out_close_paren_loc" param, and write back to it.
5444 (c_parser_postfix_expression): Capture the closing
5445 parenthesis location for RID_CHOOSE_EXPR,
5446 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5447 RID_BUILTIN_SHUFFLE and use it to set the source range
5448 for such expressions; within RID_BUILTIN_COMPLEX set
5449 the underlying location.
5450
66189108
MP
54512015-12-07 Marek Polacek <polacek@redhat.com>
5452
5453 PR c/68668
5454 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5455 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5456
f187980b
EB
54572015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5458
5459 * c-tree.h (c_build_va_arg): Adjust prototype.
5460 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5461 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5462 parameter, adjust throughout and issue an error if EXPR is a component
5463 with reverse storage order.
5464
4250754e
JM
54652015-12-02 Jason Merrill <jason@redhat.com>
5466
5467 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5468 (c_fully_fold_internal, decl_constant_value_for_optimization):
5469 Move from c-common.c.
5470 * c-tree.h: Declare decl_constant_value_for_optimization.
5471 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5472
e9e32ee6
JM
54732015-12-02 Joseph Myers <joseph@codesourcery.com>
5474
5475 PR c/68162
5476 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5477 following link from declarator to next declarator. Track original
5478 qualified type and pass it to c_build_qualified_type.
5479 * c-typeck.c (c_build_qualified_type): Add arguments
5480 orig_qual_type and orig_qual_indirect.
5481
ff7a55bf
TS
54822015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5483
5484 * c-parser.c (c_parser_omp_clause_name)
5485 (c_parser_oacc_all_clauses): Alphabetical sorting.
5486
657e4e47
JJ
54872015-12-02 Jakub Jelinek <jakub@redhat.com>
5488
5489 PR c/68533
5490 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5491 for diagnostics.
5492
37d5ad46
JB
54932015-12-01 Julian Brown <julian@codesourcery.com>
5494 Cesar Philippidis <cesar@codesourcery.com>
5495 James Norris <James_Norris@mentor.com>
5496
5497 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5498 (c_parser_oacc_clause_use_device): New function.
5499 (c_parser_oacc_all_clauses): Add use_device support.
5500 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5501 (c_parser_oacc_host_data): New function.
5502 (c_parser_omp_construct): Add host_data support.
5503 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5504 * c-typeck.c (c_finish_oacc_host_data): New function.
5505 (c_finish_omp_clauses): Add use_device support.
5506
a4850ce9
JH
55072015-11-29 Jan Hubicka <hubicka@ucw.cz>
5508
5509 PR c/67106
5510 * c-decl.c: Set TYPE_PACKED in variants.
5511
b58d3df2
ML
55122015-11-27 Martin Liska <mliska@suse.cz>
5513
5514 PR c++/68312
5515 * c-array-notation.c (fix_builtin_array_notation_fn):
5516 Use release_vec_vec instead of vec::release.
5517 (build_array_notation_expr): Likewise.
5518 (fix_conditional_array_notations_1): Likewise.
5519 (fix_array_notation_expr): Likewise.
5520 (fix_array_notation_call_expr): Likewise.
5521
aec17bfe
JJ
55222015-11-27 Jakub Jelinek <jakub@redhat.com>
5523
5524 PR c/63326
5525 * c-parser.c (c_parser_compound_statement_nostart): If
5526 last_label is true, use pragma_stmt instead of pragma_compound
5527 as second c_parser_pragma argument.
5528 (c_parser_omp_ordered, c_parser_omp_target_update,
5529 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5530 false as second argument to c_parser_skip_to_pragma_eol after
5531 diagnosing standalone directives used in pragma_stmt context.
5532
688c4de0
IV
55332015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5534
5535 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5536 with "if (ENABLE_OFFLOADING)".
5537
cbd03aee
DM
55382015-11-23 David Malcolm <dmalcolm@redhat.com>
5539
5540 PR objc/68438
5541 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5542 for various Objective-C constructs: Class.name syntax,
5543 @selector(), @protocol(), @encode(), and [] message syntax.
5544
a87a86e1
DM
55452015-11-20 David Malcolm <dmalcolm@redhat.com>
5546
5547 PR 62314
5548 * c-typeck.c (should_suggest_deref_p): New function.
5549 (build_component_ref): Special-case POINTER_TYPE when
5550 generating a "not a structure of union" error message, and
5551 suggest a "->" rather than a ".", providing a fix-it hint.
5552
8ece8dfb
DM
55532015-11-19 David Malcolm <dmalcolm@redhat.com>
5554
5555 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5556 candidate into a new function, find_closest_identifier.
5557
433068cc
MP
55582015-11-19 Marek Polacek <polacek@redhat.com>
5559
5560 PR c/68412
5561 * c-typeck.c (parser_build_binary_op): Properly handle
5562 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5563
bef08b71
DM
55642015-11-17 David Malcolm <dmalcolm@redhat.com>
5565
5566 * c-parser.c (set_c_expr_source_range): Bulletproof both
5567 overloaded implementations against NULL expr->value.
5568 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5569 values.
5570 (c_parser_unary_expression): Likewise when handling addresses of
5571 labels.
5572 (c_parser_postfix_expression): Likewise for statement expressions,
5573 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5574 __builtin_va_arg, and for __builtin_offset_of.
5575 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5576 src_range using the range of the braced initializer.
5577 (c_parser_transaction_expression): Set src_range for "ret" to a
5578 sane pair of values.
5579
fff77217
KY
55802015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5581
5582 * c-parser.c (c_finish_omp_declare_simd): Look for
5583 "simd" attribute as well. Update error message.
5584
1d899da2
TS
55852015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5586
5587 * c-parser.c (c_parser_omp_declare_target): Adjust.
5588
e4606348
JJ
55892015-11-14 Jakub Jelinek <jakub@redhat.com>
5590
5591 * c-typeck.c (c_finish_omp_clauses): Don't mark
5592 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5593
3e636daf
MP
55942015-11-14 Marek Polacek <polacek@redhat.com>
5595
5596 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5597 * c-typeck.c: Likewise.
5598
ebedc9a3
DM
55992015-11-13 David Malcolm <dmalcolm@redhat.com>
5600
5601 * c-decl.c (warn_defaults_to): Pass line_table to
5602 rich_location ctor.
5603 * c-errors.c (pedwarn_c99): Likewise.
5604 (pedwarn_c90): Likewise.
5605 * c-parser.c (set_c_expr_source_range): New functions.
5606 (c_token::get_range): New method.
5607 (c_token::get_finish): New method.
5608 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5609 based on the range from the start of the LHS to the end of the
5610 RHS.
5611 (c_parser_conditional_expression): Likewise, based on the range
5612 from the start of the cond.value to the end of exp2.value.
5613 (c_parser_binary_expression): Call set_c_expr_source_range on
5614 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5615 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5616 based on the cast_loc through to the end of the expr.
5617 (c_parser_unary_expression): Likewise, based on the
5618 op_loc through to the end of op.
5619 (c_parser_sizeof_expression) Likewise, based on the start of the
5620 sizeof token through to either the closing paren or the end of
5621 expr.
5622 (c_parser_postfix_expression): Likewise, using the token range,
5623 or from the open paren through to the close paren for
5624 parenthesized expressions.
5625 (c_parser_postfix_expression_after_primary): Likewise, for
5626 various kinds of expression.
5627 * c-tree.h (struct c_expr): Add field "src_range".
5628 (c_expr::get_start): New method.
5629 (c_expr::get_finish): New method.
5630 (set_c_expr_source_range): New decls.
5631 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5632 on ret for prefix unary ops.
5633 (parser_build_binary_op): Likewise, running from the start of
5634 arg1.value through to the end of arg2.value.
5635
ec8b536f
MP
56362015-11-13 Marek Polacek <polacek@redhat.com>
5637
5638 PR c/68320
5639 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5640
277fe616
DM
56412015-11-13 David Malcolm <dmalcolm@redhat.com>
5642
5643 * c-typeck.c: Include spellcheck.h.
5644 (lookup_field_fuzzy_find_candidates): New function.
5645 (lookup_field_fuzzy): New function.
5646 (build_component_ref): If the field was not found, try using
5647 lookup_field_fuzzy and potentially offer a suggestion.
5648
6e232ba4
JN
56492015-11-12 James Norris <jnorris@codesourcery.com>
5650 Joseph Myers <joseph@codesourcery.com>
5651
5652 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5653 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5654 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5655 and PRAGMA_OMP_CLAUSE_LINK.
5656 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5657 and PRAGMA_OACC_CLAUSE_LINK.
5658 (OACC_DECLARE_CLAUSE_MASK): New definition.
5659 (c_parser_oacc_declare): New function.
5660
9be4f715
MP
56612015-11-12 Marek Polacek <polacek@redhat.com>
5662
5663 PR c/67784
5664 * c-parser.c (c_parser_for_statement): Reclassify the token in
5665 a correct scope.
5666
e78bede6
MP
56672015-11-11 Marek Polacek <polacek@redhat.com>
5668
5669 PR c/68107
5670 PR c++/68266
5671 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5672 checking the size of an array.
5673
69f293c9
AM
56742015-11-11 Andrew MacLeod <amacleod@redhat.com>
5675
5676 * c-array-notation.c: Remove unused header files.
5677 * c-aux-info.c: Likewise.
5678 * c-convert.c: Likewise.
5679 * c-decl.c: Likewise.
5680 * c-errors.c: Likewise.
5681 * c-lang.c: Likewise.
5682 * c-objc-common.c: Likewise.
5683 * c-parser.c: Likewise.
5684 * c-typeck.c: Likewise.
5685 * gccspec.c: Likewise.
5686
3a40d81d
NS
56872015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5688 Cesar Philippidis <cesar@codesourcery.com>
5689 James Norris <jnorris@codesourcery.com>
5690 Julian Brown <julian@codesourcery.com>
5691 Nathan Sidwell <nathan@codesourcery.com>
5692
3a40d81d
NS
5693 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5694 routine arg.
5695 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5696 (c_parser_pragma): Parse 'acc routine'.
5697 (OACC_ROUTINE_CLAUSE_MARK): Define.
5698 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5699
fc402eec
AA
57002015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5701
5702 PR debug/67192
5703 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5704 location of the backward-goto to the start of the loop body.
5705
f6b0b3db
AA
57062015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5707
5708 PR debug/67192
5709 * c-parser.c (c_parser_while_statement): Finish the loop before
5710 parsing ahead for misleading indentation.
5711 (c_parser_for_statement): Likewise.
5712
ee45a32d
EB
57132015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5714
5715 * c-decl.c (finish_struct): If the structure has reverse storage
5716 order, rewrite the type of array fields with scalar component. Call
5717 maybe_apply_pragma_scalar_storage_order on entry.
5718 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5719 errors on bit-fields and reverse SSO here and not...
5720 (c_mark_addressable): ...here.
5721 (output_init_element): Adjust call to initializer_constant_valid_p.
5722 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5723
8a645150
DM
57242015-11-06 David Malcolm <dmalcolm@redhat.com>
5725
5726 * c-decl.c (warn_defaults_to): Update for change in signature
5727 of diagnostic_set_info.
5728 * c-errors.c (pedwarn_c99): Likewise.
5729 (pedwarn_c90): Likewise.
5730 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5731 for textinfo::set_location.
5732
7a5e4956
CP
57332015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5734 Thomas Schwinge <thomas@codesourcery.com>
5735 James Norris <jnorris@codesourcery.com>
5736
5737 * c-parser.c (c_parser_omp_clause_name): Add support for
5738 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5739 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5740 default(none) in OpenACC.
5741 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5742 arguments.
5743 (c_parser_oacc_clause_tile): New function.
5744 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5745 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5746 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5747 TILE}.
5748 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5749 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5750 FIRSTPRIVATE}.
5751 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5752 (c_parser_oacc_update): Update the error message for missing clauses.
5753 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5754 and OMP_CLAUSE_INDEPENDENT.
5755
bfcfbfa0
MP
57562015-11-05 Marek Polacek <polacek@redhat.com>
5757
5758 PR c/68090
5759 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5760 deal with pre-evaluation on invalid types.
5761
e01d41e5
JJ
57622015-11-05 Jakub Jelinek <jakub@redhat.com>
5763 Ilya Verbin <ilya.verbin@intel.com>
5764
5765 * c-parser.c: Include context.h and gimple-expr.h.
5766 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5767 monotonic together with nonmonotonic.
5768 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5769 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5770 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5771 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5772 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5773 expressions on combined target teams before the target.
5774 (c_parser_omp_declare_target): If decl has "omp declare target" or
5775 "omp declare target link" attribute, and cgraph or varpool node already
5776 exists, then set corresponding flags. Call c_finish_omp_clauses
5777 in the parenthesized extended-list syntax case.
5778 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5779 declare target.
5780 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5781 on OMP_CLAUSE_REDUCTION array sections.
5782 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5783 into the constant offset, or for variable low-bound using
5784 POINTER_PLUS_EXPR. For structure element based array sections use
5785 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5786 (c_finish_omp_clauses): Drop generic_field_head, structure
5787 elements are now always mapped even as array section bases,
5788 diagnose same var in data sharing and mapping clauses. Diagnose if
5789 linear step on declare simd is neither a constant nor a uniform
5790 parameter. Look through POINTER_PLUS_EXPR for array section
5791 reductions. Diagnose the same var or function appearing multiple
5792 times on the same directive. Fix up wording for the to clause if t
5793 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5794 modifier on kinds other than dynamic or guided or nonmonotonic
5795 modifier together with ordered clause.
5796
4bf9e5a8
TS
57972015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5798 Chung-Lin Tang <cltang@codesourcery.com>
5799
5800 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5801
2adfab87
AM
58022015-10-29 Andrew MacLeod <amacleod@redhat.com>
5803
5804 * c-array-notation.c: Reorder #include's and remove duplicates.
5805 * c-aux-info.c: Likewise.
5806 * c-convert.c: Likewise.
5807 * c-decl.c: Likewise.
5808 * c-errors.c: Likewise.
5809 * c-lang.c: Likewise.
5810 * c-objc-common.c: Likewise.
5811 * c-parser.c: Likewise.
5812 * c-typeck.c: Likewise.
5813
e922069e
JW
58142015-10-26 Jim Wilson <jim.wilson@linaro.org>
5815
5816 PR debug/66068
5817 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5818 after calling build_qualified_type.
5819
765dd391
CP
58202015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5821 Thomas Schwinge <thomas@codesourcery.com>
5822 James Norris <jnorris@codesourcery.com>
5823 Joseph Myers <joseph@codesourcery.com>
5824 Julian Brown <julian@codesourcery.com>
5825 Bernd Schmidt <bschmidt@redhat.com>
5826
5827 * c-parser.c (c_parser_oacc_shape_clause): New.
5828 (c_parser_oacc_simple_clause): New.
5829 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5830 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5831
88bae6f4
TS
58322015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5833 James Norris <jnorris@codesourcery.com>
5834 Cesar Philippidis <cesar@codesourcery.com>
5835
5836 PR c/64765
5837 PR c/64880
5838 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5839 parameters, and handle these. Adjust all users.
5840 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5841 into...
5842 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5843 all users.
5844 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5845 declare functions.
5846 (c_finish_omp_construct): Declare function.
5847 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5848 Merge functions into...
5849 (c_finish_omp_construct): ... this new function.
5850
a8fc2579
RB
58512015-10-22 Richard Biener <rguenther@suse.de>
5852
5853 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5854 before folding a MINUS_EXPR.
5855
e9122ef6
MP
58562015-10-21 Marek Polacek <polacek@redhat.com>
5857
5858 PR c/68024
5859 * c-decl.c (start_function): Warn about vararg functions without
5860 a prototype.
5861
9f47c7e5
IE
58622015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5863
5864 * c-typeck.c (build_conditional_expr): Use boolean vector
5865 type for vector comparison.
5866 (build_vec_cmp): New.
5867 (build_binary_op): Use build_vec_cmp for comparison.
5868
fa60eeb9
MP
58692015-10-20 Marek Polacek <polacek@redhat.com>
5870
5871 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5872
2c7020eb
MP
58732015-10-20 Marek Polacek <polacek@redhat.com>
5874
5875 PR c/67964
5876 * c-parser.c (c_parser_attributes): Break out of the loop if the
5877 token after an attribute isn't a comma.
5878
d9a6bd32
JJ
58792015-10-13 Jakub Jelinek <jakub@redhat.com>
5880 Aldy Hernandez <aldyh@redhat.com>
5881
5882 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5883 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5884 (c_parser_omp_variable_list): Handle structure elements for
5885 map, to and from clauses. Handle array sections in reduction
5886 clause. Formatting fixes.
5887 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5888 if clause modifiers.
5889 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5890 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5891 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5892 c_parser_omp_clause_is_device_ptr): New functions.
5893 (c_parser_omp_clause_ordered): Parse optional parameter.
5894 (c_parser_omp_clause_reduction): Handle array reductions.
5895 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5896 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5897 functions.
5898 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5899 (c_parser_omp_clause_depend_sink): New function.
5900 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5901 (c_parser_omp_clause_map): Parse release/delete map kinds and
5902 optional always modifier.
5903 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5904 and c_finish_omp_clauses callers.
5905 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5906 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5907 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5908 (OMP_CRITICAL_CLAUSE_MASK): Define.
5909 (c_parser_omp_critical): Parse critical clauses.
5910 (c_parser_omp_for_loop): Handle doacross loops, adjust
5911 c_finish_omp_for and c_finish_omp_clauses callers.
5912 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5913 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5914 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5915 (c_parser_omp_for): Disallow ordered clause when combined with
5916 distribute. Disallow linear clause when combined with distribute
5917 and not combined with simd.
5918 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5919 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5920 parse clauses and if depend clause is found, don't parse a body.
5921 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5922 Allow target parallel without for after it.
5923 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5924 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5925 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5926 invalid kinds.
5927 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5928 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
5929 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
5930 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
5931 functions.
5932 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
5933 defaultmap and is_device_ptr clauses.
5934 (c_parser_omp_target): Parse target parallel and target simd. Set
5935 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
5936 and target exit data. Diagnose invalid map kinds.
5937 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
5938 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
5939 construct.
5940 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
5941 &omp_priv.
5942 (OMP_TASKLOOP_CLAUSE_MASK): Define.
5943 (c_parser_omp_taskloop): New function.
5944 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
5945 handle PRAGMA_OMP_TASKLOOP.
5946 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
5947 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
5948 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
5949 Add IS_OMP argument, handle structure element bases, diagnose
5950 bitfields, pass IS_OMP recursively, diagnose known zero length
5951 array sections in depend clauses, handle array sections in reduction
5952 clause, diagnose negative length even for pointers.
5953 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
5954 types, pass IS_OMP down to handle_omp_array_sections_1, handle
5955 array sections in reduction clause, set
5956 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
5957 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
5958 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
5959 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
5960
21ba0cea
MP
59612015-10-06 Marek Polacek <polacek@redhat.com>
5962
5963 * c-parser.c (c_parser_statement_after_labels): Use
5964 protected_set_expr_location.
5965 (c_parser_omp_clause_num_gangs): Likewise.
5966 (c_parser_omp_clause_num_threads): Likewise.
5967 (c_parser_omp_clause_num_workers): Likewise.
5968 (c_parser_omp_clause_vector_length): Likewise.
5969 (c_parser_omp_clause_num_teams): Likewise.
5970 (c_parser_omp_clause_thread_limit): Likewise.
5971 * c-typeck.c (build_c_cast): Likewise.
5972 (c_cast_expr): Likewise.
5973
624d31fe
RS
59742015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5975
5976 * c-typeck.c (c_tree_equal): Use real_equal instead of
5977 REAL_VALUES_EQUAL.
5978
b8fd7909
JM
59792015-10-04 Jason Merrill <jason@redhat.com>
5980
5981 * c-parser.c (c_lex_one_token): Handle @synchronized.
5982 * c-decl.c (match_builtin_function_types): A declaration of a built-in
5983 can change whether the function is transaction_safe.
5984
1c7485af
MP
59852015-10-02 Marek Polacek <polacek@redhat.com>
5986
5987 PR c/67730
5988 * c-typeck.c (convert_for_assignment): Use the expansion point
5989 location throughout.
5990
3e3b8d63
MP
59912015-10-02 Marek Polacek <polacek@redhat.com>
5992
5993 PR c/64249
5994 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
5995 and pass it down to c_parser_if_statement.
5996 (c_parser_else_body): Add CHAIN parameter and pass it down to
5997 c_parser_statement_after_labels.
5998 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
5999 duplicated if-else-if conditions.
6000
aabef2de
MP
60012015-10-01 Marek Polacek <polacek@redhat.com>
6002
6003 * c-typeck.c (convert_for_assignment): Improve commentary.
6004
de8ddd5f
MP
60052015-09-30 Marek Polacek <polacek@redhat.com>
6006
6007 PR c/67730
6008 * c-typeck.c (c_finish_return): Use the expansion point location for
6009 certain "return with value" warnings.
6010
c4914de6
MLI
60112015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6012
6013 * c-parser.c (pragma_lex): Add loc argument.
6014
0e36f5c7
MP
60152015-09-15 Marek Polacek <polacek@redhat.com>
6016
6017 PR c/67580
6018 * c-decl.c (tag_exists_p): New function.
6019 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
6020 struct/union/enum keywords are missing.
6021 * c-tree.h (tag_exists_p): Declare.
6022
2f3bb934
MP
60232015-09-15 Marek Polacek <polacek@redhat.com>
6024
6025 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
6026 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
6027 Return NULL_TREE instead of 0.
6028 (lookup_name): Return NULL_TREE instead of 0.
6029 (lookup_name_in_scope): Likewise.
6030 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
6031 (parser_xref_tag): Use false instead of 0.
6032 (start_struct): Use true instead of 1.
6033 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
6034
aa256c4a
MP
60352015-09-14 Marek Polacek <polacek@redhat.com>
6036
6037 * c-typeck.c (set_nonincremental_init_from_string): Use
6038 HOST_WIDE_INT_M1U when shifting a negative value.
6039
dbb68221
MW
60402015-09-09 Mark Wielaard <mjw@redhat.com>
6041
6042 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
6043 parm against NULL.
6044
a8a098ac
JJ
60452015-09-10 Jakub Jelinek <jakub@redhat.com>
6046
6047 PR c/67502
6048 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
6049 into OMP_FOR_PRE_BODY rather than before the loop.
6050
f4b189d5
JJ
60512015-09-09 Jakub Jelinek <jakub@redhat.com>
6052
0bb99c11
JJ
6053 PR c/67501
6054 * c-parser.c (c_parser_oacc_all_clauses,
6055 c_parser_omp_all_clauses): Remove invalid clause from
6056 list of clauses even if parser->error is set.
6057
fce5e5e3
JJ
6058 PR c/67500
6059 * c-parser.c (c_parser_omp_clause_aligned,
6060 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
6061 test for errors.
6062 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
6063 error_mark_node.
6064
f4b189d5
JJ
6065 PR c/67495
6066 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
6067 instead of c_parser_unary_expression. If the result is !lvalue_p,
6068 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
6069
b2aaf235
MP
60702015-09-04 Marek Polacek <polacek@redhat.com>
6071
6072 PR sanitizer/67279
6073 * c-typeck.c (build_binary_op): Don't instrument static initializers.
6074
1807ffc1
MS
60752015-09-03 Martin Sebor <msebor@redhat.com>
6076
6077 PR c/66516
8b652e65
JJ
6078 * c-typeck.c (convert_arguments, parser_build_unary_op,
6079 build_conditional_expr, c_cast_expr, convert_for_assignment,
6080 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
6081 reject_gcc_builtin.
6082 (c_decl_implicit): Define.
6083
d04ff417
MP
60842015-09-02 Marek Polacek <polacek@redhat.com>
6085
6086 PR c/67432
6087 * c-parser.c (c_parser_enum_specifier): Give a better error for
6088 an empty enum.
6089
a79683d5
TS
60902015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6091
6092 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
6093
191a6b94
MP
60942015-08-12 Marek Polacek <polacek@redhat.com>
6095
6096 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
6097 LOC to it.
6098
420a9d9b
MP
60992015-08-03 Marek Polacek <polacek@redhat.com>
6100
6101 PR c/67088
6102 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
6103 Use it.
6104 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
6105
992118a1
PP
61062015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6107
6108 * c-parser.c (c_parser_if_body): Take token_indent_info
6109 argument. Call warn_for_misleading_indentation even when the
6110 body is a semicolon. Extract token_indent_infos corresponding
6111 to the guard, body and next tokens. Adjust call to
6112 warn_for_misleading_indentation accordingly.
6113 (c_parser_else_body): Likewise.
6114 (c_parser_if_statement): Likewise.
6115 (c_parser_while_statement): Likewise.
6116 (c_parser_for_statement): Likewise.
6117
46308474
LFSM
61182015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
6119 Manuel López-Ibáñez <manu@gcc.gnu.org>
6120
6121 * c-decl.c (get_parm_info): Remove static var. Update warning
6122 message.
6123
05b28fd6
MP
61242015-07-27 Marek Polacek <polacek@redhat.com>
6125
6126 PR c++/66555
6127 PR c/54979
6128 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
6129
451b5e48
MP
61302015-07-20 Marek Polacek <polacek@redhat.com>
6131
6132 PR c++/55095
6133 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
6134 (build_binary_op): Warn about left shift overflows.
6135
1916bcb5
AM
61362015-07-09 Andrew MacLeod <amacleod@redhat.com>
6137
6138 * c-array-notation.c: Adjust includes for flags.h changes.
6139 * c-objc-common.c: Likewise.
6140
c7131fb2
AM
61412015-07-07 Andrew MacLeod <amacleod@redhat.com>
6142
6143 * c-array-notation.c: Adjust includes.
6144 * c-aux-info.c: Likewise.
6145 * c-convert.c: Likewise.
6146 * c-decl.c: Likewise.
6147 * c-errors.c: Likewise.
6148 * c-lang.c: Likewise.
6149 * c-objc-common.c: Likewise.
6150 * c-parser.c: Likewise.
6151 * c-typeck.c: Likewise.
6152
da2e71c9
MLI
61532015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6154
6155 PR fortran/66605
6156 * c-decl.c (finish_function): Call do_warn_unused_parameter.
6157
b155cfd9
MP
61582015-06-29 Marek Polacek <polacek@redhat.com>
6159
6160 PR c/66322
6161 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
6162 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
6163 about -Wswitch-bool here.
6164 (do_case): Update c_add_case_label call.
6165 (c_finish_case): Update c_do_switch_warnings call.
6166
31521951
MP
61672015-06-27 Marek Polacek <polacek@redhat.com>
6168
6169 * c-typeck.c: Use VECTOR_TYPE_P throughout.
6170
22d03525
MP
61712015-06-26 Marek Polacek <polacek@redhat.com>
6172
6173 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6174 INDIRECT_REF_P.
6175 * c-typeck.c (array_to_pointer_conversion): Likewise.
6176 (build_unary_op): Likewise.
6177 (c_finish_return): Likewise.
6178
f0889939
AM
61792015-06-25 Andrew MacLeod <amacleod@redhat.com>
6180
6181 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6182 * c-parser.c: Likewise.
6183
8d67ee55
RS
61842015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6185
6186 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6187 instead of pointer_hash.
6188 (detect_field_duplicates): Likewise.
6189
0ae9bd27
MP
61902015-06-25 Marek Polacek <polacek@redhat.com>
6191
6192 * c-array-notation.c: Use VAR_P throughout.
6193 * c-decl.c: Likewise.
6194 * c-objc-common.c: Likewise.
6195 * c-parser.c: Likewise.
6196 * c-typeck.c: Likewise.
6197
62f9079a
MP
61982015-06-25 Marek Polacek <polacek@redhat.com>
6199
6200 * c-decl.c: Use is_global_var throughout.
6201 * c-parser.c: Likewise.
6202 * c-typeck.c: Likewise.
6203
abb226c9
AM
62042015-06-17 Andrew MacLeod <amacleod@redhat.com>
6205
6206 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6207 * c-aux-info.c: Likewise.
6208 * c-convert.c: Likewise.
6209 * c-decl.c: Likewise.
6210 * c-errors.c: Likewise.
6211 * c-lang.c: Likewise.
6212 * c-objc-common.c: Likewise.
6213 * c-parser.c: Likewise.
6214 * c-typeck.c: Likewise.
6215
8cbababc
JH
62162015-06-11 Jan Hubicka <hubicka@ucw.cz>
6217
6218 PR middle-end/66325
6219 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6220 variants.
6221
a0349665
PMR
62222015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6223
6224 * c-decl.c (pop_scope): Register the main translation unit
6225 through the new debug hook.
6226
13fdf2e2
AM
62272015-06-08 Andrew MacLeod <amacleod@redhat.com>
6228
6229 * c-array-notation.c : Adjust include files.
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-lang.h : Likewise.
6236 * c-objc-common.c : Likewise.
6237 * c-parser.c : Likewise.
6238 * c-typeck.c : Likewise.
6239
d7438551
AH
62402015-06-05 Aldy Hernandez <aldyh@redhat.com>
6241
6242 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6243 immediately clobber it.
6244 (c_write_global_declarations_1): Remove call to
6245 check_global_declaration_1.
6246 (c_write_global_declarations_2): Remove.
6247 (c_write_final_cleanups): Rename from c_write_global_declarations.
6248 Remove call to finalize_compilation_unit.
6249 Remove calls to debugging hooks.
6250 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6251 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6252 * c-tree.h: Remove c_write_global_declarations.
6253
ecb9f223
AM
62542015-06-04 Andrew MacLeod <amacleod@redhat.com>
6255
6256 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6257 * c-aux-info.c: Likewise.
6258 * c-convert.c: Likewise.
6259 * c-decl.c: Likewise.
6260 * c-errors.c: Likewise.
6261 * c-lang.c: Likewise.
6262 * c-objc-common.c: Likewise.
6263 * c-parser.c: Likewise.
6264 * c-typeck.c: Likewise.
6265
9482b620
MP
62662015-06-04 Marek Polacek <polacek@redhat.com>
6267
6268 PR c/66341
6269 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6270 it is a lvalue.
6271
bc51ace3
PK
62722015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6273
6274 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6275 Warn for empty struct.
6276 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6277
ea5b45b6
AT
62782015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6279
6280 * c-decl.c (start_function): Call plugin before parsing.
6281 (finish_function): Call plugin after parsing.
6282
c2d47482
PK
62832015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6284
6285 PR c/49551
6286 * c-decl.c (merge_decls): Merge DECL_COMMON.
6287
a95492ab
JW
62882015-05-22 Jim Wilson <jim.wilson@linaro.org>
6289
6290 * Make-lang.in (check_gcc_pallelize): Define.
6291
fd5c817a
MP
62922015-05-22 Marek Polacek <polacek@redhat.com>
6293
6294 PR c/47043
6295 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6296 attributes.
6297
c7b70a3c
MP
62982015-05-21 Marek Polacek <polacek@redhat.com>
6299
6300 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6301 DECL_BUILT_IN.
6302
21b634ae
MP
63032015-05-20 Marek Polacek <polacek@redhat.com>
6304
6305 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6306 * c-typeck.c: Likewise.
6307
296a8c2f
MP
63082015-05-19 Marek Polacek <polacek@redhat.com>
6309
6310 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6311
41b37d5e
JJ
63122015-05-19 Jakub Jelinek <jakub@redhat.com>
6313
6314 PR middle-end/66199
6315 * c-parser.c (c_parser_omp_for_loop): Don't add
6316 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6317 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6318 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6319 constructs.
6320
fab27f52
MM
63212015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6322
6323 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 6324 swaps.
fab27f52 6325
40de31cf
MLI
63262015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6327
6328 PR fortran/44054
6329 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6330 accessor function.
6331
3aa3c9fc
MP
63322015-05-14 Marek Polacek <polacek@redhat.com>
6333
6334 PR c/66066
6335 PR c/66127
6336 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6337 rather than with 0.
6338
c3388e62
DM
63392015-05-12 David Malcolm <dmalcolm@redhat.com>
6340
6341 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6342 to add a call to warn_for_misleading_indentation.
6343 (c_parser_else_body): Likewise, adding param "else_loc".
6344 (c_parser_if_statement): Check for misleading indentation.
6345 (c_parser_while_statement): Likewise.
6346 (c_parser_for_statement): Likewise.
6347
755e528f
MP
63482015-05-08 Marek Polacek <polacek@redhat.com>
6349
6350 PR c/64918
6351 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6352 (output_init_element): Likewise.
6353
0173bd2a
MP
63542015-05-07 Marek Polacek <polacek@redhat.com>
6355
6356 PR c/65179
6357 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6358 value.
6359
9babc352
MP
63602015-04-30 Marek Polacek <polacek@redhat.com>
6361
6362 * c-typeck.c (set_init_label): Call error_at instead of error and
6363 pass LOC to it.
6364
ac9f18db
MP
6365 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6366 the type of a decl.
6367
ec3fba51
MP
6368 * c-typeck.c (c_build_va_arg): Clarify the error message.
6369
b811915d
TS
63702015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6371
6372 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6373 OMP_STANDALONE_CLAUSES.
6374
f3075008
MP
63752015-04-28 Marek Polacek <polacek@redhat.com>
6376
6377 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6378
4e81b788
MP
63792015-04-28 Marek Polacek <polacek@redhat.com>
6380
6381 PR c/65901
6382 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6383
6c1db78e
MP
63842015-04-25 Marek Polacek <polacek@redhat.com>
6385
6386 PR c/52085
6387 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6388 attribute.
6389
5c4abbb8
MP
63902015-04-23 Marek Polacek <polacek@redhat.com>
6391
6392 PR c/65345
6393 * c-decl.c (set_labels_context_r): New function.
6394 (store_parm_decls): Call it via walk_tree_without_duplicates.
6395 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6396 instead of create_tmp_var. Build TARGET_EXPR instead of
6397 COMPOUND_EXPR.
6398 (build_atomic_assign): Use create_tmp_var_raw instead of
6399 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6400
06aca1d5
IV
64012015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6402
6403 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6404 (c_parser_omp_target_update): Add missed %> to error_at ().
6405
8fba1830
BRF
64062015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6407
6408 PR target/55143
6409 * c-decl.c (c_default_pointer_mode): Remove definition.
6410 * c-tree.h (c_default_pointer_mode): Remove declaration.
6411
62021f64
TB
64122015-03-27 Tobias Burnus <burnus@net-b.de>
6413
6414 PR c/65586
6415 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6416 error out.
6417 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6418 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6419 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6420
9b65e171
JJ
64212015-03-19 Jakub Jelinek <jakub@redhat.com>
6422
6423 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6424 attribute for DECL_EXTERNAL VAR_DECLs.
6425
17958621
JJ
64262015-03-11 Jakub Jelinek <jakub@redhat.com>
6427
6428 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6429 argument.
6430
7ccb1a11
JJ
64312015-03-10 Jakub Jelinek <jakub@redhat.com>
6432
6433 PR c/65120
6434 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6435 before preparing arguments to warn_logical_not_parentheses.
6436
01177669
JJ
64372015-03-09 Jakub Jelinek <jakub@redhat.com>
6438
6439 PR c/65120
6440 * c-typeck.c (parser_build_binary_op): Don't warn for
6441 !!x == y or !b == y where b is _Bool.
6442
802ac282
MP
64432015-03-09 Marek Polacek <polacek@redhat.com>
6444
6445 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6446 * c-decl.c (grokdeclarator): Likewise.
6447 * c-typeck.c (build_binary_op): Likewise.
6448
e5165b60
MP
64492015-02-27 Marek Polacek <polacek@redhat.com>
6450
6451 PR c/65228
6452 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6453
065d214c
MP
64542015-02-14 Marek Polacek <polacek@redhat.com>
6455
6456 PR c/64768
6457 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6458 declared through a typedef name.
6459
e5d9235b
MP
64602015-02-13 Marek Polacek <polacek@redhat.com>
6461
6462 PR c/65050
6463 * c-decl.c (grokdeclarator): Print also the type when giving
6464 the error message about array's incomplete element type.
6465
fa01ffcc
JJ
64662015-02-11 Jakub Jelinek <jakub@redhat.com>
6467
6468 PR c/64824
6469 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6470 check in the POP macro.
6471
c3e38a03
MP
64722015-02-09 Marek Polacek <polacek@redhat.com>
6473
6474 PR c/64856
6475 * c-typeck.c (process_init_element): Don't always wrap
6476 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6477 initializing a range of elements.
6478
4886ec8e
JJ
64792015-02-04 Jakub Jelinek <jakub@redhat.com>
6480
6481 PR c/64824
6482 PR c/64868
6483 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6484
c3e38a03 64852015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
6486
6487 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6488 processing enum declaration.
6489
7b33f0c8
MP
64902015-01-29 Marek Polacek <polacek@redhat.com>
6491
6492 PR c/64709
6493 * c-typeck.c (pop_init_level): If constructor_elements has
6494 exactly one element with integer_zerop value, set constructor_zeroinit
6495 to 1. Remove braces around warning_init call.
6496
dea63e49
JJ
64972015-01-27 Jakub Jelinek <jakub@redhat.com>
6498
6499 PR c/64766
6500 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6501 of FUNCTION_DECLs with error_mark_node.
6502
d38f7dce
JJ
65032015-01-26 Jakub Jelinek <jakub@redhat.com>
6504
6505 PR c/64778
6506 * c-typeck.c (convert_arguments): Return -1 if there are
6507 error_args, even if we've diagnosed too many arguments.
6508
cbf5d0e7
RB
65092015-01-21 Richard Biener <rguenther@suse.de>
6510
6511 PR middle-end/64313
6512 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6513 for builtins the user declared correctly.
6514
41dbbb37
TS
65152015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6516 Bernd Schmidt <bernds@codesourcery.com>
6517 Cesar Philippidis <cesar@codesourcery.com>
6518 James Norris <jnorris@codesourcery.com>
6519 Jakub Jelinek <jakub@redhat.com>
6520 Ilmir Usmanov <i.usmanov@samsung.com>
6521
6522 * c-parser.c: Include "gomp-constants.h".
6523 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6524 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6525 Use OMP_CLAUSE_SET_MAP_KIND.
6526 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6527 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6528 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6529 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6530 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6531 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6532 "copyout", "create", "delete", "deviceptr", "gang", "host",
6533 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6534 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6535 "present_or_create", "pcreate", "seq", "self", "vector",
6536 "vector_length", "wait", "worker".
6537 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6538 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6539 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6540 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6541 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6542 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6543 (c_parser_oacc_data_clause_deviceptr)
6544 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6545 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6546 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6547 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6548 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6549 (c_parser_oacc_parallel, c_parser_oacc_update)
6550 (c_parser_oacc_wait): New functions.
6551 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6552 (c_finish_oacc_data): New prototypes.
6553 * c-typeck.c: Include "gomp-constants.h".
6554 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6555 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6556 OMP_CLAUSE_SET_MAP_KIND.
6557 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6558 (c_finish_oacc_data): New functions.
6559 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6560 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6561 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6562 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6563 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6564 GOMP_MAP_FORCE_DEVICEPTR.
6565
adfac8df
JJ
65662015-01-09 Michael Collison <michael.collison@linaro.org>
6567
6568 * c-array-notation.c: Include hash-set.h, machmode.h,
6569 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6570 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6571 * c-aux-info.c: Ditto.
6572 * c-convert.c: Ditto.
6573 * c-decl.c: Ditto.
6574 * c-errors.c: Ditto.
6575 * c-lang.c: Dittoxs.
6576 * c-objc-common.c: Ditto.
6577 * c-parser.c: Ditto.
6578 * c-typeck.c: Include hash-set.h, machmode.h,
6579 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6580 fold-const.h, wide-int.h, inchash.h, real.h and
6581 fixed-value.h due to flattening of tree.h.
6582
2cc901dc
MP
65832015-01-07 Marek Polacek <polacek@redhat.com>
6584
6585 PR c/64417
6586 * c-typeck.c (process_init_element): Disallow initialization of
6587 a flexible array member with a string constant if the structure
6588 is in an array.
6589
5624e564
JJ
65902015-01-05 Jakub Jelinek <jakub@redhat.com>
6591
e5341100
JJ
6592 PR sanitizer/64344
6593 * c-typeck.c (convert_for_assignment, c_finish_return): For
6594 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6595 types also set in_late_binary_op around convert call.
6596 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6597 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6598 result on expr as last argument to ubsan_instrument_float_cast,
6599 if in_late_binary_op, don't use c_save_expr but save_expr.
6600
5624e564
JJ
6601 Update copyright years.
6602
5bd012f8
MP
66032015-01-05 Marek Polacek <polacek@redhat.com>
6604
6605 PR c/64423
6606 * c-typeck.c (build_array_ref): Pass loc down to
6607 warn_array_subscript_with_type_char.
6608
3f8257db 66092014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6610
6611 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 6612 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 6613 element type.
8e745a17 6614 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 6615 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 6616 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 6617 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6618 to PEDWARN_FOR_QUALIFIERS.
768952be 6619
8f94a8c4
JJ
66202014-12-17 Jakub Jelinek <jakub@redhat.com>
6621
6622 PR sanitizer/64289
6623 * c-convert.c: Include ubsan.h.
6624 (convert): For real -> integral casts and
6625 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6626 instead instrument the float cast directly.
6627
b731b390
JJ
66282014-11-29 Jakub Jelinek <jakub@redhat.com>
6629
6630 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6631 c_finish_stmt_expr): Remove NULL last argument from
6632 create_tmp_var_raw and create_tmp_var calls.
6633 * c-array-notation.c (fix_builtin_array_notation_fn,
6634 build_array_notation_expr, fix_conditional_array_notations_1,
6635 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6636
541e35a6
MP
66372014-11-28 Marek Polacek <polacek@redhat.com>
6638
6639 PR c/63862
6640 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6641 convert the right operand to integer type.
6642
b286be94
MP
66432014-11-25 Marek Polacek <polacek@redhat.com>
6644
6645 PR c/63877
6646 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6647 for inline functions.
6648
aa7da51a
JJ
66492014-11-21 Jakub Jelinek <jakub@redhat.com>
6650
6651 PR target/63764
6652 * c-typeck.c (build_array_ref): Adjust
6653 convert_vector_to_pointer_for_subscript caller. If it returns true,
6654 call non_lvalue_loc on the result.
6655
d876207f
RB
66562014-11-11 Richard Biener <rguenther@suse.de>
6657
6658 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6659 to true.
6660
e5e44252
AK
66612014-11-10 Andi Kleen <ak@linux.intel.com>
6662
6663 PR c/60804
6664 * c-parser.c (c_parser_statement_after_labels): Call
6665 check_no_cilk.
6666 (c_parser_if_statement): Dito.
6667 (c_parser_switch_statement): Dito.
6668 (c_parser_while_statement): Dito.
6669 (c_parser_do_statement): Dito.
6670 (c_parser_for_statement): Dito.
6671 * c-typeck.c (c_finish_loop): Dito.
6672
13c21655
PC
66732014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6674
6675 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6676 OPT_Wshift_count_overflow in the warnings.
6677
2d51fcef
MP
66782014-10-30 Marek Polacek <polacek@redhat.com>
6679
6680 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6681 print the stripped version as well, if they're not the same.
6682
ef4bddc2
RS
66832014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6684
6685 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6686 machine_mode.
6687
c582198b
AM
66882014-10-28 Andrew MacLeod <amacleod@redhat.com>
6689
6690 * c-decl.c: Adjust include files.
6691 * c-parser.c: Ditto.
6692
ddc8de03
PM
66932014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6694 Tom Tromey <tromey@redhat.com>
6695
6696 * c-tree.h (enum c_oracle_request): New.
6697 (c_binding_oracle_function): New typedef.
6698 (c_binding_oracle, c_pushtag, c_bind): Declare.
6699 * c-decl.c (c_binding_oracle): New global.
6700 (I_SYMBOL_CHECKED): New macro.
6701 (i_symbol_binding): New function.
6702 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6703 (I_TAG_CHECKED): New macro.
6704 (i_tag_binding): New function.
6705 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6706 (I_LABEL_CHECKED): New macro.
6707 (i_label_binding): New function.
6708 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6709 (c_print_identifier): Save and restore c_binding_oracle.
6710 (c_pushtag, c_bind): New functions.
6711
60393bbc
AM
67122014-10-27 Andrew MacLeod <amacleod@redhat.com>
6713
6714 * c-typeck.c: Adjust include files.
6715
d723bb7c
MLI
67162014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6717
6718 PR c++/53061
6719 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6720 initialization here...
6721 (c_initialize_diagnostics): ... but here. Set defaults after
6722 building pretty-printer.
6723
1bc5a451
MP
67242014-10-23 Marek Polacek <polacek@redhat.com>
6725
6726 PR c/63626
6727 * c-decl.c (pop_scope): Don't print warning in external_scope.
6728
4435bb92
MP
67292014-10-19 Marek Polacek <polacek@redhat.com>
6730
6731 PR c/63567
6732 * c-typeck.c (output_init_element): Allow initializing objects with
6733 static storage duration with compound literals even in C99 and add
6734 pedwarn for it.
6735
7278465e
MP
67362014-10-17 Marek Polacek <polacek@redhat.com>
6737
6738 PR c/63567
6739 * c-typeck.c (digest_init): Allow initializing objects with static
6740 storage duration with compound literals even in C99 and add pedwarn
6741 for it.
6742
d9b7be2e
MP
67432014-10-17 Marek Polacek <polacek@redhat.com>
6744
6745 PR c/63543
6746 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6747 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6748 error multiple times. Print the type.
6749
f406ae1f
MP
67502014-10-17 Marek Polacek <polacek@redhat.com>
6751
6752 PR c/63549
6753 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6754 type.
6755
92574c7c
MP
67562014-10-17 Marek Polacek <polacek@redhat.com>
6757
6758 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6759 (start_function): Use OPT_Wimplicit_int instead of 0.
6760 (store_parm_decls_oldstyle): Likewise.
6761
1bc4a978
MT
67622014-10-17 Alan Modra <amodra@gmail.com>
6763
6764 PR middle-end/61848
6765 * c-decl.c (merge_decls): Don't merge section name or tls model
6766 to newdecl symtab node, instead merge to olddecl. Override
6767 existing olddecl section name. Set tls_model for all thread-local
6768 vars, not just OMP thread-private ones. Remove incorrect comment.
6769
83685514
AM
67702014-10-16 Andrew MacLeod <amacleod@redhat.com>
6771
6772 * c-decl.c: Adjust include files.
6773
78a7c317
DD
67742014-10-14 DJ Delorie <dj@redhat.com>
6775
6776 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6777 (c_token_starts_typename): Check all __intN, not just __int128.
6778 (c_token_starts_declspecs): Likewise.
6779 (c_parser_declspecs): Likewise.
6780 (c_parser_attribute_any_word): Likewise.
6781 (c_parser_objc_selector): Likewise.
6782 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6783 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6784 is specified.
6785 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6786 __int128.
6787 (finish_declspecs): Likewise.
6788
74d98c1e
AB
67892014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6790
8e745a17 6791 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6792 the duplicate code.
8e745a17 6793 (c_parser_statement): Call the new function.
74d98c1e 6794
84937de2
MP
67952014-10-09 Marek Polacek <polacek@redhat.com>
6796
6797 PR c/63480
6798 * c-typeck.c (pop_init_level): Don't warn about initializing
6799 with { }.
6800
0382aaa0
MP
68012014-10-07 Marek Polacek <polacek@redhat.com>
6802
6803 PR c/59717
6804 * c-decl.c (header_for_builtin_fn): New function.
6805 (implicitly_declare): Suggest which header to include.
6806
7a0ca710
MP
68072014-10-07 Marek Polacek <polacek@redhat.com>
6808
6809 * c-convert.c (convert): Use error_operand_p.
6810 * c-typeck.c (require_complete_type): Likewise.
6811 (really_atomic_lvalue): Likewise.
6812 (digest_init): Likewise.
6813 (handle_omp_array_sections_1): Likewise.
6814
6bc8a126
MP
68152014-10-03 Marek Polacek <polacek@redhat.com>
6816
6817 PR c/63453
6818 * c-decl.c (pop_scope): Don't warn about "inline function declared
6819 but never defined" for functions marked with gnu_inline attribute.
6820
d90c0a59
JJ
68212014-09-25 Jakub Jelinek <jakub@redhat.com>
6822
6823 PR c++/63249
6824 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6825 on low_bound and length.
6826
083e891e
MP
68272014-09-24 Marek Polacek <polacek@redhat.com>
6828
6829 PR c/61405
6830 PR c/53874
6831 * c-parser.c: Don't define CPP_KEYWORD.
6832 (c_parser_switch_statement): Pass original type to c_finish_case.
6833 * c-tree.h (c_finish_case): Update declaration.
6834 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6835 conditionally to c_do_switch_warnings.
6836
8d95fe25
MP
68372014-09-03 Marek Polacek <polacek@redhat.com>
6838
6839 PR c/62024
6840 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6841 conversions.
6842
9a771876
JJ
68432014-09-02 Jakub Jelinek <jakub@redhat.com>
6844 Balaji V. Iyer <balaji.v.iyer@intel.com>
6845 Igor Zamyatin <igor.zamyatin@intel.com>
6846
6847 * c-parser.c (c_parser_cilk_for): New function.
6848 (c_parser_cilk_grainsize): Likewise.
6849 (c_get_temp_regvar): Likewise.
6850 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6851 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6852 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6853 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6854 case.
6855
b7679d96
CG
68562014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6857
6858 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6859 with using HOST_WIDE_INT without truncation to 'int'
6860
59ea0364
MP
68612014-08-22 Marek Polacek <polacek@redhat.com>
6862
6863 PR c++/62199
6864 * c-typeck.c (parser_build_binary_op): Adjust call to
6865 warn_logical_not_parentheses.
6866
671a475e
IZ
68672014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6868
6869 PR other/62008
6870 * c-parser.c (c_parser_array_notation): Check for correct
6871 type of an array added.
6872
04159acf
MP
68732014-08-19 Marek Polacek <polacek@redhat.com>
6874
6875 PR c++/62153
6876 * c-typeck.c (build_binary_op): If either operand of a comparison
6877 is a boolean expression, call maybe_warn_bool_compare.
6878
c77935ee
PP
68792014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6880
6881 PR c/45584
6882 * c-typeck.c (build_c_cast): Do a conversion even when the
6883 TYPE_MAIN_VARIANTs are the same.
6884
35aff4fb
MP
68852014-08-19 Marek Polacek <polacek@redhat.com>
6886
6887 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6888 pedwarn_c99 instead of pedwarn.
6889 (grokfield): Likewise.
6890 (warn_defaults_to): New function.
6891 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6892 Unconditionally call pedwarn_c99 instead of pedwarn.
6893 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6894 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6895 check flag_isoc11 before.
6896 * c-errors.c (pedwarn_c99): Change the return type to bool.
6897 Handle -Wc99-c11-compat.
6898 * c-parser.c (disable_extension_diagnostics): Handle
6899 warn_c99_c11_compat.
6900 (restore_extension_diagnostics): Likewise.
6901 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6902 instead of pedwarn, don't check flag_isoc11 before.
6903 (c_parser_declspecs): Likewise.
6904 (c_parser_alignas_specifier): Likewise.
6905 (c_parser_alignof_expression): Likewise.
6906 (c_parser_generic_selection): Likewise.
6907 * c-tree.h (pedwarn_c99): Update declaration.
6908 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6909 of pedwarn_c99.
6910
177cce46
MP
69112014-08-19 Marek Polacek <polacek@redhat.com>
6912
6913 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6914 to pedwarn_c90.
6915 * c-errors.c: Include "opts.h".
6916 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6917 * c-parser.c (disable_extension_diagnostics): Handle negative value
6918 of warn_c90_c99_compat, too.
6919 (restore_extension_diagnostics): Likewise.
6920 (c_parser_compound_statement_nostart): Pass
6921 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6922
6dc99c33
MP
69232014-08-12 Marek Polacek <polacek@redhat.com>
6924
6925 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6926 Add pedwarn.
6927 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6928 Likewise.
6929 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
6930
3f8257db 69312014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
6932
6933 PR c/51849
6934 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
6935 Call pedwarn_c90 instead of pedwarn.
6936 (check_bitfield_type_and_width): Likewise.
6937 (declspecs_add_qual): Likewise.
6938 (declspecs_add_type): Likewise.
6939 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
6940 Adjust to only call pedwarn_c90.
6941 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
6942 pedwarn_c90 instead of pedwarn.
6943 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
6944 * c-parser.c (disable_extension_diagnostics): Handle
6945 warn_c90_c99_compat.
6946 (restore_extension_diagnostics): Likewise.
6947 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
6948 pedwarn_c90 instead of pedwarn.
6949 (c_parser_initelt): Likewise.
6950 (c_parser_postfix_expression): Likewise.
6951 (c_parser_postfix_expression_after_paren_type): Likewise.
6952 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
6953 * c-tree.h: Fix formatting.
6954 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
6955 pedwarn_c90 instead of pedwarn.
6956
9f25a338
TS
69572014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6958
6959 * c-typeck.c: Remove include of pointer-set.h.
6960
044331a8
MP
69612014-08-07 Marek Polacek <polacek@redhat.com>
6962
6963 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
6964
b787e7a2
TS
69652014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6966
6967 * c-typeck.c: Use hash_map instead of pointer_map.
6968
6e2830c3
TS
69692014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6970
6971 * c-decl.c: Use hash_set instead of pointer_set.
6972
a7ee52fb
IZ
69732014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6974
6975 PR middle-end/61455
6976 * c-array-notation.c (expand_array_notations): Handling
6977 of DECL_EXPR added.
6978
b4dfdc11
MG
69792014-07-31 Marc Glisse <marc.glisse@inria.fr>
6980
6981 PR c++/60517
6982 * c-typeck.c (c_finish_return): Return 0 instead of the address of
6983 a local variable.
6984
976d5a22
TT
69852014-07-30 Tom Tromey <tromey@redhat.com>
6986
6987 * c-typeck.c (struct constructor_stack) <designator_depth>: New
6988 field.
6989 (really_start_incremental_init, push_init_level): Initialize
6990 designator_depth.
6991 (pop_init_level): Set global designator_depth.
6992 (process_init_element): Check for designated_init attribute.
6993
30281de2
MP
69942014-07-20 Marek Polacek <polacek@redhat.com>
6995
6996 PR c/61852
6997 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
6998 (implicitly_declare): Pass location to implicit_decl_warning.
6999
b108f48f
JJ
70002014-07-14 Jakub Jelinek <jakub@redhat.com>
7001
7002 PR middle-end/61294
7003 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
7004 If non-NULL, call c_parser_check_literal_zero.
7005 (c_parser_check_literal_zero): New function.
7006 (c_parser_postfix_expression_after_primary): Adjust
7007 c_parser_expr_list caller, handle -Wmemset-transposed-args.
7008
773ec47f
MP
70092014-07-06 Marek Polacek <polacek@redhat.com>
7010
7011 PR c/6940
7012 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
7013 * c-tree.h (C_ARRAY_PARAMETER): Define.
7014 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
7015 function parameter.
7016
22e1cf1c 70172014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 7018 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
7019
7020 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
7021 releasing symbol.
7022
52ec0ea3
MP
70232014-07-01 Marek Polacek <polacek@redhat.com>
7024
7025 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
7026 instead of 0 to WARN_FOR_ASSIGNMENT.
7027
d5c3d343
MP
70282014-07-01 Marek Polacek <polacek@redhat.com>
7029
7030 PR c/58286
7031 * c-typeck.c (convert_for_assignment): Pass
7032 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
7033
6a7253a4
MP
70342014-06-30 Marek Polacek <polacek@redhat.com>
7035
7036 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
7037 has no_sanitize_undefined attribute.
7038
5e88a8f4
IZ
70392014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
7040
7041 PR middle-end/57541
7042 * c-array-notation.c (fix_builtin_array_notation_fn):
7043 Check for 0 arguments in builtin call. Check that bultin argument is
7044 correct.
7045 * c-parser.c (c_parser_array_notation): Check for incorrect initial
7046 index.
7047
9698b078
SH
70482014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
7049
7050 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
7051 qualifiers in __auto_type for atomic types.
7052 (c_parser_typeof_specifier): Discard all type qualifiers in
7053 __typeof__ for atomic types.
7054
6e07c515
MP
70552014-06-25 Marek Polacek <polacek@redhat.com>
7056
7057 PR c/61162
7058 * c-parser.c (c_parser_statement_after_labels): Pass the location of
7059 the return expression to c_finish_return.
7060
da6f124d
JJ
70612014-06-25 Jakub Jelinek <jakub@redhat.com>
7062
7063 * c-typeck.c (c_finish_omp_clauses): Make sure
7064 OMP_CLAUSE_LINEAR_STEP has correct type.
7065
c203e8a7
TS
70662014-06-24 Trevor Saunders <tsaunders@mozilla.com>
7067
7068 * c-decl.c: Adjust.
7069
56ad0e38
JJ
70702014-06-24 Jakub Jelinek <jakub@redhat.com>
7071
7072 * c-parser.c (c_parser_omp_for_loop): For
7073 #pragma omp parallel for simd move lastprivate clause from parallel
7074 to for rather than simd.
7075
47c2554f
MP
70762014-06-23 Marek Polacek <polacek@redhat.com>
7077
7078 * c-typeck.c (parser_build_binary_op): Don't call
7079 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
7080
56363ffd
JH
70812014-06-15 Jan Hubicka <hubicka@ucw.cz>
7082
7083 * c-parser.c (c_parser_omp_threadprivate): Likewise.
7084 * c-decl.c (merge_decls): Likewise.
7085
d7ff7ae5
MP
70862014-06-09 Marek Polacek <polacek@redhat.com>
7087
7088 PR c/36446
7089 * c-typeck.c (error_init): Call inform instead of error_at.
7090 (pedwarn_init): Call inform instead of pedwarn.
7091 (warning_init): Call inform instead of warning_at.
7092
24d047a3
JH
70932014-06-07 Jan Hubicka <hubicka@ucw.cz>
7094
7095 * c-decl.c (merge_decls): Use set_decl_section_name.
7096 (duplicate_decls): Remove node if it exists.
7097
9bac5cbb
G
70982014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
7099
7100 PR c/53119
7101 * c-typeck.c (push_init_level, process_init_element,
7102 pop_init_level): Correct check for zero initialization, move
7103 missing brace warning to respect zero initialization.
7104
8ffcdea8
MP
71052014-06-05 Marek Polacek <polacek@redhat.com>
7106
7107 PR c/56724
7108 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
7109
742938c9
MP
71102014-06-05 Marek Polacek <polacek@redhat.com>
7111
7112 PR c/49706
7113 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 7114 on the left hand side operand of a comparison.
742938c9 7115
6447c55d
MP
71162014-06-05 Marek Polacek <polacek@redhat.com>
7117
7118 PR c/48062
7119 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
7120 Print note only if the warning was printed.
7121
9dc7743c
IZ
71222014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
7123
7124 PR c/58942
7125 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
7126 with a pointer.
7127
fedfecef
MP
71282014-06-03 Marek Polacek <polacek@redhat.com>
7129
7130 PR c/60439
7131 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
7132 c_start_case.
7133 * c-tree.h (c_start_case): Update.
7134 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
7135 switch condition has boolean value.
7136
9b2b7279
AM
71372014-06-02 Andrew MacLeod <amacleod@redhat.com>
7138
7139 * c-decl.c: Include builtins.h.
7140 * c-parser.c: Likewise.
7141
5c1bc275
MP
71422014-05-27 Marek Polacek <polacek@redhat.com>
7143
7144 PR c/56724
7145 * c-typeck.c (convert_arguments): Get location of a parameter. Change
7146 error and warning calls to error_at and warning_at. Pass location of
7147 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
7148 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
7149 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
7150
97563bc8
IZ
71512014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
7152
7153 PR c/61191
7154 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
7155 function parameters.
7156
aede2c10
JH
71572014-05-23 Jan Hubicka <hubicka@ucw.cz>
7158
7159 * c-decl.c (merge_decls): Preserve symtab node pointers.
7160 (duplicate_decls): Free new decl.
7161
edbba2ce
TS
71622014-05-23 Thomas Schwinge <thomas@codesourcery.com>
7163
f3316c6d
TS
7164 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
7165 initialization.
7166
edbba2ce
TS
7167 * c-parser.c (c_parser_omp_target): Return bool values.
7168
68c81f24
TS
71692014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7170
7171 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
7172 num_teams_loc variable to num_thread_limit_loc.
7173
632f2871
RS
71742014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7175
7176 * c-array-notation.c (expand_array_notations): Use void_node
7177 instead of void_zero_node.
7178
766090c2
TS
71792014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7180
7181 * c-decl.c (finish_struct): Adjust.
7182 (finish_enum): Likewise.
7183 (bind): Adjust.
7184 (record_inline_static): Likewise.
7185 (push_scope): Likewise.
7186 (make_label): Likewise.
7187 (lookup_label_for_goto): Likewise.
7188 (finish_struct): Likewise.
7189 (finish_enum): Likewise.
7190 (store_parm_decls): Likewise.
7191 (c_push_function_context): Likewise.
7192 * c-lang.h: Remove usage of variable_size gty attribute.
7193 * c-parser.c (c_parse_init): Adjust.
7194 (c_parse_file): Likewise.
7195
2b107f6b
MP
71962014-05-13 Marek Polacek <polacek@redhat.com>
7197
7198 PR c/61162
7199 * c-typeck.c (convert_for_assignment): Pass location to
7200 WARN_FOR_ASSIGNMENT instead of input_location.
7201
d033409e
MP
72022014-05-10 Marek Polacek <polacek@redhat.com>
7203
7204 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7205 maybe_warn_string_init.
7206 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7207 maybe_warn_string_init.
7208 * c-tree.h (maybe_warn_string_init): Update declaration.
7209 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7210 Call pedwarn_init with loc instead of with input_location.
7211 (digest_init): Pass init_loc to maybe_warn_string_init.
7212 (pop_init_level): Call pedwarn_init with loc instead of with
7213 input_location.
7214 (set_init_index): Likewise.
7215 (process_init_element): Likewise.
7216
ea58ef42
MP
72172014-05-09 Marek Polacek <polacek@redhat.com>
7218
7219 PR c/61096
7220 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7221 (c_parser_initelt): Pass location to set_init_label. Pass array index
7222 location to set_init_index.
7223 * c-tree.h (push_init_level): Update declaration.
7224 (pop_init_level): Likewise.
7225 (set_init_index): Likewise.
7226 (set_init_label): Likewise.
7227 * c-typeck.c (error_init): Add location parameter. Call error_at
7228 instead of error.
7229 (digest_init): Pass init_loc to error_init.
7230 (really_start_incremental_init):
7231 (push_init_level): Add location parameter. Pass loc to pop_init_level
7232 and error_init.
7233 (pop_init_level): Likewise.
7234 (set_designator): Add location parameter. Pass loc to pop_init_level,
7235 push_init_level, and error_init.
7236 (set_init_index): Add location parameter. Pass loc to error_init and
7237 set_designator.
7238 (set_init_label): Likewise.
7239 (output_init_element): Pass loc to error_init.
7240 (process_init_element): Pass loc to error_init, pop_init_level,
7241 pedwarn_init, and push_init_level.
7242
661a0813
MP
72432014-05-09 Marek Polacek <polacek@redhat.com>
7244
7245 PR c/50459
7246 * c-parser.c (c_parser_attributes): Parse the arguments as an
7247 expression-list if the attribute takes identifier.
7248
2793eeab
MP
72492014-05-08 Marek Polacek <polacek@redhat.com>
7250
7251 PR c/61053
7252 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7253 TYPE_ALIGN_UNIT.
7254
f827930a
MP
72552014-05-08 Marek Polacek <polacek@redhat.com>
7256
7257 PR c/61077
7258 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7259 of main.
7260
1d60af08
KZ
72612014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7262 Mike Stump <mikestump@comcast.net>
7263 Richard Sandiford <rdsandiford@googlemail.com>
7264
7265 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7266 (finish_enum): Use wide-int interfaces.
7267 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7268 * c-typeck.c (build_c_cast): Likewise.
7269 (set_nonincremental_init_from_string): Likewise.
7270 (c_tree_equal): Likewise.
7271
a0e24419
MP
72722014-05-02 Marek Polacek <polacek@redhat.com>
7273
7274 PR c/25801
7275 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7276 Return size_one_node when the type is not complete.
7277 (pointer_diff): Remove comment.
7278 (build_unary_op): Improve error messages.
7279
19fc9faa
MP
72802014-05-02 Marek Polacek <polacek@redhat.com>
7281
7282 * c-typeck.c (c_finish_return): Separate warning_at calls.
7283
63bc4e87
MP
72842014-05-02 Marek Polacek <polacek@redhat.com>
7285
7286 * c-tree.h (error_init): Remove declaration.
7287 (pedwarn_init): Likewise.
7288 * c-typeck.c (error_init): Make static and move above.
7289 (pedwarn_init): Likewise.
7290 (warning_init): Move above.
7291 (maybe_warn_string_init): Likewise.
7292
4bd2511b
JL
72932014-05-01 Jeff Law <law@redhat.com>
7294
7295 Revert:
7296
7297 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7298 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7299 avoid goto.
7300
6a358dcb
MP
73012014-05-02 Marek Polacek <polacek@redhat.com>
7302
7303 PR c/60784
7304 * c-typeck.c (push_init_level): Set constructor_designated to
7305 p->designated for structures.
7306
ae5ebda4
MP
73072014-05-01 Marek Polacek <polacek@redhat.com>
7308
7309 PR c/60915
7310 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7311 function-definition has an attribute after the declarator.
7312
96b40f8d
MP
73132014-05-01 Marek Polacek <polacek@redhat.com>
7314
7315 PR c/60257
7316 * c-typeck.c (warning_init): Add location_t parameter. Call
7317 warning_at instead of warning.
7318 (push_init_level): Pass input_location to warning_init.
7319 (add_pending_init): Add location_t parameter. Pass loc to
7320 warning_init.
7321 (set_nonincremental_init): Pass input_location to add_pending_init.
7322 (set_nonincremental_init_from_string): Likewise.
7323 (output_init_element): Pass loc to warning_init and to
7324 add_pending_init.
7325
32e00768
MP
73262014-05-01 Marek Polacek <polacek@redhat.com>
7327
7328 PR c/43395
7329 * c-typeck.c (c_finish_return): Distinguish between label and variable
7330 when warning about returning local address.
7331
c9379ce2
MP
73322014-05-01 Marek Polacek <polacek@redhat.com>
7333
7334 PR c/29467
7335 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7336 in C89 mode.
7337
d00887e8
MP
73382014-05-01 Marek Polacek <polacek@redhat.com>
7339
7340 PR c/43245
7341 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7342 instead of 0 to WARN_FOR_QUALIFIERS.
7343
5436fa2e
MP
73442014-05-01 Marek Polacek <polacek@redhat.com>
7345
7346 PR c/56989
7347 * c-typeck.c (default_conversion): Use better location for
7348 error call.
7349
f8ed5150
MP
73502014-04-30 Marek Polacek <polacek@redhat.com>
7351
7352 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7353 also when SANITIZE_FLOAT_DIVIDE is on.
7354
8337d1db
MP
73552014-04-30 Marek Polacek <polacek@redhat.com>
7356
7357 PR c/60139
7358 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7359 and pedwarn_init. Use loc insted of input_location.
7360
c4bdc42f
MP
73612014-04-30 Marek Polacek <polacek@redhat.com>
7362
7363 PR c/60351
7364 * c-typeck.c (build_binary_op): Use location when warning about
7365 shift count.
7366
45484dcf
MP
73672014-04-25 Marek Polacek <polacek@redhat.com>
7368
7369 PR c/18079
7370 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7371 always_inline/noinline and hot/cold attributes.
7372
34cf811f
MP
73732014-04-25 Marek Polacek <polacek@redhat.com>
7374
7375 PR c/60114
7376 * c-parser.c (c_parser_initelt): Pass input_location to
7377 process_init_element.
7378 (c_parser_initval): Pass loc to process_init_element.
7379 * c-tree.h (process_init_element): Adjust declaration.
7380 * c-typeck.c (push_init_level): Pass input_location to
7381 process_init_element.
7382 (pop_init_level): Likewise.
7383 (set_designator): Likewise.
7384 (output_init_element): Add location_t parameter. Pass loc to
7385 digest_init.
7386 (output_pending_init_elements): Pass input_location to
7387 output_init_element.
7388 (process_init_element): Add location_t parameter. Pass loc to
7389 output_init_element.
7390
42056eac
JJ
73912014-04-24 Jakub Jelinek <jakub@redhat.com>
7392
7393 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7394 atomic-clause, allow comma in between atomic-clause and
7395 seq_cst.
7396
e162a134
JJ
73972014-04-22 Jakub Jelinek <jakub@redhat.com>
7398
7399 PR c/59073
7400 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7401 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7402
2f6babac
IZ
74032014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7404
7405 PR middle-end/60469
7406 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7407 create_tmp_var instead build_decl for creating temps.
7408 (build_array_notation_expr): Likewise.
7409 (fix_conditional_array_notations_1): Likewise.
7410 (fix_array_notation_expr): Likewise.
7411 (fix_array_notation_call_expr): Likewise.
7412
8edbfaa6
JJ
74132014-03-28 Jakub Jelinek <jakub@redhat.com>
7414
7415 PR c++/60689
7416 * c-tree.h (c_build_function_call_vec): New prototype.
7417 * c-typeck.c (build_function_call_vec): Don't call
7418 resolve_overloaded_builtin here.
7419 (c_build_function_call_vec): New wrapper function around
7420 build_function_call_vec. Call resolve_overloaded_builtin here.
7421 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7422 Call c_build_function_call_vec instead of build_function_call_vec.
7423 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7424 * c-decl.c (finish_decl): Likewise.
7425
7485aeea
MLI
74262014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7427
7428 PR c/55383
7429 * c-typeck.c: Use correct format string in cast-qual warning
7430
b17a8b07
TS
74312014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7432
7433 * c-decl.c (c_decl_attributes): Use
7434 lang_hooks.types.omp_mappable_type.
7435 * c-typeck.c (c_finish_omp_clauses): Likewise.
7436
3af9c5e9
MP
74372014-03-06 Marek Polacek <polacek@redhat.com>
7438
7439 PR c/60197
7440 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7441 of checking tree code.
7442
1c9f5f33
PK
74432014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7444
7445 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7446 (c_parser_parameter_declaration): Likewise.
7447
cc28fc7f
MP
74482014-02-19 Marek Polacek <polacek@redhat.com>
7449
7450 PR c/60195
7451 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7452 Call mark_exp_read on exp.value.
7453 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7454 TREE_ADDRESSABLE on old instead of val.
7455 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7456
b581c05c
PK
74572014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7458
7459 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7460 C_EXPR_APPEND by vec_safe_push.
7461 * c-tree.h (C_EXPR_APPEND): Remove.
7462
81e5eca8
MP
74632014-01-31 Marek Polacek <polacek@redhat.com>
7464
7465 PR c/59963
7466 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7467 build_function_call_vec.
7468 (build_function_call): Likewise.
7469 (build_atomic_assign): Likewise.
7470 (build_function_call_vec): Add arg_loc parameter. Use it.
7471 (convert_arguments): Likewise.
7472 (convert_for_assignment): Rename rhs_loc to expr_loc.
7473 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7474 (c_parser_objc_keywordexpr): Likewise.
7475 (c_parser_postfix_expression_after_primary): Call
7476 build_function_call_vec with expr_loc rather than op_loc.
7477 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7478 build_function_call_vec.
7479 (c_parser_expr_list): Add locations parameter. Fill it with locations
7480 of function arguments.
7481 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7482
68fca595
MP
74832014-01-30 Marek Polacek <polacek@redhat.com>
7484
7485 PR c/59940
7486 * c-typeck.c (build_function_call_vec): Use loc parameter.
7487 (convert_arguments): Add location parameter. Use it.
7488 (ep_convert_and_check): Likewise.
7489 (build_atomic_assign): Adjust convert_for_assignment call.
7490 (build_modify_expr): Likewise.
7491 (digest_init): Likewise.
7492 (c_finish_return): Likewise.
7493 (build_conditional_expr): Adjust ep_convert_and_check calls.
7494 (convert_for_assignment): Add rhs_loc parameter. Use it.
7495 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7496 calls.
7497
fa337f3a
RB
74982014-01-30 Richard Biener <rguenther@suse.de>
7499
7500 PR c/59905
7501 * c-typeck.c (build_function_call_vec): Do not replace calls
7502 to a function via an incompatible type with a runtime abort.
7503
b72271b9
BI
75042014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7505
7506 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7507 flag_enable_cilkplus with flag_cilkplus.
7508 (c_parser_direct_declarator_inner): Likewise.
7509 (c_parser_attribute_any_word): Likewise.
7510 (c_parser_attributes): Likewise.
7511 (c_parser_compound_statement): Likewise.
7512 (c_parser_statement_after_labels): Likewise.
7513 (c_parser_if_statement): Likewise.
7514 (c_parser_switch_statement): Likewise.
7515 (c_parser_do_statement): Likewise.
7516 (c_parser_for_statement): Likewise.
7517 (c_parser_unary_expression): Likewise.
7518 (c_parser_postfix_expression): Likewise.
7519 (c_parser_postfix_expression_after_primary): Likewise.
7520 (c_parser_postfix_expression_after_primary): Likewise.
7521 (c_parser_omp_clause_name): Likewise.
7522 (c_finish_omp_declare_simd): Likewise.
7523 (c_parser_cilk_verify_simd): Likewise.
7524 * c-typeck.c (build_array_ref): Likewise.
7525 (build_function_call_vec): Likewise.
7526 (convert_arguments): Likewise.
7527 (build_compound_expr): Likewise.
7528 (c_finish_return): Likewise.
7529 (c_finish_if_stmt): Likewise.
7530 (c_finish_loop): Likewise.
7531 (build_binary_op): Likewise.
7532
393e8e8b
MP
75332014-01-23 Marek Polacek <polacek@redhat.com>
7534
7535 PR c/59846
7536 * c-typeck.c (parser_build_binary_op): Use location instead of
7537 input_location.
7538 (build_binary_op): Pass location to shorten_compare.
7539
f04dda30
MP
75402014-01-23 Marek Polacek <polacek@redhat.com>
7541
7542 PR c/58346
7543 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7544 an empty aggregate.
7545
789eadcd
MP
75462014-01-23 Marek Polacek <polacek@redhat.com>
7547
7548 PR c/59871
7549 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7550 of a comma expression.
7551 (emit_side_effect_warnings): Likewise.
7552
40f14e9f
BI
75532014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7554
7555 PR c/59825
7556 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7557 function to use walk_tree and moved a lot of its functionality to
7558 expand_array_notations.
7559 (expand_array_notations): New function.
7560
74558dd9
BI
75612014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7562
7563 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7564 attribute an attribute without value.
7565
652fea39
JJ
75662014-01-23 Jakub Jelinek <jakub@redhat.com>
7567
7568 PR middle-end/58809
7569 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7570 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7571
f34f1c87
MP
75722014-01-22 Marek Polacek <polacek@redhat.com>
7573
7574 PR c/59891
7575 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7576 of remove_c_maybe_const_expr on op1 and op2.
7577
241f845a
JJ
75782014-01-15 Jakub Jelinek <jakub@redhat.com>
7579
7580 PR c/58943
7581 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7582 effects, preevaluate rhs using SAVE_EXPR first.
7583
9a74f20c
BI
75842014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7585
7586 PR c++/59631
7587 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7588 statements with if-elseif statements.
7589
96066ce1
MP
75902014-01-06 Marek Polacek <polacek@redhat.com>
7591
7592 PR c/57773
7593 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7594 defined bit-field types only in ISO C.
7595
23a5b65a
RS
75962014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7597
7598 Update copyright years
7599
f9030485
RS
76002014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7601
7602 * c-array-notation.c: Use the standard form for the copyright notice.
7603
41958c28
BI
76042013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7605
7606 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7607 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7608 field in parser is not empty. If not-empty, call the function
7609 c_parser_finish_omp_declare_simd.
7610 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7611 between SIMD-enabled functions and #pragma simd. Added new parameter.
7612 (c_parser_cilk_all_clauses): Modified the usage of the function
7613 c_parser_cilk_clause_vectorlength as mentioned above.
7614 (c_parser_cilk_simd_fn_vector_attrs): New function.
7615 (c_finish_cilk_simd_fn_tokens): Likewise.
7616 (is_cilkplus_vector_p): Likewise.
7617 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7618 "nomask," and "mask" strings in clause name.
7619 (c_parser_omp_all_clauses): Added 3 new case statements:
7620 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7621 PRAGMA_CILK_CLAUSE_NOMASK.
7622 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7623 check for vector attribute and if so call the function
7624 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7625 called the function c_finish_cilk_simd_fn_tokens.
7626 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7627 parser field is non-empty. If so, parse them as you would parse
7628 the omp declare simd pragma.
7629 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7630 Added a check when step is a parameter and flag it as error.
7631 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7632 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7633 pragma_omp_clause.
7634
cef0fd0e
TS
76352013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7636
7637 * c-parser.c (c_parser_omp_parallel): Fix description.
7638
12893402
BI
76392013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7640
7641 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7642 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7643 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7644 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7645
296674db
JM
76462013-12-04 Joseph Myers <joseph@codesourcery.com>
7647
7648 PR c/52023
7649 * c-parser.c (c_parser_alignas_specifier): Use
7650 c_sizeof_or_alignof_type instead of c_alignof.
7651 (c_parser_alignof_expression): Likewise, with min_alignof
7652 parameter depending on alignof spelling used.
7653
edd28054
MP
76542013-12-04 Marek Polacek <polacek@redhat.com>
7655
7656 PR c/54113
7657 * c-decl.c (start_function): Don't warn for missing prototype for
7658 inline functions.
7659
da0fc454
MP
76602013-12-03 Marek Polacek <polacek@redhat.com>
7661
7662 PR c/59351
7663 * c-decl.c (build_compound_literal): Allow compound literals with
7664 empty initial value.
7665
4c2ecab0
JM
76662013-12-02 Joseph Myers <joseph@codesourcery.com>
7667
7668 PR c/58235
7669 * c-typeck.c (build_modify_expr): Diagnose assignment to
7670 expression with array type.
7671
340baef7
JM
76722013-11-29 Joseph Myers <joseph@codesourcery.com>
7673
7674 PR c/42262
7675 * c-typeck.c (process_init_element): Do not treat a string as
7676 initializing a whole array when used with a designator for an
7677 individual element.
7678
6763b9f7
JM
76792013-11-29 Joseph Myers <joseph@codesourcery.com>
7680
7681 PR c/57574
7682 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7683 an inline function following a static declaration.
7684
e7bd1de1
JJ
76852013-11-28 Jakub Jelinek <jakub@redhat.com>
7686
7687 PR c/59310
7688 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7689 to p_name before calling c_parser_omp_teams instead of after.
7690 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7691 argument. Remove unused p_name variable.
7692
0136f8f0
AH
76932013-11-27 Aldy Hernandez <aldyh@redhat.com>
7694 Jakub Jelinek <jakub@redhat.com>
7695
7696 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7697 external_scope is NULL.
7698
241b71bb
TV
76992013-11-27 Tom de Vries <tom@codesourcery.com>
7700 Marc Glisse <marc.glisse@inria.fr>
7701
7702 PR c++/59032
7703 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7704
2fb9a547
AM
77052013-11-22 Andrew MacLeod <amacleod@redhat.com>
7706
7707 * c-typeck.c: Add required include files from gimple.h.
7708
8400e75e
DM
77092013-11-22 David Malcolm <dmalcolm@redhat.com>
7710
7711 * c-decl.c (define_label, shadow_tag_warned)
7712 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7713 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7714 (declspecs_add_type): Remove use of in_system_header macro.
7715 * c-parser.c (c_parser_unary_expression): Likewise.
7716 * c-typeck.c (store_init_value, process_init_element)
7717 (c_start_case): Likewise.
7718
7719 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7720 macro.
7721
7722 * c-parser.c (c_parser_set_source_position_from_token): Remove
7723 reference to in_system_header from comment.
7724
386b1f1f
RS
77252013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7726
7727 * c-decl.c (grokdeclarator): Update comment to refer to
7728 tree_to_[su]hwi rather than tree_low_cst.
7729
ae7e9ddd
RS
77302013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7731
7732 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7733 tree_to_uhwi throughout.
7734
9439e9a1
RS
77352013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7736
7737 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7738 throughout.
7739
9541ffee
RS
77402013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7741
7742 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7743 throughout.
7744
c02065fc
AH
77452013-11-15 Aldy Hernandez <aldyh@redhat.com>
7746
7747 * c-parser.c (c_parser_cilk_simd): New.
7748 (c_parser_cilk_verify_simd): New.
7749 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7750 (c_parser_omp_for_loop): Add case for NE_EXPR.
7751 Set c_break_label for CILK_SIMD.
7752 (c_parser_cilk_clause_vectorlength): New.
7753 (c_parser_cilk_clause_linear): New.
7754 (c_parser_cilk_clause_name): New.
7755 (c_parser_cilk_all_clauses): New.
7756 * c-typeck.c (build_unary_op): Pass location argument to
7757 readonly_error.
7758 (build_modify_expr): Same.
7759 (build_asm_expr): Same.
7760 (c_finish_bc_stmt): Error on break/continue in loops.
7761
18f429e2
AM
77622013-11-14 Andrew MacLeod <amacleod@redhat.com>
7763
7764 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7765
d8a2d370
DN
77662013-11-14 Diego Novillo <dnovillo@google.com>
7767
7768 * c-decl.c: Include print-tree.h.
7769 Include stor-layout.h.
7770 Include varasm.h.
7771 Include attribs.h.
7772 Include stringpool.h.
7773 * c-lang.c: Include fold-const.h.
7774 * c-parser.c: Include stringpool.h.
7775 Include attribs.h.
7776 Include stor-layout.h.
7777 Include varasm.h.
7778 Include trans-mem.h.
7779 * c-typeck.c: Include stor-layout.h.
7780 Include trans-mem.h.
7781 Include varasm.h.
7782 Include stmt.h.
7783
38b7bc7f
JM
77842013-11-13 Joseph Myers <joseph@codesourcery.com>
7785
7786 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7787 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7788 __auto_type.
7789 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7790 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7791 RID_AUTO_TYPE.
7792 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7793 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7794 (c_parser_declarator, c_parser_direct_declarator_inner)
7795 (c_parser_parameter_declaration, c_parser_type_name): All callers
7796 changed.
7797 (c_parser_declaration_or_fndef): Handle declarations with type
7798 determined from the initializer.
7799
45b0be94
AM
78002013-11-12 Andrew MacLeod <amacleod@redhat.com>
7801
18f429e2 7802 * c-typeck.c: Include gimplify.h.
45b0be94 7803
582d9b50
JM
78042013-11-12 Joseph Myers <joseph@codesourcery.com>
7805
7806 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7807 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7808 comment.
7809 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7810 or _Thread_local as appropriate in diagnostics.
7811 (build_null_declspecs): Initialize ret->thread_gnu_p.
7812 (declspecs_add_scspec): Handle either __thread or _Thread_local
7813 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7814 pedantic. Do not disallow _Thread_local extern and _Thread_local
7815 static.
7816
267bac10
JM
78172013-11-07 Joseph Myers <joseph@codesourcery.com>
7818 Andrew MacLeod <amacleod@redhat.com>
7819
7820 * c-aux-info.c (gen_type): Handle atomic qualifier.
7821 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7822 qualifiers when compating types.
7823 (shadow_tag_warned): Handle atomic_p in declspecs.
7824 (quals_from_declspecs): Likewise.
7825 (start_decl): Use c_type_promotes_to when promoting argument
7826 types.
7827 (grokdeclarator): Handle _Atomic.
7828 (get_parm_info): Diagnose any qualifier on "void" as only
7829 parameter.
7830 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7831 comparing types. Use c_type_promotes_to when promoting argument
7832 types.
7833 (finish_function): Use c_type_promotes_to when promoting argument
7834 types.
7835 (build_null_declspecs): Handle atomic_p in declspecs.
7836 (declspecs_add_qual): Handle RID_ATOMIC.
7837 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7838 (c_token_starts_declspecs): Handle RID_ATOMIC.
7839 (c_parser_declspecs): Handle atomic type specifiers and
7840 qualifiers.
7841 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7842 from types of expressions with atomic type.
7843 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7844 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7845 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7846 (c_parser_statement_after_labels, c_parser_switch_statement)
7847 (c_parser_for_statement, c_parser_expr_no_commas)
7848 (c_parser_conditional_expression, c_parser_binary_expression)
7849 (c_parser_cast_expression, c_parser_unary_expression)
7850 (c_parser_postfix_expression)
7851 (c_parser_postfix_expression_after_primary, c_parser_expression):
7852 Use convert_lvalue_to_rvalue.
7853 (c_parser_expression_conv, c_parser_expr_list): Document
7854 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7855 (c_parser_objc_synchronized_statement): Use
7856 convert_lvalue_to_rvalue.
7857 (c_parser_objc_selector): Handle RID_ATOMIC.
7858 (c_parser_objc_receiver, c_parser_array_notation): Use
7859 convert_lvalue_to_rvalue.
7860 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7861 _Atomic (type-name).
7862 (struct c_declspecs): Add atomic_p field.
7863 (convert_lvalue_to_rvalue): Declare.
7864 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7865 corresponding atomic types.
7866 (qualify_type): Don't add _Atomic qualifiers from second argument.
7867 (comp_target_types): Do not allow _Atomic mismatches.
7868 (type_lists_compatible_p): Do not remove atomic qualifiers when
7869 comparing types.
7870 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7871 (build_atomic_assign): New functions.
7872 (build_unary_op): Use build_atomic_assign for atomic increment and
7873 decrement.
7874 (build_conditional_expr): Do not treat _Atomic void as a qualified
7875 version of void.
7876 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7877 (find_anonymous_field_with_type, convert_to_anonymous_field)
7878 (convert_for_assignment): Do not remove atomic qualifiers when
7879 comparing types.
7880 (digest_init): Do not accept initialization of arrays of atomic
7881 elements by string constants.
7882 (build_asm_expr): Use convert_lvalue_to_rvalue.
7883 (build_binary_op): Do not treat _Atomic void as a qualified
7884 version of void.
7885
0c249d4b
DD
78862013-11-06 DJ Delorie <dj@redhat.com>
7887
7888 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7889 both explicit and builtin, print the location of the explicit one.
7890
6d7f7e0a
TB
78912013-11-05 Tobias Burnus <burnus@net-b.de>
7892
7893 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7894 c_parser_omp_distribute, c_parser_omp_teams,
7895 c_parser_omp_target, c_parser_omp_declare): Handle
7896 -fopenmp-simd.
7897
b906f4ca
MP
78982013-11-03 Marek Polacek <polacek@redhat.com>
7899
7900 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7901
ee1d5a02
JJ
79022013-11-01 Jakub Jelinek <jakub@redhat.com>
7903
7904 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7905 check_dup_generic at the end, unless remove is true.
7906 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7907 remove = true;.
7908 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7909
5a9785fb
JJ
79102013-10-31 Jakub Jelinek <jakub@redhat.com>
7911
7912 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7913 with decl that is not pointer nor array.
7914
939b37da
BI
79152013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7916
7917 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7918 a spawning function is found.
7919 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7920 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7921 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7922 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7923 case.
7924 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7925 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7926 expr.
7927 (c_finish_return): Added a check to reject _Cilk_spawn in return
7928 expression.
7929 (build_cilk_spawn): New function.
7930 (build_cilk_sync): Likewise.
7931 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 7932
d4af74d4
TB
79332013-10-27 Tobias Burnus <burnus@net-b.de>
7934
7935 PR other/33426
7936 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
7937 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
7938 (c_parser_statement_after_labels): Update calls.
7939
d73749df 79402013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7941
7942 PR other/33426
7943 * c-parser.c (c_parser_pragma, c_parser_for_statement):
7944 Handle PRAGMA_IVDEP.
7945 (c_parser_statement_after_labels): Update call.
7946
f28aa681
MP
79472013-10-24 Marek Polacek <polacek@redhat.com>
7948
7949 * c-parser.c (c_parser_struct_declaration): Add a comment.
7950 (c_parser_declarator): Don't allow _Alignas here.
7951
0645c1a2
AM
79522013-10-17 Andrew MacLeod <amacleod@redhat.com>
7953
7954 * c-parser.c: Include omp-low.h.
7955 * c-typeck.c: Likewise.
7956
568a31f2
MP
79572013-10-17 Marek Polacek <polacek@redhat.com>
7958
7959 PR c/58267
7960 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
7961 Document syntax of the array-declarator.
7962 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
7963 are not permitted.
7964 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
7965 (c_parser_struct_declaration): Likewise.
7966 (c_parser_declarator): Likewise.
7967 (c_parser_direct_declarator_inner): Likewise.
7968 (c_parser_parameter_declaration): Likewise.
7969 (c_parser_type_name): Likewise.
7970
acf0174b
JJ
79712013-10-11 Jakub Jelinek <jakub@redhat.com>
7972
7973 * c-lang.h (current_omp_declare_target_attribute): New extern
7974 decl.
7975 * c-parser.c: Include c-lang.h.
7976 (struct c_parser): Change tokens to c_token *.
7977 Add tokens_buf field. Change tokens_avail type to unsigned int.
7978 (c_parser_consume_token): If parser->tokens isn't
7979 &parser->tokens_buf[0], increment parser->tokens.
7980 (c_parser_consume_pragma): Likewise.
7981 (enum pragma_context): Add pragma_struct and pragma_param.
7982 (c_parser_external_declaration): Adjust
7983 c_parser_declaration_or_fndef caller.
7984 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
7985 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
7986 Adjust recursive call.
7987 (c_parser_struct_or_union_specifier): Use pragma_struct instead
7988 of pragma_external.
7989 (c_parser_parameter_declaration): Use pragma_param instead of
7990 pragma_external.
7991 (c_parser_compound_statement_nostart, c_parser_label,
7992 c_parser_for_statement): Adjust
7993 c_parser_declaration_or_fndef callers.
7994 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
7995 it through to c_parser_conditional_expression.
7996 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
7997 pass it through to c_parser_binary_expression. Adjust recursive
7998 call.
7999 (c_parser_binary_expression): Remove prec argument, add
8000 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
8001 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
8002 binop matches it, use build2 instead of parser_build_binary_op.
8003 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
8004 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
8005 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
8006 Handle pragma_struct and pragma_param the same as pragma_external.
8007 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
8008 (c_parser_omp_variable_list): Parse array sections for
8009 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
8010 (c_parser_omp_clause_collapse): Fully fold collapse expression.
8011 (c_parser_omp_clause_reduction): Handle user defined reductions.
8012 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
8013 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
8014 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
8015 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
8016 c_parser_omp_clause_depend, c_parser_omp_clause_map,
8017 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
8018 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
8019 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
8020 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
8021 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
8022 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
8023 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
8024 (c_parser_omp_for_loop): Add CODE argument, pass it through
8025 to c_finish_omp_for. Change last argument to cclauses,
8026 and adjust uses to grab parallel clauses from the array of all
8027 the split clauses. Adjust c_parser_binary_expression,
8028 c_parser_declaration_or_fndef and c_finish_omp_for callers.
8029 (omp_split_clauses): New function.
8030 (c_parser_omp_simd): New function.
8031 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
8032 Allow the function to be called also when parsing combined constructs,
8033 and call c_parser_omp_simd when parsing for simd.
8034 (c_parser_omp_sections_scope): If section-sequence doesn't start with
8035 #pragma omp section, require exactly one structured-block instead of
8036 sequence of statements.
8037 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
8038 Allow the function to be called also when parsing combined constructs.
8039 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
8040 Allow the function to be called also when parsing combined
8041 constructs.
8042 (c_parser_omp_taskgroup, c_parser_omp_cancel,
8043 c_parser_omp_cancellation_point, c_parser_omp_distribute,
8044 c_parser_omp_teams, c_parser_omp_target_data,
8045 c_parser_omp_target_update, c_parser_omp_target,
8046 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
8047 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
8048 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
8049 (c_parser_omp_construct): Add p_name and mask vars. Handle
8050 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
8051 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
8052 and c_parser_omp_sections callers.
8053 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
8054 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
8055 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
8056 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
8057 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
8058 OMP_CLAUSE_DEPEND.
8059 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
8060 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
8061 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
8062 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
8063 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
8064 * c-typeck.c: Include tree-inline.h.
8065 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
8066 handle_omp_array_sections_1, handle_omp_array_sections,
8067 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
8068 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
8069 user defined reductions.
8070 (c_tree_equal): New function.
8071 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
8072 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
8073 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
8074 c_check_omp_declare_reduction_r): New prototypes.
8075 * c-decl.c (current_omp_declare_target_attribute): New variable.
8076 (c_decl_attributes): New function.
8077 (start_decl, start_function): Use it instead of decl_attributes.
8078 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
8079 c_omp_reduction_decl, c_omp_reduction_lookup,
8080 c_check_omp_declare_reduction_r): New functions.
8081
0a6c2227
TT
80822013-09-25 Tom Tromey <tromey@redhat.com>
8083
8084 * Make-lang.in (c/gccspec.o): Remove.
8085 (CFLAGS-c/gccspec.o): New variable.
8086 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
8087 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
8088 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
8089
f3bc55f0
TT
80902013-09-25 Tom Tromey <tromey@redhat.com>
8091
8092 * Make-lang.in (c/gccspec.o): Don't use subshell.
8093
a24d975c
MP
80942013-09-18 Marek Polacek <polacek@redhat.com>
8095
8096 PR sanitize/58443
8097 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
8098 Remove unnecessary check.
8099
ce6923c5
MP
81002013-09-18 Marek Polacek <polacek@redhat.com>
8101
8102 PR sanitizer/58411
8103 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
8104 no_sanitize_undefined attribute.
8105
a1e51df9
KT
81062013-09-13 Kai Tietz <ktietz@redhat.com>
8107
8108 PR target/57848
8109 * c-decl.c (c_builtin_function_ext_scope): Remove
8110 wrong assumption that it is never called on prexisting
8111 symbol.
8112
0af94e6f
JR
81132013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8114
8115 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
8116
20059c8b
GDR
81172013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8118
8119 * c-objc-common.c (c_tree_printer): Tidy.
8120
de5a5fa1
MP
81212013-08-30 Marek Polacek <polacek@redhat.com>
8122
8123 * c-typeck.c (build_binary_op): Add division by zero and shift
8124 instrumentation.
8125
2531a1d9 81262013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 8127 Joseph Myers <joseph@codesourcery.com>
2531a1d9 8128
6e2bcc98 8129 PR c/35649
2531a1d9
JR
8130 * c-typeck.c (c_common_type): Prefer double_type_node over
8131 other REAL_TYPE types with the same precision.
8132 (convert_arguments): Likewise.
8133
025311c4
GDR
81342013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
8135
8136 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
8137 (c_initialize_diagnostics): Call a destructor for the early printer.
8138
da6ca2b5
GDR
81392013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8140
8141 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
8142 printer initialization.
8143
318cda85 81442013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 8145
318cda85
BI
8146 PR c/57490
8147 * c-array-notation.c (fix_conditional_array_notations_1): Added a
8148 check for truth values.
8149 (expand_array_notation_exprs): Added truth values case. Removed an
8150 unwanted else. Added for-loop to walk through subtrees in default
8151 case.
8152
b066401f
GDR
81532013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8154
8155 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
8156
fb48aadc
JM
81572013-07-23 Joseph Myers <joseph@codesourcery.com>
8158
8159 * c-parser.c (struct c_generic_association): Fix typo.
8160
433cc7b0
TT
81612013-07-23 Tom Tromey <tromey@redhat.com>
8162 Joseph Myers <joseph@codesourcery.com>
8163
8164 * c-parser.c (struct c_generic_association): New.
8165 (c_generic_association_d): New typedef.
8166 (c_parser_generic_selection): New function.
8167 (c_parser_postfix_expression): Handle RID_GENERIC.
8168
26d40c3d
JM
81692013-07-13 Jason Merrill <jason@redhat.com>
8170
8171 PR c++/57793
8172 * c-decl.c (finish_struct): Check for too-large class.
8173
ecdbd01a 81742013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8175
8176 PR c/57821
8177 * c-typeck.c (set_init_index): When folding, check for index overflow.
8178
1141ed3f
BI
81792013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8180
8181 * c-parser.c (c_parser_array_notation): Removed rejection of array
8182 notations in an array of function pointers.
8183
713b46fa
BI
81842013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8185
8186 * c-array-notation.c (make_triplet_val_inv): New function.
8187 (create_cmp_incr): Likewise.
8188 (create_array_refs): Likewise.
8189 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8190 Also modularized common parts between functions and called the function.
8191 (build_array_notation_expr): Likewise.
8192 (fix_conditional_array_notations_1): Likewise.
8193 (fix_array_notation_expr): Likewise.
8194 (fix_array_notation_call_expr): Likewise.
8195
92f20202
MP
81962013-06-18 Marek Polacek <polacek@redhat.com>
8197
8198 PR c/57630
8199 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8200
73a23b06
BI
82012013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8202
8203 * c-array-notation.c (build_array_notation_expr): Reject array notation
8204 mismatch between LHS and RHS even inside a call_expr. Also, removed
8205 a couple while statements that were dead code.
8206
00b8517d
BI
82072013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8208
8209 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8210 excessive precision expressions in function parameters. Also removed
8211 couple unwanted while statements.
8212
1509bdda
BI
82132013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8214
8215 * c-array-notation.c (expand_array_notation_exprs): Added
8216 ARRAY_NOTATION_REF case.
ab20d992 8217
d60f1706
BI
82182013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8219
8220 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8221 function to c-family/array-notation-common.c.
8222 (is_cilkplus_reduce_builtin): Likewise.
8223 (find_rank): Likewise.
8224 (extract_array_notation_exprs): Likewise.
8225 (replace_array_notations): Likewise.
8226 (find_inv_trees): Likewise.
8227 (replace_inv_trees): Likewise.
8228 (contains_array_notation_expr): Likewise.
8229 (find_correct_array_notation_type): Likewise.
8230 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8231 (struct inv_list): Moved this to c-family/array-notation-common.c.
8232 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 8233
6d6efbb3
BI
82342013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8235
8236 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8237 reduction functions outside the for-loop. Added a check if the fundecl
8238 is non-NULL. Finally, removed an unwanted if-statement, and made the
8239 body unconditional.
8240
25c22937
BI
82412013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8242
8243 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8244 condition of the if-statement matches the rank of else-block and then-
8245 block when array notations are used.
8246 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8247 expression after the entire function body is parsed.
8248 (c_parser_expr_no_commas): Delayed creating array notation expressions
8249 to the end of function parsing.
8250 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8251 whole if-statement instead of just the condition.
ab20d992 8252 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 8253
edd25645
BI
82542013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8255
8256 PR c/57474
8257 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8258 array to NULL_TREE if they are unused. Also added a check for the
8259 field to be NULL before its fields are used in future.
ab20d992 8260
065ce7f1
RO
82612013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8262
8263 PR bootstrap/57450
8264 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8265 (build_array_notation_expr): Likewise.
8266
36536d79
BI
82672013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8268
8269 * c-typeck.c (build_array_ref): Added a check to see if array's
8270 index is greater than one. If true, then emit an error.
8271 (build_function_call_vec): Exclude error reporting and checking
8272 for builtin array-notation functions.
8273 (convert_arguments): Likewise.
8274 (c_finish_return): Added a check for array notations as a return
8275 expression. If true, then emit an error.
8276 (c_finish_loop): Added a check for array notations in a loop
8277 condition. If true then emit an error.
8278 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8279 (build_binary_op): Added a check for array notation expr inside
8280 op1 and op0. If present, we call another function to find correct
8281 type.
8282 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8283 * c-parser.c (c_parser_compound_statement): Check if array
8284 notation code is used in tree, if so, then transform them into
8285 appropriate C code.
8286 (c_parser_expr_no_commas): Check if array notation is used in LHS
8287 or RHS, if so, then build array notation expression instead of
8288 regular modify.
8289 (c_parser_postfix_expression_after_primary): Added a check for
8290 colon(s) after square braces, if so then handle it like an array
8291 notation. Also, break up array notations in unary op if found.
8292 (c_parser_direct_declarator_inner): Added a check for array
8293 notation.
8294 (c_parser_compound_statement): Added a check for array notation in
8295 a stmt. If one is present, then expand array notation expr.
8296 (c_parser_if_statement): Likewise.
8297 (c_parser_switch_statement): Added a check for array notations in
8298 a switch statement's condition. If true, then output an error.
8299 (c_parser_while_statement): Similarly, but for a while.
8300 (c_parser_do_statement): Similarly, but for a do-while.
8301 (c_parser_for_statement): Similarly, but for a for-loop.
8302 (c_parser_unary_expression): Check if array notation is used in a
8303 pre-increment or pre-decrement expression. If true, then expand
8304 them.
8305 (c_parser_array_notation): New function.
8306 * c-array-notation.c: New file.
8307 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 8308
cd192ccc
MS
83092013-05-23 Mike Stump <mikestump@comcast.net>
8310
8311 * c-typeck.c (convert_for_assignment): Handle references to memory
8312 spaces better.
8313
427b248d
JM
83142013-05-16 Jason Merrill <jason@redhat.com>
8315
8316 * Make-lang.in (cc1$(exeext)): Use link mutex.
8317
44d90fe1
PC
83182013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8319
8320 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8321 to simply use OPT_Wpointer_arith.
8322 (build_unary_op): Likewise.
8323
4e7d7b3d
JJ
83242013-04-03 Jakub Jelinek <jakub@redhat.com>
8325
8326 PR c/19449
8327 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8328 argument. If set, or it temporarily for parsing of the first
8329 argument into force_folding_builtin_constant_p.
8330 (c_parser_postfix_expression): Adjust callers.
8331
839b422f
RB
83322013-03-21 Richard Biener <rguenther@suse.de>
8333
8334 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8335 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8336
2ee028f1
MP
83372013-02-12 Marek Polacek <polacek@redhat.com>
8338
8339 PR c/44938
8340 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8341 origtypes to NULL.
8342
8824edff
JJ
83432013-01-24 Jakub Jelinek <jakub@redhat.com>
8344
8345 PR c/56078
8346 * c-typeck.c (set_nonincremental_init_from_string): If
8347 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8348 returned false.
8349 (process_init_element): Likewise.
8350
eadd3d0d
JJ
83512012-12-20 Jakub Jelinek <jakub@redhat.com>
8352
8353 PR c++/55619
8354 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8355 argument, don't call default_function_array_conversion
8356 nor c_fully_fold here.
8357 (c_parser_asm_statement): Adjust callers.
8358 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8359 and outputs here, and call default_function_array_conversion
8360 on inputs that don't need to be addressable.
8361
f8a93a2e
JJ
83622012-12-18 Jakub Jelinek <jakub@redhat.com>
8363
8364 PR c/39464
8365 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8366 warning require that both c_common_unsigned_type as well as
8367 c_common_signed_type is the same for both mvl and mvr types.
8368
9771b263
DN
83692012-11-16 Diego Novillo <dnovillo@google.com>
8370
8371 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8372
8373 * c-common.c: Use new vec API in vec.h.
8374 * c-common.h: Likewise.
8375 * c-gimplify.c: Likewise.
8376 * c-pragma.c: Likewise.
8377 * c-pretty-print.c: Likewise.
8378 * c-pretty-print.h: Likewise.
8379 * c-semantics.c: Likewise.
8380 * c-decl.c: Likewise.
8381 * c-parser.c: Likewise.
8382 * c-tree.h: Likewise.
8383 * c-typeck.c: Likewise.
8384
880661a4
JW
83852012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8386
8387 PR c++/54930
8388 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8389
077d1abe
MLI
83902012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8391
8392 PR c/53066
8393 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8394 shadows a function, unless the variable is a function or a
8395 pointer-to-function.
8396
3a785c97
JJ
83972012-10-12 Jakub Jelinek <jakub@redhat.com>
8398
8399 PR c/54381
8400 * c-parser.c (struct c_tree_loc_pair): Removed.
8401 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8402 add location_t * and tree * arguments, fill in array of 3
8403 sizeof_arg trees and corresponding locs.
8404 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8405 c_parser_expr_list callers.
8406 (c_parser_postfix_expression_after_primary): Likewise. Pass
8407 array of 3 sizeof_arg trees and locs (corresponding to first
8408 3 arguments) to sizeof_pointer_memaccess_warning.
8409
703c8606
LC
84102012-10-09 Lawrence Crowl <crowl@google.com>
8411
8412 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8413 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8414 hash table.
8415
5d9de0d0
PC
84162012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8417
8418 PR c++/54194
8419 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8420 call.
8421
a212e43f
MG
84222012-10-09 Marc Glisse <marc.glisse@inria.fr>
8423
8424 PR c++/54427
8425 * c-typeck.c: Include c-common.h.
8426 (enum stv_conv): Moved to c-common.h.
8427 (scalar_to_vector): Moved to c-common.c.
8428 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8429 * Make-lang.in: c-typeck.c depends on c-common.h.
8430
3b78de56
AC
84312012-10-04 Arnaud Charlet <charlet@adacore.com>
8432
8433 * c-decl.c (c_write_global_declarations): Fix handling of
8434 -fdump-ada-spec*.
8435
78c60e3d
SS
84362012-09-30 Sharad Singhai <singhai@google.com>
8437
8438 * c-decl.c (c_write_global_declarations): Use a different method
8439 to determine if the dump has ben initialized.
8440
9f33203d
JM
84412012-09-14 Joseph Myers <joseph@codesourcery.com>
8442
8443 PR c/54552
8444 * c-typeck.c (c_cast_expr): When casting to a type requiring
8445 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8446 c_fully_fold first.
8447
a27d595d
JM
84482012-09-14 Joseph Myers <joseph@codesourcery.com>
8449
8450 PR c/54103
8451 * c-typeck.c (build_unary_op): Pass original argument of
8452 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8453 any C_MAYBE_CONST_EXPR, if it has integer operands.
8454 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8455 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8456 to c_objc_common_truthvalue_conversion, then remove any
8457 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8458 c_objc_common_truthvalue_conversion not
8459 c_common_truthvalue_conversion.
8460 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8461 call note_integer_operands for arguments with integer operands
8462 that are not integer constants.
8463
9feb29df
JJ
84642012-09-13 Jakub Jelinek <jakub@redhat.com>
8465
8466 PR c/54559
8467 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8468 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8469
d409320c
JJ
84702012-08-31 Jakub Jelinek <jakub@redhat.com>
8471
8472 PR c/54428
8473 * c-convert.c (convert): Don't call fold_convert_loc if
8474 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8475 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8476 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8477
6265d07c
JJ
84782012-08-24 Jakub Jelinek <jakub@redhat.com>
8479
8480 PR c/54355
8481 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8482 for nested and empty_ok arguments in the call to
8483 c_parser_declaration_or_fndef.
8484
1a4049e7
JJ
84852012-08-17 Jakub Jelinek <jakub@redhat.com>
8486
8487 * c-tree.h (c_last_sizeof_arg): Declare.
8488 * c-parser.c (struct c_tree_loc_pair): New type.
8489 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8490 non-NULL.
8491 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8492 (c_parser_postfix_expression_after_primary): Likewise. Call
8493 sizeof_pointer_memaccess_warning if needed.
8494 (sizeof_ptr_memacc_comptypes): New function.
8495 * c-typeck.c (c_last_sizeof_arg): New global variable.
8496 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8497
0229aee9
UB
84982012-07-24 Uros Bizjak <ubizjak@gmail.com>
8499
8500 * c-lang.h (lang_decl): Add variable_size GTY option.
8501
7ee2468b
SB
85022012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8503
8504 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8505 * Make-lang.in: Fix dependencies.
8506
d4a10d0a
SB
85072012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8508
8509 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8510 and add language Makefile hooks.
8511 * config-lang.in: New file.
8512 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8513 add the required "normal" config-lang.in rules.
8514 * c-lang.h: Moved from gcc/ to here.
8515 * c-tree.h: Likewise.
8516 * c-objc-common.c: Likewise.
8517 * c-objc-common.h: Likewise.
8518 * c-typeck.c: Likewise.
8519 * c-convert.c: Likewise.
8520 * c-lang.c: Likewise.
8521 * c-aux-info.c: Likewise.
8522 * c-errors.c: Likewise.
8523 * gccspec.c: Likewise.
8524 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8525 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8526\f
877e3c2a 8527Copyright (C) 2012-2022 Free Software Foundation, Inc.
d4a10d0a
SB
8528
8529Copying and distribution of this file, with or without modification,
8530are permitted in any medium without royalty provided the copyright
8531notice and this notice are preserved.