]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/c/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c / ChangeLog
1 2022-09-15 Richard Biener <rguenther@suse.de>
2
3 * c-decl.cc (build_void_list_node): Remove.
4
5 2022-09-14 Julian Brown <julian@codesourcery.com>
6
7 * c-typeck.cc (c_finish_omp_clauses): Remove whole mapping node group
8 on error.
9
10 2022-09-07 Joseph Myers <joseph@codesourcery.com>
11
12 * c-parser.cc (c_parser_static_assert_declaration_no_semi)
13 (c_parser_alignas_specifier, c_parser_alignof_expression): Allow
14 for C2x spellings of keywords.
15 (c_parser_postfix_expression): Handle RID_TRUE and RID_FALSE.
16
17 2022-09-06 Jakub Jelinek <jakub@redhat.com>
18
19 * c-parser.cc (c_parser_omp_clause_doacross_sink): Don't verify val
20 in omp_cur_iteration - 1 has integer_type_node type.
21
22 2022-09-03 Jakub Jelinek <jakub@redhat.com>
23
24 * c-parser.cc (c_parser_omp_clause_name): Handle doacross.
25 (c_parser_omp_clause_depend_sink): Renamed to ...
26 (c_parser_omp_clause_doacross_sink): ... this. Add depend_p argument.
27 Handle parsing of doacross(sink:omp_cur_iteration-1). Use
28 OMP_CLAUSE_DOACROSS_SINK_NEGATIVE instead of
29 OMP_CLAUSE_DEPEND_SINK_NEGATIVE, build OMP_CLAUSE_DOACROSS instead
30 of OMP_CLAUSE_DEPEND and set OMP_CLAUSE_DOACROSS_DEPEND flag on it.
31 (c_parser_omp_clause_depend): Use OMP_CLAUSE_DOACROSS_SINK and
32 OMP_CLAUSE_DOACROSS_SOURCE instead of OMP_CLAUSE_DEPEND_SINK and
33 OMP_CLAUSE_DEPEND_SOURCE, build OMP_CLAUSE_DOACROSS for depend(source)
34 and set OMP_CLAUSE_DOACROSS_DEPEND on it.
35 (c_parser_omp_clause_doacross): New function.
36 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DOACROSS.
37 (c_parser_omp_depobj): Use OMP_CLAUSE_DEPEND_INVALID instead of
38 OMP_CLAUSE_DEPEND_SOURCE.
39 (c_parser_omp_for_loop): Don't diagnose here linear clause together
40 with ordered with argument.
41 (c_parser_omp_simd): Don't diagnose ordered clause with argument on
42 for simd.
43 (OMP_ORDERED_DEPEND_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DOACROSS.
44 (c_parser_omp_ordered): Handle also doacross and adjust for it
45 diagnostic wording.
46 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_DOACROSS.
47 Don't handle OMP_CLAUSE_DEPEND_SOURCE and OMP_CLAUSE_DEPEND_SINK.
48
49 2022-09-02 David Malcolm <dmalcolm@redhat.com>
50
51 PR c/90885
52 * c-parser.cc (c_parser_string_literal): Clear ret.m_decimal.
53 (c_parser_expr_no_commas): Likewise.
54 (c_parser_conditional_expression): Likewise.
55 (c_parser_binary_expression): Clear m_decimal when popping the
56 stack.
57 (c_parser_unary_expression): Clear ret.m_decimal.
58 (c_parser_has_attribute_expression): Likewise for result.
59 (c_parser_predefined_identifier): Likewise for expr.
60 (c_parser_postfix_expression): Likewise for expr.
61 Set expr.m_decimal when handling a CPP_NUMBER that was a decimal
62 token.
63 * c-tree.h (c_expr::m_decimal): New bitfield.
64 * c-typeck.cc (parser_build_binary_op): Clear result.m_decimal.
65 (parser_build_binary_op): Call check_for_xor_used_as_pow.
66
67 2022-09-01 Joseph Myers <joseph@codesourcery.com>
68
69 * c-decl.cc (grokparms): Handle () in a function declaration the
70 same as (void) for C2X.
71
72 2022-08-31 Joseph Myers <joseph@codesourcery.com>
73
74 * c-parser.cc (c_parser_label): Pass attributes to do_case.
75 * c-typeck.cc (do_case): Add argument ATTRS. Pass it to
76 c_add_case_label.
77
78 2022-08-26 Jakub Jelinek <jakub@redhat.com>
79
80 * c-typeck.cc (convert_arguments): Handle BUILT_IN_ISSIGNALING.
81
82 2022-08-25 Marek Polacek <polacek@redhat.com>
83
84 * c-convert.cc (c_convert) <case POINTER_TYPE>: Handle NULLPTR_TYPE.
85 Give a better diagnostic when converting to nullptr_t.
86 * c-decl.cc (c_init_decl_processing): Perform C-specific nullptr
87 initialization.
88 * c-parser.cc (c_parse_init): Maybe OR D_C2X into mask.
89 (c_parser_postfix_expression): Handle RID_NULLPTR.
90 * c-typeck.cc (null_pointer_constant_p): Return true when expr is
91 nullptr_node.
92 (build_unary_op) <case TRUTH_NOT_EXPR>: Handle NULLPTR_TYPE.
93 (build_conditional_expr): Handle the case when the second/third operand
94 is NULLPTR_TYPE and third/second operand is POINTER_TYPE.
95 (convert_for_assignment): Handle converting an expression of type
96 nullptr_t to pointer/bool.
97 (build_binary_op) <case TRUTH_XOR_EXPR>: Handle NULLPTR_TYPE.
98 <case EQ_EXPR>: Handle comparing operands of type nullptr_t.
99
100 2022-08-25 Joseph Myers <joseph@codesourcery.com>
101
102 * c-decl.cc (start_decl): Do not diagnose initialization of
103 variable-sized objects here.
104 * c-parser.cc (c_parser_braced_init): Add argument DECL. All
105 callers changed.
106 (c_parser_initializer): Diagnose initialization of variable-sized
107 objects other than with braced initializer.
108 (c_parser_braced_init): Use pedwarn_c11 for empty initializer
109 braces and update diagnostic text. Diagnose initialization of
110 variable-sized objects with nonempty braces.
111 * c-typeck.cc (digest_init): Update diagnostic for initialization
112 of variable-sized objects.
113 (really_start_incremental_init, set_designator)
114 (process_init_element): Update comments.
115 (pop_init_level): Allow scalar empty initializers.
116
117 2022-08-17 Tobias Burnus <tobias@codesourcery.com>
118 Chung-Lin Tang <cltang@codesourcery.com>
119
120 PR c++/104493
121 * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type
122 instead of removed langhook.
123 * c-typeck.cc (c_finish_omp_clauses): Likewise.
124
125 2022-08-11 Marek Polacek <polacek@redhat.com>
126
127 PR middle-end/102633
128 * c-parser.cc (c_parser_initializer): Add new tree parameter. Use it.
129 Call suppress_warning.
130 (c_parser_declaration_or_fndef): Pass d down to c_parser_initializer.
131 (c_parser_omp_declare_reduction): Pass omp_priv down to
132 c_parser_initializer.
133
134 2022-08-08 Tom Honermann <tom@honermann.net>
135
136 * c-parser.cc (c_parser_string_literal): Use char8_t as the type
137 of CPP_UTF8STRING when char8_t support is enabled.
138 * c-typeck.cc (digest_init): Allow initialization of an array
139 of character type by a string literal with type array of
140 char8_t.
141
142 2022-08-01 David Malcolm <dmalcolm@redhat.com>
143
144 * c-typeck.cc (build_c_cast): Quote names of address spaces in
145 diagnostics.
146 (convert_for_assignment): Add a note to address space mismatch
147 diagnostics, specifying the expected and actual types.
148
149 2022-07-10 Lewis Hyatt <lhyatt@gmail.com>
150
151 PR preprocessor/97498
152 * c-parser.cc (c_parser_pragma): Set input_location to the
153 location of the pragma, rather than the start of the line.
154
155 2022-07-04 Tobias Burnus <tobias@codesourcery.com>
156 Chung-Lin Tang <cltang@codesourcery.com>
157 Thomas Schwinge <thomas@codesourcery.com>
158
159 * c-parser.cc (c_parser_omp_target_data, c_parser_omp_target_update,
160 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Set
161 OMP_REQUIRES_TARGET_USED.
162 (c_parser_omp_requires): Remove sorry.
163
164 2022-07-01 Tobias Burnus <tobias@codesourcery.com>
165
166 * c-parser.cc (c_parser_omp_target_enter_data,
167 c_parser_omp_target_exit_data): Accept tofrom
168 map-type modifier but use 'to' / 'from' internally.
169
170 2022-06-16 David Malcolm <dmalcolm@redhat.com>
171
172 * c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
173 group the warning with any note.
174 (warn_about_goto): Likewise to group error or warning with note.
175 Bail out if the warning wasn't emitted, to avoid emitting orphan
176 notes.
177 (lookup_label_for_goto): Add auto_diagnostic_group to
178 group the error with the note.
179 (check_earlier_gotos): Likewise.
180 (c_check_switch_jump_warnings): Likewise for any error/warning.
181 Conditionalize emission of the notes.
182 (diagnose_uninitialized_cst_member): Likewise for warning,
183 conditionalizing emission of the note.
184 (grokdeclarator): Add auto_diagnostic_group to group the "array
185 type has incomplete element type" error with any note.
186 (parser_xref_tag): Add auto_diagnostic_group to group warnings
187 with their notes. Conditionalize emission of notes.
188 (start_struct): Add auto_diagnostic_group to group the
189 "redefinition of" errors with any note.
190 (start_enum): Likewise for "redeclaration of %<enum %E%>" error.
191 (check_for_loop_decls): Likewise for pre-C99 error.
192
193 2022-06-07 Jakub Jelinek <jakub@redhat.com>
194
195 * c-parser.cc (c_parser_omp_clause_linear): Parse OpenMP 5.2
196 style linear clause modifiers. Set
197 OMP_CLAUSE_LINEAR_OLD_LINEAR_MODIFIER flag on the clauses when
198 old style modifiers are used.
199 * c-typeck.cc (c_finish_omp_clauses): Only reject linear clause
200 with val modifier on simd or for if the old style modifiers are
201 used.
202
203 2022-06-02 David Malcolm <dmalcolm@redhat.com>
204
205 * c-lang.cc (LANG_HOOKS_GET_SARIF_SOURCE_LANGUAGE): Redefine.
206 (c_get_sarif_source_language): New.
207 * c-tree.h (c_get_sarif_source_language): New decl.
208
209 2022-05-31 Jason Merrill <jason@redhat.com>
210
211 * Make-lang.in (c.tags): Look at *.cc.
212
213 2022-05-31 Jakub Jelinek <jakub@redhat.com>
214
215 * c-parser.cc (OMP_SCOPE_CLAUSE_MASK): Add firstprivate and allocate
216 clauses.
217
218 2022-05-28 Jakub Jelinek <jakub@redhat.com>
219
220 * c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
221 seen first, use "%<to%>" or "%<enter%>" depending on
222 OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
223 "%<to%> or %<enter%>" wording.
224
225 2022-05-27 Jakub Jelinek <jakub@redhat.com>
226
227 * c-parser.cc (c_parser_omp_clause_name): Parse enter clause.
228 (c_parser_omp_all_clauses): For to clause on declare target, use
229 OMP_CLAUSE_ENTER clause with OMP_CLAUSE_ENTER_TO instead of
230 OMP_CLAUSE_TO_DECLARE clause. Handle PRAGMA_OMP_CLAUSE_ENTER.
231 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add enter clause.
232 (c_parser_omp_declare_target): Use OMP_CLAUSE_ENTER instead of
233 OMP_CLAUSE_TO_DECLARE.
234 * c-typeck.cc (c_finish_omp_clauses): Handle OMP_CLAUSE_ENTER instead
235 of OMP_CLAUSE_TO_DECLARE, to OMP_CLAUSE_ENTER_TO use "to" as clause
236 name in diagnostics instead of
237 omp_clause_code_name[OMP_CLAUSE_CODE (c)].
238
239 2022-05-25 Jakub Jelinek <jakub@redhat.com>
240
241 PR c/91134
242 * c-tree.h (build_component_ref): Add ARROW_LOC location_t argument.
243 * c-typeck.cc (build_component_ref): Likewise. If DATUM is
244 INDIRECT_REF and ARROW_LOC isn't UNKNOWN_LOCATION, print a different
245 diagnostic and fixit hint if DATUM has pointer type.
246 * c-parser.cc (c_parser_postfix_expression,
247 c_parser_omp_variable_list): Adjust build_component_ref callers.
248 * gimple-parser.cc (c_parser_gimple_postfix_expression_after_primary):
249 Likewise.
250
251 2022-05-24 Jakub Jelinek <jakub@redhat.com>
252
253 PR c/105378
254 * c-parser.cc (OMP_TASKWAIT_CLAUSE_MASK): Add nowait clause.
255
256 2022-05-18 Marek Polacek <polacek@redhat.com>
257
258 PR c/105131
259 * c-decl.cc (diagnose_mismatched_decls): Warn about enum/integer type
260 mismatches.
261 * c-tree.h (comptypes_check_enum_int): Declare.
262 * c-typeck.cc (comptypes): No longer static.
263
264 2022-05-17 Marek Polacek <polacek@redhat.com>
265
266 * c-decl.cc (finish_enum): Store the CONST_DECL into TREE_VALUE, not
267 its value.
268
269 2022-05-17 Jakub Jelinek <jakub@redhat.com>
270
271 * c-parser.cc (c_parser_omp_clause_depend): Parse
272 inoutset depend-kind.
273 (c_parser_omp_depobj): Likewise.
274
275 2022-05-16 Martin Liska <mliska@suse.cz>
276
277 * c-decl.cc (match_builtin_function_types): Use ARRAY_SIZE.
278
279 2022-05-12 Jakub Jelinek <jakub@redhat.com>
280
281 * c-parser.cc (c_parse_init): Register omp_all_memory as keyword
282 if flag_openmp.
283 (c_parser_postfix_expression): Diagnose uses of omp_all_memory
284 in postfix expressions.
285 (c_parser_omp_variable_list): Handle omp_all_memory in depend
286 clause.
287 * c-typeck.cc (c_finish_omp_clauses): Handle omp_all_memory
288 keyword in depend clause as null_pointer_node, diagnose invalid
289 uses.
290
291 2022-05-09 Martin Liska <mliska@suse.cz>
292
293 * c-parser.cc (c_parser_conditional_expression): Use {,UN}LIKELY
294 macros.
295 (c_parser_binary_expression): Likewise.
296
297 2022-05-07 Marek Polacek <polacek@redhat.com>
298
299 PR c++/101833
300 PR c++/47634
301 * c-objc-common.cc (maybe_adjust_arg_pos_for_attribute): New.
302
303 2022-04-08 Jakub Jelinek <jakub@redhat.com>
304
305 PR c/105149
306 * c-typeck.cc (c_build_va_arg): Reject function types.
307
308 2022-03-22 Marek Polacek <polacek@redhat.com>
309
310 PR c/82283
311 PR c/84685
312 * c-typeck.cc (struct initializer_stack): Add 'designated' member.
313 (start_init): Set it.
314 (finish_init): Restore constructor_designated.
315 (push_init_level): Set constructor_designated to the value of
316 constructor_designated in the upper constructor_stack.
317
318 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
319
320 PR other/65095
321 * c-typeck.cc (handle_omp_array_sections_1)
322 (c_oacc_check_attachments): Call 'user_omp_clause_code_name'
323 instead of 'c_omp_map_clause_name'.
324
325 2022-03-09 Joseph Myers <joseph@codesourcery.com>
326
327 * c-typeck.cc (function_types_compatible_p): Do not handle C2X
328 differently from earlier standards for unprototyped function type
329 compatibility.
330
331 2022-03-09 Jakub Jelinek <jakub@redhat.com>
332
333 PR c/104711
334 * c-fold.cc (c_fully_fold_internal): Don't emit
335 -Wshift-negative-value warning if TYPE_OVERFLOW_WRAPS.
336 * c-typeck.cc (build_binary_op): Likewise.
337
338 2022-03-07 Jakub Jelinek <jakub@redhat.com>
339
340 * c-parser.cc (c_parser_omp_clause_map): Add missing space in string
341 literal.
342
343 2022-02-23 Richard Biener <rguenther@suse.de>
344
345 * gimple-parser.cc (c_parser_parse_gimple_body): Diagnose
346 SSA names without definition.
347 (c_parser_gimple_declaration): Handle pointer typed SSA names.
348
349 2022-02-17 Jakub Jelinek <jakub@redhat.com>
350
351 PR c/104532
352 * c-parser.cc (c_parser_omp_variable_list): For CPP_DEREF, use
353 convert_lvalue_to_rvalue and build_indirect_ref instead of
354 build_simple_mem_ref.
355
356 2022-02-11 Richard Biener <rguenther@suse.de>
357
358 * gimple-parser.cc (c_parser_gimple_statement): Properly parse
359 VEC_COND_EXPRs.
360
361 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
362
363 * c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
364 clause.
365 (c_parser_omp_variable_list): Handle array sections.
366 (c_parser_omp_clause_has_device_addr): Added.
367 (c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
368 case.
369 (c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to
370 OMP_CLAUSE_MASK.
371 * c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
372 (c_finish_omp_clauses): Handle array sections.
373
374 2022-02-09 Jakub Jelinek <jakub@redhat.com>
375
376 PR c/104427
377 * c-parser.cc (c_parser_postfix_expression)
378 <case RID_BUILTIN_ASSOC_BARRIER>: Use parser_build_unary_op
379 instead of build1_loc to build PAREN_EXPR.
380 * c-typeck.cc (build_unary_op): Handle PAREN_EXPR.
381 * c-fold.cc (c_fully_fold_internal): Likewise.
382
383 2022-01-17 Martin Liska <mliska@suse.cz>
384
385 * Make-lang.in: Rename .c names to .cc.
386 * c-convert.cc: Likewise.
387 * c-decl.cc (struct lang_identifier): Likewise.
388 (pop_scope): Likewise.
389 (finish_decl): Likewise.
390 * c-objc-common.h (GCC_C_OBJC_COMMON): Likewise.
391 * c-parser.cc (c_parser_skip_to_end_of_block_or_statement): Likewise.
392 * c-parser.h (GCC_C_PARSER_H): Likewise.
393 * c-tree.h (c_keyword_starts_typename): Likewise.
394 (finish_declspecs): Likewise.
395 (c_get_alias_set): Likewise.
396 (enum c_oracle_request): Likewise.
397 (tag_exists_p): Likewise.
398 (set_c_expr_source_range): Likewise.
399 * c-typeck.cc (c_common_type): Likewise.
400 (c_finish_omp_clauses): Likewise.
401 * config-lang.in: Likewise.
402
403 2022-01-17 Martin Liska <mliska@suse.cz>
404
405 * c-aux-info.c: Moved to...
406 * c-aux-info.cc: ...here.
407 * c-convert.c: Moved to...
408 * c-convert.cc: ...here.
409 * c-decl.c: Moved to...
410 * c-decl.cc: ...here.
411 * c-errors.c: Moved to...
412 * c-errors.cc: ...here.
413 * c-fold.c: Moved to...
414 * c-fold.cc: ...here.
415 * c-lang.c: Moved to...
416 * c-lang.cc: ...here.
417 * c-objc-common.c: Moved to...
418 * c-objc-common.cc: ...here.
419 * c-parser.c: Moved to...
420 * c-parser.cc: ...here.
421 * c-typeck.c: Moved to...
422 * c-typeck.cc: ...here.
423 * gccspec.c: Moved to...
424 * gccspec.cc: ...here.
425 * gimple-parser.c: Moved to...
426 * gimple-parser.cc: ...here.
427
428 2022-01-17 Andrew Stubbs <ams@codesourcery.com>
429
430 * c-parser.c (c_parser_omp_requires): Don't "sorry" dynamic_allocators.
431
432 2022-01-14 Chung-Lin Tang <cltang@codesourcery.com>
433
434 PR c++/103705
435 * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
436 outer node for ARRAY_REFs.
437
438 2022-01-01 Jakub Jelinek <jakub@redhat.com>
439
440 PR objc/103639
441 * c-typeck.c (c_finish_bc_stmt): For break inside of switch inside of
442 ObjC foreach, emit normal BREAK_STMT rather than goto to label.
443
444 2021-12-17 Marek Polacek <polacek@redhat.com>
445
446 PR c/103649
447 * c-decl.c (c_warn_unused_attributes): Don't warn for
448 attribute_ignored_p.
449 * c-parser.c (c_parser_std_attribute): Skip parsing of the attribute
450 arguments when the attribute is ignored.
451
452 2021-12-14 Jakub Jelinek <jakub@redhat.com>
453
454 PR c/103587
455 * c-parser.c (c_parser_balanced_token_sequence): For CPP_PRAGMA,
456 consume the pragma and silently skip to the pragma eol.
457
458 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
459
460 * c-decl.c: Define INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR.
461 * c-parser.c: Likewise.
462
463 2021-12-09 Jakub Jelinek <jakub@redhat.com>
464
465 PR pch/71934
466 * c-decl.c (resort_field_decl_cmp): Pass the same pointer twice
467 to resort_data.new_value.
468
469 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
470
471 * c-parser.c (struct omp_dim): New struct type for use inside
472 c_parser_omp_variable_list.
473 (c_parser_omp_variable_list): Allow multiple levels of array and
474 component accesses in array section base-pointer expression.
475 (c_parser_omp_clause_to): Set 'allow_deref' to true in call to
476 c_parser_omp_var_list_parens.
477 (c_parser_omp_clause_from): Likewise.
478 * c-typeck.c (handle_omp_array_sections_1): Extend allowed range
479 of base-pointer expressions involving INDIRECT/MEM/ARRAY_REF and
480 POINTER_PLUS_EXPR.
481 (c_finish_omp_clauses): Extend allowed ranged of expressions
482 involving INDIRECT/MEM/ARRAY_REF and POINTER_PLUS_EXPR.
483
484 2021-12-08 Chung-Lin Tang <cltang@codesourcery.com>
485
486 PR middle-end/92120
487 * c-parser.c (c_parser_omp_clause_map): Set 'allow_deref' argument in
488 call to c_parser_omp_variable_list to 'true'.
489 * c-typeck.c (handle_omp_array_sections_1): Add strip of MEM_REF in
490 array base handling.
491 (c_finish_omp_clauses): Handle 'A->member' case in map clauses.
492
493 2021-11-30 Thomas Schwinge <thomas@codesourcery.com>
494
495 * c-typeck.c (c_finish_omp_clauses): Remove "gang reduction on an
496 orphan loop" checking.
497
498 2021-11-30 Cesar Philippidis <cesar@codesourcery.com>
499 Thomas Schwinge <thomas@codesourcery.com>
500
501 * c-typeck.c (c_finish_omp_clauses): Emit an error on orphan
502 OpenACC gang reductions.
503
504 2021-11-30 Richard Biener <rguenther@suse.de>
505
506 * gimple-parser.c (c_parser_gimple_postfix_expression):
507 avoid unreachable code after break.
508
509 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
510
511 PR other/103021
512 * Make-lang.in: Use ETAGS variable in TAGS target.
513
514 2021-11-29 Richard Biener <rguenther@suse.de>
515
516 * c-typeck.c (c_tree_equal): Remove unreachable return.
517 * c-parser.c (get_matching_symbol): Likewise.
518
519 2021-11-23 Jakub Jelinek <jakub@redhat.com>
520
521 * c-typeck.c (c_clone_omp_udr): Don't initialize
522 id.transform_lang_insert_block.
523
524 2021-11-19 Martin Sebor <msebor@redhat.com>
525
526 PR c++/33925
527 PR c/102867
528 * c-typeck.c (maybe_warn_for_null_address): Suppress warnings for
529 code resulting from macro expansion.
530
531 2021-11-19 Martin Liska <mliska@suse.cz>
532
533 Revert:
534 2021-11-19 Martin Liska <mliska@suse.cz>
535
536 * c-parser.c (add_debug_begin_stmt): Use option directly.
537
538 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
539
540 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_ASSOC_BARRIER.
541 * c-parser.c (c_parser_postfix_expression): Likewise.
542
543 2021-11-18 Martin Liska <mliska@suse.cz>
544
545 * c-parser.c (add_debug_begin_stmt): Use option directly.
546
547 2021-11-17 Martin Sebor <msebor@redhat.com>
548
549 PR c/101702
550 * c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
551 bounds before deciding if they're constant.
552
553 2021-11-15 Jakub Jelinek <jakub@redhat.com>
554
555 * c-parser.c (OMP_TARGET_CLAUSE_MASK): Add
556 PRAGMA_OMP_CLAUSE_THREAD_LIMIT.
557
558 2021-11-11 Jakub Jelinek <jakub@redhat.com>
559
560 * c-parser.c (c_parser_omp_clause_num_teams): Parse optional
561 lower-bound and store it into OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR.
562 Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of
563 OMP_CLAUSE_NUM_TEAMS_EXPR.
564 (c_parser_omp_target): For OMP_CLAUSE_NUM_TEAMS evaluate before
565 combined target teams even lower-bound expression.
566
567 2021-11-11 Richard Biener <rguenther@suse.de>
568
569 * gimple-parser.c: Shuffle bitmap.h include.
570
571 2021-11-03 Joseph Myers <joseph@codesourcery.com>
572
573 PR c/103031
574 * c-convert.c (c_convert): New function, based on convert.
575 (convert): Make into wrapper of c_convert.
576 (convert_init): New function.
577 * c-typeck.c (enum impl_conv): Add ic_init_const.
578 (convert_for_assignment): Handle ic_init_const like ic_init. Add
579 new argument to convert_and_check call.
580 (digest_init): Pass ic_init_const to convert_for_assignment for
581 initializers required to be constant.
582
583 2021-11-02 Richard Sandiford <richard.sandiford@arm.com>
584
585 * c-tree.h (c_simulate_record_decl): Declare.
586 * c-objc-common.h (LANG_HOOKS_SIMULATE_RECORD_DECL): Override.
587 * c-decl.c (c_simulate_record_decl): New function.
588
589 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
590
591 PR other/102663
592 * Make-lang.in: Add dummy c.install-dvi target.
593
594 2021-10-15 Richard Biener <rguenther@suse.de>
595
596 PR c/102763
597 * gimple-parser.c
598 (c_parser_gimple_postfix_expression_after_primary): Check
599 for a pointer do be dereferenced by ->.
600
601 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
602
603 * c-parser.c (c_finish_omp_declare_variant): Change call from
604 c_omp_check_context_selector to omp_check_context_selector. Change
605 call from c_omp_mark_declare_variant to omp_mark_declare_variant.
606
607 2021-10-09 Jakub Jelinek <jakub@redhat.com>
608
609 * c-parser.c (c_parser_omp_structured_block_sequence): New function.
610 (c_parser_omp_scan_loop_body): Use it.
611 (c_parser_omp_sections_scope): Likewise.
612
613 2021-10-07 Richard Biener <rguenther@suse.de>
614
615 * c-typeck.c (lvalue_p): Also allow MEM_REF and TARGET_MEM_REF.
616
617 2021-10-05 Richard Biener <rguenther@suse.de>
618
619 PR c/102605
620 * gimple-parser.c (c_parser_gimple_postfix_expression):
621 Accept more address _Literals.
622
623 2021-10-04 Marek Polacek <polacek@redhat.com>
624
625 PR c++/97573
626 * c-typeck.c (parser_build_binary_op): Call do_warn_array_compare.
627
628 2021-10-01 Martin Sebor <msebor@redhat.com>
629
630 PR c/102103
631 * c-typeck.c (maybe_warn_for_null_address): New function.
632 (build_binary_op): Call it.
633
634 2021-10-01 Jakub Jelinek <jakub@redhat.com>
635 Richard Biener <rguenther@suse.de>
636
637 PR sanitizer/102515
638 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
639 for division even for SANITIZE_SI_OVERFLOW.
640
641 2021-10-01 Jakub Jelinek <jakub@redhat.com>
642
643 * c-parser.c (c_parser_omp_clause_order): Set
644 OMP_CLAUSE_ORDER_REPRODUCIBLE for explicit reproducible: modifier.
645
646 2021-09-28 Andrew Pinski <apinski@marvell.com>
647
648 PR c/32122
649 * c-parser.c (c_parser_statement_after_labels): Pass
650 the c_expr instead of the tree to c_finish_goto_ptr.
651 * c-typeck.c (c_finish_goto_ptr): Change the second
652 argument type to c_expr.
653 * c-tree.h (c_finish_goto_ptr): Likewise.
654 Error out if the expression was not of a pointer type.
655
656 2021-09-22 Jakub Jelinek <jakub@redhat.com>
657
658 * c-parser.c (c_parser_omp_clause_allocate): Parse allocate clause
659 modifiers.
660
661 2021-09-18 Jakub Jelinek <jakub@redhat.com>
662
663 * c-parser.c (c_parser_omp_clause_order): Parse unconstrained
664 and reproducible modifiers.
665 (OMP_DISTRIBUTE_CLAUSE_MASK): Add order clause.
666
667 2021-09-18 Jakub Jelinek <jakub@redhat.com>
668
669 * c-parser.c (c_parser_omp_clause_default): Handle private and
670 firstprivate arguments, adjust diagnostics on unknown argument.
671
672 2021-09-17 Jakub Jelinek <jakub@redhat.com>
673
674 * c-parser.c (c_parser_omp_atomic): Reject atomic swap if capture
675 is true.
676
677 2021-09-10 Jakub Jelinek <jakub@redhat.com>
678
679 * c-parser.c (c_parser_conditional_expression): If omp_atomic_lhs and
680 cond.value is >, < or == with omp_atomic_lhs as one of the operands,
681 don't call build_conditional_expr, instead build a COND_EXPR directly.
682 (c_parser_binary_expression): Avoid calling parser_build_binary_op
683 if omp_atomic_lhs even in more cases for >, < or ==.
684 (c_parser_omp_atomic): Update function comment for OpenMP 5.1 atomics,
685 parse OpenMP 5.1 atomics and fail, compare and weak clauses, allow
686 acq_rel on atomic read/write and acq_rel/acquire clauses on update.
687 * c-typeck.c (build_binary_op): For flag_openmp only handle
688 MIN_EXPR/MAX_EXPR.
689
690 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
691
692 * c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
693 directive.
694
695 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
696
697 * c-decl.c (enum deprecated_states): Add unavailable state.
698 (merge_decls): Copy unavailability.
699 (quals_from_declspecs): Handle unavailable case.
700 (start_decl): Amend the logic handling suppression of nested
701 deprecation states to include unavailability.
702 (smallest_type_quals_location): Amend comment.
703 (grokdeclarator): Handle the unavailable deprecation state.
704 (declspecs_add_type): Set TREE_UNAVAILABLE from the decl specs.
705 * c-tree.h (struct c_declspecs): Add unavailable_p.
706 * c-typeck.c (build_component_ref): Handle unavailability.
707 (build_external_ref): Likewise.
708
709 2021-09-01 Roger Sayle <roger@nextmovesoftware.com>
710 Joseph Myers <joseph@codesourcery.com>
711
712 PR c/79412
713 * c-decl.c (duplicate_decls): On significant mismatches, mark the
714 types of both (non-function) decls as error_mark_node, so that the
715 middle-end can see the code is malformed.
716 (free_attr_access_data): Don't process if the type has been set to
717 error_mark_node.
718
719 2021-08-31 Marcel Vollweiler <marcel@codesourcery.com>
720
721 * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers 'device_num'
722 and 'ancestor' in 'target device' clauses.
723
724 2021-08-23 Jakub Jelinek <jakub@redhat.com>
725
726 * c-parser.c (c_parser_omp_clause_num_tasks,
727 c_parser_omp_clause_grainsize): Parse the optional strict: modifier.
728
729 2021-08-22 Martin Uecker <muecker@gwdg.de>
730
731 PR c/98397
732 * c-typeck.c (comp_target_types): Change pedwarn to pedwarn_c11
733 for pointers to arrays with qualifiers.
734 (build_conditional_expr): For C23 don't lose qualifiers for pointers
735 to arrays when the other pointer is a void pointer. Update warnings.
736 (convert_for_assignment): Update warnings for C2X when converting from
737 void* with qualifiers to a pointer to array with the same qualifiers.
738
739 2021-08-20 Jakub Jelinek <jakub@redhat.com>
740
741 * c-parser.c (c_parser_omp_error): New function.
742 (c_parser_pragma): Handle PRAGMA_OMP_ERROR.
743
744 2021-08-20 Jakub Jelinek <jakub@redhat.com>
745
746 * c-parser.c (c_parser_omp_clause_depend_sink): Reject spurious
747 comma at the end of list.
748 (c_parser_omp_requires): Likewise.
749
750 2021-08-19 Jakub Jelinek <jakub@redhat.com>
751
752 * c-parser.c (c_parser_omp_requires): Don't call
753 c_parser_peek_2nd_token and optionally consume token if current
754 token is CPP_EOF, CPP_PRAGMA_EOL or CPP_CLOSE_PAREN.
755
756 2021-08-18 Jakub Jelinek <jakub@redhat.com>
757
758 * c-parser.c (c_parser_omp_nothing): New function.
759 (c_parser_pragma): Handle PRAGMA_OMP_NOTHING.
760
761 2021-08-18 Jakub Jelinek <jakub@redhat.com>
762
763 * c-parser.c (c_parser_statement_after_labels): Add restart label
764 near the start of the function. If c_parser_pragma returns false,
765 goto restart.
766 (c_parser_pragma): For PRAGMA_OMP_CANCELLATION_POINT return what
767 c_parser_omp_cancellation_point returned. For PRAGMA_OMP_DECLARE
768 return what c_parser_omp_declare returned. Return true instead of
769 false after emitting errors that the directive is not allowed in
770 pragma_stmt context.
771 (c_parser_omp_ordered): Return true instead of
772 false after emitting errors that the directive is not allowed in
773 pragma_stmt context.
774 (c_parser_omp_target_update): Likewise.
775 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data):
776 Change return type from tree to bool, return false if the
777 directive should be ignored in pragma_stmt contexts.
778 (c_parser_omp_target): Adjust callers of c_parser_omp_target_*_data,
779 return their result directly.
780 (c_parser_omp_cancellation_point): Change return type from void to
781 bool, return false if the directive should be ignored in pragma_stmt
782 contexts.
783 (c_parser_omp_declare): Likewise.
784
785 2021-08-17 Jakub Jelinek <jakub@redhat.com>
786
787 * c-parser.c (OMP_SCOPE_CLAUSE_MASK): Define.
788 (c_parser_omp_scope): New function.
789 (c_parser_omp_construct): Handle PRAGMA_OMP_SCOPE.
790
791 2021-08-12 Jakub Jelinek <jakub@redhat.com>
792
793 * c-parser.c (c_parser_omp_clause_name): Parse filter clause name.
794 (c_parser_omp_clause_filter): New function.
795 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_FILTER.
796 (OMP_MASKED_CLAUSE_MASK): Define.
797 (c_parser_omp_masked): New function.
798 (c_parser_omp_parallel): Handle parallel masked.
799 (c_parser_omp_construct): Handle PRAGMA_OMP_MASKED.
800 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_FILTER.
801
802 2021-08-12 Martin Uecker <muecker@gwdg.de>
803
804 PR c/101838
805 PR c/29970
806 * c-typeck.c (c_expr_sizeof_type): Evaluate
807 size expressions for structs of variable size.
808
809 2021-08-12 Tobias Burnus <tobias@codesourcery.com>
810
811 * c-parser.c (c_parser_omp_clause_proc_bind): Accept
812 'primary' as alias for 'master'.
813
814 2021-08-10 Martin Uecker <muecker@gwdg.de>
815
816 PR c/29970
817 * c-typeck.c (c_expr_sizeof_expr): Evaluate
818 size expressions for structs of variable size.
819
820 2021-08-06 Tamar Christina <tamar.christina@arm.com>
821
822 * c-decl.c (c_simulate_enum_decl): Pass vec<> by pointer.
823 * c-tree.h (c_simulate_enum_decl): Likewise.
824
825 2021-08-06 Martin Sebor <msebor@redhat.com>
826
827 * c-parser.c (c_parser_declaration_or_fndef): Adjust by-value function
828 vec arguments to by-reference.
829 (c_finish_omp_declare_simd): Same.
830 (c_parser_compound_statement_nostart): Same.
831 (c_parser_for_statement): Same.
832 (c_parser_objc_methodprotolist): Same.
833 (c_parser_oacc_routine): Same.
834 (c_parser_omp_for_loop): Same.
835 (c_parser_omp_declare_simd): Same.
836
837 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
838 Joseph Myers <joseph@codesourcery.com>
839 Cesar Philippidis <cesar@codesourcery.com>
840
841 * c-parser.c (c_parser_omp_clause_name): Handle 'nohost'.
842 (c_parser_oacc_all_clauses): Handle 'PRAGMA_OACC_CLAUSE_NOHOST'.
843 (OACC_ROUTINE_CLAUSE_MASK): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
844 * c-typeck.c (c_finish_omp_clauses): Handle 'OMP_CLAUSE_NOHOST'.
845
846 2021-07-20 Martin Sebor <msebor@redhat.com>
847
848 * c-tree.h (c_build_function_call_vec): Adjust by-value argument to
849 by-const-reference.
850 * c-typeck.c (c_build_function_call_vec): Same.
851
852 2021-07-15 Martin Sebor <msebor@redhat.com>
853
854 PR c/101289
855 PR c/97548
856 * c-decl.c (get_parm_array_spec): Strip nops.
857
858 2021-07-06 Martin Sebor <msebor@redhat.com>
859
860 * c-objc-common.c (c_tree_printer): Remove support for %G and %K.
861
862 2021-07-02 Jakub Jelinek <jakub@redhat.com>
863
864 PR c/101297
865 * c-parser.c (c_parser_omp_atomic): Consume comma only if it
866 appears before a CPP_NAME.
867
868 2021-06-25 Martin Sebor <msebor@redhat.com>
869
870 * c-decl.c (pop_scope): Replace direct uses of TREE_NO_WARNING with
871 warning_suppressed_p, suppress_warning, and copy_no_warning.
872 (diagnose_mismatched_decls): Same.
873 (duplicate_decls): Same.
874 (grokdeclarator): Same.
875 (finish_function): Same.
876 (c_write_global_declarations_1): Same.
877 * c-fold.c (c_fully_fold_internal): Same.
878 * c-parser.c (c_parser_expr_no_commas): Same.
879 (c_parser_postfix_expression): Same.
880 * c-typeck.c (array_to_pointer_conversion): Same.
881 (function_to_pointer_conversion): Same.
882 (default_function_array_conversion): Same.
883 (convert_lvalue_to_rvalue): Same.
884 (default_conversion): Same.
885 (build_indirect_ref): Same.
886 (build_function_call_vec): Same.
887 (build_atomic_assign): Same.
888 (build_unary_op): Same.
889 (c_finish_return): Same.
890 (emit_side_effect_warnings): Same.
891 (c_finish_stmt_expr): Same.
892 (c_omp_clause_copy_ctor): Same.
893
894 2021-06-24 Jakub Jelinek <jakub@redhat.com>
895
896 PR c/101176
897 * c-parser.c (c_parser_has_attribute_expression): Set source range for
898 the result.
899
900 2021-06-24 Jakub Jelinek <jakub@redhat.com>
901
902 PR c/101171
903 * c-typeck.c (build_c_cast): Don't call note_integer_operands on
904 error_mark_node.
905
906 2021-06-24 Jakub Jelinek <jakub@redhat.com>
907
908 * c-parser.c (omp_split_clauses): Pass C_ORT_OMP_TARGET instead of
909 C_ORT_OMP for clauses on target construct.
910 (OMP_TARGET_CLAUSE_MASK): Add in_reduction clause.
911 (c_parser_omp_target): For non-combined target add
912 map (always, tofrom:) clauses for OMP_CLAUSE_IN_REDUCTION. Pass
913 C_ORT_OMP_TARGET to c_finish_omp_clauses.
914 * c-typeck.c (handle_omp_array_sections): Adjust ort handling
915 for addition of C_ORT_OMP_TARGET and simplify, mapping clauses are
916 never present on C_ORT_*DECLARE_SIMD.
917 (c_finish_omp_clauses): Likewise. Handle OMP_CLAUSE_IN_REDUCTION
918 on C_ORT_OMP_TARGET, set OMP_CLAUSE_MAP_IN_REDUCTION on
919 corresponding map clauses.
920
921 2021-06-21 Jakub Jelinek <jakub@redhat.com>
922
923 PR inline-asm/100785
924 * c-typeck.c (c_mark_addressable): Diagnose trying to make
925 bit-fields addressable.
926
927 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
928
929 * c-decl.c (merge_decls): Copy DECL_USER_ALIGN if DECL_ALIGN is
930 similar.
931
932 2021-06-14 Tobias Burnus <tobias@codesourcery.com>
933
934 PR c/100913
935 * c-parser.c (c_parser_omp_clause_affinity): No need to set iterator
936 var in the error case.
937
938 2021-06-07 Eric Botcazou <ebotcazou@adacore.com>
939
940 PR c/100920
941 * c-typeck.c (convert_for_assignment): Test fndecl_built_in_p to
942 spot built-in functions.
943
944 2021-06-06 Jakub Jelinek <jakub@redhat.com>
945
946 PR c/100902
947 * c-parser.c (c_parser_omp_target): Call c_omp_adjust_map_clauses
948 even when target is combined with other constructs.
949
950 2021-06-06 Eric Botcazou <ebotcazou@adacore.com>
951
952 PR c/100920
953 * c-decl.c (finish_struct): Fix thinko in previous change.
954 * c-typeck.c (convert_for_assignment): Do not warn on pointer
955 assignment and initialization for storage order purposes if the
956 RHS is a call to a DECL_IS_MALLOC function.
957
958 2021-06-04 Martin Sebor <msebor@redhat.com>
959
960 PR c/100783
961 * c-objc-common.c (print_type): Handle erroneous types.
962
963 2021-06-03 Jakub Jelinek <jakub@redhat.com>
964
965 PR c++/100859
966 * c-typeck.c (c_finish_omp_clauses): Move OMP_CLAUSE_AFFINITY
967 after depend only cases.
968
969 2021-05-31 Richard Biener <rguenther@suse.de>
970
971 PR c++/88601
972 * c-decl.c (names_builtin_p): Handle RID_BUILTIN_SHUFFLEVECTOR.
973 * c-parser.c (c_parser_postfix_expression): Likewise.
974
975 2021-05-28 Richard Biener <rguenther@suse.de>
976
977 PR c/100803
978 * gimple-parser.c (c_parser_gimple_paren_condition): Diagnose
979 invalid if conditions.
980
981 2021-05-28 Jakub Jelinek <jakub@redhat.com>
982
983 PR middle-end/99928
984 * c-typeck.c (handle_omp_array_sections): Copy OMP_CLAUSE_MAP_IMPLICIT.
985 (c_finish_omp_clauses): Move not just OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
986 marked clauses last, but also OMP_CLAUSE_MAP_IMPLICIT. Add
987 map_firstprivate_head bitmap, set it for GOMP_MAP_FIRSTPRIVATE_POINTER
988 maps and silently remove OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT if it is
989 present too. For OMP_CLAUSE_MAP_IMPLICIT silently remove the clause
990 if present in map_head, map_field_head or map_firstprivate_head
991 bitmaps.
992
993 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
994
995 * c-parser.c (c_parser_omp_clause_affinity): New.
996 (c_parser_omp_clause_name, c_parser_omp_variable_list,
997 c_parser_omp_all_clauses, OMP_TASK_CLAUSE_MASK): Handle affinity clause.
998 * c-typeck.c (handle_omp_array_sections_1, handle_omp_array_sections,
999 c_finish_omp_clauses): Likewise.
1000
1001 2021-05-26 Eric Botcazou <ebotcazou@adacore.com>
1002
1003 PR c/100653
1004 * c-decl.c (finish_struct): Warn for a union containing an aggregate
1005 field with a differing scalar storage order.
1006
1007 2021-05-21 Jakub Jelinek <jakub@redhat.com>
1008
1009 PR middle-end/99928
1010 * c-typeck.c (c_finish_omp_clauses): Move firstprivate clauses with
1011 OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT to the end of the chain. Don't error
1012 if a decl is mentioned both in map clause and in such firstprivate
1013 clause unless OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET is also set.
1014
1015 2021-05-19 Jakub Jelinek <jakub@redhat.com>
1016
1017 PR middle-end/99928
1018 * c-parser.c (c_parser_omp_master): Set OMP_MASTER_COMBINED on
1019 master when combined with taskloop.
1020 (c_parser_omp_parallel): Don't set OMP_PARALLEL_COMBINED on
1021 parallel master when not combined with taskloop.
1022
1023 2021-05-18 Richard Biener <rguenther@suse.de>
1024
1025 PR c/100522
1026 * gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
1027 Diagnose calls to non-functions.
1028 (c_parser_gimple_statement): Diagnose unexpected assignment RHS.
1029
1030 2021-05-17 Richard Biener <rguenther@suse.de>
1031
1032 PR c/100625
1033 * gimple-parser.c (c_parser_gimple_label): Avoid building
1034 a GIMPLE label with NULL label decl.
1035
1036 2021-05-13 Martin Sebor <msebor@redhat.com>
1037
1038 PR c/100550
1039 * c-decl.c (get_parm_array_spec): Avoid erroneous VLA bounds.
1040
1041 2021-05-12 Marcel Vollweiler <marcel@codesourcery.com>
1042
1043 * c-parser.c (c_parser_omp_clause_map): Support map-type-modifier
1044 'close'.
1045
1046 2021-05-10 Martin Liska <mliska@suse.cz>
1047
1048 * c-aux-info.c (affix_data_type): Use startswith
1049 function instead of strncmp.
1050 * c-typeck.c (build_function_call_vec): Likewise.
1051 * gimple-parser.c (c_parser_gimple_parse_bb_spec): Likewise.
1052
1053 2021-05-07 Eric Botcazou <ebotcazou@adacore.com>
1054
1055 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Do not issue an error
1056 on the address of a pointer field in a record with reverse SSO.
1057
1058 2021-05-04 Tobias Burnus <tobias@codesourcery.com>
1059
1060 * c-typeck.c (c_finish_omp_clauses): Accept float + complex
1061 for || and && reductions.
1062
1063 2021-04-29 Joseph Myers <joseph@codesourcery.com>
1064
1065 * c-typeck.c (function_types_compatible_p): For C2X, treat
1066 unprototyped function as compatible with non-variadic prototyped
1067 function even if some argument types are changed by the default
1068 argument promotions.
1069
1070 2021-04-15 Martin Sebor <msebor@redhat.com>
1071
1072 PR c/99420
1073 PR c/99972
1074 * c-decl.c (pushdecl): Always propagate type attribute.
1075
1076 2021-04-15 Richard Sandiford <richard.sandiford@arm.com>
1077
1078 PR c/98852
1079 * c-typeck.c (c_common_type): Do not drop attributes that
1080 affect type identity.
1081
1082 2021-04-10 Jakub Jelinek <jakub@redhat.com>
1083
1084 PR c/99990
1085 * c-decl.c (finish_decl): Don't overwrite TREE_TYPE of
1086 error_mark_node.
1087
1088 2021-03-25 Jakub Jelinek <jakub@redhat.com>
1089
1090 PR c++/99565
1091 * c-typeck.c (build_conditional_expr): Pass OEP_ADDRESS_OF_SAME_FIELD
1092 to operand_equal_p.
1093
1094 2021-03-19 Jakub Jelinek <jakub@redhat.com>
1095
1096 PR c/99588
1097 * c-typeck.c (mark_exp_read): Recognize what build_atomic_assign
1098 with modifycode NOP_EXPR produces and mark the _Atomic var as read
1099 if found.
1100 (build_atomic_assign): For modifycode of NOP_EXPR, use COMPOUND_EXPRs
1101 rather than STATEMENT_LIST. Otherwise call mark_exp_read on lhs.
1102 Set TREE_SIDE_EFFECTS on the TARGET_EXPR.
1103
1104 2021-03-15 Tobias Burnus <tobias@codesourcery.com>
1105
1106 PR c++/99509
1107 * c-decl.c (finish_decl): For 'omp declare target implicit' vars,
1108 ensure that the varpool node is marked as offloadable.
1109
1110 2021-03-05 Tobias Burnus <tobias@codesourcery.com>
1111
1112 PR c/99137
1113 * c-parser.c (c_parser_oacc_clause_async): Reject comma expressions.
1114
1115 2021-02-24 Martin Sebor <msebor@redhat.com>
1116
1117 PR middle-end/97172
1118 * c-decl.c (free_attr_access_data): Clear attribute arg spec.
1119
1120 2021-02-18 Jakub Jelinek <jakub@redhat.com>
1121
1122 PR c/99136
1123 * c-typeck.c (c_finish_return): Don't wrap retval into
1124 EXCESS_PRECISION_EXPR in functions that return void.
1125
1126 2021-02-11 Marek Polacek <polacek@redhat.com>
1127
1128 * c-parser.c (c_parser_if_statement): Use vec_free.
1129
1130 2021-02-04 Martin Sebor <msebor@redhat.com>
1131
1132 PR c/97882
1133 * c-decl.c (locate_old_decl): Add type to diagnostic output.
1134 (diagnose_mismatched_decls): Same.
1135 (start_function): Introduce temporaries for better readability.
1136 * c-typeck.c (comptypes_internal): Only consider complete enum
1137 types in comparisons with integers.
1138
1139 2021-02-01 Martin Sebor <msebor@redhat.com>
1140
1141 PR middle-end/97172
1142 * c-decl.c (free_attr_access_data): New function.
1143 (c_parse_final_cleanups): Call free_attr_access_data.
1144
1145 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1146
1147 * c-parser.c (c_parser_omp_clause_detach): New.
1148 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH clause.
1149 (OMP_TASK_CLAUSE_MASK): Add mask for PRAGMA_OMP_CLAUSE_DETACH.
1150 * c-typeck.c (c_finish_omp_clauses): Handle PRAGMA_OMP_CLAUSE_DETACH
1151 clause. Prevent use of detach with mergeable and overriding the
1152 data sharing mode of the event handle.
1153
1154 2021-01-15 Jakub Jelinek <jakub@redhat.com>
1155
1156 * c-typeck.c (c_finish_omp_clauses): For reduction build array with
1157 unqualified element type and then call c_build_qualified_type on the
1158 ARRAY_TYPE.
1159
1160 2021-01-07 Richard Biener <rguenther@suse.de>
1161
1162 * gimple-parser.c (c_parser_gimple_compound_statement): Only
1163 reallocate loop array if it is too small.
1164
1165 2020-12-16 Martin Uecker <muecker@gwdg.de>
1166
1167 PR c/98047
1168 * c-typeck.c (build_modify_expr): Drop qualifiers.
1169
1170 2020-12-16 Martin Uecker <muecker@gwdg.de>
1171
1172 PR c/98260
1173 * c-parser.c (c_parser_expression): Look into
1174 nop expression when marking expressions as read.
1175
1176 2020-12-14 Martin Liska <mliska@suse.cz>
1177
1178 PR sanitizer/98204
1179 * c-typeck.c (pointer_diff): Do not emit a top-level
1180 sanitization.
1181 (build_binary_op): Likewise.
1182
1183 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
1184
1185 * c-parser.c (c_parser_omp_allocate): New.
1186 (c_parser_omp_construct): Call it.
1187
1188 2020-12-09 Richard Biener <rguenther@suse.de>
1189
1190 PR c/98200
1191 * gimple-parser.c (c_parser_gimple_postfix_expression): Return
1192 early on error.
1193
1194 2020-12-07 Martin Uecker <muecker@gwdg.de>
1195
1196 PR c/97981
1197 * c-typeck.c (convert_lvalue_to_rvalue): Move the code
1198 that drops qualifiers to the end of the function.
1199
1200 2020-11-26 Martin Uecker <muecker@gwdg.de>
1201
1202 PR c/65455
1203 PR c/92935
1204 * c-parser.c (c_parser_declaration_or_fndef): Remove
1205 redundant code to drop qualifiers of _Atomic types for __auto_type.
1206 (c_parser_typeof_specifier): Do not drop qualifiers of _Atomic
1207 types for __typeof__.
1208
1209 2020-11-24 Jakub Jelinek <jakub@redhat.com>
1210
1211 PR c/97958
1212 * c-parser.c (c_parser_binary_expression): For omp atomic binary
1213 expressions, use make_node instead of build2 to avoid checking build2
1214 performs.
1215
1216 2020-11-23 Joseph Myers <joseph@codesourcery.com>
1217
1218 PR c/95630
1219 * c-typeck.c (build_binary_op): Use pedwarn_c99 with OPT_Wpedantic
1220 for comparisons of complete and incomplete pointers.
1221
1222 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1223
1224 * c-aux-info.c (gen_type): Support opaque types.
1225
1226 2020-11-20 Martin Sebor <msebor@redhat.com>
1227
1228 PR middle-end/97879
1229 * c-decl.c (start_function): Set ATTR_FLAG_INTERNAL in flags.
1230
1231 2020-11-20 Jakub Jelinek <jakub@redhat.com>
1232
1233 PR other/97911
1234 * Make-lang.in (c.serial): Change from goal to a variable.
1235 (.PHONY): Drop c.serial.
1236
1237 2020-11-20 Martin Uecker <muecker@gwdg.de>
1238
1239 * c-typeck.c (convert_lvalue_to_rvalue): Drop qualifiers.
1240
1241 2020-11-19 Jakub Jelinek <jakub@redhat.com>
1242
1243 PR c/97860
1244 * c-decl.c (get_parm_array_spec): Bail out of nelts is
1245 error_operand_p.
1246
1247 2020-11-18 Jakub Jelinek <jakub@redhat.com>
1248
1249 * Make-lang.in (c.serial): New goal.
1250 (.PHONY): Add c.serial c.prev.
1251 (cc1$(exeext)): Call LINK_PROGRESS.
1252
1253 2020-11-13 Vladimir N. Makarov <vmakarov@redhat.com>
1254
1255 * c-parser.c (c_parser_asm_statement): Parse outputs for asm
1256 goto too.
1257 * c-typeck.c (build_asm_expr): Remove an assert checking output
1258 absence for asm goto.
1259
1260 2020-11-13 Jakub Jelinek <jakub@redhat.com>
1261
1262 * c-typeck.c (c_finish_omp_clauses): Don't clear
1263 OMP_CLAUSE_REDUCTION_INSCAN unless reduction_seen == -2.
1264
1265 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1266
1267 PR objc/77404
1268 * c-parser.c (c_parser_objc_class_definition): Pass the
1269 location of the class name to the interface declaration.
1270
1271 2020-11-10 Strager Neds <strager.nds@gmail.com>
1272
1273 * c-decl.c (merge_decls): Use new overload of
1274 set_decl_section_name.
1275
1276 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1277
1278 * c-parser.c (c_parser_omp_target_data): Add use of
1279 new c_omp_adjust_map_clauses function. Add GOMP_MAP_ATTACH_DETACH as
1280 handled map clause kind.
1281 (c_parser_omp_target_enter_data): Likewise.
1282 (c_parser_omp_target_exit_data): Likewise.
1283 (c_parser_omp_target): Likewise.
1284 * c-typeck.c (handle_omp_array_sections): Adjust COMPONENT_REF case to
1285 use GOMP_MAP_ATTACH_DETACH map kind for C_ORT_OMP region type.
1286 (c_finish_omp_clauses): Adjust bitmap checks to allow struct decl and
1287 same struct field access to co-exist on OpenMP construct.
1288
1289 2020-11-07 Martin Uecker <muecker@gwdg.de>
1290
1291 * c-parser.c (c_parser_label): Implement mixing of labels and code.
1292 (c_parser_all_labels): Likewise.
1293
1294 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1295
1296 * c-parser.c (c_parser_objc_at_property_declaration):
1297 Improve parsing fidelity. Associate better location info
1298 with @property attributes. Clean up the interface to
1299 objc_add_property_declaration ().
1300
1301 2020-11-06 Nathan Sidwell <nathan@acm.org>
1302
1303 * c-decl.c (diagnose_mismatched_decls): Rename
1304 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1305 (warn_if_shadowing, implicitly_declare, names_builtin_p)
1306 (collect_source_refs): Likewise.
1307 * c-typeck.c (inform_declaration, inform_for_arg)
1308 (convert_for_assignment): Likewise.
1309
1310 2020-11-06 Tobias Burnus <tobias@codesourcery.com>
1311
1312 * c-parser.c (c_parser_omp_atomic): Add openacc parameter and update
1313 OpenACC matching.
1314 (c_parser_omp_construct): Update call.
1315
1316 2020-11-04 Jakub Jelinek <jakub@redhat.com>
1317
1318 PR c++/97670
1319 * c-typeck.c (c_finish_omp_clauses): Look through array reductions to
1320 find underlying decl to clear in the aligned_head bitmap.
1321
1322 2020-11-04 Joseph Myers <joseph@codesourcery.com>
1323
1324 * c-decl.c (handle_nodiscard_attribute): New.
1325 (std_attribute_table): Add nodiscard.
1326 * c-parser.c (c_parser_std_attribute): Expect argument to
1327 nodiscard attribute to be a string. Do not special-case ignoring
1328 nodiscard.
1329 * c-typeck.c (maybe_warn_nodiscard): New.
1330 (build_compound_expr, emit_side_effect_warnings): Call
1331 maybe_warn_nodiscard.
1332 (c_process_expr_stmt, c_finish_stmt_expr): Also call
1333 emit_side_effect_warnings if warn_unused_result.
1334
1335 2020-10-29 Asher Gordon <AsDaGo@posteo.net>
1336
1337 * c-typeck.c (free_all_tagged_tu_seen_up_to): Replace free
1338 with XDELETE.
1339 (finish_init): Likewise.
1340 (pop_init_level): Likewise.
1341
1342 2020-10-28 Joseph Myers <joseph@codesourcery.com>
1343
1344 * c-decl.c (store_parm_decls_newstyle): Use pedwarn_c11 not
1345 error_at for omitted parameter name.
1346
1347 2020-10-28 Jakub Jelinek <jakub@redhat.com>
1348
1349 * c-parser.c (c_parser_omp_clause_name): Handle allocate.
1350 (c_parser_omp_clause_allocate): New function.
1351 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ALLOCATE.
1352 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1353 OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK,
1354 OMP_TASK_CLAUSE_MASK, OMP_TASKGROUP_CLAUSE_MASK,
1355 OMP_DISTRIBUTE_CLAUSE_MASK, OMP_TEAMS_CLAUSE_MASK,
1356 OMP_TARGET_CLAUSE_MASK, OMP_TASKLOOP_CLAUSE_MASK): Add
1357 PRAGMA_OMP_CLAUSE_ALLOCATE.
1358 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ALLOCATE.
1359
1360 2020-10-27 Joseph Myers <joseph@codesourcery.com>
1361
1362 * c-parser.c (c_parser_std_attribute_specifier): Allow duplicate
1363 standard attributes.
1364
1365 2020-10-23 Marek Polacek <polacek@redhat.com>
1366
1367 PR c++/91741
1368 * c-parser.c (c_parser_binary_expression): Implement -Wsizeof-array-div.
1369 (c_parser_postfix_expression): Set PAREN_SIZEOF_EXPR.
1370 (c_parser_expr_list): Handle PAREN_SIZEOF_EXPR like SIZEOF_EXPR.
1371 * c-tree.h (char_type_p): Declare.
1372 * c-typeck.c (char_type_p): No longer static.
1373
1374 2020-10-23 Martin Sebor <msebor@redhat.com>
1375
1376 PR middle-end/97552
1377 * c-decl.c (get_parm_array_spec): Handle static VLA parameters.
1378
1379 2020-09-19 Martin Sebor <msebor@redhat.com>
1380
1381 PR c/50584
1382 * c-decl.c (lookup_last_decl): Define new function.
1383 (c_decl_attributes): Call it.
1384 (start_decl): Add argument and use it.
1385 (finish_decl): Call build_attr_access_from_parms and decl_attributes.
1386 (get_parm_array_spec): Define new function.
1387 (push_parm_decl): Call get_parm_array_spec.
1388 (start_function): Call warn_parm_array_mismatch. Build attribute
1389 access and add it to current function.
1390 * c-parser.c (c_parser_declaration_or_fndef): Diagnose mismatches
1391 in forms of array parameters.
1392 * c-tree.h (start_decl): Add argument.
1393
1394 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1395
1396 * c-decl.c (c_break_label, c_cont_label): Delete, and replace
1397 with...
1398 (in_statement): New.
1399 (start_function): Adjust for above change.
1400 (c_push_function_context, c_pop_function_context): Likewise.
1401 * c-lang.h (struct language_function): Likewise.
1402 * c-objc-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
1403 * c-parser.c (objc_foreach_break_label, objc_foreach_continue_label):
1404 New.
1405 (c_parser_statement_after_labels): Adjust calls to c_finish_bc_stmt.
1406 (c_parser_switch_statement): Adjust break/switch context handling
1407 and calls to renamed functions.
1408 (c_parser_while_statement): Adjust break/switch context handling and
1409 build a WHILE_STMT.
1410 (c_parser_do_statement): Ditto, with DO_STMT respectively.
1411 (c_parser_for_statement): Ditto, with FOR_STMT respectively.
1412 (c_parser_omp_for_loop): Adjust break/switch context handling.
1413 * c-tree.h (c_break_label, c_cont_label): Delete.
1414 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
1415 (IN_OMP_BLOCK, IN_OMP_FOR, IN_OBJC_FOREACH): Define.
1416 (in_statement, switch_statement_break_seen_p): Declare.
1417 (c_start_case, c_finish_case): Renamed to...
1418 (c_start_switch, c_finish_switch).
1419 (c_finish_bc_stmt): Adjust arguments.
1420 * c-typeck.c (build_function_call_vec): Don't try to print
1421 statements with %qE format.
1422 (struct c_switch): Rename switch_expr field to switch_stmt.
1423 Add break_stmt_seen_p field.
1424 (c_start_case): Rename to c_start_switch. Build a SWITCH_STMT
1425 instead of a SWITCH_EXPR. Update for changes to struct c_switch.
1426 (do_case): Update for changes to struct c_switch.
1427 (c_finish_case): Rename to c_finish_switch. Update for changes to
1428 struct c_switch and change of representation from SWITCH_EXPR to
1429 SWITCH_STMT.
1430 (c_finish_loop): Delete.
1431 (c_finish_bc_stmt): Update to reflect changes to break/continue
1432 state representation. Build a BREAK_STMT or CONTINUE_STMT instead
1433 of a GOTO_EXPR except for objc foreach loops.
1434
1435 2020-09-01 Jakub Jelinek <jakub@redhat.com>
1436
1437 PR c++/96867
1438 * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
1439 only on PARM_DECLs.
1440
1441 2020-08-28 Martin Sebor <msebor@redhat.com>
1442
1443 PR c/96596
1444 * c-decl.c (match_builtin_function_types): Avoid dealing with erroneous
1445 argument type.
1446
1447 2020-08-27 Martin Liska <mliska@suse.cz>
1448
1449 * gimple-parser.c (c_parser_gimple_compound_statement): Set exact argument of a vector
1450 growth function to true.
1451
1452 2020-08-25 Tobias Burnus <tobias@codesourcery.com>
1453
1454 PR c/96678
1455 * c-typeck.c (handle_omp_array_sections_1): Talk about
1456 array function parameter in the error message.
1457
1458 2020-08-18 Jakub Jelinek <jakub@redhat.com>
1459
1460 PR c/96571
1461 * c-parser.c (c_parser_generic_selection): Change match_found from bool
1462 to int, holding index of the match. Call mark_exp_read on the selector
1463 expression and on expressions other than the selected one.
1464
1465 2020-08-01 Richard Sandiford <richard.sandiford@arm.com>
1466
1467 PR c/96377
1468 * c-typeck.c (process_init_element): Split test for whether to
1469 recurse into a record, union or array into...
1470 (initialize_elementwise_p): ...this new function. Don't recurse
1471 into a vector type if the initialization value is also a vector.
1472
1473 2020-07-31 Richard Biener <rguenther@suse.de>
1474
1475 PR debug/96383
1476 * c-objc-common.h (LANG_HOOKS_FINALIZE_EARLY_DEBUG):
1477 Define to c_common_finalize_early_debug.
1478
1479 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
1480
1481 * c-parser.c (c_parser_omp_clause_hint): Require nonnegative hint clause.
1482 (c_parser_omp_critical): Permit hint(0) clause without named critical.
1483 (c_parser_omp_construct): Don't assert if error_mark_node is returned.
1484
1485 2020-07-21 Sunil K Pandey <skpgkp2@gmail.com>
1486
1487 PR target/95237
1488 * c-decl.c (finish_decl): Call target hook
1489 lower_local_decl_alignment to lower local decl alignment.
1490
1491 2020-07-09 Julian Brown <julian@codesourcery.com>
1492 Thomas Schwinge <thomas@codesourcery.com>
1493
1494 PR middle-end/95270
1495 * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero
1496 for standalone attach/detach clauses.
1497
1498 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
1499
1500 * c-typeck.c (convert_for_assignment): If -Wscalar-storage-order is
1501 set, warn for conversion between pointers that point to incompatible
1502 scalar storage orders.
1503
1504 2020-07-07 Kaipeng Zhou <zhoukaipeng3@huawei.com>
1505
1506 * c-parser.c (c_parser_statement_after_labels): Pass correct
1507 parameters to c_parser_do_statement.
1508
1509 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1510
1511 * c-parser.c (c_parser_expr_no_commas): Save, clear and restore
1512 c_in_omp_for.
1513 (c_parser_omp_for_loop): Set c_in_omp_for around some calls to avoid
1514 premature c_fully_fold. Defer explicit c_fully_fold calls to after
1515 c_finish_omp_for.
1516 * c-tree.h (c_in_omp_for): Declare.
1517 * c-typeck.c (c_in_omp_for): Define.
1518 (build_modify_expr): Avoid c_fully_fold if c_in_omp_for.
1519 (digest_init): Likewise.
1520 (build_binary_op): Likewise.
1521
1522 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1523
1524 * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated
1525 from kind by comma rather than colon.
1526
1527 2020-06-05 Mark Wielaard <mark@klomp.org>
1528
1529 * c-decl.c (implicit_decl_warning): When warned and olddecl is
1530 an undeclared builtin, then add a fixit header hint, if found.
1531 (implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
1532 warning_at about implicit builtin declaration type mismatch.
1533
1534 2020-06-03 Mark Wielaard <mark@klomp.org>
1535
1536 * c-parser.c (struct c_parser): Add seen_string_literal
1537 bitfield.
1538 (c_parser_consume_token): Reset seen_string_literal.
1539 (c_parser_error_richloc): Add name_hint if seen_string_literal
1540 and next token is a CPP_NAME and we have a missing header
1541 suggestion for the name.
1542 (c_parser_string_literal): Set seen_string_literal.
1543
1544 2020-06-03 Mark Wielaard <mark@klomp.org>
1545
1546 * c-parser.c (c_parser_postfix_expression_after_primary): Add
1547 scope with matching_parens after CPP_OPEN_PAREN.
1548
1549 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
1550
1551 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_MAPPING): Redefine.
1552
1553 2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
1554
1555 * Make-lang.in: Remove extra slash.
1556
1557 2020-05-19 Martin Liska <mliska@suse.cz>
1558
1559 * c-parser.c: Fix typo.
1560
1561 2020-05-14 Jakub Jelinek <jakub@redhat.com>
1562
1563 * c-parser.c (c_parser_omp_target): Set cfun->has_omp_target.
1564
1565 2020-05-07 Richard Biener <rguenther@suse.de>
1566
1567 PR middle-end/94703
1568 * gimple-parser.c (c_parser_parse_ssa_name): Do not set
1569 DECL_GIMPLE_REG_P.
1570
1571 2020-04-30 Jakub Jelinek <jakub@redhat.com>
1572
1573 PR c/94842
1574 * c-decl.c (set_labels_context_r): In addition to context-less
1575 LABEL_DECLs adjust also LABEL_DECLs with context equal to
1576 parent function if any.
1577 (store_parm_decls): Adjust comment.
1578
1579 2020-04-19 Jakub Jelinek <jakub@redhat.com>
1580
1581 PR objc/94637
1582 * c-parser.c (c_parser_objc_selector_arg): Handle CPP_SCOPE like
1583 two CPP_COLON tokens.
1584
1585 2020-04-17 Jakub Jelinek <jakub@redhat.com>
1586
1587 PR other/94629
1588 * c-parser.c (c_parser_oacc_routine): Remove redundant assignment
1589 to data.clauses.
1590
1591 2020-04-15 Jakub Jelinek <jakub@redhat.com>
1592
1593 PR c/94593
1594 * c-parser.c (c_parser_pragma) <case PRAGMA_OMP_REQUIRES>: Reject
1595 requires directive when not at file scope.
1596
1597 2020-04-08 Tobias Burnus <tobias@codesourcery.com>
1598
1599 PR middle-end/94120
1600 * c-decl.c (c_check_in_current_scope): New function.
1601 * c-tree.h (c_check_in_current_scope): Declare it.
1602 * c-parser.c (c_parser_oacc_declare): Add check that variables
1603 are declared in the same scope as the directive. Fix handling
1604 of namespace vars.
1605
1606 2020-04-07 Jakub Jelinek <jakub@redhat.com>
1607
1608 PR c++/94512
1609 * c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1610 if c_parser_omp_master succeeded.
1611
1612 2020-03-23 Jakub Jelinek <jakub@redhat.com>
1613
1614 PR gcov-profile/94029
1615 PR c/94239
1616 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to
1617 the function_start_locus location. Don't do that afterwards for the
1618 __GIMPLE body parsing.
1619
1620 2020-03-19 Jakub Jelinek <jakub@redhat.com>
1621
1622 PR gcov-profile/94029
1623 * c-tree.h (finish_function): Add location_t argument defaulted to
1624 input_location.
1625 * c-parser.c (c_parser_compound_statement): Add endlocp argument and
1626 set it to the locus of closing } if non-NULL.
1627 (c_parser_compound_statement_nostart): Return locus of closing }.
1628 (c_parser_parse_rtl_body): Likewise.
1629 (c_parser_declaration_or_fndef): Propagate locus of closing } to
1630 finish_function.
1631 * c-decl.c (finish_function): Add end_loc argument, use it instead of
1632 input_location to set function_end_locus.
1633
1634 2020-03-17 Jakub Jelinek <jakub@redhat.com>
1635
1636 PR c/94172
1637 * c-tree.h (C_TYPE_INCOMPLETE_VARS): Define to TYPE_LANG_SLOT_1
1638 instead of TYPE_VFIELD, and support it on {RECORD,UNION,ENUMERAL}_TYPE.
1639 (TYPE_ACTUAL_ARG_TYPES): Check that it is only used on FUNCTION_TYPEs.
1640 * c-decl.c (pushdecl): Push C_TYPE_INCOMPLETE_VARS also to
1641 ENUMERAL_TYPEs.
1642 (finish_incomplete_vars): New function, moved from finish_struct. Use
1643 relayout_decl instead of layout_decl.
1644 (finish_struct): Remove obsolete comment about C_TYPE_INCOMPLETE_VARS
1645 being TYPE_VFIELD. Use finish_incomplete_vars.
1646 (finish_enum): Clear C_TYPE_INCOMPLETE_VARS. Call
1647 finish_incomplete_vars.
1648 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1649 also on ENUMERAL_TYPEs.
1650
1651 2020-03-16 Jakub Jelinek <jakub@redhat.com>
1652
1653 PR c/94179
1654 * c-fold.c (c_fully_fold_internal): Handle MEM_REF.
1655
1656 2020-03-13 Martin Sebor <msebor@redhat.com>
1657
1658 PR c/94040
1659 * c-decl.c (builtin_structptr_type_count): New constant.
1660 (match_builtin_function_types): Reject decls that are incompatible
1661 in types pointed to by pointers.
1662 (diagnose_mismatched_decls): Adjust comments.
1663
1664 2020-03-05 Joseph Myers <joseph@codesourcery.com>
1665
1666 PR c/93577
1667 * c-typeck.c (pop_init_level): Do not diagnose initializers as
1668 empty when initialized type is error_mark_node.
1669 (set_designator, process_init_element): Ignore initializers for
1670 elements of a variable-size type or of error_mark_node.
1671
1672 2020-03-01 Martin Sebor <msebor@redhat.com>
1673
1674 PR middle-end/93926
1675 * c-decl.c (types_close_enough_to_match): New function.
1676 (match_builtin_function_types):
1677 (diagnose_mismatched_decls): Add missing inform call to a warning.
1678
1679 2020-03-01 Martin Sebor <msebor@redhat.com>
1680
1681 PR c/93812
1682 * c-typeck.c (build_functype_attribute_variant): New function.
1683 (composite_type): Call it.
1684
1685 2020-02-25 Jakub Jelinek <jakub@redhat.com>
1686
1687 PR other/93912
1688 * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability):
1689 Rename last argument from probablity to probability.
1690
1691 2020-02-13 Jakub Jelinek <jakub@redhat.com>
1692
1693 PR c/93576
1694 * c-decl.c (grokdeclarator): If this_size_varies, only push size into
1695 *expr if it has side effects.
1696
1697 2020-01-30 Jeff Law <law@redhat.com>
1698
1699 PR c/88660
1700 * c-parser.c (c_parser_switch_statement): Make sure to request
1701 marking the switch expr as used.
1702
1703 2020-01-22 Joseph Myers <joseph@codesourcery.com>
1704
1705 PR c/93348
1706 * c-typeck.c (build_c_cast): Call remove_c_maybe_const_expr on
1707 argument with integer operands.
1708
1709 2020-01-16 Kerem Kat <keremkat@gmail.com>
1710
1711 PR c/92833
1712 * c-parser.c (c_parser_consume_token): Fix peeked token stack pop
1713 to support 4 available tokens.
1714
1715 2020-01-15 Joseph Myers <joseph@codesourcery.com>
1716
1717 PR c/93072
1718 * c-decl.c (pushdecl): Use TREE_PUBLIC, not DECL_EXTERNAL, to
1719 determine whether to set DECL_CONTEXT.
1720
1721 2020-01-13 Joseph Myers <joseph@codesourcery.com>
1722
1723 PR c/93241
1724 * c-typeck.c (build_c_cast): Check for expressions with integer
1725 operands that can occur in an unevaluated part of an integer
1726 constant expression and call note_integer_operands as needed.
1727
1728 2019-01-08 Richard Biener <rguenther@suse.de>
1729
1730 PR middle-end/93199
1731 * gimple-parser.c (c_parser_parse_gimple_body): Remove __PHI IFN
1732 permanently.
1733
1734 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1735
1736 Update copyright years.
1737
1738 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1739
1740 * c-decl.c (collect_source_ref_cb): Delete.
1741 (for_each_global_decl): Rename into...
1742 (collect_source_refs): ...this. Call collect_source_ref directly.
1743 (c_parse_final_cleanups): Always call collect_source_ref on the main
1744 input filename.
1745
1746 2019-12-19 Julian Brown <julian@codesourcery.com>
1747 Cesar Philippidis <cesar@codesourcery.com>
1748
1749 * c-parser.c (c_parser_omp_clause_name): Add parsing of attach and
1750 detach clauses.
1751 (c_parser_omp_variable_list): Add ALLOW_DEREF optional parameter.
1752 Allow deref (->) in variable lists if true.
1753 (c_parser_omp_var_list_parens): Add ALLOW_DEREF optional parameter.
1754 Pass to c_parser_omp_variable_list.
1755 (c_parser_oacc_data_clause): Support attach and detach clauses. Update
1756 call to c_parser_omp_variable_list.
1757 (c_parser_oacc_all_clauses): Support attach and detach clauses.
1758 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK,
1759 OACC_KERNELS_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK,
1760 OACC_SERIAL_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_ATTACH.
1761 (OACC_EXIT_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_DETACH.
1762 * c-typeck.c (handle_omp_array_sections_1): Reject subarrays for attach
1763 and detach. Support deref.
1764 (handle_omp_array_sections): Use GOMP_MAP_ATTACH_DETACH instead of
1765 GOMP_MAP_ALWAYS_POINTER for OpenACC.
1766 (c_oacc_check_attachments): New function.
1767 (c_finish_omp_clauses): Check attach/detach arguments for being
1768 pointers using above. Support deref.
1769
1770 2019-12-19 Julian Brown <julian@codesourcery.com>
1771 Maciej W. Rozycki <macro@codesourcery.com>
1772 Tobias Burnus <tobias@codesourcery.com>
1773 Thomas Schwinge <thomas@codesourcery.com>
1774
1775 * c-parser.c (c_parser_omp_clause_name): Support no_create.
1776 (c_parser_oacc_data_clause): Likewise.
1777 (c_parser_oacc_all_clauses): Likewise.
1778 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1779 (OACC_PARALLEL_CLAUSE_MASK, OACC_SERIAL_CLAUSE_MASK): Add
1780 PRAGMA_OACC_CLAUSE_NO_CREATE.
1781 * c-typeck.c (handle_omp_array_sections): Support
1782 GOMP_MAP_NO_ALLOC.
1783
1784 2019-12-09 David Malcolm <dmalcolm@redhat.com>
1785
1786 * c-objc-common.c (range_label_for_type_mismatch::get_text):
1787 Replace label_text ctor calls.
1788
1789 2019-12-04 Joseph Myers <joseph@codesourcery.com>
1790
1791 PR c/36941
1792 PR c/88827
1793 * c-typeck.c (convert_lvalue_to_rvalue): Call
1794 require_complete_type for arguments not of void types.
1795 (build_indirect_ref): Do not diagnose dereferencing pointers to
1796 incomplete types.
1797 * c-tree.h (C_TYPE_ERROR_REPORTED): Remove.
1798
1799 2019-12-03 Joseph Myers <joseph@codesourcery.com>
1800
1801 PR c/88704
1802 * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in
1803 old-style parameter definitions.
1804
1805 2019-12-01 Sandra Loosemore <sandra@codesourcery.com>
1806
1807 PR target/92499
1808
1809 * c-decl.c (flexible_array_type_p): Move to common code.
1810
1811 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1812
1813 * c-decl.c (start_decl): Allow initialization of variables whose
1814 size is a POLY_INT_CST.
1815 (finish_decl): Use verify_type_context to check whether the target
1816 allows variables with a particular type to have static or thread-local
1817 storage duration. Don't raise a second error if such variables do
1818 not have a constant size.
1819 (grokdeclarator): Use verify_type_context to check whether the
1820 target allows fields or array elements to have a particular type.
1821 * c-typeck.c (pointer_diff): Use verify_type_context to test whether
1822 the target allows pointer difference for the types involved.
1823 (build_unary_op): Likewise for pointer increment and decrement.
1824
1825 2019-11-29 Joseph Myers <joseph@codesourcery.com>
1826
1827 * c-parser.c (struct c_parser): Add members raw_tokens and
1828 raw_tokens_used.
1829 (c_lex_one_token): Add argument raw. Handle lexing raw tokens and
1830 using previously-lexed raw tokens.
1831 (c_parser_peek_nth_token_raw)
1832 (c_parser_check_balanced_raw_token_sequence): New functions.
1833 (c_parser_nth_token_starts_std_attributes): Use
1834 c_parser_check_balanced_raw_token_sequence for Objective-C.
1835
1836 2019-11-25 Joseph Myers <joseph@codesourcery.com>
1837
1838 PR c/91985
1839 * c-decl.c (finish_declspecs): Use int instead of decimal
1840 floating-point types if decimal floating-point not supported.
1841
1842 2019-11-25 Joseph Myers <joseph@codesourcery.com>
1843
1844 * c-tree.h (struct c_declarator): Use a structure for id member.
1845 * c-decl.c (grokdeclarator): Extract attributes from cdk_id
1846 declarators at the start, not when handling individual declarators
1847 later. Use u.id.id instead of u.id.
1848 (grokfield): Use u.id.id instead of u.id.
1849 (build_id_declarator): Set u.id.id and u.id.attrs.
1850 (finish_declspecs): Handle postfix attributes in case of typedef
1851 name or typeof used.
1852 * c-parser.c (c_parser_direct_declarator)
1853 (c_parser_direct_declarator_inner): Place declarator for
1854 attributes inside that for function or array, not outside. Set
1855 u.id.attrs for identifiers.
1856 (c_parser_parameter_declaration): Use u.id.id instead of u.id.
1857 * gimple-parser.c (c_parser_gimple_declaration): Use u.id.id
1858 instead of u.id.
1859
1860 2019-11-22 Jakub Jelinek <jakub@redhat.com>
1861
1862 PR c/90677
1863 * c-decl.c (identifier_global_tag): Define.
1864
1865 2019-11-20 Richard Biener <rguenther@suse.de>
1866
1867 PR c/92088
1868 * c-decl.c (grokdeclarator): Prevent inlining of nested
1869 function with VLA arguments.
1870
1871 2019-11-20 Joseph Myers <joseph@codesourcery.com>
1872
1873 * c-decl.c (c_warn_type_attributes): New function.
1874 (groktypename, grokdeclarator, finish_declspecs): Call
1875 c_warn_type_attributes before applying attributes to types.
1876 * c-tree.h (c_warn_type_attributes): Declare.
1877
1878 2019-11-19 Joseph Myers <joseph@codesourcery.com>
1879
1880 * c-decl.c (c_warn_unused_attributes): Use pedwarn not warning for
1881 standard attributes.
1882 * c-parser.c (c_parser_std_attribute): Take argument for_tm. Use
1883 pedwarn for unknown standard attributes and return error_mark_node
1884 for them.
1885
1886 2019-11-18 Matthew Malcomson <matthew.malcomson@arm.com>
1887
1888 * c-parser.c (c_parser_parse_rtl_body): Always call
1889 run_rtl_passes, even if startwith pass is not provided.
1890
1891 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1892
1893 * c-parser.c (c_parser_std_attribute_specifier): Diagnose
1894 duplicate standard attributes.
1895
1896 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1897
1898 * c-decl.c (std_attribute_table): Add maybe_unused.
1899
1900 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1901
1902 * c-decl.c (std_attribute_table): Add fallthrough.
1903 * c-parser.c (c_parser_declaration_or_fndef): Diagnose fallthrough
1904 attribute at top level.
1905
1906 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1907
1908 * c-decl.c (std_attribute_table): New.
1909 (c_init_decl_processing): Register attributes from
1910 std_attribute_table.
1911 * c-parser.c (c_parser_attribute_arguments): Add arguments
1912 require_string and allow_empty_args. All callers changed.
1913 (c_parser_std_attribute): Set require_string argument for
1914 "deprecated" attribute.
1915
1916 2019-11-14 Joseph Myers <joseph@codesourcery.com>
1917
1918 * c-parser.c (c_parser_postfix_expression)
1919 (c_parser_check_literal_zero): Handle CPP_UTF8CHAR.
1920 * gimple-parser.c (c_parser_gimple_postfix_expression): Likewise.
1921
1922 2019-11-14 Richard Sandiford <richard.sandiford@arm.com>
1923
1924 * c-typeck.c (build_conditional_expr): Use truth_type_for instead
1925 of build_same_sized_truth_vector_type.
1926 (build_vec_cmp): Likewise.
1927
1928 2019-11-14 Jakub Jelinek <jakub@redhat.com>
1929
1930 * c-parser.c (c_parser_omp_context_selector): Don't require score
1931 argument to fit into shwi, just to be INTEGER_CST. Diagnose
1932 negative score.
1933
1934 * c-parser.c (c_parser_omp_context_selector): Rename
1935 CTX_PROPERTY_IDLIST to CTX_PROPERTY_NAME_LIST, add CTX_PROPERTY_ID.
1936 Use CTX_PROPERTY_ID for atomic_default_mem_order, only allow a single
1937 identifier in that. For CTX_PROPERTY_NAME_LIST, allow identifiers
1938 and string literals.
1939
1940 2019-11-14 Joseph Myers <joseph@codesourcery.com>
1941
1942 * c-tree.h (enum c_typespec_kind): Add ctsk_tagref_attrs and
1943 ctsk_tagfirstref_attrs.
1944 (struct c_declspecs): Update description of attrs. Add
1945 postfix_attrs and non_std_attrs_seen_p. Increase size of
1946 typespec_kind bit-field.
1947 (c_warn_unused_attributes): New declaration.
1948 (parser_xref_tag): Update prototype.
1949 * c-decl.c (c_warn_unused_attributes): New function.
1950 (shadow_tag_warned): Handle ctsk_tagfirstref_attrs and
1951 ctsk_tagref_attrs. Handle attribute declarations.
1952 (check_compound_literal_type): Handle ctsk_tagfirstref_attrs.
1953 (grokdeclarator): Handle standard attributes.
1954 (parser_xref_tag): Add arguments have_std_attrs and attrs. Apply
1955 attributes to incomplete type reference.
1956 (xref_tag): Update call to parser_xref_tag.
1957 (declspecs_add_addrspace, declspecs_add_type)
1958 (declspecs_add_scspec, declspecs_add_attrs): Set
1959 non_std_attrs_seen_p.
1960 (finish_declspecs): Apply postfix standard attributes to type.
1961 * c-parser.c (c_token_starts_declspecs)
1962 (c_token_starts_declaration, c_parser_next_token_starts_declspecs)
1963 (c_parser_next_tokens_start_declaration): Update comments.
1964 (c_parser_consume_token, c_parser_consume_pragma): Handle moving
1965 parser->tokens[2] to parser->tokens[1].
1966 (c_parser_nth_token_starts_std_attributes)
1967 (c_parser_std_attribute_specifier_sequence): New functions.
1968 (c_parser_declaration_or_fndef): Add arguments have_attrs and
1969 attrs. All callers changed. Handle standard attributes.
1970 (c_parser_parms_declarator, c_parser_parms_list_declarator)
1971 (c_parser_parameter_declaration): Add argument have_gnu_attrs.
1972 All callers changed.
1973 (c_parser_declspecs): Add arguments start_std_attr_ok and
1974 end_std_attr_ok. All callers changed. Handle standard
1975 attributes.
1976 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
1977 (c_parser_direct_declarator, c_parser_direct_declarator_inner)
1978 (c_parser_compound_statement_nostart, c_parser_all_labels)
1979 (c_parser_label, c_parser_statement, c_parser_for_statement):
1980 Handle standard attributes.
1981 * c-parser.h (c_parser_declspecs): Update prototype.
1982 * gimple-parser.c (c_parser_gimple_declaration): Update call to
1983 c_parser_declspecs.
1984
1985 2019-11-12 Martin Liska <mliska@suse.cz>
1986
1987 * gimple-parser.c: Do not include params.h.
1988
1989 2019-11-12 Martin Liska <mliska@suse.cz>
1990
1991 * gimple-parser.c (c_parser_parse_gimple_body): Replace old parameter syntax
1992 with the new one, include opts.h if needed. Use SET_OPTION_IF_UNSET
1993 macro.
1994
1995 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1996 Frederik Harwath <frederik@codesourcery.com>
1997
1998 gcc/c/
1999 * c-parser.c (OACC_SERIAL_CLAUSE_MASK): New macro.
2000 (c_parser_oacc_kernels_parallel): Rename function to...
2001 (c_parser_oacc_compute): ... this. Handle PRAGMA_OACC_SERIAL.
2002 (c_parser_omp_construct): Update accordingly.
2003
2004
2005 2019-11-11 Jakub Jelinek <jakub@redhat.com>
2006
2007 * c-parser.c (c_parser_translation_unit): Diagnose declare target
2008 without corresponding end declare target.
2009
2010 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2011
2012 * c-convert.c (convert): Only handle vector conversions if one of
2013 the types satisfies gnu_vector_type_p or if -flax-vector-conversions
2014 allows it.
2015 * c-typeck.c (build_array_ref): Only allow vector indexing if the
2016 vectors satisfy gnu_vector_type_p.
2017 (build_unary_op): Only allow unary operators to be applied to
2018 vectors if they satisfy gnu_vector_type_p.
2019 (digest_init): Only allow by-element initialization of vectors
2020 if they satisfy gnu_vector_type_p.
2021 (really_start_incremental_init): Likewise.
2022 (push_init_level): Likewise.
2023 (pop_init_level): Likewise.
2024 (process_init_element): Likewise.
2025 (build_binary_op): Only allow binary operators to be applied to
2026 vectors if they satisfy gnu_vector_type_p.
2027
2028 2019-11-08 Joseph Myers <joseph@codesourcery.com>
2029
2030 * c-decl.c (grokparms): Convert () in a function definition to
2031 (void) for C2x.
2032 (store_parm_decls_oldstyle): Pedwarn for C2x.
2033 (store_parm_decls): Update comment about () not generating a
2034 prototype.
2035
2036 2019-11-07 Joseph Myers <joseph@codesourcery.com>
2037
2038 * c-parser.c (c_parser_attribute_arguments): New function.
2039 Factored out of c_parser_gnu_attribute.
2040 (c_parser_gnu_attribute): Use c_parser_attribute_arguments.
2041 (c_parser_balanced_token_sequence, c_parser_std_attribute)
2042 (c_parser_std_attribute_specifier): New functions.
2043 (c_parser_transaction_attributes): Use
2044 c_parser_std_attribute_specifier.
2045
2046 2019-11-07 Joseph Myers <joseph@codesourcery.com>
2047
2048 * c-parser.c (c_parser): Remove lex_untranslated_string. Add
2049 lex_joined_string and translate_strings_p.
2050 (c_lex_one_token): Pass 0 or C_LEX_STRING_NO_JOIN to
2051 c_lex_with_flags.
2052 (c_parser_string_literal): New function.
2053 (c_parser_static_assert_declaration_no_semi): Use
2054 c_parser_string_literal. Do not set lex_untranslated_string.
2055 (c_parser_asm_string_literal): Use c_parser_string_literal.
2056 (c_parser_simple_asm_expr): Do not set lex_untranslated_string.
2057 (c_parser_gnu_attributes): Set and restore translate_strings_p
2058 instead of lex_untranslated_string.
2059 (c_parser_asm_statement): Do not set lex_untranslated_string.
2060 (c_parser_asm_operands): Likewise.
2061 (c_parser_has_attribute_expression): Set and restore
2062 translate_strings_p instead of lex_untranslated_string.
2063 (c_parser_postfix_expression): Use c_parser_string_literal.
2064 (pragma_lex): Likewise.
2065 (c_parser_pragma_pch_preprocess): Set lex_joined_string.
2066 (c_parse_file): Set translate_strings_p.
2067 * gimple-parser.c (c_parser_gimple_postfix_expression)
2068 (c_parser_gimple_or_rtl_pass_list): Use c_parser_string_literal.
2069 * c-parser.c (c_parser_string_literal): Declare function.
2070
2071 2019-11-02 Jakub Jelinek <jakub@redhat.com>
2072
2073 * c-parser.c (c_finish_omp_declare_variant): Use
2074 omp_get_context_selector instead of c_omp_get_context_selector.
2075
2076 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2077
2078 * c-tree.h (c_simulate_enum_decl): Declare.
2079 * c-decl.c (c_simulate_enum_decl): New function.
2080 * c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
2081
2082 2019-10-29 Richard Sandiford <richard.sandiford@arm.com>
2083
2084 * c-tree.h (c_simulate_builtin_function_decl): Declare.
2085 * c-decl.c (c_simulate_builtin_function_decl): New function.
2086 * c-objc-common.h (LANG_HOOKS_SIMULATE_BUILTIN_FUNCTION_DECL): Define
2087 to the above.
2088
2089 2019-10-28 Martin Sebor <msebor@redhat.com>
2090
2091 PR c/66970
2092 * c-decl.c (names_builtin_p): Define a new function.
2093
2094 2019-10-28 Richard Biener <rguenther@suse.de>
2095
2096 PR c/92249
2097 * gimple-parser.c (c_parser_parse_gimple_body): Make
2098 current_bb the entry block initially to easier recover
2099 from errors.
2100 (c_parser_gimple_compound_statement): Adjust.
2101
2102 2019-10-24 Jakub Jelinek <jakub@redhat.com>
2103
2104 * c-parser.c (c_finish_omp_declare_variant): Use
2105 omp_context_selector_matches instead of
2106 c_omp_context_selector_matches.
2107 * c-decl.c (c_decl_attributes): Add "omp declare target block"
2108 attribute in between declare target and end declare target
2109 pragmas.
2110
2111 2019-10-15 Joseph Myers <joseph@codesourcery.com>
2112
2113 * c-parser.c (c_parser_attribute_any_word): Rename to
2114 c_parser_gnu_attribute_any_word. All callers changed.
2115 (c_parser_attribute): Rename to c_parser_gnu_attribute. All
2116 callers changed.
2117 (c_parser_attributes): Rename to c_parser_gnu_attributes. All
2118 callers changed.
2119 (c_parser_declaration_or_fndef, c_parser_declspecs)
2120 (c_parser_enum_specifier, c_parser_struct_or_union_specifier)
2121 (c_parser_struct_declaration, c_parser_declarator)
2122 (c_parser_gnu_attribute, c_parser_compound_statement)
2123 (c_parser_label, c_parser_statement, c_parser_objc_method_decl)
2124 (c_parser_transaction_attributes): Add "gnu-" prefix to names of
2125 attribute-related syntax productions.
2126
2127 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2128
2129 * c-objc-common.c (useful_aka_type_p): Replace with...
2130 (get_aka_type): ...this new function. Given the original type,
2131 decide which aka type to print (if any). Only look through typedefs
2132 if user_facing_original_type_p.
2133 (print_type): Update accordingly.
2134
2135 2019-10-14 Jakub Jelinek <jakub@redhat.com>
2136
2137 * c-parser.c (c_parser_omp_all_clauses): Change bool NESTED_P argument
2138 into int NESTED, if it is 2, diagnose missing commas in between
2139 clauses.
2140 (c_parser_omp_context_selector): Pass 2 as last argument to
2141 c_parser_omp_all_clauses.
2142
2143 2019-10-12 Jakub Jelinek <jakub@redhat.com>
2144
2145 * c-parser.c (c_parser_omp_context_selector): Improve error recovery.
2146 For simd properties, put them directly into TREE_VALUE.
2147 (c_finish_omp_declare_variant): Call c_omp_mark_declare_variant.
2148 If c_omp_context_selector_matches is 0, don't add attribute, otherwise
2149 add "omp declare variant base" attribute rather than
2150 "omp declare variant".
2151
2152 2019-10-11 Joseph Myers <joseph@codesourcery.com>
2153
2154 * c-decl.c (declspecs_add_type): Use pedwarn_c11 for DFP types.
2155
2156 2019-10-10 Jakub Jelinek <jakub@redhat.com>
2157
2158 * c-parser.c (c_parser_omp_all_clauses): Add NESTED_P argument, if
2159 true, terminate processing on closing paren and don't skip to end of
2160 pragma line.
2161 (c_parser_omp_declare_simd): Handle also declare variant.
2162 (omp_construct_selectors, omp_device_selectors,
2163 omp_implementation_selectors, omp_user_selectors): New variables.
2164 (c_parser_omp_context_selector,
2165 c_parser_omp_context_selector_specification,
2166 c_finish_omp_declare_variant): New functions.
2167 (c_finish_omp_declare_simd): Handle both declare simd and
2168 declare variant.
2169 (c_parser_omp_declare): Handle declare variant.
2170
2171 2019-10-02 Joseph Myers <joseph@codesourcery.com>
2172
2173 * c-parser.c (c_parser_asm_statement): Handle CPP_SCOPE like two
2174 CPP_COLON tokens.
2175
2176 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2177
2178 * c-objc-common.c (useful_aka_type_p): New function.
2179 (print_type): Use it to decide whether an aka type is worth printing.
2180
2181 2019-09-27 Jakub Jelinek <jakub@redhat.com>
2182
2183 PR c++/88203
2184 * c-parser.c (c_parser_predefined_identifier): New function.
2185 (c_parser_postfix_expression): Use it.
2186 (c_parser_omp_variable_list): Parse predefined identifiers.
2187 * c-typeck.c (c_finish_omp_clauses): Allow predefined variables
2188 in shared and firstprivate clauses, even when they are predetermined
2189 shared.
2190
2191 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2192
2193 * c-typeck.c (build_function_call_vec): Take the original function
2194 decl as an optional final parameter. Pass all built-in calls to
2195 check_builtin_function_arguments.
2196
2197 2019-09-20 Eric Botcazou <ebotcazou@adacore.com>
2198
2199 PR c/91815
2200 * c-decl.c (pushdecl): In C detect duplicate declarations across scopes
2201 of identifiers in the external scope only for variables and functions.
2202
2203 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2204
2205 PR c/78736
2206 * c-typeck.c (convert_for_assignment): Handle Wenum-conversion.
2207
2208 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2209
2210 PR pch/61250
2211 * c-parser.c (c_parse_file): Call c_common_no_more_pch ()
2212 after determining that the first token is not
2213 PRAGMA_GCC_PCH_PREPROCESS.
2214
2215 2019-08-22 Eric Botcazou <ebotcazou@adacore.com>
2216
2217 * c-parser.c (c_parser_declaration_or_fndef): Set DECL_ARGUMENTS of a
2218 FUNCTION_DECL to the right value in the presence of nested declarators.
2219
2220 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2221
2222 PR middle-end/91421
2223 * c-decl.c (merge_decls): Use copy_decl_built_in_function.
2224
2225 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2226
2227 PR middle-end/91421
2228 * c-decl.c (header_for_builtin_fn): Take a FUNCTION_DECL instead
2229 of a built_in_function.
2230 (diagnose_mismatched_decls, implicitly_declare): Update accordingly.
2231
2232 2019-08-10 Jakub Jelinek <jakub@redhat.com>
2233
2234 * c-parser.c (c_parser_omp_clause_name): Parse device_type.
2235 (c_parser_omp_clause_device_type): New function.
2236 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2237 (OMP_DECLARE_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2238 (c_parser_omp_declare_target): Handle device_type clauses. Remove
2239 diagnostics for declare target with clauses nested in clause-less
2240 declare target declaration-definition-seq.
2241 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_DEVICE_TYPE.
2242
2243 2019-08-09 Jakub Jelinek <jakub@redhat.com>
2244
2245 * c-parser.c (check_no_duplicate_clause): Simplify using
2246 omp_find_clause.
2247 (c_parser_omp_clause_if): Fix up printing of target {enter,exit} data
2248 directive name modifiers.
2249 (c_parser_omp_clause_proc_bind): Check for duplicate proc_bind clause.
2250
2251 PR c/91401
2252 * c-parser.c (c_parser_omp_clause_dist_schedule): Fix up typos in the
2253 check_no_duplicate_clause call. Comment it out, instead emit a
2254 warning for duplicate dist_schedule clauses.
2255
2256 2019-08-08 Richard Sandiford <richard.sandiford@arm.com>
2257
2258 * c-decl.c (finish_enum): Clear C_TYPE_BEING_DEFINED.
2259
2260 2019-08-08 Jakub Jelinek <jakub@redhat.com>
2261
2262 * c-typeck.c (c_finish_omp_clauses): For C_ORT_OMP
2263 OMP_CLAUSE_USE_DEVICE_* clauses use oacc_reduction_head bitmap
2264 instead of generic_head to track duplicates.
2265
2266 2019-08-07 Jakub Jelinek <jakub@redhat.com>
2267
2268 * c-parser.c (c_parser_omp_clause_name): Parse use_device_addr clause.
2269 (c_parser_omp_clause_use_device_addr): New function.
2270 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2271 (OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.
2272 (c_parser_omp_target_data): Handle PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR
2273 like PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR, adjust diagnostics about no
2274 map or use_device_* clauses.
2275 * c-typeck.c (c_finish_omp_clauses): For OMP_CLAUSE_USE_DEVICE_PTR
2276 in OpenMP, require pointer type rather than pointer or array type.
2277 Handle OMP_CLAUSE_USE_DEVICE_ADDR.
2278
2279 2019-07-31 Jakub Jelinek <jakub@redhat.com>
2280
2281 PR c/91192
2282 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
2283 even if finish is UNKNOWN_LOCATION, just use start as finish in that
2284 case.
2285
2286 2019-07-25 Martin Liska <mliska@suse.cz>
2287 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2288
2289 PR c++/23383
2290 * c-decl.c (merge_decls): Merge OPERATOR_DELETE flag.
2291
2292 2019-07-25 Martin Liska <mliska@suse.cz>
2293
2294 * c-decl.c (merge_decls): Use new macros
2295 (e.g. DECL_SET_LAMBDA_FUNCTION and DECL_LAMBDA_FUNCTION_P).
2296
2297 2019-07-23 Richard Biener <rguenther@suse.de>
2298
2299 PR tree-optimization/83518
2300 * gimple-parser.c (c_parser_parse_gimple_body): When we have
2301 a CFG also rebuild cgraph edges.
2302
2303 2019-07-20 Jakub Jelinek <jakub@redhat.com>
2304
2305 * c-parser.c (c_parser_omp_clause_name): Handle bind clause.
2306 (c_parser_omp_clause_bind): New function.
2307 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_BIND.
2308 (OMP_LOOP_CLAUSE_MASK): Define.
2309 (c_parser_omp_loop): New function.
2310 (c_parser_omp_parallel, c_parser_omp_teams): Handle parsing of
2311 loop combined with parallel or teams.
2312 (c_parser_omp_construct): Handle PRAGMA_OMP_LOOP.
2313 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_BIND.
2314
2315 2019-07-18 Richard Sandiford <richard.sandiford@arm.com>
2316
2317 PR c/53633
2318 * c-decl.c (finish_function): Check targetm.warn_func_return
2319 before issuing a -Wreturn-type warning.
2320
2321 2019-07-12 Alexandre Oliva <oliva@adacore.com>
2322
2323 * gimple-parser.c (c_parser_gimple_try_stmt): New.
2324 (c_parser_compound_statement): Call it.
2325
2326 2019-07-12 Jakub Jelinek <jakub@redhat.com>
2327
2328 * c-parser.c (c_parser_omp_clause_name): Handle order clause.
2329 (c_parser_omp_clause_order): New function.
2330 (c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
2331 (OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
2332 PRAGMA_OMP_CLAUSE_ORDER.
2333 * c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
2334
2335 2019-07-10 Richard Biener <rguenther@suse.de>
2336
2337 * gimple-parser.c (c_parser_gimple_postfix_expression): Support
2338 _Literal (int *) &x for address literals.
2339
2340 2019-07-09 Martin Sebor <msebor@redhat.com>
2341
2342 PR c++/61339
2343 * c-decl.c (xref_tag): Change class-key of PODs to struct and others
2344 to class.
2345 (field_decl_cmp): Same.
2346 * c-parser.c (c_parser_struct_or_union_specifier): Same.
2347 * c-tree.h: Same.
2348 * gimple-parser.c (c_parser_gimple_compound_statement): Same.
2349
2350 2019-07-09 Martin Sebor <msebor@redhat.com>
2351
2352 PR c++/61339
2353 * c-decl.c: Change class-key from class to struct and vice versa
2354 to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
2355 * gimple-parser.c: Same.
2356
2357 2019-07-01 Richard Biener <rguenther@suse.de>
2358
2359 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2360 _Literal (char *) &"foo" for address literals pointing to
2361 STRING_CSTs.
2362
2363 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2364
2365 * c-parser.c (c_parse_init): Create keyword for "__intN__" type.
2366 * c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
2367 C incompatibility if alternate "__intN__" form is used.
2368
2369 2019-06-24 Martin Sebor <msebor@redhat.com>
2370
2371 * c-typeck.c (build_binary_op): Hyphenate floating-point.
2372
2373 2019-06-10 Jakub Jelinek <jakub@redhat.com>
2374
2375 * c-parser.c (c_parser_pragma): Reject PRAGMA_OMP_SCAN.
2376 (c_parser_omp_clause_reduction): Don't sorry_at on inscan reductions.
2377 (c_parser_omp_scan_loop_body): New function.
2378 (c_parser_omp_for_loop): Call c_parser_omp_scan_loop_body if there are
2379 inscan reduction clauses.
2380 * c-typeck.c (c_finish_omp_clauses): Reject mixing inscan with
2381 non-inscan reductions on the same construct, or inscan reductions with
2382 ordered or schedule clauses, or inscan array reductions.
2383
2384 2019-06-05 Martin Sebor <msebor@redhat.com>
2385
2386 PR c/90737
2387 * c-typeck.c (c_finish_return): Only consider functions returning
2388 pointers as candidates for -Wreturn-local-addr.
2389
2390 2019-06-05 Martin Sebor <msebor@redhat.com>
2391
2392 * c-decl.c (start_decl): Adjust quoting and hyphenation
2393 in diagnostics.
2394 (finish_decl): Same.
2395 (finish_enum): Same.
2396 (start_function): Same.
2397 (declspecs_add_type): Same.
2398 * c-parser.c (warn_for_abs): Same.
2399 * c-typeck.c (build_binary_op): Same.
2400
2401 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2402
2403 PR c/89433
2404 * c-parser.c (c_finish_oacc_routine): Rework checking if already
2405 marked with an OpenACC 'routine' directive.
2406
2407 PR c/89433
2408 * c-parser.c (c_parser_oacc_routine): Normalize order of clauses.
2409 (c_finish_oacc_routine): Call oacc_verify_routine_clauses.
2410
2411 PR c/89433
2412 * c-parser.c (c_finish_oacc_routine): Refer to OpenACC 'routine'
2413 clauses from "omp declare target" attribute.
2414
2415 2019-05-16 Martin Sebor <msebor@redhat.com>
2416
2417 * c-decl.c (start_decl): Quote keywords, operators, and
2418 types in diagnostics.
2419 (finish_decl): Same.
2420 * c-parser.c (c_parser_asm_statement): Same.
2421 (c_parser_conditional_expression): Same.
2422 (c_parser_transaction_cancel): Same.
2423 * c-typeck.c (c_common_type): Same.
2424 (build_conditional_expr): Same.
2425 (digest_init): Same.
2426 (process_init_element): Same.
2427 (build_binary_op): Same.
2428
2429 2019-05-17 Richard Biener <rguenther@suse.de>
2430
2431 * gimple-parser.c (c_parser_gimple_statement): Handle __VEC_PERM.
2432 (c_parser_gimple_unary_expression): Likewise.
2433 (c_parser_gimple_parentized_ternary_expression): New function.
2434
2435 2019-05-16 Richard Biener <rguenther@suse.de>
2436
2437 * gimple-parser.c (c_parser_gimple_statement): Handle __BIT_INSERT.
2438 (c_parser_gimple_unary_expression): Likewise.
2439
2440 2019-05-15 Richard Biener <rguenther@suse.de>
2441
2442 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
2443 __BIT_FIELD_REF.
2444
2445 2019-05-14 Richard Biener <rguenther@suse.de>
2446
2447 * gimple-parser.c (c_parser_gimple_statement): Remove
2448 questionable auto-promotion to VIEW_CONVERT_EXPR.
2449 (c_parser_gimple_typespec): Split out from __MEM parsing.
2450 (c_parser_gimple_postfix_expression): Handle __VIEW_CONVERT.
2451 * tree-pretty-print.c (dump_generic_node): Dump VIEW_CONVERT_EXPR
2452 as __VIEW_CONVERT with -gimple.
2453
2454 2019-05-09 Martin Liska <mliska@suse.cz>
2455
2456 * gimple-parser.c (c_parser_gimple_statement): Support __MIN and
2457 __MAX.
2458 (c_parser_gimple_unary_expression): Parse also binary expression
2459 __MIN and __MAX.
2460 (c_parser_gimple_parentized_binary_expression): New function.
2461
2462 2019-05-09 Martin Liska <mliska@suse.cz>
2463
2464 * gimple-parser.c (struct gimple_parser): Add probability.
2465 for gimple_parser_edge.
2466 (gimple_parser::push_edge): Add new argument probability.
2467 (c_parser_gimple_parse_bb_spec): Parse also probability
2468 if present.
2469 (c_parser_parse_gimple_body): Set edge probability.
2470 (c_parser_gimple_compound_statement): Consume token
2471 before calling c_parser_gimple_goto_stmt.
2472 Parse BB counts.
2473 (c_parser_gimple_statement): Pass new argument.
2474 (c_parser_gimple_goto_stmt): Likewise.
2475 (c_parser_gimple_if_stmt): Likewise.
2476 (c_parser_gimple_or_rtl_pass_list): Parse hot_bb_threshold.
2477 * c-parser.c (c_parser_declaration_or_fndef): Pass
2478 hot_bb_threshold argument.
2479 * c-tree.h (struct c_declspecs): Add hot_bb_threshold
2480 field.
2481 (c_parser_gimple_parse_bb_spec_edge_probability): New.
2482
2483 2019-04-26 Jakub Jelinek <jakub@redhat.com>
2484
2485 PR debug/90197
2486 * c-tree.h (c_finish_loop): Add 2 further location_t arguments.
2487 * c-parser.c (c_parser_while_statement): Adjust c_finish_loop caller.
2488 (c_parser_do_statement): Likewise.
2489 (c_parser_for_statement): Likewise. Formatting fixes.
2490 * c-typeck.c (c_finish_loop): Add COND_LOCUS and INCR_LOCUS arguments,
2491 emit DEBUG_BEGIN_STMTs if needed.
2492
2493 2019-04-19 Jakub Jelinek <jakub@redhat.com>
2494
2495 PR c/89888
2496 * c-typeck.c (struct c_switch): Remove outside_range_p member.
2497 (c_start_case): Don't clear it.
2498 (do_case): Adjust c_add_case_label caller.
2499 (c_finish_case): Adjust c_do_switch_warnings caller.
2500
2501 PR c++/90108
2502 * c-decl.c (merge_decls): If remove is main variant and
2503 DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
2504 variant that has newdecl as TYPE_NAME if any.
2505
2506 2019-04-12 Jakub Jelinek <jakub@redhat.com>
2507
2508 PR c/89933
2509 * c-decl.c (merge_decls): When newdecl's type is its main variant,
2510 don't try to remove it from the variant list, but instead assert
2511 it has no variants.
2512
2513 2019-04-01 Richard Biener <rguenther@suse.de>
2514
2515 PR c/71598
2516 * c-tree.h (c_get_alias_set): Declare.
2517 * c-objc-common.h (LANG_HOOKS_GET_ALIAS_SET): Use c_get_alias_set.
2518 * c-objc-common.c (c_get_alias_set): Treat enumeral types
2519 as the underlying integer type.
2520
2521 2019-03-19 Martin Sebor <msebor@redhat.com>
2522
2523 PR tree-optimization/89688
2524 * c-decl.c (finish_decl): Call braced_lists_to_string for more
2525 kinds of initializers.
2526
2527 2019-03-19 Jakub Jelinek <jakub@redhat.com>
2528
2529 PR c/89734
2530 * c-decl.c (grokdeclarator): Call c_build_qualified_type on function
2531 return type even if quals_used is 0. Formatting fixes.
2532
2533 2019-03-14 Richard Biener <rguenther@suse.de>
2534
2535 * c-tree.h (enum c_declspec_il): New.
2536 (struct c_declspecs): Merge gimple_p and rtl_p into declspec_il
2537 enum bitfield.
2538 * c-parser.c (c_parser_declaration_or_fndef): Adjust accordingly.
2539 Pass start pass and declspec_il to c_parser_parse_gimple_body.
2540 (c_parser_declspecs): Adjust.
2541 * gimple-parser.c: Include cfg.h, cfghooks.h, cfganal.h, tree-cfg.h,
2542 gimple-iterator.h, cfgloop.h, tree-phinodes.h, tree-into-ssa.h
2543 and bitmap.h.
2544 (struct gimple_parser): New.
2545 (gimple_parser::push_edge): New method.
2546 (c_parser_gimple_parse_bb_spec): New helper.
2547 (c_parser_parse_gimple_body): Get start pass and IL specification.
2548 Initialize SSA and CFG.
2549 (c_parser_gimple_compound_statement): Handle CFG and SSA build.
2550 Build a gimple_parser parsing state and pass it along.
2551 (c_parser_gimple_statement): Change intermittend __PHI internal
2552 function argument for the edge.
2553 (c_parser_gimple_or_rtl_pass_list): Handle ssa, cfg flags.
2554 (c_parser_gimple_goto_stmt): Record edges to build.
2555 (c_parser_gimple_if_stmt): Likewise.
2556 * gimple-parser.h (c_parser_parse_gimple_body): Adjust.
2557 (c_parser_gimple_or_rtl_pass_list): Likewise.
2558
2559 2019-03-11 Martin Liska <mliska@suse.cz>
2560
2561 * c-decl.c (check_for_loop_decls): Wrap an option name
2562 in a string format message and fix GNU coding style.
2563 * c-parser.c (c_parser_declspecs): Likewise.
2564
2565 2019-03-08 Jakub Jelinek <jakub@redhat.com>
2566
2567 PR tree-optimization/89550
2568 * c-decl.c (finish_function): Only set TREE_NO_WARNING if warning_at
2569 returned true.
2570 (c_write_global_declarations_1): Only set TREE_NO_WARNING if pedwarn
2571 or warning returned true.
2572
2573 2019-02-28 Jakub Jelinek <jakub@redhat.com>
2574
2575 PR c/89525
2576 * c-typeck.c (convert_arguments): Call inform_declaration only if
2577 the previous warning_at call returned true.
2578
2579 2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
2580
2581 * c-parser.c (c_parser_oacc_shape_clause): Add loc formal
2582 parameter. Adjust all users.
2583 (c_parser_oacc_simple_clause): Replace parser with loc formal
2584 parameter. Adjust all users.
2585
2586 2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
2587
2588 PR c/87924
2589 * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
2590 clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
2591
2592 2019-02-15 Jakub Jelinek <jakub@redhat.com>
2593
2594 PR c/89340
2595 * c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
2596 before c_decl_attributes rather than after it.
2597
2598 2019-02-06 Jakub Jelinek <jakub@redhat.com>
2599
2600 PR c/89211
2601 * c-parser.c (c_parser_declaration_or_fndef): Don't update
2602 DECL_ARGUMENTS of d if it has been defined already. Use a single if
2603 instead of 3 nested ifs.
2604
2605 2019-02-06 Joseph Myers <joseph@codesourcery.com>
2606
2607 PR c/88584
2608 * c-decl.c (finish_decl): Do not complete array types for arrays
2609 with external linkage not at file scope.
2610
2611 2019-02-05 Richard Biener <rguenther@suse.de>
2612
2613 PR c/88606
2614 * c-decl.c (finish_struct): Reset TYPE_TRANSPARENT_AGGR on
2615 all type variants when not supported.
2616
2617 2019-01-30 Jakub Jelinek <jakub@redhat.com>
2618
2619 PR c/89061
2620 * c-tree.h (C_DECL_COMPOUND_LITERAL_P): Define.
2621 * c-decl.c (decl_jump_unsafe): Return false for
2622 C_DECL_COMPOUND_LITERAL_P decls.
2623 (build_compound_literal): Set C_DECL_COMPOUND_LITERAL_P.
2624
2625 2019-01-29 Jakub Jelinek <jakub@redhat.com>
2626
2627 PR c/89045
2628 * c-decl.c (build_compound_literal): Don't pushdecl if in parameter
2629 scope.
2630
2631 PR c/86125
2632 * c-decl.c (last_fileptr_type): Remove.
2633 (last_structptr_types): New variable.
2634 (match_builtin_function_types): Compare TYPE_MAIN_VARIANT of
2635 {old,new}rettype instead of the types themselves. Assert
2636 last_structptr_types array has the same number of elements
2637 as builtin_structptr_types array. Use TYPE_MAIN_VARIANT for
2638 argument oldtype and newtype. Instead of handling
2639 just fileptr_type_node specially, handle all builtin_structptr_types
2640 pointer nodes. Formatting fix.
2641
2642 2019-01-24 Martin Sebor <msebor@redhat.com>
2643
2644 PR c/86125
2645 PR c/88886
2646 PR middle-end/86308
2647 * c-decl.c (match_builtin_function_types): Add arguments.
2648 (diagnose_mismatched_decls): Diagnose mismatched declarations
2649 of built-ins more strictly.
2650
2651 2019-01-24 Jakub Jelinek <jakub@redhat.com>
2652
2653 PR c++/88976
2654 * c-typeck.c (c_finish_omp_cancel): Diagnose more than one if
2655 on #pragma omp cancel with different modifiers.
2656
2657 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2658
2659 PR c/51628
2660 PR c/88664
2661 * c-typeck.c (convert_for_assignment): Upate the
2662 warn_for_address_or_pointer_of_packed_member call.
2663
2664 2019-01-16 Tom Honermann <tom@honermann.net>
2665 Jason Merrill <jason@redhat.com>
2666
2667 * c-typeck.c (digest_init): Revised the error message produced for
2668 ill-formed cases of array initialization with a string literal.
2669 (error_init): Make variadic.
2670
2671 2019-01-12 Jakub Jelinek <jakub@redhat.com>
2672
2673 * c-typeck.c (convert_for_assignment): Fix a comment typo.
2674
2675 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2676
2677 PR c/88701
2678 * c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
2679 if current_function_decl is non-NULL.
2680
2681 2019-01-07 Joseph Myers <joseph@codesourcery.com>
2682
2683 PR c/88720
2684 PR c/88726
2685 * c-decl.c (pop_scope): Use TREE_PUBLIC and b->nested to determine
2686 whether a function is nested, not DECL_EXTERNAL. Diagnose inline
2687 functions declared but never defined only for external scope, not
2688 for other scopes.
2689
2690 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2691
2692 PR c++/85052
2693 * c-parser.c (c_parser_postfix_expression): Parse
2694 __builtin_convertvector.
2695
2696 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2697
2698 Update copyright years.
2699
2700 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2701
2702 PR c/51628
2703 * c-typeck.c (convert_for_assignment): Call
2704 warn_for_address_or_pointer_of_packed_member.
2705
2706 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2707
2708 * c-parser.c (c_parser_asm_statement) <RID_CONST, RID_RESTRICT>: Give
2709 a more specific error message (instead of just falling through).
2710
2711 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2712
2713 * c-parser.c (c_parser_asm_statement): Keep track of the location each
2714 asm qualifier is first seen; use that to give nicer "duplicate asm
2715 qualifier" messages. Delete 'quals" variable, instead pass the
2716 "is_volatile_ flag to build_asm_stmt directly.
2717 * c-tree.h (build_asm_stmt): Make the first arg bool instead of tree.
2718 * c-typeck.c (build_asm_stmt): Ditto; adjust.
2719
2720 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2721
2722 * c-parser.c (c_parser_asm_statement): Rewrite the loop to work without
2723 "done" boolean variable.
2724
2725 2018-12-19 David Malcolm <dmalcolm@redhat.com>
2726
2727 PR c++/87504
2728 * c-typeck.c (class maybe_range_label_for_tree_type_mismatch):
2729 Move from here to gcc-rich-location.h and gcc-rich-location.c.
2730 (build_binary_op): Use struct op_location_t and
2731 class binary_op_rich_location.
2732
2733 2018-12-11 Jakub Jelinek <jakub@redhat.com>
2734
2735 PR sanitizer/88426
2736 * c-convert.c (convert): Call c_fully_fold before calling
2737 ubsan_instrument_float_cast.
2738
2739 2018-12-08 Segher Boessenkool <segher@kernel.crashing.org>
2740
2741 * c-parser (c_parser_asm_statement) [RID_INLINE]: Delete stray line
2742 setting "quals".
2743
2744 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2745
2746 * c-parser.c (c_parser_asm_statement): Detect the inline keyword
2747 after asm. Pass a flag for it to build_asm_expr.
2748 * c-tree.h (build_asm_expr): Update declaration.
2749 * c-typeck.c (build_asm_stmt): Add is_inline parameter. Use it to
2750 set ASM_INLINE_P.
2751
2752 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2753
2754 PR inline-asm/55681
2755 * c-parser.c (c_parser_asm_statement): Update grammar. Allow any
2756 combination of volatile and goto, in any order, without repetitions.
2757
2758 2018-12-04 James Norris <jnorris@codesourcery.com>
2759 Cesar Philippidis <cesar@codesourcery.com>
2760 Julian Brown <julian@codesourcery.com>
2761
2762 * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
2763 code.
2764
2765 2018-11-30 Richard Biener <rguenther@suse.de>
2766
2767 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
2768 _Literal (type) { ... } as empty aggregate or vector constructor.
2769
2770 2018-11-29 Martin Sebor <msebor@redhat.com>
2771
2772 PR c/88091
2773 * c-typeck.c (convert_argument): Add a parameter. Adjust indentation.
2774 (convert_arguments): Add comments. Pass additional argument to
2775 the function above.
2776
2777 2018-11-29 Martin Sebor <msebor@redhat.com>
2778
2779 PR c/88172
2780 PR testsuite/88208
2781 * c-decl.c (declspec_add_alignas): Adjust call to check_user_alignment.
2782
2783 2018-11-23 Martin Sebor <msebor@redhat.com>
2784
2785 PR testsuite/88098
2786 * c-typeck.c (convert_arguments): Call builtin_decl_explicit instead.
2787 (maybe_warn_builtin_no_proto_arg): Handle short enum to int promotion.
2788
2789 2018-11-20 Martin Sebor <msebor@redhat.com>
2790
2791 * c-parser.c (c_parser_has_attribute_expression): New function.
2792 (c_parser_attribute): New function.
2793 (c_parser_attributes): Move code into c_parser_attribute.
2794 (c_parser_unary_expression): Handle RID_HAS_ATTRIBUTE_EXPRESSION.
2795
2796 2018-11-15 Martin Sebor <msebor@redhat.com>
2797
2798 PR c/83656
2799 * c-decl.c (header_for_builtin_fn): Declare.
2800 (diagnose_mismatched_decls): Diagnose declarations of built-in
2801 functions without a prototype.
2802 * c-typeck.c (maybe_warn_builtin_no_proto_arg): New function.
2803 (convert_argument): Same.
2804 (convert_arguments): Factor code out into convert_argument.
2805 Detect mismatches between built-in formal arguments in calls
2806 to built-in without prototype.
2807 (build_conditional_expr): Same.
2808 (type_or_builtin_type): New function.
2809 (convert_for_assignment): Add argument. Conditionally issue
2810 warnings instead of errors for mismatches.
2811
2812 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2813
2814 * c-decl.c: Replace "source_location" with "location_t".
2815 * c-tree.h: Likewise.
2816 * c-typeck.c: Likewise.
2817 * gimple-parser.c: Likewise.
2818
2819 2018-11-09 Jakub Jelinek <jakub@redhat.com>
2820
2821 * c-parser.c (c_parser_omp_clause_final): Use
2822 c_parser_expr_no_commas, convert_lvalue_to_rvalue,
2823 c_objc_common_truthvalue_conversion, c_fully_fold and parentheses
2824 parsing instead of c_parser_paren_condition.
2825 (c_parser_omp_clause_if): Use c_parser_expr_no_commas,
2826 convert_lvalue_to_rvalue, c_objc_common_truthvalue_conversion and
2827 c_fully_fold instead of c_parser_condition.
2828 (c_parser_omp_clause_num_threads, c_parser_omp_clause_num_tasks,
2829 c_parser_omp_clause_grainsize, c_parser_omp_clause_priority,
2830 c_parser_omp_clause_hint, c_parser_omp_clause_num_teams,
2831 c_parser_omp_clause_thread_limit, c_parser_omp_clause_linear): Use
2832 c_parser_expr_no_commas instead of c_parser_expression.
2833
2834 * c-parser.c (c_parser_omp_clause_reduction): Call sorry_at on
2835 reduction clause with inscan modifier.
2836
2837 * c-parser.c (c_parser_omp_requires): Call sorry_at on requires
2838 clauses other than atomic_default_mem_order.
2839
2840 2018-11-08 Jakub Jelinek <jakub@redhat.com>
2841
2842 * c-parser.c: Include memmode.h.
2843 (c_parser_omp_depobj, c_parser_omp_requires): New functions.
2844 (c_parser_pragma): Handle PRAGMA_OMP_DEPOBJ and PRAGMA_OMP_REQUIRES.
2845 (c_parser_omp_clause_name): Handle nontemporal, in_reduction and
2846 task_reduction clauses.
2847 (c_parser_omp_variable_list): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION.
2848 For OMP_CLAUSE_DEPEND, parse clause operands as either an array
2849 section, or lvalue assignment expression.
2850 (c_parser_omp_clause_if): Handle cancel and simd modifiers.
2851 (c_parser_omp_clause_lastprivate): Parse optional
2852 conditional: modifier.
2853 (c_parser_omp_clause_hint): Require constant integer expression rather
2854 than just integer expression.
2855 (c_parser_omp_clause_defaultmap): Parse new kinds of defaultmap
2856 clause.
2857 (c_parser_omp_clause_reduction): Add IS_OMP and KIND arguments.
2858 Parse reduction modifiers. Pass KIND to c_parser_omp_variable_list.
2859 (c_parser_omp_clause_nontemporal, c_parser_omp_iterators): New
2860 functions.
2861 (c_parser_omp_clause_depend): Parse iterator modifier and handle
2862 iterators. Parse mutexinoutset and depobj kinds.
2863 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_reduction
2864 callers.
2865 (c_parser_omp_all_clauses): Likewise. Handle
2866 PRAGMA_OMP_CLAUSE_NONTEMPORAL and
2867 PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2868 (c_parser_omp_atomic): Parse hint and memory order clauses. Handle
2869 default memory order from requires directive if any. Adjust
2870 c_finish_omp_atomic caller.
2871 (c_parser_omp_critical): Allow comma in between (name) and hint clause.
2872 (c_parser_omp_flush): Parse flush with memory-order-clause.
2873 (c_parser_omp_for_loop): Allow NE_EXPR even in
2874 OpenMP loops, adjust c_finish_omp_for caller.
2875 (OMP_SIMD_CLAUSE_MASK): Add if and nontemporal clauses.
2876 (c_parser_omp_master): Add p_name, mask and cclauses arguments.
2877 Allow to be called while parsing combined parallel master.
2878 Parse combined master taskloop{, simd}.
2879 (c_parser_omp_parallel): Parse combined
2880 parallel master{, taskloop{, simd}} constructs.
2881 (OMP_TASK_CLAUSE_MASK): Add in_reduction clause.
2882 (OMP_TASKGROUP_CLAUSE_MASK): Define.
2883 (c_parser_omp_taskgroup): Add LOC argument. Parse taskgroup clauses.
2884 (OMP_TASKWAIT_CLAUSE_MASK): Define.
2885 (c_parser_omp_taskwait): Handle taskwait with depend clauses.
2886 (c_parser_omp_teams): Force a BIND_EXPR with BLOCK
2887 around teams body. Use SET_EXPR_LOCATION.
2888 (c_parser_omp_target_data): Allow target data
2889 with only use_device_ptr clauses.
2890 (c_parser_omp_target): Use SET_EXPR_LOCATION. Set
2891 OMP_REQUIRES_TARGET_USED bit in omp_requires_mask.
2892 (c_parser_omp_requires): New function.
2893 (c_finish_taskloop_clauses): New function.
2894 (OMP_TASKLOOP_CLAUSE_MASK): Add reduction and in_reduction clauses.
2895 (c_parser_omp_taskloop): Use c_finish_taskloop_clauses. Add forward
2896 declaration. Disallow in_reduction clause when combined with parallel
2897 master.
2898 (c_parser_omp_construct): Adjust c_parser_omp_master and
2899 c_parser_omp_taskgroup callers.
2900 * c-typeck.c (c_finish_omp_cancel): Diagnose if clause with modifier
2901 other than cancel.
2902 (handle_omp_array_sections_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION
2903 like OMP_CLAUSE_REDUCTION.
2904 (handle_omp_array_sections): Likewise. Call save_expr on array
2905 reductions before calling build_index_type. Handle depend clauses
2906 with iterators.
2907 (struct c_find_omp_var_s): New type.
2908 (c_find_omp_var_r, c_omp_finish_iterators): New functions.
2909 (c_finish_omp_clauses): Don't diagnose nonmonotonic clause
2910 with static, runtime or auto schedule kinds. Call save_expr for whole
2911 array reduction sizes. Diagnose reductions with zero sized elements
2912 or variable length structures. Diagnose nogroup clause used with
2913 reduction clause(s). Handle depend clause with
2914 OMP_CLAUSE_DEPEND_DEPOBJ. Diagnose bit-fields. Require
2915 omp_depend_t type for OMP_CLAUSE_DEPEND_DEPOBJ kinds and
2916 some different type for other kinds. Use build_unary_op with
2917 ADDR_EXPR and build_indirect_ref instead of c_mark_addressable.
2918 Handle depend clauses with iterators. Remove no longer needed special
2919 case that predetermined const qualified vars may be specified in
2920 firstprivate clause. Complain if const qualified vars are mentioned
2921 in data-sharing clauses other than firstprivate or shared. Use
2922 error_at with OMP_CLAUSE_LOCATION (c) as first argument instead of
2923 error. Formatting fix. Handle OMP_CLAUSE_NONTEMPORAL and
2924 OMP_CLAUSE_{IN,TASK}_REDUCTION. Allow any lvalue as
2925 OMP_CLAUSE_DEPEND operand (besides array section), adjust diagnostics.
2926
2927 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2928
2929 * c-decl.c (implicit_decl_warning): Update "is there a suggestion"
2930 logic for change to name_hint::operator bool.
2931 (undeclared_variable): Likewise.
2932 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
2933 (c_parser_parameter_declaration): Likewise.
2934
2935 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2936
2937 * c-errors.c (pedwarn_c11): New function.
2938 * c-parser.c (disable_extension_diagnostics): Save
2939 warn_c11_c2x_compat and set it to 0.
2940 (restore_extension_diagnostics): Restore warn_c11_c2x_compat.
2941 (c_parser_static_assert_declaration_no_semi): Handle
2942 _Static_assert without string constant.
2943 * c-tree.h (pedwarn_c11): New prototype.
2944
2945 2018-10-17 David Malcolm <dmalcolm@redhat.com>
2946
2947 * Make-lang.in (selftest-c): New.
2948 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2949 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move here
2950 from gcc/Makefile.in.
2951
2952 2018-10-02 Richard Biener <rguenther@suse.de>
2953
2954 * c-decl.c (warn_if_shadowing): Do not test DECL_FROM_INLINE.
2955
2956 2018-09-26 Joseph Myers <joseph@codesourcery.com>
2957
2958 PR c/87390
2959 * c-typeck.c (build_binary_op): Use excess precision for
2960 comparisons of integers and floating-point for C11 and later.
2961
2962 2018-09-26 Martin Jambor <mjambor@suse.cz>
2963
2964 PR c/87347
2965 * c-parser.c (warn_for_abs): Bail out if TYPE_ARG_TYPES is NULL. Fix
2966 comment.
2967
2968 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2969
2970 * c-objc-common.c (range_label_for_type_mismatch::get_text):
2971 Update for new param.
2972 * c-typeck.c (maybe_range_label_for_tree_type_mismatch::get_text):
2973 Likewise.
2974
2975 2018-09-17 Martin Jambor <mjambor@suse.cz>
2976
2977 PR c/63886
2978 * c-parser.c: (warn_for_abs): New function.
2979 (c_parser_postfix_expression_after_primary): Call it.
2980
2981 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2982
2983 * c-typeck.c (digest_init): Shorten overlength strings.
2984
2985 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2986
2987 * c-decl.c (finish_decl): Call complete_flexible_array_elts.
2988
2989 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2990
2991 * c-decl.c (finish_decl): Call braced_list_to_string here ...
2992 * c-parser.c (c_parser_declaration_or_fndef): ... instead of here.
2993
2994 2018-08-30 Alexander Monakov <amonakov@ispras.ru>
2995
2996 * gimple-parser.c (c_parser_gimple_binary_expression): Accept infix
2997 "__MULT_HIGHPART" for MULT_HIGHPART_EXPR.
2998
2999 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3000
3001 PR 87091
3002 * c-decl.c (implicitly_declare): Update call to
3003 maybe_add_include_fixit to suggest overriding the location, as it
3004 is for a note.
3005 * c-objc-common.c (c_tree_printer): Update for conversion of
3006 show_caret_p to a tri-state.
3007
3008 2018-08-27 Martin Liska <mliska@suse.cz>
3009
3010 * c-decl.c (locate_old_decl): Use new function
3011 fndecl_built_in_p and remove check for FUNCTION_DECL if
3012 possible.
3013 (diagnose_mismatched_decls): Likewise.
3014 (merge_decls): Likewise.
3015 (warn_if_shadowing): Likewise.
3016 (pushdecl): Likewise.
3017 (implicitly_declare): Likewise.
3018 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3019 * c-tree.h (C_DECL_ISNT_PROTOTYPE): Likewise.
3020 * c-typeck.c (build_function_call_vec): Likewise.
3021 (convert_arguments): Likewise.
3022
3023 2018-08-20 David Malcolm <dmalcolm@redhat.com>
3024
3025 PR other/84889
3026 * c-decl.c (pushtag): Add auto_diagnostic_group instance.
3027 (diagnose_mismatched_decls): Likewise, in various places.
3028 (warn_if_shadowing): Likewise.
3029 (implicit_decl_warning): Likewise.
3030 (implicitly_declare): Likewise.
3031 (undeclared_variable): Likewise.
3032 (declare_label): Likewise.
3033 (grokdeclarator): Likewise.
3034 (start_function): Likewise.
3035 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3036 (c_parser_parameter_declaration): Likewise.
3037 (c_parser_binary_expression): Likewise.
3038 * c-typeck.c (c_expr_sizeof_expr): Likewise.
3039 (parser_build_binary_op): Likewise.
3040 (build_unary_op): Likewise.
3041 (error_init): Likewise.
3042 (pedwarn_init): Likewise.
3043 (warning_init): Likewise.
3044 (convert_for_assignment): Likewise.
3045
3046 2018-08-15 David Malcolm <dmalcolm@redhat.com>
3047
3048 * c-objc-common.c: Include "gcc-rich-location.h".
3049 (c_tree_printer): Move implemenation of '%T' to...
3050 (print_type): ...this new function.
3051 (range_label_for_type_mismatch::get_text): New function.
3052 * c-typeck.c (convert_for_assignment): Add type labels to the rhs
3053 range for the various ic_argpass cases.
3054 (class maybe_range_label_for_tree_type_mismatch): New class.
3055 (build_binary_op): Use it when calling binary_op_error.
3056
3057 2018-08-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3058
3059 * c-decl.c (start_decl): Do not warn if variables is named as main
3060 and is a local variable.
3061
3062 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
3063
3064 PR c/19315
3065 * c-decl.c (finish_decl): Don't add the 'extern' storage class to
3066 objects of unknown size.
3067
3068 2018-08-13 Martin Sebor <msebor@redhat.com>
3069
3070 PR tree-optimization/71625
3071 * c-parser.c (c_parser_declaration_or_fndef): Call
3072 braced_list_to_string.
3073
3074 2018-08-03 Bogdan Harjoc <harjoc@gmail.com>
3075
3076 PR c/86690
3077 * c-typeck.c (lookup_field): Do not use TYPE_LANG_SPECIFIC after
3078 errors.
3079
3080 2018-08-01 Martin Sebor <msebor@redhat.com>
3081
3082 PR tree-optimization/86650
3083 * c-objc-common.c (c_tree_printer): Move usage of EXPR_LOCATION (t)
3084 and TREE_BLOCK (t) from within percent_K_format to this callsite.
3085
3086 2018-08-01 Jakub Jelinek <jakub@redhat.com>
3087
3088 PR c/85704
3089 * c-typeck.c (init_field_decl_cmp): New function.
3090 (output_pending_init_elements): Use it for field comparisons
3091 instead of pure bit_position comparisons.
3092
3093 2018-07-12 Jakub Jelinek <jakub@redhat.com>
3094
3095 * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable
3096 type here, instead add "omp declare target implicit" attribute.
3097 (finish_decl): Diagnose vars without mappable type here.
3098
3099 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3100 Thomas Schwinge <thomas@codesourcery.com>
3101 Cesar Philippidis <cesar@codesourcery.com>
3102
3103 * c-parser.c (c_parser_omp_clause_name): Add support for finalize
3104 and if_present. Make present_or_{copy,copyin,copyout,create} aliases
3105 to their non-present_or_* counterparts. Make 'self' an alias to
3106 PRAGMA_OACC_CLAUSE_HOST.
3107 (c_parser_oacc_data_clause): Update GOMP mappings for
3108 PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
3109 PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
3110 (c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
3111 Remove support for present_or_* clauses.
3112 (OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3113 (OACC_PARALLEL_CLAUSE_MASK): Likewise.
3114 (OACC_DECLARE_CLAUSE_MASK): Likewise.
3115 (OACC_DATA_CLAUSE_MASK): Likewise.
3116 (OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
3117 (OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
3118 (OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
3119 (c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
3120 * c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.
3121
3122 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3123
3124 * c-typeck.c (build_unary_op): Handle ABSU_EXPR;
3125 * gimple-parser.c (c_parser_gimple_statement): Likewise.
3126 (c_parser_gimple_unary_expression): Likewise.
3127
3128 2018-06-15 Jakub Jelinek <jakub@redhat.com>
3129
3130 PR c/86093
3131 * c-typeck.c (pointer_diff): Cast both pointers to unqualified types
3132 before doing POINTER_DIFF_EXPR.
3133
3134 2018-06-07 Marek Polacek <polacek@redhat.com>
3135
3136 PR c/85318
3137 * c-decl.c (check_for_loop_decls): Add -Wc90-c99-compat warning about
3138 for loop initial declarations.
3139
3140 2018-05-30 David Pagan <dave.pagan@oracle.com>
3141
3142 PR c/55976
3143 * c-decl.c (grokdeclarator): Update check for return type warnings.
3144 (start_function): Likewise.
3145 (finish_function): Likewise.
3146 * c-typeck.c (c_finish_return): Update check for return type warnings.
3147 Pass OPT_Wreturn_type to pedwarn when appropriate.
3148
3149 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
3150
3151 * gimple-parser.c (c_parser_gimple_postfix_expression): Remove
3152 __FMA_EXPR handlng.
3153
3154 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
3155
3156 * gimple-parser.c: Include internal-fn.h.
3157 (c_parser_gimple_statement): Treat a leading CPP_DOT as a call.
3158 (c_parser_gimple_call_internal): New function.
3159 (c_parser_gimple_postfix_expression): Use it to handle CPP_DOT.
3160 Fix typos in comment.
3161
3162 2018-05-10 Jakub Jelinek <jakub@redhat.com>
3163
3164 PR c++/85662
3165 * c-fold.c (c_fully_fold_internal): Use fold_offsetof rather than
3166 fold_offsetof_1, pass TREE_TYPE (expr) as TYPE to it and drop the
3167 fold_convert_loc.
3168 * c-typeck.c (build_unary_op): Use fold_offsetof rather than
3169 fold_offsetof_1, pass argtype as TYPE to it and drop the
3170 fold_convert_loc.
3171
3172 2018-05-02 David Pagan <dave.pagan@oracle.com>
3173
3174 PR c/30552
3175 * c-decl.c (old_style_parameter_scope): New function.
3176 * c-parser.c (c_parser_postfix_expression): Check for statement
3177 expressions in old-style function parameter list declarations.
3178 * c-parser.h (old_style_parameter_scope): New extern declaration.
3179
3180 2018-04-25 Jakub Jelinek <jakub@redhat.com>
3181
3182 PR sanitizer/84307
3183 * c-decl.c (build_compound_literal): Call pushdecl (decl) even when
3184 it is not TREE_STATIC.
3185 * c-typeck.c (c_mark_addressable) <case COMPOUND_LITERAL_EXPR>: Mark
3186 not just the COMPOUND_LITERAL_EXPR node itself addressable, but also
3187 its COMPOUND_LITERAL_EXPR_DECL.
3188
3189 2018-03-21 Joseph Myers <joseph@codesourcery.com>
3190
3191 * c-parser.c (c_parser_postfix_expression): For __builtin_tgmath
3192 where all functions return the same _FloatN or _FloatNx type,
3193 treat integer types as _Float64 instead of double.
3194
3195 2018-03-21 Jakub Jelinek <jakub@redhat.com>
3196
3197 PR c/84999
3198 * c-typeck.c (build_binary_op): If c_common_type_for_size fails when
3199 building vector comparison, diagnose it and return error_mark_node.
3200
3201 2018-03-15 Jakub Jelinek <jakub@redhat.com>
3202
3203 PR c/84853
3204 * c-typeck.c (build_binary_op) <case RSHIFT_EXPR, case LSHIFT_EXPR>:
3205 If code1 is INTEGER_TYPE, only allow code0 VECTOR_TYPE if it has
3206 INTEGER_TYPE element type.
3207
3208 2018-03-13 David Pagan <dave.pagan@oracle.com>
3209
3210 PR c/46921
3211 * c-typeck.c (output_init_element): Ensure field initializer
3212 expression is always evaluated if there are side effects.
3213
3214 2018-03-06 Jakub Jelinek <jakub@redhat.com>
3215
3216 PR c/84721
3217 * c-parser.c (add_debug_begin_stmt): Don't add DEBUG_BEGIN_STMT if
3218 !building_stmt_list_p ().
3219
3220 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
3221
3222 PR c/84305
3223 * c-decl.c (grokdeclarator): Create an anonymous TYPE_DECL
3224 in PARM and TYPENAME contexts too, but attach it to a BIND_EXPR
3225 and include the BIND_EXPR in the list of things that need to be
3226 pre-evaluated.
3227
3228 2018-02-09 Nathan Sidwell <nathan@acm.org>
3229
3230 PR c/84293
3231 * c-typeck.c (build_indirect_ref, build_c_cast): Pass expr location
3232 to strict_aliasing_warning.
3233
3234 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3235
3236 * c-typeck.c (really_start_incremental_init, push_init_level,
3237 set_nonincremental_init, output_init_element, process_init_element):
3238 Use DECL_UNNAMED_BIT_FIELD.
3239
3240 2018-01-31 Marek Polacek <polacek@redhat.com>
3241
3242 PR c/81779
3243 * c-parser.c (c_parser_compound_statement_nostart): Call
3244 expansion_point_location_if_in_system_header.
3245
3246 2018-01-17 David Malcolm <dmalcolm@redhat.com>
3247
3248 PR c++/83814
3249 * c-fold.c (fold_for_warn): Move from c-common.c, reducing to just
3250 the C part.
3251
3252 2018-01-13 Jakub Jelinek <jakub@redhat.com>
3253
3254 PR c/83801
3255 * c-tree.h (decl_constant_value_1): Add a bool argument.
3256 * c-typeck.c (decl_constant_value_1): Add IN_INIT argument, allow
3257 returning a CONSTRUCTOR if it is true. Use error_operand_p.
3258 (decl_constant_value): Adjust caller.
3259 * c-fold.c (c_fully_fold_internal): If in_init, pass true to
3260 decl_constant_value_1 as IN_INIT. Otherwise, punt if
3261 decl_constant_value returns initializer that has BLKmode or
3262 array type.
3263 (c_fully_fold_internal) <case COMPONENT_REF>: Fold if !lval.
3264
3265 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3266 Alan Hayward <alan.hayward@arm.com>
3267 David Sherwood <david.sherwood@arm.com>
3268
3269 * c-typeck.c (comptypes_internal, build_binary_op): Handle polynomial
3270 TYPE_VECTOR_SUBPARTS.
3271
3272 2018-01-03 Jakub Jelinek <jakub@redhat.com>
3273
3274 Update copyright years.
3275
3276 2018-01-01 Jakub Jelinek <jakub@redhat.com>
3277
3278 PR c/83595
3279 * c-parser.c (c_parser_braced_init, c_parser_initelt,
3280 c_parser_conditional_expression, c_parser_cast_expression,
3281 c_parser_sizeof_expression, c_parser_alignof_expression,
3282 c_parser_postfix_expression, c_parser_omp_declare_reduction,
3283 c_parser_transaction_expression): Use set_error () method instead
3284 of setting value member to error_mark_node.
3285
3286 2017-12-28 Michael Meissner <meissner@linux.vnet.ibm.com>
3287
3288 * c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
3289 and _Float<N>X built-in functions.
3290
3291 2017-12-22 Jakub Jelinek <jakub@redhat.com>
3292
3293 PR debug/83550
3294 * c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
3295 TYPE_STUB_DECL and call rest_of_type_compilation before processing
3296 incomplete vars rather than after it.
3297
3298 PR debug/83547
3299 * c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
3300 indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
3301 and consider empty ones if there are no other stmts. For
3302 -Wunused-value walk all statements before the one only followed by
3303 DEBUG_BEGIN_STMTs.
3304
3305 2017-12-22 Mike Stump <mikestump@comcast.net>
3306 Eric Botcazou <ebotcazou@adacore.com>
3307
3308 * c-parser.c (c_parser_while_statement): Add unroll parameter and
3309 build ANNOTATE_EXPR if present. Add 3rd operand to ANNOTATE_EXPR.
3310 (c_parser_do_statement): Likewise.
3311 (c_parser_for_statement): Likewise.
3312 (c_parser_statement_after_labels): Adjust calls to above.
3313 (c_parse_pragma_ivdep): New static function.
3314 (c_parser_pragma_unroll): Likewise.
3315 (c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
3316 <PRAGMA_UNROLL>: New case.
3317
3318 2017-12-19 Jakub Jelinek <jakub@redhat.com>
3319
3320 * c-typeck.c (comptypes_internal, function_types_compatible_p,
3321 perform_integral_promotions, digest_init): Replace Yoda conditions
3322 with typical order conditions.
3323 * c-decl.c (check_bitfield_type_and_width): Likewise.
3324
3325 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3326
3327 * c-typeck.c (c_safe_arg_type_equiv_p,
3328 c_safe_function_type_cast_p): New function.
3329 (build_c_cast): Implement -Wcast-function-type.
3330
3331 2017-12-14 Richard Biener <rguenther@suse.de>
3332
3333 PR c/83415
3334 * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
3335 like REALPART_EXPR for the behavior of whether its operand
3336 is an lvalue.
3337
3338 2017-12-12 Marek Polacek <polacek@redhat.com>
3339
3340 PR c/82679
3341 * c-decl.c (grokdeclarator): Check declspecs insted of atomicp.
3342
3343 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
3344
3345 * c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
3346 * c-parser.c (add_debug_begin_stmt): New.
3347 (c_parser_declaration_or_fndef): Call it.
3348 (c_parser_compound_statement_nostart): Likewise.
3349 (c_parser_statement_after_labels): Likewise.
3350 * c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
3351
3352 2017-12-07 Joseph Myers <joseph@codesourcery.com>
3353
3354 * c-decl.c (build_compound_literal): Add parameter alignas_align
3355 and set alignment of decl if nonzero.
3356 * c-parser.c (c_keyword_starts_typename): Allow RID_ALIGNAS.
3357 (c_parser_declspecs): Allow RID_ALIGNAS to follow a type, like a
3358 qualifier.
3359 (c_parser_struct_declaration): Update syntax comment.
3360 (c_parser_type_name): Add alignas_ok argument and pass it to
3361 c_parser_declspecs.
3362 (c_parser_cast_expression): Pass true to c_parser_type_name and
3363 give error if a cast used an _Alignas specifier.
3364 (c_parser_sizeof_expression): Pass true to c_parser_type_name and
3365 give error if sizeof (type-name) used an _Alignas specifier.
3366 (c_parser_alignof_expression): Pass true to c_parser_type_name and
3367 give error if _Alignof (type-name) used an _Alignas specifier.
3368 (c_parser_postfix_expression_after_paren_type): Check specified
3369 alignment for a compound literal and pass it to
3370 build_compound_literal.
3371 * c-parser.h (c_parser_type_name): Update prototype.
3372 * c-tree.h (build_compound_literal): Update prototype.
3373
3374 2017-12-07 Martin Sebor <msebor@redhat.com>
3375
3376 PR c/81544
3377 * c-decl.c (c_decl_attributes): Look up existing declaration and
3378 pass it to decl_attributes.
3379
3380 2017-12-06 David Malcolm <dmalcolm@redhat.com>
3381
3382 PR c/83236
3383 * c-decl.c (lookup_name_fuzzy): Don't suggest names that are
3384 reserved for use by the implementation.
3385
3386 2017-12-06 David Malcolm <dmalcolm@redhat.com>
3387
3388 * c-decl.c: Include "c-family/c-spellcheck.h".
3389
3390 2017-12-05 Martin Liska <mliska@suse.cz>
3391 Jakub Jelinek <jakub@redhat.com>
3392
3393 * c-typeck.c (pointer_diff): Add new argument and instrument
3394 pointer subtraction.
3395 (build_binary_op): Similar for pointer comparison.
3396
3397 2017-12-01 Jakub Jelinek <jakub@redhat.com>
3398
3399 PR c/79153
3400 * c-parser.c: Include tree-iterator.h.
3401 (c_parser_switch_statement): Emit LABEL_EXPR for the break label
3402 into SWITCH_BODY instead of after it and set SWITCH_BREAK_LABEL_P
3403 on it.
3404
3405 PR c/83222
3406 * c-tree.h (decl_constant_value_1): Declare.
3407 * c-typeck.c (decl_constant_value_1): New function.
3408 (decl_constant_value): Use it.
3409 * c-fold.c (c_fully_fold_internal): If in_init, use
3410 decl_constant_value_1 instead of decl_constant_value.
3411
3412 2017-11-30 Jakub Jelinek <jakub@redhat.com>
3413
3414 * c-parser.c (c_parser_postfix_expression): Use ; instead of ;;.
3415
3416 2017-11-28 Jakub Jelinek <jakub@redhat.com>
3417
3418 PR sanitizer/81275
3419 * c-typeck.c (c_finish_case): Set SWITCH_ALL_CASES_P if
3420 c_switch_covers_all_cases_p returns true.
3421
3422 2017-11-28 Julia Koval <julia.koval@intel.com>
3423 Sebastian Peryt <sebastian.peryt@intel.com>
3424
3425 * Make-lang.in (c/c-array-notation.o): Remove.
3426 * c-array-notation.c: Delete.
3427 * c-decl.c: Remove cilkplus condition.
3428 * c-parser.c (c_parser_cilk_simd, c_parser_cilk_for,
3429 c_parser_cilk_verify_simd, c_parser_array_notation,
3430 c_parser_cilk_clause_vectorlength, c_parser_cilk_grainsize,
3431 c_parser_cilk_simd_fn_vector_attrs,
3432 c_finish_cilk_simd_fn_tokens): Delete.
3433 (c_parser_declaration_or_fndef): Remove cilkplus condition.
3434 (c_parser_direct_declarator_inner): Ditto.
3435 (CILK_SIMD_FN_CLAUSE_MASK): Delete.
3436 (c_parser_attributes, c_parser_compound_statement,
3437 c_parser_statement_after_labels, c_parser_if_statement,
3438 c_parser_switch_statement, c_parser_while_statement,
3439 c_parser_do_statement, c_parser_for_statement,
3440 c_parser_unary_expression, c_parser_postfix_expression,
3441 c_parser_postfix_expression_after_primary,
3442 c_parser_pragma, c_parser_omp_clause_name, c_parser_omp_all_clauses,
3443 c_parser_omp_for_loop, c_finish_omp_declare_simd): Remove cilkplus
3444 support.
3445 * c-typeck.c (build_array_ref, build_function_call_vec,
3446 convert_arguments,
3447 lvalue_p, build_compound_expr, c_finish_return, c_finish_if_stmt,
3448 c_finish_loop, build_binary_op): Remove cilkplus support.
3449
3450 2017-11-28 Jakub Jelinek <jakub@redhat.com>
3451
3452 * c-typeck.c (c_start_case): Build SWITCH_EXPR using build2 instead
3453 of build3.
3454
3455 2017-11-14 Boris Kolpackov <boris@codesynthesis.com>
3456
3457 * Make-lang.in (c.install-plugin): Install backend import library.
3458
3459 2017-11-23 Jakub Jelinek <jakub@redhat.com>
3460
3461 * c-parser.c (c_parser_omp_declare_simd): Reject declare simd in
3462 pragma_stmt context.
3463
3464 2017-11-23 Mike Stump <mikestump@comcast.net>
3465 Eric Botcazou <ebotcazou@adacore.com>
3466
3467 * c-parser.c (c_parser_while_statement): Pass 3rd operand to
3468 ANNOTATE_EXPR.
3469 (c_parser_do_statement): Likewise.
3470 (c_parser_for_statement): Likewise.
3471
3472 2017-11-22 David Malcolm <dmalcolm@redhat.com>
3473
3474 PR c++/62170
3475 * c-objc-common.c (c_tree_printer): Convert penultimate param from
3476 bool to bool *. Within '%T' handling, if showing an "aka", use
3477 "quoted" param to add appropriate quoting.
3478
3479 2017-11-22 Marek Polacek <polacek@redhat.com>
3480
3481 PR c++/60336
3482 PR middle-end/67239
3483 PR target/68355
3484 * c-decl.c (grokdeclarator): Set DECL_PADDING_P on unnamed bit-fields.
3485
3486 2017-11-21 David Malcolm <dmalcolm@redhat.com>
3487
3488 PR c/83056
3489 * c-decl.c (lookup_name_fuzzy): Don't suggest names that came from
3490 earlier failed lookups.
3491
3492 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
3493
3494 * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR.
3495 * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.
3496
3497 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3498
3499 PR c/81404
3500 * c-decl.c: Include "c-family/known-headers.h".
3501 (get_c_name_hint): Rename to get_stdlib_header_for_name and move
3502 to known-headers.cc.
3503 (class suggest_missing_header): Move to known-header.h.
3504 (lookup_name_fuzzy): Call get_c_stdlib_header_for_name rather
3505 than get_c_name_hint.
3506
3507 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3508
3509 * c-decl.c (get_c_name_hint): New function.
3510 (class suggest_missing_header): New class.
3511 (lookup_name_fuzzy): Call get_c_name_hint and use it to
3512 suggest missing headers to the user.
3513
3514 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3515
3516 * c-decl.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3517 Include "c-family/name-hint.h"
3518 (implicit_decl_warning): Convert "hint" from
3519 const char * to name_hint. Pass location to
3520 lookup_name_fuzzy. Suppress any deferred diagnostic if the
3521 warning was not printed.
3522 (undeclared_variable): Likewise for "guessed_id".
3523 (lookup_name_fuzzy): Convert return type from const char *
3524 to name_hint. Add location_t param.
3525 * c-parser.c: Define INCLUDE_UNIQUE_PTR before including system.h.
3526 Include "c-family/name-hint.h"
3527 (c_parser_declaration_or_fndef): Convert "hint" from
3528 const char * to name_hint. Pass location to lookup_name_fuzzy.
3529 (c_parser_parameter_declaration): Likewise.
3530
3531 2017-11-19 Jakub Jelinek <jakub@redhat.com>
3532
3533 PR c/66618
3534 PR c/69960
3535 * c-parser.c (c_parser_omp_atomic): Pass true as LVAL to c_fully_fold
3536 where needed.
3537 * c-typeck.c (build_unary_op, build_modify_expr, build_asm_expr,
3538 handle_omp_array_sections): Likewise.
3539 (digest_init): Don't call decl_constant_value_for_optimization.
3540 * c-tree.h (decl_constant_value_for_optimization): Removed.
3541 * c-fold.c (c_fold_array_ref): New function.
3542 (c_fully_fold_internal): Add LVAL argument, propagate it through
3543 recursive calls. For VAR_P call decl_constant_value and
3544 unshare if not LVAL and either optimizing or IN_INIT. Remove
3545 decl_constant_value_for_optimization calls. If IN_INIT and not LVAL,
3546 fold ARRAY_REF with STRING_CST and INTEGER_CST operands.
3547 (c_fully_fold): Add LVAL argument, pass it through to
3548 c_fully_fold_internal.
3549 (decl_constant_value_for_optimization): Removed.
3550
3551 2017-11-15 Joseph Myers <joseph@codesourcery.com>
3552
3553 PR c/81156
3554 * c-parser.c (check_tgmath_function): New function.
3555 (enum tgmath_parm_kind): New enum.
3556 (c_parser_postfix_expression): Handle __builtin_tgmath.
3557
3558 2017-10-31 David Malcolm <dmalcolm@redhat.com>
3559
3560 * c-decl.c (implicit_decl_warning): Update for renaming of
3561 pedwarn_at_rich_loc and warning_at_rich_loc.
3562 (implicitly_declare): Likewise for renaming of inform_at_rich_loc.
3563 (undeclared_variable): Likewise for renaming of error_at_rich_loc.
3564 * c-parser.c (c_parser_declaration_or_fndef): Likewise.
3565 (c_parser_struct_or_union_specifier): Likewise for renaming of
3566 pedwarn_at_rich_loc.
3567 (c_parser_parameter_declaration): Likewise for renaming of
3568 error_at_rich_loc.
3569 * c-typeck.c (build_component_ref): Likewise.
3570 (build_unary_op): Likewise for renaming of inform_at_rich_loc.
3571 (pop_init_level): Likewise for renaming of warning_at_rich_loc.
3572 (set_init_label): Likewise for renaming of error_at_rich_loc.
3573
3574 2017-10-30 Richard Biener <rguenther@suse.de>
3575
3576 * gimple-parser.c (c_parser_gimple_statement): Parse conditional
3577 stmts.
3578
3579 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3580
3581 * c-decl.c (header_for_builtin_fn): Add support for copysign, fma,
3582 fmax, fmin, and sqrt _Float<N> and _Float<N>X variants.
3583
3584 2017-10-25 David Malcolm <dmalcolm@redhat.com>
3585
3586 PR c/7356
3587 * c-parser.c (c_parser_declaration_or_fndef): Detect missing
3588 semicolons.
3589
3590 2017-10-25 Jakub Jelinek <jakub@redhat.com>
3591
3592 PR libstdc++/81706
3593 * c-decl.c (merge_decls): Copy "omp declare simd" attributes from
3594 newdecl to corresponding __builtin_ if any.
3595
3596 2017-10-24 Paolo Carlini <paolo.carlini@oracle.com>
3597
3598 PR c++/82466
3599 * c-decl.c (diagnose_mismatched_decls): Use
3600 OPT_Wbuiltin_declaration_mismatch.
3601
3602 2017-10-12 David Malcolm <dmalcolm@redhat.com>
3603
3604 * c-parser.c (c_parser_require): Add "type_is_unique" param and
3605 use it to guard calls to maybe_suggest_missing_token_insertion.
3606 (c_parser_parms_list_declarator): Override default value of new
3607 "type_is_unique" param to c_parser_require.
3608 (c_parser_asm_statement): Likewise.
3609 * c-parser.h (c_parser_require): Add "type_is_unique" param,
3610 defaulting to true.
3611
3612 2017-10-11 Nathan Sidwell <nathan@acm.org>
3613
3614 * c-decl.c (grokdeclarator): Check HAS_DECL_ASSEMBLER_NAME_P too.
3615
3616 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3617
3618 * c-parser.c (c_parser_cilk_clause_vectorlength): Use wi::to_wide when
3619 operating on trees as wide_ints.
3620 * c-typeck.c (build_c_cast, c_finish_omp_clauses): Likewise.
3621 (c_tree_equal): Likewise.
3622
3623 2017-10-04 David Malcolm <dmalcolm@redhat.com>
3624
3625 * c-decl.c (push_parm_decl): Store c_parm's location into the
3626 PARAM_DECL.
3627 (build_c_parm): Add "loc" param and store it within the c_parm.
3628 * c-parser.c (struct c_parser): Add "last_token_location" field.
3629 (c_parser_consume_token): Store location of the token into the
3630 new field.
3631 (c_parser_declaration_or_fndef): Store params into DECL_ARGUMENTS
3632 when handling a FUNCTION_DECL, if it doesn't already have them.
3633 (c_parser_parameter_declaration): Generate a location for the
3634 parameter, and pass it to the call to build_c_parm.
3635 * c-tree.h (struct c_parm): Add field "loc".
3636 (build_c_parm): Add location_t param.
3637 * c-typeck.c (get_fndecl_argument_location): New function.
3638 (inform_for_arg): New function.
3639 (convert_for_assignment): Use inform_for_arg when dealing with
3640 ic_argpass.
3641
3642 2017-09-29 Jakub Jelinek <jakub@redhat.com>
3643
3644 * c-decl.c (grokfield): Use SET_DECL_C_BIT_FIELD here if
3645 width is non-NULL.
3646 (finish_struct): Test DECL_C_BIT_FIELD instead of DECL_INITIAL,
3647 don't SET_DECL_C_BIT_FIELD here.
3648
3649 PR c/82340
3650 * c-decl.c (build_compound_literal): Use c_apply_type_quals_to_decl
3651 instead of trying to set just TREE_READONLY manually.
3652
3653 2017-09-16 Tom de Vries <tom@codesourcery.com>
3654
3655 PR c/81875
3656 * c-parser.c (c_parser_omp_for_loop): Fold only operands of cond, not
3657 cond itself.
3658
3659 2017-09-15 Joseph Myers <joseph@codesourcery.com>
3660
3661 PR c/82071
3662 * c-typeck.c (ep_convert_and_check): Just call convert_and_check
3663 for C11.
3664 (build_conditional_expr): For C11, generate result with excess
3665 precision when one argument is an integer and the other is of a
3666 type using excess precision.
3667
3668 2017-09-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
3669
3670 * c-typeck.c (build_c_cast): Implement -Wcast-align=strict.
3671
3672 2017-09-13 Marek Polacek <polacek@redhat.com>
3673
3674 PR c/82167
3675 * c-typeck.c (c_expr_sizeof_expr): Use the type of expr.value rather
3676 than expr.original_type.
3677
3678 2017-09-12 Nathan Sidwell <nathan@acm.org>
3679
3680 * c-decl.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3681 resort_sorted_fields): Moved from c-family/c-common.c.
3682 * c-lang.h (struct sorted_fields_type): Moved from c-family/c-common.h.
3683
3684 2017-09-01 Joseph Myers <joseph@codesourcery.com>
3685
3686 PR c/82071
3687 * c-typeck.c (build_atomic_assign): Handle argument with excess
3688 precision. Ensure any EXCESS_PRECISION_EXPR is present in
3689 argument passed to build_binary_op and convert_for_assignment but
3690 not for call to c_fully_fold.
3691 (build_modify_expr): Do not remove EXCESS_PRECISION_EXPR early.
3692 Ensure build_binary_op is called with argument with original
3693 semantic type. Avoid calling c_fully_fold with an
3694 EXCESS_PRECISION_EXPR from build_binary_op.
3695
3696 2017-09-01 Jakub Jelinek <jakub@redhat.com>
3697
3698 PR c/81887
3699 * c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
3700
3701 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3702 Alan Hayward <alan.hayward@arm.com>
3703 David Sherwood <david.sherwood@arm.com>
3704
3705 * c-typeck.c (build_binary_op): Use SCALAR_TYPE_MODE.
3706 (c_common_type): Likewise. Use as_a <scalar_mode> when setting
3707 m1 and m2 to the signed equivalent of a fixed-point
3708 SCALAR_TYPE_MODE.
3709
3710 2017-08-24 David Malcolm <dmalcolm@redhat.com>
3711
3712 * c-tree.h (c_expr::get_location) Use EXPR_HAS_LOCATION rather
3713 than CAN_HAVE_LOCATION_P when determining whether to use the
3714 location_t value within "value".
3715
3716 2017-08-21 David Malcolm <dmalcolm@redhat.com>
3717
3718 * c-parser.c (c_parser_expr_list): Use c_expr::get_location ()
3719 rather than peeking the location of the first token.
3720 * c-tree.h (c_expr::get_location): New method.
3721
3722 2017-08-21 David Malcolm <dmalcolm@redhat.com>
3723
3724 * c-typeck.c (build_function_call_vec): Pass arg_loc to call
3725 to check_function_arguments.
3726
3727 2017-08-18 Marek Polacek <polacek@redhat.com>
3728
3729 * c-parser.c (c_parser_postfix_expression): Remove unused code. Update
3730 commentary.
3731
3732 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3733
3734 PR c/53037
3735 * c-decl.c (merge_decls): Also merge DECL_WARN_IF_NOT_ALIGN.
3736 (check_bitfield_type_and_width): Don't allow bit-field with
3737 warn_if_not_aligned type.
3738
3739 2017-08-14 Martin Sebor <msebor@redhat.com>
3740
3741 PR c/81117
3742 * c-objc-common.c (c_objc_common_init): Handle 'G'.
3743
3744 2017-08-11 Marek Polacek <polacek@redhat.com>
3745
3746 PR c/81795
3747 * c-decl.c (pushtag): Only print inform if the warning was printed.
3748 (grokdeclarator): Likewise.
3749
3750 2017-08-10 David Malcolm <dmalcolm@redhat.com>
3751
3752 * c-parser.c (c_parser_error): Rename to...
3753 (c_parser_error_richloc): ...this, making static, and adding
3754 "richloc" parameter, passing it to the c_parse_error call,
3755 rather than calling c_parser_set_source_position_from_token.
3756 (c_parser_error): Reintroduce, reimplementing in terms of the
3757 above, converting return type from void to bool.
3758 (class token_pair): New class.
3759 (struct matching_paren_traits): New struct.
3760 (matching_parens): New typedef.
3761 (struct matching_brace_traits): New struct.
3762 (matching_braces): New typedef.
3763 (get_matching_symbol): New function.
3764 (c_parser_require): Add param MATCHING_LOCATION, using it to
3765 highlight matching "opening" tokens for missing "closing" tokens.
3766 (c_parser_skip_until_found): Likewise.
3767 (c_parser_static_assert_declaration_no_semi): Convert explicit
3768 parsing of CPP_OPEN_PAREN and CPP_CLOSE_PAREN to use of
3769 class matching_parens, so that the pertinent open parenthesis is
3770 highlighted when there are problems locating the close
3771 parenthesis.
3772 (c_parser_struct_or_union_specifier): Likewise.
3773 (c_parser_typeof_specifier): Likewise.
3774 (c_parser_alignas_specifier): Likewise.
3775 (c_parser_simple_asm_expr): Likewise.
3776 (c_parser_braced_init): Likewise, for matching_braces.
3777 (c_parser_paren_condition): Likewise, for matching_parens.
3778 (c_parser_switch_statement): Likewise.
3779 (c_parser_for_statement): Likewise.
3780 (c_parser_asm_statement): Likewise.
3781 (c_parser_asm_operands): Likewise.
3782 (c_parser_cast_expression): Likewise.
3783 (c_parser_sizeof_expression): Likewise.
3784 (c_parser_alignof_expression): Likewise.
3785 (c_parser_generic_selection): Likewise.
3786 (c_parser_postfix_expression): Likewise for cases RID_VA_ARG,
3787 RID_OFFSETOF, RID_TYPES_COMPATIBLE_P, RID_AT_SELECTOR,
3788 RID_AT_PROTOCOL, RID_AT_ENCODE, reindenting as necessary.
3789 In case CPP_OPEN_PAREN, pass loc_open_paren to the
3790 c_parser_skip_until_found call.
3791 (c_parser_objc_class_definition): Use class matching_parens as
3792 above.
3793 (c_parser_objc_method_decl): Likewise.
3794 (c_parser_objc_try_catch_finally_statement): Likewise.
3795 (c_parser_objc_synchronized_statement): Likewise.
3796 (c_parser_objc_at_property_declaration): Likewise.
3797 (c_parser_oacc_wait_list): Likewise.
3798 (c_parser_omp_var_list_parens): Likewise.
3799 (c_parser_omp_clause_collapse): Likewise.
3800 (c_parser_omp_clause_default): Likewise.
3801 (c_parser_omp_clause_if): Likewise.
3802 (c_parser_omp_clause_num_threads): Likewise.
3803 (c_parser_omp_clause_num_tasks): Likewise.
3804 (c_parser_omp_clause_grainsize): Likewise.
3805 (c_parser_omp_clause_priority): Likewise.
3806 (c_parser_omp_clause_hint): Likewise.
3807 (c_parser_omp_clause_defaultmap): Likewise.
3808 (c_parser_oacc_single_int_clause): Likewise.
3809 (c_parser_omp_clause_ordered): Likewise.
3810 (c_parser_omp_clause_reduction): Likewise.
3811 (c_parser_omp_clause_schedule): Likewise.
3812 (c_parser_omp_clause_num_teams): Likewise.
3813 (c_parser_omp_clause_thread_limit): Likewise.
3814 (c_parser_omp_clause_aligned): Likewise.
3815 (c_parser_omp_clause_linear): Likewise.
3816 (c_parser_omp_clause_safelen): Likewise.
3817 (c_parser_omp_clause_simdlen): Likewise.
3818 (c_parser_omp_clause_depend): Likewise.
3819 (c_parser_omp_clause_map): Likewise.
3820 (c_parser_omp_clause_device): Likewise.
3821 (c_parser_omp_clause_dist_schedule): Likewise.
3822 (c_parser_omp_clause_proc_bind): Likewise.
3823 (c_parser_omp_clause_uniform): Likewise.
3824 (c_parser_omp_for_loop): Likewise.
3825 (c_parser_cilk_clause_vectorlength): Likewise.
3826 (c_parser_cilk_clause_linear): Likewise.
3827 (c_parser_transaction_expression): Likewise.
3828 * c-parser.h (c_parser_require): Add param matching_location with
3829 default UNKNOWN_LOCATION.
3830 (c_parser_error): Convert return type from void to bool.
3831 (c_parser_skip_until_found): Add param matching_location with
3832 default UNKNOWN_LOCATION.
3833
3834 2017-08-09 Marek Polacek <polacek@redhat.com>
3835
3836 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
3837 * c-tree.h (build_external_ref): Update declaration.
3838 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
3839 (build_external_ref): Change the type of a parameter to bool.
3840 (parser_build_binary_op): Use true/false instead of 1/0.
3841 (pointer_diff): Likewise.
3842 (build_modify_expr): Likewise.
3843 (set_designator): Change the type of a parameter to bool.
3844 (set_init_index): Use true/false instead of 1/0.
3845 (set_init_label): Likewise.
3846 (output_init_element): Change the type of a parameter to bool.
3847 (output_pending_init_elements): Use true/false instead of 1/0.
3848 (process_init_element): Likewise.
3849 (build_binary_op): Change the type of a parameter to bool.
3850
3851 2017-08-09 Marek Polacek <polacek@redhat.com>
3852
3853 PR c/81233
3854 * c-typeck.c (pedwarn_init): Make the function take a variable list.
3855 Call emit_diagnostic_valist instead of pedwarn.
3856 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
3857 Print the relevant types in diagnostics.
3858
3859 2017-08-09 Marek Polacek <polacek@redhat.com>
3860
3861 PR c/81417
3862 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
3863 build_conditional_expr.
3864 * c-parser.c (c_parser_conditional_expression): Create locations for
3865 EXP1 and EXP2 from their source ranges. Pass the locations down to
3866 build_conditional_expr.
3867 * c-tree.h (build_conditional_expr): Update declaration.
3868 * c-typeck.c (build_conditional_expr): Add location_t parameters.
3869 For -Wsign-compare, also print the types.
3870
3871 2017-08-08 Martin Liska <mliska@suse.cz>
3872
3873 * c-convert.c: Include header files.
3874 * c-typeck.c: Likewise.
3875
3876 2017-08-07 Martin Liska <mliska@suse.cz>
3877
3878 * c-parser.c (c_parser_attributes): Canonicalize name of an
3879 attribute.
3880
3881 2017-08-02 Marek Polacek <polacek@redhat.com>
3882
3883 PR c/81289
3884 * c-parser.c (c_parser_unary_expression): Use set_error.
3885
3886 PR c/81448
3887 PR c/81306
3888 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
3889 warnings. Avoid walking MACRO_MAP_LOCATIONS.
3890
3891 2017-07-31 Jan Hubicka <hubicka@ucw.cz>
3892 Martin Liska <mliska@suse.cz>
3893
3894 * c-typeck.c (c_finish_goto_label): Build gimple predict
3895 statement.
3896
3897 2017-07-31 Martin Liska <mliska@suse.cz>
3898
3899 PR sanitize/81530
3900 * c-convert.c (convert): Guard condition with flag_sanitize_p
3901 also with current_function_decl non-null equality.
3902 * c-decl.c (grokdeclarator): Likewise.
3903 * c-typeck.c (build_binary_op): Likewise.
3904
3905 2017-07-25 Marek Polacek <polacek@redhat.com>
3906
3907 * c-decl.c (grokfield): Remove local variable.
3908
3909 2017-07-25 Marek Polacek <polacek@redhat.com>
3910
3911 PR c/81364
3912 * c-parser.c (c_parser_else_body): Don't warn about multistatement
3913 macro expansion if the body is in { }.
3914 (c_parser_while_statement): Likewise.
3915 (c_parser_for_statement): Likewise.
3916
3917 2017-07-18 Nathan Sidwell <nathan@acm.org>
3918
3919 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
3920
3921 2017-07-14 David Malcolm <dmalcolm@redhat.com>
3922
3923 * c-decl.c (implicitly_declare): When suggesting a missing
3924 #include, provide a fix-it hint.
3925
3926 2017-07-06 David Malcolm <dmalcolm@redhat.com>
3927
3928 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
3929 and call that instead.
3930 * c-tree.h (selftest::run_c_tests): New decl.
3931
3932 2017-06-26 Marek Polacek <polacek@redhat.com>
3933
3934 PR c/80116
3935 * c-parser.c (c_parser_if_body): Set the location of the
3936 body of the conditional after parsing all the labels. Call
3937 warn_for_multistatement_macros.
3938 (c_parser_else_body): Likewise.
3939 (c_parser_switch_statement): Likewise.
3940 (c_parser_while_statement): Likewise.
3941 (c_parser_for_statement): Likewise.
3942 (c_parser_statement): Add a default argument. Save the location
3943 after labels have been parsed.
3944 (c_parser_c99_block_statement): Likewise.
3945
3946 2017-06-19 Richard Biener <rguenther@suse.de>
3947
3948 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
3949 negated _Literals to parse _Literal (int) -1.
3950
3951 2017-06-13 Martin Liska <mliska@suse.cz>
3952
3953 PR sanitize/78204
3954 * c-convert.c (convert): Use sanitize_flags_p.
3955 * c-decl.c (grokdeclarator): Likewise.
3956 * c-typeck.c (convert_for_assignment): Likewise.
3957 (c_finish_return): Likewise.
3958 (build_binary_op): Likewise.
3959
3960 2017-06-08 Jakub Jelinek <jakub@redhat.com>
3961
3962 PR c/81006
3963 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
3964 to sizetype before size_binop.
3965
3966 2017-06-07 Jakub Jelinek <jakub@redhat.com>
3967
3968 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
3969 of TDI_generic.
3970
3971 2017-06-06 Marek Polacek <polacek@redhat.com>
3972
3973 PR c/79983
3974 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
3975 ref.
3976 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
3977
3978 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3979
3980 * c-parser.c (c_parser_binary_expression): Implement the
3981 -Wsizeof_pointer_div warning.
3982 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
3983 from a parenthesized expression.
3984 (c_parser_expr_list): Use c_last_sizeof_loc.
3985 * c-tree.h (c_last_sizeof_loc): New external.
3986 * c-typeck.c (c_last_sizeof_loc): New variable.
3987 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
3988
3989 2017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
3990
3991 PR testsuite/80580
3992 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
3993
3994 2017-05-30 David Malcolm <dmalcolm@redhat.com>
3995
3996 * c-objc-common.c (c_tree_printer): Gain bool and const char **
3997 parameters.
3998
3999 2017-05-24 Martin Sebor <msebor@redhat.com>
4000
4001 PR c/80731
4002 * c-fold.c (c_fully_fold_internal): Adjust.
4003 * c-typeck.c (parser_build_unary_op): Adjust.
4004
4005 2017-05-23 Thomas Schwinge <thomas@codesourcery.com>
4006
4007 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
4008 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
4009 "VECTOR_LENGTH".
4010
4011 2017-05-23 Marek Polacek <polacek@redhat.com>
4012
4013 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
4014 quotes.
4015
4016 2017-05-22 Jakub Jelinek <jakub@redhat.com>
4017
4018 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
4019 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
4020 it returned invariant. Call tree_invariant_p unconditionally
4021 afterwards to decide whether to return expr or op0.
4022
4023 2017-05-22 Nathan Sidwell <nathan@acm.org>
4024
4025 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
4026
4027 2017-05-19 Thomas Schwinge <thomas@codesourcery.com>
4028
4029 * c-parser.c (c_parser_omp_clause_default): Handle
4030 "OMP_CLAUSE_DEFAULT_PRESENT".
4031
4032 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4033
4034 * config-lang.in (gtfiles): Add c-family/c-format.c.
4035
4036 2017-05-18 Nathan Sidwell <nathan@acm.org>
4037
4038 * c-decl.c (pushdecl_top_level): Delete unused function.
4039
4040 2017-05-18 Marek Polacek <polacek@redhat.com>
4041
4042 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
4043 (check_earlier_gotos): Likewise.
4044 (define_label): Likewise.
4045 (pending_xref_error): Likewise.
4046 (smallest_type_quals_location): Likewise.
4047 (grokdeclarator): Likewise.
4048 (grokparms): Likewise.
4049 (identifier_global_value): Likewise.
4050 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
4051 (find_init_member): Likewise.
4052
4053 2017-05-18 Marek Polacek <polacek@redhat.com>
4054
4055 * c-decl.c (start_decl): Use false/true instead of 0/1.
4056 (grokdeclarator): Likewise.
4057 (finish_struct): Likewise.
4058 (start_function): Change the return type to bool. Use false/true
4059 instead of 0/1.
4060 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
4061 * c-tree.h (start_function): Update.
4062 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
4063 (set_designator): Change the return type to bool. Use false/true
4064 instead of 0/1.
4065
4066 2017-05-17 Marek Polacek <polacek@redhat.com>
4067
4068 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
4069 * c-typeck.c: Likewise.
4070
4071 2017-05-17 Marek Polacek <polacek@redhat.com>
4072
4073 PR sanitizer/80659
4074 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
4075 DECL_IGNORED_P even for non-static compound literals.
4076
4077 2017-05-17 Martin Liska <mliska@suse.cz>
4078
4079 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
4080 use it instead of int type.
4081
4082 2017-05-17 Marek Polacek <polacek@redhat.com>
4083
4084 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
4085 call c_fully_fold.
4086 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
4087 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
4088 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
4089 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
4090 save_expr.
4091 (c_parser_conditional_expression): Likewise.
4092 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
4093 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
4094 (process_init_element): Likewise.
4095 (build_binary_op): Likewise.
4096 (handle_omp_array_sections_1): Likewise.
4097
4098 2017-05-12 Thomas Schwinge <thomas@codesourcery.com>
4099
4100 * c-parser.c (c_parser_omp_clause_num_gangs)
4101 (c_parser_omp_clause_num_workers)
4102 (c_parser_omp_clause_vector_length): Merge functions into...
4103 (c_parser_oacc_single_int_clause): ... this new function. Adjust
4104 all users.
4105
4106 2017-05-11 Nathan Sidwell <nathan@acm.org>
4107
4108 * gimple-parser.c: Don't #include tree-dump.h.
4109
4110 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4111
4112 PR testsuite/80580
4113 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
4114
4115 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4116
4117 PR testsuite/80580
4118 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4119 incorrect __MEM syntax.
4120
4121 2017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4122
4123 PR testsuite/80580
4124 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
4125 type of unary '*'.
4126
4127 2017-05-09 Nathan Sidwell <nathan@acm.org>
4128
4129 * c-tree.h (pushdecl): Declare.
4130
4131 2017-05-05 David Malcolm <dmalcolm@redhat.com>
4132
4133 * c-decl.c (warn_defaults_to): Replace report_diagnostic
4134 with diagnostic_report_diagnostic.
4135 * c-errors.c (pedwarn_c99): Likewise.
4136 (pedwarn_c90): Likewise.
4137
4138 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4139
4140 PR c++/80038
4141 * c-gimplify.c (c_gimplify_expr): Remove calls to
4142 cilk_gimplifY_call_params_in_spawned_fn.
4143
4144 2017-04-25 David Malcolm <dmalcolm@redhat.com>
4145
4146 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
4147 hint for removing extra semicolon.
4148
4149 2017-04-21 Jakub Jelinek <jakub@redhat.com>
4150
4151 PR c/80468
4152 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
4153 enabled, set specs->type to integer_type_node.
4154
4155 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
4156
4157 * c-array-notation.c: Fix typo in comment.
4158
4159 2017-03-29 Marek Polacek <polacek@redhat.com>
4160
4161 PR c/79730
4162 * c-decl.c (finish_decl): Check VAR_P.
4163
4164 2017-03-27 Jakub Jelinek <jakub@redhat.com>
4165
4166 PR middle-end/80162
4167 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
4168 * c-typeck.c (c_mark_addressable): Likewise. Look through
4169 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
4170 to ARRAY_TYPE.
4171 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
4172
4173 2017-03-23 Marek Polacek <polacek@redhat.com>
4174
4175 * c-tree.h: Remove a C_RID_YYCODE reference.
4176
4177 2017-03-21 Jakub Jelinek <jakub@redhat.com>
4178
4179 PR c/80097
4180 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
4181 optional COMPOUND_EXPR with ubsan instrumentation.
4182
4183 2017-03-17 Marek Polacek <polacek@redhat.com>
4184
4185 * c-parser.c: Add C11 references.
4186
4187 2017-03-15 Marek Polacek <polacek@redhat.com>
4188
4189 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
4190
4191 2017-03-11 Marek Polacek <polacek@redhat.com>
4192
4193 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
4194
4195 2017-03-10 David Malcolm <dmalcolm@redhat.com>
4196
4197 PR translation/79848
4198 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
4199 "%qs".
4200 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
4201
4202 2017-03-09 Marek Polacek <polacek@redhat.com>
4203
4204 PR sanitizer/79757
4205 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
4206 parameter declarations with initializers.
4207
4208 2017-03-09 Jakub Jelinek <jakub@redhat.com>
4209
4210 PR c/79969
4211 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
4212 TYPE_STUB_DECL.
4213
4214 2017-03-07 Jakub Jelinek <jakub@redhat.com>
4215
4216 PR c/79834
4217 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
4218 for "may only be used in compound statements" diagnostics, change it
4219 such that the same translatable string is used for all pragmas. For
4220 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
4221 diagnostics.
4222 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
4223 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
4224 "may only be used in compound statements" diagnostics, such that the
4225 same translatable string is used for all pragmas.
4226
4227 2017-03-04 Marek Polacek <polacek@redhat.com>
4228
4229 PR c/79847
4230 * c-decl.c (implicit_decl_warning): Add missing space.
4231
4232 2017-03-03 Marek Polacek <polacek@redhat.com>
4233
4234 PR c/79758
4235 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
4236 current_function_prototype_arg_types is error_mark_node. Fix
4237 formatting. Use TREE_VALUE instead of TREE_TYPE.
4238
4239 2017-03-03 Jakub Jelinek <jakub@redhat.com>
4240
4241 PR c/79837
4242 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
4243 %<min%> or %<max%> in the diagnostics, instead mention identifier.
4244 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
4245 diagnostics.
4246
4247 PR c/79836
4248 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
4249 instead of %<_Generic>.
4250 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
4251 (c_parser_omp_target_exit_data): Use %<release%> instead of
4252 %<release>.
4253
4254 2017-02-28 Jakub Jelinek <jakub@redhat.com>
4255
4256 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4257 instead of just cond ? "..." : "...".
4258 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
4259 for "enter"/"exit" keyword.
4260 (c_finish_oacc_routine): Don't use %s to supply portions of the
4261 message.
4262
4263 2017-02-24 Jakub Jelinek <jakub@redhat.com>
4264
4265 PR c++/79588
4266 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
4267 handle -Wrestrict here.
4268 * c-typeck.c (build_function_call_vec): Adjust
4269 check_function_arguments caller.
4270
4271 2017-02-23 Richard Biener <rguenther@suse.de>
4272
4273 PR c/79684
4274 * gimple-parser.c (c_parser_gimple_statement): Use set_error
4275 to initialize c_exprs to return.
4276 (c_parser_gimple_binary_expression): Likewise.
4277 (c_parser_gimple_unary_expression): Likewise.
4278 (c_parser_gimple_postfix_expression): Likewise.
4279
4280 2017-02-22 Marek Polacek <polacek@redhat.com>
4281
4282 PR c/79662
4283 * c-typeck.c (convert_arguments): Handle error_mark_node.
4284
4285 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4286
4287 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4288 value of c_parser_parse_ssa_name against error_mark_node and emit
4289 error if ssa name is anonymous and written as default definition.
4290
4291 2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4292
4293 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4294 FMA_EXPR.
4295
4296 2017-02-16 Jakub Jelinek <jakub@redhat.com>
4297
4298 PR c++/79512
4299 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
4300 ignore #pragma omp target even when not followed by identifier.
4301
4302 2017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4303
4304 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
4305 (c_parser_gimple_unary_expression): Likewise.
4306
4307 2017-02-13 Jakub Jelinek <jakub@redhat.com>
4308
4309 * c-parser.c (c_parser_oacc_declare): Add missing space in
4310 diagnostics.
4311
4312 2017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4313
4314 PR c/79478
4315 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
4316 set_c_expr_source_range when parsing ssa-name.
4317
4318 2017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
4319 Richard Biener <rguenther@suse.de>
4320
4321 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
4322 building IL when arguments are error_mark_node.
4323 (c_parser_gimple_unary_expression): Likewise.
4324 (c_parser_gimple_if_stmt): Likewise.
4325 (c_parser_gimple_switch_stmt): Likewise.
4326 (c_parser_gimple_return_stmt): Likewise.
4327 (c_parser_parse_ssa_name): When name lookup fails do not build
4328 an SSA name. Use undeclared rather than not declared in error
4329 reporting.
4330
4331 2017-02-09 Marek Polacek <polacek@redhat.com>
4332
4333 PR c/79428
4334 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
4335 instead of c_parser_skip_until_found.
4336
4337 2017-02-09 Jakub Jelinek <jakub@redhat.com>
4338
4339 PR c/79431
4340 * c-parser.c (c_parser_omp_declare_target): Don't invoke
4341 symtab_node::get on automatic variables.
4342
4343 2016-02-09 Nathan Sidwell <nathan@codesourcery.com>
4344 Chung-Lin Tang <cltang@codesourcery.com>
4345
4346 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
4347 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
4348 semantic checking.
4349 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
4350
4351 2017-02-07 Richard Biener <rguenther@suse.de>
4352
4353 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
4354 (c_parser_gimple_postfix_expression_after_primary):
4355 Do not use c_build_function_call_vec to avoid folding and promotion.
4356 Simplify.
4357
4358 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
4359
4360 PR lto/79061
4361 * c-decl.c (pop_scope): Pass main_input_filename to
4362 build_translation_unit_decl.
4363
4364 2017-01-24 David Malcolm <dmalcolm@redhat.com>
4365
4366 * c-parser.c: Include "read-rtl-function.h" and
4367 "run-rtl-passes.h".
4368 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
4369 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
4370 production. Update for renaming of field "gimple_pass" to
4371 "gimple_or_rtl_pass". If __RTL was seen, call
4372 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
4373 to an auto_timevar, to cope with early exit.
4374 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
4375 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
4376 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
4377 Handle RID_RTL.
4378 (c_parser_parse_rtl_body): New function.
4379 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
4380 (struct c_declspecs): Rename field "gimple_pass" to
4381 "gimple_or_rtl_pass". Add field "rtl_p".
4382 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
4383 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
4384 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
4385 (c_parser_gimple_or_rtl_pass_list): ...this.
4386
4387 2017-01-20 Marek Polacek <polacek@redhat.com>
4388
4389 PR c/64279
4390 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
4391
4392 2017-01-13 Richard Biener <rguenther@suse.de>
4393
4394 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
4395 nops.
4396
4397 2017-01-13 Richard Biener <rguenther@suse.de>
4398
4399 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4400 _Literal ( type-name ) number.
4401
4402 2017-01-12 Richard Biener <rguenther@suse.de>
4403
4404 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
4405 __MEM.
4406
4407 2017-01-11 Jakub Jelinek <jakub@redhat.com>
4408
4409 PR c++/72813
4410 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
4411 PCH file.
4412
4413 2017-01-11 Richard Biener <rguenther@suse.de>
4414
4415 PR bootstrap/79052
4416 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
4417 returns on parse errors.
4418
4419 2017-01-04 Marek Polacek <polacek@redhat.com>
4420
4421 PR c++/64767
4422 * c-parser.c (c_parser_postfix_expression): Mark zero character
4423 constants by setting original_type in c_expr.
4424 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
4425 with a zero character constant.
4426 (char_type_p): New function.
4427
4428 2017-01-04 David Malcolm <dmalcolm@redhat.com>
4429
4430 * c-parser.c (c_parser_declaration_or_fndef): Create a
4431 rich_location at init_loc and parse it to start_init.
4432 (last_init_list_comma): New global.
4433 (c_parser_braced_init): Update last_init_list_comma when parsing
4434 commas. Pass it to pop_init_level. Pass location of closing
4435 brace to pop_init_level.
4436 (c_parser_postfix_expression_after_paren_type): Create a
4437 rich_location at type_loc and parse it to start_init.
4438 (c_parser_omp_declare_reduction): Likewise for loc.
4439 * c-tree.h (start_init): Add rich_location * param.
4440 (pop_init_level): Add location_t param.
4441 * c-typeck.c (struct initializer_stack): Add field
4442 "missing_brace_richloc".
4443 (start_init): Add richloc param, use it to initialize
4444 the stack node's missing_brace_richloc.
4445 (last_init_list_comma): New decl.
4446 (finish_implicit_inits): Pass last_init_list_comma to
4447 pop_init_level.
4448 (push_init_level): When finding missing open braces, add fix-it
4449 hints to the richloc.
4450 (pop_init_level): Add "insert_before" param and pass it
4451 when calling pop_init_level. Add fixits about missing
4452 close braces to any richloc. Use the richloc for the
4453 -Wmissing-braces warning.
4454 (set_designator): Pass last_init_list_comma to pop_init_level.
4455 (process_init_element): Likewise.
4456
4457 2017-01-01 Jakub Jelinek <jakub@redhat.com>
4458
4459 Update copyright years.
4460
4461 2016-12-21 Jakub Jelinek <jakub@redhat.com>
4462
4463 PR bootstrap/78817
4464 * c-typeck.c (build_function_call_vec): If check_function_arguments
4465 returns true, set TREE_NO_WARNING on CALL_EXPR.
4466
4467 PR c/77767
4468 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
4469 to *expr instead of overwriting it.
4470
4471 2016-12-20 Richard Biener <rguenther@suse.de>
4472
4473 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
4474 error recovery.
4475 (c_parser_gimple_statement): Only build assigns for non-error
4476 stmts.
4477 (c_parser_gimple_postfix_expression_after): Improve error recovery.
4478
4479 2016-12-14 Martin Jambor <mjambor@suse.cz>
4480
4481 * c-parser.c: Include omp-general.h and omp-offload.h instead of
4482 omp-low.h.
4483 (c_finish_oacc_routine): Adjusted call to
4484 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
4485 to use their new names.
4486 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
4487 use its new name.
4488 (c_parser_oacc_update): Likewise.
4489 (c_parser_omp_simd): Likewise.
4490 (c_parser_omp_target_update): Likewise.
4491 * c-typeck.c: Include omp-general.h instead of omp-low.h.
4492 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
4493 name.
4494 (c_finish_omp_cancellation_point): Likewise.
4495 * gimple-parser.c: Do not include omp-low.h
4496
4497 2016-12-02 Cesar Philippidis <cesar@codesourcery.com>
4498 James Norris <jnorris@codesourcery.com>
4499
4500 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
4501 EXIT_DATA,WAIT} are not used in compound statements.
4502 (c_parser_oacc_enter_exit_data): Update diagnostics.
4503
4504 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4505
4506 PR c++/71973
4507 * c-decl.c (diagnose_mismatched_decls): Use
4508 OPT_Wbuiltin_declaration_mismatch here too.
4509
4510 2016-11-18 Richard Sandiford <richard.sandiford@arm.com>
4511 Alan Hayward <alan.hayward@arm.com>
4512 David Sherwood <david.sherwood@arm.com>
4513
4514 * c-decl.c (merge_decls): Use SET_DECL_MODE.
4515 (make_label, finish_struct): Likewise.
4516
4517 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
4518 Richard Biener <rguenther@suse.de>
4519
4520 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
4521 * config-lang.in (gtfiles): Add c/c-parser.h.
4522 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
4523 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
4524 * c-parser.c (enum c_id_kind, struct c_token,
4525 c_parser_next_token_is, c_parser_next_token_is_not,
4526 c_parser_next_token_is_keyword,
4527 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
4528 Split out to ...
4529 * c-parser.h: ... new header.
4530 * c-parser.c: Include c-parser.h and gimple-parser.h.
4531 (c_parser_peek_token, c_parser_peek_2nd_token,
4532 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4533 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4534 c_parser_error, c_parser_require, c_parser_skip_until_found,
4535 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4536 c_parser_type_name): Export.
4537 (c_parser_tokens_buf): New function.
4538 (c_parser_error): Likewise.
4539 (c_parser_set_error): Likewise.
4540 (c_parser_declspecs): Handle RID_GIMPLE.
4541 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
4542 via c_parser_parse_gimple_body.
4543 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
4544 c_token_starts_typename, c_parser_next_token_starts_declspecs,
4545 c_parser_next_tokens_start_declaration, c_parser_consume_token,
4546 c_parser_error, c_parser_require, c_parser_skip_until_found,
4547 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
4548 c_parser_type_name): Declare.
4549 (struct c_parser): Declare forward.
4550 (c_parser_tokens_buf): Declare.
4551 (c_parser_error): Likewise.
4552 (c_parser_set_error): Likewise.
4553 * gimple-parser.c: New file.
4554 * gimple-parser.h: Likewise.
4555
4556 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4557
4558 PR c/35503
4559 * c-parser.c (c_parser_postfix_expression_after_primary): Call
4560 warn_for_restrict.
4561
4562 2016-09-11 Le-Chun Wu <lcwu@google.com>
4563 Mark Wielaard <mjw@redhat.com>
4564
4565 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
4566 to the given -Wshadow= variant.
4567
4568 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4569
4570 * c-typeck.c: Include memmodel.h.
4571
4572 2016-10-13 Jakub Jelinek <jakub@redhat.com>
4573
4574 PR target/77957
4575 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
4576 instead of lhd_return_null_tree_v.
4577
4578 2016-10-07 Bernd Schmidt <bschmidt@redhat.com>
4579
4580 PR c++/69733
4581 * c-decl.c (smallest_type_quals_location): New static function.
4582 (grokdeclarator): Try to find the correct location for an ignored
4583 qualifier.
4584
4585 2016-09-26 Marek Polacek <polacek@redhat.com>
4586
4587 PR c/7652
4588 * c-decl.c (pop_scope): Add gcc_fallthrough.
4589
4590 2016-09-26 Marek Polacek <polacek@redhat.com>
4591
4592 PR c/7652
4593 * c-parser.c (struct c_token): Add flags field.
4594 (c_lex_one_token): Pass it to c_lex_with_flags.
4595 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
4596 into IFN_FALLTHROUGH.
4597 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
4598 attribute fallthrough after a case label or default label.
4599 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
4600
4601 2016-09-24 Marek Polacek <polacek@redhat.com>
4602
4603 PR c/77490
4604 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
4605 have boolean value. Warn about ++/-- on booleans.
4606
4607 2016-09-23 Jakub Jelinek <jakub@redhat.com>
4608
4609 * c-parser.c (incomplete_record_decls): Remove unnecessary
4610 = vNULL initialization of file scope vec.
4611
4612 2016-09-16 Marek Polacek <polacek@redhat.com>
4613
4614 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
4615
4616 2016-09-14 Marek Polacek <polacek@redhat.com>
4617
4618 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
4619 (fix_array_notation_expr): Likewise.
4620 * c-decl.c (finish_decl): Likewise.
4621 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
4622 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
4623 (function_to_pointer_conversion): Use false instead of 0.
4624 (convert_lvalue_to_rvalue): Likewise.
4625 (parser_build_unary_op): Likewise.
4626 (build_atomic_assign): Likewise.
4627 (build_unary_op): Change nonconvert parameter type to bool, use
4628 true/false instead of 1/0.
4629 (build_binary_op): Use true instead of 1.
4630
4631 2016-09-13 David Malcolm <dmalcolm@redhat.com>
4632
4633 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
4634 of add_fixit_insert to add_fixit_insert_before.
4635
4636 2016-09-13 Marek Polacek <polacek@redhat.com>
4637
4638 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
4639 it.
4640
4641 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4642
4643 PR c++/77496
4644 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
4645 COMPOUND_EXPR to warn_for_omitted_condop.
4646
4647 2016-09-07 David Malcolm <dmalcolm@redhat.com>
4648
4649 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
4650 c_get_substring_location for this new langhook.
4651
4652 2016-09-02 Jakub Jelinek <jakub@redhat.com>
4653
4654 PR c/65467
4655 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
4656 flag_openmp.
4657 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
4658 instead of mark_exp_read on low_bound/length expression.
4659 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
4660 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
4661 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
4662 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
4663 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
4664 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
4665 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
4666 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
4667 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
4668 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
4669 instead of mark_expr_read.
4670 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
4671 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
4672 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
4673 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
4674 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
4675 array section bases outside of depend clause, for depend clause
4676 use convert_lvalue_to_rvalue on the base.
4677 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
4678 linear, aligned, map, to and from clauses.
4679 (c_omp_clause_copy_ctor): New function.
4680
4681 2016-09-01 Marek Polacek <polacek@redhat.com>
4682
4683 PR c/7652
4684 * c-typeck.c (composite_type): Add FALLTHRU comment.
4685
4686 2016-08-31 David Malcolm <dmalcolm@redhat.com>
4687
4688 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4689 to the insertion fixits for "struct", "union", and "enum".
4690
4691 2016-08-30 David Malcolm <dmalcolm@redhat.com>
4692
4693 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
4694 rather than add_fixit_misspelled_id.
4695 (undeclared_variable): Likewise.
4696 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
4697 now-redundant "here" params from add_fixit_insert method calls.
4698 (c_parser_parameter_declaration): Likewise.
4699 * c-typeck.c (build_component_ref): Remove now-redundant range
4700 param from add_fixit_replace method calls.
4701
4702 2016-08-25 Marek Polacek <polacek@redhat.com>
4703
4704 * c-typeck.c (parser_build_binary_op): Pass LHS to
4705 warn_logical_not_parentheses.
4706
4707 2016-08-25 Marek Polacek <polacek@redhat.com>
4708
4709 PR c/77323
4710 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
4711 or _FloatN or _FloatNx is not supported.
4712 (finish_declspecs): Set type to integer_type_node when _FloatN or
4713 _FloatNx is not supported.
4714
4715 2016-08-19 Joseph Myers <joseph@codesourcery.com>
4716
4717 PR c/32187
4718 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
4719 (struct c_declspecs): Add field floatn_nx_idx.
4720 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
4721 and _FloatNx type specifiers.
4722 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
4723 (c_parser_declspecs, c_parser_attribute_any_word)
4724 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
4725 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
4726 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
4727 narrower than double.
4728
4729 2016-08-12 Jakub Jelinek <jakub@redhat.com>
4730 Martin Liska <mliska@suse.cz>
4731
4732 PR c/67410
4733 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
4734 % to determine val element to change. Assert that
4735 wchar_bytes * charwidth fits into val array.
4736
4737 2016-08-12 Marek Polacek <polacek@redhat.com>
4738
4739 PR c/7652
4740 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
4741 (c_parser_postfix_expression): Likewise.
4742 * c-typeck.c (build_unary_op): Adjust fall through comment.
4743 (c_mark_addressable): Likewise.
4744
4745 2016-08-11 Jakub Jelinek <jakub@redhat.com>
4746
4747 PR c/72816
4748 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
4749 array member through typedef, for orig_qual_indirect == 0 clear
4750 orig_qual_type.
4751
4752 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4753
4754 PR c/64955
4755 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
4756 this up to selftest::run_c_tests.
4757 (selftest::run_c_tests): New function.
4758
4759 2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
4760
4761 * c-parser.c (struct oacc_routine_data): Add error_seen and
4762 fndecl_seen members.
4763 (c_finish_oacc_routine): Use these.
4764 (c_parser_declaration_or_fndef): Adjust.
4765 (c_parser_oacc_routine): Likewise. Support more C language
4766 constructs, and improve diagnostics. Move pragma context
4767 checking...
4768 (c_parser_pragma): ... here.
4769
4770 * c-parser.c (struct oacc_routine_data): New.
4771 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
4772 Simplify code.
4773 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
4774 declare target" attribute.
4775
4776 2016-08-01 Jan Beulich <jbeulich@suse.com>
4777
4778 * c-fold.c (c_fully_fold_internal): Also emit shift count
4779 warnings for vector types.
4780 * c-typeck.c (build_binary_op): Likewise.
4781
4782 2016-07-29 Marek Polacek <polacek@redhat.com>
4783
4784 PR c/71742
4785 * c-decl.c (finish_struct): Rephrase an error message.
4786
4787 PR c/71853
4788 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
4789 to error node for invalid code.
4790
4791 PR c/71573
4792 * c-decl.c (implicitly_declare): Return decl early not only for
4793 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
4794
4795 2016-07-29 Jakub Jelinek <jakub@redhat.com>
4796
4797 PR c/71969
4798 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
4799 on GNU extern inline functions.
4800
4801 2016-07-29 Marek Polacek <polacek@redhat.com>
4802
4803 PR c/71583
4804 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
4805 check expr.value.
4806
4807 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
4808
4809 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
4810
4811 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4812
4813 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
4814 spellcheck-tree.h
4815 (best_macro_match): Likewise, converting from a typedef to a
4816 subclass.
4817 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
4818 (lookup_name_fuzzy): Update for change of best_macro_match to a
4819 subclass with a ctor that calls cpp_forall_identifiers.
4820
4821 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4822
4823 * c-decl.c (implicit_decl_warning): Update for conversion of
4824 return type of lookup_name_fuzzy to const char *.
4825 (undeclared_variable): Likewise.
4826 (lookup_name_fuzzy): Convert return type from tree to
4827 const char *.
4828 * c-parser.c (c_parser_declaration_or_fndef): Update for
4829 conversion of return type of lookup_name_fuzzy to const char *.
4830 (c_parser_parameter_declaration): Likewise.
4831
4832 2016-07-15 Cesar Philippidis <cesar@codesourcery.com>
4833
4834 * c-parser.c (c_parser_oacc_declare): Don't scan for
4835 GOMP_MAP_POINTER.
4836 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
4837 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
4838 zero-length subarrays.
4839
4840 2016-07-15 Jakub Jelinek <jakub@redhat.com>
4841
4842 PR c/71858
4843 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
4844 instead of FUZZY_LOOKUP_NAME.
4845 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
4846 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
4847
4848 2016-07-14 Jakub Jelinek <jakub@redhat.com>
4849
4850 PR c/71858
4851 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
4852
4853 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4854
4855 * c-parser.c (c_parser_generic_selection): Make type of variable
4856 auto_vec.
4857 (c_parser_omp_declare_simd): Likewise.
4858
4859 2016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4860
4861 * c-decl.c (struct c_struct_parse_info): Change member types
4862 from vec to auto_vec.
4863 (start_struct): Adjust.
4864 (finish_struct): Likewise.
4865
4866 2016-07-02 Jakub Jelinek <jakub@redhat.com>
4867
4868 PR c/71719
4869 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
4870
4871 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4872
4873 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
4874 Move pragma context checking into...
4875 (c_parser_omp_cancellation_point): ... here, and improve
4876 diagnostic messages.
4877 * c-typeck.c (c_finish_omp_cancel)
4878 (c_finish_omp_cancellation_point): Improve diagnostic messages.
4879
4880 2016-06-29 Jakub Jelinek <jakub@redhat.com>
4881
4882 PR c/71685
4883 * c-typeck.c (c_build_qualified_type): Don't clear
4884 C_TYPE_INCOMPLETE_VARS for the main variant.
4885
4886 2016-06-28 Martin Sebor <msebor@redhat.com>
4887
4888 PR c/71552
4889 * c-typeck.c (output_init_element): Diagnose incompatible types
4890 before non-constant initializers.
4891
4892 2016-06-28 Jakub Jelinek <jakub@redhat.com>
4893
4894 * Make-lang.in: Don't cat ../stage_current if it does not exist.
4895
4896 2016-06-23 Andi Kleen <ak@linux.intel.com>
4897
4898 * Make-lang.in: Add support for autofdo.
4899
4900 2016-06-22 David Malcolm <dmalcolm@redhat.com>
4901
4902 PR c/70339
4903 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
4904 (implicit_decl_warning): When issuing warnings for implicit
4905 declarations, attempt to provide a suggestion via
4906 lookup_name_fuzzy.
4907 (undeclared_variable): Likewise when issuing errors.
4908 (lookup_name_in_scope): Likewise.
4909 (struct edit_distance_traits<cpp_hashnode *>): New struct.
4910 (best_macro_match): New typedef.
4911 (find_closest_macro_cpp_cb): New function.
4912 (lookup_name_fuzzy): New function.
4913 * c-parser.c: Include gcc-rich-location.h.
4914 (c_token_starts_typename): Split out case CPP_KEYWORD into...
4915 (c_keyword_starts_typename): ...this new function.
4916 (c_parser_declaration_or_fndef): When issuing errors about
4917 missing "struct" etc, add a fixit. For other kinds of errors,
4918 attempt to provide a suggestion via lookup_name_fuzzy.
4919 (c_parser_parms_declarator): When looking ahead to detect typos in
4920 type names, also reject CPP_KEYWORD.
4921 (c_parser_parameter_declaration): When issuing errors about
4922 unknown type names, attempt to provide a suggestion via
4923 lookup_name_fuzzy.
4924 * c-tree.h (c_keyword_starts_typename): New prototype.
4925
4926 2016-06-20 Joseph Myers <joseph@codesourcery.com>
4927
4928 PR c/71601
4929 * c-typeck.c (build_conditional_expr): Return error_mark_node if
4930 c_common_type returns error_mark_node.
4931
4932 2016-06-19 Martin Sebor <msebor@redhat.com>
4933
4934 PR c/69507
4935 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
4936 __alignof__ (expression).
4937
4938 2016-06-14 David Malcolm <dmalcolm@redhat.com>
4939
4940 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
4941
4942 2016-06-14 David Malcolm <dmalcolm@redhat.com>
4943
4944 * c-typeck.c (build_component_ref): Simplify fixit code by
4945 using gcc_rich_location::add_fixit_misspelled_id.
4946 (set_init_label): Likewise.
4947
4948 2016-06-13 David Malcolm <dmalcolm@redhat.com>
4949
4950 * c-parser.c (c_parser_initelt): Provide location of name for new
4951 location_t param of set_init_label.
4952 * c-tree.h (set_init_label): Add location_t param.
4953 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
4954 param and use it when issuing error messages about unrecognized
4955 field names. Attempt to provide a fixit hint if appropriate,
4956 otherwise update the error message to provide the type name.
4957
4958 2016-06-10 Thomas Schwinge <thomas@codesourcery.com>
4959
4960 PR c/71381
4961 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
4962 Loosen checking.
4963
4964 2016-06-08 Martin Sebor <msebor@redhat.com>
4965 Jakub Jelinek <jakub@redhat.com>
4966
4967 PR c++/70507
4968 PR c/68120
4969 * c-typeck.c (convert_arguments): Don't promote last argument
4970 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4971
4972 2016-06-08 Marek Polacek <polacek@redhat.com>
4973
4974 PR c/71418
4975 * c-decl.c (grokdeclarator): Check TYPE_P.
4976
4977 PR c/71426
4978 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
4979 code.
4980
4981 2016-06-07 David Malcolm <dmalcolm@redhat.com>
4982
4983 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
4984 and structure element reference, capture the location of the
4985 element name token and pass it to build_component_ref.
4986 (c_parser_postfix_expression_after_primary): Likewise for
4987 structure element dereference.
4988 (c_parser_omp_variable_list): Likewise for
4989 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
4990 * c-tree.h (build_component_ref): Add location_t param.
4991 * c-typeck.c (build_component_ref): Add location_t param
4992 COMPONENT_LOC. Use it, if available, when issuing hints about
4993 mispelled member names to provide a fixit replacement hint.
4994
4995 2016-06-06 Marek Polacek <polacek@redhat.com>
4996
4997 PR c/71362
4998 * c-parser.c (c_parser_direct_declarator): Set location.
4999
5000 2016-06-06 Marek Polacek <polacek@redhat.com>
5001
5002 * c-typeck.c (comptypes_internal): Handle comparisons of
5003 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
5004 TYPE_REF_CAN_ALIAS_ALL.
5005
5006 2016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
5007
5008 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
5009 arguments as addressable when async clause exists.
5010
5011 2016-05-30 Jakub Jelinek <jakub@redhat.com>
5012
5013 PR c++/71349
5014 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
5015 when combined with target construct.
5016
5017 2016-05-26 Jakub Jelinek <jakub@redhat.com>
5018
5019 * c-parser.c (c_parser_omp_clause_schedule): Warn if
5020 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
5021
5022 2016-05-25 Marek Polacek <polacek@redhat.com>
5023
5024 PR c/71265
5025 * c-decl.c (c_make_fname_decl): Don't check seen_error.
5026
5027 PR c/71266
5028 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
5029
5030 2016-05-24 Cesar Philippidis <cesar@codesourcery.com>
5031
5032 * c-parser.c (c_parser_oacc_declare): Add support for
5033 GOMP_MAP_FIRSTPRIVATE_POINTER.
5034 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
5035 argument with enum c_omp_region_type ort.
5036 (handle_omp_array_sections): Likewise. Update call to
5037 handle_omp_array_sections_1.
5038 (c_finish_omp_clauses): Add specific errors and warning messages for
5039 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
5040 call to handle_omp_array_sections.
5041
5042 2016-05-24 Thomas Schwinge <thomas@codesourcery.com>
5043
5044 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
5045
5046 2016-05-24 Richard Biener <rguenther@suse.de>
5047
5048 PR middle-end/70434
5049 PR c/69504
5050 * c-typeck.c (build_array_ref): Do not complain about indexing
5051 non-lvalue vectors. Adjust for function name change.
5052
5053 2016-05-20 Martin Sebor <msebor@redhat.com>
5054
5055 PR c/71115
5056 * c-typeck.c (error_init): Use
5057 expansion_point_location_if_in_system_header.
5058 (warning_init): Same.
5059
5060 2016-05-19 David Malcolm <dmalcolm@redhat.com>
5061
5062 PR c/71171
5063 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
5064 in error-handling.
5065 (c_parser_postfix_expression): Likewise.
5066 * c-tree.h (c_expr::set_error): New method.
5067 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
5068 that result's range is initialized.
5069
5070 2016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
5071
5072 * c-typeck.c (parser_build_unary_op): Fix formatting.
5073
5074 2016-05-16 Matthew Wahab <matthew.wahab@arm.com>
5075
5076 * c-decl.c (grokdeclarator): Remove errmsg and use of
5077 targetm.invalid_return_type.
5078 (grokparms): Remove errmsg and use of
5079 targetm.invalid_parameter_type.
5080
5081 2016-05-13 Joseph Myers <joseph@codesourcery.com>
5082
5083 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
5084 function return type.
5085
5086 2016-05-12 Marek Polacek <polacek@redhat.com>
5087
5088 PR c/70756
5089 * c-decl.c (build_compound_literal): Pass LOC down to
5090 c_incomplete_type_error.
5091 * c-tree.h (require_complete_type): Adjust declaration.
5092 (c_incomplete_type_error): Likewise.
5093 * c-typeck.c (require_complete_type): Add location parameter, pass it
5094 down to c_incomplete_type_error.
5095 (c_incomplete_type_error): Add location parameter, pass it down to
5096 error_at.
5097 (build_component_ref): Pass location down to c_incomplete_type_error.
5098 (default_conversion): Pass location down to require_complete_type.
5099 (build_array_ref): Likewise.
5100 (build_function_call_vec): Likewise.
5101 (convert_arguments): Likewise.
5102 (build_unary_op): Likewise.
5103 (build_c_cast): Likewise.
5104 (build_modify_expr): Likewise.
5105 (convert_for_assignment): Likewise.
5106 (c_finish_omp_clauses): Likewise.
5107
5108 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5109
5110 PR c/43651
5111 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
5112 is enabled.
5113 * c-errors.c (pedwarn_c90): Return true if warned.
5114 * c-tree.h (pedwarn_c90): Change return type to bool.
5115 (enum c_declspec_word): Add new enumerator cdw_atomic.
5116
5117 2016-05-11 Marek Polacek <polacek@redhat.com>
5118
5119 PR c++/71024
5120 * c-decl.c (diagnose_mismatched_decls): Factor out code to
5121 diagnose_mismatched_attributes and call it.
5122
5123 2016-05-10 Marek Polacek <polacek@redhat.com>
5124
5125 PR c/70255
5126 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
5127 on a declaration following the definition.
5128
5129 2016-05-05 Jakub Jelinek <jakub@redhat.com>
5130
5131 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
5132 parse it through to c_parser_c99_block_statement.
5133 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
5134 caller.
5135
5136 2016-05-04 Marek Polacek <polacek@redhat.com>
5137
5138 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
5139 OPT_Wdangling_else.
5140
5141 2016-05-04 Marek Polacek <polacek@redhat.com>
5142
5143 PR c/48778
5144 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
5145 for macro expansions.
5146
5147 2016-05-03 Marek Polacek <polacek@redhat.com>
5148
5149 PR c/70859
5150 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
5151 check_builtin_function_arguments.
5152
5153 2016-05-03 Richard Biener <rguenther@suse.de>
5154
5155 * Make-lang.in (cc1-checksum.c): For stage-final re-use
5156 the checksum from the previous stage.
5157
5158 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5159
5160 * c-parser.c (c_parser_oacc_all_clauses): Update call to
5161 c_finish_omp_clauses.
5162 (c_parser_omp_all_clauses): Likewise.
5163 (c_parser_oacc_cache): Likewise.
5164 (c_parser_oacc_loop): Likewise.
5165 (omp_split_clauses): Likewise.
5166 (c_parser_omp_declare_target): Likewise.
5167 (c_parser_cilk_all_clauses): Likewise.
5168 (c_parser_cilk_for): Likewise.
5169 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
5170 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
5171
5172 2016-05-02 Marek Polacek <polacek@redhat.com>
5173
5174 PR c/70851
5175 * c-decl.c (grokdeclarator): Diagnose when array's size has an
5176 incomplete type.
5177
5178 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5179
5180 PR middle-end/70626
5181 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
5182 OACC_LOOP_CLAUSE_MASK.
5183 (c_parser_oacc_kernels_parallel): Update call to
5184 c_oacc_split_loop_clauses.
5185
5186 2016-04-28 Andrew MacLeod <amacleod@redhat.com>
5187
5188 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
5189 argument to build_modify_expr in two cases.
5190
5191 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5192
5193 * c-parser.c (c_parser_postfix_expression_after_primary): Call
5194 warn_for_memset instead of warning directly here.
5195
5196 2016-04-26 Marek Polacek <polacek@redhat.com>
5197
5198 PR c/67784
5199 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
5200 out of ...
5201 (c_parser_for_statement): ... here.
5202 (c_parser_if_statement): Use it.
5203 (c_parser_switch_statement): Use it.
5204 (c_parser_while_statement): Use it.
5205
5206 PR c/70791
5207 * c-decl.c (pushdecl): Pass LOCUS down to warning.
5208
5209 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5210
5211 PR c++/69363
5212 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
5213 instead of c_finish_cilk_clauses.
5214 * c-tree.h (c_finish_omp_clauses): Add new default argument.
5215 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
5216 floating-point variables in the linear clause for Cilk Plus.
5217
5218 2016-04-18 Michael Matz <matz@suse.de>
5219
5220 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
5221 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
5222
5223 2016-04-15 Marek Polacek <polacek@redhat.com>
5224
5225 PR c/70671
5226 * c-typeck.c (build_unary_op): Pass location down to error and
5227 warning call.
5228
5229 2016-04-15 Jakub Jelinek <jakub@redhat.com>
5230
5231 PR c/70436
5232 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
5233 where needed.
5234 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
5235 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
5236 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
5237 Adjust c_parser_pragma callers.
5238 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
5239 caller.
5240 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
5241 c_parser_statement.
5242 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
5243 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
5244 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
5245 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
5246 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
5247 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
5248 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
5249 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
5250 down where needed.
5251 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
5252 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
5253 calls.
5254
5255 2016-04-13 Marek Polacek <polacek@redhat.com>
5256
5257 PR c/70436
5258 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
5259 adjust callers.
5260 (c_parser_statement): Likewise.
5261 (c_parser_c99_block_statement): Likewise.
5262 (c_parser_while_statement): Likewise.
5263 (c_parser_for_statement): Likewise.
5264 (c_parser_if_body): Don't set IF_P here.
5265 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
5266 about dangling else here.
5267 * c-tree.h (c_finish_if_stmt): Adjust declaration.
5268 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
5269 warn about dangling else here.
5270
5271 2016-04-04 Marek Polacek <polacek@redhat.com>
5272
5273 PR c/70307
5274 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
5275
5276 2016-03-31 Marek Polacek <polacek@redhat.com>
5277
5278 PR c/70297
5279 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
5280
5281 2016-03-18 David Malcolm <dmalcolm@redhat.com>
5282
5283 PR c/70281
5284 * c-parser.c (c_parser_postfix_expression): Set the source range
5285 for uses of "__builtin_types_compatible_p".
5286
5287 2016-03-17 Jakub Jelinek <jakub@redhat.com>
5288
5289 PR c/70280
5290 * c-typeck.c (composite_type): Don't count void_list_node
5291 into len, if the list is terminated by void_list_node, start
5292 with void_list_node instead of NULL for newargs. Stop
5293 at void_list_node.
5294
5295 2016-03-16 Marek Polacek <polacek@redhat.com>
5296
5297 PR c/70093
5298 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
5299 nested functions returning VM types.
5300
5301 2016-03-09 Cesar Philippidis <cesar@codesourcery.com>
5302
5303 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
5304 when calling c_finish_omp_clauses.
5305
5306 2016-03-04 Bernd Schmidt <bschmidt@redhat.com>
5307
5308 PR c/69824
5309 * c-decl.c (get_parm_info): Don't queue implicit function declarations
5310 for later.
5311
5312 2016-03-04 Marek Polacek <polacek@redhat.com>
5313
5314 PR c/69798
5315 * c-parser.c (c_parser_postfix_expression): Call
5316 c_parser_cast_expression rather than c_parser_postfix_expression.
5317
5318 2016-03-01 Jakub Jelinek <jakub@redhat.com>
5319
5320 PR c/69796
5321 PR c/69974
5322 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
5323 of incomplete decls to error_mark_node.
5324
5325 2016-02-24 Marek Polacek <polacek@redhat.com>
5326
5327 PR c/69819
5328 * c-decl.c (finish_decl): Don't update the copy of the type of a
5329 different decl type.
5330
5331 2016-02-23 Jakub Jelinek <jakub@redhat.com>
5332
5333 PR objc/69844
5334 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
5335 in id_kind reclassification.
5336
5337 2016-02-16 Jakub Jelinek <jakub@redhat.com>
5338
5339 PR c/69835
5340 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
5341
5342 2016-02-16 James Norris <jnorris@codesourcery.com>
5343
5344 PR c/64748
5345 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5346
5347 2016-02-12 Bernd Schmidt <bschmidt@redhat.com>
5348
5349 * c-decl.c (build_null_declspecs): Zero the entire struct.
5350
5351 PR c/69522
5352 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
5353 callers changed. If nested_p is true, use it to call
5354 finish_implicit_inits.
5355 * c-tree.h (finish_implicit_inits): Declare.
5356 * c-typeck.c (finish_implicit_inits): New function. Move code
5357 from ...
5358 (push_init_level): ... here.
5359 (set_designator, process_init_element): Call finish_implicit_inits.
5360
5361 2016-02-11 Jakub Jelinek <jakub@redhat.com>
5362
5363 PR c/69768
5364 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
5365 arguments for -Waddress warning.
5366
5367 2016-02-04 Jakub Jelinek <jakub@redhat.com>
5368
5369 PR c/69669
5370 * c-decl.c (finish_enum): When honoring mode attribute,
5371 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
5372
5373 2016-01-29 Jakub Jelinek <jakub@redhat.com>
5374
5375 PR debug/69518
5376 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
5377 all type variants, not just TYPE_MAIN_VARIANT.
5378
5379 2016-01-27 Jakub Jelinek <jakub@redhat.com>
5380
5381 PR debug/66869
5382 * c-decl.c (c_write_global_declarations_1): Warn with
5383 warn_unused_function if static prototype without definition
5384 is not C_DECL_USED.
5385
5386 2016-01-27 Marek Polacek <polacek@redhat.com>
5387
5388 PR c/68062
5389 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
5390 to unsigned, if needed. Add -Wsign-compare warning.
5391
5392 2016-01-26 Jakub Jelinek <jakub@redhat.com>
5393
5394 PR tree-optimization/69483
5395 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
5396
5397 2016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5398
5399 PR c/24293
5400 * c-tree.h (incomplete_record_decls): Declare.
5401 * c-parser.c (incomplete_record_decls): Define.
5402 (c_parser_translation_unit): Iterate through incomplete_record_decls and
5403 report error if any decl has zero size.
5404 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
5405 or enum type to incomplete_record_decls.
5406
5407 2016-01-14 Tom de Vries <tom@codesourcery.com>
5408
5409 PR tree-optimization/68773
5410 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
5411 set force_output.
5412
5413 2016-01-14 Marek Polacek <polacek@redhat.com>
5414
5415 PR c/69262
5416 * c-decl.c (grokdeclarator): Provide more information for invalid
5417 array declarations.
5418
5419 2016-01-06 David Malcolm <dmalcolm@redhat.com>
5420
5421 * c-parser.c (c_parser_unary_expression): For dereferences, build
5422 a combined location before calling build_indirect_ref, so that
5423 error reports cover the full range, manually updating the c_expr
5424 src_range.
5425
5426 2016-01-06 Marek Polacek <polacek@redhat.com>
5427
5428 PR sanitizer/69099
5429 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
5430 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
5431 NULL.
5432
5433 2016-01-04 Jakub Jelinek <jakub@redhat.com>
5434
5435 Update copyright years.
5436
5437 2016-01-04 Marek Polacek <polacek@redhat.com>
5438
5439 PR c/68908
5440 * c-typeck.c (build_atomic_assign): Improve commentary. Add
5441 optimization to use __atomic_fetch_* built-in if possible.
5442
5443 2015-12-23 Thomas Schwinge <thomas@codesourcery.com>
5444
5445 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
5446 into...
5447 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
5448 all users.
5449
5450 2015-12-22 Marek Polacek <polacek@redhat.com>
5451
5452 PR c/69002
5453 * c-typeck.c (build_component_ref): Warn when acessing elements of
5454 atomic structures or unions.
5455
5456 2015-12-21 David Malcolm <dmalcolm@redhat.com>
5457
5458 * c-typeck.c: Include "gcc-rich-location.h".
5459 (build_binary_op): In the two places that call binary_op_error,
5460 create a gcc_rich_location and populate it with the location of
5461 the binary op and its two operands.
5462
5463 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5464
5465 * c-parser.c (c_parser_statement_after_labels): When calling
5466 c_finish_return, Use the return expression's location if it has
5467 one, falling back to the location of the first token within it.
5468 * c-typeck.c (c_finish_return): When issuing warnings about
5469 the incorrect presence/absence of a return value, issue a note
5470 showing the declaration of the function.
5471
5472 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5473
5474 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
5475 to 4.
5476 (c_parser_peek_nth_token): New function.
5477 (c_parser_peek_conflict_marker): New function.
5478 (c_parser_error): Detect conflict markers and report them as such.
5479
5480 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5481
5482 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
5483 to preserve range information for the primary expression
5484 in the call to c_parser_postfix_expression_after_primary.
5485
5486 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5487
5488 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
5489 expression location, falling back on the first token location,
5490 rather than always using the latter.
5491
5492 2015-12-16 Marek Polacek <polacek@redhat.com>
5493
5494 PR c/64637
5495 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
5496 available.
5497
5498 2015-12-15 Marek Polacek <polacek@redhat.com>
5499
5500 PR c/68907
5501 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
5502 artificial decl.
5503
5504 2015-12-08 David Malcolm <dmalcolm@redhat.com>
5505
5506 * c-parser.c (c_parser_alignof_expression): Capture location of
5507 closing parenthesis (if any), or of end of unary expression, and
5508 use it to build a src_range for the expression.
5509
5510 2015-12-08 David Malcolm <dmalcolm@redhat.com>
5511
5512 PR c/68757
5513 * c-parser.c (c_parser_get_builtin_args): Add
5514 "out_close_paren_loc" param, and write back to it.
5515 (c_parser_postfix_expression): Capture the closing
5516 parenthesis location for RID_CHOOSE_EXPR,
5517 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
5518 RID_BUILTIN_SHUFFLE and use it to set the source range
5519 for such expressions; within RID_BUILTIN_COMPLEX set
5520 the underlying location.
5521
5522 2015-12-07 Marek Polacek <polacek@redhat.com>
5523
5524 PR c/68668
5525 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
5526 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
5527
5528 2015-12-04 Eric Botcazou <ebotcazou@adacore.com>
5529
5530 * c-tree.h (c_build_va_arg): Adjust prototype.
5531 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
5532 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
5533 parameter, adjust throughout and issue an error if EXPR is a component
5534 with reverse storage order.
5535
5536 2015-12-02 Jason Merrill <jason@redhat.com>
5537
5538 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5539 (c_fully_fold_internal, decl_constant_value_for_optimization):
5540 Move from c-common.c.
5541 * c-tree.h: Declare decl_constant_value_for_optimization.
5542 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
5543
5544 2015-12-02 Joseph Myers <joseph@codesourcery.com>
5545
5546 PR c/68162
5547 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
5548 following link from declarator to next declarator. Track original
5549 qualified type and pass it to c_build_qualified_type.
5550 * c-typeck.c (c_build_qualified_type): Add arguments
5551 orig_qual_type and orig_qual_indirect.
5552
5553 2015-12-02 Thomas Schwinge <thomas@codesourcery.com>
5554
5555 * c-parser.c (c_parser_omp_clause_name)
5556 (c_parser_oacc_all_clauses): Alphabetical sorting.
5557
5558 2015-12-02 Jakub Jelinek <jakub@redhat.com>
5559
5560 PR c/68533
5561 * c-decl.c (get_parm_info): Use b->locus instead of input_location
5562 for diagnostics.
5563
5564 2015-12-01 Julian Brown <julian@codesourcery.com>
5565 Cesar Philippidis <cesar@codesourcery.com>
5566 James Norris <James_Norris@mentor.com>
5567
5568 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
5569 (c_parser_oacc_clause_use_device): New function.
5570 (c_parser_oacc_all_clauses): Add use_device support.
5571 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
5572 (c_parser_oacc_host_data): New function.
5573 (c_parser_omp_construct): Add host_data support.
5574 * c-tree.h (c_finish_oacc_host_data): Add prototype.
5575 * c-typeck.c (c_finish_oacc_host_data): New function.
5576 (c_finish_omp_clauses): Add use_device support.
5577
5578 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
5579
5580 PR c/67106
5581 * c-decl.c: Set TYPE_PACKED in variants.
5582
5583 2015-11-27 Martin Liska <mliska@suse.cz>
5584
5585 PR c++/68312
5586 * c-array-notation.c (fix_builtin_array_notation_fn):
5587 Use release_vec_vec instead of vec::release.
5588 (build_array_notation_expr): Likewise.
5589 (fix_conditional_array_notations_1): Likewise.
5590 (fix_array_notation_expr): Likewise.
5591 (fix_array_notation_call_expr): Likewise.
5592
5593 2015-11-27 Jakub Jelinek <jakub@redhat.com>
5594
5595 PR c/63326
5596 * c-parser.c (c_parser_compound_statement_nostart): If
5597 last_label is true, use pragma_stmt instead of pragma_compound
5598 as second c_parser_pragma argument.
5599 (c_parser_omp_ordered, c_parser_omp_target_update,
5600 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
5601 false as second argument to c_parser_skip_to_pragma_eol after
5602 diagnosing standalone directives used in pragma_stmt context.
5603
5604 2015-11-24 Ilya Verbin <ilya.verbin@intel.com>
5605
5606 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
5607 with "if (ENABLE_OFFLOADING)".
5608
5609 2015-11-23 David Malcolm <dmalcolm@redhat.com>
5610
5611 PR objc/68438
5612 * c-parser.c (c_parser_postfix_expression): Set up source ranges
5613 for various Objective-C constructs: Class.name syntax,
5614 @selector(), @protocol(), @encode(), and [] message syntax.
5615
5616 2015-11-20 David Malcolm <dmalcolm@redhat.com>
5617
5618 PR 62314
5619 * c-typeck.c (should_suggest_deref_p): New function.
5620 (build_component_ref): Special-case POINTER_TYPE when
5621 generating a "not a structure of union" error message, and
5622 suggest a "->" rather than a ".", providing a fix-it hint.
5623
5624 2015-11-19 David Malcolm <dmalcolm@redhat.com>
5625
5626 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
5627 candidate into a new function, find_closest_identifier.
5628
5629 2015-11-19 Marek Polacek <polacek@redhat.com>
5630
5631 PR c/68412
5632 * c-typeck.c (parser_build_binary_op): Properly handle
5633 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
5634
5635 2015-11-17 David Malcolm <dmalcolm@redhat.com>
5636
5637 * c-parser.c (set_c_expr_source_range): Bulletproof both
5638 overloaded implementations against NULL expr->value.
5639 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
5640 values.
5641 (c_parser_unary_expression): Likewise when handling addresses of
5642 labels.
5643 (c_parser_postfix_expression): Likewise for statement expressions,
5644 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
5645 __builtin_va_arg, and for __builtin_offset_of.
5646 (c_parser_postfix_expression_after_paren_type): Initialize expr's
5647 src_range using the range of the braced initializer.
5648 (c_parser_transaction_expression): Set src_range for "ret" to a
5649 sane pair of values.
5650
5651 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5652
5653 * c-parser.c (c_finish_omp_declare_simd): Look for
5654 "simd" attribute as well. Update error message.
5655
5656 2015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5657
5658 * c-parser.c (c_parser_omp_declare_target): Adjust.
5659
5660 2015-11-14 Jakub Jelinek <jakub@redhat.com>
5661
5662 * c-typeck.c (c_finish_omp_clauses): Don't mark
5663 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
5664
5665 2015-11-14 Marek Polacek <polacek@redhat.com>
5666
5667 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
5668 * c-typeck.c: Likewise.
5669
5670 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5671
5672 * c-decl.c (warn_defaults_to): Pass line_table to
5673 rich_location ctor.
5674 * c-errors.c (pedwarn_c99): Likewise.
5675 (pedwarn_c90): Likewise.
5676 * c-parser.c (set_c_expr_source_range): New functions.
5677 (c_token::get_range): New method.
5678 (c_token::get_finish): New method.
5679 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
5680 based on the range from the start of the LHS to the end of the
5681 RHS.
5682 (c_parser_conditional_expression): Likewise, based on the range
5683 from the start of the cond.value to the end of exp2.value.
5684 (c_parser_binary_expression): Call set_c_expr_source_range on
5685 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
5686 (c_parser_cast_expression): Call set_c_expr_source_range on ret
5687 based on the cast_loc through to the end of the expr.
5688 (c_parser_unary_expression): Likewise, based on the
5689 op_loc through to the end of op.
5690 (c_parser_sizeof_expression) Likewise, based on the start of the
5691 sizeof token through to either the closing paren or the end of
5692 expr.
5693 (c_parser_postfix_expression): Likewise, using the token range,
5694 or from the open paren through to the close paren for
5695 parenthesized expressions.
5696 (c_parser_postfix_expression_after_primary): Likewise, for
5697 various kinds of expression.
5698 * c-tree.h (struct c_expr): Add field "src_range".
5699 (c_expr::get_start): New method.
5700 (c_expr::get_finish): New method.
5701 (set_c_expr_source_range): New decls.
5702 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
5703 on ret for prefix unary ops.
5704 (parser_build_binary_op): Likewise, running from the start of
5705 arg1.value through to the end of arg2.value.
5706
5707 2015-11-13 Marek Polacek <polacek@redhat.com>
5708
5709 PR c/68320
5710 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
5711
5712 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5713
5714 * c-typeck.c: Include spellcheck.h.
5715 (lookup_field_fuzzy_find_candidates): New function.
5716 (lookup_field_fuzzy): New function.
5717 (build_component_ref): If the field was not found, try using
5718 lookup_field_fuzzy and potentially offer a suggestion.
5719
5720 2015-11-12 James Norris <jnorris@codesourcery.com>
5721 Joseph Myers <joseph@codesourcery.com>
5722
5723 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
5724 (c_parser_omp_clause_name): Handle 'device_resident' clause.
5725 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5726 and PRAGMA_OMP_CLAUSE_LINK.
5727 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
5728 and PRAGMA_OACC_CLAUSE_LINK.
5729 (OACC_DECLARE_CLAUSE_MASK): New definition.
5730 (c_parser_oacc_declare): New function.
5731
5732 2015-11-12 Marek Polacek <polacek@redhat.com>
5733
5734 PR c/67784
5735 * c-parser.c (c_parser_for_statement): Reclassify the token in
5736 a correct scope.
5737
5738 2015-11-11 Marek Polacek <polacek@redhat.com>
5739
5740 PR c/68107
5741 PR c++/68266
5742 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
5743 checking the size of an array.
5744
5745 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
5746
5747 * c-array-notation.c: Remove unused header files.
5748 * c-aux-info.c: Likewise.
5749 * c-convert.c: Likewise.
5750 * c-decl.c: Likewise.
5751 * c-errors.c: Likewise.
5752 * c-lang.c: Likewise.
5753 * c-objc-common.c: Likewise.
5754 * c-parser.c: Likewise.
5755 * c-typeck.c: Likewise.
5756 * gccspec.c: Likewise.
5757
5758 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5759 Cesar Philippidis <cesar@codesourcery.com>
5760 James Norris <jnorris@codesourcery.com>
5761 Julian Brown <julian@codesourcery.com>
5762 Nathan Sidwell <nathan@codesourcery.com>
5763
5764 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
5765 routine arg.
5766 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
5767 (c_parser_pragma): Parse 'acc routine'.
5768 (OACC_ROUTINE_CLAUSE_MARK): Define.
5769 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
5770
5771 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5772
5773 PR debug/67192
5774 * c-typeck.c (c_finish_loop): For unconditional loops, set the
5775 location of the backward-goto to the start of the loop body.
5776
5777 2015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
5778
5779 PR debug/67192
5780 * c-parser.c (c_parser_while_statement): Finish the loop before
5781 parsing ahead for misleading indentation.
5782 (c_parser_for_statement): Likewise.
5783
5784 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5785
5786 * c-decl.c (finish_struct): If the structure has reverse storage
5787 order, rewrite the type of array fields with scalar component. Call
5788 maybe_apply_pragma_scalar_storage_order on entry.
5789 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
5790 errors on bit-fields and reverse SSO here and not...
5791 (c_mark_addressable): ...here.
5792 (output_init_element): Adjust call to initializer_constant_valid_p.
5793 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
5794
5795 2015-11-06 David Malcolm <dmalcolm@redhat.com>
5796
5797 * c-decl.c (warn_defaults_to): Update for change in signature
5798 of diagnostic_set_info.
5799 * c-errors.c (pedwarn_c99): Likewise.
5800 (pedwarn_c90): Likewise.
5801 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
5802 for textinfo::set_location.
5803
5804 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5805 Thomas Schwinge <thomas@codesourcery.com>
5806 James Norris <jnorris@codesourcery.com>
5807
5808 * c-parser.c (c_parser_omp_clause_name): Add support for
5809 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
5810 (c_parser_omp_clause_default): Add is_oacc argument. Handle
5811 default(none) in OpenACC.
5812 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
5813 arguments.
5814 (c_parser_oacc_clause_tile): New function.
5815 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
5816 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
5817 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
5818 TILE}.
5819 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
5820 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
5821 FIRSTPRIVATE}.
5822 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
5823 (c_parser_oacc_update): Update the error message for missing clauses.
5824 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
5825 and OMP_CLAUSE_INDEPENDENT.
5826
5827 2015-11-05 Marek Polacek <polacek@redhat.com>
5828
5829 PR c/68090
5830 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
5831 deal with pre-evaluation on invalid types.
5832
5833 2015-11-05 Jakub Jelinek <jakub@redhat.com>
5834 Ilya Verbin <ilya.verbin@intel.com>
5835
5836 * c-parser.c: Include context.h and gimple-expr.h.
5837 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
5838 monotonic together with nonmonotonic.
5839 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
5840 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
5841 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
5842 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
5843 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
5844 expressions on combined target teams before the target.
5845 (c_parser_omp_declare_target): If decl has "omp declare target" or
5846 "omp declare target link" attribute, and cgraph or varpool node already
5847 exists, then set corresponding flags. Call c_finish_omp_clauses
5848 in the parenthesized extended-list syntax case.
5849 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
5850 declare target.
5851 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
5852 on OMP_CLAUSE_REDUCTION array sections.
5853 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
5854 into the constant offset, or for variable low-bound using
5855 POINTER_PLUS_EXPR. For structure element based array sections use
5856 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
5857 (c_finish_omp_clauses): Drop generic_field_head, structure
5858 elements are now always mapped even as array section bases,
5859 diagnose same var in data sharing and mapping clauses. Diagnose if
5860 linear step on declare simd is neither a constant nor a uniform
5861 parameter. Look through POINTER_PLUS_EXPR for array section
5862 reductions. Diagnose the same var or function appearing multiple
5863 times on the same directive. Fix up wording for the to clause if t
5864 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
5865 modifier on kinds other than dynamic or guided or nonmonotonic
5866 modifier together with ordered clause.
5867
5868 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5869 Chung-Lin Tang <cltang@codesourcery.com>
5870
5871 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
5872
5873 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
5874
5875 * c-array-notation.c: Reorder #include's and remove duplicates.
5876 * c-aux-info.c: Likewise.
5877 * c-convert.c: Likewise.
5878 * c-decl.c: Likewise.
5879 * c-errors.c: Likewise.
5880 * c-lang.c: Likewise.
5881 * c-objc-common.c: Likewise.
5882 * c-parser.c: Likewise.
5883 * c-typeck.c: Likewise.
5884
5885 2015-10-26 Jim Wilson <jim.wilson@linaro.org>
5886
5887 PR debug/66068
5888 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
5889 after calling build_qualified_type.
5890
5891 2015-10-27 Cesar Philippidis <cesar@codesourcery.com>
5892 Thomas Schwinge <thomas@codesourcery.com>
5893 James Norris <jnorris@codesourcery.com>
5894 Joseph Myers <joseph@codesourcery.com>
5895 Julian Brown <julian@codesourcery.com>
5896 Bernd Schmidt <bschmidt@redhat.com>
5897
5898 * c-parser.c (c_parser_oacc_shape_clause): New.
5899 (c_parser_oacc_simple_clause): New.
5900 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
5901 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
5902
5903 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5904 James Norris <jnorris@codesourcery.com>
5905 Cesar Philippidis <cesar@codesourcery.com>
5906
5907 PR c/64765
5908 PR c/64880
5909 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
5910 parameters, and handle these. Adjust all users.
5911 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
5912 into...
5913 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
5914 all users.
5915 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
5916 declare functions.
5917 (c_finish_omp_construct): Declare function.
5918 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
5919 Merge functions into...
5920 (c_finish_omp_construct): ... this new function.
5921
5922 2015-10-22 Richard Biener <rguenther@suse.de>
5923
5924 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
5925 before folding a MINUS_EXPR.
5926
5927 2015-10-21 Marek Polacek <polacek@redhat.com>
5928
5929 PR c/68024
5930 * c-decl.c (start_function): Warn about vararg functions without
5931 a prototype.
5932
5933 2015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
5934
5935 * c-typeck.c (build_conditional_expr): Use boolean vector
5936 type for vector comparison.
5937 (build_vec_cmp): New.
5938 (build_binary_op): Use build_vec_cmp for comparison.
5939
5940 2015-10-20 Marek Polacek <polacek@redhat.com>
5941
5942 * c-parser.c (is_cilkplus_vector_p): Don't define here.
5943
5944 2015-10-20 Marek Polacek <polacek@redhat.com>
5945
5946 PR c/67964
5947 * c-parser.c (c_parser_attributes): Break out of the loop if the
5948 token after an attribute isn't a comma.
5949
5950 2015-10-13 Jakub Jelinek <jakub@redhat.com>
5951 Aldy Hernandez <aldyh@redhat.com>
5952
5953 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
5954 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
5955 (c_parser_omp_variable_list): Handle structure elements for
5956 map, to and from clauses. Handle array sections in reduction
5957 clause. Formatting fixes.
5958 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
5959 if clause modifiers.
5960 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
5961 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
5962 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
5963 c_parser_omp_clause_is_device_ptr): New functions.
5964 (c_parser_omp_clause_ordered): Parse optional parameter.
5965 (c_parser_omp_clause_reduction): Handle array reductions.
5966 (c_parser_omp_clause_schedule): Parse optional simd modifier.
5967 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
5968 functions.
5969 (c_parser_omp_clause_linear): Parse linear clause modifiers.
5970 (c_parser_omp_clause_depend_sink): New function.
5971 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
5972 (c_parser_omp_clause_map): Parse release/delete map kinds and
5973 optional always modifier.
5974 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
5975 and c_finish_omp_clauses callers.
5976 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
5977 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
5978 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
5979 (OMP_CRITICAL_CLAUSE_MASK): Define.
5980 (c_parser_omp_critical): Parse critical clauses.
5981 (c_parser_omp_for_loop): Handle doacross loops, adjust
5982 c_finish_omp_for and c_finish_omp_clauses callers.
5983 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
5984 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
5985 (OMP_FOR_CLAUSE_MASK): Add linear clause.
5986 (c_parser_omp_for): Disallow ordered clause when combined with
5987 distribute. Disallow linear clause when combined with distribute
5988 and not combined with simd.
5989 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
5990 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
5991 parse clauses and if depend clause is found, don't parse a body.
5992 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
5993 Allow target parallel without for after it.
5994 (OMP_TASK_CLAUSE_MASK): Add priority clause.
5995 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
5996 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
5997 invalid kinds.
5998 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
5999 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
6000 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
6001 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
6002 functions.
6003 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
6004 defaultmap and is_device_ptr clauses.
6005 (c_parser_omp_target): Parse target parallel and target simd. Set
6006 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
6007 and target exit data. Diagnose invalid map kinds.
6008 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
6009 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
6010 construct.
6011 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
6012 &omp_priv.
6013 (OMP_TASKLOOP_CLAUSE_MASK): Define.
6014 (c_parser_omp_taskloop): New function.
6015 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
6016 handle PRAGMA_OMP_TASKLOOP.
6017 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
6018 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
6019 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
6020 Add IS_OMP argument, handle structure element bases, diagnose
6021 bitfields, pass IS_OMP recursively, diagnose known zero length
6022 array sections in depend clauses, handle array sections in reduction
6023 clause, diagnose negative length even for pointers.
6024 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
6025 types, pass IS_OMP down to handle_omp_array_sections_1, handle
6026 array sections in reduction clause, set
6027 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
6028 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
6029 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
6030 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
6031
6032 2015-10-06 Marek Polacek <polacek@redhat.com>
6033
6034 * c-parser.c (c_parser_statement_after_labels): Use
6035 protected_set_expr_location.
6036 (c_parser_omp_clause_num_gangs): Likewise.
6037 (c_parser_omp_clause_num_threads): Likewise.
6038 (c_parser_omp_clause_num_workers): Likewise.
6039 (c_parser_omp_clause_vector_length): Likewise.
6040 (c_parser_omp_clause_num_teams): Likewise.
6041 (c_parser_omp_clause_thread_limit): Likewise.
6042 * c-typeck.c (build_c_cast): Likewise.
6043 (c_cast_expr): Likewise.
6044
6045 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6046
6047 * c-typeck.c (c_tree_equal): Use real_equal instead of
6048 REAL_VALUES_EQUAL.
6049
6050 2015-10-04 Jason Merrill <jason@redhat.com>
6051
6052 * c-parser.c (c_lex_one_token): Handle @synchronized.
6053 * c-decl.c (match_builtin_function_types): A declaration of a built-in
6054 can change whether the function is transaction_safe.
6055
6056 2015-10-02 Marek Polacek <polacek@redhat.com>
6057
6058 PR c/67730
6059 * c-typeck.c (convert_for_assignment): Use the expansion point
6060 location throughout.
6061
6062 2015-10-02 Marek Polacek <polacek@redhat.com>
6063
6064 PR c/64249
6065 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
6066 and pass it down to c_parser_if_statement.
6067 (c_parser_else_body): Add CHAIN parameter and pass it down to
6068 c_parser_statement_after_labels.
6069 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
6070 duplicated if-else-if conditions.
6071
6072 2015-10-01 Marek Polacek <polacek@redhat.com>
6073
6074 * c-typeck.c (convert_for_assignment): Improve commentary.
6075
6076 2015-09-30 Marek Polacek <polacek@redhat.com>
6077
6078 PR c/67730
6079 * c-typeck.c (c_finish_return): Use the expansion point location for
6080 certain "return with value" warnings.
6081
6082 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6083
6084 * c-parser.c (pragma_lex): Add loc argument.
6085
6086 2015-09-15 Marek Polacek <polacek@redhat.com>
6087
6088 PR c/67580
6089 * c-decl.c (tag_exists_p): New function.
6090 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
6091 struct/union/enum keywords are missing.
6092 * c-tree.h (tag_exists_p): Declare.
6093
6094 2015-09-15 Marek Polacek <polacek@redhat.com>
6095
6096 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
6097 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
6098 Return NULL_TREE instead of 0.
6099 (lookup_name): Return NULL_TREE instead of 0.
6100 (lookup_name_in_scope): Likewise.
6101 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
6102 (parser_xref_tag): Use false instead of 0.
6103 (start_struct): Use true instead of 1.
6104 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
6105
6106 2015-09-14 Marek Polacek <polacek@redhat.com>
6107
6108 * c-typeck.c (set_nonincremental_init_from_string): Use
6109 HOST_WIDE_INT_M1U when shifting a negative value.
6110
6111 2015-09-09 Mark Wielaard <mjw@redhat.com>
6112
6113 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
6114 parm against NULL.
6115
6116 2015-09-10 Jakub Jelinek <jakub@redhat.com>
6117
6118 PR c/67502
6119 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
6120 into OMP_FOR_PRE_BODY rather than before the loop.
6121
6122 2015-09-09 Jakub Jelinek <jakub@redhat.com>
6123
6124 PR c/67501
6125 * c-parser.c (c_parser_oacc_all_clauses,
6126 c_parser_omp_all_clauses): Remove invalid clause from
6127 list of clauses even if parser->error is set.
6128
6129 PR c/67500
6130 * c-parser.c (c_parser_omp_clause_aligned,
6131 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
6132 test for errors.
6133 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
6134 error_mark_node.
6135
6136 PR c/67495
6137 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
6138 instead of c_parser_unary_expression. If the result is !lvalue_p,
6139 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
6140
6141 2015-09-04 Marek Polacek <polacek@redhat.com>
6142
6143 PR sanitizer/67279
6144 * c-typeck.c (build_binary_op): Don't instrument static initializers.
6145
6146 2015-09-03 Martin Sebor <msebor@redhat.com>
6147
6148 PR c/66516
6149 * c-typeck.c (convert_arguments, parser_build_unary_op,
6150 build_conditional_expr, c_cast_expr, convert_for_assignment,
6151 build_binary_op, _objc_common_truthvalue_conversion): Call
6152 reject_gcc_builtin.
6153 (c_decl_implicit): Define.
6154
6155 2015-09-02 Marek Polacek <polacek@redhat.com>
6156
6157 PR c/67432
6158 * c-parser.c (c_parser_enum_specifier): Give a better error for
6159 an empty enum.
6160
6161 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6162
6163 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
6164
6165 2015-08-12 Marek Polacek <polacek@redhat.com>
6166
6167 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
6168 LOC to it.
6169
6170 2015-08-03 Marek Polacek <polacek@redhat.com>
6171
6172 PR c/67088
6173 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
6174 Use it.
6175 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
6176
6177 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6178
6179 * c-parser.c (c_parser_if_body): Take token_indent_info
6180 argument. Call warn_for_misleading_indentation even when the
6181 body is a semicolon. Extract token_indent_infos corresponding
6182 to the guard, body and next tokens. Adjust call to
6183 warn_for_misleading_indentation accordingly.
6184 (c_parser_else_body): Likewise.
6185 (c_parser_if_statement): Likewise.
6186 (c_parser_while_statement): Likewise.
6187 (c_parser_for_statement): Likewise.
6188
6189 2015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
6190 Manuel López-Ibáñez <manu@gcc.gnu.org>
6191
6192 * c-decl.c (get_parm_info): Remove static var. Update warning
6193 message.
6194
6195 2015-07-27 Marek Polacek <polacek@redhat.com>
6196
6197 PR c++/66555
6198 PR c/54979
6199 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
6200
6201 2015-07-20 Marek Polacek <polacek@redhat.com>
6202
6203 PR c++/55095
6204 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
6205 (build_binary_op): Warn about left shift overflows.
6206
6207 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
6208
6209 * c-array-notation.c: Adjust includes for flags.h changes.
6210 * c-objc-common.c: Likewise.
6211
6212 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
6213
6214 * c-array-notation.c: Adjust includes.
6215 * c-aux-info.c: Likewise.
6216 * c-convert.c: Likewise.
6217 * c-decl.c: Likewise.
6218 * c-errors.c: Likewise.
6219 * c-lang.c: Likewise.
6220 * c-objc-common.c: Likewise.
6221 * c-parser.c: Likewise.
6222 * c-typeck.c: Likewise.
6223
6224 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6225
6226 PR fortran/66605
6227 * c-decl.c (finish_function): Call do_warn_unused_parameter.
6228
6229 2015-06-29 Marek Polacek <polacek@redhat.com>
6230
6231 PR c/66322
6232 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
6233 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
6234 about -Wswitch-bool here.
6235 (do_case): Update c_add_case_label call.
6236 (c_finish_case): Update c_do_switch_warnings call.
6237
6238 2015-06-27 Marek Polacek <polacek@redhat.com>
6239
6240 * c-typeck.c: Use VECTOR_TYPE_P throughout.
6241
6242 2015-06-26 Marek Polacek <polacek@redhat.com>
6243
6244 * c-array-notation.c (fix_builtin_array_notation_fn): Use
6245 INDIRECT_REF_P.
6246 * c-typeck.c (array_to_pointer_conversion): Likewise.
6247 (build_unary_op): Likewise.
6248 (c_finish_return): Likewise.
6249
6250 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
6251
6252 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
6253 * c-parser.c: Likewise.
6254
6255 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6256
6257 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
6258 instead of pointer_hash.
6259 (detect_field_duplicates): Likewise.
6260
6261 2015-06-25 Marek Polacek <polacek@redhat.com>
6262
6263 * c-array-notation.c: Use VAR_P throughout.
6264 * c-decl.c: Likewise.
6265 * c-objc-common.c: Likewise.
6266 * c-parser.c: Likewise.
6267 * c-typeck.c: Likewise.
6268
6269 2015-06-25 Marek Polacek <polacek@redhat.com>
6270
6271 * c-decl.c: Use is_global_var throughout.
6272 * c-parser.c: Likewise.
6273 * c-typeck.c: Likewise.
6274
6275 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
6276
6277 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
6278 * c-aux-info.c: Likewise.
6279 * c-convert.c: Likewise.
6280 * c-decl.c: Likewise.
6281 * c-errors.c: Likewise.
6282 * c-lang.c: Likewise.
6283 * c-objc-common.c: Likewise.
6284 * c-parser.c: Likewise.
6285 * c-typeck.c: Likewise.
6286
6287 2015-06-11 Jan Hubicka <hubicka@ucw.cz>
6288
6289 PR middle-end/66325
6290 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
6291 variants.
6292
6293 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
6294
6295 * c-decl.c (pop_scope): Register the main translation unit
6296 through the new debug hook.
6297
6298 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
6299
6300 * c-array-notation.c : Adjust include files.
6301 * c-aux-info.c : Likewise.
6302 * c-convert.c : Likewise.
6303 * c-decl.c : Likewise.
6304 * c-errors.c : Likewise.
6305 * c-lang.c : Likewise.
6306 * c-lang.h : Likewise.
6307 * c-objc-common.c : Likewise.
6308 * c-parser.c : Likewise.
6309 * c-typeck.c : Likewise.
6310
6311 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
6312
6313 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
6314 immediately clobber it.
6315 (c_write_global_declarations_1): Remove call to
6316 check_global_declaration_1.
6317 (c_write_global_declarations_2): Remove.
6318 (c_write_final_cleanups): Rename from c_write_global_declarations.
6319 Remove call to finalize_compilation_unit.
6320 Remove calls to debugging hooks.
6321 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
6322 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
6323 * c-tree.h: Remove c_write_global_declarations.
6324
6325 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
6326
6327 * c-array-notation.c: Adjust includes for restructured coretypes.h.
6328 * c-aux-info.c: Likewise.
6329 * c-convert.c: Likewise.
6330 * c-decl.c: Likewise.
6331 * c-errors.c: Likewise.
6332 * c-lang.c: Likewise.
6333 * c-objc-common.c: Likewise.
6334 * c-parser.c: Likewise.
6335 * c-typeck.c: Likewise.
6336
6337 2015-06-04 Marek Polacek <polacek@redhat.com>
6338
6339 PR c/66341
6340 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
6341 it is a lvalue.
6342
6343 2015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6344
6345 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
6346 Warn for empty struct.
6347 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
6348
6349 2015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
6350
6351 * c-decl.c (start_function): Call plugin before parsing.
6352 (finish_function): Call plugin after parsing.
6353
6354 2015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6355
6356 PR c/49551
6357 * c-decl.c (merge_decls): Merge DECL_COMMON.
6358
6359 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
6360
6361 * Make-lang.in (check_gcc_pallelize): Define.
6362
6363 2015-05-22 Marek Polacek <polacek@redhat.com>
6364
6365 PR c/47043
6366 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
6367 attributes.
6368
6369 2015-05-21 Marek Polacek <polacek@redhat.com>
6370
6371 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
6372 DECL_BUILT_IN.
6373
6374 2015-05-20 Marek Polacek <polacek@redhat.com>
6375
6376 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6377 * c-typeck.c: Likewise.
6378
6379 2015-05-19 Marek Polacek <polacek@redhat.com>
6380
6381 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
6382
6383 2015-05-19 Jakub Jelinek <jakub@redhat.com>
6384
6385 PR middle-end/66199
6386 * c-parser.c (c_parser_omp_for_loop): Don't add
6387 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
6388 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
6389 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
6390 constructs.
6391
6392 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6393
6394 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
6395 swaps.
6396
6397 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6398
6399 PR fortran/44054
6400 * c-objc-common.c (c_tree_printer): Replace locus pointer with
6401 accessor function.
6402
6403 2015-05-14 Marek Polacek <polacek@redhat.com>
6404
6405 PR c/66066
6406 PR c/66127
6407 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
6408 rather than with 0.
6409
6410 2015-05-12 David Malcolm <dmalcolm@redhat.com>
6411
6412 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
6413 to add a call to warn_for_misleading_indentation.
6414 (c_parser_else_body): Likewise, adding param "else_loc".
6415 (c_parser_if_statement): Check for misleading indentation.
6416 (c_parser_while_statement): Likewise.
6417 (c_parser_for_statement): Likewise.
6418
6419 2015-05-08 Marek Polacek <polacek@redhat.com>
6420
6421 PR c/64918
6422 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
6423 (output_init_element): Likewise.
6424
6425 2015-05-07 Marek Polacek <polacek@redhat.com>
6426
6427 PR c/65179
6428 * c-typeck.c (build_binary_op): Warn when left shifting a negative
6429 value.
6430
6431 2015-04-30 Marek Polacek <polacek@redhat.com>
6432
6433 * c-typeck.c (set_init_label): Call error_at instead of error and
6434 pass LOC to it.
6435
6436 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
6437 the type of a decl.
6438
6439 * c-typeck.c (c_build_va_arg): Clarify the error message.
6440
6441 2015-04-29 Thomas Schwinge <thomas@codesourcery.com>
6442
6443 * c-parser.c (c_parser_oacc_enter_exit_data): Use
6444 OMP_STANDALONE_CLAUSES.
6445
6446 2015-04-28 Marek Polacek <polacek@redhat.com>
6447
6448 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
6449
6450 2015-04-28 Marek Polacek <polacek@redhat.com>
6451
6452 PR c/65901
6453 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
6454
6455 2015-04-25 Marek Polacek <polacek@redhat.com>
6456
6457 PR c/52085
6458 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
6459 attribute.
6460
6461 2015-04-23 Marek Polacek <polacek@redhat.com>
6462
6463 PR c/65345
6464 * c-decl.c (set_labels_context_r): New function.
6465 (store_parm_decls): Call it via walk_tree_without_duplicates.
6466 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
6467 instead of create_tmp_var. Build TARGET_EXPR instead of
6468 COMPOUND_EXPR.
6469 (build_atomic_assign): Use create_tmp_var_raw instead of
6470 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
6471
6472 2015-04-20 Ilya Verbin <ilya.verbin@intel.com>
6473
6474 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
6475 (c_parser_omp_target_update): Add missed %> to error_at ().
6476
6477 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6478
6479 PR target/55143
6480 * c-decl.c (c_default_pointer_mode): Remove definition.
6481 * c-tree.h (c_default_pointer_mode): Remove declaration.
6482
6483 2015-03-27 Tobias Burnus <burnus@net-b.de>
6484
6485 PR c/65586
6486 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
6487 error out.
6488 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
6489 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
6490 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
6491
6492 2015-03-19 Jakub Jelinek <jakub@redhat.com>
6493
6494 * c-decl.c (c_decl_attributes): Also add "omp declare target"
6495 attribute for DECL_EXTERNAL VAR_DECLs.
6496
6497 2015-03-11 Jakub Jelinek <jakub@redhat.com>
6498
6499 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
6500 argument.
6501
6502 2015-03-10 Jakub Jelinek <jakub@redhat.com>
6503
6504 PR c/65120
6505 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
6506 before preparing arguments to warn_logical_not_parentheses.
6507
6508 2015-03-09 Jakub Jelinek <jakub@redhat.com>
6509
6510 PR c/65120
6511 * c-typeck.c (parser_build_binary_op): Don't warn for
6512 !!x == y or !b == y where b is _Bool.
6513
6514 2015-03-09 Marek Polacek <polacek@redhat.com>
6515
6516 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
6517 * c-decl.c (grokdeclarator): Likewise.
6518 * c-typeck.c (build_binary_op): Likewise.
6519
6520 2015-02-27 Marek Polacek <polacek@redhat.com>
6521
6522 PR c/65228
6523 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
6524
6525 2015-02-14 Marek Polacek <polacek@redhat.com>
6526
6527 PR c/64768
6528 * c-decl.c (grokdeclarator): Set the range of a flexible array member
6529 declared through a typedef name.
6530
6531 2015-02-13 Marek Polacek <polacek@redhat.com>
6532
6533 PR c/65050
6534 * c-decl.c (grokdeclarator): Print also the type when giving
6535 the error message about array's incomplete element type.
6536
6537 2015-02-11 Jakub Jelinek <jakub@redhat.com>
6538
6539 PR c/64824
6540 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
6541 check in the POP macro.
6542
6543 2015-02-09 Marek Polacek <polacek@redhat.com>
6544
6545 PR c/64856
6546 * c-typeck.c (process_init_element): Don't always wrap
6547 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
6548 initializing a range of elements.
6549
6550 2015-02-04 Jakub Jelinek <jakub@redhat.com>
6551
6552 PR c/64824
6553 PR c/64868
6554 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
6555
6556 2015-02-02 Bruno Loff <bruno.loff@gmail.com>
6557
6558 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
6559 processing enum declaration.
6560
6561 2015-01-29 Marek Polacek <polacek@redhat.com>
6562
6563 PR c/64709
6564 * c-typeck.c (pop_init_level): If constructor_elements has
6565 exactly one element with integer_zerop value, set constructor_zeroinit
6566 to 1. Remove braces around warning_init call.
6567
6568 2015-01-27 Jakub Jelinek <jakub@redhat.com>
6569
6570 PR c/64766
6571 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
6572 of FUNCTION_DECLs with error_mark_node.
6573
6574 2015-01-26 Jakub Jelinek <jakub@redhat.com>
6575
6576 PR c/64778
6577 * c-typeck.c (convert_arguments): Return -1 if there are
6578 error_args, even if we've diagnosed too many arguments.
6579
6580 2015-01-21 Richard Biener <rguenther@suse.de>
6581
6582 PR middle-end/64313
6583 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
6584 for builtins the user declared correctly.
6585
6586 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6587 Bernd Schmidt <bernds@codesourcery.com>
6588 Cesar Philippidis <cesar@codesourcery.com>
6589 James Norris <jnorris@codesourcery.com>
6590 Jakub Jelinek <jakub@redhat.com>
6591 Ilmir Usmanov <i.usmanov@samsung.com>
6592
6593 * c-parser.c: Include "gomp-constants.h".
6594 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
6595 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
6596 Use OMP_CLAUSE_SET_MAP_KIND.
6597 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
6598 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
6599 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
6600 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
6601 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
6602 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
6603 "copyout", "create", "delete", "deviceptr", "gang", "host",
6604 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
6605 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
6606 "present_or_create", "pcreate", "seq", "self", "vector",
6607 "vector_length", "wait", "worker".
6608 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
6609 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
6610 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
6611 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
6612 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
6613 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
6614 (c_parser_oacc_data_clause_deviceptr)
6615 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
6616 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
6617 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
6618 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
6619 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
6620 (c_parser_oacc_parallel, c_parser_oacc_update)
6621 (c_parser_oacc_wait): New functions.
6622 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
6623 (c_finish_oacc_data): New prototypes.
6624 * c-typeck.c: Include "gomp-constants.h".
6625 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
6626 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
6627 OMP_CLAUSE_SET_MAP_KIND.
6628 (c_finish_oacc_parallel, c_finish_oacc_kernels)
6629 (c_finish_oacc_data): New functions.
6630 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
6631 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
6632 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
6633 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
6634 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
6635 GOMP_MAP_FORCE_DEVICEPTR.
6636
6637 2015-01-09 Michael Collison <michael.collison@linaro.org>
6638
6639 * c-array-notation.c: Include hash-set.h, machmode.h,
6640 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6641 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6642 * c-aux-info.c: Ditto.
6643 * c-convert.c: Ditto.
6644 * c-decl.c: Ditto.
6645 * c-errors.c: Ditto.
6646 * c-lang.c: Dittoxs.
6647 * c-objc-common.c: Ditto.
6648 * c-parser.c: Ditto.
6649 * c-typeck.c: Include hash-set.h, machmode.h,
6650 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6651 fold-const.h, wide-int.h, inchash.h, real.h and
6652 fixed-value.h due to flattening of tree.h.
6653
6654 2015-01-07 Marek Polacek <polacek@redhat.com>
6655
6656 PR c/64417
6657 * c-typeck.c (process_init_element): Disallow initialization of
6658 a flexible array member with a string constant if the structure
6659 is in an array.
6660
6661 2015-01-05 Jakub Jelinek <jakub@redhat.com>
6662
6663 PR sanitizer/64344
6664 * c-typeck.c (convert_for_assignment, c_finish_return): For
6665 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
6666 types also set in_late_binary_op around convert call.
6667 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
6668 to integral type casts, if not in_late_binary_op, pass c_fully_fold
6669 result on expr as last argument to ubsan_instrument_float_cast,
6670 if in_late_binary_op, don't use c_save_expr but save_expr.
6671
6672 Update copyright years.
6673
6674 2015-01-05 Marek Polacek <polacek@redhat.com>
6675
6676 PR c/64423
6677 * c-typeck.c (build_array_ref): Pass loc down to
6678 warn_array_subscript_with_type_char.
6679
6680 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
6681
6682 * c-typeck.c: New behavious for pointers to arrays with qualifiers
6683 (common-pointer-type): For pointers to arrays take qualifiers from
6684 element type.
6685 (build_conditional_expr): Add warnings for lost qualifiers.
6686 (comp-target-types): Allow pointers to arrays with different qualifiers.
6687 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
6688 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
6689 to PEDWARN_FOR_QUALIFIERS.
6690
6691 2014-12-17 Jakub Jelinek <jakub@redhat.com>
6692
6693 PR sanitizer/64289
6694 * c-convert.c: Include ubsan.h.
6695 (convert): For real -> integral casts and
6696 -fsanitize=float-cast-overflow don't call convert_to_integer, but
6697 instead instrument the float cast directly.
6698
6699 2014-11-29 Jakub Jelinek <jakub@redhat.com>
6700
6701 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
6702 c_finish_stmt_expr): Remove NULL last argument from
6703 create_tmp_var_raw and create_tmp_var calls.
6704 * c-array-notation.c (fix_builtin_array_notation_fn,
6705 build_array_notation_expr, fix_conditional_array_notations_1,
6706 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
6707
6708 2014-11-28 Marek Polacek <polacek@redhat.com>
6709
6710 PR c/63862
6711 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
6712 convert the right operand to integer type.
6713
6714 2014-11-25 Marek Polacek <polacek@redhat.com>
6715
6716 PR c/63877
6717 * c-decl.c (start_function): Disable -Wmissing-declarations warning
6718 for inline functions.
6719
6720 2014-11-21 Jakub Jelinek <jakub@redhat.com>
6721
6722 PR target/63764
6723 * c-typeck.c (build_array_ref): Adjust
6724 convert_vector_to_pointer_for_subscript caller. If it returns true,
6725 call non_lvalue_loc on the result.
6726
6727 2014-11-11 Richard Biener <rguenther@suse.de>
6728
6729 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
6730 to true.
6731
6732 2014-11-10 Andi Kleen <ak@linux.intel.com>
6733
6734 PR c/60804
6735 * c-parser.c (c_parser_statement_after_labels): Call
6736 check_no_cilk.
6737 (c_parser_if_statement): Dito.
6738 (c_parser_switch_statement): Dito.
6739 (c_parser_while_statement): Dito.
6740 (c_parser_do_statement): Dito.
6741 (c_parser_for_statement): Dito.
6742 * c-typeck.c (c_finish_loop): Dito.
6743
6744 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6745
6746 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
6747 OPT_Wshift_count_overflow in the warnings.
6748
6749 2014-10-30 Marek Polacek <polacek@redhat.com>
6750
6751 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
6752 print the stripped version as well, if they're not the same.
6753
6754 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6755
6756 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
6757 machine_mode.
6758
6759 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
6760
6761 * c-decl.c: Adjust include files.
6762 * c-parser.c: Ditto.
6763
6764 2014-10-27 Phil Muldoon <pmuldoon@redhat.com>
6765 Tom Tromey <tromey@redhat.com>
6766
6767 * c-tree.h (enum c_oracle_request): New.
6768 (c_binding_oracle_function): New typedef.
6769 (c_binding_oracle, c_pushtag, c_bind): Declare.
6770 * c-decl.c (c_binding_oracle): New global.
6771 (I_SYMBOL_CHECKED): New macro.
6772 (i_symbol_binding): New function.
6773 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
6774 (I_TAG_CHECKED): New macro.
6775 (i_tag_binding): New function.
6776 (I_TAG_BINDING, I_TAG_DECL): Redefine.
6777 (I_LABEL_CHECKED): New macro.
6778 (i_label_binding): New function.
6779 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
6780 (c_print_identifier): Save and restore c_binding_oracle.
6781 (c_pushtag, c_bind): New functions.
6782
6783 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
6784
6785 * c-typeck.c: Adjust include files.
6786
6787 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6788
6789 PR c++/53061
6790 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
6791 initialization here...
6792 (c_initialize_diagnostics): ... but here. Set defaults after
6793 building pretty-printer.
6794
6795 2014-10-23 Marek Polacek <polacek@redhat.com>
6796
6797 PR c/63626
6798 * c-decl.c (pop_scope): Don't print warning in external_scope.
6799
6800 2014-10-19 Marek Polacek <polacek@redhat.com>
6801
6802 PR c/63567
6803 * c-typeck.c (output_init_element): Allow initializing objects with
6804 static storage duration with compound literals even in C99 and add
6805 pedwarn for it.
6806
6807 2014-10-17 Marek Polacek <polacek@redhat.com>
6808
6809 PR c/63567
6810 * c-typeck.c (digest_init): Allow initializing objects with static
6811 storage duration with compound literals even in C99 and add pedwarn
6812 for it.
6813
6814 2014-10-17 Marek Polacek <polacek@redhat.com>
6815
6816 PR c/63543
6817 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
6818 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
6819 error multiple times. Print the type.
6820
6821 2014-10-17 Marek Polacek <polacek@redhat.com>
6822
6823 PR c/63549
6824 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
6825 type.
6826
6827 2014-10-17 Marek Polacek <polacek@redhat.com>
6828
6829 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
6830 (start_function): Use OPT_Wimplicit_int instead of 0.
6831 (store_parm_decls_oldstyle): Likewise.
6832
6833 2014-10-17 Alan Modra <amodra@gmail.com>
6834
6835 PR middle-end/61848
6836 * c-decl.c (merge_decls): Don't merge section name or tls model
6837 to newdecl symtab node, instead merge to olddecl. Override
6838 existing olddecl section name. Set tls_model for all thread-local
6839 vars, not just OMP thread-private ones. Remove incorrect comment.
6840
6841 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
6842
6843 * c-decl.c: Adjust include files.
6844
6845 2014-10-14 DJ Delorie <dj@redhat.com>
6846
6847 * c-parser.c (c_parse_init): Add RID entries for each __intN.
6848 (c_token_starts_typename): Check all __intN, not just __int128.
6849 (c_token_starts_declspecs): Likewise.
6850 (c_parser_declspecs): Likewise.
6851 (c_parser_attribute_any_word): Likewise.
6852 (c_parser_objc_selector): Likewise.
6853 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
6854 (struct c_declspecs): Add int_n_idx field to record *which* __intN
6855 is specified.
6856 * c-decl.c (declspecs_add_type): Check for all __intN, not just
6857 __int128.
6858 (finish_declspecs): Likewise.
6859
6860 2014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
6861
6862 * c-parser.c (c_parser_all_labels): New function to replace
6863 the duplicate code.
6864 (c_parser_statement): Call the new function.
6865
6866 2014-10-09 Marek Polacek <polacek@redhat.com>
6867
6868 PR c/63480
6869 * c-typeck.c (pop_init_level): Don't warn about initializing
6870 with { }.
6871
6872 2014-10-07 Marek Polacek <polacek@redhat.com>
6873
6874 PR c/59717
6875 * c-decl.c (header_for_builtin_fn): New function.
6876 (implicitly_declare): Suggest which header to include.
6877
6878 2014-10-07 Marek Polacek <polacek@redhat.com>
6879
6880 * c-convert.c (convert): Use error_operand_p.
6881 * c-typeck.c (require_complete_type): Likewise.
6882 (really_atomic_lvalue): Likewise.
6883 (digest_init): Likewise.
6884 (handle_omp_array_sections_1): Likewise.
6885
6886 2014-10-03 Marek Polacek <polacek@redhat.com>
6887
6888 PR c/63453
6889 * c-decl.c (pop_scope): Don't warn about "inline function declared
6890 but never defined" for functions marked with gnu_inline attribute.
6891
6892 2014-09-25 Jakub Jelinek <jakub@redhat.com>
6893
6894 PR c++/63249
6895 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
6896 on low_bound and length.
6897
6898 2014-09-24 Marek Polacek <polacek@redhat.com>
6899
6900 PR c/61405
6901 PR c/53874
6902 * c-parser.c: Don't define CPP_KEYWORD.
6903 (c_parser_switch_statement): Pass original type to c_finish_case.
6904 * c-tree.h (c_finish_case): Update declaration.
6905 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
6906 conditionally to c_do_switch_warnings.
6907
6908 2014-09-03 Marek Polacek <polacek@redhat.com>
6909
6910 PR c/62024
6911 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
6912 conversions.
6913
6914 2014-09-02 Jakub Jelinek <jakub@redhat.com>
6915 Balaji V. Iyer <balaji.v.iyer@intel.com>
6916 Igor Zamyatin <igor.zamyatin@intel.com>
6917
6918 * c-parser.c (c_parser_cilk_for): New function.
6919 (c_parser_cilk_grainsize): Likewise.
6920 (c_get_temp_regvar): Likewise.
6921 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
6922 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
6923 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
6924 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
6925 case.
6926
6927 2014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
6928
6929 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
6930 with using HOST_WIDE_INT without truncation to 'int'
6931
6932 2014-08-22 Marek Polacek <polacek@redhat.com>
6933
6934 PR c++/62199
6935 * c-typeck.c (parser_build_binary_op): Adjust call to
6936 warn_logical_not_parentheses.
6937
6938 2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
6939
6940 PR other/62008
6941 * c-parser.c (c_parser_array_notation): Check for correct
6942 type of an array added.
6943
6944 2014-08-19 Marek Polacek <polacek@redhat.com>
6945
6946 PR c++/62153
6947 * c-typeck.c (build_binary_op): If either operand of a comparison
6948 is a boolean expression, call maybe_warn_bool_compare.
6949
6950 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
6951
6952 PR c/45584
6953 * c-typeck.c (build_c_cast): Do a conversion even when the
6954 TYPE_MAIN_VARIANTs are the same.
6955
6956 2014-08-19 Marek Polacek <polacek@redhat.com>
6957
6958 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
6959 pedwarn_c99 instead of pedwarn.
6960 (grokfield): Likewise.
6961 (warn_defaults_to): New function.
6962 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
6963 Unconditionally call pedwarn_c99 instead of pedwarn.
6964 (start_function): Call warn_defaults_to instead of pedwarn_c99.
6965 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
6966 check flag_isoc11 before.
6967 * c-errors.c (pedwarn_c99): Change the return type to bool.
6968 Handle -Wc99-c11-compat.
6969 * c-parser.c (disable_extension_diagnostics): Handle
6970 warn_c99_c11_compat.
6971 (restore_extension_diagnostics): Likewise.
6972 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
6973 instead of pedwarn, don't check flag_isoc11 before.
6974 (c_parser_declspecs): Likewise.
6975 (c_parser_alignas_specifier): Likewise.
6976 (c_parser_alignof_expression): Likewise.
6977 (c_parser_generic_selection): Likewise.
6978 * c-tree.h (pedwarn_c99): Update declaration.
6979 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
6980 of pedwarn_c99.
6981
6982 2014-08-19 Marek Polacek <polacek@redhat.com>
6983
6984 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
6985 to pedwarn_c90.
6986 * c-errors.c: Include "opts.h".
6987 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
6988 * c-parser.c (disable_extension_diagnostics): Handle negative value
6989 of warn_c90_c99_compat, too.
6990 (restore_extension_diagnostics): Likewise.
6991 (c_parser_compound_statement_nostart): Pass
6992 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
6993
6994 2014-08-12 Marek Polacek <polacek@redhat.com>
6995
6996 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
6997 Add pedwarn.
6998 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
6999 Likewise.
7000 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
7001
7002 2014-08-10 Marek Polacek <polacek@redhat.com>
7003
7004 PR c/51849
7005 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
7006 Call pedwarn_c90 instead of pedwarn.
7007 (check_bitfield_type_and_width): Likewise.
7008 (declspecs_add_qual): Likewise.
7009 (declspecs_add_type): Likewise.
7010 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
7011 Adjust to only call pedwarn_c90.
7012 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
7013 pedwarn_c90 instead of pedwarn.
7014 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
7015 * c-parser.c (disable_extension_diagnostics): Handle
7016 warn_c90_c99_compat.
7017 (restore_extension_diagnostics): Likewise.
7018 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
7019 pedwarn_c90 instead of pedwarn.
7020 (c_parser_initelt): Likewise.
7021 (c_parser_postfix_expression): Likewise.
7022 (c_parser_postfix_expression_after_paren_type): Likewise.
7023 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
7024 * c-tree.h: Fix formatting.
7025 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
7026 pedwarn_c90 instead of pedwarn.
7027
7028 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7029
7030 * c-typeck.c: Remove include of pointer-set.h.
7031
7032 2014-08-07 Marek Polacek <polacek@redhat.com>
7033
7034 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
7035
7036 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7037
7038 * c-typeck.c: Use hash_map instead of pointer_map.
7039
7040 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7041
7042 * c-decl.c: Use hash_set instead of pointer_set.
7043
7044 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7045
7046 PR middle-end/61455
7047 * c-array-notation.c (expand_array_notations): Handling
7048 of DECL_EXPR added.
7049
7050 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
7051
7052 PR c++/60517
7053 * c-typeck.c (c_finish_return): Return 0 instead of the address of
7054 a local variable.
7055
7056 2014-07-30 Tom Tromey <tromey@redhat.com>
7057
7058 * c-typeck.c (struct constructor_stack) <designator_depth>: New
7059 field.
7060 (really_start_incremental_init, push_init_level): Initialize
7061 designator_depth.
7062 (pop_init_level): Set global designator_depth.
7063 (process_init_element): Check for designated_init attribute.
7064
7065 2014-07-20 Marek Polacek <polacek@redhat.com>
7066
7067 PR c/61852
7068 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
7069 (implicitly_declare): Pass location to implicit_decl_warning.
7070
7071 2014-07-14 Jakub Jelinek <jakub@redhat.com>
7072
7073 PR middle-end/61294
7074 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
7075 If non-NULL, call c_parser_check_literal_zero.
7076 (c_parser_check_literal_zero): New function.
7077 (c_parser_postfix_expression_after_primary): Adjust
7078 c_parser_expr_list caller, handle -Wmemset-transposed-args.
7079
7080 2014-07-06 Marek Polacek <polacek@redhat.com>
7081
7082 PR c/6940
7083 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
7084 * c-tree.h (C_ARRAY_PARAMETER): Define.
7085 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
7086 function parameter.
7087
7088 2014-07-02 Jan Hubicka <hubicka@ucw.cz>
7089 Chen Gang <gang.chen.5i5j@gmail.com>
7090
7091 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
7092 releasing symbol.
7093
7094 2014-07-01 Marek Polacek <polacek@redhat.com>
7095
7096 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
7097 instead of 0 to WARN_FOR_ASSIGNMENT.
7098
7099 2014-07-01 Marek Polacek <polacek@redhat.com>
7100
7101 PR c/58286
7102 * c-typeck.c (convert_for_assignment): Pass
7103 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
7104
7105 2014-06-30 Marek Polacek <polacek@redhat.com>
7106
7107 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
7108 has no_sanitize_undefined attribute.
7109
7110 2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
7111
7112 PR middle-end/57541
7113 * c-array-notation.c (fix_builtin_array_notation_fn):
7114 Check for 0 arguments in builtin call. Check that bultin argument is
7115 correct.
7116 * c-parser.c (c_parser_array_notation): Check for incorrect initial
7117 index.
7118
7119 2014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
7120
7121 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
7122 qualifiers in __auto_type for atomic types.
7123 (c_parser_typeof_specifier): Discard all type qualifiers in
7124 __typeof__ for atomic types.
7125
7126 2014-06-25 Marek Polacek <polacek@redhat.com>
7127
7128 PR c/61162
7129 * c-parser.c (c_parser_statement_after_labels): Pass the location of
7130 the return expression to c_finish_return.
7131
7132 2014-06-25 Jakub Jelinek <jakub@redhat.com>
7133
7134 * c-typeck.c (c_finish_omp_clauses): Make sure
7135 OMP_CLAUSE_LINEAR_STEP has correct type.
7136
7137 2014-06-24 Trevor Saunders <tsaunders@mozilla.com>
7138
7139 * c-decl.c: Adjust.
7140
7141 2014-06-24 Jakub Jelinek <jakub@redhat.com>
7142
7143 * c-parser.c (c_parser_omp_for_loop): For
7144 #pragma omp parallel for simd move lastprivate clause from parallel
7145 to for rather than simd.
7146
7147 2014-06-23 Marek Polacek <polacek@redhat.com>
7148
7149 * c-typeck.c (parser_build_binary_op): Don't call
7150 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
7151
7152 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
7153
7154 * c-parser.c (c_parser_omp_threadprivate): Likewise.
7155 * c-decl.c (merge_decls): Likewise.
7156
7157 2014-06-09 Marek Polacek <polacek@redhat.com>
7158
7159 PR c/36446
7160 * c-typeck.c (error_init): Call inform instead of error_at.
7161 (pedwarn_init): Call inform instead of pedwarn.
7162 (warning_init): Call inform instead of warning_at.
7163
7164 2014-06-07 Jan Hubicka <hubicka@ucw.cz>
7165
7166 * c-decl.c (merge_decls): Use set_decl_section_name.
7167 (duplicate_decls): Remove node if it exists.
7168
7169 2014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
7170
7171 PR c/53119
7172 * c-typeck.c (push_init_level, process_init_element,
7173 pop_init_level): Correct check for zero initialization, move
7174 missing brace warning to respect zero initialization.
7175
7176 2014-06-05 Marek Polacek <polacek@redhat.com>
7177
7178 PR c/56724
7179 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
7180
7181 2014-06-05 Marek Polacek <polacek@redhat.com>
7182
7183 PR c/49706
7184 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
7185 on the left hand side operand of a comparison.
7186
7187 2014-06-05 Marek Polacek <polacek@redhat.com>
7188
7189 PR c/48062
7190 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
7191 Print note only if the warning was printed.
7192
7193 2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
7194
7195 PR c/58942
7196 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
7197 with a pointer.
7198
7199 2014-06-03 Marek Polacek <polacek@redhat.com>
7200
7201 PR c/60439
7202 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
7203 c_start_case.
7204 * c-tree.h (c_start_case): Update.
7205 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
7206 switch condition has boolean value.
7207
7208 2014-06-02 Andrew MacLeod <amacleod@redhat.com>
7209
7210 * c-decl.c: Include builtins.h.
7211 * c-parser.c: Likewise.
7212
7213 2014-05-27 Marek Polacek <polacek@redhat.com>
7214
7215 PR c/56724
7216 * c-typeck.c (convert_arguments): Get location of a parameter. Change
7217 error and warning calls to error_at and warning_at. Pass location of
7218 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
7219 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
7220 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
7221
7222 2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
7223
7224 PR c/61191
7225 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
7226 function parameters.
7227
7228 2014-05-23 Jan Hubicka <hubicka@ucw.cz>
7229
7230 * c-decl.c (merge_decls): Preserve symtab node pointers.
7231 (duplicate_decls): Free new decl.
7232
7233 2014-05-23 Thomas Schwinge <thomas@codesourcery.com>
7234
7235 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
7236 initialization.
7237
7238 * c-parser.c (c_parser_omp_target): Return bool values.
7239
7240 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7241
7242 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
7243 num_teams_loc variable to num_thread_limit_loc.
7244
7245 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7246
7247 * c-array-notation.c (expand_array_notations): Use void_node
7248 instead of void_zero_node.
7249
7250 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7251
7252 * c-decl.c (finish_struct): Adjust.
7253 (finish_enum): Likewise.
7254 (bind): Adjust.
7255 (record_inline_static): Likewise.
7256 (push_scope): Likewise.
7257 (make_label): Likewise.
7258 (lookup_label_for_goto): Likewise.
7259 (finish_struct): Likewise.
7260 (finish_enum): Likewise.
7261 (store_parm_decls): Likewise.
7262 (c_push_function_context): Likewise.
7263 * c-lang.h: Remove usage of variable_size gty attribute.
7264 * c-parser.c (c_parse_init): Adjust.
7265 (c_parse_file): Likewise.
7266
7267 2014-05-13 Marek Polacek <polacek@redhat.com>
7268
7269 PR c/61162
7270 * c-typeck.c (convert_for_assignment): Pass location to
7271 WARN_FOR_ASSIGNMENT instead of input_location.
7272
7273 2014-05-10 Marek Polacek <polacek@redhat.com>
7274
7275 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
7276 maybe_warn_string_init.
7277 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
7278 maybe_warn_string_init.
7279 * c-tree.h (maybe_warn_string_init): Update declaration.
7280 * c-typeck.c (maybe_warn_string_init): Add location parameter.
7281 Call pedwarn_init with loc instead of with input_location.
7282 (digest_init): Pass init_loc to maybe_warn_string_init.
7283 (pop_init_level): Call pedwarn_init with loc instead of with
7284 input_location.
7285 (set_init_index): Likewise.
7286 (process_init_element): Likewise.
7287
7288 2014-05-09 Marek Polacek <polacek@redhat.com>
7289
7290 PR c/61096
7291 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
7292 (c_parser_initelt): Pass location to set_init_label. Pass array index
7293 location to set_init_index.
7294 * c-tree.h (push_init_level): Update declaration.
7295 (pop_init_level): Likewise.
7296 (set_init_index): Likewise.
7297 (set_init_label): Likewise.
7298 * c-typeck.c (error_init): Add location parameter. Call error_at
7299 instead of error.
7300 (digest_init): Pass init_loc to error_init.
7301 (really_start_incremental_init):
7302 (push_init_level): Add location parameter. Pass loc to pop_init_level
7303 and error_init.
7304 (pop_init_level): Likewise.
7305 (set_designator): Add location parameter. Pass loc to pop_init_level,
7306 push_init_level, and error_init.
7307 (set_init_index): Add location parameter. Pass loc to error_init and
7308 set_designator.
7309 (set_init_label): Likewise.
7310 (output_init_element): Pass loc to error_init.
7311 (process_init_element): Pass loc to error_init, pop_init_level,
7312 pedwarn_init, and push_init_level.
7313
7314 2014-05-09 Marek Polacek <polacek@redhat.com>
7315
7316 PR c/50459
7317 * c-parser.c (c_parser_attributes): Parse the arguments as an
7318 expression-list if the attribute takes identifier.
7319
7320 2014-05-08 Marek Polacek <polacek@redhat.com>
7321
7322 PR c/61053
7323 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
7324 TYPE_ALIGN_UNIT.
7325
7326 2014-05-08 Marek Polacek <polacek@redhat.com>
7327
7328 PR c/61077
7329 * c-decl.c (start_function): Warn for _Atomic-qualified return type
7330 of main.
7331
7332 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7333 Mike Stump <mikestump@comcast.net>
7334 Richard Sandiford <rdsandiford@googlemail.com>
7335
7336 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
7337 (finish_enum): Use wide-int interfaces.
7338 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
7339 * c-typeck.c (build_c_cast): Likewise.
7340 (set_nonincremental_init_from_string): Likewise.
7341 (c_tree_equal): Likewise.
7342
7343 2014-05-02 Marek Polacek <polacek@redhat.com>
7344
7345 PR c/25801
7346 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
7347 Return size_one_node when the type is not complete.
7348 (pointer_diff): Remove comment.
7349 (build_unary_op): Improve error messages.
7350
7351 2014-05-02 Marek Polacek <polacek@redhat.com>
7352
7353 * c-typeck.c (c_finish_return): Separate warning_at calls.
7354
7355 2014-05-02 Marek Polacek <polacek@redhat.com>
7356
7357 * c-tree.h (error_init): Remove declaration.
7358 (pedwarn_init): Likewise.
7359 * c-typeck.c (error_init): Make static and move above.
7360 (pedwarn_init): Likewise.
7361 (warning_init): Move above.
7362 (maybe_warn_string_init): Likewise.
7363
7364 2014-05-01 Jeff Law <law@redhat.com>
7365
7366 Revert:
7367
7368 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7369 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
7370 avoid goto.
7371
7372 2014-05-02 Marek Polacek <polacek@redhat.com>
7373
7374 PR c/60784
7375 * c-typeck.c (push_init_level): Set constructor_designated to
7376 p->designated for structures.
7377
7378 2014-05-01 Marek Polacek <polacek@redhat.com>
7379
7380 PR c/60915
7381 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
7382 function-definition has an attribute after the declarator.
7383
7384 2014-05-01 Marek Polacek <polacek@redhat.com>
7385
7386 PR c/60257
7387 * c-typeck.c (warning_init): Add location_t parameter. Call
7388 warning_at instead of warning.
7389 (push_init_level): Pass input_location to warning_init.
7390 (add_pending_init): Add location_t parameter. Pass loc to
7391 warning_init.
7392 (set_nonincremental_init): Pass input_location to add_pending_init.
7393 (set_nonincremental_init_from_string): Likewise.
7394 (output_init_element): Pass loc to warning_init and to
7395 add_pending_init.
7396
7397 2014-05-01 Marek Polacek <polacek@redhat.com>
7398
7399 PR c/43395
7400 * c-typeck.c (c_finish_return): Distinguish between label and variable
7401 when warning about returning local address.
7402
7403 2014-05-01 Marek Polacek <polacek@redhat.com>
7404
7405 PR c/29467
7406 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
7407 in C89 mode.
7408
7409 2014-05-01 Marek Polacek <polacek@redhat.com>
7410
7411 PR c/43245
7412 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
7413 instead of 0 to WARN_FOR_QUALIFIERS.
7414
7415 2014-05-01 Marek Polacek <polacek@redhat.com>
7416
7417 PR c/56989
7418 * c-typeck.c (default_conversion): Use better location for
7419 error call.
7420
7421 2014-04-30 Marek Polacek <polacek@redhat.com>
7422
7423 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
7424 also when SANITIZE_FLOAT_DIVIDE is on.
7425
7426 2014-04-30 Marek Polacek <polacek@redhat.com>
7427
7428 PR c/60139
7429 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
7430 and pedwarn_init. Use loc insted of input_location.
7431
7432 2014-04-30 Marek Polacek <polacek@redhat.com>
7433
7434 PR c/60351
7435 * c-typeck.c (build_binary_op): Use location when warning about
7436 shift count.
7437
7438 2014-04-25 Marek Polacek <polacek@redhat.com>
7439
7440 PR c/18079
7441 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
7442 always_inline/noinline and hot/cold attributes.
7443
7444 2014-04-25 Marek Polacek <polacek@redhat.com>
7445
7446 PR c/60114
7447 * c-parser.c (c_parser_initelt): Pass input_location to
7448 process_init_element.
7449 (c_parser_initval): Pass loc to process_init_element.
7450 * c-tree.h (process_init_element): Adjust declaration.
7451 * c-typeck.c (push_init_level): Pass input_location to
7452 process_init_element.
7453 (pop_init_level): Likewise.
7454 (set_designator): Likewise.
7455 (output_init_element): Add location_t parameter. Pass loc to
7456 digest_init.
7457 (output_pending_init_elements): Pass input_location to
7458 output_init_element.
7459 (process_init_element): Add location_t parameter. Pass loc to
7460 output_init_element.
7461
7462 2014-04-24 Jakub Jelinek <jakub@redhat.com>
7463
7464 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
7465 atomic-clause, allow comma in between atomic-clause and
7466 seq_cst.
7467
7468 2014-04-22 Jakub Jelinek <jakub@redhat.com>
7469
7470 PR c/59073
7471 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
7472 fails, don't set OM_PARALLEL_COMBINED and return NULL.
7473
7474 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7475
7476 PR middle-end/60469
7477 * c-array-notation.c (fix_builtin_array_notation_fn): Use
7478 create_tmp_var instead build_decl for creating temps.
7479 (build_array_notation_expr): Likewise.
7480 (fix_conditional_array_notations_1): Likewise.
7481 (fix_array_notation_expr): Likewise.
7482 (fix_array_notation_call_expr): Likewise.
7483
7484 2014-03-28 Jakub Jelinek <jakub@redhat.com>
7485
7486 PR c++/60689
7487 * c-tree.h (c_build_function_call_vec): New prototype.
7488 * c-typeck.c (build_function_call_vec): Don't call
7489 resolve_overloaded_builtin here.
7490 (c_build_function_call_vec): New wrapper function around
7491 build_function_call_vec. Call resolve_overloaded_builtin here.
7492 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
7493 Call c_build_function_call_vec instead of build_function_call_vec.
7494 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
7495 * c-decl.c (finish_decl): Likewise.
7496
7497 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
7498
7499 PR c/55383
7500 * c-typeck.c: Use correct format string in cast-qual warning
7501
7502 2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
7503
7504 * c-decl.c (c_decl_attributes): Use
7505 lang_hooks.types.omp_mappable_type.
7506 * c-typeck.c (c_finish_omp_clauses): Likewise.
7507
7508 2014-03-06 Marek Polacek <polacek@redhat.com>
7509
7510 PR c/60197
7511 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
7512 of checking tree code.
7513
7514 2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7515
7516 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
7517 (c_parser_parameter_declaration): Likewise.
7518
7519 2014-02-19 Marek Polacek <polacek@redhat.com>
7520
7521 PR c/60195
7522 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
7523 Call mark_exp_read on exp.value.
7524 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
7525 TREE_ADDRESSABLE on old instead of val.
7526 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
7527
7528 2014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
7529
7530 * c-parser.c (c_parser_get_builtin_args): Replace calls to
7531 C_EXPR_APPEND by vec_safe_push.
7532 * c-tree.h (C_EXPR_APPEND): Remove.
7533
7534 2014-01-31 Marek Polacek <polacek@redhat.com>
7535
7536 PR c/59963
7537 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
7538 build_function_call_vec.
7539 (build_function_call): Likewise.
7540 (build_atomic_assign): Likewise.
7541 (build_function_call_vec): Add arg_loc parameter. Use it.
7542 (convert_arguments): Likewise.
7543 (convert_for_assignment): Rename rhs_loc to expr_loc.
7544 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
7545 (c_parser_objc_keywordexpr): Likewise.
7546 (c_parser_postfix_expression_after_primary): Call
7547 build_function_call_vec with expr_loc rather than op_loc.
7548 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
7549 build_function_call_vec.
7550 (c_parser_expr_list): Add locations parameter. Fill it with locations
7551 of function arguments.
7552 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
7553
7554 2014-01-30 Marek Polacek <polacek@redhat.com>
7555
7556 PR c/59940
7557 * c-typeck.c (build_function_call_vec): Use loc parameter.
7558 (convert_arguments): Add location parameter. Use it.
7559 (ep_convert_and_check): Likewise.
7560 (build_atomic_assign): Adjust convert_for_assignment call.
7561 (build_modify_expr): Likewise.
7562 (digest_init): Likewise.
7563 (c_finish_return): Likewise.
7564 (build_conditional_expr): Adjust ep_convert_and_check calls.
7565 (convert_for_assignment): Add rhs_loc parameter. Use it.
7566 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
7567 calls.
7568
7569 2014-01-30 Richard Biener <rguenther@suse.de>
7570
7571 PR c/59905
7572 * c-typeck.c (build_function_call_vec): Do not replace calls
7573 to a function via an incompatible type with a runtime abort.
7574
7575 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7576
7577 * c-parser.c (c_parser_declaration_or_fndef): Replaced
7578 flag_enable_cilkplus with flag_cilkplus.
7579 (c_parser_direct_declarator_inner): Likewise.
7580 (c_parser_attribute_any_word): Likewise.
7581 (c_parser_attributes): Likewise.
7582 (c_parser_compound_statement): Likewise.
7583 (c_parser_statement_after_labels): Likewise.
7584 (c_parser_if_statement): Likewise.
7585 (c_parser_switch_statement): Likewise.
7586 (c_parser_do_statement): Likewise.
7587 (c_parser_for_statement): Likewise.
7588 (c_parser_unary_expression): Likewise.
7589 (c_parser_postfix_expression): Likewise.
7590 (c_parser_postfix_expression_after_primary): Likewise.
7591 (c_parser_postfix_expression_after_primary): Likewise.
7592 (c_parser_omp_clause_name): Likewise.
7593 (c_finish_omp_declare_simd): Likewise.
7594 (c_parser_cilk_verify_simd): Likewise.
7595 * c-typeck.c (build_array_ref): Likewise.
7596 (build_function_call_vec): Likewise.
7597 (convert_arguments): Likewise.
7598 (build_compound_expr): Likewise.
7599 (c_finish_return): Likewise.
7600 (c_finish_if_stmt): Likewise.
7601 (c_finish_loop): Likewise.
7602 (build_binary_op): Likewise.
7603
7604 2014-01-23 Marek Polacek <polacek@redhat.com>
7605
7606 PR c/59846
7607 * c-typeck.c (parser_build_binary_op): Use location instead of
7608 input_location.
7609 (build_binary_op): Pass location to shorten_compare.
7610
7611 2014-01-23 Marek Polacek <polacek@redhat.com>
7612
7613 PR c/58346
7614 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
7615 an empty aggregate.
7616
7617 2014-01-23 Marek Polacek <polacek@redhat.com>
7618
7619 PR c/59871
7620 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
7621 of a comma expression.
7622 (emit_side_effect_warnings): Likewise.
7623
7624 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7625
7626 PR c/59825
7627 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
7628 function to use walk_tree and moved a lot of its functionality to
7629 expand_array_notations.
7630 (expand_array_notations): New function.
7631
7632 2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
7633
7634 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
7635 attribute an attribute without value.
7636
7637 2014-01-23 Jakub Jelinek <jakub@redhat.com>
7638
7639 PR middle-end/58809
7640 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
7641 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
7642
7643 2014-01-22 Marek Polacek <polacek@redhat.com>
7644
7645 PR c/59891
7646 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
7647 of remove_c_maybe_const_expr on op1 and op2.
7648
7649 2014-01-15 Jakub Jelinek <jakub@redhat.com>
7650
7651 PR c/58943
7652 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
7653 effects, preevaluate rhs using SAVE_EXPR first.
7654
7655 2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
7656
7657 PR c++/59631
7658 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
7659 statements with if-elseif statements.
7660
7661 2014-01-06 Marek Polacek <polacek@redhat.com>
7662
7663 PR c/57773
7664 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
7665 defined bit-field types only in ISO C.
7666
7667 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7668
7669 Update copyright years
7670
7671 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7672
7673 * c-array-notation.c: Use the standard form for the copyright notice.
7674
7675 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7676
7677 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
7678 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
7679 field in parser is not empty. If not-empty, call the function
7680 c_parser_finish_omp_declare_simd.
7681 (c_parser_cilk_clause_vectorlength): Modified function to be shared
7682 between SIMD-enabled functions and #pragma simd. Added new parameter.
7683 (c_parser_cilk_all_clauses): Modified the usage of the function
7684 c_parser_cilk_clause_vectorlength as mentioned above.
7685 (c_parser_cilk_simd_fn_vector_attrs): New function.
7686 (c_finish_cilk_simd_fn_tokens): Likewise.
7687 (is_cilkplus_vector_p): Likewise.
7688 (c_parser_omp_clause_name): Added checking for "vectorlength,"
7689 "nomask," and "mask" strings in clause name.
7690 (c_parser_omp_all_clauses): Added 3 new case statements:
7691 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
7692 PRAGMA_CILK_CLAUSE_NOMASK.
7693 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
7694 check for vector attribute and if so call the function
7695 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
7696 called the function c_finish_cilk_simd_fn_tokens.
7697 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
7698 parser field is non-empty. If so, parse them as you would parse
7699 the omp declare simd pragma.
7700 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
7701 Added a check when step is a parameter and flag it as error.
7702 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
7703 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
7704 pragma_omp_clause.
7705
7706 2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
7707
7708 * c-parser.c (c_parser_omp_parallel): Fix description.
7709
7710 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7711
7712 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
7713 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7714 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
7715 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
7716
7717 2013-12-04 Joseph Myers <joseph@codesourcery.com>
7718
7719 PR c/52023
7720 * c-parser.c (c_parser_alignas_specifier): Use
7721 c_sizeof_or_alignof_type instead of c_alignof.
7722 (c_parser_alignof_expression): Likewise, with min_alignof
7723 parameter depending on alignof spelling used.
7724
7725 2013-12-04 Marek Polacek <polacek@redhat.com>
7726
7727 PR c/54113
7728 * c-decl.c (start_function): Don't warn for missing prototype for
7729 inline functions.
7730
7731 2013-12-03 Marek Polacek <polacek@redhat.com>
7732
7733 PR c/59351
7734 * c-decl.c (build_compound_literal): Allow compound literals with
7735 empty initial value.
7736
7737 2013-12-02 Joseph Myers <joseph@codesourcery.com>
7738
7739 PR c/58235
7740 * c-typeck.c (build_modify_expr): Diagnose assignment to
7741 expression with array type.
7742
7743 2013-11-29 Joseph Myers <joseph@codesourcery.com>
7744
7745 PR c/42262
7746 * c-typeck.c (process_init_element): Do not treat a string as
7747 initializing a whole array when used with a designator for an
7748 individual element.
7749
7750 2013-11-29 Joseph Myers <joseph@codesourcery.com>
7751
7752 PR c/57574
7753 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
7754 an inline function following a static declaration.
7755
7756 2013-11-28 Jakub Jelinek <jakub@redhat.com>
7757
7758 PR c/59310
7759 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
7760 to p_name before calling c_parser_omp_teams instead of after.
7761 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
7762 argument. Remove unused p_name variable.
7763
7764 2013-11-27 Aldy Hernandez <aldyh@redhat.com>
7765 Jakub Jelinek <jakub@redhat.com>
7766
7767 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
7768 external_scope is NULL.
7769
7770 2013-11-27 Tom de Vries <tom@codesourcery.com>
7771 Marc Glisse <marc.glisse@inria.fr>
7772
7773 PR c++/59032
7774 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
7775
7776 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
7777
7778 * c-typeck.c: Add required include files from gimple.h.
7779
7780 2013-11-22 David Malcolm <dmalcolm@redhat.com>
7781
7782 * c-decl.c (define_label, shadow_tag_warned)
7783 (check_bitfield_type_and_width, grokdeclarator, grokparms,
7784 store_parm_decls_newstyle, store_parm_decls_oldstyle)
7785 (declspecs_add_type): Remove use of in_system_header macro.
7786 * c-parser.c (c_parser_unary_expression): Likewise.
7787 * c-typeck.c (store_init_value, process_init_element)
7788 (c_start_case): Likewise.
7789
7790 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
7791 macro.
7792
7793 * c-parser.c (c_parser_set_source_position_from_token): Remove
7794 reference to in_system_header from comment.
7795
7796 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7797
7798 * c-decl.c (grokdeclarator): Update comment to refer to
7799 tree_to_[su]hwi rather than tree_low_cst.
7800
7801 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7802
7803 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
7804 tree_to_uhwi throughout.
7805
7806 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7807
7808 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
7809 throughout.
7810
7811 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7812
7813 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
7814 throughout.
7815
7816 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
7817
7818 * c-parser.c (c_parser_cilk_simd): New.
7819 (c_parser_cilk_verify_simd): New.
7820 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
7821 (c_parser_omp_for_loop): Add case for NE_EXPR.
7822 Set c_break_label for CILK_SIMD.
7823 (c_parser_cilk_clause_vectorlength): New.
7824 (c_parser_cilk_clause_linear): New.
7825 (c_parser_cilk_clause_name): New.
7826 (c_parser_cilk_all_clauses): New.
7827 * c-typeck.c (build_unary_op): Pass location argument to
7828 readonly_error.
7829 (build_modify_expr): Same.
7830 (build_asm_expr): Same.
7831 (c_finish_bc_stmt): Error on break/continue in loops.
7832
7833 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
7834
7835 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
7836
7837 2013-11-14 Diego Novillo <dnovillo@google.com>
7838
7839 * c-decl.c: Include print-tree.h.
7840 Include stor-layout.h.
7841 Include varasm.h.
7842 Include attribs.h.
7843 Include stringpool.h.
7844 * c-lang.c: Include fold-const.h.
7845 * c-parser.c: Include stringpool.h.
7846 Include attribs.h.
7847 Include stor-layout.h.
7848 Include varasm.h.
7849 Include trans-mem.h.
7850 * c-typeck.c: Include stor-layout.h.
7851 Include trans-mem.h.
7852 Include varasm.h.
7853 Include stmt.h.
7854
7855 2013-11-13 Joseph Myers <joseph@codesourcery.com>
7856
7857 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
7858 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
7859 __auto_type.
7860 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
7861 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
7862 RID_AUTO_TYPE.
7863 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
7864 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
7865 (c_parser_declarator, c_parser_direct_declarator_inner)
7866 (c_parser_parameter_declaration, c_parser_type_name): All callers
7867 changed.
7868 (c_parser_declaration_or_fndef): Handle declarations with type
7869 determined from the initializer.
7870
7871 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
7872
7873 * c-typeck.c: Include gimplify.h.
7874
7875 2013-11-12 Joseph Myers <joseph@codesourcery.com>
7876
7877 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
7878 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
7879 comment.
7880 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
7881 or _Thread_local as appropriate in diagnostics.
7882 (build_null_declspecs): Initialize ret->thread_gnu_p.
7883 (declspecs_add_scspec): Handle either __thread or _Thread_local
7884 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
7885 pedantic. Do not disallow _Thread_local extern and _Thread_local
7886 static.
7887
7888 2013-11-07 Joseph Myers <joseph@codesourcery.com>
7889 Andrew MacLeod <amacleod@redhat.com>
7890
7891 * c-aux-info.c (gen_type): Handle atomic qualifier.
7892 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
7893 qualifiers when compating types.
7894 (shadow_tag_warned): Handle atomic_p in declspecs.
7895 (quals_from_declspecs): Likewise.
7896 (start_decl): Use c_type_promotes_to when promoting argument
7897 types.
7898 (grokdeclarator): Handle _Atomic.
7899 (get_parm_info): Diagnose any qualifier on "void" as only
7900 parameter.
7901 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
7902 comparing types. Use c_type_promotes_to when promoting argument
7903 types.
7904 (finish_function): Use c_type_promotes_to when promoting argument
7905 types.
7906 (build_null_declspecs): Handle atomic_p in declspecs.
7907 (declspecs_add_qual): Handle RID_ATOMIC.
7908 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
7909 (c_token_starts_declspecs): Handle RID_ATOMIC.
7910 (c_parser_declspecs): Handle atomic type specifiers and
7911 qualifiers.
7912 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
7913 from types of expressions with atomic type.
7914 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
7915 (c_parser_attribute_any_word): Handle RID_ATOMIC.
7916 (c_parser_initializer, c_parser_initelt, c_parser_initval)
7917 (c_parser_statement_after_labels, c_parser_switch_statement)
7918 (c_parser_for_statement, c_parser_expr_no_commas)
7919 (c_parser_conditional_expression, c_parser_binary_expression)
7920 (c_parser_cast_expression, c_parser_unary_expression)
7921 (c_parser_postfix_expression)
7922 (c_parser_postfix_expression_after_primary, c_parser_expression):
7923 Use convert_lvalue_to_rvalue.
7924 (c_parser_expression_conv, c_parser_expr_list): Document
7925 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
7926 (c_parser_objc_synchronized_statement): Use
7927 convert_lvalue_to_rvalue.
7928 (c_parser_objc_selector): Handle RID_ATOMIC.
7929 (c_parser_objc_receiver, c_parser_array_notation): Use
7930 convert_lvalue_to_rvalue.
7931 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
7932 _Atomic (type-name).
7933 (struct c_declspecs): Add atomic_p field.
7934 (convert_lvalue_to_rvalue): Declare.
7935 * c-typeck.c (c_type_promotes_to): Promote atomic types to
7936 corresponding atomic types.
7937 (qualify_type): Don't add _Atomic qualifiers from second argument.
7938 (comp_target_types): Do not allow _Atomic mismatches.
7939 (type_lists_compatible_p): Do not remove atomic qualifiers when
7940 comparing types.
7941 (really_atomic_lvalue, convert_lvalue_to_rvalue)
7942 (build_atomic_assign): New functions.
7943 (build_unary_op): Use build_atomic_assign for atomic increment and
7944 decrement.
7945 (build_conditional_expr): Do not treat _Atomic void as a qualified
7946 version of void.
7947 (build_modify_expr): Use build_atomic_assign for atomic LHS.
7948 (find_anonymous_field_with_type, convert_to_anonymous_field)
7949 (convert_for_assignment): Do not remove atomic qualifiers when
7950 comparing types.
7951 (digest_init): Do not accept initialization of arrays of atomic
7952 elements by string constants.
7953 (build_asm_expr): Use convert_lvalue_to_rvalue.
7954 (build_binary_op): Do not treat _Atomic void as a qualified
7955 version of void.
7956
7957 2013-11-06 DJ Delorie <dj@redhat.com>
7958
7959 * c-decl.c (locate_old_decl): If a previous conflicting decl is
7960 both explicit and builtin, print the location of the explicit one.
7961
7962 2013-11-05 Tobias Burnus <burnus@net-b.de>
7963
7964 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
7965 c_parser_omp_distribute, c_parser_omp_teams,
7966 c_parser_omp_target, c_parser_omp_declare): Handle
7967 -fopenmp-simd.
7968
7969 2013-11-03 Marek Polacek <polacek@redhat.com>
7970
7971 * c-decl.c (grokdeclarator): Add VLA instrumentation.
7972
7973 2013-11-01 Jakub Jelinek <jakub@redhat.com>
7974
7975 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
7976 check_dup_generic at the end, unless remove is true.
7977 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
7978 remove = true;.
7979 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
7980
7981 2013-10-31 Jakub Jelinek <jakub@redhat.com>
7982
7983 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
7984 with decl that is not pointer nor array.
7985
7986 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7987
7988 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
7989 a spawning function is found.
7990 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
7991 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
7992 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
7993 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
7994 case.
7995 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
7996 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
7997 expr.
7998 (c_finish_return): Added a check to reject _Cilk_spawn in return
7999 expression.
8000 (build_cilk_spawn): New function.
8001 (build_cilk_sync): Likewise.
8002 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
8003
8004 2013-10-27 Tobias Burnus <burnus@net-b.de>
8005
8006 PR other/33426
8007 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
8008 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
8009 (c_parser_statement_after_labels): Update calls.
8010
8011 2013-10-24 Tobias Burnus <burnus@net-b.de>
8012
8013 PR other/33426
8014 * c-parser.c (c_parser_pragma, c_parser_for_statement):
8015 Handle PRAGMA_IVDEP.
8016 (c_parser_statement_after_labels): Update call.
8017
8018 2013-10-24 Marek Polacek <polacek@redhat.com>
8019
8020 * c-parser.c (c_parser_struct_declaration): Add a comment.
8021 (c_parser_declarator): Don't allow _Alignas here.
8022
8023 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
8024
8025 * c-parser.c: Include omp-low.h.
8026 * c-typeck.c: Likewise.
8027
8028 2013-10-17 Marek Polacek <polacek@redhat.com>
8029
8030 PR c/58267
8031 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
8032 Document syntax of the array-declarator.
8033 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
8034 are not permitted.
8035 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
8036 (c_parser_struct_declaration): Likewise.
8037 (c_parser_declarator): Likewise.
8038 (c_parser_direct_declarator_inner): Likewise.
8039 (c_parser_parameter_declaration): Likewise.
8040 (c_parser_type_name): Likewise.
8041
8042 2013-10-11 Jakub Jelinek <jakub@redhat.com>
8043
8044 * c-lang.h (current_omp_declare_target_attribute): New extern
8045 decl.
8046 * c-parser.c: Include c-lang.h.
8047 (struct c_parser): Change tokens to c_token *.
8048 Add tokens_buf field. Change tokens_avail type to unsigned int.
8049 (c_parser_consume_token): If parser->tokens isn't
8050 &parser->tokens_buf[0], increment parser->tokens.
8051 (c_parser_consume_pragma): Likewise.
8052 (enum pragma_context): Add pragma_struct and pragma_param.
8053 (c_parser_external_declaration): Adjust
8054 c_parser_declaration_or_fndef caller.
8055 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
8056 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
8057 Adjust recursive call.
8058 (c_parser_struct_or_union_specifier): Use pragma_struct instead
8059 of pragma_external.
8060 (c_parser_parameter_declaration): Use pragma_param instead of
8061 pragma_external.
8062 (c_parser_compound_statement_nostart, c_parser_label,
8063 c_parser_for_statement): Adjust
8064 c_parser_declaration_or_fndef callers.
8065 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
8066 it through to c_parser_conditional_expression.
8067 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
8068 pass it through to c_parser_binary_expression. Adjust recursive
8069 call.
8070 (c_parser_binary_expression): Remove prec argument, add
8071 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
8072 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
8073 binop matches it, use build2 instead of parser_build_binary_op.
8074 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
8075 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
8076 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
8077 Handle pragma_struct and pragma_param the same as pragma_external.
8078 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
8079 (c_parser_omp_variable_list): Parse array sections for
8080 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
8081 (c_parser_omp_clause_collapse): Fully fold collapse expression.
8082 (c_parser_omp_clause_reduction): Handle user defined reductions.
8083 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
8084 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
8085 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
8086 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
8087 c_parser_omp_clause_depend, c_parser_omp_clause_map,
8088 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
8089 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
8090 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
8091 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
8092 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
8093 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
8094 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
8095 (c_parser_omp_for_loop): Add CODE argument, pass it through
8096 to c_finish_omp_for. Change last argument to cclauses,
8097 and adjust uses to grab parallel clauses from the array of all
8098 the split clauses. Adjust c_parser_binary_expression,
8099 c_parser_declaration_or_fndef and c_finish_omp_for callers.
8100 (omp_split_clauses): New function.
8101 (c_parser_omp_simd): New function.
8102 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
8103 Allow the function to be called also when parsing combined constructs,
8104 and call c_parser_omp_simd when parsing for simd.
8105 (c_parser_omp_sections_scope): If section-sequence doesn't start with
8106 #pragma omp section, require exactly one structured-block instead of
8107 sequence of statements.
8108 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
8109 Allow the function to be called also when parsing combined constructs.
8110 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
8111 Allow the function to be called also when parsing combined
8112 constructs.
8113 (c_parser_omp_taskgroup, c_parser_omp_cancel,
8114 c_parser_omp_cancellation_point, c_parser_omp_distribute,
8115 c_parser_omp_teams, c_parser_omp_target_data,
8116 c_parser_omp_target_update, c_parser_omp_target,
8117 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
8118 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
8119 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
8120 (c_parser_omp_construct): Add p_name and mask vars. Handle
8121 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
8122 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
8123 and c_parser_omp_sections callers.
8124 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
8125 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
8126 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
8127 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
8128 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
8129 OMP_CLAUSE_DEPEND.
8130 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
8131 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
8132 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
8133 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
8134 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
8135 * c-typeck.c: Include tree-inline.h.
8136 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
8137 handle_omp_array_sections_1, handle_omp_array_sections,
8138 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
8139 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
8140 user defined reductions.
8141 (c_tree_equal): New function.
8142 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
8143 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
8144 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
8145 c_check_omp_declare_reduction_r): New prototypes.
8146 * c-decl.c (current_omp_declare_target_attribute): New variable.
8147 (c_decl_attributes): New function.
8148 (start_decl, start_function): Use it instead of decl_attributes.
8149 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
8150 c_omp_reduction_decl, c_omp_reduction_lookup,
8151 c_check_omp_declare_reduction_r): New functions.
8152
8153 2013-09-25 Tom Tromey <tromey@redhat.com>
8154
8155 * Make-lang.in (c/gccspec.o): Remove.
8156 (CFLAGS-c/gccspec.o): New variable.
8157 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
8158 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
8159 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
8160
8161 2013-09-25 Tom Tromey <tromey@redhat.com>
8162
8163 * Make-lang.in (c/gccspec.o): Don't use subshell.
8164
8165 2013-09-18 Marek Polacek <polacek@redhat.com>
8166
8167 PR sanitize/58443
8168 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
8169 Remove unnecessary check.
8170
8171 2013-09-18 Marek Polacek <polacek@redhat.com>
8172
8173 PR sanitizer/58411
8174 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
8175 no_sanitize_undefined attribute.
8176
8177 2013-09-13 Kai Tietz <ktietz@redhat.com>
8178
8179 PR target/57848
8180 * c-decl.c (c_builtin_function_ext_scope): Remove
8181 wrong assumption that it is never called on prexisting
8182 symbol.
8183
8184 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8185
8186 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
8187
8188 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8189
8190 * c-objc-common.c (c_tree_printer): Tidy.
8191
8192 2013-08-30 Marek Polacek <polacek@redhat.com>
8193
8194 * c-typeck.c (build_binary_op): Add division by zero and shift
8195 instrumentation.
8196
8197 2013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
8198 Joseph Myers <joseph@codesourcery.com>
8199
8200 PR c/35649
8201 * c-typeck.c (c_common_type): Prefer double_type_node over
8202 other REAL_TYPE types with the same precision.
8203 (convert_arguments): Likewise.
8204
8205 2013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
8206
8207 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
8208 (c_initialize_diagnostics): Call a destructor for the early printer.
8209
8210 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8211
8212 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
8213 printer initialization.
8214
8215 2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
8216
8217 PR c/57490
8218 * c-array-notation.c (fix_conditional_array_notations_1): Added a
8219 check for truth values.
8220 (expand_array_notation_exprs): Added truth values case. Removed an
8221 unwanted else. Added for-loop to walk through subtrees in default
8222 case.
8223
8224 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8225
8226 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
8227
8228 2013-07-23 Joseph Myers <joseph@codesourcery.com>
8229
8230 * c-parser.c (struct c_generic_association): Fix typo.
8231
8232 2013-07-23 Tom Tromey <tromey@redhat.com>
8233 Joseph Myers <joseph@codesourcery.com>
8234
8235 * c-parser.c (struct c_generic_association): New.
8236 (c_generic_association_d): New typedef.
8237 (c_parser_generic_selection): New function.
8238 (c_parser_postfix_expression): Handle RID_GENERIC.
8239
8240 2013-07-13 Jason Merrill <jason@redhat.com>
8241
8242 PR c++/57793
8243 * c-decl.c (finish_struct): Check for too-large class.
8244
8245 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
8246
8247 PR c/57821
8248 * c-typeck.c (set_init_index): When folding, check for index overflow.
8249
8250 2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8251
8252 * c-parser.c (c_parser_array_notation): Removed rejection of array
8253 notations in an array of function pointers.
8254
8255 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8256
8257 * c-array-notation.c (make_triplet_val_inv): New function.
8258 (create_cmp_incr): Likewise.
8259 (create_array_refs): Likewise.
8260 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
8261 Also modularized common parts between functions and called the function.
8262 (build_array_notation_expr): Likewise.
8263 (fix_conditional_array_notations_1): Likewise.
8264 (fix_array_notation_expr): Likewise.
8265 (fix_array_notation_call_expr): Likewise.
8266
8267 2013-06-18 Marek Polacek <polacek@redhat.com>
8268
8269 PR c/57630
8270 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
8271
8272 2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
8273
8274 * c-array-notation.c (build_array_notation_expr): Reject array notation
8275 mismatch between LHS and RHS even inside a call_expr. Also, removed
8276 a couple while statements that were dead code.
8277
8278 2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
8279
8280 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
8281 excessive precision expressions in function parameters. Also removed
8282 couple unwanted while statements.
8283
8284 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8285
8286 * c-array-notation.c (expand_array_notation_exprs): Added
8287 ARRAY_NOTATION_REF case.
8288
8289 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8290
8291 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
8292 function to c-family/array-notation-common.c.
8293 (is_cilkplus_reduce_builtin): Likewise.
8294 (find_rank): Likewise.
8295 (extract_array_notation_exprs): Likewise.
8296 (replace_array_notations): Likewise.
8297 (find_inv_trees): Likewise.
8298 (replace_inv_trees): Likewise.
8299 (contains_array_notation_expr): Likewise.
8300 (find_correct_array_notation_type): Likewise.
8301 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
8302 (struct inv_list): Moved this to c-family/array-notation-common.c.
8303 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
8304
8305 2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
8306
8307 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
8308 reduction functions outside the for-loop. Added a check if the fundecl
8309 is non-NULL. Finally, removed an unwanted if-statement, and made the
8310 body unconditional.
8311
8312 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8313
8314 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
8315 condition of the if-statement matches the rank of else-block and then-
8316 block when array notations are used.
8317 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
8318 expression after the entire function body is parsed.
8319 (c_parser_expr_no_commas): Delayed creating array notation expressions
8320 to the end of function parsing.
8321 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
8322 whole if-statement instead of just the condition.
8323 (expand_array_notation_exprs): Added MODIFY_EXPR case.
8324
8325 2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
8326
8327 PR c/57474
8328 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
8329 array to NULL_TREE if they are unused. Also added a check for the
8330 field to be NULL before its fields are used in future.
8331
8332 2013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8333
8334 PR bootstrap/57450
8335 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
8336 (build_array_notation_expr): Likewise.
8337
8338 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8339
8340 * c-typeck.c (build_array_ref): Added a check to see if array's
8341 index is greater than one. If true, then emit an error.
8342 (build_function_call_vec): Exclude error reporting and checking
8343 for builtin array-notation functions.
8344 (convert_arguments): Likewise.
8345 (c_finish_return): Added a check for array notations as a return
8346 expression. If true, then emit an error.
8347 (c_finish_loop): Added a check for array notations in a loop
8348 condition. If true then emit an error.
8349 (lvalue_p): Added a ARRAY_NOTATION_REF case.
8350 (build_binary_op): Added a check for array notation expr inside
8351 op1 and op0. If present, we call another function to find correct
8352 type.
8353 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
8354 * c-parser.c (c_parser_compound_statement): Check if array
8355 notation code is used in tree, if so, then transform them into
8356 appropriate C code.
8357 (c_parser_expr_no_commas): Check if array notation is used in LHS
8358 or RHS, if so, then build array notation expression instead of
8359 regular modify.
8360 (c_parser_postfix_expression_after_primary): Added a check for
8361 colon(s) after square braces, if so then handle it like an array
8362 notation. Also, break up array notations in unary op if found.
8363 (c_parser_direct_declarator_inner): Added a check for array
8364 notation.
8365 (c_parser_compound_statement): Added a check for array notation in
8366 a stmt. If one is present, then expand array notation expr.
8367 (c_parser_if_statement): Likewise.
8368 (c_parser_switch_statement): Added a check for array notations in
8369 a switch statement's condition. If true, then output an error.
8370 (c_parser_while_statement): Similarly, but for a while.
8371 (c_parser_do_statement): Similarly, but for a do-while.
8372 (c_parser_for_statement): Similarly, but for a for-loop.
8373 (c_parser_unary_expression): Check if array notation is used in a
8374 pre-increment or pre-decrement expression. If true, then expand
8375 them.
8376 (c_parser_array_notation): New function.
8377 * c-array-notation.c: New file.
8378 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
8379
8380 2013-05-23 Mike Stump <mikestump@comcast.net>
8381
8382 * c-typeck.c (convert_for_assignment): Handle references to memory
8383 spaces better.
8384
8385 2013-05-16 Jason Merrill <jason@redhat.com>
8386
8387 * Make-lang.in (cc1$(exeext)): Use link mutex.
8388
8389 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8390
8391 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
8392 to simply use OPT_Wpointer_arith.
8393 (build_unary_op): Likewise.
8394
8395 2013-04-03 Jakub Jelinek <jakub@redhat.com>
8396
8397 PR c/19449
8398 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
8399 argument. If set, or it temporarily for parsing of the first
8400 argument into force_folding_builtin_constant_p.
8401 (c_parser_postfix_expression): Adjust callers.
8402
8403 2013-03-21 Richard Biener <rguenther@suse.de>
8404
8405 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
8406 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
8407
8408 2013-02-12 Marek Polacek <polacek@redhat.com>
8409
8410 PR c/44938
8411 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
8412 origtypes to NULL.
8413
8414 2013-01-24 Jakub Jelinek <jakub@redhat.com>
8415
8416 PR c/56078
8417 * c-typeck.c (set_nonincremental_init_from_string): If
8418 constructor_max_index is NULL, treat it as if tree_int_cst_lt
8419 returned false.
8420 (process_init_element): Likewise.
8421
8422 2012-12-20 Jakub Jelinek <jakub@redhat.com>
8423
8424 PR c++/55619
8425 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
8426 argument, don't call default_function_array_conversion
8427 nor c_fully_fold here.
8428 (c_parser_asm_statement): Adjust callers.
8429 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
8430 and outputs here, and call default_function_array_conversion
8431 on inputs that don't need to be addressable.
8432
8433 2012-12-18 Jakub Jelinek <jakub@redhat.com>
8434
8435 PR c/39464
8436 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
8437 warning require that both c_common_unsigned_type as well as
8438 c_common_signed_type is the same for both mvl and mvr types.
8439
8440 2012-11-16 Diego Novillo <dnovillo@google.com>
8441
8442 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
8443
8444 * c-common.c: Use new vec API in vec.h.
8445 * c-common.h: Likewise.
8446 * c-gimplify.c: Likewise.
8447 * c-pragma.c: Likewise.
8448 * c-pretty-print.c: Likewise.
8449 * c-pretty-print.h: Likewise.
8450 * c-semantics.c: Likewise.
8451 * c-decl.c: Likewise.
8452 * c-parser.c: Likewise.
8453 * c-tree.h: Likewise.
8454 * c-typeck.c: Likewise.
8455
8456 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8457
8458 PR c++/54930
8459 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
8460
8461 2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8462
8463 PR c/53066
8464 * c-decl.c (warn_if_shadowing): Do not warn if a variable
8465 shadows a function, unless the variable is a function or a
8466 pointer-to-function.
8467
8468 2012-10-12 Jakub Jelinek <jakub@redhat.com>
8469
8470 PR c/54381
8471 * c-parser.c (struct c_tree_loc_pair): Removed.
8472 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
8473 add location_t * and tree * arguments, fill in array of 3
8474 sizeof_arg trees and corresponding locs.
8475 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
8476 c_parser_expr_list callers.
8477 (c_parser_postfix_expression_after_primary): Likewise. Pass
8478 array of 3 sizeof_arg trees and locs (corresponding to first
8479 3 arguments) to sizeof_pointer_memaccess_warning.
8480
8481 2012-10-09 Lawrence Crowl <crowl@google.com>
8482
8483 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
8484 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
8485 hash table.
8486
8487 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8488
8489 PR c++/54194
8490 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
8491 call.
8492
8493 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
8494
8495 PR c++/54427
8496 * c-typeck.c: Include c-common.h.
8497 (enum stv_conv): Moved to c-common.h.
8498 (scalar_to_vector): Moved to c-common.c.
8499 (build_binary_op): Adapt to scalar_to_vector's new prototype.
8500 * Make-lang.in: c-typeck.c depends on c-common.h.
8501
8502 2012-10-04 Arnaud Charlet <charlet@adacore.com>
8503
8504 * c-decl.c (c_write_global_declarations): Fix handling of
8505 -fdump-ada-spec*.
8506
8507 2012-09-30 Sharad Singhai <singhai@google.com>
8508
8509 * c-decl.c (c_write_global_declarations): Use a different method
8510 to determine if the dump has ben initialized.
8511
8512 2012-09-14 Joseph Myers <joseph@codesourcery.com>
8513
8514 PR c/54552
8515 * c-typeck.c (c_cast_expr): When casting to a type requiring
8516 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
8517 c_fully_fold first.
8518
8519 2012-09-14 Joseph Myers <joseph@codesourcery.com>
8520
8521 PR c/54103
8522 * c-typeck.c (build_unary_op): Pass original argument of
8523 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
8524 any C_MAYBE_CONST_EXPR, if it has integer operands.
8525 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
8526 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
8527 to c_objc_common_truthvalue_conversion, then remove any
8528 C_MAYBE_CONST_EXPR, if they have integer operands. Use
8529 c_objc_common_truthvalue_conversion not
8530 c_common_truthvalue_conversion.
8531 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
8532 call note_integer_operands for arguments with integer operands
8533 that are not integer constants.
8534
8535 2012-09-13 Jakub Jelinek <jakub@redhat.com>
8536
8537 PR c/54559
8538 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
8539 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
8540
8541 2012-08-31 Jakub Jelinek <jakub@redhat.com>
8542
8543 PR c/54428
8544 * c-convert.c (convert): Don't call fold_convert_loc if
8545 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
8546 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
8547 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
8548
8549 2012-08-24 Jakub Jelinek <jakub@redhat.com>
8550
8551 PR c/54355
8552 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
8553 for nested and empty_ok arguments in the call to
8554 c_parser_declaration_or_fndef.
8555
8556 2012-08-17 Jakub Jelinek <jakub@redhat.com>
8557
8558 * c-tree.h (c_last_sizeof_arg): Declare.
8559 * c-parser.c (struct c_tree_loc_pair): New type.
8560 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
8561 non-NULL.
8562 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
8563 (c_parser_postfix_expression_after_primary): Likewise. Call
8564 sizeof_pointer_memaccess_warning if needed.
8565 (sizeof_ptr_memacc_comptypes): New function.
8566 * c-typeck.c (c_last_sizeof_arg): New global variable.
8567 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
8568
8569 2012-07-24 Uros Bizjak <ubizjak@gmail.com>
8570
8571 * c-lang.h (lang_decl): Add variable_size GTY option.
8572
8573 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8574
8575 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
8576 * Make-lang.in: Fix dependencies.
8577
8578 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8579
8580 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
8581 and add language Makefile hooks.
8582 * config-lang.in: New file.
8583 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
8584 add the required "normal" config-lang.in rules.
8585 * c-lang.h: Moved from gcc/ to here.
8586 * c-tree.h: Likewise.
8587 * c-objc-common.c: Likewise.
8588 * c-objc-common.h: Likewise.
8589 * c-typeck.c: Likewise.
8590 * c-convert.c: Likewise.
8591 * c-lang.c: Likewise.
8592 * c-aux-info.c: Likewise.
8593 * c-errors.c: Likewise.
8594 * gccspec.c: Likewise.
8595 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
8596 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
8597 \f
8598 Copyright (C) 2012-2022 Free Software Foundation, Inc.
8599
8600 Copying and distribution of this file, with or without modification,
8601 are permitted in any medium without royalty provided the copyright
8602 notice and this notice are preserved.