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