]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
libstdc++: Simplify detection idiom using concepts
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
279c6715
GA
12022-09-22 David Malcolm <dmalcolm@redhat.com>
2
3 PR c/106830
4 * c-parser.cc (c_parser_initelt): Initialize m_decimal.
5 (c_parser_cast_expression): Likewise.
6 (c_parser_alignof_expression): Likewise.
7 (c_parser_postfix_expression_after_paren_type): Likewise.
8 (c_parser_postfix_expression_after_primary): Likewise.
9 (c_parser_expression): Likewise.
10 (c_parser_omp_variable_list): Likewise.
11 (c_parser_transaction_expression): Likewise.
12 * c-tree.h (c_expr::set_error): Likewise.
13 * c-typeck.cc (c_expr_sizeof_expr): Likewise.
14 (parser_build_unary_op): Likewise.
15 (parser_build_binary_op): Likewise.
16 (digest_init): Likewise.
17 (pop_init_level): Likewise.
18 * gimple-parser.cc (c_parser_gimple_call_internal): Likewise.
19
43be56c4
GA
202022-09-19 Marek Polacek <polacek@redhat.com>
21
22 PR c/106947
23 * c-typeck.cc (maybe_warn_for_null_address): Don't emit stray
24 notes.
25
d0fc05e8
GA
262022-09-15 Richard Biener <rguenther@suse.de>
27
28 * c-decl.cc (build_void_list_node): Remove.
29
ff822367
GA
302022-09-14 Julian Brown <julian@codesourcery.com>
31
32 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
33 on error.
34
fe2a8ce9
GA
352022-09-07 Joseph Myers <joseph@codesourcery.com>
36
37 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
38 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
39 for C2x spellings of keywords.
40 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
41
25aeb922
GA
422022-09-06 Jakub Jelinek <jakub@redhat.com>
43
44 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
45 in omp_cur_iteration - 1 has integer_type_node type.
46
83f2f228
GA
472022-09-03 Jakub Jelinek <jakub@redhat.com>
48
49 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
50 (c_parser_omp_clause_depend_sink): Renamed to ...
51 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
52 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
53 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
54 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
55 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
56 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
57 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
58 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
59 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
60 (c_parser_omp_clause_doacross): New function.
61 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
62 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
63 OMP_CLAUSE_DEPEND_SOURCE.
64 (c_parser_omp_for_loop): Don't diagnose here linear clause together
65 with ordered with argument.
66 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
67 for simd.
68 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
69 (c_parser_omp_ordered): Handle also doacross and adjust for it
70 diagnostic wording.
71 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
72 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
73
c64b0947
GA
742022-09-02 David Malcolm <dmalcolm@redhat.com>
75
76 PR c/90885
77 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
78 (c_parser_expr_no_commas): Likewise.
79 (c_parser_conditional_expression): Likewise.
80 (c_parser_binary_expression): Clear m_decimal when popping the
81 stack.
82 (c_parser_unary_expression): Clear ret.m_decimal.
83 (c_parser_has_attribute_expression): Likewise for result.
84 (c_parser_predefined_identifier): Likewise for expr.
85 (c_parser_postfix_expression): Likewise for expr.
86 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
87 token.
88 * c-tree.h (c_expr::m_decimal): New bitfield.
89 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
90 (parser_build_binary_op): Call check_for_xor_used_as_pow.
91
bb0a1556
GA
922022-09-01 Joseph Myers <joseph@codesourcery.com>
93
94 * c-decl.cc (grokparms): Handle () in a function declaration the
95 same as (void) for C2X.
96
542c60c4
GA
972022-08-31 Joseph Myers <joseph@codesourcery.com>
98
99 * c-parser.cc (c_parser_label): Pass attributes to do_case.
100 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
101 c_add_case_label.
102
16f542d6
GA
1032022-08-26 Jakub Jelinek <jakub@redhat.com>
104
105 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
106
5d4389dc
GA
1072022-08-25 Marek Polacek <polacek@redhat.com>
108
109 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
110 Give a better diagnostic when converting to nullptr_t.
111 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
112 initialization.
113 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
114 (c_parser_postfix_expression): Handle RID_NULLPTR.
115 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
116 nullptr_node.
117 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
118 (build_conditional_expr): Handle the case when the second/third operand
119 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
120 (convert_for_assignment): Handle converting an expression of type
121 nullptr_t to pointer/bool.
122 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
123 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
124
1252022-08-25 Joseph Myers <joseph@codesourcery.com>
126
127 * c-decl.cc (start_decl): Do not diagnose initialization of
128 variable-sized objects here.
129 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
130 callers changed.
131 (c_parser_initializer): Diagnose initialization of variable-sized
132 objects other than with braced initializer.
133 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
134 braces and update diagnostic text. Diagnose initialization of
135 variable-sized objects with nonempty braces.
136 * c-typeck.cc (digest_init): Update diagnostic for initialization
137 of variable-sized objects.
138 (really_start_incremental_init, set_designator)
139 (process_init_element): Update comments.
140 (pop_init_level): Allow scalar empty initializers.
141
0342f034
GA
1422022-08-17 Tobias Burnus <tobias@codesourcery.com>
143 Chung-Lin Tang <cltang@codesourcery.com>
144
145 PR c++/104493
146 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
147 instead of removed langhook.
148 * c-typeck.cc (c_finish_omp_clauses): Likewise.
149
5cd525f0
GA
1502022-08-11 Marek Polacek <polacek@redhat.com>
151
152 PR middle-end/102633
153 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
154 Call suppress_warning.
155 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
156 (c_parser_omp_declare_reduction): Pass omp_priv down to
157 c_parser_initializer.
158
5f17badb
GA
1592022-08-08 Tom Honermann <tom@honermann.net>
160
161 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
162 of CPP_UTF8STRING when char8_t support is enabled.
163 * c-typeck.cc (digest_init): Allow initialization of an array
164 of character type by a string literal with type array of
165 char8_t.
166
32510382
GA
1672022-08-01 David Malcolm <dmalcolm@redhat.com>
168
169 * c-typeck.cc (build_c_cast): Quote names of address spaces in
170 diagnostics.
171 (convert_for_assignment): Add a note to address space mismatch
172 diagnostics, specifying the expected and actual types.
173
b53ebbc5
GA
1742022-07-10 Lewis Hyatt <lhyatt@gmail.com>
175
176 PR preprocessor/97498
177 * c-parser.cc (c_parser_pragma): Set input_location to the
178 location of the pragma, rather than the start of the line.
179
8467574d
GA
1802022-07-04 Tobias Burnus <tobias@codesourcery.com>
181 Chung-Lin Tang <cltang@codesourcery.com>
182 Thomas Schwinge <thomas@codesourcery.com>
183
184 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
185 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
186 OMP_REQUIRES_TARGET_USED.
187 (c_parser_omp_requires): Remove sorry.
188
ed974488
GA
1892022-07-01 Tobias Burnus <tobias@codesourcery.com>
190
191 * c-parser.cc (c_parser_omp_target_enter_data,
192 c_parser_omp_target_exit_data): Accept tofrom
193 map-type modifier but use 'to' / 'from' internally.
194
bc7e9f76
GA
1952022-06-16 David Malcolm <dmalcolm@redhat.com>
196
197 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
198 group the warning with any note.
199 (warn_about_goto): Likewise to group error or warning with note.
200 Bail out if the warning wasn't emitted, to avoid emitting orphan
201 notes.
202 (lookup_label_for_goto): Add auto_diagnostic_group to
203 group the error with the note.
204 (check_earlier_gotos): Likewise.
205 (c_check_switch_jump_warnings): Likewise for any error/warning.
206 Conditionalize emission of the notes.
207 (diagnose_uninitialized_cst_member): Likewise for warning,
208 conditionalizing emission of the note.
209 (grokdeclarator): Add auto_diagnostic_group to group the "array
210 type has incomplete element type" error with any note.
211 (parser_xref_tag): Add auto_diagnostic_group to group warnings
212 with their notes. Conditionalize emission of notes.
213 (start_struct): Add auto_diagnostic_group to group the
214 "redefinition of" errors with any note.
215 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
216 (check_for_loop_decls): Likewise for pre-C99 error.
217
445ba599
GA
2182022-06-07 Jakub Jelinek <jakub@redhat.com>
219
220 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
221 style linear clause modifiers. Set
222 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
223 old style modifiers are used.
224 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
225 with val modifier on simd or for if the old style modifiers are
226 used.
227
b168441c
GA
2282022-06-02 David Malcolm <dmalcolm@redhat.com>
229
230 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
231 (c_get_sarif_source_language): New.
232 * c-tree.h (c_get_sarif_source_language): New decl.
233
820ead45
GA
2342022-05-31 Jason Merrill <jason@redhat.com>
235
236 * Make-lang.in (c.tags): Look at *.cc.
237
2382022-05-31 Jakub Jelinek <jakub@redhat.com>
239
240 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
241 clauses.
242
37b3b5da
GA
2432022-05-28 Jakub Jelinek <jakub@redhat.com>
244
245 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
246 seen first, use "%<to%>" or "%<enter%>" depending on
247 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
248 "%<to%> or %<enter%>" wording.
249
d9176e64
GA
2502022-05-27 Jakub Jelinek <jakub@redhat.com>
251
252 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
253 (c_parser_omp_all_clauses): For to clause on declare target, use
254 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
255 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
256 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
257 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
258 OMP_CLAUSE_TO_DECLARE.
259 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
260 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
261 name in diagnostics instead of
262 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
263
3dff965c
GA
2642022-05-25 Jakub Jelinek <jakub@redhat.com>
265
266 PR c/91134
267 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
268 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
269 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
270 diagnostic and fixit hint if DATUM has pointer type.
271 * c-parser.cc (c_parser_postfix_expression,
272 c_parser_omp_variable_list): Adjust build_component_ref callers.
273 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
274 Likewise.
275
768f49a2
GA
2762022-05-24 Jakub Jelinek <jakub@redhat.com>
277
278 PR c/105378
279 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
280
1cda629f
GA
2812022-05-18 Marek Polacek <polacek@redhat.com>
282
283 PR c/105131
284 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
285 mismatches.
286 * c-tree.h (comptypes_check_enum_int): Declare.
287 * c-typeck.cc (comptypes): No longer static.
288
3d9439b1
GA
2892022-05-17 Marek Polacek <polacek@redhat.com>
290
291 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
292 its value.
293
2942022-05-17 Jakub Jelinek <jakub@redhat.com>
295
296 * c-parser.cc (c_parser_omp_clause_depend): Parse
297 inoutset depend-kind.
298 (c_parser_omp_depobj): Likewise.
299
702bd11f
GA
3002022-05-16 Martin Liska <mliska@suse.cz>
301
302 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
303
49ace834
GA
3042022-05-12 Jakub Jelinek <jakub@redhat.com>
305
306 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
307 if flag_openmp.
308 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
309 in postfix expressions.
310 (c_parser_omp_variable_list): Handle omp_all_memory in depend
311 clause.
312 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
313 keyword in depend clause as null_pointer_node, diagnose invalid
314 uses.
315
bd022ff9
GA
3162022-05-09 Martin Liska <mliska@suse.cz>
317
318 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
319 macros.
320 (c_parser_binary_expression): Likewise.
321
a1947c92
GA
3222022-05-07 Marek Polacek <polacek@redhat.com>
323
324 PR c++/101833
325 PR c++/47634
326 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
327
405eda0d
GA
3282022-04-08 Jakub Jelinek <jakub@redhat.com>
329
330 PR c/105149
331 * c-typeck.cc (c_build_va_arg): Reject function types.
332
a2287813
GA
3332022-03-22 Marek Polacek <polacek@redhat.com>
334
335 PR c/82283
336 PR c/84685
337 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
338 (start_init): Set it.
339 (finish_init): Restore constructor_designated.
340 (push_init_level): Set constructor_designated to the value of
341 constructor_designated in the upper constructor_stack.
342
57eeedda
GA
3432022-03-12 Thomas Schwinge <thomas@codesourcery.com>
344
345 PR other/65095
346 * c-typeck.cc (handle_omp_array_sections_1)
347 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
348 instead of 'c_omp_map_clause_name'.
349
8cc4f9cd
GA
3502022-03-09 Joseph Myers <joseph@codesourcery.com>
351
352 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
353 differently from earlier standards for unprototyped function type
354 compatibility.
355
3562022-03-09 Jakub Jelinek <jakub@redhat.com>
357
358 PR c/104711
359 * c-fold.cc (c_fully_fold_internal): Don't emit
360 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
361 * c-typeck.cc (build_binary_op): Likewise.
362
e6533e2e
GA
3632022-03-07 Jakub Jelinek <jakub@redhat.com>
364
365 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
366 literal.
367
4bf3bac1
GA
3682022-02-23 Richard Biener <rguenther@suse.de>
369
370 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
371 SSA names without definition.
372 (c_parser_gimple_declaration): Handle pointer typed SSA names.
373
0bdb0498
GA
3742022-02-17 Jakub Jelinek <jakub@redhat.com>
375
376 PR c/104532
377 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
378 convert_lvalue_to_rvalue and build_indirect_ref instead of
379 build_simple_mem_ref.
380
e8d68f0a
GA
3812022-02-11 Richard Biener <rguenther@suse.de>
382
383 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
384 VEC_COND_EXPRs.
385
a645583d
GA
3862022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
387
388 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
389 clause.
390 (c_parser_omp_variable_list): Handle array sections.
391 (c_parser_omp_clause_has_device_addr): Added.
392 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
393 case.
394 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
395 OMP_CLAUSE_MASK.
396 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
397 (c_finish_omp_clauses): Handle array sections.
398
3adf509f
GA
3992022-02-09 Jakub Jelinek <jakub@redhat.com>
400
401 PR c/104427
402 * c-parser.cc (c_parser_postfix_expression)
403 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
404 instead of build1_loc to build PAREN_EXPR.
405 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
406 * c-fold.cc (c_fully_fold_internal): Likewise.
407
fc829782
GA
4082022-01-17 Martin Liska <mliska@suse.cz>
409
410 * Make-lang.in: Rename .c names to .cc.
411 * c-convert.cc: Likewise.
412 * c-decl.cc (struct lang_identifier): Likewise.
413 (pop_scope): Likewise.
414 (finish_decl): Likewise.
415 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
416 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
417 * c-parser.h (GCC_C_PARSER_H): Likewise.
418 * c-tree.h (c_keyword_starts_typename): Likewise.
419 (finish_declspecs): Likewise.
420 (c_get_alias_set): Likewise.
421 (enum c_oracle_request): Likewise.
422 (tag_exists_p): Likewise.
423 (set_c_expr_source_range): Likewise.
424 * c-typeck.cc (c_common_type): Likewise.
425 (c_finish_omp_clauses): Likewise.
426 * config-lang.in: Likewise.
427
4282022-01-17 Martin Liska <mliska@suse.cz>
429
430 * c-aux-info.c: Moved to...
431 * c-aux-info.cc: ...here.
432 * c-convert.c: Moved to...
433 * c-convert.cc: ...here.
434 * c-decl.c: Moved to...
435 * c-decl.cc: ...here.
436 * c-errors.c: Moved to...
437 * c-errors.cc: ...here.
438 * c-fold.c: Moved to...
439 * c-fold.cc: ...here.
440 * c-lang.c: Moved to...
441 * c-lang.cc: ...here.
442 * c-objc-common.c: Moved to...
443 * c-objc-common.cc: ...here.
444 * c-parser.c: Moved to...
445 * c-parser.cc: ...here.
446 * c-typeck.c: Moved to...
447 * c-typeck.cc: ...here.
448 * gccspec.c: Moved to...
449 * gccspec.cc: ...here.
450 * gimple-parser.c: Moved to...
451 * gimple-parser.cc: ...here.
452
4532022-01-17 Andrew Stubbs <ams@codesourcery.com>
454
455 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
456
617db51d
GA
4572022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
458
459 PR c++/103705
460 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
461 outer node for ARRAY_REFs.
462
62eb5308
GA
4632022-01-01 Jakub Jelinek <jakub@redhat.com>
464
465 PR objc/103639
466 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
467 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
468
2554e2da
GA
4692021-12-17 Marek Polacek <polacek@redhat.com>
470
471 PR c/103649
472 * c-decl.c (c_warn_unused_attributes): Don't warn for
473 attribute_ignored_p.
474 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
475 arguments when the attribute is ignored.
476
9c6586bc
GA
4772021-12-14 Jakub Jelinek <jakub@redhat.com>
478
479 PR c/103587
480 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
481 consume the pragma and silently skip to the pragma eol.
482
c8dcf64b
GA
4832021-12-12 Jonathan Wakely <jwakely@redhat.com>
484
485 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
486 * c-parser.c: Likewise.
487
4b4839e3
GA
4882021-12-09 Jakub Jelinek <jakub@redhat.com>
489
490 PR pch/71934
491 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
492 to resort_data.new_value.
493
641ff219
GA
4942021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
495
496 * c-parser.c (struct omp_dim): New struct type for use inside
497 c_parser_omp_variable_list.
498 (c_parser_omp_variable_list): Allow multiple levels of array and
499 component accesses in array section base-pointer expression.
500 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
501 c_parser_omp_var_list_parens.
502 (c_parser_omp_clause_from): Likewise.
503 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
504 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
505 POINTER_PLUS_EXPR.
506 (c_finish_omp_clauses): Extend allowed ranged of expressions
507 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
508
5092021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
510
511 PR middle-end/92120
512 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
513 call to c_parser_omp_variable_list to 'true'.
514 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
515 array base handling.
516 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
517
c177e806
GA
5182021-11-30 Thomas Schwinge <thomas@codesourcery.com>
519
520 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
521 orphan loop" checking.
522
5232021-11-30 Cesar Philippidis <cesar@codesourcery.com>
524 Thomas Schwinge <thomas@codesourcery.com>
525
526 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
527 OpenACC gang reductions.
528
5292021-11-30 Richard Biener <rguenther@suse.de>
530
531 * gimple-parser.c (c_parser_gimple_postfix_expression):
532 avoid unreachable code after break.
533
87cd82c8
GA
5342021-11-29 Eric Gallager <egallager@gcc.gnu.org>
535
536 PR other/103021
537 * Make-lang.in: Use ETAGS variable in TAGS target.
538
5392021-11-29 Richard Biener <rguenther@suse.de>
540
541 * c-typeck.c (c_tree_equal): Remove unreachable return.
542 * c-parser.c (get_matching_symbol): Likewise.
543
e1d43592
GA
5442021-11-23 Jakub Jelinek <jakub@redhat.com>
545
546 * c-typeck.c (c_clone_omp_udr): Don't initialize
547 id.transform_lang_insert_block.
548
9c077398
GA
5492021-11-19 Martin Sebor <msebor@redhat.com>
550
551 PR c++/33925
552 PR c/102867
553 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
554 code resulting from macro expansion.
555
5562021-11-19 Martin Liska <mliska@suse.cz>
557
558 Revert:
559 2021-11-19 Martin Liska <mliska@suse.cz>
560
561 * c-parser.c (add_debug_begin_stmt): Use option directly.
562
483092d3
GA
5632021-11-18 Matthias Kretz <m.kretz@gsi.de>
564
565 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
566 * c-parser.c (c_parser_postfix_expression): Likewise.
567
5682021-11-18 Martin Liska <mliska@suse.cz>
569
570 * c-parser.c (add_debug_begin_stmt): Use option directly.
571
280d2838
GA
5722021-11-17 Martin Sebor <msebor@redhat.com>
573
574 PR c/101702
575 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
576 bounds before deciding if they're constant.
577
e2b57363
GA
5782021-11-15 Jakub Jelinek <jakub@redhat.com>
579
580 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
581 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
582
b39265d4
GA
5832021-11-11 Jakub Jelinek <jakub@redhat.com>
584
585 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
586 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
587 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
588 OMP_CLAUSE_NUM_TEAMS_EXPR.
589 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
590 combined target teams even lower-bound expression.
591
5922021-11-11 Richard Biener <rguenther@suse.de>
593
594 * gimple-parser.c: Shuffle bitmap.h include.
595
18ae471f
GA
5962021-11-03 Joseph Myers <joseph@codesourcery.com>
597
598 PR c/103031
599 * c-convert.c (c_convert): New function, based on convert.
600 (convert): Make into wrapper of c_convert.
601 (convert_init): New function.
602 * c-typeck.c (enum impl_conv): Add ic_init_const.
603 (convert_for_assignment): Handle ic_init_const like ic_init. Add
604 new argument to convert_and_check call.
605 (digest_init): Pass ic_init_const to convert_for_assignment for
606 initializers required to be constant.
607
b4df2dd3
GA
6082021-11-02 Richard Sandiford <richard.sandiford@arm.com>
609
610 * c-tree.h (c_simulate_record_decl): Declare.
611 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
612 * c-decl.c (c_simulate_record_decl): New function.
613
c2bd5d8a
GA
6142021-10-22 Eric Gallager <egallager@gcc.gnu.org>
615
616 PR other/102663
617 * Make-lang.in: Add dummy c.install-dvi target.
618
93d183a5
GA
6192021-10-15 Richard Biener <rguenther@suse.de>
620
621 PR c/102763
622 * gimple-parser.c
623 (c_parser_gimple_postfix_expression_after_primary): Check
624 for a pointer do be dereferenced by ->.
625
5d5885c9
GA
6262021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
627
628 * c-parser.c (c_finish_omp_declare_variant): Change call from
629 c_omp_check_context_selector to omp_check_context_selector. Change
630 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
631
c9db17b8
GA
6322021-10-09 Jakub Jelinek <jakub@redhat.com>
633
634 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
635 (c_parser_omp_scan_loop_body): Use it.
636 (c_parser_omp_sections_scope): Likewise.
637
50e20ee6
GA
6382021-10-07 Richard Biener <rguenther@suse.de>
639
640 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
641
bb6194e0
GA
6422021-10-05 Richard Biener <rguenther@suse.de>
643
644 PR c/102605
645 * gimple-parser.c (c_parser_gimple_postfix_expression):
646 Accept more address _Literals.
647
da9c5f78
GA
6482021-10-04 Marek Polacek <polacek@redhat.com>
649
650 PR c++/97573
651 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
652
9d116bcc
GA
6532021-10-01 Martin Sebor <msebor@redhat.com>
654
655 PR c/102103
656 * c-typeck.c (maybe_warn_for_null_address): New function.
657 (build_binary_op): Call it.
658
6592021-10-01 Jakub Jelinek <jakub@redhat.com>
660 Richard Biener <rguenther@suse.de>
661
662 PR sanitizer/102515
663 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
664 for division even for SANITIZE_SI_OVERFLOW.
665
6662021-10-01 Jakub Jelinek <jakub@redhat.com>
667
668 * c-parser.c (c_parser_omp_clause_order): Set
669 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
670
fd133479
GA
6712021-09-28 Andrew Pinski <apinski@marvell.com>
672
673 PR c/32122
674 * c-parser.c (c_parser_statement_after_labels): Pass
675 the c_expr instead of the tree to c_finish_goto_ptr.
676 * c-typeck.c (c_finish_goto_ptr): Change the second
677 argument type to c_expr.
678 * c-tree.h (c_finish_goto_ptr): Likewise.
679 Error out if the expression was not of a pointer type.
680
e4777439
GA
6812021-09-22 Jakub Jelinek <jakub@redhat.com>
682
683 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
684 modifiers.
685
cf74e7b5
GA
6862021-09-18 Jakub Jelinek <jakub@redhat.com>
687
688 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
689 and reproducible modifiers.
690 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
691
6922021-09-18 Jakub Jelinek <jakub@redhat.com>
693
694 * c-parser.c (c_parser_omp_clause_default): Handle private and
695 firstprivate arguments, adjust diagnostics on unknown argument.
696
0a4cb439
GA
6972021-09-17 Jakub Jelinek <jakub@redhat.com>
698
699 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
700 is true.
701
a26206ec
GA
7022021-09-10 Jakub Jelinek <jakub@redhat.com>
703
704 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
705 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
706 don't call build_conditional_expr, instead build a COND_EXPR directly.
707 (c_parser_binary_expression): Avoid calling parser_build_binary_op
708 if omp_atomic_lhs even in more cases for >, < or ==.
709 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
710 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
711 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
712 * c-typeck.c (build_binary_op): For flag_openmp only handle
713 MIN_EXPR/MAX_EXPR.
714
b2748138
GA
7152021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
716
717 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
718 directive.
719
e11c6046
GA
7202021-09-01 Iain Sandoe <iain@sandoe.co.uk>
721
722 * c-decl.c (enum deprecated_states): Add unavailable state.
723 (merge_decls): Copy unavailability.
724 (quals_from_declspecs): Handle unavailable case.
725 (start_decl): Amend the logic handling suppression of nested
726 deprecation states to include unavailability.
727 (smallest_type_quals_location): Amend comment.
728 (grokdeclarator): Handle the unavailable deprecation state.
729 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
730 * c-tree.h (struct c_declspecs): Add unavailable_p.
731 * c-typeck.c (build_component_ref): Handle unavailability.
732 (build_external_ref): Likewise.
733
7342021-09-01 Roger Sayle <roger@nextmovesoftware.com>
735 Joseph Myers <joseph@codesourcery.com>
736
737 PR c/79412
738 * c-decl.c (duplicate_decls): On significant mismatches, mark the
739 types of both (non-function) decls as error_mark_node, so that the
740 middle-end can see the code is malformed.
741 (free_attr_access_data): Don't process if the type has been set to
742 error_mark_node.
743
6d51ee43
GA
7442021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
745
746 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
747 and 'ancestor' in 'target device' clauses.
748
38b19c5b
GA
7492021-08-23 Jakub Jelinek <jakub@redhat.com>
750
751 * c-parser.c (c_parser_omp_clause_num_tasks,
752 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
753
5b2876f9
GA
7542021-08-22 Martin Uecker <muecker@gwdg.de>
755
756 PR c/98397
757 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
758 for pointers to arrays with qualifiers.
759 (build_conditional_expr): For C23 don't lose qualifiers for pointers
760 to arrays when the other pointer is a void pointer. Update warnings.
761 (convert_for_assignment): Update warnings for C2X when converting from
762 void* with qualifiers to a pointer to array with the same qualifiers.
763
7c9e1645
GA
7642021-08-20 Jakub Jelinek <jakub@redhat.com>
765
766 * c-parser.c (c_parser_omp_error): New function.
767 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
768
7692021-08-20 Jakub Jelinek <jakub@redhat.com>
770
771 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
772 comma at the end of list.
773 (c_parser_omp_requires): Likewise.
774
b57fba5e
GA
7752021-08-19 Jakub Jelinek <jakub@redhat.com>
776
777 * c-parser.c (c_parser_omp_requires): Don't call
778 c_parser_peek_2nd_token and optionally consume token if current
779 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
780
6e529985
GA
7812021-08-18 Jakub Jelinek <jakub@redhat.com>
782
783 * c-parser.c (c_parser_omp_nothing): New function.
784 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
785
7862021-08-18 Jakub Jelinek <jakub@redhat.com>
787
788 * c-parser.c (c_parser_statement_after_labels): Add restart label
789 near the start of the function. If c_parser_pragma returns false,
790 goto restart.
791 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
792 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
793 return what c_parser_omp_declare returned. Return true instead of
794 false after emitting errors that the directive is not allowed in
795 pragma_stmt context.
796 (c_parser_omp_ordered): Return true instead of
797 false after emitting errors that the directive is not allowed in
798 pragma_stmt context.
799 (c_parser_omp_target_update): Likewise.
800 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
801 Change return type from tree to bool, return false if the
802 directive should be ignored in pragma_stmt contexts.
803 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
804 return their result directly.
805 (c_parser_omp_cancellation_point): Change return type from void to
806 bool, return false if the directive should be ignored in pragma_stmt
807 contexts.
808 (c_parser_omp_declare): Likewise.
809
2d14d64b
GA
8102021-08-17 Jakub Jelinek <jakub@redhat.com>
811
812 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
813 (c_parser_omp_scope): New function.
814 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
815
72be20e2
GA
8162021-08-12 Jakub Jelinek <jakub@redhat.com>
817
818 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
819 (c_parser_omp_clause_filter): New function.
820 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
821 (OMP_MASKED_CLAUSE_MASK): Define.
822 (c_parser_omp_masked): New function.
823 (c_parser_omp_parallel): Handle parallel masked.
824 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
825 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
826
8272021-08-12 Martin Uecker <muecker@gwdg.de>
828
829 PR c/101838
830 PR c/29970
831 * c-typeck.c (c_expr_sizeof_type): Evaluate
832 size expressions for structs of variable size.
833
8342021-08-12 Tobias Burnus <tobias@codesourcery.com>
835
836 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
837 'primary' as alias for 'master'.
838
3ae564ea
GA
8392021-08-10 Martin Uecker <muecker@gwdg.de>
840
841 PR c/29970
842 * c-typeck.c (c_expr_sizeof_expr): Evaluate
843 size expressions for structs of variable size.
844
f92f4778
GA
8452021-08-06 Tamar Christina <tamar.christina@arm.com>
846
847 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
848 * c-tree.h (c_simulate_enum_decl): Likewise.
849
8502021-08-06 Martin Sebor <msebor@redhat.com>
851
852 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
853 vec arguments to by-reference.
854 (c_finish_omp_declare_simd): Same.
855 (c_parser_compound_statement_nostart): Same.
856 (c_parser_for_statement): Same.
857 (c_parser_objc_methodprotolist): Same.
858 (c_parser_oacc_routine): Same.
859 (c_parser_omp_for_loop): Same.
860 (c_parser_omp_declare_simd): Same.
861
419c6c68
GA
8622021-07-21 Thomas Schwinge <thomas@codesourcery.com>
863 Joseph Myers <joseph@codesourcery.com>
864 Cesar Philippidis <cesar@codesourcery.com>
865
866 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
867 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
868 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
869 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
870
92d45509
GA
8712021-07-20 Martin Sebor <msebor@redhat.com>
872
873 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
874 by-const-reference.
875 * c-typeck.c (c_build_function_call_vec): Same.
876
d97d71a1
GA
8772021-07-15 Martin Sebor <msebor@redhat.com>
878
879 PR c/101289
880 PR c/97548
881 * c-decl.c (get_parm_array_spec): Strip nops.
882
6fba0eea
GA
8832021-07-06 Martin Sebor <msebor@redhat.com>
884
885 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
886
7a60a6e8
GA
8872021-07-02 Jakub Jelinek <jakub@redhat.com>
888
889 PR c/101297
890 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
891 appears before a CPP_NAME.
892
90708f87
GA
8932021-06-25 Martin Sebor <msebor@redhat.com>
894
895 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
896 warning_suppressed_p, suppress_warning, and copy_no_warning.
897 (diagnose_mismatched_decls): Same.
898 (duplicate_decls): Same.
899 (grokdeclarator): Same.
900 (finish_function): Same.
901 (c_write_global_declarations_1): Same.
902 * c-fold.c (c_fully_fold_internal): Same.
903 * c-parser.c (c_parser_expr_no_commas): Same.
904 (c_parser_postfix_expression): Same.
905 * c-typeck.c (array_to_pointer_conversion): Same.
906 (function_to_pointer_conversion): Same.
907 (default_function_array_conversion): Same.
908 (convert_lvalue_to_rvalue): Same.
909 (default_conversion): Same.
910 (build_indirect_ref): Same.
911 (build_function_call_vec): Same.
912 (build_atomic_assign): Same.
913 (build_unary_op): Same.
914 (c_finish_return): Same.
915 (emit_side_effect_warnings): Same.
916 (c_finish_stmt_expr): Same.
917 (c_omp_clause_copy_ctor): Same.
918
9aa8327e
GA
9192021-06-24 Jakub Jelinek <jakub@redhat.com>
920
921 PR c/101176
922 * c-parser.c (c_parser_has_attribute_expression): Set source range for
923 the result.
924
9252021-06-24 Jakub Jelinek <jakub@redhat.com>
926
927 PR c/101171
928 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
929 error_mark_node.
930
9312021-06-24 Jakub Jelinek <jakub@redhat.com>
932
933 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
934 C_ORT_OMP for clauses on target construct.
935 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
936 (c_parser_omp_target): For non-combined target add
937 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
938 C_ORT_OMP_TARGET to c_finish_omp_clauses.
939 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
940 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
941 never present on C_ORT_*DECLARE_SIMD.
942 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
943 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
944 corresponding map clauses.
945
2f080224
GA
9462021-06-21 Jakub Jelinek <jakub@redhat.com>
947
948 PR inline-asm/100785
949 * c-typeck.c (c_mark_addressable): Diagnose trying to make
950 bit-fields addressable.
951
ede6c356
GA
9522021-06-15 Robin Dapp <rdapp@linux.ibm.com>
953
954 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
955 similar.
956
8dc48181
GA
9572021-06-14 Tobias Burnus <tobias@codesourcery.com>
958
959 PR c/100913
960 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
961 var in the error case.
962
438aac59
GA
9632021-06-07 Eric Botcazou <ebotcazou@adacore.com>
964
965 PR c/100920
966 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
967 spot built-in functions.
968
7d6987e9
GA
9692021-06-06 Jakub Jelinek <jakub@redhat.com>
970
971 PR c/100902
972 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
973 even when target is combined with other constructs.
974
9752021-06-06 Eric Botcazou <ebotcazou@adacore.com>
976
977 PR c/100920
978 * c-decl.c (finish_struct): Fix thinko in previous change.
979 * c-typeck.c (convert_for_assignment): Do not warn on pointer
980 assignment and initialization for storage order purposes if the
981 RHS is a call to a DECL_IS_MALLOC function.
982
600f90cb
GA
9832021-06-04 Martin Sebor <msebor@redhat.com>
984
985 PR c/100783
986 * c-objc-common.c (print_type): Handle erroneous types.
987
440c8a0a
GA
9882021-06-03 Jakub Jelinek <jakub@redhat.com>
989
990 PR c++/100859
991 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
992 after depend only cases.
993
ee682192
GA
9942021-05-31 Richard Biener <rguenther@suse.de>
995
996 PR c++/88601
997 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
998 * c-parser.c (c_parser_postfix_expression): Likewise.
999
48166757
GA
10002021-05-28 Richard Biener <rguenther@suse.de>
1001
1002 PR c/100803
1003 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
1004 invalid if conditions.
1005
10062021-05-28 Jakub Jelinek <jakub@redhat.com>
1007
1008 PR middle-end/99928
1009 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
1010 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1011 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
1012 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
1013 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
1014 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
1015 if present in map_head, map_field_head or map_firstprivate_head
1016 bitmaps.
1017
10182021-05-28 Tobias Burnus <tobias@codesourcery.com>
1019
1020 * c-parser.c (c_parser_omp_clause_affinity): New.
1021 (c_parser_omp_clause_name, c_parser_omp_variable_list,
1022 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
1023 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
1024 c_finish_omp_clauses): Likewise.
1025
01c59ef2
GA
10262021-05-26 Eric Botcazou <ebotcazou@adacore.com>
1027
1028 PR c/100653
1029 * c-decl.c (finish_struct): Warn for a union containing an aggregate
1030 field with a differing scalar storage order.
1031
2832d51b
GA
10322021-05-21 Jakub Jelinek <jakub@redhat.com>
1033
1034 PR middle-end/99928
1035 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
1036 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
1037 if a decl is mentioned both in map clause and in such firstprivate
1038 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
1039
65f32e5d
GA
10402021-05-19 Jakub Jelinek <jakub@redhat.com>
1041
1042 PR middle-end/99928
1043 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
1044 master when combined with taskloop.
1045 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
1046 parallel master when not combined with taskloop.
1047
a8daf9a1
GA
10482021-05-18 Richard Biener <rguenther@suse.de>
1049
1050 PR c/100522
1051 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
1052 Diagnose calls to non-functions.
1053 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
1054
a7ffc1ef
GA
10552021-05-17 Richard Biener <rguenther@suse.de>
1056
1057 PR c/100625
1058 * gimple-parser.c (c_parser_gimple_label): Avoid building
1059 a GIMPLE label with NULL label decl.
1060
f9af11c7
GA
10612021-05-13 Martin Sebor <msebor@redhat.com>
1062
1063 PR c/100550
1064 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
1065
0ff3a0f2
GA
10662021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
1067
1068 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
1069 'close'.
1070
aa891c56
GA
10712021-05-10 Martin Liska <mliska@suse.cz>
1072
1073 * c-aux-info.c (affix_data_type): Use startswith
1074 function instead of strncmp.
1075 * c-typeck.c (build_function_call_vec): Likewise.
1076 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
1077
62d87a32
GA
10782021-05-07 Eric Botcazou <ebotcazou@adacore.com>
1079
1080 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
1081 on the address of a pointer field in a record with reverse SSO.
1082
99e8df7a
GA
10832021-05-04 Tobias Burnus <tobias@codesourcery.com>
1084
1085 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
1086 for || and && reductions.
1087
3c8e539d
GA
10882021-04-29 Joseph Myers <joseph@codesourcery.com>
1089
1090 * c-typeck.c (function_types_compatible_p): For C2X, treat
1091 unprototyped function as compatible with non-variadic prototyped
1092 function even if some argument types are changed by the default
1093 argument promotions.
1094
ee351f7f
GA
10952021-04-15 Martin Sebor <msebor@redhat.com>
1096
1097 PR c/99420
1098 PR c/99972
1099 * c-decl.c (pushdecl): Always propagate type attribute.
1100
11012021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1102
1103 PR c/98852
1104 * c-typeck.c (c_common_type): Do not drop attributes that
1105 affect type identity.
1106
1d54b138
GA
11072021-04-10 Jakub Jelinek <jakub@redhat.com>
1108
1109 PR c/99990
1110 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
1111 error_mark_node.
1112
4493b1c1
GA
11132021-03-25 Jakub Jelinek <jakub@redhat.com>
1114
1115 PR c++/99565
1116 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
1117 to operand_equal_p.
1118
5f256a70
GA
11192021-03-19 Jakub Jelinek <jakub@redhat.com>
1120
1121 PR c/99588
1122 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
1123 with modifycode NOP_EXPR produces and mark the _Atomic var as read
1124 if found.
1125 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
1126 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
1127 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
1128
3c5b6d24
GA
11292021-03-15 Tobias Burnus <tobias@codesourcery.com>
1130
1131 PR c++/99509
1132 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
1133 ensure that the varpool node is marked as offloadable.
1134
ceae9533
GA
11352021-03-05 Tobias Burnus <tobias@codesourcery.com>
1136
1137 PR c/99137
1138 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
1139
4028d01a
GA
11402021-02-24 Martin Sebor <msebor@redhat.com>
1141
1142 PR middle-end/97172
1143 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
1144
bf81237e
GA
11452021-02-18 Jakub Jelinek <jakub@redhat.com>
1146
1147 PR c/99136
1148 * c-typeck.c (c_finish_return): Don't wrap retval into
1149 EXCESS_PRECISION_EXPR in functions that return void.
1150
0c5cdb31
GA
11512021-02-11 Marek Polacek <polacek@redhat.com>
1152
1153 * c-parser.c (c_parser_if_statement): Use vec_free.
1154
a19dd5e6
GA
11552021-02-04 Martin Sebor <msebor@redhat.com>
1156
1157 PR c/97882
1158 * c-decl.c (locate_old_decl): Add type to diagnostic output.
1159 (diagnose_mismatched_decls): Same.
1160 (start_function): Introduce temporaries for better readability.
1161 * c-typeck.c (comptypes_internal): Only consider complete enum
1162 types in comparisons with integers.
1163
f7884fb1
GA
11642021-02-01 Martin Sebor <msebor@redhat.com>
1165
1166 PR middle-end/97172
1167 * c-decl.c (free_attr_access_data): New function.
1168 (c_parse_final_cleanups): Call free_attr_access_data.
1169
59cf67d1
GA
11702021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1171
1172 * c-parser.c (c_parser_omp_clause_detach): New.
1173 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
1174 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
1175 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
1176 clause. Prevent use of detach with mergeable and overriding the
1177 data sharing mode of the event handle.
1178
2f7f0d32
GA
11792021-01-15 Jakub Jelinek <jakub@redhat.com>
1180
1181 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
1182 unqualified element type and then call c_build_qualified_type on the
1183 ARRAY_TYPE.
1184
7d187e4f
GA
11852021-01-07 Richard Biener <rguenther@suse.de>
1186
1187 * gimple-parser.c (c_parser_gimple_compound_statement): Only
1188 reallocate loop array if it is too small.
1189
eefe499f
GA
11902020-12-16 Martin Uecker <muecker@gwdg.de>
1191
1192 PR c/98047
1193 * c-typeck.c (build_modify_expr): Drop qualifiers.
1194
11952020-12-16 Martin Uecker <muecker@gwdg.de>
1196
1197 PR c/98260
1198 * c-parser.c (c_parser_expression): Look into
1199 nop expression when marking expressions as read.
1200
d52945ce
GA
12012020-12-14 Martin Liska <mliska@suse.cz>
1202
1203 PR sanitizer/98204
1204 * c-typeck.c (pointer_diff): Do not emit a top-level
1205 sanitization.
1206 (build_binary_op): Likewise.
1207
ca2bd949
GA
12082020-12-09 Tobias Burnus <tobias@codesourcery.com>
1209
1210 * c-parser.c (c_parser_omp_allocate): New.
1211 (c_parser_omp_construct): Call it.
1212
12132020-12-09 Richard Biener <rguenther@suse.de>
1214
1215 PR c/98200
1216 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
1217 early on error.
1218
bc8a7013
GA
12192020-12-07 Martin Uecker <muecker@gwdg.de>
1220
1221 PR c/97981
1222 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
1223 that drops qualifiers to the end of the function.
1224
d48df6f2
GA
12252020-11-26 Martin Uecker <muecker@gwdg.de>
1226
1227 PR c/65455
1228 PR c/92935
1229 * c-parser.c (c_parser_declaration_or_fndef): Remove
1230 redundant code to drop qualifiers of _Atomic types for __auto_type.
1231 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
1232 types for __typeof__.
1233
1e2c9a27
GA
12342020-11-24 Jakub Jelinek <jakub@redhat.com>
1235
1236 PR c/97958
1237 * c-parser.c (c_parser_binary_expression): For omp atomic binary
1238 expressions, use make_node instead of build2 to avoid checking build2
1239 performs.
1240
8e6198d0
GA
12412020-11-23 Joseph Myers <joseph@codesourcery.com>
1242
1243 PR c/95630
1244 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
1245 for comparisons of complete and incomplete pointers.
1246
7a97e2fc
GA
12472020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1248
1249 * c-aux-info.c (gen_type): Support opaque types.
1250
82e5048e
GA
12512020-11-20 Martin Sebor <msebor@redhat.com>
1252
1253 PR middle-end/97879
1254 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
1255
12562020-11-20 Jakub Jelinek <jakub@redhat.com>
1257
1258 PR other/97911
1259 * Make-lang.in (c.serial): Change from goal to a variable.
1260 (.PHONY): Drop c.serial.
1261
12622020-11-20 Martin Uecker <muecker@gwdg.de>
1263
1264 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
1265
d62586ee
GA
12662020-11-19 Jakub Jelinek <jakub@redhat.com>
1267
1268 PR c/97860
1269 * c-decl.c (get_parm_array_spec): Bail out of nelts is
1270 error_operand_p.
1271
25bb75f8
GA
12722020-11-18 Jakub Jelinek <jakub@redhat.com>
1273
1274 * Make-lang.in (c.serial): New goal.
1275 (.PHONY): Add c.serial c.prev.
1276 (cc1$(exeext)): Call LINK_PROGRESS.
1277
77f67db2
GA
12782020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1279
1280 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1281 goto too.
1282 * c-typeck.c (build_asm_expr): Remove an assert checking output
1283 absence for asm goto.
1284
12852020-11-13 Jakub Jelinek <jakub@redhat.com>
1286
1287 * c-typeck.c (c_finish_omp_clauses): Don't clear
1288 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1289
12902020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1291
1292 PR objc/77404
1293 * c-parser.c (c_parser_objc_class_definition): Pass the
1294 location of the class name to the interface declaration.
1295
bb622641
GA
12962020-11-10 Strager Neds <strager.nds@gmail.com>
1297
1298 * c-decl.c (merge_decls): Use new overload of
1299 set_decl_section_name.
1300
13012020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1302
1303 * c-parser.c (c_parser_omp_target_data): Add use of
1304 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1305 handled map clause kind.
1306 (c_parser_omp_target_enter_data): Likewise.
1307 (c_parser_omp_target_exit_data): Likewise.
1308 (c_parser_omp_target): Likewise.
1309 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1310 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1311 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1312 same struct field access to co-exist on OpenMP construct.
1313
2da7ee05
GA
13142020-11-07 Martin Uecker <muecker@gwdg.de>
1315
1316 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1317 (c_parser_all_labels): Likewise.
1318
44cab2d8
GA
13192020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1320
1321 * c-parser.c (c_parser_objc_at_property_declaration):
1322 Improve parsing fidelity. Associate better location info
1323 with @property attributes. Clean up the interface to
1324 objc_add_property_declaration ().
1325
13262020-11-06 Nathan Sidwell <nathan@acm.org>
1327
1328 * c-decl.c (diagnose_mismatched_decls): Rename
1329 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1330 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1331 (collect_source_refs): Likewise.
1332 * c-typeck.c (inform_declaration, inform_for_arg)
1333 (convert_for_assignment): Likewise.
1334
13352020-11-06 Tobias Burnus <tobias@codesourcery.com>
1336
1337 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1338 OpenACC matching.
1339 (c_parser_omp_construct): Update call.
1340
35c125cb
GA
13412020-11-04 Jakub Jelinek <jakub@redhat.com>
1342
1343 PR c++/97670
1344 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1345 find underlying decl to clear in the aligned_head bitmap.
1346
13472020-11-04 Joseph Myers <joseph@codesourcery.com>
1348
1349 * c-decl.c (handle_nodiscard_attribute): New.
1350 (std_attribute_table): Add nodiscard.
1351 * c-parser.c (c_parser_std_attribute): Expect argument to
1352 nodiscard attribute to be a string. Do not special-case ignoring
1353 nodiscard.
1354 * c-typeck.c (maybe_warn_nodiscard): New.
1355 (build_compound_expr, emit_side_effect_warnings): Call
1356 maybe_warn_nodiscard.
1357 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1358 emit_side_effect_warnings if warn_unused_result.
1359
4f0606fe
GA
13602020-10-29 Asher Gordon <AsDaGo@posteo.net>
1361
1362 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1363 with XDELETE.
1364 (finish_init): Likewise.
1365 (pop_init_level): Likewise.
1366
e93aae4a
GA
13672020-10-28 Joseph Myers <joseph@codesourcery.com>
1368
1369 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1370 error_at for omitted parameter name.
1371
13722020-10-28 Jakub Jelinek <jakub@redhat.com>
1373
1374 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1375 (c_parser_omp_clause_allocate): New function.
1376 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1377 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1378 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1379 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1380 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1381 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1382 PRAGMA_OMP_CLAUSE_ALLOCATE.
1383 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1384
89bb01e7
GA
13852020-10-27 Joseph Myers <joseph@codesourcery.com>
1386
1387 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1388 standard attributes.
1389
efe71fcc
GA
13902020-10-23 Marek Polacek <polacek@redhat.com>
1391
1392 PR c++/91741
1393 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1394 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1395 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1396 * c-tree.h (char_type_p): Declare.
1397 * c-typeck.c (char_type_p): No longer static.
1398
13992020-10-23 Martin Sebor <msebor@redhat.com>
1400
1401 PR middle-end/97552
1402 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1403
2fe5b7d1
GA
14042020-09-19 Martin Sebor <msebor@redhat.com>
1405
1406 PR c/50584
1407 * c-decl.c (lookup_last_decl): Define new function.
1408 (c_decl_attributes): Call it.
1409 (start_decl): Add argument and use it.
1410 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1411 (get_parm_array_spec): Define new function.
1412 (push_parm_decl): Call get_parm_array_spec.
1413 (start_function): Call warn_parm_array_mismatch. Build attribute
1414 access and add it to current function.
1415 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1416 in forms of array parameters.
1417 * c-tree.h (start_decl): Add argument.
1418
14192020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1420
1421 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1422 with...
1423 (in_statement): New.
1424 (start_function): Adjust for above change.
1425 (c_push_function_context, c_pop_function_context): Likewise.
1426 * c-lang.h (struct language_function): Likewise.
1427 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1428 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1429 New.
1430 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1431 (c_parser_switch_statement): Adjust break/switch context handling
1432 and calls to renamed functions.
1433 (c_parser_while_statement): Adjust break/switch context handling and
1434 build a WHILE_STMT.
1435 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1436 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1437 (c_parser_omp_for_loop): Adjust break/switch context handling.
1438 * c-tree.h (c_break_label, c_cont_label): Delete.
1439 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1440 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1441 (in_statement, switch_statement_break_seen_p): Declare.
1442 (c_start_case, c_finish_case): Renamed to...
1443 (c_start_switch, c_finish_switch).
1444 (c_finish_bc_stmt): Adjust arguments.
1445 * c-typeck.c (build_function_call_vec): Don't try to print
1446 statements with %qE format.
1447 (struct c_switch): Rename switch_expr field to switch_stmt.
1448 Add break_stmt_seen_p field.
1449 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1450 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1451 (do_case): Update for changes to struct c_switch.
1452 (c_finish_case): Rename to c_finish_switch. Update for changes to
1453 struct c_switch and change of representation from SWITCH_EXPR to
1454 SWITCH_STMT.
1455 (c_finish_loop): Delete.
1456 (c_finish_bc_stmt): Update to reflect changes to break/continue
1457 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1458 of a GOTO_EXPR except for objc foreach loops.
1459
e1a4a8a0
GA
14602020-09-01 Jakub Jelinek <jakub@redhat.com>
1461
1462 PR c++/96867
1463 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1464 only on PARM_DECLs.
1465
8f7ea26a
GA
14662020-08-28 Martin Sebor <msebor@redhat.com>
1467
1468 PR c/96596
1469 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1470 argument type.
1471
8b394f01
GA
14722020-08-27 Martin Liska <mliska@suse.cz>
1473
1474 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1475 growth function to true.
1476
db0f6efe
GA
14772020-08-25 Tobias Burnus <tobias@codesourcery.com>
1478
1479 PR c/96678
1480 * c-typeck.c (handle_omp_array_sections_1): Talk about
1481 array function parameter in the error message.
1482
5c265693
GA
14832020-08-18 Jakub Jelinek <jakub@redhat.com>
1484
1485 PR c/96571
1486 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1487 to int, holding index of the match. Call mark_exp_read on the selector
1488 expression and on expressions other than the selected one.
1489
4967ca2f
GA
14902020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1491
1492 PR c/96377
1493 * c-typeck.c (process_init_element): Split test for whether to
1494 recurse into a record, union or array into...
1495 (initialize_elementwise_p): ...this new function. Don't recurse
1496 into a vector type if the initialization value is also a vector.
1497
48cc2e46
GA
14982020-07-31 Richard Biener <rguenther@suse.de>
1499
1500 PR debug/96383
1501 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1502 Define to c_common_finalize_early_debug.
1503
3ea9abca
GA
15042020-07-22 Tobias Burnus <tobias@codesourcery.com>
1505
1506 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1507 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1508 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1509
30430061
GA
15102020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1511
1512 PR target/95237
1513 * c-decl.c (finish_decl): Call target hook
1514 lower_local_decl_alignment to lower local decl alignment.
1515
3f8ca9cb
GA
15162020-07-09 Julian Brown <julian@codesourcery.com>
1517 Thomas Schwinge <thomas@codesourcery.com>
1518
1519 PR middle-end/95270
1520 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1521 for standalone attach/detach clauses.
1522
a82c4c4c 15232020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
1524
1525 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1526 set, warn for conversion between pointers that point to incompatible
1527 scalar storage orders.
1528
f60ee68d
GA
15292020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1530
1531 * c-parser.c (c_parser_statement_after_labels): Pass correct
1532 parameters to c_parser_do_statement.
1533
56638b9b
GA
15342020-06-16 Jakub Jelinek <jakub@redhat.com>
1535
1536 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1537 c_in_omp_for.
1538 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1539 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1540 c_finish_omp_for.
1541 * c-tree.h (c_in_omp_for): Declare.
1542 * c-typeck.c (c_in_omp_for): Define.
1543 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1544 (digest_init): Likewise.
1545 (build_binary_op): Likewise.
1546
15472020-06-16 Jakub Jelinek <jakub@redhat.com>
1548
1549 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1550 from kind by comma rather than colon.
1551
1a59f3db
GA
15522020-06-05 Mark Wielaard <mark@klomp.org>
1553
1554 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1555 an undeclared builtin, then add a fixit header hint, if found.
1556 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1557 warning_at about implicit builtin declaration type mismatch.
1558
9a5b7438
GA
15592020-06-03 Mark Wielaard <mark@klomp.org>
1560
1561 * c-parser.c (struct c_parser): Add seen_string_literal
1562 bitfield.
1563 (c_parser_consume_token): Reset seen_string_literal.
1564 (c_parser_error_richloc): Add name_hint if seen_string_literal
1565 and next token is a CPP_NAME and we have a missing header
1566 suggestion for the name.
1567 (c_parser_string_literal): Set seen_string_literal.
1568
15692020-06-03 Mark Wielaard <mark@klomp.org>
1570
1571 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1572 scope with matching_parens after CPP_OPEN_PAREN.
1573
15742020-06-03 Tobias Burnus <tobias@codesourcery.com>
1575
1576 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1577
53ffb43a
GA
15782020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1579
1580 * Make-lang.in: Remove extra slash.
1581
8f66f175
ML
15822020-05-19 Martin Liska <mliska@suse.cz>
1583
1584 * c-parser.c: Fix typo.
1585
49ddde69
JJ
15862020-05-14 Jakub Jelinek <jakub@redhat.com>
1587
1588 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1589
eb72dc66
RB
15902020-05-07 Richard Biener <rguenther@suse.de>
1591
1592 PR middle-end/94703
1593 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1594 DECL_GIMPLE_REG_P.
1595
bf915591
JJ
15962020-04-30 Jakub Jelinek <jakub@redhat.com>
1597
1598 PR c/94842
1599 * c-decl.c (set_labels_context_r): In addition to context-less
1600 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1601 parent function if any.
1602 (store_parm_decls): Adjust comment.
1603
e1113ffb
JJ
16042020-04-19 Jakub Jelinek <jakub@redhat.com>
1605
1606 PR objc/94637
1607 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1608 two CPP_COLON tokens.
1609
2e389749
JJ
16102020-04-17 Jakub Jelinek <jakub@redhat.com>
1611
1612 PR other/94629
1613 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1614 to data.clauses.
1615
2dc9294c
JJ
16162020-04-15 Jakub Jelinek <jakub@redhat.com>
1617
1618 PR c/94593
1619 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1620 requires directive when not at file scope.
1621
13e41d8b
TB
16222020-04-08 Tobias Burnus <tobias@codesourcery.com>
1623
1624 PR middle-end/94120
1625 * c-decl.c (c_check_in_current_scope): New function.
1626 * c-tree.h (c_check_in_current_scope): Declare it.
1627 * c-parser.c (c_parser_oacc_declare): Add check that variables
1628 are declared in the same scope as the directive. Fix handling
1629 of namespace vars.
1630
4df50a05
JJ
16312020-04-07 Jakub Jelinek <jakub@redhat.com>
1632
1633 PR c++/94512
1634 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1635 if c_parser_omp_master succeeded.
1636
5db9e893
JJ
16372020-03-23 Jakub Jelinek <jakub@redhat.com>
1638
1639 PR gcov-profile/94029
1640 PR c/94239
1641 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1642 the function_start_locus location. Don't do that afterwards for the
1643 __GIMPLE body parsing.
1644
9def91e9
JJ
16452020-03-19 Jakub Jelinek <jakub@redhat.com>
1646
1647 PR gcov-profile/94029
1648 * c-tree.h (finish_function): Add location_t argument defaulted to
1649 input_location.
1650 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1651 set it to the locus of closing } if non-NULL.
1652 (c_parser_compound_statement_nostart): Return locus of closing }.
1653 (c_parser_parse_rtl_body): Likewise.
1654 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1655 finish_function.
1656 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1657 input_location to set function_end_locus.
1658
046c5890
JJ
16592020-03-17 Jakub Jelinek <jakub@redhat.com>
1660
1661 PR c/94172
1662 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1663 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1664 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1665 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1666 ENUMERAL_TYPEs.
1667 (finish_incomplete_vars): New function, moved from finish_struct. Use
1668 relayout_decl instead of layout_decl.
1669 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1670 being TYPE_VFIELD. Use finish_incomplete_vars.
1671 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1672 finish_incomplete_vars.
1673 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1674 also on ENUMERAL_TYPEs.
1675
c015ff8c
JJ
16762020-03-16 Jakub Jelinek <jakub@redhat.com>
1677
1678 PR c/94179
1679 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1680
f2e9fe5f
MS
16812020-03-13 Martin Sebor <msebor@redhat.com>
1682
1683 PR c/94040
1684 * c-decl.c (builtin_structptr_type_count): New constant.
1685 (match_builtin_function_types): Reject decls that are incompatible
1686 in types pointed to by pointers.
1687 (diagnose_mismatched_decls): Adjust comments.
1688
c9d70946
JM
16892020-03-05 Joseph Myers <joseph@codesourcery.com>
1690
1691 PR c/93577
1692 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1693 empty when initialized type is error_mark_node.
1694 (set_designator, process_init_element): Ignore initializers for
1695 elements of a variable-size type or of error_mark_node.
1696
726e292d
MS
16972020-03-01 Martin Sebor <msebor@redhat.com>
1698
1699 PR middle-end/93926
1700 * c-decl.c (types_close_enough_to_match): New function.
1701 (match_builtin_function_types):
1702 (diagnose_mismatched_decls): Add missing inform call to a warning.
1703
a499c2f8
MS
17042020-03-01 Martin Sebor <msebor@redhat.com>
1705
1706 PR c/93812
1707 * c-typeck.c (build_functype_attribute_variant): New function.
1708 (composite_type): Call it.
1709
9c3da8cc
JJ
17102020-02-25 Jakub Jelinek <jakub@redhat.com>
1711
1712 PR other/93912
1713 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1714 Rename last argument from probablity to probability.
1715
bacdd5e9
JJ
17162020-02-13 Jakub Jelinek <jakub@redhat.com>
1717
1718 PR c/93576
1719 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1720 *expr if it has side effects.
1721
f9eb0973
JL
17222020-01-30 Jeff Law <law@redhat.com>
1723
1724 PR c/88660
1725 * c-parser.c (c_parser_switch_statement): Make sure to request
1726 marking the switch expr as used.
1727
ac68e287
JM
17282020-01-22 Joseph Myers <joseph@codesourcery.com>
1729
1730 PR c/93348
1731 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1732 argument with integer operands.
1733
852f0ae8
KK
17342020-01-16 Kerem Kat <keremkat@gmail.com>
1735
1736 PR c/92833
1737 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1738 to support 4 available tokens.
1739
e2346a33
JM
17402020-01-15 Joseph Myers <joseph@codesourcery.com>
1741
1742 PR c/93072
1743 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1744 determine whether to set DECL_CONTEXT.
1745
3d77686d
JM
17462020-01-13 Joseph Myers <joseph@codesourcery.com>
1747
1748 PR c/93241
1749 * c-typeck.c (build_c_cast): Check for expressions with integer
1750 operands that can occur in an unevaluated part of an integer
1751 constant expression and call note_integer_operands as needed.
1752
f74c4b2c
RB
17532019-01-08 Richard Biener <rguenther@suse.de>
1754
1755 PR middle-end/93199
1756 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1757 permanently.
1758
8d9254fc
JJ
17592020-01-01 Jakub Jelinek <jakub@redhat.com>
1760
1761 Update copyright years.
1762
39292e25
EB
17632019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1764
1765 * c-decl.c (collect_source_ref_cb): Delete.
1766 (for_each_global_decl): Rename into...
1767 (collect_source_refs): ...this. Call collect_source_ref directly.
1768 (c_parse_final_cleanups): Always call collect_source_ref on the main
1769 input filename.
1770
519d7496
JB
17712019-12-19 Julian Brown <julian@codesourcery.com>
1772 Cesar Philippidis <cesar@codesourcery.com>
1773
1774 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1775 detach clauses.
1776 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1777 Allow deref (->) in variable lists if true.
1778 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1779 Pass to c_parser_omp_variable_list.
1780 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1781 call to c_parser_omp_variable_list.
1782 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1783 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1784 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1785 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1786 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1787 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1788 and detach. Support deref.
1789 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1790 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1791 (c_oacc_check_attachments): New function.
1792 (c_finish_omp_clauses): Check attach/detach arguments for being
1793 pointers using above. Support deref.
1794
a6163563
JB
17952019-12-19 Julian Brown <julian@codesourcery.com>
1796 Maciej W. Rozycki <macro@codesourcery.com>
1797 Tobias Burnus <tobias@codesourcery.com>
1798 Thomas Schwinge <thomas@codesourcery.com>
1799
1800 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1801 (c_parser_oacc_data_clause): Likewise.
1802 (c_parser_oacc_all_clauses): Likewise.
1803 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1804 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1805 PRAGMA_OACC_CLAUSE_NO_CREATE.
1806 * c-typeck.c (handle_omp_array_sections): Support
1807 GOMP_MAP_NO_ALLOC.
1808
d68f5d45
DM
18092019-12-09 David Malcolm <dmalcolm@redhat.com>
1810
1811 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1812 Replace label_text ctor calls.
1813
4691bf46
JM
18142019-12-04 Joseph Myers <joseph@codesourcery.com>
1815
1816 PR c/36941
1817 PR c/88827
1818 * c-typeck.c (convert_lvalue_to_rvalue): Call
1819 require_complete_type for arguments not of void types.
1820 (build_indirect_ref): Do not diagnose dereferencing pointers to
1821 incomplete types.
1822 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1823
85d11957
JM
18242019-12-03 Joseph Myers <joseph@codesourcery.com>
1825
1826 PR c/88704
1827 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1828 old-style parameter definitions.
1829
4569f8b3
SL
18302019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1831
1832 PR target/92499
1833
1834 * c-decl.c (flexible_array_type_p): Move to common code.
1835
65ef05d0
RS
18362019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1837
1838 * c-decl.c (start_decl): Allow initialization of variables whose
1839 size is a POLY_INT_CST.
1840 (finish_decl): Use verify_type_context to check whether the target
1841 allows variables with a particular type to have static or thread-local
1842 storage duration. Don't raise a second error if such variables do
1843 not have a constant size.
1844 (grokdeclarator): Use verify_type_context to check whether the
1845 target allows fields or array elements to have a particular type.
1846 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1847 the target allows pointer difference for the types involved.
1848 (build_unary_op): Likewise for pointer increment and decrement.
1849
34b43828
JM
18502019-11-29 Joseph Myers <joseph@codesourcery.com>
1851
1852 * c-parser.c (struct c_parser): Add members raw_tokens and
1853 raw_tokens_used.
1854 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1855 using previously-lexed raw tokens.
1856 (c_parser_peek_nth_token_raw)
1857 (c_parser_check_balanced_raw_token_sequence): New functions.
1858 (c_parser_nth_token_starts_std_attributes): Use
1859 c_parser_check_balanced_raw_token_sequence for Objective-C.
1860
5b8d9367
JM
18612019-11-25 Joseph Myers <joseph@codesourcery.com>
1862
1863 PR c/91985
1864 * c-decl.c (finish_declspecs): Use int instead of decimal
1865 floating-point types if decimal floating-point not supported.
1866
1723e1be
JM
18672019-11-25 Joseph Myers <joseph@codesourcery.com>
1868
1869 * c-tree.h (struct c_declarator): Use a structure for id member.
1870 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1871 declarators at the start, not when handling individual declarators
1872 later. Use u.id.id instead of u.id.
1873 (grokfield): Use u.id.id instead of u.id.
1874 (build_id_declarator): Set u.id.id and u.id.attrs.
1875 (finish_declspecs): Handle postfix attributes in case of typedef
1876 name or typeof used.
1877 * c-parser.c (c_parser_direct_declarator)
1878 (c_parser_direct_declarator_inner): Place declarator for
1879 attributes inside that for function or array, not outside. Set
1880 u.id.attrs for identifiers.
1881 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1882 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1883 instead of u.id.
1884
bdaf8be1
JJ
18852019-11-22 Jakub Jelinek <jakub@redhat.com>
1886
1887 PR c/90677
1888 * c-decl.c (identifier_global_tag): Define.
1889
3e00ba47
RB
18902019-11-20 Richard Biener <rguenther@suse.de>
1891
1892 PR c/92088
1893 * c-decl.c (grokdeclarator): Prevent inlining of nested
1894 function with VLA arguments.
1895
8c5b727a
JM
18962019-11-20 Joseph Myers <joseph@codesourcery.com>
1897
1898 * c-decl.c (c_warn_type_attributes): New function.
1899 (groktypename, grokdeclarator, finish_declspecs): Call
1900 c_warn_type_attributes before applying attributes to types.
1901 * c-tree.h (c_warn_type_attributes): Declare.
1902
192961ff
JM
19032019-11-19 Joseph Myers <joseph@codesourcery.com>
1904
1905 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1906 standard attributes.
1907 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1908 pedwarn for unknown standard attributes and return error_mark_node
1909 for them.
1910
20a38017
MM
19112019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1912
1913 * c-parser.c (c_parser_parse_rtl_body): Always call
1914 run_rtl_passes, even if startwith pass is not provided.
1915
d5fbe5e0
JM
19162019-11-15 Joseph Myers <joseph@codesourcery.com>
1917
1918 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1919 duplicate standard attributes.
1920
97cc1187
JM
19212019-11-15 Joseph Myers <joseph@codesourcery.com>
1922
1923 * c-decl.c (std_attribute_table): Add maybe_unused.
1924
f8aea5e3
JM
19252019-11-15 Joseph Myers <joseph@codesourcery.com>
1926
1927 * c-decl.c (std_attribute_table): Add fallthrough.
1928 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1929 attribute at top level.
1930
2cc94aa8
JM
19312019-11-15 Joseph Myers <joseph@codesourcery.com>
1932
1933 * c-decl.c (std_attribute_table): New.
1934 (c_init_decl_processing): Register attributes from
1935 std_attribute_table.
1936 * c-parser.c (c_parser_attribute_arguments): Add arguments
1937 require_string and allow_empty_args. All callers changed.
1938 (c_parser_std_attribute): Set require_string argument for
1939 "deprecated" attribute.
1940
7c5890cc
JM
19412019-11-14 Joseph Myers <joseph@codesourcery.com>
1942
1943 * c-parser.c (c_parser_postfix_expression)
1944 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1945 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1946
e8738f4e
RS
19472019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1948
1949 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1950 of build_same_sized_truth_vector_type.
1951 (build_vec_cmp): Likewise.
1952
b2417b59
JJ
19532019-11-14 Jakub Jelinek <jakub@redhat.com>
1954
bedb7f04
JJ
1955 * c-parser.c (c_parser_omp_context_selector): Don't require score
1956 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1957 negative score.
1958
b2417b59
JJ
1959 * c-parser.c (c_parser_omp_context_selector): Rename
1960 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1961 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1962 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1963 and string literals.
1964
4e03c3a7
JM
19652019-11-14 Joseph Myers <joseph@codesourcery.com>
1966
1967 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1968 ctsk_tagfirstref_attrs.
1969 (struct c_declspecs): Update description of attrs. Add
1970 postfix_attrs and non_std_attrs_seen_p. Increase size of
1971 typespec_kind bit-field.
1972 (c_warn_unused_attributes): New declaration.
1973 (parser_xref_tag): Update prototype.
1974 * c-decl.c (c_warn_unused_attributes): New function.
1975 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1976 ctsk_tagref_attrs. Handle attribute declarations.
1977 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1978 (grokdeclarator): Handle standard attributes.
1979 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1980 attributes to incomplete type reference.
1981 (xref_tag): Update call to parser_xref_tag.
1982 (declspecs_add_addrspace, declspecs_add_type)
1983 (declspecs_add_scspec, declspecs_add_attrs): Set
1984 non_std_attrs_seen_p.
1985 (finish_declspecs): Apply postfix standard attributes to type.
1986 * c-parser.c (c_token_starts_declspecs)
1987 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1988 (c_parser_next_tokens_start_declaration): Update comments.
1989 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1990 parser->tokens[2] to parser->tokens[1].
1991 (c_parser_nth_token_starts_std_attributes)
1992 (c_parser_std_attribute_specifier_sequence): New functions.
1993 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1994 attrs. All callers changed. Handle standard attributes.
1995 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1996 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1997 All callers changed.
1998 (c_parser_declspecs): Add arguments start_std_attr_ok and
1999 end_std_attr_ok. All callers changed. Handle standard
2000 attributes.
2001 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2002 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
2003 (c_parser_compound_statement_nostart, c_parser_all_labels)
2004 (c_parser_label, c_parser_statement, c_parser_for_statement):
2005 Handle standard attributes.
2006 * c-parser.h (c_parser_declspecs): Update prototype.
2007 * gimple-parser.c (c_parser_gimple_declaration): Update call to
2008 c_parser_declspecs.
2009
0c29cac4
ML
20102019-11-12 Martin Liska <mliska@suse.cz>
2011
2012 * gimple-parser.c: Do not include params.h.
2013
028d4092
ML
20142019-11-12 Martin Liska <mliska@suse.cz>
2015
2016 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
2017 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
2018 macro.
2019
62aee289
MR
20202019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2021 Frederik Harwath <frederik@codesourcery.com>
2022
2023 gcc/c/
2024 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
2025 (c_parser_oacc_kernels_parallel): Rename function to...
2026 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
2027 (c_parser_omp_construct): Update accordingly.
2028
2029
7cec9588
JJ
20302019-11-11 Jakub Jelinek <jakub@redhat.com>
2031
2032 * c-parser.c (c_parser_translation_unit): Diagnose declare target
2033 without corresponding end declare target.
2034
f486280c
RS
20352019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2036
2037 * c-convert.c (convert): Only handle vector conversions if one of
2038 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
2039 allows it.
2040 * c-typeck.c (build_array_ref): Only allow vector indexing if the
2041 vectors satisfy gnu_vector_type_p.
2042 (build_unary_op): Only allow unary operators to be applied to
2043 vectors if they satisfy gnu_vector_type_p.
2044 (digest_init): Only allow by-element initialization of vectors
2045 if they satisfy gnu_vector_type_p.
2046 (really_start_incremental_init): Likewise.
2047 (push_init_level): Likewise.
2048 (pop_init_level): Likewise.
2049 (process_init_element): Likewise.
2050 (build_binary_op): Only allow binary operators to be applied to
2051 vectors if they satisfy gnu_vector_type_p.
2052
017c6491
JM
20532019-11-08 Joseph Myers <joseph@codesourcery.com>
2054
2055 * c-decl.c (grokparms): Convert () in a function definition to
2056 (void) for C2x.
2057 (store_parm_decls_oldstyle): Pedwarn for C2x.
2058 (store_parm_decls): Update comment about () not generating a
2059 prototype.
2060
c01bd174
JM
20612019-11-07 Joseph Myers <joseph@codesourcery.com>
2062
2063 * c-parser.c (c_parser_attribute_arguments): New function.
2064 Factored out of c_parser_gnu_attribute.
2065 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
2066 (c_parser_balanced_token_sequence, c_parser_std_attribute)
2067 (c_parser_std_attribute_specifier): New functions.
2068 (c_parser_transaction_attributes): Use
2069 c_parser_std_attribute_specifier.
2070
471c5330
JM
20712019-11-07 Joseph Myers <joseph@codesourcery.com>
2072
2073 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
2074 lex_joined_string and translate_strings_p.
2075 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
2076 c_lex_with_flags.
2077 (c_parser_string_literal): New function.
2078 (c_parser_static_assert_declaration_no_semi): Use
2079 c_parser_string_literal. Do not set lex_untranslated_string.
2080 (c_parser_asm_string_literal): Use c_parser_string_literal.
2081 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
2082 (c_parser_gnu_attributes): Set and restore translate_strings_p
2083 instead of lex_untranslated_string.
2084 (c_parser_asm_statement): Do not set lex_untranslated_string.
2085 (c_parser_asm_operands): Likewise.
2086 (c_parser_has_attribute_expression): Set and restore
2087 translate_strings_p instead of lex_untranslated_string.
2088 (c_parser_postfix_expression): Use c_parser_string_literal.
2089 (pragma_lex): Likewise.
2090 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
2091 (c_parse_file): Set translate_strings_p.
2092 * gimple-parser.c (c_parser_gimple_postfix_expression)
2093 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
2094 * c-parser.c (c_parser_string_literal): Declare function.
2095
d0c464d2
JJ
20962019-11-02 Jakub Jelinek <jakub@redhat.com>
2097
2098 * c-parser.c (c_finish_omp_declare_variant): Use
2099 omp_get_context_selector instead of c_omp_get_context_selector.
2100
ac2cfa6c
RS
21012019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2102
2103 * c-tree.h (c_simulate_enum_decl): Declare.
2104 * c-decl.c (c_simulate_enum_decl): New function.
2105 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
2106
74078538
RS
21072019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2108
2109 * c-tree.h (c_simulate_builtin_function_decl): Declare.
2110 * c-decl.c (c_simulate_builtin_function_decl): New function.
2111 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
2112 to the above.
2113
ad1539d5
MS
21142019-10-28 Martin Sebor <msebor@redhat.com>
2115
2116 PR c/66970
2117 * c-decl.c (names_builtin_p): Define a new function.
2118
cb73e4e7
RB
21192019-10-28 Richard Biener <rguenther@suse.de>
2120
2121 PR c/92249
2122 * gimple-parser.c (c_parser_parse_gimple_body): Make
2123 current_bb the entry block initially to easier recover
2124 from errors.
2125 (c_parser_gimple_compound_statement): Adjust.
2126
135df52c
JJ
21272019-10-24 Jakub Jelinek <jakub@redhat.com>
2128
2129 * c-parser.c (c_finish_omp_declare_variant): Use
2130 omp_context_selector_matches instead of
2131 c_omp_context_selector_matches.
2132 * c-decl.c (c_decl_attributes): Add "omp declare target block"
2133 attribute in between declare target and end declare target
2134 pragmas.
2135
783bfe5e
JM
21362019-10-15 Joseph Myers <joseph@codesourcery.com>
2137
2138 * c-parser.c (c_parser_attribute_any_word): Rename to
2139 c_parser_gnu_attribute_any_word. All callers changed.
2140 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
2141 callers changed.
2142 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
2143 callers changed.
2144 (c_parser_declaration_or_fndef, c_parser_declspecs)
2145 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2146 (c_parser_struct_declaration, c_parser_declarator)
2147 (c_parser_gnu_attribute, c_parser_compound_statement)
2148 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
2149 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
2150 attribute-related syntax productions.
2151
56898e43
RS
21522019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2153
2154 * c-objc-common.c (useful_aka_type_p): Replace with...
2155 (get_aka_type): ...this new function. Given the original type,
2156 decide which aka type to print (if any). Only look through typedefs
2157 if user_facing_original_type_p.
2158 (print_type): Update accordingly.
2159
b9424661
JJ
21602019-10-14 Jakub Jelinek <jakub@redhat.com>
2161
2162 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
2163 into int NESTED, if it is 2, diagnose missing commas in between
2164 clauses.
2165 (c_parser_omp_context_selector): Pass 2 as last argument to
2166 c_parser_omp_all_clauses.
2167
20de9568
JJ
21682019-10-12 Jakub Jelinek <jakub@redhat.com>
2169
2170 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
2171 For simd properties, put them directly into TREE_VALUE.
2172 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
2173 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
2174 add "omp declare variant base" attribute rather than
2175 "omp declare variant".
2176
fe2bc27c
JM
21772019-10-11 Joseph Myers <joseph@codesourcery.com>
2178
2179 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
2180
94e7f906
JJ
21812019-10-10 Jakub Jelinek <jakub@redhat.com>
2182
2183 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
2184 true, terminate processing on closing paren and don't skip to end of
2185 pragma line.
2186 (c_parser_omp_declare_simd): Handle also declare variant.
2187 (omp_construct_selectors, omp_device_selectors,
2188 omp_implementation_selectors, omp_user_selectors): New variables.
2189 (c_parser_omp_context_selector,
2190 c_parser_omp_context_selector_specification,
2191 c_finish_omp_declare_variant): New functions.
2192 (c_finish_omp_declare_simd): Handle both declare simd and
2193 declare variant.
2194 (c_parser_omp_declare): Handle declare variant.
2195
93313b94
JM
21962019-10-02 Joseph Myers <joseph@codesourcery.com>
2197
2198 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
2199 CPP_COLON tokens.
2200
55879815
RS
22012019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2202
2203 * c-objc-common.c (useful_aka_type_p): New function.
2204 (print_type): Use it to decide whether an aka type is worth printing.
2205
59bc434a
JJ
22062019-09-27 Jakub Jelinek <jakub@redhat.com>
2207
2208 PR c++/88203
2209 * c-parser.c (c_parser_predefined_identifier): New function.
2210 (c_parser_postfix_expression): Use it.
2211 (c_parser_omp_variable_list): Parse predefined identifiers.
2212 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
2213 in shared and firstprivate clauses, even when they are predetermined
2214 shared.
2215
c6447c20
RS
22162019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2217
2218 * c-typeck.c (build_function_call_vec): Take the original function
2219 decl as an optional final parameter. Pass all built-in calls to
2220 check_builtin_function_arguments.
2221
522da4c2
EB
22222019-09-20 Eric Botcazou <ebotcazou@adacore.com>
2223
2224 PR c/91815
2225 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
2226 of identifiers in the external scope only for variables and functions.
2227
68e2c199
PK
22282019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2229
2230 PR c/78736
2231 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
2232
22f8849d
IS
22332019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2234
2235 PR pch/61250
2236 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
2237 after determining that the first token is not
2238 PRAGMA_GCC_PCH_PREPROCESS.
2239
db376f45
EB
22402019-08-22 Eric Botcazou <ebotcazou@adacore.com>
2241
2242 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
2243 FUNCTION_DECL to the right value in the presence of nested declarators.
2244
4d732405
RS
22452019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2246
2247 PR middle-end/91421
2248 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
2249
cb1180d5
RS
22502019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2251
2252 PR middle-end/91421
2253 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
2254 of a built_in_function.
2255 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
2256
77eb117f
JJ
22572019-08-10 Jakub Jelinek <jakub@redhat.com>
2258
2259 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
2260 (c_parser_omp_clause_device_type): New function.
2261 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2262 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2263 (c_parser_omp_declare_target): Handle device_type clauses. Remove
2264 diagnostics for declare target with clauses nested in clause-less
2265 declare target declaration-definition-seq.
2266 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2267
2c3b8bad
JJ
22682019-08-09 Jakub Jelinek <jakub@redhat.com>
2269
bb522e2e
JJ
2270 * c-parser.c (check_no_duplicate_clause): Simplify using
2271 omp_find_clause.
2272 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
2273 directive name modifiers.
2274 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2275
2c3b8bad
JJ
2276 PR c/91401
2277 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2278 check_no_duplicate_clause call. Comment it out, instead emit a
2279 warning for duplicate dist_schedule clauses.
2280
99769e7f
RS
22812019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2282
2283 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2284
8860d270
JJ
22852019-08-08 Jakub Jelinek <jakub@redhat.com>
2286
2287 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2288 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2289 instead of generic_head to track duplicates.
2290
398e3feb
JJ
22912019-08-07 Jakub Jelinek <jakub@redhat.com>
2292
2293 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2294 (c_parser_omp_clause_use_device_addr): New function.
2295 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2296 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2297 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2298 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2299 map or use_device_* clauses.
2300 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2301 in OpenMP, require pointer type rather than pointer or array type.
2302 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2303
a28351e7
JJ
23042019-07-31 Jakub Jelinek <jakub@redhat.com>
2305
2306 PR c/91192
2307 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2308 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2309 case.
2310
6343b6bf
ML
23112019-07-25 Martin Liska <mliska@suse.cz>
2312 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2313
2314 PR c++/23383
2315 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2316
cb50701e
ML
23172019-07-25 Martin Liska <mliska@suse.cz>
2318
2319 * c-decl.c (merge_decls): Use new macros
2320 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2321
62e3e66f
RB
23222019-07-23 Richard Biener <rguenther@suse.de>
2323
2324 PR tree-optimization/83518
2325 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2326 a CFG also rebuild cgraph edges.
2327
554a530f
JJ
23282019-07-20 Jakub Jelinek <jakub@redhat.com>
2329
2330 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2331 (c_parser_omp_clause_bind): New function.
2332 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2333 (OMP_LOOP_CLAUSE_MASK): Define.
2334 (c_parser_omp_loop): New function.
2335 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2336 loop combined with parallel or teams.
2337 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2338 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2339
d119bf79
RS
23402019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2341
2342 PR c/53633
2343 * c-decl.c (finish_function): Check targetm.warn_func_return
2344 before issuing a -Wreturn-type warning.
2345
ab20d992 23462019-07-12 Alexandre Oliva <oliva@adacore.com>
fdc1f343
AO
2347
2348 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2349 (c_parser_compound_statement): Call it.
2350
1fdd6f04
JJ
23512019-07-12 Jakub Jelinek <jakub@redhat.com>
2352
2353 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2354 (c_parser_omp_clause_order): New function.
2355 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2356 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2357 PRAGMA_OMP_CLAUSE_ORDER.
2358 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2359
8389386c
RB
23602019-07-10 Richard Biener <rguenther@suse.de>
2361
2362 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2363 _Literal (int *) &x for address literals.
2364
99b1c316
MS
23652019-07-09 Martin Sebor <msebor@redhat.com>
2366
2367 PR c++/61339
2368 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2369 to class.
2370 (field_decl_cmp): Same.
2371 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2372 * c-tree.h: Same.
2373 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2374
6c1dae73
MS
23752019-07-09 Martin Sebor <msebor@redhat.com>
2376
2377 PR c++/61339
2378 * c-decl.c: Change class-key from class to struct and vice versa
2379 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2380 * gimple-parser.c: Same.
2381
69b5279e
RB
23822019-07-01 Richard Biener <rguenther@suse.de>
2383
2384 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2385 _Literal (char *) &"foo" for address literals pointing to
2386 STRING_CSTs.
2387
ab20d992
JJ
23882019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2389
2390 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2391 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2392 C incompatibility if alternate "__intN__" form is used.
2393
1e3d475e
MS
23942019-06-24 Martin Sebor <msebor@redhat.com>
2395
2396 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2397
bf38f7e9
JJ
23982019-06-10 Jakub Jelinek <jakub@redhat.com>
2399
2400 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2401 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2402 (c_parser_omp_scan_loop_body): New function.
2403 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2404 inscan reduction clauses.
2405 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2406 non-inscan reductions on the same construct, or inscan reductions with
2407 ordered or schedule clauses, or inscan array reductions.
2408
65985d78
MS
24092019-06-05 Martin Sebor <msebor@redhat.com>
2410
2411 PR c/90737
2412 * c-typeck.c (c_finish_return): Only consider functions returning
2413 pointers as candidates for -Wreturn-local-addr.
2414
0ecf545c
MS
24152019-06-05 Martin Sebor <msebor@redhat.com>
2416
2417 * c-decl.c (start_decl): Adjust quoting and hyphenation
2418 in diagnostics.
2419 (finish_decl): Same.
2420 (finish_enum): Same.
2421 (start_function): Same.
2422 (declspecs_add_type): Same.
2423 * c-parser.c (warn_for_abs): Same.
2424 * c-typeck.c (build_binary_op): Same.
2425
e03436e7
TS
24262019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2427
b48f44bf
TS
2428 PR c/89433
2429 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2430 marked with an OpenACC 'routine' directive.
2431
5bf04509
TS
2432 PR c/89433
2433 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2434 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2435
e03436e7
TS
2436 PR c/89433
2437 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2438 clauses from "omp declare target" attribute.
2439
a9c697b8
MS
24402019-05-16 Martin Sebor <msebor@redhat.com>
2441
ab20d992
JJ
2442 * c-decl.c (start_decl): Quote keywords, operators, and
2443 types in diagnostics.
2444 (finish_decl): Same.
2445 * c-parser.c (c_parser_asm_statement): Same.
2446 (c_parser_conditional_expression): Same.
2447 (c_parser_transaction_cancel): Same.
2448 * c-typeck.c (c_common_type): Same.
2449 (build_conditional_expr): Same.
2450 (digest_init): Same.
2451 (process_init_element): Same.
2452 (build_binary_op): Same.
a9c697b8 2453
c4499192
RB
24542019-05-17 Richard Biener <rguenther@suse.de>
2455
2456 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2457 (c_parser_gimple_unary_expression): Likewise.
2458 (c_parser_gimple_parentized_ternary_expression): New function.
2459
adfe6e4b
RB
24602019-05-16 Richard Biener <rguenther@suse.de>
2461
2462 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2463 (c_parser_gimple_unary_expression): Likewise.
2464
186dabf2
RB
24652019-05-15 Richard Biener <rguenther@suse.de>
2466
2467 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2468 __BIT_FIELD_REF.
2469
1158c5b4
RB
24702019-05-14 Richard Biener <rguenther@suse.de>
2471
2472 * gimple-parser.c (c_parser_gimple_statement): Remove
2473 questionable auto-promotion to VIEW_CONVERT_EXPR.
2474 (c_parser_gimple_typespec): Split out from __MEM parsing.
2475 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2476 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2477 as __VIEW_CONVERT with -gimple.
2478
fd4485aa
ML
24792019-05-09 Martin Liska <mliska@suse.cz>
2480
2481 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2482 __MAX.
2483 (c_parser_gimple_unary_expression): Parse also binary expression
2484 __MIN and __MAX.
2485 (c_parser_gimple_parentized_binary_expression): New function.
2486
d276406a
ML
24872019-05-09 Martin Liska <mliska@suse.cz>
2488
2489 * gimple-parser.c (struct gimple_parser): Add probability.
2490 for gimple_parser_edge.
2491 (gimple_parser::push_edge): Add new argument probability.
2492 (c_parser_gimple_parse_bb_spec): Parse also probability
2493 if present.
2494 (c_parser_parse_gimple_body): Set edge probability.
2495 (c_parser_gimple_compound_statement): Consume token
2496 before calling c_parser_gimple_goto_stmt.
2497 Parse BB counts.
2498 (c_parser_gimple_statement): Pass new argument.
2499 (c_parser_gimple_goto_stmt): Likewise.
2500 (c_parser_gimple_if_stmt): Likewise.
2501 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2502 * c-parser.c (c_parser_declaration_or_fndef): Pass
2503 hot_bb_threshold argument.
2504 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2505 field.
2506 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2507
f179b64e
JJ
25082019-04-26 Jakub Jelinek <jakub@redhat.com>
2509
2510 PR debug/90197
2511 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2512 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2513 (c_parser_do_statement): Likewise.
2514 (c_parser_for_statement): Likewise. Formatting fixes.
2515 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2516 emit DEBUG_BEGIN_STMTs if needed.
2517
e7178413
JJ
25182019-04-19 Jakub Jelinek <jakub@redhat.com>
2519
c280b7ee
JJ
2520 PR c/89888
2521 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2522 (c_start_case): Don't clear it.
2523 (do_case): Adjust c_add_case_label caller.
2524 (c_finish_case): Adjust c_do_switch_warnings caller.
2525
e7178413
JJ
2526 PR c++/90108
2527 * c-decl.c (merge_decls): If remove is main variant and
2528 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2529 variant that has newdecl as TYPE_NAME if any.
2530
60a2c645
JJ
25312019-04-12 Jakub Jelinek <jakub@redhat.com>
2532
2533 PR c/89933
2534 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2535 don't try to remove it from the variant list, but instead assert
2536 it has no variants.
2537
2a82beaa
RB
25382019-04-01 Richard Biener <rguenther@suse.de>
2539
2540 PR c/71598
2541 * c-tree.h (c_get_alias_set): Declare.
2542 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2543 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2544 as the underlying integer type.
2545
bec1da64
MS
25462019-03-19 Martin Sebor <msebor@redhat.com>
2547
2548 PR tree-optimization/89688
2549 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2550 kinds of initializers.
2551
855cd9b1
JJ
25522019-03-19 Jakub Jelinek <jakub@redhat.com>
2553
2554 PR c/89734
2555 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2556 return type even if quals_used is 0. Formatting fixes.
2557
baa09dc5
RB
25582019-03-14 Richard Biener <rguenther@suse.de>
2559
2560 * c-tree.h (enum c_declspec_il): New.
2561 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2562 enum bitfield.
2563 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2564 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2565 (c_parser_declspecs): Adjust.
2566 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2567 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2568 and bitmap.h.
2569 (struct gimple_parser): New.
2570 (gimple_parser::push_edge): New method.
2571 (c_parser_gimple_parse_bb_spec): New helper.
2572 (c_parser_parse_gimple_body): Get start pass and IL specification.
2573 Initialize SSA and CFG.
2574 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2575 Build a gimple_parser parsing state and pass it along.
2576 (c_parser_gimple_statement): Change intermittend __PHI internal
2577 function argument for the edge.
2578 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2579 (c_parser_gimple_goto_stmt): Record edges to build.
2580 (c_parser_gimple_if_stmt): Likewise.
2581 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2582 (c_parser_gimple_or_rtl_pass_list): Likewise.
2583
a3f9f006
ML
25842019-03-11 Martin Liska <mliska@suse.cz>
2585
2586 * c-decl.c (check_for_loop_decls): Wrap an option name
2587 in a string format message and fix GNU coding style.
2588 * c-parser.c (c_parser_declspecs): Likewise.
2589
1db01ff9
JJ
25902019-03-08 Jakub Jelinek <jakub@redhat.com>
2591
2592 PR tree-optimization/89550
2593 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2594 returned true.
2595 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2596 or warning returned true.
2597
66dcb747
JJ
25982019-02-28 Jakub Jelinek <jakub@redhat.com>
2599
2600 PR c/89525
2601 * c-typeck.c (convert_arguments): Call inform_declaration only if
2602 the previous warning_at call returned true.
2603
2263c9f2
TS
26042019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2605
2606 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2607 parameter. Adjust all users.
2608 (c_parser_oacc_simple_clause): Replace parser with loc formal
2609 parameter. Adjust all users.
2610
ab20d992 26112019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
19695f4d
CLT
2612
2613 PR c/87924
2614 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2615 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2616
5f88ba10
JJ
26172019-02-15 Jakub Jelinek <jakub@redhat.com>
2618
2619 PR c/89340
2620 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2621 before c_decl_attributes rather than after it.
2622
cfc30fd1
JJ
26232019-02-06 Jakub Jelinek <jakub@redhat.com>
2624
2625 PR c/89211
2626 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2627 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2628 instead of 3 nested ifs.
2629
fbe83e6b
JM
26302019-02-06 Joseph Myers <joseph@codesourcery.com>
2631
2632 PR c/88584
2633 * c-decl.c (finish_decl): Do not complete array types for arrays
2634 with external linkage not at file scope.
2635
f461f938
RB
26362019-02-05 Richard Biener <rguenther@suse.de>
2637
2638 PR c/88606
2639 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2640 all type variants when not supported.
2641
fe509359
JJ
26422019-01-30 Jakub Jelinek <jakub@redhat.com>
2643
2644 PR c/89061
2645 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2646 * c-decl.c (decl_jump_unsafe): Return false for
2647 C_DECL_COMPOUND_LITERAL_P decls.
2648 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2649
6a335b96
JJ
26502019-01-29 Jakub Jelinek <jakub@redhat.com>
2651
f4b7e754
JJ
2652 PR c/89045
2653 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2654 scope.
2655
6a335b96
JJ
2656 PR c/86125
2657 * c-decl.c (last_fileptr_type): Remove.
2658 (last_structptr_types): New variable.
2659 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2660 {old,new}rettype instead of the types themselves. Assert
2661 last_structptr_types array has the same number of elements
2662 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2663 argument oldtype and newtype. Instead of handling
2664 just fileptr_type_node specially, handle all builtin_structptr_types
2665 pointer nodes. Formatting fix.
2666
d8b5a1a0
MS
26672019-01-24 Martin Sebor <msebor@redhat.com>
2668
2669 PR c/86125
2670 PR c/88886
2671 PR middle-end/86308
2672 * c-decl.c (match_builtin_function_types): Add arguments.
2673 (diagnose_mismatched_decls): Diagnose mismatched declarations
2674 of built-ins more strictly.
2675
e21c4491
JJ
26762019-01-24 Jakub Jelinek <jakub@redhat.com>
2677
2678 PR c++/88976
2679 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2680 on #pragma omp cancel with different modifiers.
2681
420183d9
L
26822019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2683
2684 PR c/51628
2685 PR c/88664
2686 * c-typeck.c (convert_for_assignment): Upate the
2687 warn_for_address_or_pointer_of_packed_member call.
2688
17ad43dd
TH
26892019-01-16 Tom Honermann <tom@honermann.net>
2690 Jason Merrill <jason@redhat.com>
2691
2692 * c-typeck.c (digest_init): Revised the error message produced for
2693 ill-formed cases of array initialization with a string literal.
2694 (error_init): Make variadic.
2695
5f07d78a
JJ
26962019-01-12 Jakub Jelinek <jakub@redhat.com>
2697
2698 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2699
c4581bbf
JJ
27002019-01-07 Jakub Jelinek <jakub@redhat.com>
2701
2702 PR c/88701
2703 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2704 if current_function_decl is non-NULL.
2705
65c5b1eb
JM
27062019-01-07 Joseph Myers <joseph@codesourcery.com>
2707
2708 PR c/88720
2709 PR c/88726
2710 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2711 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2712 functions declared but never defined only for external scope, not
2713 for other scopes.
2714
d8fcab68
JJ
27152019-01-07 Jakub Jelinek <jakub@redhat.com>
2716
2717 PR c++/85052
2718 * c-parser.c (c_parser_postfix_expression): Parse
2719 __builtin_convertvector.
2720
a5544970
JJ
27212019-01-01 Jakub Jelinek <jakub@redhat.com>
2722
2723 Update copyright years.
2724
da77eace
L
27252018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2726
2727 PR c/51628
2728 * c-typeck.c (convert_for_assignment): Call
2729 warn_for_address_or_pointer_of_packed_member.
2730
1edf8866
SB
27312018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2732
2733 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2734 a more specific error message (instead of just falling through).
2735
db4fd626
SB
27362018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2737
2738 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2739 asm qualifier is first seen; use that to give nicer "duplicate asm
2740 qualifier" messages. Delete 'quals" variable, instead pass the
2741 "is_volatile_ flag to build_asm_stmt directly.
2742 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2743 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2744
9c9cfcbb
SB
27452018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2746
2747 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2748 "done" boolean variable.
2749
a14feb3c
DM
27502018-12-19 David Malcolm <dmalcolm@redhat.com>
2751
2752 PR c++/87504
2753 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2754 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2755 (build_binary_op): Use struct op_location_t and
2756 class binary_op_rich_location.
2757
6d939173
JJ
27582018-12-11 Jakub Jelinek <jakub@redhat.com>
2759
2760 PR sanitizer/88426
2761 * c-convert.c (convert): Call c_fully_fold before calling
2762 ubsan_instrument_float_cast.
2763
b7055028
SB
27642018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2765
2766 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2767 setting "quals".
2768
5b76e75f
SB
27692018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2770
2771 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2772 after asm. Pass a flag for it to build_asm_expr.
2773 * c-tree.h (build_asm_expr): Update declaration.
2774 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2775 set ASM_INLINE_P.
2776
30bd42b9
SB
27772018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2778
2779 PR inline-asm/55681
2780 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2781 combination of volatile and goto, in any order, without repetitions.
2782
9df6c0e4
JB
27832018-12-04 James Norris <jnorris@codesourcery.com>
2784 Cesar Philippidis <cesar@codesourcery.com>
2785 Julian Brown <julian@codesourcery.com>
2786
2787 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2788 code.
2789
f44697b7
RB
27902018-11-30 Richard Biener <rguenther@suse.de>
2791
2792 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2793 _Literal (type) { ... } as empty aggregate or vector constructor.
2794
550dfbdc
MS
27952018-11-29 Martin Sebor <msebor@redhat.com>
2796
2797 PR c/88091
2798 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2799 (convert_arguments): Add comments. Pass additional argument to
2800 the function above.
2801
673670da
MS
28022018-11-29 Martin Sebor <msebor@redhat.com>
2803
2804 PR c/88172
2805 PR testsuite/88208
2806 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2807
db1d09b0
MS
28082018-11-23 Martin Sebor <msebor@redhat.com>
2809
2810 PR testsuite/88098
2811 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2812 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2813
98f08eb8
MS
28142018-11-20 Martin Sebor <msebor@redhat.com>
2815
2816 * c-parser.c (c_parser_has_attribute_expression): New function.
2817 (c_parser_attribute): New function.
2818 (c_parser_attributes): Move code into c_parser_attribute.
2819 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2820
cd5da983
MS
28212018-11-15 Martin Sebor <msebor@redhat.com>
2822
2823 PR c/83656
2824 * c-decl.c (header_for_builtin_fn): Declare.
2825 (diagnose_mismatched_decls): Diagnose declarations of built-in
2826 functions without a prototype.
2827 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2828 (convert_argument): Same.
2829 (convert_arguments): Factor code out into convert_argument.
2830 Detect mismatches between built-in formal arguments in calls
2831 to built-in without prototype.
2832 (build_conditional_expr): Same.
2833 (type_or_builtin_type): New function.
2834 (convert_for_assignment): Add argument. Conditionally issue
2835 warnings instead of errors for mismatches.
2836
620e594b
DM
28372018-11-13 David Malcolm <dmalcolm@redhat.com>
2838
2839 * c-decl.c: Replace "source_location" with "location_t".
2840 * c-tree.h: Likewise.
2841 * c-typeck.c: Likewise.
2842 * gimple-parser.c: Likewise.
2843
3179ebae
JJ
28442018-11-09 Jakub Jelinek <jakub@redhat.com>
2845
81a227c6
JJ
2846 * c-parser.c (c_parser_omp_clause_final): Use
2847 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2848 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2849 parsing instead of c_parser_paren_condition.
2850 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2851 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2852 c_fully_fold instead of c_parser_condition.
2853 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2854 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2855 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2856 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2857 c_parser_expr_no_commas instead of c_parser_expression.
2858
98c91c56
JJ
2859 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2860 reduction clause with inscan modifier.
2861
3179ebae
JJ
2862 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2863 clauses other than atomic_default_mem_order.
2864
28567c40
JJ
28652018-11-08 Jakub Jelinek <jakub@redhat.com>
2866
2867 * c-parser.c: Include memmode.h.
2868 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2869 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2870 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2871 task_reduction clauses.
2872 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2873 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2874 section, or lvalue assignment expression.
2875 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2876 (c_parser_omp_clause_lastprivate): Parse optional
2877 conditional: modifier.
2878 (c_parser_omp_clause_hint): Require constant integer expression rather
2879 than just integer expression.
2880 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2881 clause.
2882 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2883 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2884 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2885 functions.
2886 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2887 iterators. Parse mutexinoutset and depobj kinds.
2888 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2889 callers.
2890 (c_parser_omp_all_clauses): Likewise. Handle
2891 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2892 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2893 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2894 default memory order from requires directive if any. Adjust
2895 c_finish_omp_atomic caller.
2896 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2897 (c_parser_omp_flush): Parse flush with memory-order-clause.
2898 (c_parser_omp_for_loop): Allow NE_EXPR even in
2899 OpenMP loops, adjust c_finish_omp_for caller.
2900 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2901 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2902 Allow to be called while parsing combined parallel master.
2903 Parse combined master taskloop{, simd}.
2904 (c_parser_omp_parallel): Parse combined
2905 parallel master{, taskloop{, simd}} constructs.
2906 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2907 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2908 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2909 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2910 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2911 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2912 around teams body. Use SET_EXPR_LOCATION.
2913 (c_parser_omp_target_data): Allow target data
2914 with only use_device_ptr clauses.
2915 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2916 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2917 (c_parser_omp_requires): New function.
2918 (c_finish_taskloop_clauses): New function.
2919 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2920 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2921 declaration. Disallow in_reduction clause when combined with parallel
2922 master.
2923 (c_parser_omp_construct): Adjust c_parser_omp_master and
2924 c_parser_omp_taskgroup callers.
2925 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2926 other than cancel.
2927 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2928 like OMP_CLAUSE_REDUCTION.
2929 (handle_omp_array_sections): Likewise. Call save_expr on array
2930 reductions before calling build_index_type. Handle depend clauses
2931 with iterators.
2932 (struct c_find_omp_var_s): New type.
2933 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2934 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2935 with static, runtime or auto schedule kinds. Call save_expr for whole
2936 array reduction sizes. Diagnose reductions with zero sized elements
2937 or variable length structures. Diagnose nogroup clause used with
2938 reduction clause(s). Handle depend clause with
2939 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2940 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2941 some different type for other kinds. Use build_unary_op with
2942 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2943 Handle depend clauses with iterators. Remove no longer needed special
2944 case that predetermined const qualified vars may be specified in
2945 firstprivate clause. Complain if const qualified vars are mentioned
2946 in data-sharing clauses other than firstprivate or shared. Use
2947 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2948 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2949 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2950 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2951
7e2de6df
DM
29522018-10-29 David Malcolm <dmalcolm@redhat.com>
2953
2954 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2955 logic for change to name_hint::operator bool.
2956 (undeclared_variable): Likewise.
2957 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2958 (c_parser_parameter_declaration): Likewise.
2959
9f936c86
JM
29602018-10-17 Joseph Myers <joseph@codesourcery.com>
2961
2962 * c-errors.c (pedwarn_c11): New function.
2963 * c-parser.c (disable_extension_diagnostics): Save
2964 warn_c11_c2x_compat and set it to 0.
2965 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2966 (c_parser_static_assert_declaration_no_semi): Handle
2967 _Static_assert without string constant.
2968 * c-tree.h (pedwarn_c11): New prototype.
2969
033eb567
DM
29702018-10-17 David Malcolm <dmalcolm@redhat.com>
2971
2972 * Make-lang.in (selftest-c): New.
2973 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2974 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2975 from gcc/Makefile.in.
2976
0edf3afe
RB
29772018-10-02 Richard Biener <rguenther@suse.de>
2978
2979 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2980
8313a764
JM
29812018-09-26 Joseph Myers <joseph@codesourcery.com>
2982
2983 PR c/87390
2984 * c-typeck.c (build_binary_op): Use excess precision for
2985 comparisons of integers and floating-point for C11 and later.
2986
ce6f0888
MJ
29872018-09-26 Martin Jambor <mjambor@suse.cz>
2988
2989 PR c/87347
2990 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
ab20d992 2991 comment.
ce6f0888 2992
9c4a4b3c
DM
29932018-09-17 David Malcolm <dmalcolm@redhat.com>
2994
2995 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2996 Update for new param.
2997 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2998 Likewise.
2999
80c6d1f4
MJ
30002018-09-17 Martin Jambor <mjambor@suse.cz>
3001
3002 PR c/63886
3003 * c-parser.c: (warn_for_abs): New function.
3004 (c_parser_postfix_expression_after_primary): Call it.
3005
4a426e36
BE
30062018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3007
3008 * c-typeck.c (digest_init): Shorten overlength strings.
3009
6d900107
BE
30102018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3011
3012 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
3013
b5764229
BE
30142018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3015
3016 * c-decl.c (finish_decl): Call braced_list_to_string here ...
3017 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
3018
22eea6b2
AM
30192018-08-30 Alexander Monakov <amonakov@ispras.ru>
3020
3021 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
3022 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
3023
85204e23
DM
30242018-08-27 David Malcolm <dmalcolm@redhat.com>
3025
3026 PR 87091
3027 * c-decl.c (implicitly_declare): Update call to
3028 maybe_add_include_fixit to suggest overriding the location, as it
3029 is for a note.
3030 * c-objc-common.c (c_tree_printer): Update for conversion of
3031 show_caret_p to a tri-state.
3032
3d78e008
ML
30332018-08-27 Martin Liska <mliska@suse.cz>
3034
3035 * c-decl.c (locate_old_decl): Use new function
92a285c1
ML
3036 fndecl_built_in_p and remove check for FUNCTION_DECL if
3037 possible.
3d78e008
ML
3038 (diagnose_mismatched_decls): Likewise.
3039 (merge_decls): Likewise.
3040 (warn_if_shadowing): Likewise.
3041 (pushdecl): Likewise.
3042 (implicitly_declare): Likewise.
3043 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3044 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
3045 * c-typeck.c (build_function_call_vec): Likewise.
3046 (convert_arguments): Likewise.
3047
097f82ec
DM
30482018-08-20 David Malcolm <dmalcolm@redhat.com>
3049
3050 PR other/84889
3051 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
3052 (diagnose_mismatched_decls): Likewise, in various places.
3053 (warn_if_shadowing): Likewise.
3054 (implicit_decl_warning): Likewise.
3055 (implicitly_declare): Likewise.
3056 (undeclared_variable): Likewise.
3057 (declare_label): Likewise.
3058 (grokdeclarator): Likewise.
3059 (start_function): Likewise.
3060 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3061 (c_parser_parameter_declaration): Likewise.
3062 (c_parser_binary_expression): Likewise.
3063 * c-typeck.c (c_expr_sizeof_expr): Likewise.
3064 (parser_build_binary_op): Likewise.
3065 (build_unary_op): Likewise.
3066 (error_init): Likewise.
3067 (pedwarn_init): Likewise.
3068 (warning_init): Likewise.
3069 (convert_for_assignment): Likewise.
3070
96e6ae57
DM
30712018-08-15 David Malcolm <dmalcolm@redhat.com>
3072
3073 * c-objc-common.c: Include "gcc-rich-location.h".
3074 (c_tree_printer): Move implemenation of '%T' to...
3075 (print_type): ...this new function.
3076 (range_label_for_type_mismatch::get_text): New function.
3077 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
3078 range for the various ic_argpass cases.
3079 (class maybe_range_label_for_tree_type_mismatch): New class.
3080 (build_binary_op): Use it when calling binary_op_error.
3081
0cd020ae 30822018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
ab20d992 3083
0cd020ae
PK
3084 * c-decl.c (start_decl): Do not warn if variables is named as main
3085 and is a local variable.
3086
72733314
IS
30872018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3088
3089 PR c/19315
3090 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
3091 objects of unknown size.
3092
23aa9f7c
MS
30932018-08-13 Martin Sebor <msebor@redhat.com>
3094
3095 PR tree-optimization/71625
3096 * c-parser.c (c_parser_declaration_or_fndef): Call
3097 braced_list_to_string.
3098
e5e7e50d
BH
30992018-08-03 Bogdan Harjoc <harjoc@gmail.com>
3100
3101 PR c/86690
3102 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
3103 errors.
3104
8a45b051
MS
31052018-08-01 Martin Sebor <msebor@redhat.com>
3106
3107 PR tree-optimization/86650
3108 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
3109 and TREE_BLOCK (t) from within percent_K_format to this callsite.
3110
5922dcb5
JJ
31112018-08-01 Jakub Jelinek <jakub@redhat.com>
3112
3113 PR c/85704
3114 * c-typeck.c (init_field_decl_cmp): New function.
3115 (output_pending_init_elements): Use it for field comparisons
3116 instead of pure bit_position comparisons.
3117
9b452033
JJ
31182018-07-12 Jakub Jelinek <jakub@redhat.com>
3119
3120 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
3121 type here, instead add "omp declare target implicit" attribute.
3122 (finish_decl): Diagnose vars without mappable type here.
3123
ab20d992
JJ
31242018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3125 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
3126 Cesar Philippidis <cesar@codesourcery.com>
3127
3128 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
3129 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
3130 to their non-present_or_* counterparts. Make 'self' an alias to
3131 PRAGMA_OACC_CLAUSE_HOST.
3132 (c_parser_oacc_data_clause): Update GOMP mappings for
3133 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
3134 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
3135 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
3136 Remove support for present_or_* clauses.
3137 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3138 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
3139 (OACC_DECLARE_CLAUSE_MASK): Likewise.
3140 (OACC_DATA_CLAUSE_MASK): Likewise.
3141 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3142 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
3143 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
3144 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
3145 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
3146
e197e64e
KV
31472018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3148
3149 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
3150 * gimple-parser.c (c_parser_gimple_statement): Likewise.
3151 (c_parser_gimple_unary_expression): Likewise.
3152
487f2f61
JJ
31532018-06-15 Jakub Jelinek <jakub@redhat.com>
3154
3155 PR c/86093
3156 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
3157 before doing POINTER_DIFF_EXPR.
3158
e4d44a37
MP
31592018-06-07 Marek Polacek <polacek@redhat.com>
3160
3161 PR c/85318
3162 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
3163 for loop initial declarations.
3164
b67b9225
DP
31652018-05-30 David Pagan <dave.pagan@oracle.com>
3166
3167 PR c/55976
3168 * c-decl.c (grokdeclarator): Update check for return type warnings.
3169 (start_function): Likewise.
3170 (finish_function): Likewise.
3171 * c-typeck.c (c_finish_return): Update check for return type warnings.
3172 Pass OPT_Wreturn_type to pedwarn when appropriate.
3173
c566cc9f
RS
31742018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
3175
3176 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
3177 __FMA_EXPR handlng.
3178
e4f81565
RS
31792018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
3180
3181 * gimple-parser.c: Include internal-fn.h.
3182 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
3183 (c_parser_gimple_call_internal): New function.
3184 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
3185 Fix typos in comment.
3186
79e7b1fe
JJ
31872018-05-10 Jakub Jelinek <jakub@redhat.com>
3188
3189 PR c++/85662
3190 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
3191 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
3192 fold_convert_loc.
3193 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
3194 fold_offsetof_1, pass argtype as TYPE to it and drop the
3195 fold_convert_loc.
3196
f7584c81
DP
31972018-05-02 David Pagan <dave.pagan@oracle.com>
3198
3199 PR c/30552
3200 * c-decl.c (old_style_parameter_scope): New function.
3201 * c-parser.c (c_parser_postfix_expression): Check for statement
3202 expressions in old-style function parameter list declarations.
3203 * c-parser.h (old_style_parameter_scope): New extern declaration.
3204
b33a0cb3
JJ
32052018-04-25 Jakub Jelinek <jakub@redhat.com>
3206
3207 PR sanitizer/84307
3208 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
3209 it is not TREE_STATIC.
3210 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
3211 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
3212 its COMPOUND_LITERAL_EXPR_DECL.
3213
c5c5822a
JM
32142018-03-21 Joseph Myers <joseph@codesourcery.com>
3215
3216 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
3217 where all functions return the same _FloatN or _FloatNx type,
3218 treat integer types as _Float64 instead of double.
3219
aa1c9429
JJ
32202018-03-21 Jakub Jelinek <jakub@redhat.com>
3221
3222 PR c/84999
3223 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
3224 building vector comparison, diagnose it and return error_mark_node.
3225
9bb45a95
JJ
32262018-03-15 Jakub Jelinek <jakub@redhat.com>
3227
3228 PR c/84853
3229 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
3230 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
3231 INTEGER_TYPE element type.
3232
ada6bad9
DP
32332018-03-13 David Pagan <dave.pagan@oracle.com>
3234
3235 PR c/46921
3236 * c-typeck.c (output_init_element): Ensure field initializer
3237 expression is always evaluated if there are side effects.
3238
849bbdb9
JJ
32392018-03-06 Jakub Jelinek <jakub@redhat.com>
3240
3241 PR c/84721
3242 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
3243 !building_stmt_list_p ().
3244
d74641bd
RS
32452018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
3246
3247 PR c/84305
3248 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
3249 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
3250 and include the BIND_EXPR in the list of things that need to be
3251 pre-evaluated.
3252
0444aa9c
NS
32532018-02-09 Nathan Sidwell <nathan@acm.org>
3254
3255 PR c/84293
3256 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
3257 to strict_aliasing_warning.
3258
7c30b12a
PC
32592018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3260
3261 * c-typeck.c (really_start_incremental_init, push_init_level,
3262 set_nonincremental_init, output_init_element, process_init_element):
3263 Use DECL_UNNAMED_BIT_FIELD.
3264
2be4dfcb
MP
32652018-01-31 Marek Polacek <polacek@redhat.com>
3266
3267 PR c/81779
3268 * c-parser.c (c_parser_compound_statement_nostart): Call
3269 expansion_point_location_if_in_system_header.
3270
bb9869d5
DM
32712018-01-17 David Malcolm <dmalcolm@redhat.com>
3272
3273 PR c++/83814
3274 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3275 the C part.
3276
b4923738
JJ
32772018-01-13 Jakub Jelinek <jakub@redhat.com>
3278
3279 PR c/83801
3280 * c-tree.h (decl_constant_value_1): Add a bool argument.
3281 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3282 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3283 (decl_constant_value): Adjust caller.
3284 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3285 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3286 decl_constant_value returns initializer that has BLKmode or
3287 array type.
3288 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3289
928686b1
RS
32902018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3291 Alan Hayward <alan.hayward@arm.com>
3292 David Sherwood <david.sherwood@arm.com>
3293
3294 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3295 TYPE_VECTOR_SUBPARTS.
3296
85ec4feb
JJ
32972018-01-03 Jakub Jelinek <jakub@redhat.com>
3298
3299 Update copyright years.
3300
913884f7
JJ
33012018-01-01 Jakub Jelinek <jakub@redhat.com>
3302
3303 PR c/83595
3304 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3305 c_parser_conditional_expression, c_parser_cast_expression,
3306 c_parser_sizeof_expression, c_parser_alignof_expression,
3307 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3308 c_parser_transaction_expression): Use set_error () method instead
3309 of setting value member to error_mark_node.
3310
c6cfa2bf
MM
33112017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3312
3313 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3314 and _Float<N>X built-in functions.
3315
11d29d63
JJ
33162017-12-22 Jakub Jelinek <jakub@redhat.com>
3317
14ec014e
JJ
3318 PR debug/83550
3319 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3320 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3321 incomplete vars rather than after it.
3322
11d29d63
JJ
3323 PR debug/83547
3324 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3325 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3326 and consider empty ones if there are no other stmts. For
3327 -Wunused-value walk all statements before the one only followed by
3328 DEBUG_BEGIN_STMTs.
3329
170a8bd6 33302017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3331 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3332
3333 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3334 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3335 (c_parser_do_statement): Likewise.
3336 (c_parser_for_statement): Likewise.
3337 (c_parser_statement_after_labels): Adjust calls to above.
3338 (c_parse_pragma_ivdep): New static function.
3339 (c_parser_pragma_unroll): Likewise.
3340 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3341 <PRAGMA_UNROLL>: New case.
3342
01512446
JJ
33432017-12-19 Jakub Jelinek <jakub@redhat.com>
3344
3345 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3346 perform_integral_promotions, digest_init): Replace Yoda conditions
3347 with typical order conditions.
3348 * c-decl.c (check_bitfield_type_and_width): Likewise.
3349
c65e18d3
BE
33502017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3351
3352 * c-typeck.c (c_safe_arg_type_equiv_p,
3353 c_safe_function_type_cast_p): New function.
3354 (build_c_cast): Implement -Wcast-function-type.
3355
b7280579
RB
33562017-12-14 Richard Biener <rguenther@suse.de>
3357
3358 PR c/83415
3359 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3360 like REALPART_EXPR for the behavior of whether its operand
3361 is an lvalue.
3362
49e6a6c0
MP
33632017-12-12 Marek Polacek <polacek@redhat.com>
3364
3365 PR c/82679
3366 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3367
ab20d992 33682017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3369
3370 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3371 * c-parser.c (add_debug_begin_stmt): New.
3372 (c_parser_declaration_or_fndef): Call it.
3373 (c_parser_compound_statement_nostart): Likewise.
3374 (c_parser_statement_after_labels): Likewise.
3375 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3376
4b2b493f
JM
33772017-12-07 Joseph Myers <joseph@codesourcery.com>
3378
3379 * c-decl.c (build_compound_literal): Add parameter alignas_align
3380 and set alignment of decl if nonzero.
3381 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3382 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3383 qualifier.
3384 (c_parser_struct_declaration): Update syntax comment.
3385 (c_parser_type_name): Add alignas_ok argument and pass it to
3386 c_parser_declspecs.
3387 (c_parser_cast_expression): Pass true to c_parser_type_name and
3388 give error if a cast used an _Alignas specifier.
3389 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3390 give error if sizeof (type-name) used an _Alignas specifier.
3391 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3392 give error if _Alignof (type-name) used an _Alignas specifier.
3393 (c_parser_postfix_expression_after_paren_type): Check specified
3394 alignment for a compound literal and pass it to
3395 build_compound_literal.
3396 * c-parser.h (c_parser_type_name): Update prototype.
3397 * c-tree.h (build_compound_literal): Update prototype.
3398
5d9ae53d
MS
33992017-12-07 Martin Sebor <msebor@redhat.com>
3400
3401 PR c/81544
3402 * c-decl.c (c_decl_attributes): Look up existing declaration and
3403 pass it to decl_attributes.
3404
c79144f8
DM
34052017-12-06 David Malcolm <dmalcolm@redhat.com>
3406
3407 PR c/83236
3408 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3409 reserved for use by the implementation.
3410
613bc14f
DM
34112017-12-06 David Malcolm <dmalcolm@redhat.com>
3412
3413 * c-decl.c: Include "c-family/c-spellcheck.h".
3414
05abad4c
ML
34152017-12-05 Martin Liska <mliska@suse.cz>
3416 Jakub Jelinek <jakub@redhat.com>
3417
3418 * c-typeck.c (pointer_diff): Add new argument and instrument
3419 pointer subtraction.
3420 (build_binary_op): Similar for pointer comparison.
3421
cc6534d4
JJ
34222017-12-01 Jakub Jelinek <jakub@redhat.com>
3423
65791f42
JJ
3424 PR c/79153
3425 * c-parser.c: Include tree-iterator.h.
3426 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3427 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3428 on it.
3429
cc6534d4
JJ
3430 PR c/83222
3431 * c-tree.h (decl_constant_value_1): Declare.
3432 * c-typeck.c (decl_constant_value_1): New function.
3433 (decl_constant_value): Use it.
3434 * c-fold.c (c_fully_fold_internal): If in_init, use
3435 decl_constant_value_1 instead of decl_constant_value.
3436
5de73c05
JJ
34372017-11-30 Jakub Jelinek <jakub@redhat.com>
3438
3439 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3440
058f0b9e
JJ
34412017-11-28 Jakub Jelinek <jakub@redhat.com>
3442
3443 PR sanitizer/81275
3444 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3445 c_switch_covers_all_cases_p returns true.
3446
5e9d6aa4 34472017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3448 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3449
3450 * Make-lang.in (c/c-array-notation.o): Remove.
3451 * c-array-notation.c: Delete.
3452 * c-decl.c: Remove cilkplus condition.
3453 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3454 c_parser_cilk_verify_simd, c_parser_array_notation,
3455 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3456 c_parser_cilk_simd_fn_vector_attrs,
3457 c_finish_cilk_simd_fn_tokens): Delete.
3458 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3459 (c_parser_direct_declarator_inner): Ditto.
3460 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3461 (c_parser_attributes, c_parser_compound_statement,
3462 c_parser_statement_after_labels, c_parser_if_statement,
3463 c_parser_switch_statement, c_parser_while_statement,
3464 c_parser_do_statement, c_parser_for_statement,
3465 c_parser_unary_expression, c_parser_postfix_expression,
3466 c_parser_postfix_expression_after_primary,
3467 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3468 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3469 support.
3470 * c-typeck.c (build_array_ref, build_function_call_vec,
3471 convert_arguments,
3472 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3473 c_finish_loop, build_binary_op): Remove cilkplus support.
3474
9e851845
JJ
34752017-11-28 Jakub Jelinek <jakub@redhat.com>
3476
3477 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3478 of build3.
3479
ab20d992 34802017-11-14 Boris Kolpackov <boris@codesynthesis.com>
8c7dbea9
BK
3481
3482 * Make-lang.in (c.install-plugin): Install backend import library.
3483
41521dee
JJ
34842017-11-23 Jakub Jelinek <jakub@redhat.com>
3485
3486 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3487 pragma_stmt context.
3488
ac9effed
EB
34892017-11-23 Mike Stump <mikestump@comcast.net>
3490 Eric Botcazou <ebotcazou@adacore.com>
3491
3492 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3493 ANNOTATE_EXPR.
3494 (c_parser_do_statement): Likewise.
3495 (c_parser_for_statement): Likewise.
3496
ce95abc4
DM
34972017-11-22 David Malcolm <dmalcolm@redhat.com>
3498
3499 PR c++/62170
3500 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3501 bool to bool *. Within '%T' handling, if showing an "aka", use
3502 "quoted" param to add appropriate quoting.
3503
974aedcc
MP
35042017-11-22 Marek Polacek <polacek@redhat.com>
3505
3506 PR c++/60336
3507 PR middle-end/67239
3508 PR target/68355
3509 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3510
d4300cc6
DM
35112017-11-21 David Malcolm <dmalcolm@redhat.com>
3512
3513 PR c/83056
3514 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3515 earlier failed lookups.
3516
1af4ebf5
MG
35172017-11-21 Marc Glisse <marc.glisse@inria.fr>
3518
3519 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3520 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3521
26edace6
DM
35222017-11-20 David Malcolm <dmalcolm@redhat.com>
3523
3524 PR c/81404
3525 * c-decl.c: Include "c-family/known-headers.h".
3526 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3527 to known-headers.cc.
3528 (class suggest_missing_header): Move to known-header.h.
3529 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3530 than get_c_name_hint.
3531
b1212255
DM
35322017-11-20 David Malcolm <dmalcolm@redhat.com>
3533
3534 * c-decl.c (get_c_name_hint): New function.
3535 (class suggest_missing_header): New class.
3536 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3537 suggest missing headers to the user.
3538
6c7a259b
DM
35392017-11-20 David Malcolm <dmalcolm@redhat.com>
3540
3541 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3542 Include "c-family/name-hint.h"
3543 (implicit_decl_warning): Convert "hint" from
3544 const char * to name_hint. Pass location to
3545 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3546 warning was not printed.
3547 (undeclared_variable): Likewise for "guessed_id".
3548 (lookup_name_fuzzy): Convert return type from const char *
3549 to name_hint. Add location_t param.
3550 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3551 Include "c-family/name-hint.h"
3552 (c_parser_declaration_or_fndef): Convert "hint" from
3553 const char * to name_hint. Pass location to lookup_name_fuzzy.
3554 (c_parser_parameter_declaration): Likewise.
3555
f9c59f7e
JJ
35562017-11-19 Jakub Jelinek <jakub@redhat.com>
3557
3558 PR c/66618
3559 PR c/69960
3560 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3561 where needed.
3562 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3563 handle_omp_array_sections): Likewise.
3564 (digest_init): Don't call decl_constant_value_for_optimization.
3565 * c-tree.h (decl_constant_value_for_optimization): Removed.
3566 * c-fold.c (c_fold_array_ref): New function.
3567 (c_fully_fold_internal): Add LVAL argument, propagate it through
3568 recursive calls. For VAR_P call decl_constant_value and
3569 unshare if not LVAL and either optimizing or IN_INIT. Remove
3570 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3571 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3572 (c_fully_fold): Add LVAL argument, pass it through to
3573 c_fully_fold_internal.
3574 (decl_constant_value_for_optimization): Removed.
3575
3ca0dc60
JM
35762017-11-15 Joseph Myers <joseph@codesourcery.com>
3577
3578 PR c/81156
3579 * c-parser.c (check_tgmath_function): New function.
3580 (enum tgmath_parm_kind): New enum.
3581 (c_parser_postfix_expression): Handle __builtin_tgmath.
3582
64a5912c
DM
35832017-10-31 David Malcolm <dmalcolm@redhat.com>
3584
3585 * c-decl.c (implicit_decl_warning): Update for renaming of
3586 pedwarn_at_rich_loc and warning_at_rich_loc.
3587 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3588 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3589 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3590 (c_parser_struct_or_union_specifier): Likewise for renaming of
3591 pedwarn_at_rich_loc.
3592 (c_parser_parameter_declaration): Likewise for renaming of
3593 error_at_rich_loc.
3594 * c-typeck.c (build_component_ref): Likewise.
3595 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3596 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3597 (set_init_label): Likewise for renaming of error_at_rich_loc.
3598
c1136864
RB
35992017-10-30 Richard Biener <rguenther@suse.de>
3600
3601 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3602 stmts.
3603
ee5fd23a
MM
36042017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3605
3606 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3607 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3608
1a59ccf2
DM
36092017-10-25 David Malcolm <dmalcolm@redhat.com>
3610
3611 PR c/7356
3612 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3613 semicolons.
3614
bc1a75dd
JJ
36152017-10-25 Jakub Jelinek <jakub@redhat.com>
3616
3617 PR libstdc++/81706
3618 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3619 newdecl to corresponding __builtin_ if any.
3620
ff1ff960
PC
36212017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3622
3623 PR c++/82466
3624 * c-decl.c (diagnose_mismatched_decls): Use
3625 OPT_Wbuiltin_declaration_mismatch.
3626
62e1c678
DM
36272017-10-12 David Malcolm <dmalcolm@redhat.com>
3628
3629 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3630 use it to guard calls to maybe_suggest_missing_token_insertion.
3631 (c_parser_parms_list_declarator): Override default value of new
3632 "type_is_unique" param to c_parser_require.
3633 (c_parser_asm_statement): Likewise.
3634 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3635 defaulting to true.
3636
a92f6726
NS
36372017-10-11 Nathan Sidwell <nathan@acm.org>
3638
3639 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3640
8e6cdc90
RS
36412017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3642
3643 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3644 operating on trees as wide_ints.
3645 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3646 (c_tree_equal): Likewise.
3647
8139a48e
DM
36482017-10-04 David Malcolm <dmalcolm@redhat.com>
3649
3650 * c-decl.c (push_parm_decl): Store c_parm's location into the
3651 PARAM_DECL.
3652 (build_c_parm): Add "loc" param and store it within the c_parm.
3653 * c-parser.c (struct c_parser): Add "last_token_location" field.
3654 (c_parser_consume_token): Store location of the token into the
3655 new field.
3656 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3657 when handling a FUNCTION_DECL, if it doesn't already have them.
3658 (c_parser_parameter_declaration): Generate a location for the
3659 parameter, and pass it to the call to build_c_parm.
3660 * c-tree.h (struct c_parm): Add field "loc".
3661 (build_c_parm): Add location_t param.
3662 * c-typeck.c (get_fndecl_argument_location): New function.
3663 (inform_for_arg): New function.
3664 (convert_for_assignment): Use inform_for_arg when dealing with
3665 ic_argpass.
3666
2a389958
JJ
36672017-09-29 Jakub Jelinek <jakub@redhat.com>
3668
7d386d45
JJ
3669 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3670 width is non-NULL.
3671 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3672 don't SET_DECL_C_BIT_FIELD here.
3673
2a389958
JJ
3674 PR c/82340
3675 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3676 instead of trying to set just TREE_READONLY manually.
3677
ebc6a85e
TV
36782017-09-16 Tom de Vries <tom@codesourcery.com>
3679
3680 PR c/81875
3681 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3682 cond itself.
3683
bb75facd
JM
36842017-09-15 Joseph Myers <joseph@codesourcery.com>
3685
3686 PR c/82071
3687 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3688 for C11.
3689 (build_conditional_expr): For C11, generate result with excess
3690 precision when one argument is an integer and the other is of a
3691 type using excess precision.
3692
1d933576
BE
36932017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3694
3695 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3696
267bbb6f
MP
36972017-09-13 Marek Polacek <polacek@redhat.com>
3698
3699 PR c/82167
3700 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3701 than expr.original_type.
3702
6836632e
NS
37032017-09-12 Nathan Sidwell <nathan@acm.org>
3704
3705 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3706 resort_sorted_fields): Moved from c-family/c-common.c.
3707 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3708
e035be33
JM
37092017-09-01 Joseph Myers <joseph@codesourcery.com>
3710
3711 PR c/82071
3712 * c-typeck.c (build_atomic_assign): Handle argument with excess
3713 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3714 argument passed to build_binary_op and convert_for_assignment but
3715 not for call to c_fully_fold.
3716 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3717 Ensure build_binary_op is called with argument with original
3718 semantic type. Avoid calling c_fully_fold with an
3719 EXCESS_PRECISION_EXPR from build_binary_op.
3720
d2e05fcb
JJ
37212017-09-01 Jakub Jelinek <jakub@redhat.com>
3722
3723 PR c/81887
3724 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3725
b397965c
RS
37262017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3727 Alan Hayward <alan.hayward@arm.com>
3728 David Sherwood <david.sherwood@arm.com>
3729
3730 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3731 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3732 m1 and m2 to the signed equivalent of a fixed-point
3733 SCALAR_TYPE_MODE.
3734
14e18d71
DM
37352017-08-24 David Malcolm <dmalcolm@redhat.com>
3736
3737 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3738 than CAN_HAVE_LOCATION_P when determining whether to use the
3739 location_t value within "value".
3740
7f204c0f
DM
37412017-08-21 David Malcolm <dmalcolm@redhat.com>
3742
3743 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3744 rather than peeking the location of the first token.
3745 * c-tree.h (c_expr::get_location): New method.
3746
2f687306
DM
37472017-08-21 David Malcolm <dmalcolm@redhat.com>
3748
3749 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3750 to check_function_arguments.
3751
3e7b80d7
MP
37522017-08-18 Marek Polacek <polacek@redhat.com>
3753
3754 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3755 commentary.
3756
00aa1fa2
L
37572017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3758
3759 PR c/53037
3760 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3761 (check_bitfield_type_and_width): Don't allow bit-field with
3762 warn_if_not_aligned type.
3763
da67acb9
MS
37642017-08-14 Martin Sebor <msebor@redhat.com>
3765
3766 PR c/81117
3767 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3768
bb85aa74
MP
37692017-08-11 Marek Polacek <polacek@redhat.com>
3770
3771 PR c/81795
3772 * c-decl.c (pushtag): Only print inform if the warning was printed.
3773 (grokdeclarator): Likewise.
3774
32129a17
DM
37752017-08-10 David Malcolm <dmalcolm@redhat.com>
3776
3777 * c-parser.c (c_parser_error): Rename to...
3778 (c_parser_error_richloc): ...this, making static, and adding
3779 "richloc" parameter, passing it to the c_parse_error call,
3780 rather than calling c_parser_set_source_position_from_token.
3781 (c_parser_error): Reintroduce, reimplementing in terms of the
3782 above, converting return type from void to bool.
3783 (class token_pair): New class.
3784 (struct matching_paren_traits): New struct.
3785 (matching_parens): New typedef.
3786 (struct matching_brace_traits): New struct.
3787 (matching_braces): New typedef.
3788 (get_matching_symbol): New function.
3789 (c_parser_require): Add param MATCHING_LOCATION, using it to
3790 highlight matching "opening" tokens for missing "closing" tokens.
3791 (c_parser_skip_until_found): Likewise.
3792 (c_parser_static_assert_declaration_no_semi): Convert explicit
3793 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3794 class matching_parens, so that the pertinent open parenthesis is
3795 highlighted when there are problems locating the close
3796 parenthesis.
3797 (c_parser_struct_or_union_specifier): Likewise.
3798 (c_parser_typeof_specifier): Likewise.
3799 (c_parser_alignas_specifier): Likewise.
3800 (c_parser_simple_asm_expr): Likewise.
3801 (c_parser_braced_init): Likewise, for matching_braces.
3802 (c_parser_paren_condition): Likewise, for matching_parens.
3803 (c_parser_switch_statement): Likewise.
3804 (c_parser_for_statement): Likewise.
3805 (c_parser_asm_statement): Likewise.
3806 (c_parser_asm_operands): Likewise.
3807 (c_parser_cast_expression): Likewise.
3808 (c_parser_sizeof_expression): Likewise.
3809 (c_parser_alignof_expression): Likewise.
3810 (c_parser_generic_selection): Likewise.
3811 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3812 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3813 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3814 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3815 c_parser_skip_until_found call.
3816 (c_parser_objc_class_definition): Use class matching_parens as
3817 above.
3818 (c_parser_objc_method_decl): Likewise.
3819 (c_parser_objc_try_catch_finally_statement): Likewise.
3820 (c_parser_objc_synchronized_statement): Likewise.
3821 (c_parser_objc_at_property_declaration): Likewise.
3822 (c_parser_oacc_wait_list): Likewise.
3823 (c_parser_omp_var_list_parens): Likewise.
3824 (c_parser_omp_clause_collapse): Likewise.
3825 (c_parser_omp_clause_default): Likewise.
3826 (c_parser_omp_clause_if): Likewise.
3827 (c_parser_omp_clause_num_threads): Likewise.
3828 (c_parser_omp_clause_num_tasks): Likewise.
3829 (c_parser_omp_clause_grainsize): Likewise.
3830 (c_parser_omp_clause_priority): Likewise.
3831 (c_parser_omp_clause_hint): Likewise.
3832 (c_parser_omp_clause_defaultmap): Likewise.
3833 (c_parser_oacc_single_int_clause): Likewise.
3834 (c_parser_omp_clause_ordered): Likewise.
3835 (c_parser_omp_clause_reduction): Likewise.
3836 (c_parser_omp_clause_schedule): Likewise.
3837 (c_parser_omp_clause_num_teams): Likewise.
3838 (c_parser_omp_clause_thread_limit): Likewise.
3839 (c_parser_omp_clause_aligned): Likewise.
3840 (c_parser_omp_clause_linear): Likewise.
3841 (c_parser_omp_clause_safelen): Likewise.
3842 (c_parser_omp_clause_simdlen): Likewise.
3843 (c_parser_omp_clause_depend): Likewise.
3844 (c_parser_omp_clause_map): Likewise.
3845 (c_parser_omp_clause_device): Likewise.
3846 (c_parser_omp_clause_dist_schedule): Likewise.
3847 (c_parser_omp_clause_proc_bind): Likewise.
3848 (c_parser_omp_clause_uniform): Likewise.
3849 (c_parser_omp_for_loop): Likewise.
3850 (c_parser_cilk_clause_vectorlength): Likewise.
3851 (c_parser_cilk_clause_linear): Likewise.
3852 (c_parser_transaction_expression): Likewise.
3853 * c-parser.h (c_parser_require): Add param matching_location with
3854 default UNKNOWN_LOCATION.
3855 (c_parser_error): Convert return type from void to bool.
3856 (c_parser_skip_until_found): Add param matching_location with
3857 default UNKNOWN_LOCATION.
3858
30af3a2b
MP
38592017-08-09 Marek Polacek <polacek@redhat.com>
3860
3861 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3862 * c-tree.h (build_external_ref): Update declaration.
3863 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3864 (build_external_ref): Change the type of a parameter to bool.
3865 (parser_build_binary_op): Use true/false instead of 1/0.
3866 (pointer_diff): Likewise.
3867 (build_modify_expr): Likewise.
3868 (set_designator): Change the type of a parameter to bool.
3869 (set_init_index): Use true/false instead of 1/0.
3870 (set_init_label): Likewise.
3871 (output_init_element): Change the type of a parameter to bool.
3872 (output_pending_init_elements): Use true/false instead of 1/0.
3873 (process_init_element): Likewise.
3874 (build_binary_op): Change the type of a parameter to bool.
3875
296c53ac
MP
38762017-08-09 Marek Polacek <polacek@redhat.com>
3877
3878 PR c/81233
3879 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3880 Call emit_diagnostic_valist instead of pedwarn.
3881 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3882 Print the relevant types in diagnostics.
3883
a32c8316
MP
38842017-08-09 Marek Polacek <polacek@redhat.com>
3885
3886 PR c/81417
3887 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
ab20d992 3888 build_conditional_expr.
a32c8316
MP
3889 * c-parser.c (c_parser_conditional_expression): Create locations for
3890 EXP1 and EXP2 from their source ranges. Pass the locations down to
3891 build_conditional_expr.
3892 * c-tree.h (build_conditional_expr): Update declaration.
3893 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3894 For -Wsign-compare, also print the types.
3895
314e6352
ML
38962017-08-08 Martin Liska <mliska@suse.cz>
3897
3898 * c-convert.c: Include header files.
3899 * c-typeck.c: Likewise.
3900
577eec56
ML
39012017-08-07 Martin Liska <mliska@suse.cz>
3902
3903 * c-parser.c (c_parser_attributes): Canonicalize name of an
3904 attribute.
3905
f7b6353a
MP
39062017-08-02 Marek Polacek <polacek@redhat.com>
3907
3908 PR c/81289
3909 * c-parser.c (c_parser_unary_expression): Use set_error.
3910
8a6eab34
MP
3911 PR c/81448
3912 PR c/81306
3913 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3914 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3915
ab20d992 39162017-07-31 Jan Hubicka <hubicka@ucw.cz>
7fef86d3
JH
3917 Martin Liska <mliska@suse.cz>
3918
3919 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 3920 statement.
7fef86d3 3921
f34ebeb2
ML
39222017-07-31 Martin Liska <mliska@suse.cz>
3923
3924 PR sanitize/81530
3925 * c-convert.c (convert): Guard condition with flag_sanitize_p
3926 also with current_function_decl non-null equality.
3927 * c-decl.c (grokdeclarator): Likewise.
3928 * c-typeck.c (build_binary_op): Likewise.
3929
8595f67b
MP
39302017-07-25 Marek Polacek <polacek@redhat.com>
3931
3932 * c-decl.c (grokfield): Remove local variable.
3933
d49718d6
MP
39342017-07-25 Marek Polacek <polacek@redhat.com>
3935
3936 PR c/81364
3937 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3938 macro expansion if the body is in { }.
3939 (c_parser_while_statement): Likewise.
3940 (c_parser_for_statement): Likewise.
3941
ff22eb12
NS
39422017-07-18 Nathan Sidwell <nathan@acm.org>
3943
3944 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3945
eea77d1f
DM
39462017-07-14 David Malcolm <dmalcolm@redhat.com>
3947
3948 * c-decl.c (implicitly_declare): When suggesting a missing
3949 #include, provide a fix-it hint.
3950
b6f43128
DM
39512017-07-06 David Malcolm <dmalcolm@redhat.com>
3952
3953 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3954 and call that instead.
3955 * c-tree.h (selftest::run_c_tests): New decl.
3956
3e2becc4
MP
39572017-06-26 Marek Polacek <polacek@redhat.com>
3958
3959 PR c/80116
3960 * c-parser.c (c_parser_if_body): Set the location of the
3961 body of the conditional after parsing all the labels. Call
3962 warn_for_multistatement_macros.
3963 (c_parser_else_body): Likewise.
3964 (c_parser_switch_statement): Likewise.
3965 (c_parser_while_statement): Likewise.
3966 (c_parser_for_statement): Likewise.
3967 (c_parser_statement): Add a default argument. Save the location
3968 after labels have been parsed.
3969 (c_parser_c99_block_statement): Likewise.
3970
343ae898
RB
39712017-06-19 Richard Biener <rguenther@suse.de>
3972
3973 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3974 negated _Literals to parse _Literal (int) -1.
3975
45b2222a
ML
39762017-06-13 Martin Liska <mliska@suse.cz>
3977
3978 PR sanitize/78204
3979 * c-convert.c (convert): Use sanitize_flags_p.
3980 * c-decl.c (grokdeclarator): Likewise.
3981 * c-typeck.c (convert_for_assignment): Likewise.
3982 (c_finish_return): Likewise.
3983 (build_binary_op): Likewise.
3984
8ab7005b
JJ
39852017-06-08 Jakub Jelinek <jakub@redhat.com>
3986
3987 PR c/81006
3988 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3989 to sizetype before size_binop.
3990
363dc72c
JJ
39912017-06-07 Jakub Jelinek <jakub@redhat.com>
3992
3993 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3994 of TDI_generic.
3995
dc949728
MP
39962017-06-06 Marek Polacek <polacek@redhat.com>
3997
3998 PR c/79983
3999 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
4000 ref.
4001 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
4002
40ffd95f
BE
40032017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4004
4005 * c-parser.c (c_parser_binary_expression): Implement the
4006 -Wsizeof_pointer_div warning.
4007 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
4008 from a parenthesized expression.
4009 (c_parser_expr_list): Use c_last_sizeof_loc.
4010 * c-tree.h (c_last_sizeof_loc): New external.
4011 * c-typeck.c (c_last_sizeof_loc): New variable.
4012 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
4013
9fc5e7a4
MM
40142017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
4015
4016 PR testsuite/80580
4017 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
4018
f012c8ef
DM
40192017-05-30 David Malcolm <dmalcolm@redhat.com>
4020
4021 * c-objc-common.c (c_tree_printer): Gain bool and const char **
4022 parameters.
4023
3cd211af
MS
40242017-05-24 Martin Sebor <msebor@redhat.com>
4025
4026 PR c/80731
4027 * c-fold.c (c_fully_fold_internal): Adjust.
4028 * c-typeck.c (parser_build_unary_op): Adjust.
4029
fd71a9a2
TS
40302017-05-23 Thomas Schwinge <thomas@codesourcery.com>
4031
4032 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
4033 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
4034 "VECTOR_LENGTH".
4035
92fa0f9e
MP
40362017-05-23 Marek Polacek <polacek@redhat.com>
4037
4038 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
4039 quotes.
4040
d11c168a
JJ
40412017-05-22 Jakub Jelinek <jakub@redhat.com>
4042
4043 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
4044 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
4045 it returned invariant. Call tree_invariant_p unconditionally
4046 afterwards to decide whether to return expr or op0.
4047
58aca9d9
NS
40482017-05-22 Nathan Sidwell <nathan@acm.org>
4049
4050 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
4051
7fd549d2
TS
40522017-05-19 Thomas Schwinge <thomas@codesourcery.com>
4053
4054 * c-parser.c (c_parser_omp_clause_default): Handle
4055 "OMP_CLAUSE_DEFAULT_PRESENT".
4056
6ecd2339
BE
40572017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4058
4059 * config-lang.in (gtfiles): Add c-family/c-format.c.
4060
8a57ecff
NS
40612017-05-18 Nathan Sidwell <nathan@acm.org>
4062
4063 * c-decl.c (pushdecl_top_level): Delete unused function.
4064
6574d78e
MP
40652017-05-18 Marek Polacek <polacek@redhat.com>
4066
4067 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
4068 (check_earlier_gotos): Likewise.
4069 (define_label): Likewise.
4070 (pending_xref_error): Likewise.
4071 (smallest_type_quals_location): Likewise.
4072 (grokdeclarator): Likewise.
4073 (grokparms): Likewise.
4074 (identifier_global_value): Likewise.
4075 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
4076 (find_init_member): Likewise.
4077
e3455240
MP
40782017-05-18 Marek Polacek <polacek@redhat.com>
4079
4080 * c-decl.c (start_decl): Use false/true instead of 0/1.
4081 (grokdeclarator): Likewise.
4082 (finish_struct): Likewise.
4083 (start_function): Change the return type to bool. Use false/true
4084 instead of 0/1.
4085 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
4086 * c-tree.h (start_function): Update.
4087 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
4088 (set_designator): Change the return type to bool. Use false/true
4089 instead of 0/1.
4090
3fa8871b
MP
40912017-05-17 Marek Polacek <polacek@redhat.com>
4092
4093 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
4094 * c-typeck.c: Likewise.
4095
142473df
MP
40962017-05-17 Marek Polacek <polacek@redhat.com>
4097
4098 PR sanitizer/80659
4099 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
4100 DECL_IGNORED_P even for non-static compound literals.
4101
1a817418
ML
41022017-05-17 Martin Liska <mliska@suse.cz>
4103
4104 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
4105 use it instead of int type.
4106
b2fa0a8b
MP
41072017-05-17 Marek Polacek <polacek@redhat.com>
4108
4109 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
4110 call c_fully_fold.
4111 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
ab20d992 4112 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
b2fa0a8b
MP
4113 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
4114 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
4115 save_expr.
4116 (c_parser_conditional_expression): Likewise.
4117 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
4118 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
4119 (process_init_element): Likewise.
4120 (build_binary_op): Likewise.
4121 (handle_omp_array_sections_1): Likewise.
4122
1e47f02b
TS
41232017-05-12 Thomas Schwinge <thomas@codesourcery.com>
4124
4125 * c-parser.c (c_parser_omp_clause_num_gangs)
4126 (c_parser_omp_clause_num_workers)
4127 (c_parser_omp_clause_vector_length): Merge functions into...
4128 (c_parser_oacc_single_int_clause): ... this new function. Adjust
4129 all users.
4130
c24e924f
NS
41312017-05-11 Nathan Sidwell <nathan@acm.org>
4132
4133 * gimple-parser.c: Don't #include tree-dump.h.
4134
c587104e
MM
41352017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4136
4137 PR testsuite/80580
4138 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
4139
67ac9a9d
MM
41402017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4141
4142 PR testsuite/80580
4143 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4144 incorrect __MEM syntax.
4145
ac4eb40f
MM
41462017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4147
4148 PR testsuite/80580
4149 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
4150 type of unary '*'.
4151
641da50a
NS
41522017-05-09 Nathan Sidwell <nathan@acm.org>
4153
4154 * c-tree.h (pushdecl): Declare.
4155
56d35585
DM
41562017-05-05 David Malcolm <dmalcolm@redhat.com>
4157
4158 * c-decl.c (warn_defaults_to): Replace report_diagnostic
4159 with diagnostic_report_diagnostic.
4160 * c-errors.c (pedwarn_c99): Likewise.
4161 (pedwarn_c90): Likewise.
4162
815d9cc6
XR
41632017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4164
92a285c1 4165 PR c++/80038
815d9cc6
XR
4166 * c-gimplify.c (c_gimplify_expr): Remove calls to
4167 cilk_gimplifY_call_params_in_spawned_fn.
4168
1c4ea66f
DM
41692017-04-25 David Malcolm <dmalcolm@redhat.com>
4170
4171 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
4172 hint for removing extra semicolon.
4173
666f7903
JJ
41742017-04-21 Jakub Jelinek <jakub@redhat.com>
4175
4176 PR c/80468
4177 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
4178 enabled, set specs->type to integer_type_node.
4179
5764ee3c
JW
41802017-04-03 Jonathan Wakely <jwakely@redhat.com>
4181
4182 * c-array-notation.c: Fix typo in comment.
4183
10fa8dfb
MP
41842017-03-29 Marek Polacek <polacek@redhat.com>
4185
4186 PR c/79730
4187 * c-decl.c (finish_decl): Check VAR_P.
4188
a9e4a1a5
JJ
41892017-03-27 Jakub Jelinek <jakub@redhat.com>
4190
4191 PR middle-end/80162
4192 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
4193 * c-typeck.c (c_mark_addressable): Likewise. Look through
4194 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
4195 to ARRAY_TYPE.
4196 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
4197
ee3ff394
MP
41982017-03-23 Marek Polacek <polacek@redhat.com>
4199
4200 * c-tree.h: Remove a C_RID_YYCODE reference.
4201
4d1b8e70
JJ
42022017-03-21 Jakub Jelinek <jakub@redhat.com>
4203
4204 PR c/80097
4205 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
4206 optional COMPOUND_EXPR with ubsan instrumentation.
4207
31dc71a8
MP
42082017-03-17 Marek Polacek <polacek@redhat.com>
4209
4210 * c-parser.c: Add C11 references.
4211
d579c385
MP
42122017-03-15 Marek Polacek <polacek@redhat.com>
4213
4214 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
4215
85059a38
MP
42162017-03-11 Marek Polacek <polacek@redhat.com>
4217
4218 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
4219
2f6f187a
DM
42202017-03-10 David Malcolm <dmalcolm@redhat.com>
4221
4222 PR translation/79848
4223 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
4224 "%qs".
4225 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
4226
36618428
MP
42272017-03-09 Marek Polacek <polacek@redhat.com>
4228
4229 PR sanitizer/79757
4230 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
4231 parameter declarations with initializers.
4232
01e5af5a
JJ
42332017-03-09 Jakub Jelinek <jakub@redhat.com>
4234
4235 PR c/79969
4236 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
4237 TYPE_STUB_DECL.
4238
a71dbc63
JJ
42392017-03-07 Jakub Jelinek <jakub@redhat.com>
4240
4241 PR c/79834
4242 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
4243 for "may only be used in compound statements" diagnostics, change it
4244 such that the same translatable string is used for all pragmas. For
4245 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
4246 diagnostics.
4247 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
4248 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
4249 "may only be used in compound statements" diagnostics, such that the
4250 same translatable string is used for all pragmas.
4251
1ff4bae6
MP
42522017-03-04 Marek Polacek <polacek@redhat.com>
4253
4254 PR c/79847
4255 * c-decl.c (implicit_decl_warning): Add missing space.
4256
7f5a7d78
MP
42572017-03-03 Marek Polacek <polacek@redhat.com>
4258
4259 PR c/79758
4260 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
4261 current_function_prototype_arg_types is error_mark_node. Fix
4262 formatting. Use TREE_VALUE instead of TREE_TYPE.
4263
883c8f06
JJ
42642017-03-03 Jakub Jelinek <jakub@redhat.com>
4265
79c9b7a8
JJ
4266 PR c/79837
4267 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
4268 %<min%> or %<max%> in the diagnostics, instead mention identifier.
4269 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
4270 diagnostics.
4271
883c8f06
JJ
4272 PR c/79836
4273 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
4274 instead of %<_Generic>.
4275 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4276 (c_parser_omp_target_exit_data): Use %<release%> instead of
4277 %<release>.
4278
324ff1a0
JJ
42792017-02-28 Jakub Jelinek <jakub@redhat.com>
4280
4281 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4282 instead of just cond ? "..." : "...".
4283 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4284 for "enter"/"exit" keyword.
4285 (c_finish_oacc_routine): Don't use %s to supply portions of the
4286 message.
4287
4227c9ad
JJ
42882017-02-24 Jakub Jelinek <jakub@redhat.com>
4289
4290 PR c++/79588
4291 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4292 handle -Wrestrict here.
4293 * c-typeck.c (build_function_call_vec): Adjust
4294 check_function_arguments caller.
4295
5d972e66
RB
42962017-02-23 Richard Biener <rguenther@suse.de>
4297
4298 PR c/79684
4299 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4300 to initialize c_exprs to return.
4301 (c_parser_gimple_binary_expression): Likewise.
4302 (c_parser_gimple_unary_expression): Likewise.
4303 (c_parser_gimple_postfix_expression): Likewise.
4304
61ac5ebe
MP
43052017-02-22 Marek Polacek <polacek@redhat.com>
4306
4307 PR c/79662
4308 * c-typeck.c (convert_arguments): Handle error_mark_node.
4309
41d1b0b1
PK
43102017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4311
4312 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4313 value of c_parser_parse_ssa_name against error_mark_node and emit
4314 error if ssa name is anonymous and written as default definition.
4315
eab1f169
PK
43162017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4317
4318 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4319 FMA_EXPR.
4320
bcac0b4d
JJ
43212017-02-16 Jakub Jelinek <jakub@redhat.com>
4322
4323 PR c++/79512
4324 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4325 ignore #pragma omp target even when not followed by identifier.
4326
1be33173
PK
43272017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4328
4329 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4330 (c_parser_gimple_unary_expression): Likewise.
4331
aa326bfb
JJ
43322017-02-13 Jakub Jelinek <jakub@redhat.com>
4333
4334 * c-parser.c (c_parser_oacc_declare): Add missing space in
4335 diagnostics.
4336
8a398bc5
PK
43372017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4338
4339 PR c/79478
4340 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4341 set_c_expr_source_range when parsing ssa-name.
4342
3dcde5ef 43432017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
ab20d992 4344 Richard Biener <rguenther@suse.de>
3dcde5ef
PG
4345
4346 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4347 building IL when arguments are error_mark_node.
4348 (c_parser_gimple_unary_expression): Likewise.
4349 (c_parser_gimple_if_stmt): Likewise.
4350 (c_parser_gimple_switch_stmt): Likewise.
4351 (c_parser_gimple_return_stmt): Likewise.
4352 (c_parser_parse_ssa_name): When name lookup fails do not build
4353 an SSA name. Use undeclared rather than not declared in error
4354 reporting.
4355
192b048b
MP
43562017-02-09 Marek Polacek <polacek@redhat.com>
4357
4358 PR c/79428
4359 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4360 instead of c_parser_skip_until_found.
4361
56f71478
JJ
43622017-02-09 Jakub Jelinek <jakub@redhat.com>
4363
4364 PR c/79431
4365 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4366 symtab_node::get on automatic variables.
4367
02889d23
CLT
43682016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4369 Chung-Lin Tang <cltang@codesourcery.com>
4370
4371 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4372 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4373 semantic checking.
4374 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4375
7af4b20d
RB
43762017-02-07 Richard Biener <rguenther@suse.de>
4377
4378 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4379 (c_parser_gimple_postfix_expression_after_primary):
4380 Do not use c_build_function_call_vec to avoid folding and promotion.
4381 Simplify.
4382
e5e391d6
MO
43832017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4384
4385 PR lto/79061
4386 * c-decl.c (pop_scope): Pass main_input_filename to
4387 build_translation_unit_decl.
4388
c2e84327
DM
43892017-01-24 David Malcolm <dmalcolm@redhat.com>
4390
4391 * c-parser.c: Include "read-rtl-function.h" and
4392 "run-rtl-passes.h".
4393 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4394 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4395 production. Update for renaming of field "gimple_pass" to
4396 "gimple_or_rtl_pass". If __RTL was seen, call
4397 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4398 to an auto_timevar, to cope with early exit.
4399 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4400 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4401 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4402 Handle RID_RTL.
4403 (c_parser_parse_rtl_body): New function.
4404 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4405 (struct c_declspecs): Rename field "gimple_pass" to
4406 "gimple_or_rtl_pass". Add field "rtl_p".
4407 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4408 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4409 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4410 (c_parser_gimple_or_rtl_pass_list): ...this.
4411
2ebd93e1
MP
44122017-01-20 Marek Polacek <polacek@redhat.com>
4413
4414 PR c/64279
4415 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4416
b1c95bb5
RB
44172017-01-13 Richard Biener <rguenther@suse.de>
4418
4419 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4420 nops.
4421
25329913
RB
44222017-01-13 Richard Biener <rguenther@suse.de>
4423
4424 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4425 _Literal ( type-name ) number.
4426
6bb4ea5c
RB
44272017-01-12 Richard Biener <rguenther@suse.de>
4428
4429 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4430 __MEM.
4431
6b5b4e9c
JJ
44322017-01-11 Jakub Jelinek <jakub@redhat.com>
4433
4434 PR c++/72813
4435 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4436 PCH file.
4437
e3252775
RB
44382017-01-11 Richard Biener <rguenther@suse.de>
4439
4440 PR bootstrap/79052
4441 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4442 returns on parse errors.
4443
a9342885
MP
44442017-01-04 Marek Polacek <polacek@redhat.com>
4445
4446 PR c++/64767
4447 * c-parser.c (c_parser_postfix_expression): Mark zero character
4448 constants by setting original_type in c_expr.
4449 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4450 with a zero character constant.
4451 (char_type_p): New function.
4452
5dd9a9d0
DM
44532017-01-04 David Malcolm <dmalcolm@redhat.com>
4454
4455 * c-parser.c (c_parser_declaration_or_fndef): Create a
4456 rich_location at init_loc and parse it to start_init.
4457 (last_init_list_comma): New global.
4458 (c_parser_braced_init): Update last_init_list_comma when parsing
4459 commas. Pass it to pop_init_level. Pass location of closing
4460 brace to pop_init_level.
4461 (c_parser_postfix_expression_after_paren_type): Create a
4462 rich_location at type_loc and parse it to start_init.
4463 (c_parser_omp_declare_reduction): Likewise for loc.
4464 * c-tree.h (start_init): Add rich_location * param.
4465 (pop_init_level): Add location_t param.
4466 * c-typeck.c (struct initializer_stack): Add field
4467 "missing_brace_richloc".
4468 (start_init): Add richloc param, use it to initialize
4469 the stack node's missing_brace_richloc.
4470 (last_init_list_comma): New decl.
4471 (finish_implicit_inits): Pass last_init_list_comma to
4472 pop_init_level.
4473 (push_init_level): When finding missing open braces, add fix-it
4474 hints to the richloc.
4475 (pop_init_level): Add "insert_before" param and pass it
4476 when calling pop_init_level. Add fixits about missing
4477 close braces to any richloc. Use the richloc for the
4478 -Wmissing-braces warning.
4479 (set_designator): Pass last_init_list_comma to pop_init_level.
4480 (process_init_element): Likewise.
4481
cbe34bb5
JJ
44822017-01-01 Jakub Jelinek <jakub@redhat.com>
4483
4484 Update copyright years.
4485
d17680f3
JJ
44862016-12-21 Jakub Jelinek <jakub@redhat.com>
4487
0dba7960
JJ
4488 PR bootstrap/78817
4489 * c-typeck.c (build_function_call_vec): If check_function_arguments
4490 returns true, set TREE_NO_WARNING on CALL_EXPR.
4491
d17680f3
JJ
4492 PR c/77767
4493 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4494 to *expr instead of overwriting it.
4495
aa90531e
RB
44962016-12-20 Richard Biener <rguenther@suse.de>
4497
4498 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4499 error recovery.
4500 (c_parser_gimple_statement): Only build assigns for non-error
4501 stmts.
4502 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4503
629b3d75
MJ
45042016-12-14 Martin Jambor <mjambor@suse.cz>
4505
4506 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4507 omp-low.h.
4508 (c_finish_oacc_routine): Adjusted call to
4509 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4510 to use their new names.
4511 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4512 use its new name.
4513 (c_parser_oacc_update): Likewise.
4514 (c_parser_omp_simd): Likewise.
4515 (c_parser_omp_target_update): Likewise.
4516 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4517 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4518 name.
4519 (c_finish_omp_cancellation_point): Likewise.
4520 * gimple-parser.c: Do not include omp-low.h
4521
c5af52eb
CP
45222016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4523 James Norris <jnorris@codesourcery.com>
4524
4525 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4526 EXIT_DATA,WAIT} are not used in compound statements.
4527 (c_parser_oacc_enter_exit_data): Update diagnostics.
4528
48330c93
BE
45292016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4530
4531 PR c++/71973
4532 * c-decl.c (diagnose_mismatched_decls): Use
4533 OPT_Wbuiltin_declaration_mismatch here too.
4534
899ca90e 45352016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
4536 Alan Hayward <alan.hayward@arm.com>
4537 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
4538
4539 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4540 (make_label, finish_struct): Likewise.
4541
1ee62b92 45422016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 4543 Richard Biener <rguenther@suse.de>
22b15758 4544
8e745a17
JJ
4545 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4546 * config-lang.in (gtfiles): Add c/c-parser.h.
4547 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4548 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4549 * c-parser.c (enum c_id_kind, struct c_token,
4550 c_parser_next_token_is, c_parser_next_token_is_not,
4551 c_parser_next_token_is_keyword,
4552 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4553 Split out to ...
4554 * c-parser.h: ... new header.
4555 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 4556 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
4557 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4558 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4559 c_parser_error, c_parser_require, c_parser_skip_until_found,
4560 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4561 c_parser_type_name): Export.
4562 (c_parser_tokens_buf): New function.
4563 (c_parser_error): Likewise.
4564 (c_parser_set_error): Likewise.
4565 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
4566 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4567 via c_parser_parse_gimple_body.
8e745a17
JJ
4568 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4569 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4570 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4571 c_parser_error, c_parser_require, c_parser_skip_until_found,
4572 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4573 c_parser_type_name): Declare.
1ee62b92
PG
4574 (struct c_parser): Declare forward.
4575 (c_parser_tokens_buf): Declare.
8e745a17
JJ
4576 (c_parser_error): Likewise.
4577 (c_parser_set_error): Likewise.
4578 * gimple-parser.c: New file.
4579 * gimple-parser.h: Likewise.
1ee62b92 4580
22b15758
UB
45812016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4582
4583 PR c/35503
4584 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4585 warn_for_restrict.
4586
84ff4775
LCW
45872016-09-11 Le-Chun Wu <lcwu@google.com>
4588 Mark Wielaard <mjw@redhat.com>
4589
4590 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4591 to the given -Wshadow= variant.
4592
4d0cdd0c
TP
45932016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4594
4595 * c-typeck.c: Include memmodel.h.
4596
1202f33e
JJ
45972016-10-13 Jakub Jelinek <jakub@redhat.com>
4598
4599 PR target/77957
4600 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4601 instead of lhd_return_null_tree_v.
4602
8a14afd0
BS
46032016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4604
4605 PR c++/69733
4606 * c-decl.c (smallest_type_quals_location): New static function.
4607 (grokdeclarator): Try to find the correct location for an ignored
4608 qualifier.
4609
81fea426
MP
46102016-09-26 Marek Polacek <polacek@redhat.com>
4611
4612 PR c/7652
4613 * c-decl.c (pop_scope): Add gcc_fallthrough.
4614
46152016-09-26 Marek Polacek <polacek@redhat.com>
4616
4617 PR c/7652
4618 * c-parser.c (struct c_token): Add flags field.
4619 (c_lex_one_token): Pass it to c_lex_with_flags.
4620 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4621 into IFN_FALLTHROUGH.
4622 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4623 attribute fallthrough after a case label or default label.
4624 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4625
9a2300e9
MP
46262016-09-24 Marek Polacek <polacek@redhat.com>
4627
4628 PR c/77490
4629 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4630 have boolean value. Warn about ++/-- on booleans.
4631
7de76362
JJ
46322016-09-23 Jakub Jelinek <jakub@redhat.com>
4633
4634 * c-parser.c (incomplete_record_decls): Remove unnecessary
4635 = vNULL initialization of file scope vec.
4636
5b73d2ab
MP
46372016-09-16 Marek Polacek <polacek@redhat.com>
4638
4639 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4640
e51fbec3
MP
46412016-09-14 Marek Polacek <polacek@redhat.com>
4642
4643 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4644 (fix_array_notation_expr): Likewise.
4645 * c-decl.c (finish_decl): Likewise.
4646 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4647 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4648 (function_to_pointer_conversion): Use false instead of 0.
4649 (convert_lvalue_to_rvalue): Likewise.
4650 (parser_build_unary_op): Likewise.
4651 (build_atomic_assign): Likewise.
4652 (build_unary_op): Change nonconvert parameter type to bool, use
4653 true/false instead of 1/0.
4654 (build_binary_op): Use true instead of 1.
4655
254830ba
DM
46562016-09-13 David Malcolm <dmalcolm@redhat.com>
4657
4658 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4659 of add_fixit_insert to add_fixit_insert_before.
4660
4c13ba17
MP
46612016-09-13 Marek Polacek <polacek@redhat.com>
4662
4663 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4664 it.
4665
54dcdb88
BE
46662016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4667
4668 PR c++/77496
4669 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4670 COMPOUND_EXPR to warn_for_omitted_condop.
4671
e5106e27
DM
46722016-09-07 David Malcolm <dmalcolm@redhat.com>
4673
4674 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4675 c_get_substring_location for this new langhook.
4676
9dc5773f
JJ
46772016-09-02 Jakub Jelinek <jakub@redhat.com>
4678
4679 PR c/65467
4680 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4681 flag_openmp.
4682 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4683 instead of mark_exp_read on low_bound/length expression.
4684 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4685 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4686 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4687 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4688 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4689 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4690 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4691 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4692 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4693 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4694 instead of mark_expr_read.
4695 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4696 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4697 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4698 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4699 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4700 array section bases outside of depend clause, for depend clause
4701 use convert_lvalue_to_rvalue on the base.
4702 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4703 linear, aligned, map, to and from clauses.
4704 (c_omp_clause_copy_ctor): New function.
4705
295844f6
MP
47062016-09-01 Marek Polacek <polacek@redhat.com>
4707
4708 PR c/7652
4709 * c-typeck.c (composite_type): Add FALLTHRU comment.
4710
089af25c
DM
47112016-08-31 David Malcolm <dmalcolm@redhat.com>
4712
4713 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4714 to the insertion fixits for "struct", "union", and "enum".
4715
f9087798
DM
47162016-08-30 David Malcolm <dmalcolm@redhat.com>
4717
4718 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4719 rather than add_fixit_misspelled_id.
4720 (undeclared_variable): Likewise.
4721 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4722 now-redundant "here" params from add_fixit_insert method calls.
4723 (c_parser_parameter_declaration): Likewise.
4724 * c-typeck.c (build_component_ref): Remove now-redundant range
4725 param from add_fixit_replace method calls.
4726
ebef225f
MP
47272016-08-25 Marek Polacek <polacek@redhat.com>
4728
4729 * c-typeck.c (parser_build_binary_op): Pass LHS to
4730 warn_logical_not_parentheses.
4731
fe377a48
MP
47322016-08-25 Marek Polacek <polacek@redhat.com>
4733
4734 PR c/77323
4735 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4736 or _FloatN or _FloatNx is not supported.
4737 (finish_declspecs): Set type to integer_type_node when _FloatN or
4738 _FloatNx is not supported.
4739
c65699ef
JM
47402016-08-19 Joseph Myers <joseph@codesourcery.com>
4741
4742 PR c/32187
4743 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4744 (struct c_declspecs): Add field floatn_nx_idx.
4745 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4746 and _FloatNx type specifiers.
4747 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4748 (c_parser_declspecs, c_parser_attribute_any_word)
4749 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4750 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4751 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4752 narrower than double.
4753
2f1364c2
JJ
47542016-08-12 Jakub Jelinek <jakub@redhat.com>
4755 Martin Liska <mliska@suse.cz>
4756
4757 PR c/67410
4758 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4759 % to determine val element to change. Assert that
4760 wchar_bytes * charwidth fits into val array.
4761
191816a3
MP
47622016-08-12 Marek Polacek <polacek@redhat.com>
4763
4764 PR c/7652
4765 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4766 (c_parser_postfix_expression): Likewise.
4767 * c-typeck.c (build_unary_op): Adjust fall through comment.
4768 (c_mark_addressable): Likewise.
4769
b95a64bb
JJ
47702016-08-11 Jakub Jelinek <jakub@redhat.com>
4771
4772 PR c/72816
4773 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4774 array member through typedef, for orig_qual_indirect == 0 clear
4775 orig_qual_type.
4776
895aa8e1
DM
47772016-08-08 David Malcolm <dmalcolm@redhat.com>
4778
4779 PR c/64955
4780 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4781 this up to selftest::run_c_tests.
4782 (selftest::run_c_tests): New function.
4783
0b212d8c
TS
47842016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4785
ae9281fc
TS
4786 * c-parser.c (struct oacc_routine_data): Add error_seen and
4787 fndecl_seen members.
4788 (c_finish_oacc_routine): Use these.
4789 (c_parser_declaration_or_fndef): Adjust.
4790 (c_parser_oacc_routine): Likewise. Support more C language
4791 constructs, and improve diagnostics. Move pragma context
4792 checking...
4793 (c_parser_pragma): ... here.
4794
0b212d8c
TS
4795 * c-parser.c (struct oacc_routine_data): New.
4796 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4797 Simplify code.
4798 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4799 declare target" attribute.
4800
76e2c821
JB
48012016-08-01 Jan Beulich <jbeulich@suse.com>
4802
4803 * c-fold.c (c_fully_fold_internal): Also emit shift count
4804 warnings for vector types.
4805 * c-typeck.c (build_binary_op): Likewise.
4806
f618a472
MP
48072016-07-29 Marek Polacek <polacek@redhat.com>
4808
4809 PR c/71742
4810 * c-decl.c (finish_struct): Rephrase an error message.
4811
efd0786f
MP
4812 PR c/71853
4813 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4814 to error node for invalid code.
4815
e00dceaf
MP
4816 PR c/71573
4817 * c-decl.c (implicitly_declare): Return decl early not only for
4818 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4819
673a107a
JJ
48202016-07-29 Jakub Jelinek <jakub@redhat.com>
4821
4822 PR c/71969
4823 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4824 on GNU extern inline functions.
4825
a5b5c8b6
MP
48262016-07-29 Marek Polacek <polacek@redhat.com>
4827
4828 PR c/71583
4829 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4830 check expr.value.
4831
e3fe09c1
UB
48322016-07-22 Uros Bizjak <ubizjak@gmail.com>
4833
4834 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4835
7c8f7eaa
DM
48362016-07-20 David Malcolm <dmalcolm@redhat.com>
4837
4838 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4839 spellcheck-tree.h
4840 (best_macro_match): Likewise, converting from a typedef to a
4841 subclass.
4842 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4843 (lookup_name_fuzzy): Update for change of best_macro_match to a
4844 subclass with a ctor that calls cpp_forall_identifiers.
4845
de6a69ee
DM
48462016-07-20 David Malcolm <dmalcolm@redhat.com>
4847
4848 * c-decl.c (implicit_decl_warning): Update for conversion of
4849 return type of lookup_name_fuzzy to const char *.
4850 (undeclared_variable): Likewise.
4851 (lookup_name_fuzzy): Convert return type from tree to
4852 const char *.
4853 * c-parser.c (c_parser_declaration_or_fndef): Update for
4854 conversion of return type of lookup_name_fuzzy to const char *.
4855 (c_parser_parameter_declaration): Likewise.
4856
b1c9c068
CP
48572016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4858
4859 * c-parser.c (c_parser_oacc_declare): Don't scan for
4860 GOMP_MAP_POINTER.
4861 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4862 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4863 zero-length subarrays.
4864
ddbbcb19
JJ
48652016-07-15 Jakub Jelinek <jakub@redhat.com>
4866
4867 PR c/71858
4868 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4869 instead of FUZZY_LOOKUP_NAME.
4870 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4871 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4872
dd36b877
JJ
48732016-07-14 Jakub Jelinek <jakub@redhat.com>
4874
4875 PR c/71858
4876 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4877
8c681247
TS
48782016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4879
4880 * c-parser.c (c_parser_generic_selection): Make type of variable
4881 auto_vec.
4882 (c_parser_omp_declare_simd): Likewise.
4883
bf4fa671
TS
48842016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4885
4886 * c-decl.c (struct c_struct_parse_info): Change member types
4887 from vec to auto_vec.
4888 (start_struct): Adjust.
4889 (finish_struct): Likewise.
4890
557e8c49
JJ
48912016-07-02 Jakub Jelinek <jakub@redhat.com>
4892
4893 PR c/71719
4894 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4895
54d19c3b
TS
48962016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4897
4898 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4899 Move pragma context checking into...
4900 (c_parser_omp_cancellation_point): ... here, and improve
4901 diagnostic messages.
4902 * c-typeck.c (c_finish_omp_cancel)
4903 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4904
152ef731
JJ
49052016-06-29 Jakub Jelinek <jakub@redhat.com>
4906
4907 PR c/71685
4908 * c-typeck.c (c_build_qualified_type): Don't clear
4909 C_TYPE_INCOMPLETE_VARS for the main variant.
4910
49112016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
4912
4913 PR c/71552
4914 * c-typeck.c (output_init_element): Diagnose incompatible types
4915 before non-constant initializers.
4916
e9ac1f86
JJ
49172016-06-28 Jakub Jelinek <jakub@redhat.com>
4918
4919 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4920
277d7ee0
AK
49212016-06-23 Andi Kleen <ak@linux.intel.com>
4922
4923 * Make-lang.in: Add support for autofdo.
4924
1a4f11c8
DM
49252016-06-22 David Malcolm <dmalcolm@redhat.com>
4926
4927 PR c/70339
4928 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4929 (implicit_decl_warning): When issuing warnings for implicit
4930 declarations, attempt to provide a suggestion via
4931 lookup_name_fuzzy.
4932 (undeclared_variable): Likewise when issuing errors.
4933 (lookup_name_in_scope): Likewise.
4934 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4935 (best_macro_match): New typedef.
4936 (find_closest_macro_cpp_cb): New function.
4937 (lookup_name_fuzzy): New function.
4938 * c-parser.c: Include gcc-rich-location.h.
4939 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4940 (c_keyword_starts_typename): ...this new function.
4941 (c_parser_declaration_or_fndef): When issuing errors about
4942 missing "struct" etc, add a fixit. For other kinds of errors,
4943 attempt to provide a suggestion via lookup_name_fuzzy.
4944 (c_parser_parms_declarator): When looking ahead to detect typos in
4945 type names, also reject CPP_KEYWORD.
4946 (c_parser_parameter_declaration): When issuing errors about
4947 unknown type names, attempt to provide a suggestion via
4948 lookup_name_fuzzy.
4949 * c-tree.h (c_keyword_starts_typename): New prototype.
4950
5a578671
JM
49512016-06-20 Joseph Myers <joseph@codesourcery.com>
4952
4953 PR c/71601
4954 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4955 c_common_type returns error_mark_node.
4956
3f8257db 49572016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
4958
4959 PR c/69507
4960 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4961 __alignof__ (expression).
4962
6a3f203c
DM
49632016-06-14 David Malcolm <dmalcolm@redhat.com>
4964
4965 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4966
264757fb
DM
49672016-06-14 David Malcolm <dmalcolm@redhat.com>
4968
4969 * c-typeck.c (build_component_ref): Simplify fixit code by
4970 using gcc_rich_location::add_fixit_misspelled_id.
4971 (set_init_label): Likewise.
4972
f7e4f2e3
DM
49732016-06-13 David Malcolm <dmalcolm@redhat.com>
4974
4975 * c-parser.c (c_parser_initelt): Provide location of name for new
4976 location_t param of set_init_label.
4977 * c-tree.h (set_init_label): Add location_t param.
4978 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4979 param and use it when issuing error messages about unrecognized
4980 field names. Attempt to provide a fixit hint if appropriate,
4981 otherwise update the error message to provide the type name.
4982
4b1ffdb1
TS
49832016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4984
4985 PR c/71381
4986 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4987 Loosen checking.
4988
44a845ca
MS
49892016-06-08 Martin Sebor <msebor@redhat.com>
4990 Jakub Jelinek <jakub@redhat.com>
4991
4992 PR c++/70507
4993 PR c/68120
4994 * c-typeck.c (convert_arguments): Don't promote last argument
4995 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4996
92a5f2ba
MP
49972016-06-08 Marek Polacek <polacek@redhat.com>
4998
4999 PR c/71418
5000 * c-decl.c (grokdeclarator): Check TYPE_P.
5001
08203f73
MP
5002 PR c/71426
5003 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
5004 code.
5005
6ffd47b7
DM
50062016-06-07 David Malcolm <dmalcolm@redhat.com>
5007
5008 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
5009 and structure element reference, capture the location of the
5010 element name token and pass it to build_component_ref.
5011 (c_parser_postfix_expression_after_primary): Likewise for
5012 structure element dereference.
5013 (c_parser_omp_variable_list): Likewise for
5014 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
5015 * c-tree.h (build_component_ref): Add location_t param.
5016 * c-typeck.c (build_component_ref): Add location_t param
5017 COMPONENT_LOC. Use it, if available, when issuing hints about
5018 mispelled member names to provide a fixit replacement hint.
5019
1f40cff3
MP
50202016-06-06 Marek Polacek <polacek@redhat.com>
5021
5022 PR c/71362
5023 * c-parser.c (c_parser_direct_declarator): Set location.
5024
5545a907
MP
50252016-06-06 Marek Polacek <polacek@redhat.com>
5026
5027 * c-typeck.c (comptypes_internal): Handle comparisons of
5028 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
5029 TYPE_REF_CAN_ALIAS_ALL.
5030
b605f663
CLT
50312016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
5032
5033 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
5034 arguments as addressable when async clause exists.
5035
00631022
JJ
50362016-05-30 Jakub Jelinek <jakub@redhat.com>
5037
5038 PR c++/71349
5039 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
5040 when combined with target construct.
5041
7211a097
JJ
50422016-05-26 Jakub Jelinek <jakub@redhat.com>
5043
5044 * c-parser.c (c_parser_omp_clause_schedule): Warn if
5045 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
5046
95efe6b6
MP
50472016-05-25 Marek Polacek <polacek@redhat.com>
5048
5049 PR c/71265
5050 * c-decl.c (c_make_fname_decl): Don't check seen_error.
5051
a23faf7a
MP
5052 PR c/71266
5053 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
5054
e46c7770
CP
50552016-05-24 Cesar Philippidis <cesar@codesourcery.com>
5056
5057 * c-parser.c (c_parser_oacc_declare): Add support for
5058 GOMP_MAP_FIRSTPRIVATE_POINTER.
5059 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
5060 argument with enum c_omp_region_type ort.
5061 (handle_omp_array_sections): Likewise. Update call to
5062 handle_omp_array_sections_1.
5063 (c_finish_omp_clauses): Add specific errors and warning messages for
5064 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
5065 call to handle_omp_array_sections.
5066
a04e69c0
TS
50672016-05-24 Thomas Schwinge <thomas@codesourcery.com>
5068
5069 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
5070
f17a223d
RB
50712016-05-24 Richard Biener <rguenther@suse.de>
5072
5073 PR middle-end/70434
5074 PR c/69504
5075 * c-typeck.c (build_array_ref): Do not complain about indexing
5076 non-lvalue vectors. Adjust for function name change.
5077
79063edd
MS
50782016-05-20 Martin Sebor <msebor@redhat.com>
5079
5080 PR c/71115
5081 * c-typeck.c (error_init): Use
5082 expansion_point_location_if_in_system_header.
5083 (warning_init): Same.
5084
8a40fef3
DM
50852016-05-19 David Malcolm <dmalcolm@redhat.com>
5086
5087 PR c/71171
5088 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
5089 in error-handling.
5090 (c_parser_postfix_expression): Likewise.
5091 * c-tree.h (c_expr::set_error): New method.
5092 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
5093 that result's range is initialized.
5094
e9892350
JG
50952016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
5096
5097 * c-typeck.c (parser_build_unary_op): Fix formatting.
5098
8fad45f5
MW
50992016-05-16 Matthew Wahab <matthew.wahab@arm.com>
5100
5101 * c-decl.c (grokdeclarator): Remove errmsg and use of
5102 targetm.invalid_return_type.
5103 (grokparms): Remove errmsg and use of
5104 targetm.invalid_parameter_type.
5105
aa4b467b
JM
51062016-05-13 Joseph Myers <joseph@codesourcery.com>
5107
5108 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
5109 function return type.
5110
4f2e1536
MP
51112016-05-12 Marek Polacek <polacek@redhat.com>
5112
5113 PR c/70756
5114 * c-decl.c (build_compound_literal): Pass LOC down to
5115 c_incomplete_type_error.
5116 * c-tree.h (require_complete_type): Adjust declaration.
5117 (c_incomplete_type_error): Likewise.
5118 * c-typeck.c (require_complete_type): Add location parameter, pass it
5119 down to c_incomplete_type_error.
5120 (c_incomplete_type_error): Add location parameter, pass it down to
5121 error_at.
5122 (build_component_ref): Pass location down to c_incomplete_type_error.
5123 (default_conversion): Pass location down to require_complete_type.
5124 (build_array_ref): Likewise.
5125 (build_function_call_vec): Likewise.
5126 (convert_arguments): Likewise.
5127 (build_unary_op): Likewise.
5128 (build_c_cast): Likewise.
5129 (build_modify_expr): Likewise.
5130 (convert_for_assignment): Likewise.
5131 (c_finish_omp_clauses): Likewise.
5132
d6e83a8d
MM
51332016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5134
5135 PR c/43651
5136 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
5137 is enabled.
5138 * c-errors.c (pedwarn_c90): Return true if warned.
5139 * c-tree.h (pedwarn_c90): Change return type to bool.
5140 (enum c_declspec_word): Add new enumerator cdw_atomic.
5141
5c3a10fb
MP
51422016-05-11 Marek Polacek <polacek@redhat.com>
5143
5144 PR c++/71024
5145 * c-decl.c (diagnose_mismatched_decls): Factor out code to
5146 diagnose_mismatched_attributes and call it.
5147
cf68d92c
MP
51482016-05-10 Marek Polacek <polacek@redhat.com>
5149
5150 PR c/70255
5151 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
5152 on a declaration following the definition.
5153
351f85c5
JJ
51542016-05-05 Jakub Jelinek <jakub@redhat.com>
5155
5156 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
5157 parse it through to c_parser_c99_block_statement.
5158 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
5159 caller.
5160
deef7113
MP
51612016-05-04 Marek Polacek <polacek@redhat.com>
5162
5163 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
5164 OPT_Wdangling_else.
5165
de55efd5
MP
51662016-05-04 Marek Polacek <polacek@redhat.com>
5167
5168 PR c/48778
5169 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
5170 for macro expansions.
5171
79ce98bc
MP
51722016-05-03 Marek Polacek <polacek@redhat.com>
5173
5174 PR c/70859
5175 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
5176 check_builtin_function_arguments.
5177
fb2647aa
RB
51782016-05-03 Richard Biener <rguenther@suse.de>
5179
5180 * Make-lang.in (cc1-checksum.c): For stage-final re-use
5181 the checksum from the previous stage.
5182
77886428
CP
51832016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5184
5185 * c-parser.c (c_parser_oacc_all_clauses): Update call to
5186 c_finish_omp_clauses.
5187 (c_parser_omp_all_clauses): Likewise.
5188 (c_parser_oacc_cache): Likewise.
5189 (c_parser_oacc_loop): Likewise.
5190 (omp_split_clauses): Likewise.
5191 (c_parser_omp_declare_target): Likewise.
5192 (c_parser_cilk_all_clauses): Likewise.
5193 (c_parser_cilk_for): Likewise.
5194 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
5195 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
5196
7176a4a0
MP
51972016-05-02 Marek Polacek <polacek@redhat.com>
5198
5199 PR c/70851
5200 * c-decl.c (grokdeclarator): Diagnose when array's size has an
5201 incomplete type.
5202
e7ff0319
CP
52032016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5204
5205 PR middle-end/70626
5206 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
5207 OACC_LOOP_CLAUSE_MASK.
5208 (c_parser_oacc_kernels_parallel): Update call to
5209 c_oacc_split_loop_clauses.
5210
9f405ce1
AM
52112016-04-28 Andrew MacLeod <amacleod@redhat.com>
5212
5213 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
5214 argument to build_modify_expr in two cases.
5215
c1e1f433
BS
52162016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5217
5218 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5219 warn_for_memset instead of warning directly here.
5220
2448a956
MP
52212016-04-26 Marek Polacek <polacek@redhat.com>
5222
5223 PR c/67784
5224 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
5225 out of ...
5226 (c_parser_for_statement): ... here.
5227 (c_parser_if_statement): Use it.
5228 (c_parser_switch_statement): Use it.
5229 (c_parser_while_statement): Use it.
5230
b02a5e26
MP
5231 PR c/70791
5232 * c-decl.c (pushdecl): Pass LOCUS down to warning.
5233
477d4906
IV
52342016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5235
5236 PR c++/69363
5237 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
5238 instead of c_finish_cilk_clauses.
5239 * c-tree.h (c_finish_omp_clauses): Add new default argument.
5240 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
5241 floating-point variables in the linear clause for Cilk Plus.
5242
fe37c7af
MM
52432016-04-18 Michael Matz <matz@suse.de>
5244
5245 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
5246 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
5247
949505a9
MP
52482016-04-15 Marek Polacek <polacek@redhat.com>
5249
5250 PR c/70671
5251 * c-typeck.c (build_unary_op): Pass location down to error and
5252 warning call.
5253
dda1bf61
JJ
52542016-04-15 Jakub Jelinek <jakub@redhat.com>
5255
5256 PR c/70436
5257 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
5258 where needed.
5259 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
5260 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
5261 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
5262 Adjust c_parser_pragma callers.
5263 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
5264 caller.
5265 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
5266 c_parser_statement.
5267 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
5268 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
5269 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
5270 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
5271 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
5272 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
5273 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
5274 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5275 down where needed.
5276 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5277 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5278 calls.
5279
99cd9857
MP
52802016-04-13 Marek Polacek <polacek@redhat.com>
5281
5282 PR c/70436
5283 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5284 adjust callers.
5285 (c_parser_statement): Likewise.
5286 (c_parser_c99_block_statement): Likewise.
5287 (c_parser_while_statement): Likewise.
5288 (c_parser_for_statement): Likewise.
5289 (c_parser_if_body): Don't set IF_P here.
5290 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5291 about dangling else here.
5292 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5293 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5294 warn about dangling else here.
5295
f13355da
MP
52962016-04-04 Marek Polacek <polacek@redhat.com>
5297
5298 PR c/70307
5299 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5300
5fde6a45
MP
53012016-03-31 Marek Polacek <polacek@redhat.com>
5302
5303 PR c/70297
5304 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5305
4bbf545b
DM
53062016-03-18 David Malcolm <dmalcolm@redhat.com>
5307
5308 PR c/70281
5309 * c-parser.c (c_parser_postfix_expression): Set the source range
5310 for uses of "__builtin_types_compatible_p".
5311
fcc2b74f
JJ
53122016-03-17 Jakub Jelinek <jakub@redhat.com>
5313
5314 PR c/70280
5315 * c-typeck.c (composite_type): Don't count void_list_node
5316 into len, if the list is terminated by void_list_node, start
5317 with void_list_node instead of NULL for newargs. Stop
5318 at void_list_node.
5319
ab4c578f
MP
53202016-03-16 Marek Polacek <polacek@redhat.com>
5321
5322 PR c/70093
5323 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5324 nested functions returning VM types.
5325
96b3c82d
CP
53262016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5327
5328 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5329 when calling c_finish_omp_clauses.
5330
29b9828f
BS
53312016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5332
5333 PR c/69824
5334 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5335 for later.
5336
7ff6ca38
MP
53372016-03-04 Marek Polacek <polacek@redhat.com>
5338
5339 PR c/69798
5340 * c-parser.c (c_parser_postfix_expression): Call
5341 c_parser_cast_expression rather than c_parser_postfix_expression.
5342
686e2237
JJ
53432016-03-01 Jakub Jelinek <jakub@redhat.com>
5344
5345 PR c/69796
5346 PR c/69974
5347 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5348 of incomplete decls to error_mark_node.
5349
0b05329b
MP
53502016-02-24 Marek Polacek <polacek@redhat.com>
5351
5352 PR c/69819
5353 * c-decl.c (finish_decl): Don't update the copy of the type of a
5354 different decl type.
5355
067fbd8b
JJ
53562016-02-23 Jakub Jelinek <jakub@redhat.com>
5357
5358 PR objc/69844
5359 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5360 in id_kind reclassification.
5361
bf14eba2
JJ
53622016-02-16 Jakub Jelinek <jakub@redhat.com>
5363
5364 PR c/69835
5365 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5366
ba539195
JN
53672016-02-16 James Norris <jnorris@codesourcery.com>
5368
5369 PR c/64748
5370 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5371
16595a1f
BS
53722016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5373
f48dfe98
BS
5374 * c-decl.c (build_null_declspecs): Zero the entire struct.
5375
16595a1f
BS
5376 PR c/69522
5377 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5378 callers changed. If nested_p is true, use it to call
5379 finish_implicit_inits.
5380 * c-tree.h (finish_implicit_inits): Declare.
5381 * c-typeck.c (finish_implicit_inits): New function. Move code
5382 from ...
5383 (push_init_level): ... here.
5384 (set_designator, process_init_element): Call finish_implicit_inits.
5385
66756373
JJ
53862016-02-11 Jakub Jelinek <jakub@redhat.com>
5387
5388 PR c/69768
5389 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5390 arguments for -Waddress warning.
5391
1066e9b5
JJ
53922016-02-04 Jakub Jelinek <jakub@redhat.com>
5393
5394 PR c/69669
5395 * c-decl.c (finish_enum): When honoring mode attribute,
5396 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5397
3a5d2ba4
JJ
53982016-01-29 Jakub Jelinek <jakub@redhat.com>
5399
5400 PR debug/69518
5401 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5402 all type variants, not just TYPE_MAIN_VARIANT.
5403
cbdd8ae0
JJ
54042016-01-27 Jakub Jelinek <jakub@redhat.com>
5405
5406 PR debug/66869
5407 * c-decl.c (c_write_global_declarations_1): Warn with
5408 warn_unused_function if static prototype without definition
5409 is not C_DECL_USED.
5410
fa74a4bc
MP
54112016-01-27 Marek Polacek <polacek@redhat.com>
5412
5413 PR c/68062
5414 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5415 to unsigned, if needed. Add -Wsign-compare warning.
5416
13f92e8d
JJ
54172016-01-26 Jakub Jelinek <jakub@redhat.com>
5418
5419 PR tree-optimization/69483
5420 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5421
cd8e73dc 54222016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
5423
5424 PR c/24293
5425 * c-tree.h (incomplete_record_decls): Declare.
5426 * c-parser.c (incomplete_record_decls): Define.
5427 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5428 report error if any decl has zero size.
5429 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5430 or enum type to incomplete_record_decls.
5431
e6d6ec9e
TV
54322016-01-14 Tom de Vries <tom@codesourcery.com>
5433
5434 PR tree-optimization/68773
5435 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5436 set force_output.
5437
00083992
MP
54382016-01-14 Marek Polacek <polacek@redhat.com>
5439
5440 PR c/69262
5441 * c-decl.c (grokdeclarator): Provide more information for invalid
5442 array declarations.
5443
7443cf13
DM
54442016-01-06 David Malcolm <dmalcolm@redhat.com>
5445
5446 * c-parser.c (c_parser_unary_expression): For dereferences, build
5447 a combined location before calling build_indirect_ref, so that
5448 error reports cover the full range, manually updating the c_expr
5449 src_range.
5450
6b131d5b
MP
54512016-01-06 Marek Polacek <polacek@redhat.com>
5452
5453 PR sanitizer/69099
5454 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5455 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5456 NULL.
5457
818ab71a
JJ
54582016-01-04 Jakub Jelinek <jakub@redhat.com>
5459
5460 Update copyright years.
5461
2fe0a208
MP
54622016-01-04 Marek Polacek <polacek@redhat.com>
5463
5464 PR c/68908
5465 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5466 optimization to use __atomic_fetch_* built-in if possible.
5467
c7b48c8a
TS
54682015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5469
5470 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5471 into...
5472 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5473 all users.
5474
fda5652f
MP
54752015-12-22 Marek Polacek <polacek@redhat.com>
5476
5477 PR c/69002
5478 * c-typeck.c (build_component_ref): Warn when acessing elements of
5479 atomic structures or unions.
5480
745e411d
DM
54812015-12-21 David Malcolm <dmalcolm@redhat.com>
5482
5483 * c-typeck.c: Include "gcc-rich-location.h".
5484 (build_binary_op): In the two places that call binary_op_error,
5485 create a gcc_rich_location and populate it with the location of
5486 the binary op and its two operands.
5487
94c40e19
DM
54882015-12-16 David Malcolm <dmalcolm@redhat.com>
5489
5490 * c-parser.c (c_parser_statement_after_labels): When calling
5491 c_finish_return, Use the return expression's location if it has
5492 one, falling back to the location of the first token within it.
5493 * c-typeck.c (c_finish_return): When issuing warnings about
5494 the incorrect presence/absence of a return value, issue a note
5495 showing the declaration of the function.
5496
de67c4c3
DM
54972015-12-16 David Malcolm <dmalcolm@redhat.com>
5498
5499 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5500 to 4.
5501 (c_parser_peek_nth_token): New function.
5502 (c_parser_peek_conflict_marker): New function.
5503 (c_parser_error): Detect conflict markers and report them as such.
5504
a10704e1
DM
55052015-12-16 David Malcolm <dmalcolm@redhat.com>
5506
5507 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5508 to preserve range information for the primary expression
5509 in the call to c_parser_postfix_expression_after_primary.
5510
8062bca6
DM
55112015-12-16 David Malcolm <dmalcolm@redhat.com>
5512
5513 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5514 expression location, falling back on the first token location,
5515 rather than always using the latter.
5516
d06f8b75
MP
55172015-12-16 Marek Polacek <polacek@redhat.com>
5518
5519 PR c/64637
5520 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5521 available.
5522
2994fb91
MP
55232015-12-15 Marek Polacek <polacek@redhat.com>
5524
5525 PR c/68907
5526 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5527 artificial decl.
5528
a1b93f8d
DM
55292015-12-08 David Malcolm <dmalcolm@redhat.com>
5530
5531 * c-parser.c (c_parser_alignof_expression): Capture location of
5532 closing parenthesis (if any), or of end of unary expression, and
5533 use it to build a src_range for the expression.
5534
46c6e1e2
DM
55352015-12-08 David Malcolm <dmalcolm@redhat.com>
5536
5537 PR c/68757
5538 * c-parser.c (c_parser_get_builtin_args): Add
5539 "out_close_paren_loc" param, and write back to it.
5540 (c_parser_postfix_expression): Capture the closing
5541 parenthesis location for RID_CHOOSE_EXPR,
5542 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5543 RID_BUILTIN_SHUFFLE and use it to set the source range
5544 for such expressions; within RID_BUILTIN_COMPLEX set
5545 the underlying location.
5546
66189108
MP
55472015-12-07 Marek Polacek <polacek@redhat.com>
5548
5549 PR c/68668
5550 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5551 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5552
f187980b
EB
55532015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5554
5555 * c-tree.h (c_build_va_arg): Adjust prototype.
5556 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5557 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5558 parameter, adjust throughout and issue an error if EXPR is a component
5559 with reverse storage order.
5560
4250754e
JM
55612015-12-02 Jason Merrill <jason@redhat.com>
5562
5563 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5564 (c_fully_fold_internal, decl_constant_value_for_optimization):
5565 Move from c-common.c.
5566 * c-tree.h: Declare decl_constant_value_for_optimization.
5567 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5568
e9e32ee6
JM
55692015-12-02 Joseph Myers <joseph@codesourcery.com>
5570
5571 PR c/68162
5572 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5573 following link from declarator to next declarator. Track original
5574 qualified type and pass it to c_build_qualified_type.
5575 * c-typeck.c (c_build_qualified_type): Add arguments
5576 orig_qual_type and orig_qual_indirect.
5577
ff7a55bf
TS
55782015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5579
5580 * c-parser.c (c_parser_omp_clause_name)
5581 (c_parser_oacc_all_clauses): Alphabetical sorting.
5582
657e4e47
JJ
55832015-12-02 Jakub Jelinek <jakub@redhat.com>
5584
5585 PR c/68533
5586 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5587 for diagnostics.
5588
37d5ad46
JB
55892015-12-01 Julian Brown <julian@codesourcery.com>
5590 Cesar Philippidis <cesar@codesourcery.com>
5591 James Norris <James_Norris@mentor.com>
5592
5593 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5594 (c_parser_oacc_clause_use_device): New function.
5595 (c_parser_oacc_all_clauses): Add use_device support.
5596 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5597 (c_parser_oacc_host_data): New function.
5598 (c_parser_omp_construct): Add host_data support.
5599 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5600 * c-typeck.c (c_finish_oacc_host_data): New function.
5601 (c_finish_omp_clauses): Add use_device support.
5602
a4850ce9
JH
56032015-11-29 Jan Hubicka <hubicka@ucw.cz>
5604
5605 PR c/67106
5606 * c-decl.c: Set TYPE_PACKED in variants.
5607
b58d3df2
ML
56082015-11-27 Martin Liska <mliska@suse.cz>
5609
5610 PR c++/68312
5611 * c-array-notation.c (fix_builtin_array_notation_fn):
5612 Use release_vec_vec instead of vec::release.
5613 (build_array_notation_expr): Likewise.
5614 (fix_conditional_array_notations_1): Likewise.
5615 (fix_array_notation_expr): Likewise.
5616 (fix_array_notation_call_expr): Likewise.
5617
aec17bfe
JJ
56182015-11-27 Jakub Jelinek <jakub@redhat.com>
5619
5620 PR c/63326
5621 * c-parser.c (c_parser_compound_statement_nostart): If
5622 last_label is true, use pragma_stmt instead of pragma_compound
5623 as second c_parser_pragma argument.
5624 (c_parser_omp_ordered, c_parser_omp_target_update,
5625 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5626 false as second argument to c_parser_skip_to_pragma_eol after
5627 diagnosing standalone directives used in pragma_stmt context.
5628
688c4de0
IV
56292015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5630
5631 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5632 with "if (ENABLE_OFFLOADING)".
5633
cbd03aee
DM
56342015-11-23 David Malcolm <dmalcolm@redhat.com>
5635
5636 PR objc/68438
5637 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5638 for various Objective-C constructs: Class.name syntax,
5639 @selector(), @protocol(), @encode(), and [] message syntax.
5640
a87a86e1
DM
56412015-11-20 David Malcolm <dmalcolm@redhat.com>
5642
5643 PR 62314
5644 * c-typeck.c (should_suggest_deref_p): New function.
5645 (build_component_ref): Special-case POINTER_TYPE when
5646 generating a "not a structure of union" error message, and
5647 suggest a "->" rather than a ".", providing a fix-it hint.
5648
8ece8dfb
DM
56492015-11-19 David Malcolm <dmalcolm@redhat.com>
5650
5651 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5652 candidate into a new function, find_closest_identifier.
5653
433068cc
MP
56542015-11-19 Marek Polacek <polacek@redhat.com>
5655
5656 PR c/68412
5657 * c-typeck.c (parser_build_binary_op): Properly handle
5658 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5659
bef08b71
DM
56602015-11-17 David Malcolm <dmalcolm@redhat.com>
5661
5662 * c-parser.c (set_c_expr_source_range): Bulletproof both
5663 overloaded implementations against NULL expr->value.
5664 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5665 values.
5666 (c_parser_unary_expression): Likewise when handling addresses of
5667 labels.
5668 (c_parser_postfix_expression): Likewise for statement expressions,
5669 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5670 __builtin_va_arg, and for __builtin_offset_of.
5671 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5672 src_range using the range of the braced initializer.
5673 (c_parser_transaction_expression): Set src_range for "ret" to a
5674 sane pair of values.
5675
fff77217
KY
56762015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5677
5678 * c-parser.c (c_finish_omp_declare_simd): Look for
5679 "simd" attribute as well. Update error message.
5680
1d899da2
TS
56812015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5682
5683 * c-parser.c (c_parser_omp_declare_target): Adjust.
5684
e4606348
JJ
56852015-11-14 Jakub Jelinek <jakub@redhat.com>
5686
5687 * c-typeck.c (c_finish_omp_clauses): Don't mark
5688 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5689
3e636daf
MP
56902015-11-14 Marek Polacek <polacek@redhat.com>
5691
5692 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5693 * c-typeck.c: Likewise.
5694
ebedc9a3
DM
56952015-11-13 David Malcolm <dmalcolm@redhat.com>
5696
5697 * c-decl.c (warn_defaults_to): Pass line_table to
5698 rich_location ctor.
5699 * c-errors.c (pedwarn_c99): Likewise.
5700 (pedwarn_c90): Likewise.
5701 * c-parser.c (set_c_expr_source_range): New functions.
5702 (c_token::get_range): New method.
5703 (c_token::get_finish): New method.
5704 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5705 based on the range from the start of the LHS to the end of the
5706 RHS.
5707 (c_parser_conditional_expression): Likewise, based on the range
5708 from the start of the cond.value to the end of exp2.value.
5709 (c_parser_binary_expression): Call set_c_expr_source_range on
5710 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5711 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5712 based on the cast_loc through to the end of the expr.
5713 (c_parser_unary_expression): Likewise, based on the
5714 op_loc through to the end of op.
5715 (c_parser_sizeof_expression) Likewise, based on the start of the
5716 sizeof token through to either the closing paren or the end of
5717 expr.
5718 (c_parser_postfix_expression): Likewise, using the token range,
5719 or from the open paren through to the close paren for
5720 parenthesized expressions.
5721 (c_parser_postfix_expression_after_primary): Likewise, for
5722 various kinds of expression.
5723 * c-tree.h (struct c_expr): Add field "src_range".
5724 (c_expr::get_start): New method.
5725 (c_expr::get_finish): New method.
5726 (set_c_expr_source_range): New decls.
5727 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5728 on ret for prefix unary ops.
5729 (parser_build_binary_op): Likewise, running from the start of
5730 arg1.value through to the end of arg2.value.
5731
ec8b536f
MP
57322015-11-13 Marek Polacek <polacek@redhat.com>
5733
5734 PR c/68320
5735 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5736
277fe616
DM
57372015-11-13 David Malcolm <dmalcolm@redhat.com>
5738
5739 * c-typeck.c: Include spellcheck.h.
5740 (lookup_field_fuzzy_find_candidates): New function.
5741 (lookup_field_fuzzy): New function.
5742 (build_component_ref): If the field was not found, try using
5743 lookup_field_fuzzy and potentially offer a suggestion.
5744
6e232ba4
JN
57452015-11-12 James Norris <jnorris@codesourcery.com>
5746 Joseph Myers <joseph@codesourcery.com>
5747
5748 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5749 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5750 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5751 and PRAGMA_OMP_CLAUSE_LINK.
5752 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5753 and PRAGMA_OACC_CLAUSE_LINK.
5754 (OACC_DECLARE_CLAUSE_MASK): New definition.
5755 (c_parser_oacc_declare): New function.
5756
9be4f715
MP
57572015-11-12 Marek Polacek <polacek@redhat.com>
5758
5759 PR c/67784
5760 * c-parser.c (c_parser_for_statement): Reclassify the token in
5761 a correct scope.
5762
e78bede6
MP
57632015-11-11 Marek Polacek <polacek@redhat.com>
5764
5765 PR c/68107
5766 PR c++/68266
5767 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5768 checking the size of an array.
5769
69f293c9
AM
57702015-11-11 Andrew MacLeod <amacleod@redhat.com>
5771
5772 * c-array-notation.c: Remove unused header files.
5773 * c-aux-info.c: Likewise.
5774 * c-convert.c: Likewise.
5775 * c-decl.c: Likewise.
5776 * c-errors.c: Likewise.
5777 * c-lang.c: Likewise.
5778 * c-objc-common.c: Likewise.
5779 * c-parser.c: Likewise.
5780 * c-typeck.c: Likewise.
5781 * gccspec.c: Likewise.
5782
3a40d81d
NS
57832015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5784 Cesar Philippidis <cesar@codesourcery.com>
5785 James Norris <jnorris@codesourcery.com>
5786 Julian Brown <julian@codesourcery.com>
5787 Nathan Sidwell <nathan@codesourcery.com>
5788
3a40d81d
NS
5789 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5790 routine arg.
5791 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5792 (c_parser_pragma): Parse 'acc routine'.
5793 (OACC_ROUTINE_CLAUSE_MARK): Define.
5794 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5795
fc402eec
AA
57962015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5797
5798 PR debug/67192
5799 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5800 location of the backward-goto to the start of the loop body.
5801
f6b0b3db
AA
58022015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5803
5804 PR debug/67192
5805 * c-parser.c (c_parser_while_statement): Finish the loop before
5806 parsing ahead for misleading indentation.
5807 (c_parser_for_statement): Likewise.
5808
ee45a32d
EB
58092015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5810
5811 * c-decl.c (finish_struct): If the structure has reverse storage
5812 order, rewrite the type of array fields with scalar component. Call
5813 maybe_apply_pragma_scalar_storage_order on entry.
5814 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5815 errors on bit-fields and reverse SSO here and not...
5816 (c_mark_addressable): ...here.
5817 (output_init_element): Adjust call to initializer_constant_valid_p.
5818 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5819
8a645150
DM
58202015-11-06 David Malcolm <dmalcolm@redhat.com>
5821
5822 * c-decl.c (warn_defaults_to): Update for change in signature
5823 of diagnostic_set_info.
5824 * c-errors.c (pedwarn_c99): Likewise.
5825 (pedwarn_c90): Likewise.
5826 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5827 for textinfo::set_location.
5828
7a5e4956
CP
58292015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5830 Thomas Schwinge <thomas@codesourcery.com>
5831 James Norris <jnorris@codesourcery.com>
5832
5833 * c-parser.c (c_parser_omp_clause_name): Add support for
5834 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5835 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5836 default(none) in OpenACC.
5837 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5838 arguments.
5839 (c_parser_oacc_clause_tile): New function.
5840 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5841 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5842 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5843 TILE}.
5844 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5845 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5846 FIRSTPRIVATE}.
5847 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5848 (c_parser_oacc_update): Update the error message for missing clauses.
5849 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5850 and OMP_CLAUSE_INDEPENDENT.
5851
bfcfbfa0
MP
58522015-11-05 Marek Polacek <polacek@redhat.com>
5853
5854 PR c/68090
5855 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5856 deal with pre-evaluation on invalid types.
5857
e01d41e5
JJ
58582015-11-05 Jakub Jelinek <jakub@redhat.com>
5859 Ilya Verbin <ilya.verbin@intel.com>
5860
5861 * c-parser.c: Include context.h and gimple-expr.h.
5862 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5863 monotonic together with nonmonotonic.
5864 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5865 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5866 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5867 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5868 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5869 expressions on combined target teams before the target.
5870 (c_parser_omp_declare_target): If decl has "omp declare target" or
5871 "omp declare target link" attribute, and cgraph or varpool node already
5872 exists, then set corresponding flags. Call c_finish_omp_clauses
5873 in the parenthesized extended-list syntax case.
5874 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5875 declare target.
5876 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5877 on OMP_CLAUSE_REDUCTION array sections.
5878 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5879 into the constant offset, or for variable low-bound using
5880 POINTER_PLUS_EXPR. For structure element based array sections use
5881 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5882 (c_finish_omp_clauses): Drop generic_field_head, structure
5883 elements are now always mapped even as array section bases,
5884 diagnose same var in data sharing and mapping clauses. Diagnose if
5885 linear step on declare simd is neither a constant nor a uniform
5886 parameter. Look through POINTER_PLUS_EXPR for array section
5887 reductions. Diagnose the same var or function appearing multiple
5888 times on the same directive. Fix up wording for the to clause if t
5889 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5890 modifier on kinds other than dynamic or guided or nonmonotonic
5891 modifier together with ordered clause.
5892
4bf9e5a8
TS
58932015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5894 Chung-Lin Tang <cltang@codesourcery.com>
5895
5896 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5897
2adfab87
AM
58982015-10-29 Andrew MacLeod <amacleod@redhat.com>
5899
5900 * c-array-notation.c: Reorder #include's and remove duplicates.
5901 * c-aux-info.c: Likewise.
5902 * c-convert.c: Likewise.
5903 * c-decl.c: Likewise.
5904 * c-errors.c: Likewise.
5905 * c-lang.c: Likewise.
5906 * c-objc-common.c: Likewise.
5907 * c-parser.c: Likewise.
5908 * c-typeck.c: Likewise.
5909
e922069e
JW
59102015-10-26 Jim Wilson <jim.wilson@linaro.org>
5911
5912 PR debug/66068
5913 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5914 after calling build_qualified_type.
5915
765dd391
CP
59162015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5917 Thomas Schwinge <thomas@codesourcery.com>
5918 James Norris <jnorris@codesourcery.com>
5919 Joseph Myers <joseph@codesourcery.com>
5920 Julian Brown <julian@codesourcery.com>
5921 Bernd Schmidt <bschmidt@redhat.com>
5922
5923 * c-parser.c (c_parser_oacc_shape_clause): New.
5924 (c_parser_oacc_simple_clause): New.
5925 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5926 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5927
88bae6f4
TS
59282015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5929 James Norris <jnorris@codesourcery.com>
5930 Cesar Philippidis <cesar@codesourcery.com>
5931
5932 PR c/64765
5933 PR c/64880
5934 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5935 parameters, and handle these. Adjust all users.
5936 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5937 into...
5938 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5939 all users.
5940 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5941 declare functions.
5942 (c_finish_omp_construct): Declare function.
5943 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5944 Merge functions into...
5945 (c_finish_omp_construct): ... this new function.
5946
a8fc2579
RB
59472015-10-22 Richard Biener <rguenther@suse.de>
5948
5949 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5950 before folding a MINUS_EXPR.
5951
e9122ef6
MP
59522015-10-21 Marek Polacek <polacek@redhat.com>
5953
5954 PR c/68024
5955 * c-decl.c (start_function): Warn about vararg functions without
5956 a prototype.
5957
9f47c7e5
IE
59582015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5959
5960 * c-typeck.c (build_conditional_expr): Use boolean vector
5961 type for vector comparison.
5962 (build_vec_cmp): New.
5963 (build_binary_op): Use build_vec_cmp for comparison.
5964
fa60eeb9
MP
59652015-10-20 Marek Polacek <polacek@redhat.com>
5966
5967 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5968
2c7020eb
MP
59692015-10-20 Marek Polacek <polacek@redhat.com>
5970
5971 PR c/67964
5972 * c-parser.c (c_parser_attributes): Break out of the loop if the
5973 token after an attribute isn't a comma.
5974
d9a6bd32
JJ
59752015-10-13 Jakub Jelinek <jakub@redhat.com>
5976 Aldy Hernandez <aldyh@redhat.com>
5977
5978 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5979 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5980 (c_parser_omp_variable_list): Handle structure elements for
5981 map, to and from clauses. Handle array sections in reduction
5982 clause. Formatting fixes.
5983 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5984 if clause modifiers.
5985 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5986 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5987 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5988 c_parser_omp_clause_is_device_ptr): New functions.
5989 (c_parser_omp_clause_ordered): Parse optional parameter.
5990 (c_parser_omp_clause_reduction): Handle array reductions.
5991 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5992 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5993 functions.
5994 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5995 (c_parser_omp_clause_depend_sink): New function.
5996 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5997 (c_parser_omp_clause_map): Parse release/delete map kinds and
5998 optional always modifier.
5999 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
6000 and c_finish_omp_clauses callers.
6001 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
6002 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
6003 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
6004 (OMP_CRITICAL_CLAUSE_MASK): Define.
6005 (c_parser_omp_critical): Parse critical clauses.
6006 (c_parser_omp_for_loop): Handle doacross loops, adjust
6007 c_finish_omp_for and c_finish_omp_clauses callers.
6008 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
6009 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
6010 (OMP_FOR_CLAUSE_MASK): Add linear clause.
6011 (c_parser_omp_for): Disallow ordered clause when combined with
6012 distribute. Disallow linear clause when combined with distribute
6013 and not combined with simd.
6014 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
6015 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
6016 parse clauses and if depend clause is found, don't parse a body.
6017 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
6018 Allow target parallel without for after it.
6019 (OMP_TASK_CLAUSE_MASK): Add priority clause.
6020 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
6021 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
6022 invalid kinds.
6023 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
6024 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
6025 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
6026 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
6027 functions.
6028 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
6029 defaultmap and is_device_ptr clauses.
6030 (c_parser_omp_target): Parse target parallel and target simd. Set
6031 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
6032 and target exit data. Diagnose invalid map kinds.
6033 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
6034 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
6035 construct.
6036 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
6037 &omp_priv.
6038 (OMP_TASKLOOP_CLAUSE_MASK): Define.
6039 (c_parser_omp_taskloop): New function.
6040 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
6041 handle PRAGMA_OMP_TASKLOOP.
6042 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
6043 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
6044 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
6045 Add IS_OMP argument, handle structure element bases, diagnose
6046 bitfields, pass IS_OMP recursively, diagnose known zero length
6047 array sections in depend clauses, handle array sections in reduction
6048 clause, diagnose negative length even for pointers.
6049 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
6050 types, pass IS_OMP down to handle_omp_array_sections_1, handle
6051 array sections in reduction clause, set
6052 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
6053 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
6054 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
6055 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
6056
21ba0cea
MP
60572015-10-06 Marek Polacek <polacek@redhat.com>
6058
6059 * c-parser.c (c_parser_statement_after_labels): Use
6060 protected_set_expr_location.
6061 (c_parser_omp_clause_num_gangs): Likewise.
6062 (c_parser_omp_clause_num_threads): Likewise.
6063 (c_parser_omp_clause_num_workers): Likewise.
6064 (c_parser_omp_clause_vector_length): Likewise.
6065 (c_parser_omp_clause_num_teams): Likewise.
6066 (c_parser_omp_clause_thread_limit): Likewise.
6067 * c-typeck.c (build_c_cast): Likewise.
6068 (c_cast_expr): Likewise.
6069
624d31fe
RS
60702015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6071
6072 * c-typeck.c (c_tree_equal): Use real_equal instead of
6073 REAL_VALUES_EQUAL.
6074
b8fd7909
JM
60752015-10-04 Jason Merrill <jason@redhat.com>
6076
6077 * c-parser.c (c_lex_one_token): Handle @synchronized.
6078 * c-decl.c (match_builtin_function_types): A declaration of a built-in
6079 can change whether the function is transaction_safe.
6080
1c7485af
MP
60812015-10-02 Marek Polacek <polacek@redhat.com>
6082
6083 PR c/67730
6084 * c-typeck.c (convert_for_assignment): Use the expansion point
6085 location throughout.
6086
3e3b8d63
MP
60872015-10-02 Marek Polacek <polacek@redhat.com>
6088
6089 PR c/64249
6090 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
6091 and pass it down to c_parser_if_statement.
6092 (c_parser_else_body): Add CHAIN parameter and pass it down to
6093 c_parser_statement_after_labels.
6094 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
6095 duplicated if-else-if conditions.
6096
aabef2de
MP
60972015-10-01 Marek Polacek <polacek@redhat.com>
6098
6099 * c-typeck.c (convert_for_assignment): Improve commentary.
6100
de8ddd5f
MP
61012015-09-30 Marek Polacek <polacek@redhat.com>
6102
6103 PR c/67730
6104 * c-typeck.c (c_finish_return): Use the expansion point location for
6105 certain "return with value" warnings.
6106
c4914de6
MLI
61072015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6108
6109 * c-parser.c (pragma_lex): Add loc argument.
6110
0e36f5c7
MP
61112015-09-15 Marek Polacek <polacek@redhat.com>
6112
6113 PR c/67580
6114 * c-decl.c (tag_exists_p): New function.
6115 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
6116 struct/union/enum keywords are missing.
6117 * c-tree.h (tag_exists_p): Declare.
6118
2f3bb934
MP
61192015-09-15 Marek Polacek <polacek@redhat.com>
6120
6121 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
6122 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
6123 Return NULL_TREE instead of 0.
6124 (lookup_name): Return NULL_TREE instead of 0.
6125 (lookup_name_in_scope): Likewise.
6126 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
6127 (parser_xref_tag): Use false instead of 0.
6128 (start_struct): Use true instead of 1.
6129 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
6130
aa256c4a
MP
61312015-09-14 Marek Polacek <polacek@redhat.com>
6132
6133 * c-typeck.c (set_nonincremental_init_from_string): Use
6134 HOST_WIDE_INT_M1U when shifting a negative value.
6135
dbb68221
MW
61362015-09-09 Mark Wielaard <mjw@redhat.com>
6137
6138 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
6139 parm against NULL.
6140
a8a098ac
JJ
61412015-09-10 Jakub Jelinek <jakub@redhat.com>
6142
6143 PR c/67502
6144 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
6145 into OMP_FOR_PRE_BODY rather than before the loop.
6146
f4b189d5
JJ
61472015-09-09 Jakub Jelinek <jakub@redhat.com>
6148
0bb99c11
JJ
6149 PR c/67501
6150 * c-parser.c (c_parser_oacc_all_clauses,
6151 c_parser_omp_all_clauses): Remove invalid clause from
6152 list of clauses even if parser->error is set.
6153
fce5e5e3
JJ
6154 PR c/67500
6155 * c-parser.c (c_parser_omp_clause_aligned,
6156 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
6157 test for errors.
6158 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
6159 error_mark_node.
6160
f4b189d5
JJ
6161 PR c/67495
6162 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
6163 instead of c_parser_unary_expression. If the result is !lvalue_p,
6164 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
6165
b2aaf235
MP
61662015-09-04 Marek Polacek <polacek@redhat.com>
6167
6168 PR sanitizer/67279
6169 * c-typeck.c (build_binary_op): Don't instrument static initializers.
6170
1807ffc1
MS
61712015-09-03 Martin Sebor <msebor@redhat.com>
6172
6173 PR c/66516
8b652e65
JJ
6174 * c-typeck.c (convert_arguments, parser_build_unary_op,
6175 build_conditional_expr, c_cast_expr, convert_for_assignment,
6176 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
6177 reject_gcc_builtin.
6178 (c_decl_implicit): Define.
6179
d04ff417
MP
61802015-09-02 Marek Polacek <polacek@redhat.com>
6181
6182 PR c/67432
6183 * c-parser.c (c_parser_enum_specifier): Give a better error for
6184 an empty enum.
6185
a79683d5
TS
61862015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6187
6188 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
6189
191a6b94
MP
61902015-08-12 Marek Polacek <polacek@redhat.com>
6191
6192 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
6193 LOC to it.
6194
420a9d9b
MP
61952015-08-03 Marek Polacek <polacek@redhat.com>
6196
6197 PR c/67088
6198 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
6199 Use it.
6200 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
6201
992118a1
PP
62022015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6203
6204 * c-parser.c (c_parser_if_body): Take token_indent_info
6205 argument. Call warn_for_misleading_indentation even when the
6206 body is a semicolon. Extract token_indent_infos corresponding
6207 to the guard, body and next tokens. Adjust call to
6208 warn_for_misleading_indentation accordingly.
6209 (c_parser_else_body): Likewise.
6210 (c_parser_if_statement): Likewise.
6211 (c_parser_while_statement): Likewise.
6212 (c_parser_for_statement): Likewise.
6213
46308474
LFSM
62142015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
6215 Manuel López-Ibáñez <manu@gcc.gnu.org>
6216
6217 * c-decl.c (get_parm_info): Remove static var. Update warning
6218 message.
6219
05b28fd6
MP
62202015-07-27 Marek Polacek <polacek@redhat.com>
6221
6222 PR c++/66555
6223 PR c/54979
6224 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
6225
451b5e48
MP
62262015-07-20 Marek Polacek <polacek@redhat.com>
6227
6228 PR c++/55095
6229 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
6230 (build_binary_op): Warn about left shift overflows.
6231
1916bcb5
AM
62322015-07-09 Andrew MacLeod <amacleod@redhat.com>
6233
6234 * c-array-notation.c: Adjust includes for flags.h changes.
6235 * c-objc-common.c: Likewise.
6236
c7131fb2
AM
62372015-07-07 Andrew MacLeod <amacleod@redhat.com>
6238
6239 * c-array-notation.c: Adjust includes.
6240 * c-aux-info.c: Likewise.
6241 * c-convert.c: Likewise.
6242 * c-decl.c: Likewise.
6243 * c-errors.c: Likewise.
6244 * c-lang.c: Likewise.
6245 * c-objc-common.c: Likewise.
6246 * c-parser.c: Likewise.
6247 * c-typeck.c: Likewise.
6248
da2e71c9
MLI
62492015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6250
6251 PR fortran/66605
6252 * c-decl.c (finish_function): Call do_warn_unused_parameter.
6253
b155cfd9
MP
62542015-06-29 Marek Polacek <polacek@redhat.com>
6255
6256 PR c/66322
6257 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
6258 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
6259 about -Wswitch-bool here.
6260 (do_case): Update c_add_case_label call.
6261 (c_finish_case): Update c_do_switch_warnings call.
6262
31521951
MP
62632015-06-27 Marek Polacek <polacek@redhat.com>
6264
6265 * c-typeck.c: Use VECTOR_TYPE_P throughout.
6266
22d03525
MP
62672015-06-26 Marek Polacek <polacek@redhat.com>
6268
6269 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6270 INDIRECT_REF_P.
6271 * c-typeck.c (array_to_pointer_conversion): Likewise.
6272 (build_unary_op): Likewise.
6273 (c_finish_return): Likewise.
6274
f0889939
AM
62752015-06-25 Andrew MacLeod <amacleod@redhat.com>
6276
6277 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6278 * c-parser.c: Likewise.
6279
8d67ee55
RS
62802015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6281
6282 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6283 instead of pointer_hash.
6284 (detect_field_duplicates): Likewise.
6285
0ae9bd27
MP
62862015-06-25 Marek Polacek <polacek@redhat.com>
6287
6288 * c-array-notation.c: Use VAR_P throughout.
6289 * c-decl.c: Likewise.
6290 * c-objc-common.c: Likewise.
6291 * c-parser.c: Likewise.
6292 * c-typeck.c: Likewise.
6293
62f9079a
MP
62942015-06-25 Marek Polacek <polacek@redhat.com>
6295
6296 * c-decl.c: Use is_global_var throughout.
6297 * c-parser.c: Likewise.
6298 * c-typeck.c: Likewise.
6299
abb226c9
AM
63002015-06-17 Andrew MacLeod <amacleod@redhat.com>
6301
6302 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6303 * c-aux-info.c: Likewise.
6304 * c-convert.c: Likewise.
6305 * c-decl.c: Likewise.
6306 * c-errors.c: Likewise.
6307 * c-lang.c: Likewise.
6308 * c-objc-common.c: Likewise.
6309 * c-parser.c: Likewise.
6310 * c-typeck.c: Likewise.
6311
8cbababc
JH
63122015-06-11 Jan Hubicka <hubicka@ucw.cz>
6313
6314 PR middle-end/66325
6315 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6316 variants.
6317
a0349665
PMR
63182015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6319
6320 * c-decl.c (pop_scope): Register the main translation unit
6321 through the new debug hook.
6322
13fdf2e2
AM
63232015-06-08 Andrew MacLeod <amacleod@redhat.com>
6324
6325 * c-array-notation.c : Adjust include files.
6326 * c-aux-info.c : Likewise.
6327 * c-convert.c : Likewise.
6328 * c-decl.c : Likewise.
6329 * c-errors.c : Likewise.
6330 * c-lang.c : Likewise.
6331 * c-lang.h : Likewise.
6332 * c-objc-common.c : Likewise.
6333 * c-parser.c : Likewise.
6334 * c-typeck.c : Likewise.
6335
d7438551
AH
63362015-06-05 Aldy Hernandez <aldyh@redhat.com>
6337
6338 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6339 immediately clobber it.
6340 (c_write_global_declarations_1): Remove call to
6341 check_global_declaration_1.
6342 (c_write_global_declarations_2): Remove.
6343 (c_write_final_cleanups): Rename from c_write_global_declarations.
6344 Remove call to finalize_compilation_unit.
6345 Remove calls to debugging hooks.
6346 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6347 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6348 * c-tree.h: Remove c_write_global_declarations.
6349
ecb9f223
AM
63502015-06-04 Andrew MacLeod <amacleod@redhat.com>
6351
6352 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6353 * c-aux-info.c: Likewise.
6354 * c-convert.c: Likewise.
6355 * c-decl.c: Likewise.
6356 * c-errors.c: Likewise.
6357 * c-lang.c: Likewise.
6358 * c-objc-common.c: Likewise.
6359 * c-parser.c: Likewise.
6360 * c-typeck.c: Likewise.
6361
9482b620
MP
63622015-06-04 Marek Polacek <polacek@redhat.com>
6363
6364 PR c/66341
6365 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6366 it is a lvalue.
6367
bc51ace3
PK
63682015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6369
6370 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6371 Warn for empty struct.
6372 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6373
ea5b45b6
AT
63742015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6375
6376 * c-decl.c (start_function): Call plugin before parsing.
6377 (finish_function): Call plugin after parsing.
6378
c2d47482
PK
63792015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6380
6381 PR c/49551
6382 * c-decl.c (merge_decls): Merge DECL_COMMON.
6383
a95492ab
JW
63842015-05-22 Jim Wilson <jim.wilson@linaro.org>
6385
6386 * Make-lang.in (check_gcc_pallelize): Define.
6387
fd5c817a
MP
63882015-05-22 Marek Polacek <polacek@redhat.com>
6389
6390 PR c/47043
6391 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6392 attributes.
6393
c7b70a3c
MP
63942015-05-21 Marek Polacek <polacek@redhat.com>
6395
6396 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6397 DECL_BUILT_IN.
6398
21b634ae
MP
63992015-05-20 Marek Polacek <polacek@redhat.com>
6400
6401 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6402 * c-typeck.c: Likewise.
6403
296a8c2f
MP
64042015-05-19 Marek Polacek <polacek@redhat.com>
6405
6406 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6407
41b37d5e
JJ
64082015-05-19 Jakub Jelinek <jakub@redhat.com>
6409
6410 PR middle-end/66199
6411 * c-parser.c (c_parser_omp_for_loop): Don't add
6412 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6413 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6414 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6415 constructs.
6416
fab27f52
MM
64172015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6418
6419 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 6420 swaps.
fab27f52 6421
40de31cf
MLI
64222015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6423
6424 PR fortran/44054
6425 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6426 accessor function.
6427
3aa3c9fc
MP
64282015-05-14 Marek Polacek <polacek@redhat.com>
6429
6430 PR c/66066
6431 PR c/66127
6432 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6433 rather than with 0.
6434
c3388e62
DM
64352015-05-12 David Malcolm <dmalcolm@redhat.com>
6436
6437 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6438 to add a call to warn_for_misleading_indentation.
6439 (c_parser_else_body): Likewise, adding param "else_loc".
6440 (c_parser_if_statement): Check for misleading indentation.
6441 (c_parser_while_statement): Likewise.
6442 (c_parser_for_statement): Likewise.
6443
755e528f
MP
64442015-05-08 Marek Polacek <polacek@redhat.com>
6445
6446 PR c/64918
6447 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6448 (output_init_element): Likewise.
6449
0173bd2a
MP
64502015-05-07 Marek Polacek <polacek@redhat.com>
6451
6452 PR c/65179
6453 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6454 value.
6455
9babc352
MP
64562015-04-30 Marek Polacek <polacek@redhat.com>
6457
6458 * c-typeck.c (set_init_label): Call error_at instead of error and
6459 pass LOC to it.
6460
ac9f18db
MP
6461 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6462 the type of a decl.
6463
ec3fba51
MP
6464 * c-typeck.c (c_build_va_arg): Clarify the error message.
6465
b811915d
TS
64662015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6467
6468 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6469 OMP_STANDALONE_CLAUSES.
6470
f3075008
MP
64712015-04-28 Marek Polacek <polacek@redhat.com>
6472
6473 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6474
4e81b788
MP
64752015-04-28 Marek Polacek <polacek@redhat.com>
6476
6477 PR c/65901
6478 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6479
6c1db78e
MP
64802015-04-25 Marek Polacek <polacek@redhat.com>
6481
6482 PR c/52085
6483 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6484 attribute.
6485
5c4abbb8
MP
64862015-04-23 Marek Polacek <polacek@redhat.com>
6487
6488 PR c/65345
6489 * c-decl.c (set_labels_context_r): New function.
6490 (store_parm_decls): Call it via walk_tree_without_duplicates.
6491 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6492 instead of create_tmp_var. Build TARGET_EXPR instead of
6493 COMPOUND_EXPR.
6494 (build_atomic_assign): Use create_tmp_var_raw instead of
6495 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6496
06aca1d5
IV
64972015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6498
6499 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6500 (c_parser_omp_target_update): Add missed %> to error_at ().
6501
8fba1830
BRF
65022015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6503
6504 PR target/55143
6505 * c-decl.c (c_default_pointer_mode): Remove definition.
6506 * c-tree.h (c_default_pointer_mode): Remove declaration.
6507
62021f64
TB
65082015-03-27 Tobias Burnus <burnus@net-b.de>
6509
6510 PR c/65586
6511 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6512 error out.
6513 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6514 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6515 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6516
9b65e171
JJ
65172015-03-19 Jakub Jelinek <jakub@redhat.com>
6518
6519 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6520 attribute for DECL_EXTERNAL VAR_DECLs.
6521
17958621
JJ
65222015-03-11 Jakub Jelinek <jakub@redhat.com>
6523
6524 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6525 argument.
6526
7ccb1a11
JJ
65272015-03-10 Jakub Jelinek <jakub@redhat.com>
6528
6529 PR c/65120
6530 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6531 before preparing arguments to warn_logical_not_parentheses.
6532
01177669
JJ
65332015-03-09 Jakub Jelinek <jakub@redhat.com>
6534
6535 PR c/65120
6536 * c-typeck.c (parser_build_binary_op): Don't warn for
6537 !!x == y or !b == y where b is _Bool.
6538
802ac282
MP
65392015-03-09 Marek Polacek <polacek@redhat.com>
6540
6541 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6542 * c-decl.c (grokdeclarator): Likewise.
6543 * c-typeck.c (build_binary_op): Likewise.
6544
e5165b60
MP
65452015-02-27 Marek Polacek <polacek@redhat.com>
6546
6547 PR c/65228
6548 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6549
065d214c
MP
65502015-02-14 Marek Polacek <polacek@redhat.com>
6551
6552 PR c/64768
6553 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6554 declared through a typedef name.
6555
e5d9235b
MP
65562015-02-13 Marek Polacek <polacek@redhat.com>
6557
6558 PR c/65050
6559 * c-decl.c (grokdeclarator): Print also the type when giving
6560 the error message about array's incomplete element type.
6561
fa01ffcc
JJ
65622015-02-11 Jakub Jelinek <jakub@redhat.com>
6563
6564 PR c/64824
6565 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6566 check in the POP macro.
6567
c3e38a03
MP
65682015-02-09 Marek Polacek <polacek@redhat.com>
6569
6570 PR c/64856
6571 * c-typeck.c (process_init_element): Don't always wrap
6572 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6573 initializing a range of elements.
6574
4886ec8e
JJ
65752015-02-04 Jakub Jelinek <jakub@redhat.com>
6576
6577 PR c/64824
6578 PR c/64868
6579 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6580
c3e38a03 65812015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
6582
6583 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6584 processing enum declaration.
6585
7b33f0c8
MP
65862015-01-29 Marek Polacek <polacek@redhat.com>
6587
6588 PR c/64709
6589 * c-typeck.c (pop_init_level): If constructor_elements has
6590 exactly one element with integer_zerop value, set constructor_zeroinit
6591 to 1. Remove braces around warning_init call.
6592
dea63e49
JJ
65932015-01-27 Jakub Jelinek <jakub@redhat.com>
6594
6595 PR c/64766
6596 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6597 of FUNCTION_DECLs with error_mark_node.
6598
d38f7dce
JJ
65992015-01-26 Jakub Jelinek <jakub@redhat.com>
6600
6601 PR c/64778
6602 * c-typeck.c (convert_arguments): Return -1 if there are
6603 error_args, even if we've diagnosed too many arguments.
6604
cbf5d0e7
RB
66052015-01-21 Richard Biener <rguenther@suse.de>
6606
6607 PR middle-end/64313
6608 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6609 for builtins the user declared correctly.
6610
41dbbb37
TS
66112015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6612 Bernd Schmidt <bernds@codesourcery.com>
6613 Cesar Philippidis <cesar@codesourcery.com>
6614 James Norris <jnorris@codesourcery.com>
6615 Jakub Jelinek <jakub@redhat.com>
6616 Ilmir Usmanov <i.usmanov@samsung.com>
6617
6618 * c-parser.c: Include "gomp-constants.h".
6619 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6620 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6621 Use OMP_CLAUSE_SET_MAP_KIND.
6622 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6623 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6624 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6625 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6626 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6627 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6628 "copyout", "create", "delete", "deviceptr", "gang", "host",
6629 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6630 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6631 "present_or_create", "pcreate", "seq", "self", "vector",
6632 "vector_length", "wait", "worker".
6633 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6634 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6635 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6636 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6637 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6638 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6639 (c_parser_oacc_data_clause_deviceptr)
6640 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6641 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6642 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6643 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6644 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6645 (c_parser_oacc_parallel, c_parser_oacc_update)
6646 (c_parser_oacc_wait): New functions.
6647 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6648 (c_finish_oacc_data): New prototypes.
6649 * c-typeck.c: Include "gomp-constants.h".
6650 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6651 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6652 OMP_CLAUSE_SET_MAP_KIND.
6653 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6654 (c_finish_oacc_data): New functions.
6655 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6656 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6657 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6658 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6659 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6660 GOMP_MAP_FORCE_DEVICEPTR.
6661
adfac8df
JJ
66622015-01-09 Michael Collison <michael.collison@linaro.org>
6663
6664 * c-array-notation.c: Include hash-set.h, machmode.h,
6665 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6666 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6667 * c-aux-info.c: Ditto.
6668 * c-convert.c: Ditto.
6669 * c-decl.c: Ditto.
6670 * c-errors.c: Ditto.
6671 * c-lang.c: Dittoxs.
6672 * c-objc-common.c: Ditto.
6673 * c-parser.c: Ditto.
6674 * c-typeck.c: Include hash-set.h, machmode.h,
6675 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6676 fold-const.h, wide-int.h, inchash.h, real.h and
6677 fixed-value.h due to flattening of tree.h.
6678
2cc901dc
MP
66792015-01-07 Marek Polacek <polacek@redhat.com>
6680
6681 PR c/64417
6682 * c-typeck.c (process_init_element): Disallow initialization of
6683 a flexible array member with a string constant if the structure
6684 is in an array.
6685
5624e564
JJ
66862015-01-05 Jakub Jelinek <jakub@redhat.com>
6687
e5341100
JJ
6688 PR sanitizer/64344
6689 * c-typeck.c (convert_for_assignment, c_finish_return): For
6690 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6691 types also set in_late_binary_op around convert call.
6692 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6693 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6694 result on expr as last argument to ubsan_instrument_float_cast,
6695 if in_late_binary_op, don't use c_save_expr but save_expr.
6696
5624e564
JJ
6697 Update copyright years.
6698
5bd012f8
MP
66992015-01-05 Marek Polacek <polacek@redhat.com>
6700
6701 PR c/64423
6702 * c-typeck.c (build_array_ref): Pass loc down to
6703 warn_array_subscript_with_type_char.
6704
3f8257db 67052014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6706
6707 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 6708 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 6709 element type.
8e745a17 6710 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 6711 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 6712 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 6713 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 6714 to PEDWARN_FOR_QUALIFIERS.
768952be 6715
8f94a8c4
JJ
67162014-12-17 Jakub Jelinek <jakub@redhat.com>
6717
6718 PR sanitizer/64289
6719 * c-convert.c: Include ubsan.h.
6720 (convert): For real -> integral casts and
6721 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6722 instead instrument the float cast directly.
6723
b731b390
JJ
67242014-11-29 Jakub Jelinek <jakub@redhat.com>
6725
6726 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6727 c_finish_stmt_expr): Remove NULL last argument from
6728 create_tmp_var_raw and create_tmp_var calls.
6729 * c-array-notation.c (fix_builtin_array_notation_fn,
6730 build_array_notation_expr, fix_conditional_array_notations_1,
6731 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6732
541e35a6
MP
67332014-11-28 Marek Polacek <polacek@redhat.com>
6734
6735 PR c/63862
6736 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6737 convert the right operand to integer type.
6738
b286be94
MP
67392014-11-25 Marek Polacek <polacek@redhat.com>
6740
6741 PR c/63877
6742 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6743 for inline functions.
6744
aa7da51a
JJ
67452014-11-21 Jakub Jelinek <jakub@redhat.com>
6746
6747 PR target/63764
6748 * c-typeck.c (build_array_ref): Adjust
6749 convert_vector_to_pointer_for_subscript caller. If it returns true,
6750 call non_lvalue_loc on the result.
6751
d876207f
RB
67522014-11-11 Richard Biener <rguenther@suse.de>
6753
6754 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6755 to true.
6756
e5e44252
AK
67572014-11-10 Andi Kleen <ak@linux.intel.com>
6758
6759 PR c/60804
6760 * c-parser.c (c_parser_statement_after_labels): Call
6761 check_no_cilk.
6762 (c_parser_if_statement): Dito.
6763 (c_parser_switch_statement): Dito.
6764 (c_parser_while_statement): Dito.
6765 (c_parser_do_statement): Dito.
6766 (c_parser_for_statement): Dito.
6767 * c-typeck.c (c_finish_loop): Dito.
6768
13c21655
PC
67692014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6770
6771 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6772 OPT_Wshift_count_overflow in the warnings.
6773
2d51fcef
MP
67742014-10-30 Marek Polacek <polacek@redhat.com>
6775
6776 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6777 print the stripped version as well, if they're not the same.
6778
ef4bddc2
RS
67792014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6780
6781 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6782 machine_mode.
6783
c582198b
AM
67842014-10-28 Andrew MacLeod <amacleod@redhat.com>
6785
6786 * c-decl.c: Adjust include files.
6787 * c-parser.c: Ditto.
6788
ddc8de03
PM
67892014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6790 Tom Tromey <tromey@redhat.com>
6791
6792 * c-tree.h (enum c_oracle_request): New.
6793 (c_binding_oracle_function): New typedef.
6794 (c_binding_oracle, c_pushtag, c_bind): Declare.
6795 * c-decl.c (c_binding_oracle): New global.
6796 (I_SYMBOL_CHECKED): New macro.
6797 (i_symbol_binding): New function.
6798 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6799 (I_TAG_CHECKED): New macro.
6800 (i_tag_binding): New function.
6801 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6802 (I_LABEL_CHECKED): New macro.
6803 (i_label_binding): New function.
6804 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6805 (c_print_identifier): Save and restore c_binding_oracle.
6806 (c_pushtag, c_bind): New functions.
6807
60393bbc
AM
68082014-10-27 Andrew MacLeod <amacleod@redhat.com>
6809
6810 * c-typeck.c: Adjust include files.
6811
d723bb7c
MLI
68122014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6813
6814 PR c++/53061
6815 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6816 initialization here...
6817 (c_initialize_diagnostics): ... but here. Set defaults after
6818 building pretty-printer.
6819
1bc5a451
MP
68202014-10-23 Marek Polacek <polacek@redhat.com>
6821
6822 PR c/63626
6823 * c-decl.c (pop_scope): Don't print warning in external_scope.
6824
4435bb92
MP
68252014-10-19 Marek Polacek <polacek@redhat.com>
6826
6827 PR c/63567
6828 * c-typeck.c (output_init_element): Allow initializing objects with
6829 static storage duration with compound literals even in C99 and add
6830 pedwarn for it.
6831
7278465e
MP
68322014-10-17 Marek Polacek <polacek@redhat.com>
6833
6834 PR c/63567
6835 * c-typeck.c (digest_init): Allow initializing objects with static
6836 storage duration with compound literals even in C99 and add pedwarn
6837 for it.
6838
d9b7be2e
MP
68392014-10-17 Marek Polacek <polacek@redhat.com>
6840
6841 PR c/63543
6842 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6843 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6844 error multiple times. Print the type.
6845
f406ae1f
MP
68462014-10-17 Marek Polacek <polacek@redhat.com>
6847
6848 PR c/63549
6849 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6850 type.
6851
92574c7c
MP
68522014-10-17 Marek Polacek <polacek@redhat.com>
6853
6854 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6855 (start_function): Use OPT_Wimplicit_int instead of 0.
6856 (store_parm_decls_oldstyle): Likewise.
6857
1bc4a978
MT
68582014-10-17 Alan Modra <amodra@gmail.com>
6859
6860 PR middle-end/61848
6861 * c-decl.c (merge_decls): Don't merge section name or tls model
6862 to newdecl symtab node, instead merge to olddecl. Override
6863 existing olddecl section name. Set tls_model for all thread-local
6864 vars, not just OMP thread-private ones. Remove incorrect comment.
6865
83685514
AM
68662014-10-16 Andrew MacLeod <amacleod@redhat.com>
6867
6868 * c-decl.c: Adjust include files.
6869
78a7c317
DD
68702014-10-14 DJ Delorie <dj@redhat.com>
6871
6872 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6873 (c_token_starts_typename): Check all __intN, not just __int128.
6874 (c_token_starts_declspecs): Likewise.
6875 (c_parser_declspecs): Likewise.
6876 (c_parser_attribute_any_word): Likewise.
6877 (c_parser_objc_selector): Likewise.
6878 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6879 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6880 is specified.
6881 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6882 __int128.
6883 (finish_declspecs): Likewise.
6884
74d98c1e
AB
68852014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6886
8e745a17 6887 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 6888 the duplicate code.
8e745a17 6889 (c_parser_statement): Call the new function.
74d98c1e 6890
84937de2
MP
68912014-10-09 Marek Polacek <polacek@redhat.com>
6892
6893 PR c/63480
6894 * c-typeck.c (pop_init_level): Don't warn about initializing
6895 with { }.
6896
0382aaa0
MP
68972014-10-07 Marek Polacek <polacek@redhat.com>
6898
6899 PR c/59717
6900 * c-decl.c (header_for_builtin_fn): New function.
6901 (implicitly_declare): Suggest which header to include.
6902
7a0ca710
MP
69032014-10-07 Marek Polacek <polacek@redhat.com>
6904
6905 * c-convert.c (convert): Use error_operand_p.
6906 * c-typeck.c (require_complete_type): Likewise.
6907 (really_atomic_lvalue): Likewise.
6908 (digest_init): Likewise.
6909 (handle_omp_array_sections_1): Likewise.
6910
6bc8a126
MP
69112014-10-03 Marek Polacek <polacek@redhat.com>
6912
6913 PR c/63453
6914 * c-decl.c (pop_scope): Don't warn about "inline function declared
6915 but never defined" for functions marked with gnu_inline attribute.
6916
d90c0a59
JJ
69172014-09-25 Jakub Jelinek <jakub@redhat.com>
6918
6919 PR c++/63249
6920 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6921 on low_bound and length.
6922
083e891e
MP
69232014-09-24 Marek Polacek <polacek@redhat.com>
6924
6925 PR c/61405
6926 PR c/53874
6927 * c-parser.c: Don't define CPP_KEYWORD.
6928 (c_parser_switch_statement): Pass original type to c_finish_case.
6929 * c-tree.h (c_finish_case): Update declaration.
6930 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6931 conditionally to c_do_switch_warnings.
6932
8d95fe25
MP
69332014-09-03 Marek Polacek <polacek@redhat.com>
6934
6935 PR c/62024
6936 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6937 conversions.
6938
9a771876
JJ
69392014-09-02 Jakub Jelinek <jakub@redhat.com>
6940 Balaji V. Iyer <balaji.v.iyer@intel.com>
6941 Igor Zamyatin <igor.zamyatin@intel.com>
6942
6943 * c-parser.c (c_parser_cilk_for): New function.
6944 (c_parser_cilk_grainsize): Likewise.
6945 (c_get_temp_regvar): Likewise.
6946 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6947 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6948 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6949 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6950 case.
6951
b7679d96
CG
69522014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6953
6954 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6955 with using HOST_WIDE_INT without truncation to 'int'
6956
59ea0364
MP
69572014-08-22 Marek Polacek <polacek@redhat.com>
6958
6959 PR c++/62199
6960 * c-typeck.c (parser_build_binary_op): Adjust call to
6961 warn_logical_not_parentheses.
6962
671a475e
IZ
69632014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6964
6965 PR other/62008
6966 * c-parser.c (c_parser_array_notation): Check for correct
6967 type of an array added.
6968
04159acf
MP
69692014-08-19 Marek Polacek <polacek@redhat.com>
6970
6971 PR c++/62153
6972 * c-typeck.c (build_binary_op): If either operand of a comparison
6973 is a boolean expression, call maybe_warn_bool_compare.
6974
c77935ee
PP
69752014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6976
6977 PR c/45584
6978 * c-typeck.c (build_c_cast): Do a conversion even when the
6979 TYPE_MAIN_VARIANTs are the same.
6980
35aff4fb
MP
69812014-08-19 Marek Polacek <polacek@redhat.com>
6982
6983 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6984 pedwarn_c99 instead of pedwarn.
6985 (grokfield): Likewise.
6986 (warn_defaults_to): New function.
6987 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6988 Unconditionally call pedwarn_c99 instead of pedwarn.
6989 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6990 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6991 check flag_isoc11 before.
6992 * c-errors.c (pedwarn_c99): Change the return type to bool.
6993 Handle -Wc99-c11-compat.
6994 * c-parser.c (disable_extension_diagnostics): Handle
6995 warn_c99_c11_compat.
6996 (restore_extension_diagnostics): Likewise.
6997 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6998 instead of pedwarn, don't check flag_isoc11 before.
6999 (c_parser_declspecs): Likewise.
7000 (c_parser_alignas_specifier): Likewise.
7001 (c_parser_alignof_expression): Likewise.
7002 (c_parser_generic_selection): Likewise.
7003 * c-tree.h (pedwarn_c99): Update declaration.
7004 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
7005 of pedwarn_c99.
7006
177cce46
MP
70072014-08-19 Marek Polacek <polacek@redhat.com>
7008
7009 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
7010 to pedwarn_c90.
7011 * c-errors.c: Include "opts.h".
7012 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
7013 * c-parser.c (disable_extension_diagnostics): Handle negative value
7014 of warn_c90_c99_compat, too.
7015 (restore_extension_diagnostics): Likewise.
7016 (c_parser_compound_statement_nostart): Pass
7017 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
7018
6dc99c33
MP
70192014-08-12 Marek Polacek <polacek@redhat.com>
7020
7021 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
7022 Add pedwarn.
7023 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
7024 Likewise.
7025 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
7026
3f8257db 70272014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
7028
7029 PR c/51849
7030 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
7031 Call pedwarn_c90 instead of pedwarn.
7032 (check_bitfield_type_and_width): Likewise.
7033 (declspecs_add_qual): Likewise.
7034 (declspecs_add_type): Likewise.
7035 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
7036 Adjust to only call pedwarn_c90.
7037 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
7038 pedwarn_c90 instead of pedwarn.
7039 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
7040 * c-parser.c (disable_extension_diagnostics): Handle
7041 warn_c90_c99_compat.
7042 (restore_extension_diagnostics): Likewise.
7043 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
7044 pedwarn_c90 instead of pedwarn.
7045 (c_parser_initelt): Likewise.
7046 (c_parser_postfix_expression): Likewise.
7047 (c_parser_postfix_expression_after_paren_type): Likewise.
7048 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
7049 * c-tree.h: Fix formatting.
7050 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
7051 pedwarn_c90 instead of pedwarn.
7052
9f25a338
TS
70532014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7054
7055 * c-typeck.c: Remove include of pointer-set.h.
7056
044331a8
MP
70572014-08-07 Marek Polacek <polacek@redhat.com>
7058
7059 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
7060
b787e7a2
TS
70612014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7062
7063 * c-typeck.c: Use hash_map instead of pointer_map.
7064
6e2830c3
TS
70652014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7066
7067 * c-decl.c: Use hash_set instead of pointer_set.
7068
a7ee52fb
IZ
70692014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7070
7071 PR middle-end/61455
7072 * c-array-notation.c (expand_array_notations): Handling
7073 of DECL_EXPR added.
7074
b4dfdc11
MG
70752014-07-31 Marc Glisse <marc.glisse@inria.fr>
7076
7077 PR c++/60517
7078 * c-typeck.c (c_finish_return): Return 0 instead of the address of
7079 a local variable.
7080
976d5a22
TT
70812014-07-30 Tom Tromey <tromey@redhat.com>
7082
7083 * c-typeck.c (struct constructor_stack) <designator_depth>: New
7084 field.
7085 (really_start_incremental_init, push_init_level): Initialize
7086 designator_depth.
7087 (pop_init_level): Set global designator_depth.
7088 (process_init_element): Check for designated_init attribute.
7089
30281de2
MP
70902014-07-20 Marek Polacek <polacek@redhat.com>
7091
7092 PR c/61852
7093 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
7094 (implicitly_declare): Pass location to implicit_decl_warning.
7095
b108f48f
JJ
70962014-07-14 Jakub Jelinek <jakub@redhat.com>
7097
7098 PR middle-end/61294
7099 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
7100 If non-NULL, call c_parser_check_literal_zero.
7101 (c_parser_check_literal_zero): New function.
7102 (c_parser_postfix_expression_after_primary): Adjust
7103 c_parser_expr_list caller, handle -Wmemset-transposed-args.
7104
773ec47f
MP
71052014-07-06 Marek Polacek <polacek@redhat.com>
7106
7107 PR c/6940
7108 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
7109 * c-tree.h (C_ARRAY_PARAMETER): Define.
7110 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
7111 function parameter.
7112
22e1cf1c 71132014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 7114 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
7115
7116 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
7117 releasing symbol.
7118
52ec0ea3
MP
71192014-07-01 Marek Polacek <polacek@redhat.com>
7120
7121 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
7122 instead of 0 to WARN_FOR_ASSIGNMENT.
7123
d5c3d343
MP
71242014-07-01 Marek Polacek <polacek@redhat.com>
7125
7126 PR c/58286
7127 * c-typeck.c (convert_for_assignment): Pass
7128 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
7129
6a7253a4
MP
71302014-06-30 Marek Polacek <polacek@redhat.com>
7131
7132 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
7133 has no_sanitize_undefined attribute.
7134
5e88a8f4
IZ
71352014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
7136
7137 PR middle-end/57541
7138 * c-array-notation.c (fix_builtin_array_notation_fn):
7139 Check for 0 arguments in builtin call. Check that bultin argument is
7140 correct.
7141 * c-parser.c (c_parser_array_notation): Check for incorrect initial
7142 index.
7143
9698b078
SH
71442014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
7145
7146 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
7147 qualifiers in __auto_type for atomic types.
7148 (c_parser_typeof_specifier): Discard all type qualifiers in
7149 __typeof__ for atomic types.
7150
6e07c515
MP
71512014-06-25 Marek Polacek <polacek@redhat.com>
7152
7153 PR c/61162
7154 * c-parser.c (c_parser_statement_after_labels): Pass the location of
7155 the return expression to c_finish_return.
7156
da6f124d
JJ
71572014-06-25 Jakub Jelinek <jakub@redhat.com>
7158
7159 * c-typeck.c (c_finish_omp_clauses): Make sure
7160 OMP_CLAUSE_LINEAR_STEP has correct type.
7161
c203e8a7
TS
71622014-06-24 Trevor Saunders <tsaunders@mozilla.com>
7163
7164 * c-decl.c: Adjust.
7165
56ad0e38
JJ
71662014-06-24 Jakub Jelinek <jakub@redhat.com>
7167
7168 * c-parser.c (c_parser_omp_for_loop): For
7169 #pragma omp parallel for simd move lastprivate clause from parallel
7170 to for rather than simd.
7171
47c2554f
MP
71722014-06-23 Marek Polacek <polacek@redhat.com>
7173
7174 * c-typeck.c (parser_build_binary_op): Don't call
7175 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
7176
56363ffd
JH
71772014-06-15 Jan Hubicka <hubicka@ucw.cz>
7178
7179 * c-parser.c (c_parser_omp_threadprivate): Likewise.
7180 * c-decl.c (merge_decls): Likewise.
7181
d7ff7ae5
MP
71822014-06-09 Marek Polacek <polacek@redhat.com>
7183
7184 PR c/36446
7185 * c-typeck.c (error_init): Call inform instead of error_at.
7186 (pedwarn_init): Call inform instead of pedwarn.
7187 (warning_init): Call inform instead of warning_at.
7188
24d047a3
JH
71892014-06-07 Jan Hubicka <hubicka@ucw.cz>
7190
7191 * c-decl.c (merge_decls): Use set_decl_section_name.
7192 (duplicate_decls): Remove node if it exists.
7193
9bac5cbb
G
71942014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
7195
7196 PR c/53119
7197 * c-typeck.c (push_init_level, process_init_element,
7198 pop_init_level): Correct check for zero initialization, move
7199 missing brace warning to respect zero initialization.
7200
8ffcdea8
MP
72012014-06-05 Marek Polacek <polacek@redhat.com>
7202
7203 PR c/56724
7204 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
7205
742938c9
MP
72062014-06-05 Marek Polacek <polacek@redhat.com>
7207
7208 PR c/49706
7209 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
ab20d992 7210 on the left hand side operand of a comparison.
742938c9 7211
6447c55d
MP
72122014-06-05 Marek Polacek <polacek@redhat.com>
7213
7214 PR c/48062
7215 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
7216 Print note only if the warning was printed.
7217
9dc7743c
IZ
72182014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
7219
7220 PR c/58942
7221 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
7222 with a pointer.
7223
fedfecef
MP
72242014-06-03 Marek Polacek <polacek@redhat.com>
7225
7226 PR c/60439
7227 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
7228 c_start_case.
7229 * c-tree.h (c_start_case): Update.
7230 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
7231 switch condition has boolean value.
7232
9b2b7279
AM
72332014-06-02 Andrew MacLeod <amacleod@redhat.com>
7234
7235 * c-decl.c: Include builtins.h.
7236 * c-parser.c: Likewise.
7237
5c1bc275
MP
72382014-05-27 Marek Polacek <polacek@redhat.com>
7239
7240 PR c/56724
7241 * c-typeck.c (convert_arguments): Get location of a parameter. Change
7242 error and warning calls to error_at and warning_at. Pass location of
7243 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
7244 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
7245 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
7246
97563bc8
IZ
72472014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
7248
7249 PR c/61191
7250 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
7251 function parameters.
7252
aede2c10
JH
72532014-05-23 Jan Hubicka <hubicka@ucw.cz>
7254
7255 * c-decl.c (merge_decls): Preserve symtab node pointers.
7256 (duplicate_decls): Free new decl.
7257
edbba2ce
TS
72582014-05-23 Thomas Schwinge <thomas@codesourcery.com>
7259
f3316c6d
TS
7260 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
7261 initialization.
7262
edbba2ce
TS
7263 * c-parser.c (c_parser_omp_target): Return bool values.
7264
68c81f24
TS
72652014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7266
7267 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
7268 num_teams_loc variable to num_thread_limit_loc.
7269
632f2871
RS
72702014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7271
7272 * c-array-notation.c (expand_array_notations): Use void_node
7273 instead of void_zero_node.
7274
766090c2
TS
72752014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7276
7277 * c-decl.c (finish_struct): Adjust.
7278 (finish_enum): Likewise.
7279 (bind): Adjust.
7280 (record_inline_static): Likewise.
7281 (push_scope): Likewise.
7282 (make_label): Likewise.
7283 (lookup_label_for_goto): Likewise.
7284 (finish_struct): Likewise.
7285 (finish_enum): Likewise.
7286 (store_parm_decls): Likewise.
7287 (c_push_function_context): Likewise.
7288 * c-lang.h: Remove usage of variable_size gty attribute.
7289 * c-parser.c (c_parse_init): Adjust.
7290 (c_parse_file): Likewise.
7291
2b107f6b
MP
72922014-05-13 Marek Polacek <polacek@redhat.com>
7293
7294 PR c/61162
7295 * c-typeck.c (convert_for_assignment): Pass location to
7296 WARN_FOR_ASSIGNMENT instead of input_location.
7297
d033409e
MP
72982014-05-10 Marek Polacek <polacek@redhat.com>
7299
7300 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7301 maybe_warn_string_init.
7302 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7303 maybe_warn_string_init.
7304 * c-tree.h (maybe_warn_string_init): Update declaration.
7305 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7306 Call pedwarn_init with loc instead of with input_location.
7307 (digest_init): Pass init_loc to maybe_warn_string_init.
7308 (pop_init_level): Call pedwarn_init with loc instead of with
7309 input_location.
7310 (set_init_index): Likewise.
7311 (process_init_element): Likewise.
7312
ea58ef42
MP
73132014-05-09 Marek Polacek <polacek@redhat.com>
7314
7315 PR c/61096
7316 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7317 (c_parser_initelt): Pass location to set_init_label. Pass array index
7318 location to set_init_index.
7319 * c-tree.h (push_init_level): Update declaration.
7320 (pop_init_level): Likewise.
7321 (set_init_index): Likewise.
7322 (set_init_label): Likewise.
7323 * c-typeck.c (error_init): Add location parameter. Call error_at
7324 instead of error.
7325 (digest_init): Pass init_loc to error_init.
7326 (really_start_incremental_init):
7327 (push_init_level): Add location parameter. Pass loc to pop_init_level
7328 and error_init.
7329 (pop_init_level): Likewise.
7330 (set_designator): Add location parameter. Pass loc to pop_init_level,
7331 push_init_level, and error_init.
7332 (set_init_index): Add location parameter. Pass loc to error_init and
7333 set_designator.
7334 (set_init_label): Likewise.
7335 (output_init_element): Pass loc to error_init.
7336 (process_init_element): Pass loc to error_init, pop_init_level,
7337 pedwarn_init, and push_init_level.
7338
661a0813
MP
73392014-05-09 Marek Polacek <polacek@redhat.com>
7340
7341 PR c/50459
7342 * c-parser.c (c_parser_attributes): Parse the arguments as an
7343 expression-list if the attribute takes identifier.
7344
2793eeab
MP
73452014-05-08 Marek Polacek <polacek@redhat.com>
7346
7347 PR c/61053
7348 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7349 TYPE_ALIGN_UNIT.
7350
f827930a
MP
73512014-05-08 Marek Polacek <polacek@redhat.com>
7352
7353 PR c/61077
7354 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7355 of main.
7356
1d60af08
KZ
73572014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7358 Mike Stump <mikestump@comcast.net>
7359 Richard Sandiford <rdsandiford@googlemail.com>
7360
7361 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7362 (finish_enum): Use wide-int interfaces.
7363 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7364 * c-typeck.c (build_c_cast): Likewise.
7365 (set_nonincremental_init_from_string): Likewise.
7366 (c_tree_equal): Likewise.
7367
a0e24419
MP
73682014-05-02 Marek Polacek <polacek@redhat.com>
7369
7370 PR c/25801
7371 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7372 Return size_one_node when the type is not complete.
7373 (pointer_diff): Remove comment.
7374 (build_unary_op): Improve error messages.
7375
19fc9faa
MP
73762014-05-02 Marek Polacek <polacek@redhat.com>
7377
7378 * c-typeck.c (c_finish_return): Separate warning_at calls.
7379
63bc4e87
MP
73802014-05-02 Marek Polacek <polacek@redhat.com>
7381
7382 * c-tree.h (error_init): Remove declaration.
7383 (pedwarn_init): Likewise.
7384 * c-typeck.c (error_init): Make static and move above.
7385 (pedwarn_init): Likewise.
7386 (warning_init): Move above.
7387 (maybe_warn_string_init): Likewise.
7388
4bd2511b
JL
73892014-05-01 Jeff Law <law@redhat.com>
7390
7391 Revert:
7392
7393 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7394 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7395 avoid goto.
7396
6a358dcb
MP
73972014-05-02 Marek Polacek <polacek@redhat.com>
7398
7399 PR c/60784
7400 * c-typeck.c (push_init_level): Set constructor_designated to
7401 p->designated for structures.
7402
ae5ebda4
MP
74032014-05-01 Marek Polacek <polacek@redhat.com>
7404
7405 PR c/60915
7406 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7407 function-definition has an attribute after the declarator.
7408
96b40f8d
MP
74092014-05-01 Marek Polacek <polacek@redhat.com>
7410
7411 PR c/60257
7412 * c-typeck.c (warning_init): Add location_t parameter. Call
7413 warning_at instead of warning.
7414 (push_init_level): Pass input_location to warning_init.
7415 (add_pending_init): Add location_t parameter. Pass loc to
7416 warning_init.
7417 (set_nonincremental_init): Pass input_location to add_pending_init.
7418 (set_nonincremental_init_from_string): Likewise.
7419 (output_init_element): Pass loc to warning_init and to
7420 add_pending_init.
7421
32e00768
MP
74222014-05-01 Marek Polacek <polacek@redhat.com>
7423
7424 PR c/43395
7425 * c-typeck.c (c_finish_return): Distinguish between label and variable
7426 when warning about returning local address.
7427
c9379ce2
MP
74282014-05-01 Marek Polacek <polacek@redhat.com>
7429
7430 PR c/29467
7431 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7432 in C89 mode.
7433
d00887e8
MP
74342014-05-01 Marek Polacek <polacek@redhat.com>
7435
7436 PR c/43245
7437 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7438 instead of 0 to WARN_FOR_QUALIFIERS.
7439
5436fa2e
MP
74402014-05-01 Marek Polacek <polacek@redhat.com>
7441
7442 PR c/56989
7443 * c-typeck.c (default_conversion): Use better location for
7444 error call.
7445
f8ed5150
MP
74462014-04-30 Marek Polacek <polacek@redhat.com>
7447
7448 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7449 also when SANITIZE_FLOAT_DIVIDE is on.
7450
8337d1db
MP
74512014-04-30 Marek Polacek <polacek@redhat.com>
7452
7453 PR c/60139
7454 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7455 and pedwarn_init. Use loc insted of input_location.
7456
c4bdc42f
MP
74572014-04-30 Marek Polacek <polacek@redhat.com>
7458
7459 PR c/60351
7460 * c-typeck.c (build_binary_op): Use location when warning about
7461 shift count.
7462
45484dcf
MP
74632014-04-25 Marek Polacek <polacek@redhat.com>
7464
7465 PR c/18079
7466 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7467 always_inline/noinline and hot/cold attributes.
7468
34cf811f
MP
74692014-04-25 Marek Polacek <polacek@redhat.com>
7470
7471 PR c/60114
7472 * c-parser.c (c_parser_initelt): Pass input_location to
7473 process_init_element.
7474 (c_parser_initval): Pass loc to process_init_element.
7475 * c-tree.h (process_init_element): Adjust declaration.
7476 * c-typeck.c (push_init_level): Pass input_location to
7477 process_init_element.
7478 (pop_init_level): Likewise.
7479 (set_designator): Likewise.
7480 (output_init_element): Add location_t parameter. Pass loc to
7481 digest_init.
7482 (output_pending_init_elements): Pass input_location to
7483 output_init_element.
7484 (process_init_element): Add location_t parameter. Pass loc to
7485 output_init_element.
7486
42056eac
JJ
74872014-04-24 Jakub Jelinek <jakub@redhat.com>
7488
7489 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7490 atomic-clause, allow comma in between atomic-clause and
7491 seq_cst.
7492
e162a134
JJ
74932014-04-22 Jakub Jelinek <jakub@redhat.com>
7494
7495 PR c/59073
7496 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7497 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7498
2f6babac
IZ
74992014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7500
7501 PR middle-end/60469
7502 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7503 create_tmp_var instead build_decl for creating temps.
7504 (build_array_notation_expr): Likewise.
7505 (fix_conditional_array_notations_1): Likewise.
7506 (fix_array_notation_expr): Likewise.
7507 (fix_array_notation_call_expr): Likewise.
7508
8edbfaa6
JJ
75092014-03-28 Jakub Jelinek <jakub@redhat.com>
7510
7511 PR c++/60689
7512 * c-tree.h (c_build_function_call_vec): New prototype.
7513 * c-typeck.c (build_function_call_vec): Don't call
7514 resolve_overloaded_builtin here.
7515 (c_build_function_call_vec): New wrapper function around
7516 build_function_call_vec. Call resolve_overloaded_builtin here.
7517 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7518 Call c_build_function_call_vec instead of build_function_call_vec.
7519 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7520 * c-decl.c (finish_decl): Likewise.
7521
7485aeea
MLI
75222014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7523
7524 PR c/55383
7525 * c-typeck.c: Use correct format string in cast-qual warning
7526
b17a8b07
TS
75272014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7528
7529 * c-decl.c (c_decl_attributes): Use
7530 lang_hooks.types.omp_mappable_type.
7531 * c-typeck.c (c_finish_omp_clauses): Likewise.
7532
3af9c5e9
MP
75332014-03-06 Marek Polacek <polacek@redhat.com>
7534
7535 PR c/60197
7536 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7537 of checking tree code.
7538
1c9f5f33
PK
75392014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7540
7541 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7542 (c_parser_parameter_declaration): Likewise.
7543
cc28fc7f
MP
75442014-02-19 Marek Polacek <polacek@redhat.com>
7545
7546 PR c/60195
7547 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7548 Call mark_exp_read on exp.value.
7549 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7550 TREE_ADDRESSABLE on old instead of val.
7551 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7552
b581c05c
PK
75532014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7554
7555 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7556 C_EXPR_APPEND by vec_safe_push.
7557 * c-tree.h (C_EXPR_APPEND): Remove.
7558
81e5eca8
MP
75592014-01-31 Marek Polacek <polacek@redhat.com>
7560
7561 PR c/59963
7562 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7563 build_function_call_vec.
7564 (build_function_call): Likewise.
7565 (build_atomic_assign): Likewise.
7566 (build_function_call_vec): Add arg_loc parameter. Use it.
7567 (convert_arguments): Likewise.
7568 (convert_for_assignment): Rename rhs_loc to expr_loc.
7569 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7570 (c_parser_objc_keywordexpr): Likewise.
7571 (c_parser_postfix_expression_after_primary): Call
7572 build_function_call_vec with expr_loc rather than op_loc.
7573 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7574 build_function_call_vec.
7575 (c_parser_expr_list): Add locations parameter. Fill it with locations
7576 of function arguments.
7577 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7578
68fca595
MP
75792014-01-30 Marek Polacek <polacek@redhat.com>
7580
7581 PR c/59940
7582 * c-typeck.c (build_function_call_vec): Use loc parameter.
7583 (convert_arguments): Add location parameter. Use it.
7584 (ep_convert_and_check): Likewise.
7585 (build_atomic_assign): Adjust convert_for_assignment call.
7586 (build_modify_expr): Likewise.
7587 (digest_init): Likewise.
7588 (c_finish_return): Likewise.
7589 (build_conditional_expr): Adjust ep_convert_and_check calls.
7590 (convert_for_assignment): Add rhs_loc parameter. Use it.
7591 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7592 calls.
7593
fa337f3a
RB
75942014-01-30 Richard Biener <rguenther@suse.de>
7595
7596 PR c/59905
7597 * c-typeck.c (build_function_call_vec): Do not replace calls
7598 to a function via an incompatible type with a runtime abort.
7599
b72271b9
BI
76002014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7601
7602 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7603 flag_enable_cilkplus with flag_cilkplus.
7604 (c_parser_direct_declarator_inner): Likewise.
7605 (c_parser_attribute_any_word): Likewise.
7606 (c_parser_attributes): Likewise.
7607 (c_parser_compound_statement): Likewise.
7608 (c_parser_statement_after_labels): Likewise.
7609 (c_parser_if_statement): Likewise.
7610 (c_parser_switch_statement): Likewise.
7611 (c_parser_do_statement): Likewise.
7612 (c_parser_for_statement): Likewise.
7613 (c_parser_unary_expression): Likewise.
7614 (c_parser_postfix_expression): Likewise.
7615 (c_parser_postfix_expression_after_primary): Likewise.
7616 (c_parser_postfix_expression_after_primary): Likewise.
7617 (c_parser_omp_clause_name): Likewise.
7618 (c_finish_omp_declare_simd): Likewise.
7619 (c_parser_cilk_verify_simd): Likewise.
7620 * c-typeck.c (build_array_ref): Likewise.
7621 (build_function_call_vec): Likewise.
7622 (convert_arguments): Likewise.
7623 (build_compound_expr): Likewise.
7624 (c_finish_return): Likewise.
7625 (c_finish_if_stmt): Likewise.
7626 (c_finish_loop): Likewise.
7627 (build_binary_op): Likewise.
7628
393e8e8b
MP
76292014-01-23 Marek Polacek <polacek@redhat.com>
7630
7631 PR c/59846
7632 * c-typeck.c (parser_build_binary_op): Use location instead of
7633 input_location.
7634 (build_binary_op): Pass location to shorten_compare.
7635
f04dda30
MP
76362014-01-23 Marek Polacek <polacek@redhat.com>
7637
7638 PR c/58346
7639 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7640 an empty aggregate.
7641
789eadcd
MP
76422014-01-23 Marek Polacek <polacek@redhat.com>
7643
7644 PR c/59871
7645 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7646 of a comma expression.
7647 (emit_side_effect_warnings): Likewise.
7648
40f14e9f
BI
76492014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7650
7651 PR c/59825
7652 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7653 function to use walk_tree and moved a lot of its functionality to
7654 expand_array_notations.
7655 (expand_array_notations): New function.
7656
74558dd9
BI
76572014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7658
7659 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7660 attribute an attribute without value.
7661
652fea39
JJ
76622014-01-23 Jakub Jelinek <jakub@redhat.com>
7663
7664 PR middle-end/58809
7665 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7666 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7667
f34f1c87
MP
76682014-01-22 Marek Polacek <polacek@redhat.com>
7669
7670 PR c/59891
7671 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7672 of remove_c_maybe_const_expr on op1 and op2.
7673
241f845a
JJ
76742014-01-15 Jakub Jelinek <jakub@redhat.com>
7675
7676 PR c/58943
7677 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7678 effects, preevaluate rhs using SAVE_EXPR first.
7679
9a74f20c
BI
76802014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7681
7682 PR c++/59631
7683 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7684 statements with if-elseif statements.
7685
96066ce1
MP
76862014-01-06 Marek Polacek <polacek@redhat.com>
7687
7688 PR c/57773
7689 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7690 defined bit-field types only in ISO C.
7691
23a5b65a
RS
76922014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7693
7694 Update copyright years
7695
f9030485
RS
76962014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7697
7698 * c-array-notation.c: Use the standard form for the copyright notice.
7699
41958c28
BI
77002013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7701
7702 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7703 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7704 field in parser is not empty. If not-empty, call the function
7705 c_parser_finish_omp_declare_simd.
7706 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7707 between SIMD-enabled functions and #pragma simd. Added new parameter.
7708 (c_parser_cilk_all_clauses): Modified the usage of the function
7709 c_parser_cilk_clause_vectorlength as mentioned above.
7710 (c_parser_cilk_simd_fn_vector_attrs): New function.
7711 (c_finish_cilk_simd_fn_tokens): Likewise.
7712 (is_cilkplus_vector_p): Likewise.
7713 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7714 "nomask," and "mask" strings in clause name.
7715 (c_parser_omp_all_clauses): Added 3 new case statements:
7716 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7717 PRAGMA_CILK_CLAUSE_NOMASK.
7718 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7719 check for vector attribute and if so call the function
7720 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7721 called the function c_finish_cilk_simd_fn_tokens.
7722 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7723 parser field is non-empty. If so, parse them as you would parse
7724 the omp declare simd pragma.
7725 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7726 Added a check when step is a parameter and flag it as error.
7727 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7728 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7729 pragma_omp_clause.
7730
cef0fd0e
TS
77312013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7732
7733 * c-parser.c (c_parser_omp_parallel): Fix description.
7734
12893402
BI
77352013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7736
7737 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7738 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7739 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7740 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7741
296674db
JM
77422013-12-04 Joseph Myers <joseph@codesourcery.com>
7743
7744 PR c/52023
7745 * c-parser.c (c_parser_alignas_specifier): Use
7746 c_sizeof_or_alignof_type instead of c_alignof.
7747 (c_parser_alignof_expression): Likewise, with min_alignof
7748 parameter depending on alignof spelling used.
7749
edd28054
MP
77502013-12-04 Marek Polacek <polacek@redhat.com>
7751
7752 PR c/54113
7753 * c-decl.c (start_function): Don't warn for missing prototype for
7754 inline functions.
7755
da0fc454
MP
77562013-12-03 Marek Polacek <polacek@redhat.com>
7757
7758 PR c/59351
7759 * c-decl.c (build_compound_literal): Allow compound literals with
7760 empty initial value.
7761
4c2ecab0
JM
77622013-12-02 Joseph Myers <joseph@codesourcery.com>
7763
7764 PR c/58235
7765 * c-typeck.c (build_modify_expr): Diagnose assignment to
7766 expression with array type.
7767
340baef7
JM
77682013-11-29 Joseph Myers <joseph@codesourcery.com>
7769
7770 PR c/42262
7771 * c-typeck.c (process_init_element): Do not treat a string as
7772 initializing a whole array when used with a designator for an
7773 individual element.
7774
6763b9f7
JM
77752013-11-29 Joseph Myers <joseph@codesourcery.com>
7776
7777 PR c/57574
7778 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7779 an inline function following a static declaration.
7780
e7bd1de1
JJ
77812013-11-28 Jakub Jelinek <jakub@redhat.com>
7782
7783 PR c/59310
7784 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7785 to p_name before calling c_parser_omp_teams instead of after.
7786 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7787 argument. Remove unused p_name variable.
7788
0136f8f0
AH
77892013-11-27 Aldy Hernandez <aldyh@redhat.com>
7790 Jakub Jelinek <jakub@redhat.com>
7791
7792 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7793 external_scope is NULL.
7794
241b71bb
TV
77952013-11-27 Tom de Vries <tom@codesourcery.com>
7796 Marc Glisse <marc.glisse@inria.fr>
7797
7798 PR c++/59032
7799 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7800
2fb9a547
AM
78012013-11-22 Andrew MacLeod <amacleod@redhat.com>
7802
7803 * c-typeck.c: Add required include files from gimple.h.
7804
8400e75e
DM
78052013-11-22 David Malcolm <dmalcolm@redhat.com>
7806
7807 * c-decl.c (define_label, shadow_tag_warned)
7808 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7809 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7810 (declspecs_add_type): Remove use of in_system_header macro.
7811 * c-parser.c (c_parser_unary_expression): Likewise.
7812 * c-typeck.c (store_init_value, process_init_element)
7813 (c_start_case): Likewise.
7814
7815 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7816 macro.
7817
7818 * c-parser.c (c_parser_set_source_position_from_token): Remove
7819 reference to in_system_header from comment.
7820
386b1f1f
RS
78212013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7822
7823 * c-decl.c (grokdeclarator): Update comment to refer to
7824 tree_to_[su]hwi rather than tree_low_cst.
7825
ae7e9ddd
RS
78262013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7827
7828 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7829 tree_to_uhwi throughout.
7830
9439e9a1
RS
78312013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7832
7833 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7834 throughout.
7835
9541ffee
RS
78362013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7837
7838 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7839 throughout.
7840
c02065fc
AH
78412013-11-15 Aldy Hernandez <aldyh@redhat.com>
7842
7843 * c-parser.c (c_parser_cilk_simd): New.
7844 (c_parser_cilk_verify_simd): New.
7845 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7846 (c_parser_omp_for_loop): Add case for NE_EXPR.
7847 Set c_break_label for CILK_SIMD.
7848 (c_parser_cilk_clause_vectorlength): New.
7849 (c_parser_cilk_clause_linear): New.
7850 (c_parser_cilk_clause_name): New.
7851 (c_parser_cilk_all_clauses): New.
7852 * c-typeck.c (build_unary_op): Pass location argument to
7853 readonly_error.
7854 (build_modify_expr): Same.
7855 (build_asm_expr): Same.
7856 (c_finish_bc_stmt): Error on break/continue in loops.
7857
18f429e2
AM
78582013-11-14 Andrew MacLeod <amacleod@redhat.com>
7859
7860 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7861
d8a2d370
DN
78622013-11-14 Diego Novillo <dnovillo@google.com>
7863
7864 * c-decl.c: Include print-tree.h.
7865 Include stor-layout.h.
7866 Include varasm.h.
7867 Include attribs.h.
7868 Include stringpool.h.
7869 * c-lang.c: Include fold-const.h.
7870 * c-parser.c: Include stringpool.h.
7871 Include attribs.h.
7872 Include stor-layout.h.
7873 Include varasm.h.
7874 Include trans-mem.h.
7875 * c-typeck.c: Include stor-layout.h.
7876 Include trans-mem.h.
7877 Include varasm.h.
7878 Include stmt.h.
7879
38b7bc7f
JM
78802013-11-13 Joseph Myers <joseph@codesourcery.com>
7881
7882 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7883 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7884 __auto_type.
7885 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7886 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7887 RID_AUTO_TYPE.
7888 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7889 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7890 (c_parser_declarator, c_parser_direct_declarator_inner)
7891 (c_parser_parameter_declaration, c_parser_type_name): All callers
7892 changed.
7893 (c_parser_declaration_or_fndef): Handle declarations with type
7894 determined from the initializer.
7895
45b0be94
AM
78962013-11-12 Andrew MacLeod <amacleod@redhat.com>
7897
18f429e2 7898 * c-typeck.c: Include gimplify.h.
45b0be94 7899
582d9b50
JM
79002013-11-12 Joseph Myers <joseph@codesourcery.com>
7901
7902 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7903 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7904 comment.
7905 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7906 or _Thread_local as appropriate in diagnostics.
7907 (build_null_declspecs): Initialize ret->thread_gnu_p.
7908 (declspecs_add_scspec): Handle either __thread or _Thread_local
7909 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7910 pedantic. Do not disallow _Thread_local extern and _Thread_local
7911 static.
7912
267bac10
JM
79132013-11-07 Joseph Myers <joseph@codesourcery.com>
7914 Andrew MacLeod <amacleod@redhat.com>
7915
7916 * c-aux-info.c (gen_type): Handle atomic qualifier.
7917 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7918 qualifiers when compating types.
7919 (shadow_tag_warned): Handle atomic_p in declspecs.
7920 (quals_from_declspecs): Likewise.
7921 (start_decl): Use c_type_promotes_to when promoting argument
7922 types.
7923 (grokdeclarator): Handle _Atomic.
7924 (get_parm_info): Diagnose any qualifier on "void" as only
7925 parameter.
7926 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7927 comparing types. Use c_type_promotes_to when promoting argument
7928 types.
7929 (finish_function): Use c_type_promotes_to when promoting argument
7930 types.
7931 (build_null_declspecs): Handle atomic_p in declspecs.
7932 (declspecs_add_qual): Handle RID_ATOMIC.
7933 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7934 (c_token_starts_declspecs): Handle RID_ATOMIC.
7935 (c_parser_declspecs): Handle atomic type specifiers and
7936 qualifiers.
7937 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7938 from types of expressions with atomic type.
7939 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7940 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7941 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7942 (c_parser_statement_after_labels, c_parser_switch_statement)
7943 (c_parser_for_statement, c_parser_expr_no_commas)
7944 (c_parser_conditional_expression, c_parser_binary_expression)
7945 (c_parser_cast_expression, c_parser_unary_expression)
7946 (c_parser_postfix_expression)
7947 (c_parser_postfix_expression_after_primary, c_parser_expression):
7948 Use convert_lvalue_to_rvalue.
7949 (c_parser_expression_conv, c_parser_expr_list): Document
7950 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7951 (c_parser_objc_synchronized_statement): Use
7952 convert_lvalue_to_rvalue.
7953 (c_parser_objc_selector): Handle RID_ATOMIC.
7954 (c_parser_objc_receiver, c_parser_array_notation): Use
7955 convert_lvalue_to_rvalue.
7956 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7957 _Atomic (type-name).
7958 (struct c_declspecs): Add atomic_p field.
7959 (convert_lvalue_to_rvalue): Declare.
7960 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7961 corresponding atomic types.
7962 (qualify_type): Don't add _Atomic qualifiers from second argument.
7963 (comp_target_types): Do not allow _Atomic mismatches.
7964 (type_lists_compatible_p): Do not remove atomic qualifiers when
7965 comparing types.
7966 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7967 (build_atomic_assign): New functions.
7968 (build_unary_op): Use build_atomic_assign for atomic increment and
7969 decrement.
7970 (build_conditional_expr): Do not treat _Atomic void as a qualified
7971 version of void.
7972 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7973 (find_anonymous_field_with_type, convert_to_anonymous_field)
7974 (convert_for_assignment): Do not remove atomic qualifiers when
7975 comparing types.
7976 (digest_init): Do not accept initialization of arrays of atomic
7977 elements by string constants.
7978 (build_asm_expr): Use convert_lvalue_to_rvalue.
7979 (build_binary_op): Do not treat _Atomic void as a qualified
7980 version of void.
7981
0c249d4b
DD
79822013-11-06 DJ Delorie <dj@redhat.com>
7983
7984 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7985 both explicit and builtin, print the location of the explicit one.
7986
6d7f7e0a
TB
79872013-11-05 Tobias Burnus <burnus@net-b.de>
7988
7989 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7990 c_parser_omp_distribute, c_parser_omp_teams,
7991 c_parser_omp_target, c_parser_omp_declare): Handle
7992 -fopenmp-simd.
7993
b906f4ca
MP
79942013-11-03 Marek Polacek <polacek@redhat.com>
7995
7996 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7997
ee1d5a02
JJ
79982013-11-01 Jakub Jelinek <jakub@redhat.com>
7999
8000 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
8001 check_dup_generic at the end, unless remove is true.
8002 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
8003 remove = true;.
8004 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
8005
5a9785fb
JJ
80062013-10-31 Jakub Jelinek <jakub@redhat.com>
8007
8008 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
8009 with decl that is not pointer nor array.
8010
939b37da
BI
80112013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8012
8013 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
8014 a spawning function is found.
8015 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
8016 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
8017 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
8018 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
8019 case.
8020 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
8021 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
8022 expr.
8023 (c_finish_return): Added a check to reject _Cilk_spawn in return
8024 expression.
8025 (build_cilk_spawn): New function.
8026 (build_cilk_sync): Likewise.
8027 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
ab20d992 8028
d4af74d4
TB
80292013-10-27 Tobias Burnus <burnus@net-b.de>
8030
8031 PR other/33426
8032 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
8033 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
8034 (c_parser_statement_after_labels): Update calls.
8035
d73749df 80362013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8037
8038 PR other/33426
8039 * c-parser.c (c_parser_pragma, c_parser_for_statement):
8040 Handle PRAGMA_IVDEP.
8041 (c_parser_statement_after_labels): Update call.
8042
f28aa681
MP
80432013-10-24 Marek Polacek <polacek@redhat.com>
8044
8045 * c-parser.c (c_parser_struct_declaration): Add a comment.
8046 (c_parser_declarator): Don't allow _Alignas here.
8047
0645c1a2
AM
80482013-10-17 Andrew MacLeod <amacleod@redhat.com>
8049
8050 * c-parser.c: Include omp-low.h.
8051 * c-typeck.c: Likewise.
8052
568a31f2
MP
80532013-10-17 Marek Polacek <polacek@redhat.com>
8054
8055 PR c/58267
8056 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
8057 Document syntax of the array-declarator.
8058 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
8059 are not permitted.
8060 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
8061 (c_parser_struct_declaration): Likewise.
8062 (c_parser_declarator): Likewise.
8063 (c_parser_direct_declarator_inner): Likewise.
8064 (c_parser_parameter_declaration): Likewise.
8065 (c_parser_type_name): Likewise.
8066
acf0174b
JJ
80672013-10-11 Jakub Jelinek <jakub@redhat.com>
8068
8069 * c-lang.h (current_omp_declare_target_attribute): New extern
8070 decl.
8071 * c-parser.c: Include c-lang.h.
8072 (struct c_parser): Change tokens to c_token *.
8073 Add tokens_buf field. Change tokens_avail type to unsigned int.
8074 (c_parser_consume_token): If parser->tokens isn't
8075 &parser->tokens_buf[0], increment parser->tokens.
8076 (c_parser_consume_pragma): Likewise.
8077 (enum pragma_context): Add pragma_struct and pragma_param.
8078 (c_parser_external_declaration): Adjust
8079 c_parser_declaration_or_fndef caller.
8080 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
8081 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
8082 Adjust recursive call.
8083 (c_parser_struct_or_union_specifier): Use pragma_struct instead
8084 of pragma_external.
8085 (c_parser_parameter_declaration): Use pragma_param instead of
8086 pragma_external.
8087 (c_parser_compound_statement_nostart, c_parser_label,
8088 c_parser_for_statement): Adjust
8089 c_parser_declaration_or_fndef callers.
8090 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
8091 it through to c_parser_conditional_expression.
8092 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
8093 pass it through to c_parser_binary_expression. Adjust recursive
8094 call.
8095 (c_parser_binary_expression): Remove prec argument, add
8096 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
8097 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
8098 binop matches it, use build2 instead of parser_build_binary_op.
8099 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
8100 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
8101 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
8102 Handle pragma_struct and pragma_param the same as pragma_external.
8103 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
8104 (c_parser_omp_variable_list): Parse array sections for
8105 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
8106 (c_parser_omp_clause_collapse): Fully fold collapse expression.
8107 (c_parser_omp_clause_reduction): Handle user defined reductions.
8108 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
8109 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
8110 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
8111 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
8112 c_parser_omp_clause_depend, c_parser_omp_clause_map,
8113 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
8114 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
8115 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
8116 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
8117 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
8118 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
8119 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
8120 (c_parser_omp_for_loop): Add CODE argument, pass it through
8121 to c_finish_omp_for. Change last argument to cclauses,
8122 and adjust uses to grab parallel clauses from the array of all
8123 the split clauses. Adjust c_parser_binary_expression,
8124 c_parser_declaration_or_fndef and c_finish_omp_for callers.
8125 (omp_split_clauses): New function.
8126 (c_parser_omp_simd): New function.
8127 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
8128 Allow the function to be called also when parsing combined constructs,
8129 and call c_parser_omp_simd when parsing for simd.
8130 (c_parser_omp_sections_scope): If section-sequence doesn't start with
8131 #pragma omp section, require exactly one structured-block instead of
8132 sequence of statements.
8133 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
8134 Allow the function to be called also when parsing combined constructs.
8135 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
8136 Allow the function to be called also when parsing combined
8137 constructs.
8138 (c_parser_omp_taskgroup, c_parser_omp_cancel,
8139 c_parser_omp_cancellation_point, c_parser_omp_distribute,
8140 c_parser_omp_teams, c_parser_omp_target_data,
8141 c_parser_omp_target_update, c_parser_omp_target,
8142 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
8143 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
8144 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
8145 (c_parser_omp_construct): Add p_name and mask vars. Handle
8146 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
8147 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
8148 and c_parser_omp_sections callers.
8149 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
8150 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
8151 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
8152 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
8153 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
8154 OMP_CLAUSE_DEPEND.
8155 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
8156 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
8157 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
8158 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
8159 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
8160 * c-typeck.c: Include tree-inline.h.
8161 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
8162 handle_omp_array_sections_1, handle_omp_array_sections,
8163 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
8164 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
8165 user defined reductions.
8166 (c_tree_equal): New function.
8167 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
8168 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
8169 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
8170 c_check_omp_declare_reduction_r): New prototypes.
8171 * c-decl.c (current_omp_declare_target_attribute): New variable.
8172 (c_decl_attributes): New function.
8173 (start_decl, start_function): Use it instead of decl_attributes.
8174 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
8175 c_omp_reduction_decl, c_omp_reduction_lookup,
8176 c_check_omp_declare_reduction_r): New functions.
8177
0a6c2227
TT
81782013-09-25 Tom Tromey <tromey@redhat.com>
8179
8180 * Make-lang.in (c/gccspec.o): Remove.
8181 (CFLAGS-c/gccspec.o): New variable.
8182 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
8183 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
8184 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
8185
f3bc55f0
TT
81862013-09-25 Tom Tromey <tromey@redhat.com>
8187
8188 * Make-lang.in (c/gccspec.o): Don't use subshell.
8189
a24d975c
MP
81902013-09-18 Marek Polacek <polacek@redhat.com>
8191
8192 PR sanitize/58443
8193 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
8194 Remove unnecessary check.
8195
ce6923c5
MP
81962013-09-18 Marek Polacek <polacek@redhat.com>
8197
8198 PR sanitizer/58411
8199 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
8200 no_sanitize_undefined attribute.
8201
a1e51df9
KT
82022013-09-13 Kai Tietz <ktietz@redhat.com>
8203
8204 PR target/57848
8205 * c-decl.c (c_builtin_function_ext_scope): Remove
8206 wrong assumption that it is never called on prexisting
8207 symbol.
8208
0af94e6f
JR
82092013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8210
8211 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
8212
20059c8b
GDR
82132013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8214
8215 * c-objc-common.c (c_tree_printer): Tidy.
8216
de5a5fa1
MP
82172013-08-30 Marek Polacek <polacek@redhat.com>
8218
8219 * c-typeck.c (build_binary_op): Add division by zero and shift
8220 instrumentation.
8221
2531a1d9 82222013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 8223 Joseph Myers <joseph@codesourcery.com>
2531a1d9 8224
6e2bcc98 8225 PR c/35649
2531a1d9
JR
8226 * c-typeck.c (c_common_type): Prefer double_type_node over
8227 other REAL_TYPE types with the same precision.
8228 (convert_arguments): Likewise.
8229
025311c4
GDR
82302013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
8231
8232 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
8233 (c_initialize_diagnostics): Call a destructor for the early printer.
8234
da6ca2b5
GDR
82352013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8236
8237 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
8238 printer initialization.
8239
318cda85 82402013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 8241
318cda85
BI
8242 PR c/57490
8243 * c-array-notation.c (fix_conditional_array_notations_1): Added a
8244 check for truth values.
8245 (expand_array_notation_exprs): Added truth values case. Removed an
8246 unwanted else. Added for-loop to walk through subtrees in default
8247 case.
8248
b066401f
GDR
82492013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8250
8251 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
8252
fb48aadc
JM
82532013-07-23 Joseph Myers <joseph@codesourcery.com>
8254
8255 * c-parser.c (struct c_generic_association): Fix typo.
8256
433cc7b0
TT
82572013-07-23 Tom Tromey <tromey@redhat.com>
8258 Joseph Myers <joseph@codesourcery.com>
8259
8260 * c-parser.c (struct c_generic_association): New.
8261 (c_generic_association_d): New typedef.
8262 (c_parser_generic_selection): New function.
8263 (c_parser_postfix_expression): Handle RID_GENERIC.
8264
26d40c3d
JM
82652013-07-13 Jason Merrill <jason@redhat.com>
8266
8267 PR c++/57793
8268 * c-decl.c (finish_struct): Check for too-large class.
8269
ecdbd01a 82702013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8271
8272 PR c/57821
8273 * c-typeck.c (set_init_index): When folding, check for index overflow.
8274
1141ed3f
BI
82752013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8276
8277 * c-parser.c (c_parser_array_notation): Removed rejection of array
8278 notations in an array of function pointers.
8279
713b46fa
BI
82802013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8281
8282 * c-array-notation.c (make_triplet_val_inv): New function.
8283 (create_cmp_incr): Likewise.
8284 (create_array_refs): Likewise.
8285 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8286 Also modularized common parts between functions and called the function.
8287 (build_array_notation_expr): Likewise.
8288 (fix_conditional_array_notations_1): Likewise.
8289 (fix_array_notation_expr): Likewise.
8290 (fix_array_notation_call_expr): Likewise.
8291
92f20202
MP
82922013-06-18 Marek Polacek <polacek@redhat.com>
8293
8294 PR c/57630
8295 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8296
73a23b06
BI
82972013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8298
8299 * c-array-notation.c (build_array_notation_expr): Reject array notation
8300 mismatch between LHS and RHS even inside a call_expr. Also, removed
8301 a couple while statements that were dead code.
8302
00b8517d
BI
83032013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8304
8305 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8306 excessive precision expressions in function parameters. Also removed
8307 couple unwanted while statements.
8308
1509bdda
BI
83092013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8310
8311 * c-array-notation.c (expand_array_notation_exprs): Added
8312 ARRAY_NOTATION_REF case.
ab20d992 8313
d60f1706
BI
83142013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8315
8316 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8317 function to c-family/array-notation-common.c.
8318 (is_cilkplus_reduce_builtin): Likewise.
8319 (find_rank): Likewise.
8320 (extract_array_notation_exprs): Likewise.
8321 (replace_array_notations): Likewise.
8322 (find_inv_trees): Likewise.
8323 (replace_inv_trees): Likewise.
8324 (contains_array_notation_expr): Likewise.
8325 (find_correct_array_notation_type): Likewise.
8326 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8327 (struct inv_list): Moved this to c-family/array-notation-common.c.
8328 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
ab20d992 8329
6d6efbb3
BI
83302013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8331
8332 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8333 reduction functions outside the for-loop. Added a check if the fundecl
8334 is non-NULL. Finally, removed an unwanted if-statement, and made the
8335 body unconditional.
8336
25c22937
BI
83372013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8338
8339 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8340 condition of the if-statement matches the rank of else-block and then-
8341 block when array notations are used.
8342 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8343 expression after the entire function body is parsed.
8344 (c_parser_expr_no_commas): Delayed creating array notation expressions
8345 to the end of function parsing.
8346 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8347 whole if-statement instead of just the condition.
ab20d992 8348 (expand_array_notation_exprs): Added MODIFY_EXPR case.
25c22937 8349
edd25645
BI
83502013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8351
8352 PR c/57474
8353 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8354 array to NULL_TREE if they are unused. Also added a check for the
8355 field to be NULL before its fields are used in future.
ab20d992 8356
065ce7f1
RO
83572013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8358
8359 PR bootstrap/57450
8360 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8361 (build_array_notation_expr): Likewise.
8362
36536d79
BI
83632013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8364
8365 * c-typeck.c (build_array_ref): Added a check to see if array's
8366 index is greater than one. If true, then emit an error.
8367 (build_function_call_vec): Exclude error reporting and checking
8368 for builtin array-notation functions.
8369 (convert_arguments): Likewise.
8370 (c_finish_return): Added a check for array notations as a return
8371 expression. If true, then emit an error.
8372 (c_finish_loop): Added a check for array notations in a loop
8373 condition. If true then emit an error.
8374 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8375 (build_binary_op): Added a check for array notation expr inside
8376 op1 and op0. If present, we call another function to find correct
8377 type.
8378 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8379 * c-parser.c (c_parser_compound_statement): Check if array
8380 notation code is used in tree, if so, then transform them into
8381 appropriate C code.
8382 (c_parser_expr_no_commas): Check if array notation is used in LHS
8383 or RHS, if so, then build array notation expression instead of
8384 regular modify.
8385 (c_parser_postfix_expression_after_primary): Added a check for
8386 colon(s) after square braces, if so then handle it like an array
8387 notation. Also, break up array notations in unary op if found.
8388 (c_parser_direct_declarator_inner): Added a check for array
8389 notation.
8390 (c_parser_compound_statement): Added a check for array notation in
8391 a stmt. If one is present, then expand array notation expr.
8392 (c_parser_if_statement): Likewise.
8393 (c_parser_switch_statement): Added a check for array notations in
8394 a switch statement's condition. If true, then output an error.
8395 (c_parser_while_statement): Similarly, but for a while.
8396 (c_parser_do_statement): Similarly, but for a do-while.
8397 (c_parser_for_statement): Similarly, but for a for-loop.
8398 (c_parser_unary_expression): Check if array notation is used in a
8399 pre-increment or pre-decrement expression. If true, then expand
8400 them.
8401 (c_parser_array_notation): New function.
8402 * c-array-notation.c: New file.
8403 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
ab20d992 8404
cd192ccc
MS
84052013-05-23 Mike Stump <mikestump@comcast.net>
8406
8407 * c-typeck.c (convert_for_assignment): Handle references to memory
8408 spaces better.
8409
427b248d
JM
84102013-05-16 Jason Merrill <jason@redhat.com>
8411
8412 * Make-lang.in (cc1$(exeext)): Use link mutex.
8413
44d90fe1
PC
84142013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8415
8416 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8417 to simply use OPT_Wpointer_arith.
8418 (build_unary_op): Likewise.
8419
4e7d7b3d
JJ
84202013-04-03 Jakub Jelinek <jakub@redhat.com>
8421
8422 PR c/19449
8423 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8424 argument. If set, or it temporarily for parsing of the first
8425 argument into force_folding_builtin_constant_p.
8426 (c_parser_postfix_expression): Adjust callers.
8427
839b422f
RB
84282013-03-21 Richard Biener <rguenther@suse.de>
8429
8430 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8431 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8432
2ee028f1
MP
84332013-02-12 Marek Polacek <polacek@redhat.com>
8434
8435 PR c/44938
8436 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8437 origtypes to NULL.
8438
8824edff
JJ
84392013-01-24 Jakub Jelinek <jakub@redhat.com>
8440
8441 PR c/56078
8442 * c-typeck.c (set_nonincremental_init_from_string): If
8443 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8444 returned false.
8445 (process_init_element): Likewise.
8446
eadd3d0d
JJ
84472012-12-20 Jakub Jelinek <jakub@redhat.com>
8448
8449 PR c++/55619
8450 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8451 argument, don't call default_function_array_conversion
8452 nor c_fully_fold here.
8453 (c_parser_asm_statement): Adjust callers.
8454 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8455 and outputs here, and call default_function_array_conversion
8456 on inputs that don't need to be addressable.
8457
f8a93a2e
JJ
84582012-12-18 Jakub Jelinek <jakub@redhat.com>
8459
8460 PR c/39464
8461 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8462 warning require that both c_common_unsigned_type as well as
8463 c_common_signed_type is the same for both mvl and mvr types.
8464
9771b263
DN
84652012-11-16 Diego Novillo <dnovillo@google.com>
8466
8467 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8468
8469 * c-common.c: Use new vec API in vec.h.
8470 * c-common.h: Likewise.
8471 * c-gimplify.c: Likewise.
8472 * c-pragma.c: Likewise.
8473 * c-pretty-print.c: Likewise.
8474 * c-pretty-print.h: Likewise.
8475 * c-semantics.c: Likewise.
8476 * c-decl.c: Likewise.
8477 * c-parser.c: Likewise.
8478 * c-tree.h: Likewise.
8479 * c-typeck.c: Likewise.
8480
880661a4
JW
84812012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8482
8483 PR c++/54930
8484 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8485
077d1abe
MLI
84862012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8487
8488 PR c/53066
8489 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8490 shadows a function, unless the variable is a function or a
8491 pointer-to-function.
8492
3a785c97
JJ
84932012-10-12 Jakub Jelinek <jakub@redhat.com>
8494
8495 PR c/54381
8496 * c-parser.c (struct c_tree_loc_pair): Removed.
8497 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8498 add location_t * and tree * arguments, fill in array of 3
8499 sizeof_arg trees and corresponding locs.
8500 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8501 c_parser_expr_list callers.
8502 (c_parser_postfix_expression_after_primary): Likewise. Pass
8503 array of 3 sizeof_arg trees and locs (corresponding to first
8504 3 arguments) to sizeof_pointer_memaccess_warning.
8505
703c8606
LC
85062012-10-09 Lawrence Crowl <crowl@google.com>
8507
8508 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8509 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8510 hash table.
8511
5d9de0d0
PC
85122012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8513
8514 PR c++/54194
8515 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8516 call.
8517
a212e43f
MG
85182012-10-09 Marc Glisse <marc.glisse@inria.fr>
8519
8520 PR c++/54427
8521 * c-typeck.c: Include c-common.h.
8522 (enum stv_conv): Moved to c-common.h.
8523 (scalar_to_vector): Moved to c-common.c.
8524 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8525 * Make-lang.in: c-typeck.c depends on c-common.h.
8526
3b78de56
AC
85272012-10-04 Arnaud Charlet <charlet@adacore.com>
8528
8529 * c-decl.c (c_write_global_declarations): Fix handling of
8530 -fdump-ada-spec*.
8531
78c60e3d
SS
85322012-09-30 Sharad Singhai <singhai@google.com>
8533
8534 * c-decl.c (c_write_global_declarations): Use a different method
8535 to determine if the dump has ben initialized.
8536
9f33203d
JM
85372012-09-14 Joseph Myers <joseph@codesourcery.com>
8538
8539 PR c/54552
8540 * c-typeck.c (c_cast_expr): When casting to a type requiring
8541 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8542 c_fully_fold first.
8543
a27d595d
JM
85442012-09-14 Joseph Myers <joseph@codesourcery.com>
8545
8546 PR c/54103
8547 * c-typeck.c (build_unary_op): Pass original argument of
8548 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8549 any C_MAYBE_CONST_EXPR, if it has integer operands.
8550 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8551 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8552 to c_objc_common_truthvalue_conversion, then remove any
8553 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8554 c_objc_common_truthvalue_conversion not
8555 c_common_truthvalue_conversion.
8556 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8557 call note_integer_operands for arguments with integer operands
8558 that are not integer constants.
8559
9feb29df
JJ
85602012-09-13 Jakub Jelinek <jakub@redhat.com>
8561
8562 PR c/54559
8563 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8564 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8565
d409320c
JJ
85662012-08-31 Jakub Jelinek <jakub@redhat.com>
8567
8568 PR c/54428
8569 * c-convert.c (convert): Don't call fold_convert_loc if
8570 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8571 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8572 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8573
6265d07c
JJ
85742012-08-24 Jakub Jelinek <jakub@redhat.com>
8575
8576 PR c/54355
8577 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8578 for nested and empty_ok arguments in the call to
8579 c_parser_declaration_or_fndef.
8580
1a4049e7
JJ
85812012-08-17 Jakub Jelinek <jakub@redhat.com>
8582
8583 * c-tree.h (c_last_sizeof_arg): Declare.
8584 * c-parser.c (struct c_tree_loc_pair): New type.
8585 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8586 non-NULL.
8587 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8588 (c_parser_postfix_expression_after_primary): Likewise. Call
8589 sizeof_pointer_memaccess_warning if needed.
8590 (sizeof_ptr_memacc_comptypes): New function.
8591 * c-typeck.c (c_last_sizeof_arg): New global variable.
8592 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8593
0229aee9
UB
85942012-07-24 Uros Bizjak <ubizjak@gmail.com>
8595
8596 * c-lang.h (lang_decl): Add variable_size GTY option.
8597
7ee2468b
SB
85982012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8599
8600 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8601 * Make-lang.in: Fix dependencies.
8602
d4a10d0a
SB
86032012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8604
8605 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8606 and add language Makefile hooks.
8607 * config-lang.in: New file.
8608 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8609 add the required "normal" config-lang.in rules.
8610 * c-lang.h: Moved from gcc/ to here.
8611 * c-tree.h: Likewise.
8612 * c-objc-common.c: Likewise.
8613 * c-objc-common.h: Likewise.
8614 * c-typeck.c: Likewise.
8615 * c-convert.c: Likewise.
8616 * c-lang.c: Likewise.
8617 * c-aux-info.c: Likewise.
8618 * c-errors.c: Likewise.
8619 * gccspec.c: Likewise.
8620 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8621 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8622\f
877e3c2a 8623Copyright (C) 2012-2022 Free Software Foundation, Inc.
d4a10d0a
SB
8624
8625Copying and distribution of this file, with or without modification,
8626are permitted in any medium without royalty provided the copyright
8627notice and this notice are preserved.