]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
instead of -Wnormalized=<options>
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
21bfe0d4 12017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2
3 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
4 value of c_parser_parse_ssa_name against error_mark_node and emit
5 error if ssa name is anonymous and written as default definition.
6
a8deddc8 72017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8
9 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
10 FMA_EXPR.
11
79878c89 122017-02-16 Jakub Jelinek <jakub@redhat.com>
13
14 PR c++/79512
15 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
16 ignore #pragma omp target even when not followed by identifier.
17
78c6d67e 182017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19
20 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
21 (c_parser_gimple_unary_expression): Likewise.
22
19efce70 232017-02-13 Jakub Jelinek <jakub@redhat.com>
24
25 * c-parser.c (c_parser_oacc_declare): Add missing space in
26 diagnostics.
27
32b8484d 282017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29
30 PR c/79478
31 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
32 set_c_expr_source_range when parsing ssa-name.
33
b91919ba 342017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
35 Richard Biener <rguenther@suse.de>
36
37 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
38 building IL when arguments are error_mark_node.
39 (c_parser_gimple_unary_expression): Likewise.
40 (c_parser_gimple_if_stmt): Likewise.
41 (c_parser_gimple_switch_stmt): Likewise.
42 (c_parser_gimple_return_stmt): Likewise.
43 (c_parser_parse_ssa_name): When name lookup fails do not build
44 an SSA name. Use undeclared rather than not declared in error
45 reporting.
46
127144a0 472017-02-09 Marek Polacek <polacek@redhat.com>
48
49 PR c/79428
50 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
51 instead of c_parser_skip_until_found.
52
b5c83b44 532017-02-09 Jakub Jelinek <jakub@redhat.com>
54
55 PR c/79431
56 * c-parser.c (c_parser_omp_declare_target): Don't invoke
57 symtab_node::get on automatic variables.
58
719a7570 592016-02-09 Nathan Sidwell <nathan@codesourcery.com>
60 Chung-Lin Tang <cltang@codesourcery.com>
61
62 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
63 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
64 semantic checking.
65 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
66
29beab79 672017-02-07 Richard Biener <rguenther@suse.de>
68
69 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
70 (c_parser_gimple_postfix_expression_after_primary):
71 Do not use c_build_function_call_vec to avoid folding and promotion.
72 Simplify.
73
96afa092 742017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
75
76 PR lto/79061
77 * c-decl.c (pop_scope): Pass main_input_filename to
78 build_translation_unit_decl.
79
175e0d6b 802017-01-24 David Malcolm <dmalcolm@redhat.com>
81
82 * c-parser.c: Include "read-rtl-function.h" and
83 "run-rtl-passes.h".
84 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
85 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
86 production. Update for renaming of field "gimple_pass" to
87 "gimple_or_rtl_pass". If __RTL was seen, call
88 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
89 to an auto_timevar, to cope with early exit.
90 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
91 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
92 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
93 Handle RID_RTL.
94 (c_parser_parse_rtl_body): New function.
95 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
96 (struct c_declspecs): Rename field "gimple_pass" to
97 "gimple_or_rtl_pass". Add field "rtl_p".
98 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
99 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
100 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
101 (c_parser_gimple_or_rtl_pass_list): ...this.
102
3ef7eab1 1032017-01-20 Marek Polacek <polacek@redhat.com>
104
105 PR c/64279
106 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
107
785353b9 1082017-01-13 Richard Biener <rguenther@suse.de>
109
110 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
111 nops.
112
ac5f04c1 1132017-01-13 Richard Biener <rguenther@suse.de>
114
115 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
116 _Literal ( type-name ) number.
117
2b11c996 1182017-01-12 Richard Biener <rguenther@suse.de>
119
120 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
121 __MEM.
122
9a26d403 1232017-01-11 Jakub Jelinek <jakub@redhat.com>
124
125 PR c++/72813
126 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
127 PCH file.
128
a19c4dc1 1292017-01-11 Richard Biener <rguenther@suse.de>
130
131 PR bootstrap/79052
132 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
133 returns on parse errors.
134
6124217c 1352017-01-04 Marek Polacek <polacek@redhat.com>
136
137 PR c++/64767
138 * c-parser.c (c_parser_postfix_expression): Mark zero character
139 constants by setting original_type in c_expr.
140 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
141 with a zero character constant.
142 (char_type_p): New function.
143
8ccda24a 1442017-01-04 David Malcolm <dmalcolm@redhat.com>
145
146 * c-parser.c (c_parser_declaration_or_fndef): Create a
147 rich_location at init_loc and parse it to start_init.
148 (last_init_list_comma): New global.
149 (c_parser_braced_init): Update last_init_list_comma when parsing
150 commas. Pass it to pop_init_level. Pass location of closing
151 brace to pop_init_level.
152 (c_parser_postfix_expression_after_paren_type): Create a
153 rich_location at type_loc and parse it to start_init.
154 (c_parser_omp_declare_reduction): Likewise for loc.
155 * c-tree.h (start_init): Add rich_location * param.
156 (pop_init_level): Add location_t param.
157 * c-typeck.c (struct initializer_stack): Add field
158 "missing_brace_richloc".
159 (start_init): Add richloc param, use it to initialize
160 the stack node's missing_brace_richloc.
161 (last_init_list_comma): New decl.
162 (finish_implicit_inits): Pass last_init_list_comma to
163 pop_init_level.
164 (push_init_level): When finding missing open braces, add fix-it
165 hints to the richloc.
166 (pop_init_level): Add "insert_before" param and pass it
167 when calling pop_init_level. Add fixits about missing
168 close braces to any richloc. Use the richloc for the
169 -Wmissing-braces warning.
170 (set_designator): Pass last_init_list_comma to pop_init_level.
171 (process_init_element): Likewise.
172
aad93da1 1732017-01-01 Jakub Jelinek <jakub@redhat.com>
174
175 Update copyright years.
176
3713d2e2 1772016-12-21 Jakub Jelinek <jakub@redhat.com>
178
184fac50 179 PR bootstrap/78817
180 * c-typeck.c (build_function_call_vec): If check_function_arguments
181 returns true, set TREE_NO_WARNING on CALL_EXPR.
182
3713d2e2 183 PR c/77767
184 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
185 to *expr instead of overwriting it.
186
3e677d45 1872016-12-20 Richard Biener <rguenther@suse.de>
188
189 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
190 error recovery.
191 (c_parser_gimple_statement): Only build assigns for non-error
192 stmts.
193 (c_parser_gimple_postfix_expression_after): Improve error recovery.
194
4954efd4 1952016-12-14 Martin Jambor <mjambor@suse.cz>
196
197 * c-parser.c: Include omp-general.h and omp-offload.h instead of
198 omp-low.h.
199 (c_finish_oacc_routine): Adjusted call to
200 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
201 to use their new names.
202 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
203 use its new name.
204 (c_parser_oacc_update): Likewise.
205 (c_parser_omp_simd): Likewise.
206 (c_parser_omp_target_update): Likewise.
207 * c-typeck.c: Include omp-general.h instead of omp-low.h.
208 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
209 name.
210 (c_finish_omp_cancellation_point): Likewise.
211 * gimple-parser.c: Do not include omp-low.h
212
4c50b884 2132016-12-02 Cesar Philippidis <cesar@codesourcery.com>
214 James Norris <jnorris@codesourcery.com>
215
216 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
217 EXIT_DATA,WAIT} are not used in compound statements.
218 (c_parser_oacc_enter_exit_data): Update diagnostics.
219
f1b3e1c9 2202016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
221
222 PR c++/71973
223 * c-decl.c (diagnose_mismatched_decls): Use
224 OPT_Wbuiltin_declaration_mismatch here too.
225
adc78298 2262016-11-18 Richard Sandiford <richard.sandiford@arm.com>
f1b3e1c9 227 Alan Hayward <alan.hayward@arm.com>
228 David Sherwood <david.sherwood@arm.com>
adc78298 229
230 * c-decl.c (merge_decls): Use SET_DECL_MODE.
231 (make_label, finish_struct): Likewise.
232
b1f04d34 2332016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
a49621cf 234 Richard Biener <rguenther@suse.de>
9b8f3aa1 235
a49621cf 236 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
237 * config-lang.in (gtfiles): Add c/c-parser.h.
238 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
239 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
240 * c-parser.c (enum c_id_kind, struct c_token,
241 c_parser_next_token_is, c_parser_next_token_is_not,
242 c_parser_next_token_is_keyword,
243 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
244 Split out to ...
245 * c-parser.h: ... new header.
246 * c-parser.c: Include c-parser.h and gimple-parser.h.
b1f04d34 247 (c_parser_peek_token, c_parser_peek_2nd_token,
a49621cf 248 c_token_starts_typename, c_parser_next_token_starts_declspecs,
249 c_parser_next_tokens_start_declaration, c_parser_consume_token,
250 c_parser_error, c_parser_require, c_parser_skip_until_found,
251 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
252 c_parser_type_name): Export.
253 (c_parser_tokens_buf): New function.
254 (c_parser_error): Likewise.
255 (c_parser_set_error): Likewise.
256 (c_parser_declspecs): Handle RID_GIMPLE.
b1f04d34 257 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
258 via c_parser_parse_gimple_body.
a49621cf 259 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
260 c_token_starts_typename, c_parser_next_token_starts_declspecs,
261 c_parser_next_tokens_start_declaration, c_parser_consume_token,
262 c_parser_error, c_parser_require, c_parser_skip_until_found,
263 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
264 c_parser_type_name): Declare.
b1f04d34 265 (struct c_parser): Declare forward.
266 (c_parser_tokens_buf): Declare.
a49621cf 267 (c_parser_error): Likewise.
268 (c_parser_set_error): Likewise.
269 * gimple-parser.c: New file.
270 * gimple-parser.h: Likewise.
b1f04d34 271
9b8f3aa1 2722016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
273
274 PR c/35503
275 * c-parser.c (c_parser_postfix_expression_after_primary): Call
276 warn_for_restrict.
277
50d3ad71 2782016-09-11 Le-Chun Wu <lcwu@google.com>
279 Mark Wielaard <mjw@redhat.com>
280
281 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
282 to the given -Wshadow= variant.
283
ad7b10a2 2842016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
285
286 * c-typeck.c: Include memmodel.h.
287
8a23256f 2882016-10-13 Jakub Jelinek <jakub@redhat.com>
289
290 PR target/77957
291 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
292 instead of lhd_return_null_tree_v.
293
30ac4925 2942016-10-07 Bernd Schmidt <bschmidt@redhat.com>
295
296 PR c++/69733
297 * c-decl.c (smallest_type_quals_location): New static function.
298 (grokdeclarator): Try to find the correct location for an ignored
299 qualifier.
300
3c77f69c 3012016-09-26 Marek Polacek <polacek@redhat.com>
302
303 PR c/7652
304 * c-decl.c (pop_scope): Add gcc_fallthrough.
305
3062016-09-26 Marek Polacek <polacek@redhat.com>
307
308 PR c/7652
309 * c-parser.c (struct c_token): Add flags field.
310 (c_lex_one_token): Pass it to c_lex_with_flags.
311 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
312 into IFN_FALLTHROUGH.
313 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
314 attribute fallthrough after a case label or default label.
315 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
316
481ce481 3172016-09-24 Marek Polacek <polacek@redhat.com>
318
319 PR c/77490
320 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
321 have boolean value. Warn about ++/-- on booleans.
322
16fb756f 3232016-09-23 Jakub Jelinek <jakub@redhat.com>
324
325 * c-parser.c (incomplete_record_decls): Remove unnecessary
326 = vNULL initialization of file scope vec.
327
d80c1c6c 3282016-09-16 Marek Polacek <polacek@redhat.com>
329
330 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
331
b99cc6da 3322016-09-14 Marek Polacek <polacek@redhat.com>
333
334 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
335 (fix_array_notation_expr): Likewise.
336 * c-decl.c (finish_decl): Likewise.
337 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
338 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
339 (function_to_pointer_conversion): Use false instead of 0.
340 (convert_lvalue_to_rvalue): Likewise.
341 (parser_build_unary_op): Likewise.
342 (build_atomic_assign): Likewise.
343 (build_unary_op): Change nonconvert parameter type to bool, use
344 true/false instead of 1/0.
345 (build_binary_op): Use true instead of 1.
346
68ef907c 3472016-09-13 David Malcolm <dmalcolm@redhat.com>
348
349 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
350 of add_fixit_insert to add_fixit_insert_before.
351
89bcb5a3 3522016-09-13 Marek Polacek <polacek@redhat.com>
353
354 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
355 it.
356
7a21b590 3572016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
358
359 PR c++/77496
360 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
361 COMPOUND_EXPR to warn_for_omitted_condop.
362
3da97ff7 3632016-09-07 David Malcolm <dmalcolm@redhat.com>
364
365 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
366 c_get_substring_location for this new langhook.
367
0b80c4b2 3682016-09-02 Jakub Jelinek <jakub@redhat.com>
369
370 PR c/65467
371 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
372 flag_openmp.
373 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
374 instead of mark_exp_read on low_bound/length expression.
375 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
376 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
377 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
378 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
379 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
380 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
381 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
382 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
383 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
384 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
385 instead of mark_expr_read.
386 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
387 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
388 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
389 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
390 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
391 array section bases outside of depend clause, for depend clause
392 use convert_lvalue_to_rvalue on the base.
393 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
394 linear, aligned, map, to and from clauses.
395 (c_omp_clause_copy_ctor): New function.
396
c7afb782 3972016-09-01 Marek Polacek <polacek@redhat.com>
398
399 PR c/7652
400 * c-typeck.c (composite_type): Add FALLTHRU comment.
401
986530da 4022016-08-31 David Malcolm <dmalcolm@redhat.com>
403
404 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
405 to the insertion fixits for "struct", "union", and "enum".
406
850c2009 4072016-08-30 David Malcolm <dmalcolm@redhat.com>
408
409 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
410 rather than add_fixit_misspelled_id.
411 (undeclared_variable): Likewise.
412 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
413 now-redundant "here" params from add_fixit_insert method calls.
414 (c_parser_parameter_declaration): Likewise.
415 * c-typeck.c (build_component_ref): Remove now-redundant range
416 param from add_fixit_replace method calls.
417
c4963714 4182016-08-25 Marek Polacek <polacek@redhat.com>
419
420 * c-typeck.c (parser_build_binary_op): Pass LHS to
421 warn_logical_not_parentheses.
422
49e1f4eb 4232016-08-25 Marek Polacek <polacek@redhat.com>
424
425 PR c/77323
426 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
427 or _FloatN or _FloatNx is not supported.
428 (finish_declspecs): Set type to integer_type_node when _FloatN or
429 _FloatNx is not supported.
430
82c85aba 4312016-08-19 Joseph Myers <joseph@codesourcery.com>
432
433 PR c/32187
434 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
435 (struct c_declspecs): Add field floatn_nx_idx.
436 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
437 and _FloatNx type specifiers.
438 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
439 (c_parser_declspecs, c_parser_attribute_any_word)
440 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
441 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
442 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
443 narrower than double.
444
7175bb2a 4452016-08-12 Jakub Jelinek <jakub@redhat.com>
446 Martin Liska <mliska@suse.cz>
447
448 PR c/67410
449 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
450 % to determine val element to change. Assert that
451 wchar_bytes * charwidth fits into val array.
452
e3533433 4532016-08-12 Marek Polacek <polacek@redhat.com>
454
455 PR c/7652
456 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
457 (c_parser_postfix_expression): Likewise.
458 * c-typeck.c (build_unary_op): Adjust fall through comment.
459 (c_mark_addressable): Likewise.
460
74be5bc1 4612016-08-11 Jakub Jelinek <jakub@redhat.com>
462
463 PR c/72816
464 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
465 array member through typedef, for orig_qual_indirect == 0 clear
466 orig_qual_type.
467
7af4d06b 4682016-08-08 David Malcolm <dmalcolm@redhat.com>
469
470 PR c/64955
471 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
472 this up to selftest::run_c_tests.
473 (selftest::run_c_tests): New function.
474
5f429ee2 4752016-08-04 Thomas Schwinge <thomas@codesourcery.com>
476
1fa5d8ba 477 * c-parser.c (struct oacc_routine_data): Add error_seen and
478 fndecl_seen members.
479 (c_finish_oacc_routine): Use these.
480 (c_parser_declaration_or_fndef): Adjust.
481 (c_parser_oacc_routine): Likewise. Support more C language
482 constructs, and improve diagnostics. Move pragma context
483 checking...
484 (c_parser_pragma): ... here.
485
5f429ee2 486 * c-parser.c (struct oacc_routine_data): New.
487 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
488 Simplify code.
489 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
490 declare target" attribute.
491
f3c032a4 4922016-08-01 Jan Beulich <jbeulich@suse.com>
493
494 * c-fold.c (c_fully_fold_internal): Also emit shift count
495 warnings for vector types.
496 * c-typeck.c (build_binary_op): Likewise.
497
4ebf85be 4982016-07-29 Marek Polacek <polacek@redhat.com>
499
500 PR c/71742
501 * c-decl.c (finish_struct): Rephrase an error message.
502
9efe5be6 503 PR c/71853
504 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
505 to error node for invalid code.
506
4c4548bb 507 PR c/71573
508 * c-decl.c (implicitly_declare): Return decl early not only for
509 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
510
322d4184 5112016-07-29 Jakub Jelinek <jakub@redhat.com>
512
513 PR c/71969
514 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
515 on GNU extern inline functions.
516
35fddbd6 5172016-07-29 Marek Polacek <polacek@redhat.com>
518
519 PR c/71583
520 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
521 check expr.value.
522
59c1507a 5232016-07-22 Uros Bizjak <ubizjak@gmail.com>
524
525 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
526
d0f11d68 5272016-07-20 David Malcolm <dmalcolm@redhat.com>
528
529 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
530 spellcheck-tree.h
531 (best_macro_match): Likewise, converting from a typedef to a
532 subclass.
533 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
534 (lookup_name_fuzzy): Update for change of best_macro_match to a
535 subclass with a ctor that calls cpp_forall_identifiers.
536
d208f6e6 5372016-07-20 David Malcolm <dmalcolm@redhat.com>
538
539 * c-decl.c (implicit_decl_warning): Update for conversion of
540 return type of lookup_name_fuzzy to const char *.
541 (undeclared_variable): Likewise.
542 (lookup_name_fuzzy): Convert return type from tree to
543 const char *.
544 * c-parser.c (c_parser_declaration_or_fndef): Update for
545 conversion of return type of lookup_name_fuzzy to const char *.
546 (c_parser_parameter_declaration): Likewise.
547
0ef9358d 5482016-07-15 Cesar Philippidis <cesar@codesourcery.com>
549
550 * c-parser.c (c_parser_oacc_declare): Don't scan for
551 GOMP_MAP_POINTER.
552 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
553 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
554 zero-length subarrays.
555
0dd7db3b 5562016-07-15 Jakub Jelinek <jakub@redhat.com>
557
558 PR c/71858
559 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
560 instead of FUZZY_LOOKUP_NAME.
561 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
562 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
563
28413b15 5642016-07-14 Jakub Jelinek <jakub@redhat.com>
565
566 PR c/71858
567 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
568
e9258aee 5692016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
570
571 * c-parser.c (c_parser_generic_selection): Make type of variable
572 auto_vec.
573 (c_parser_omp_declare_simd): Likewise.
574
57f91a55 5752016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
576
577 * c-decl.c (struct c_struct_parse_info): Change member types
578 from vec to auto_vec.
579 (start_struct): Adjust.
580 (finish_struct): Likewise.
581
c364d0f3 5822016-07-02 Jakub Jelinek <jakub@redhat.com>
583
584 PR c/71719
585 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
586
44e775d8 5872016-06-29 Thomas Schwinge <thomas@codesourcery.com>
588
589 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
590 Move pragma context checking into...
591 (c_parser_omp_cancellation_point): ... here, and improve
592 diagnostic messages.
593 * c-typeck.c (c_finish_omp_cancel)
594 (c_finish_omp_cancellation_point): Improve diagnostic messages.
595
1af10ce6 5962016-06-29 Jakub Jelinek <jakub@redhat.com>
597
598 PR c/71685
599 * c-typeck.c (c_build_qualified_type): Don't clear
600 C_TYPE_INCOMPLETE_VARS for the main variant.
601
6022016-06-28 Martin Sebor <msebor@redhat.com>
9c3ffbcb 603
604 PR c/71552
605 * c-typeck.c (output_init_element): Diagnose incompatible types
606 before non-constant initializers.
607
6eb2402f 6082016-06-28 Jakub Jelinek <jakub@redhat.com>
609
610 * Make-lang.in: Don't cat ../stage_current if it does not exist.
611
b4c71cbb 6122016-06-23 Andi Kleen <ak@linux.intel.com>
613
614 * Make-lang.in: Add support for autofdo.
615
8469aece 6162016-06-22 David Malcolm <dmalcolm@redhat.com>
617
618 PR c/70339
619 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
620 (implicit_decl_warning): When issuing warnings for implicit
621 declarations, attempt to provide a suggestion via
622 lookup_name_fuzzy.
623 (undeclared_variable): Likewise when issuing errors.
624 (lookup_name_in_scope): Likewise.
625 (struct edit_distance_traits<cpp_hashnode *>): New struct.
626 (best_macro_match): New typedef.
627 (find_closest_macro_cpp_cb): New function.
628 (lookup_name_fuzzy): New function.
629 * c-parser.c: Include gcc-rich-location.h.
630 (c_token_starts_typename): Split out case CPP_KEYWORD into...
631 (c_keyword_starts_typename): ...this new function.
632 (c_parser_declaration_or_fndef): When issuing errors about
633 missing "struct" etc, add a fixit. For other kinds of errors,
634 attempt to provide a suggestion via lookup_name_fuzzy.
635 (c_parser_parms_declarator): When looking ahead to detect typos in
636 type names, also reject CPP_KEYWORD.
637 (c_parser_parameter_declaration): When issuing errors about
638 unknown type names, attempt to provide a suggestion via
639 lookup_name_fuzzy.
640 * c-tree.h (c_keyword_starts_typename): New prototype.
641
e218d07f 6422016-06-20 Joseph Myers <joseph@codesourcery.com>
643
644 PR c/71601
645 * c-typeck.c (build_conditional_expr): Return error_mark_node if
646 c_common_type returns error_mark_node.
647
92a44a68 6482016-06-19 Martin Sebor <msebor@redhat.com>
21897f47 649
650 PR c/69507
651 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
652 __alignof__ (expression).
653
f0d77991 6542016-06-14 David Malcolm <dmalcolm@redhat.com>
655
656 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
657
2a990300 6582016-06-14 David Malcolm <dmalcolm@redhat.com>
659
660 * c-typeck.c (build_component_ref): Simplify fixit code by
661 using gcc_rich_location::add_fixit_misspelled_id.
662 (set_init_label): Likewise.
663
527790c1 6642016-06-13 David Malcolm <dmalcolm@redhat.com>
665
666 * c-parser.c (c_parser_initelt): Provide location of name for new
667 location_t param of set_init_label.
668 * c-tree.h (set_init_label): Add location_t param.
669 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
670 param and use it when issuing error messages about unrecognized
671 field names. Attempt to provide a fixit hint if appropriate,
672 otherwise update the error message to provide the type name.
673
ccfa030f 6742016-06-10 Thomas Schwinge <thomas@codesourcery.com>
675
676 PR c/71381
677 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
678 Loosen checking.
679
732905bb 6802016-06-08 Martin Sebor <msebor@redhat.com>
681 Jakub Jelinek <jakub@redhat.com>
682
683 PR c++/70507
684 PR c/68120
685 * c-typeck.c (convert_arguments): Don't promote last argument
686 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
687
bafc7b1d 6882016-06-08 Marek Polacek <polacek@redhat.com>
689
690 PR c/71418
691 * c-decl.c (grokdeclarator): Check TYPE_P.
692
06e590e7 693 PR c/71426
694 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
695 code.
696
7cfde92a 6972016-06-07 David Malcolm <dmalcolm@redhat.com>
698
699 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
700 and structure element reference, capture the location of the
701 element name token and pass it to build_component_ref.
702 (c_parser_postfix_expression_after_primary): Likewise for
703 structure element dereference.
704 (c_parser_omp_variable_list): Likewise for
705 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
706 * c-tree.h (build_component_ref): Add location_t param.
707 * c-typeck.c (build_component_ref): Add location_t param
708 COMPONENT_LOC. Use it, if available, when issuing hints about
709 mispelled member names to provide a fixit replacement hint.
710
61f1f80c 7112016-06-06 Marek Polacek <polacek@redhat.com>
712
713 PR c/71362
714 * c-parser.c (c_parser_direct_declarator): Set location.
715
e4b92538 7162016-06-06 Marek Polacek <polacek@redhat.com>
717
718 * c-typeck.c (comptypes_internal): Handle comparisons of
719 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
720 TYPE_REF_CAN_ALIAS_ALL.
721
2234363c 7222016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
723
724 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
725 arguments as addressable when async clause exists.
726
b6431756 7272016-05-30 Jakub Jelinek <jakub@redhat.com>
728
729 PR c++/71349
730 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
731 when combined with target construct.
732
6feab9ce 7332016-05-26 Jakub Jelinek <jakub@redhat.com>
734
735 * c-parser.c (c_parser_omp_clause_schedule): Warn if
736 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
737
2c995da9 7382016-05-25 Marek Polacek <polacek@redhat.com>
739
740 PR c/71265
741 * c-decl.c (c_make_fname_decl): Don't check seen_error.
742
abfbb5b5 743 PR c/71266
744 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
745
6d6a3fc3 7462016-05-24 Cesar Philippidis <cesar@codesourcery.com>
747
748 * c-parser.c (c_parser_oacc_declare): Add support for
749 GOMP_MAP_FIRSTPRIVATE_POINTER.
750 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
751 argument with enum c_omp_region_type ort.
752 (handle_omp_array_sections): Likewise. Update call to
753 handle_omp_array_sections_1.
754 (c_finish_omp_clauses): Add specific errors and warning messages for
755 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
756 call to handle_omp_array_sections.
757
c9d624bd 7582016-05-24 Thomas Schwinge <thomas@codesourcery.com>
759
760 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
761
7345b977 7622016-05-24 Richard Biener <rguenther@suse.de>
763
764 PR middle-end/70434
765 PR c/69504
766 * c-typeck.c (build_array_ref): Do not complain about indexing
767 non-lvalue vectors. Adjust for function name change.
768
8bdfbc08 7692016-05-20 Martin Sebor <msebor@redhat.com>
770
771 PR c/71115
772 * c-typeck.c (error_init): Use
773 expansion_point_location_if_in_system_header.
774 (warning_init): Same.
775
97c71d71 7762016-05-19 David Malcolm <dmalcolm@redhat.com>
777
778 PR c/71171
779 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
780 in error-handling.
781 (c_parser_postfix_expression): Likewise.
782 * c-tree.h (c_expr::set_error): New method.
783 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
784 that result's range is initialized.
785
e68d7b49 7862016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
787
788 * c-typeck.c (parser_build_unary_op): Fix formatting.
789
624115b4 7902016-05-16 Matthew Wahab <matthew.wahab@arm.com>
791
792 * c-decl.c (grokdeclarator): Remove errmsg and use of
793 targetm.invalid_return_type.
794 (grokparms): Remove errmsg and use of
795 targetm.invalid_parameter_type.
796
90c88567 7972016-05-13 Joseph Myers <joseph@codesourcery.com>
798
799 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
800 function return type.
801
22a3f7bd 8022016-05-12 Marek Polacek <polacek@redhat.com>
803
804 PR c/70756
805 * c-decl.c (build_compound_literal): Pass LOC down to
806 c_incomplete_type_error.
807 * c-tree.h (require_complete_type): Adjust declaration.
808 (c_incomplete_type_error): Likewise.
809 * c-typeck.c (require_complete_type): Add location parameter, pass it
810 down to c_incomplete_type_error.
811 (c_incomplete_type_error): Add location parameter, pass it down to
812 error_at.
813 (build_component_ref): Pass location down to c_incomplete_type_error.
814 (default_conversion): Pass location down to require_complete_type.
815 (build_array_ref): Likewise.
816 (build_function_call_vec): Likewise.
817 (convert_arguments): Likewise.
818 (build_unary_op): Likewise.
819 (build_c_cast): Likewise.
820 (build_modify_expr): Likewise.
821 (convert_for_assignment): Likewise.
822 (c_finish_omp_clauses): Likewise.
823
54c4d22e 8242016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
825
826 PR c/43651
827 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
828 is enabled.
829 * c-errors.c (pedwarn_c90): Return true if warned.
830 * c-tree.h (pedwarn_c90): Change return type to bool.
831 (enum c_declspec_word): Add new enumerator cdw_atomic.
832
7f8012a5 8332016-05-11 Marek Polacek <polacek@redhat.com>
834
835 PR c++/71024
836 * c-decl.c (diagnose_mismatched_decls): Factor out code to
837 diagnose_mismatched_attributes and call it.
838
3fa82609 8392016-05-10 Marek Polacek <polacek@redhat.com>
840
841 PR c/70255
842 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
843 on a declaration following the definition.
844
871164c4 8452016-05-05 Jakub Jelinek <jakub@redhat.com>
846
847 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
848 parse it through to c_parser_c99_block_statement.
849 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
850 caller.
851
1d52c456 8522016-05-04 Marek Polacek <polacek@redhat.com>
853
854 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
855 OPT_Wdangling_else.
856
a64030fe 8572016-05-04 Marek Polacek <polacek@redhat.com>
858
859 PR c/48778
860 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
861 for macro expansions.
862
5d4db8ef 8632016-05-03 Marek Polacek <polacek@redhat.com>
864
865 PR c/70859
866 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
867 check_builtin_function_arguments.
868
0bd2fc6e 8692016-05-03 Richard Biener <rguenther@suse.de>
870
871 * Make-lang.in (cc1-checksum.c): For stage-final re-use
872 the checksum from the previous stage.
873
b5e88f74 8742016-05-02 Cesar Philippidis <cesar@codesourcery.com>
875
876 * c-parser.c (c_parser_oacc_all_clauses): Update call to
877 c_finish_omp_clauses.
878 (c_parser_omp_all_clauses): Likewise.
879 (c_parser_oacc_cache): Likewise.
880 (c_parser_oacc_loop): Likewise.
881 (omp_split_clauses): Likewise.
882 (c_parser_omp_declare_target): Likewise.
883 (c_parser_cilk_all_clauses): Likewise.
884 (c_parser_cilk_for): Likewise.
885 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
886 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
887
dd185f6e 8882016-05-02 Marek Polacek <polacek@redhat.com>
889
890 PR c/70851
891 * c-decl.c (grokdeclarator): Diagnose when array's size has an
892 incomplete type.
893
4d0a8bac 8942016-04-29 Cesar Philippidis <cesar@codesourcery.com>
895
896 PR middle-end/70626
897 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
898 OACC_LOOP_CLAUSE_MASK.
899 (c_parser_oacc_kernels_parallel): Update call to
900 c_oacc_split_loop_clauses.
901
d215eeca 9022016-04-28 Andrew MacLeod <amacleod@redhat.com>
903
904 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
905 argument to build_modify_expr in two cases.
906
40385231 9072016-04-27 Bernd Schmidt <bschmidt@redhat.com>
908
909 * c-parser.c (c_parser_postfix_expression_after_primary): Call
910 warn_for_memset instead of warning directly here.
911
fa20ebd3 9122016-04-26 Marek Polacek <polacek@redhat.com>
913
914 PR c/67784
915 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
916 out of ...
917 (c_parser_for_statement): ... here.
918 (c_parser_if_statement): Use it.
919 (c_parser_switch_statement): Use it.
920 (c_parser_while_statement): Use it.
921
9db47803 922 PR c/70791
923 * c-decl.c (pushdecl): Pass LOCUS down to warning.
924
70574e60 9252016-04-20 Ilya Verbin <ilya.verbin@intel.com>
926
927 PR c++/69363
928 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
929 instead of c_finish_cilk_clauses.
930 * c-tree.h (c_finish_omp_clauses): Add new default argument.
931 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
932 floating-point variables in the linear clause for Cilk Plus.
933
5d4b30ea 9342016-04-18 Michael Matz <matz@suse.de>
935
936 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
937 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
938
eac243e7 9392016-04-15 Marek Polacek <polacek@redhat.com>
940
941 PR c/70671
942 * c-typeck.c (build_unary_op): Pass location down to error and
943 warning call.
944
b4ba8358 9452016-04-15 Jakub Jelinek <jakub@redhat.com>
946
947 PR c/70436
948 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
949 where needed.
950 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
951 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
952 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
953 Adjust c_parser_pragma callers.
954 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
955 caller.
956 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
957 c_parser_statement.
958 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
959 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
960 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
961 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
962 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
963 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
964 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
965 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
966 down where needed.
967 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
968 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
969 calls.
970
0241e4dc 9712016-04-13 Marek Polacek <polacek@redhat.com>
972
973 PR c/70436
974 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
975 adjust callers.
976 (c_parser_statement): Likewise.
977 (c_parser_c99_block_statement): Likewise.
978 (c_parser_while_statement): Likewise.
979 (c_parser_for_statement): Likewise.
980 (c_parser_if_body): Don't set IF_P here.
981 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
982 about dangling else here.
983 * c-tree.h (c_finish_if_stmt): Adjust declaration.
984 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
985 warn about dangling else here.
986
c4f5465d 9872016-04-04 Marek Polacek <polacek@redhat.com>
988
989 PR c/70307
990 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
991
7952b661 9922016-03-31 Marek Polacek <polacek@redhat.com>
993
994 PR c/70297
995 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
996
5539bc70 9972016-03-18 David Malcolm <dmalcolm@redhat.com>
998
999 PR c/70281
1000 * c-parser.c (c_parser_postfix_expression): Set the source range
1001 for uses of "__builtin_types_compatible_p".
1002
29a514fa 10032016-03-17 Jakub Jelinek <jakub@redhat.com>
1004
1005 PR c/70280
1006 * c-typeck.c (composite_type): Don't count void_list_node
1007 into len, if the list is terminated by void_list_node, start
1008 with void_list_node instead of NULL for newargs. Stop
1009 at void_list_node.
1010
462ca422 10112016-03-16 Marek Polacek <polacek@redhat.com>
1012
1013 PR c/70093
1014 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1015 nested functions returning VM types.
1016
27dcb7a8 10172016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1018
1019 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1020 when calling c_finish_omp_clauses.
1021
2d1d2e55 10222016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1023
1024 PR c/69824
1025 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1026 for later.
1027
6560d1ad 10282016-03-04 Marek Polacek <polacek@redhat.com>
1029
1030 PR c/69798
1031 * c-parser.c (c_parser_postfix_expression): Call
1032 c_parser_cast_expression rather than c_parser_postfix_expression.
1033
40e9ce2d 10342016-03-01 Jakub Jelinek <jakub@redhat.com>
1035
1036 PR c/69796
1037 PR c/69974
1038 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1039 of incomplete decls to error_mark_node.
1040
f0ea75d1 10412016-02-24 Marek Polacek <polacek@redhat.com>
1042
1043 PR c/69819
1044 * c-decl.c (finish_decl): Don't update the copy of the type of a
1045 different decl type.
1046
d41ab738 10472016-02-23 Jakub Jelinek <jakub@redhat.com>
1048
1049 PR objc/69844
1050 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1051 in id_kind reclassification.
1052
7675e968 10532016-02-16 Jakub Jelinek <jakub@redhat.com>
1054
1055 PR c/69835
1056 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1057
28072426 10582016-02-16 James Norris <jnorris@codesourcery.com>
1059
1060 PR c/64748
1061 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1062
74a4140f 10632016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1064
7c25ed5c 1065 * c-decl.c (build_null_declspecs): Zero the entire struct.
1066
74a4140f 1067 PR c/69522
1068 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1069 callers changed. If nested_p is true, use it to call
1070 finish_implicit_inits.
1071 * c-tree.h (finish_implicit_inits): Declare.
1072 * c-typeck.c (finish_implicit_inits): New function. Move code
1073 from ...
1074 (push_init_level): ... here.
1075 (set_designator, process_init_element): Call finish_implicit_inits.
1076
40b38ace 10772016-02-11 Jakub Jelinek <jakub@redhat.com>
1078
1079 PR c/69768
1080 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1081 arguments for -Waddress warning.
1082
6b098e91 10832016-02-04 Jakub Jelinek <jakub@redhat.com>
1084
1085 PR c/69669
1086 * c-decl.c (finish_enum): When honoring mode attribute,
1087 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1088
ff5e28e9 10892016-01-29 Jakub Jelinek <jakub@redhat.com>
1090
1091 PR debug/69518
1092 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1093 all type variants, not just TYPE_MAIN_VARIANT.
1094
78e516eb 10952016-01-27 Jakub Jelinek <jakub@redhat.com>
1096
1097 PR debug/66869
1098 * c-decl.c (c_write_global_declarations_1): Warn with
1099 warn_unused_function if static prototype without definition
1100 is not C_DECL_USED.
1101
fee5e491 11022016-01-27 Marek Polacek <polacek@redhat.com>
1103
1104 PR c/68062
1105 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1106 to unsigned, if needed. Add -Wsign-compare warning.
1107
9bbfd060 11082016-01-26 Jakub Jelinek <jakub@redhat.com>
1109
1110 PR tree-optimization/69483
1111 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1112
6ebc6587 11132016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16d4186f 1114
1115 PR c/24293
1116 * c-tree.h (incomplete_record_decls): Declare.
1117 * c-parser.c (incomplete_record_decls): Define.
1118 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1119 report error if any decl has zero size.
1120 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1121 or enum type to incomplete_record_decls.
1122
4c39e3a5 11232016-01-14 Tom de Vries <tom@codesourcery.com>
1124
1125 PR tree-optimization/68773
1126 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1127 set force_output.
1128
77f35cec 11292016-01-14 Marek Polacek <polacek@redhat.com>
1130
1131 PR c/69262
1132 * c-decl.c (grokdeclarator): Provide more information for invalid
1133 array declarations.
1134
d74214f3 11352016-01-06 David Malcolm <dmalcolm@redhat.com>
1136
1137 * c-parser.c (c_parser_unary_expression): For dereferences, build
1138 a combined location before calling build_indirect_ref, so that
1139 error reports cover the full range, manually updating the c_expr
1140 src_range.
1141
be3c9981 11422016-01-06 Marek Polacek <polacek@redhat.com>
1143
1144 PR sanitizer/69099
1145 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1146 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1147 NULL.
1148
f1717362 11492016-01-04 Jakub Jelinek <jakub@redhat.com>
1150
1151 Update copyright years.
1152
d7d6a3ab 11532016-01-04 Marek Polacek <polacek@redhat.com>
1154
1155 PR c/68908
1156 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1157 optimization to use __atomic_fetch_* built-in if possible.
1158
9d5fd7c6 11592015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1160
1161 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1162 into...
1163 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1164 all users.
1165
37e2d32f 11662015-12-22 Marek Polacek <polacek@redhat.com>
1167
1168 PR c/69002
1169 * c-typeck.c (build_component_ref): Warn when acessing elements of
1170 atomic structures or unions.
1171
c0bf500c 11722015-12-21 David Malcolm <dmalcolm@redhat.com>
1173
1174 * c-typeck.c: Include "gcc-rich-location.h".
1175 (build_binary_op): In the two places that call binary_op_error,
1176 create a gcc_rich_location and populate it with the location of
1177 the binary op and its two operands.
1178
b9f9586a 11792015-12-16 David Malcolm <dmalcolm@redhat.com>
1180
1181 * c-parser.c (c_parser_statement_after_labels): When calling
1182 c_finish_return, Use the return expression's location if it has
1183 one, falling back to the location of the first token within it.
1184 * c-typeck.c (c_finish_return): When issuing warnings about
1185 the incorrect presence/absence of a return value, issue a note
1186 showing the declaration of the function.
1187
dbd79382 11882015-12-16 David Malcolm <dmalcolm@redhat.com>
1189
1190 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1191 to 4.
1192 (c_parser_peek_nth_token): New function.
1193 (c_parser_peek_conflict_marker): New function.
1194 (c_parser_error): Detect conflict markers and report them as such.
1195
e2093e02 11962015-12-16 David Malcolm <dmalcolm@redhat.com>
1197
1198 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1199 to preserve range information for the primary expression
1200 in the call to c_parser_postfix_expression_after_primary.
1201
b49f1fbb 12022015-12-16 David Malcolm <dmalcolm@redhat.com>
1203
1204 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1205 expression location, falling back on the first token location,
1206 rather than always using the latter.
1207
1d65bac2 12082015-12-16 Marek Polacek <polacek@redhat.com>
1209
1210 PR c/64637
1211 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1212 available.
1213
75e722a6 12142015-12-15 Marek Polacek <polacek@redhat.com>
1215
1216 PR c/68907
1217 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1218 artificial decl.
1219
7063d45b 12202015-12-08 David Malcolm <dmalcolm@redhat.com>
1221
1222 * c-parser.c (c_parser_alignof_expression): Capture location of
1223 closing parenthesis (if any), or of end of unary expression, and
1224 use it to build a src_range for the expression.
1225
f73b4782 12262015-12-08 David Malcolm <dmalcolm@redhat.com>
1227
1228 PR c/68757
1229 * c-parser.c (c_parser_get_builtin_args): Add
1230 "out_close_paren_loc" param, and write back to it.
1231 (c_parser_postfix_expression): Capture the closing
1232 parenthesis location for RID_CHOOSE_EXPR,
1233 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1234 RID_BUILTIN_SHUFFLE and use it to set the source range
1235 for such expressions; within RID_BUILTIN_COMPLEX set
1236 the underlying location.
1237
1b062945 12382015-12-07 Marek Polacek <polacek@redhat.com>
1239
1240 PR c/68668
1241 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1242 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1243
a4ab54ac 12442015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1245
1246 * c-tree.h (c_build_va_arg): Adjust prototype.
1247 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1248 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1249 parameter, adjust throughout and issue an error if EXPR is a component
1250 with reverse storage order.
1251
da562e32 12522015-12-02 Jason Merrill <jason@redhat.com>
1253
1254 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1255 (c_fully_fold_internal, decl_constant_value_for_optimization):
1256 Move from c-common.c.
1257 * c-tree.h: Declare decl_constant_value_for_optimization.
1258 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1259
89f16034 12602015-12-02 Joseph Myers <joseph@codesourcery.com>
1261
1262 PR c/68162
1263 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1264 following link from declarator to next declarator. Track original
1265 qualified type and pass it to c_build_qualified_type.
1266 * c-typeck.c (c_build_qualified_type): Add arguments
1267 orig_qual_type and orig_qual_indirect.
1268
2a7545d5 12692015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1270
1271 * c-parser.c (c_parser_omp_clause_name)
1272 (c_parser_oacc_all_clauses): Alphabetical sorting.
1273
ad80582d 12742015-12-02 Jakub Jelinek <jakub@redhat.com>
1275
1276 PR c/68533
1277 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1278 for diagnostics.
1279
571b3486 12802015-12-01 Julian Brown <julian@codesourcery.com>
1281 Cesar Philippidis <cesar@codesourcery.com>
1282 James Norris <James_Norris@mentor.com>
1283
1284 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1285 (c_parser_oacc_clause_use_device): New function.
1286 (c_parser_oacc_all_clauses): Add use_device support.
1287 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1288 (c_parser_oacc_host_data): New function.
1289 (c_parser_omp_construct): Add host_data support.
1290 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1291 * c-typeck.c (c_finish_oacc_host_data): New function.
1292 (c_finish_omp_clauses): Add use_device support.
1293
c4848393 12942015-11-29 Jan Hubicka <hubicka@ucw.cz>
1295
1296 PR c/67106
1297 * c-decl.c: Set TYPE_PACKED in variants.
1298
d4e328e9 12992015-11-27 Martin Liska <mliska@suse.cz>
1300
1301 PR c++/68312
1302 * c-array-notation.c (fix_builtin_array_notation_fn):
1303 Use release_vec_vec instead of vec::release.
1304 (build_array_notation_expr): Likewise.
1305 (fix_conditional_array_notations_1): Likewise.
1306 (fix_array_notation_expr): Likewise.
1307 (fix_array_notation_call_expr): Likewise.
1308
c5e4f591 13092015-11-27 Jakub Jelinek <jakub@redhat.com>
1310
1311 PR c/63326
1312 * c-parser.c (c_parser_compound_statement_nostart): If
1313 last_label is true, use pragma_stmt instead of pragma_compound
1314 as second c_parser_pragma argument.
1315 (c_parser_omp_ordered, c_parser_omp_target_update,
1316 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1317 false as second argument to c_parser_skip_to_pragma_eol after
1318 diagnosing standalone directives used in pragma_stmt context.
1319
c954a5bd 13202015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1321
1322 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1323 with "if (ENABLE_OFFLOADING)".
1324
daebf4f3 13252015-11-23 David Malcolm <dmalcolm@redhat.com>
1326
1327 PR objc/68438
1328 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1329 for various Objective-C constructs: Class.name syntax,
1330 @selector(), @protocol(), @encode(), and [] message syntax.
1331
734caf84 13322015-11-20 David Malcolm <dmalcolm@redhat.com>
1333
1334 PR 62314
1335 * c-typeck.c (should_suggest_deref_p): New function.
1336 (build_component_ref): Special-case POINTER_TYPE when
1337 generating a "not a structure of union" error message, and
1338 suggest a "->" rather than a ".", providing a fix-it hint.
1339
11d8dd6f 13402015-11-19 David Malcolm <dmalcolm@redhat.com>
1341
1342 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1343 candidate into a new function, find_closest_identifier.
1344
62efaf6b 13452015-11-19 Marek Polacek <polacek@redhat.com>
1346
1347 PR c/68412
1348 * c-typeck.c (parser_build_binary_op): Properly handle
1349 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1350
9dfffd6d 13512015-11-17 David Malcolm <dmalcolm@redhat.com>
1352
1353 * c-parser.c (set_c_expr_source_range): Bulletproof both
1354 overloaded implementations against NULL expr->value.
1355 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1356 values.
1357 (c_parser_unary_expression): Likewise when handling addresses of
1358 labels.
1359 (c_parser_postfix_expression): Likewise for statement expressions,
1360 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1361 __builtin_va_arg, and for __builtin_offset_of.
1362 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1363 src_range using the range of the braced initializer.
1364 (c_parser_transaction_expression): Set src_range for "ret" to a
1365 sane pair of values.
1366
c58a4cfd 13672015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1368
1369 * c-parser.c (c_finish_omp_declare_simd): Look for
1370 "simd" attribute as well. Update error message.
1371
5f3001a9 13722015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1373
1374 * c-parser.c (c_parser_omp_declare_target): Adjust.
1375
a9833286 13762015-11-14 Jakub Jelinek <jakub@redhat.com>
1377
1378 * c-typeck.c (c_finish_omp_clauses): Don't mark
1379 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1380
ef61516b 13812015-11-14 Marek Polacek <polacek@redhat.com>
1382
1383 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1384 * c-typeck.c: Likewise.
1385
a96cefb2 13862015-11-13 David Malcolm <dmalcolm@redhat.com>
1387
1388 * c-decl.c (warn_defaults_to): Pass line_table to
1389 rich_location ctor.
1390 * c-errors.c (pedwarn_c99): Likewise.
1391 (pedwarn_c90): Likewise.
1392 * c-parser.c (set_c_expr_source_range): New functions.
1393 (c_token::get_range): New method.
1394 (c_token::get_finish): New method.
1395 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1396 based on the range from the start of the LHS to the end of the
1397 RHS.
1398 (c_parser_conditional_expression): Likewise, based on the range
1399 from the start of the cond.value to the end of exp2.value.
1400 (c_parser_binary_expression): Call set_c_expr_source_range on
1401 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1402 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1403 based on the cast_loc through to the end of the expr.
1404 (c_parser_unary_expression): Likewise, based on the
1405 op_loc through to the end of op.
1406 (c_parser_sizeof_expression) Likewise, based on the start of the
1407 sizeof token through to either the closing paren or the end of
1408 expr.
1409 (c_parser_postfix_expression): Likewise, using the token range,
1410 or from the open paren through to the close paren for
1411 parenthesized expressions.
1412 (c_parser_postfix_expression_after_primary): Likewise, for
1413 various kinds of expression.
1414 * c-tree.h (struct c_expr): Add field "src_range".
1415 (c_expr::get_start): New method.
1416 (c_expr::get_finish): New method.
1417 (set_c_expr_source_range): New decls.
1418 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1419 on ret for prefix unary ops.
1420 (parser_build_binary_op): Likewise, running from the start of
1421 arg1.value through to the end of arg2.value.
1422
7a810b2f 14232015-11-13 Marek Polacek <polacek@redhat.com>
1424
1425 PR c/68320
1426 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1427
b67f0560 14282015-11-13 David Malcolm <dmalcolm@redhat.com>
1429
1430 * c-typeck.c: Include spellcheck.h.
1431 (lookup_field_fuzzy_find_candidates): New function.
1432 (lookup_field_fuzzy): New function.
1433 (build_component_ref): If the field was not found, try using
1434 lookup_field_fuzzy and potentially offer a suggestion.
1435
2fc5e987 14362015-11-12 James Norris <jnorris@codesourcery.com>
1437 Joseph Myers <joseph@codesourcery.com>
1438
1439 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1440 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1441 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1442 and PRAGMA_OMP_CLAUSE_LINK.
1443 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1444 and PRAGMA_OACC_CLAUSE_LINK.
1445 (OACC_DECLARE_CLAUSE_MASK): New definition.
1446 (c_parser_oacc_declare): New function.
1447
28a70e29 14482015-11-12 Marek Polacek <polacek@redhat.com>
1449
1450 PR c/67784
1451 * c-parser.c (c_parser_for_statement): Reclassify the token in
1452 a correct scope.
1453
81b1b2a8 14542015-11-11 Marek Polacek <polacek@redhat.com>
1455
1456 PR c/68107
1457 PR c++/68266
1458 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1459 checking the size of an array.
1460
6e803544 14612015-11-11 Andrew MacLeod <amacleod@redhat.com>
1462
1463 * c-array-notation.c: Remove unused header files.
1464 * c-aux-info.c: Likewise.
1465 * c-convert.c: Likewise.
1466 * c-decl.c: Likewise.
1467 * c-errors.c: Likewise.
1468 * c-lang.c: Likewise.
1469 * c-objc-common.c: Likewise.
1470 * c-parser.c: Likewise.
1471 * c-typeck.c: Likewise.
1472 * gccspec.c: Likewise.
1473
a1b7fe4b 14742015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1475 Cesar Philippidis <cesar@codesourcery.com>
1476 James Norris <jnorris@codesourcery.com>
1477 Julian Brown <julian@codesourcery.com>
1478 Nathan Sidwell <nathan@codesourcery.com>
1479
1480 c/
1481 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1482 routine arg.
1483 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1484 (c_parser_pragma): Parse 'acc routine'.
1485 (OACC_ROUTINE_CLAUSE_MARK): Define.
1486 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1487
7758d608 14882015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1489
1490 PR debug/67192
1491 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1492 location of the backward-goto to the start of the loop body.
1493
c2bf2fb2 14942015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1495
1496 PR debug/67192
1497 * c-parser.c (c_parser_while_statement): Finish the loop before
1498 parsing ahead for misleading indentation.
1499 (c_parser_for_statement): Likewise.
1500
292237f3 15012015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1502
1503 * c-decl.c (finish_struct): If the structure has reverse storage
1504 order, rewrite the type of array fields with scalar component. Call
1505 maybe_apply_pragma_scalar_storage_order on entry.
1506 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1507 errors on bit-fields and reverse SSO here and not...
1508 (c_mark_addressable): ...here.
1509 (output_init_element): Adjust call to initializer_constant_valid_p.
1510 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1511
f0479000 15122015-11-06 David Malcolm <dmalcolm@redhat.com>
1513
1514 * c-decl.c (warn_defaults_to): Update for change in signature
1515 of diagnostic_set_info.
1516 * c-errors.c (pedwarn_c99): Likewise.
1517 (pedwarn_c90): Likewise.
1518 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1519 for textinfo::set_location.
1520
ef014f95 15212015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1522 Thomas Schwinge <thomas@codesourcery.com>
1523 James Norris <jnorris@codesourcery.com>
1524
1525 * c-parser.c (c_parser_omp_clause_name): Add support for
1526 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1527 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1528 default(none) in OpenACC.
1529 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1530 arguments.
1531 (c_parser_oacc_clause_tile): New function.
1532 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1533 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1534 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1535 TILE}.
1536 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1537 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1538 FIRSTPRIVATE}.
1539 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1540 (c_parser_oacc_update): Update the error message for missing clauses.
1541 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1542 and OMP_CLAUSE_INDEPENDENT.
1543
f480ca9a 15442015-11-05 Marek Polacek <polacek@redhat.com>
1545
1546 PR c/68090
1547 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1548 deal with pre-evaluation on invalid types.
1549
9561765e 15502015-11-05 Jakub Jelinek <jakub@redhat.com>
1551 Ilya Verbin <ilya.verbin@intel.com>
1552
1553 * c-parser.c: Include context.h and gimple-expr.h.
1554 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1555 monotonic together with nonmonotonic.
1556 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1557 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1558 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1559 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1560 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1561 expressions on combined target teams before the target.
1562 (c_parser_omp_declare_target): If decl has "omp declare target" or
1563 "omp declare target link" attribute, and cgraph or varpool node already
1564 exists, then set corresponding flags. Call c_finish_omp_clauses
1565 in the parenthesized extended-list syntax case.
1566 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1567 declare target.
1568 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1569 on OMP_CLAUSE_REDUCTION array sections.
1570 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1571 into the constant offset, or for variable low-bound using
1572 POINTER_PLUS_EXPR. For structure element based array sections use
1573 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1574 (c_finish_omp_clauses): Drop generic_field_head, structure
1575 elements are now always mapped even as array section bases,
1576 diagnose same var in data sharing and mapping clauses. Diagnose if
1577 linear step on declare simd is neither a constant nor a uniform
1578 parameter. Look through POINTER_PLUS_EXPR for array section
1579 reductions. Diagnose the same var or function appearing multiple
1580 times on the same directive. Fix up wording for the to clause if t
1581 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1582 modifier on kinds other than dynamic or guided or nonmonotonic
1583 modifier together with ordered clause.
1584
9e10bfb7 15852015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1586 Chung-Lin Tang <cltang@codesourcery.com>
1587
1588 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1589
4cba6f60 15902015-10-29 Andrew MacLeod <amacleod@redhat.com>
1591
1592 * c-array-notation.c: Reorder #include's and remove duplicates.
1593 * c-aux-info.c: Likewise.
1594 * c-convert.c: Likewise.
1595 * c-decl.c: Likewise.
1596 * c-errors.c: Likewise.
1597 * c-lang.c: Likewise.
1598 * c-objc-common.c: Likewise.
1599 * c-parser.c: Likewise.
1600 * c-typeck.c: Likewise.
1601
7b15d957 16022015-10-26 Jim Wilson <jim.wilson@linaro.org>
1603
1604 PR debug/66068
1605 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1606 after calling build_qualified_type.
1607
62c48328 16082015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1609 Thomas Schwinge <thomas@codesourcery.com>
1610 James Norris <jnorris@codesourcery.com>
1611 Joseph Myers <joseph@codesourcery.com>
1612 Julian Brown <julian@codesourcery.com>
1613 Bernd Schmidt <bschmidt@redhat.com>
1614
1615 * c-parser.c (c_parser_oacc_shape_clause): New.
1616 (c_parser_oacc_simple_clause): New.
1617 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1618 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1619
2c4c8725 16202015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1621 James Norris <jnorris@codesourcery.com>
1622 Cesar Philippidis <cesar@codesourcery.com>
1623
1624 PR c/64765
1625 PR c/64880
1626 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1627 parameters, and handle these. Adjust all users.
1628 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1629 into...
1630 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1631 all users.
1632 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1633 declare functions.
1634 (c_finish_omp_construct): Declare function.
1635 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1636 Merge functions into...
1637 (c_finish_omp_construct): ... this new function.
1638
844cece0 16392015-10-22 Richard Biener <rguenther@suse.de>
1640
1641 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1642 before folding a MINUS_EXPR.
1643
5ce1b137 16442015-10-21 Marek Polacek <polacek@redhat.com>
1645
1646 PR c/68024
1647 * c-decl.c (start_function): Warn about vararg functions without
1648 a prototype.
1649
1f137e6d 16502015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1651
1652 * c-typeck.c (build_conditional_expr): Use boolean vector
1653 type for vector comparison.
1654 (build_vec_cmp): New.
1655 (build_binary_op): Use build_vec_cmp for comparison.
1656
8523243e 16572015-10-20 Marek Polacek <polacek@redhat.com>
1658
1659 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1660
3f73be3e 16612015-10-20 Marek Polacek <polacek@redhat.com>
1662
1663 PR c/67964
1664 * c-parser.c (c_parser_attributes): Break out of the loop if the
1665 token after an attribute isn't a comma.
1666
43895be5 16672015-10-13 Jakub Jelinek <jakub@redhat.com>
1668 Aldy Hernandez <aldyh@redhat.com>
1669
1670 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1671 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1672 (c_parser_omp_variable_list): Handle structure elements for
1673 map, to and from clauses. Handle array sections in reduction
1674 clause. Formatting fixes.
1675 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1676 if clause modifiers.
1677 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1678 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1679 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1680 c_parser_omp_clause_is_device_ptr): New functions.
1681 (c_parser_omp_clause_ordered): Parse optional parameter.
1682 (c_parser_omp_clause_reduction): Handle array reductions.
1683 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1684 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1685 functions.
1686 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1687 (c_parser_omp_clause_depend_sink): New function.
1688 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1689 (c_parser_omp_clause_map): Parse release/delete map kinds and
1690 optional always modifier.
1691 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1692 and c_finish_omp_clauses callers.
1693 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1694 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1695 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1696 (OMP_CRITICAL_CLAUSE_MASK): Define.
1697 (c_parser_omp_critical): Parse critical clauses.
1698 (c_parser_omp_for_loop): Handle doacross loops, adjust
1699 c_finish_omp_for and c_finish_omp_clauses callers.
1700 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1701 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1702 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1703 (c_parser_omp_for): Disallow ordered clause when combined with
1704 distribute. Disallow linear clause when combined with distribute
1705 and not combined with simd.
1706 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1707 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1708 parse clauses and if depend clause is found, don't parse a body.
1709 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1710 Allow target parallel without for after it.
1711 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1712 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1713 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1714 invalid kinds.
1715 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1716 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1717 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1718 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1719 functions.
1720 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1721 defaultmap and is_device_ptr clauses.
1722 (c_parser_omp_target): Parse target parallel and target simd. Set
1723 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1724 and target exit data. Diagnose invalid map kinds.
1725 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1726 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1727 construct.
1728 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1729 &omp_priv.
1730 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1731 (c_parser_omp_taskloop): New function.
1732 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1733 handle PRAGMA_OMP_TASKLOOP.
1734 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1735 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1736 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1737 Add IS_OMP argument, handle structure element bases, diagnose
1738 bitfields, pass IS_OMP recursively, diagnose known zero length
1739 array sections in depend clauses, handle array sections in reduction
1740 clause, diagnose negative length even for pointers.
1741 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1742 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1743 array sections in reduction clause, set
1744 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1745 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1746 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1747 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1748
789fbb51 17492015-10-06 Marek Polacek <polacek@redhat.com>
1750
1751 * c-parser.c (c_parser_statement_after_labels): Use
1752 protected_set_expr_location.
1753 (c_parser_omp_clause_num_gangs): Likewise.
1754 (c_parser_omp_clause_num_threads): Likewise.
1755 (c_parser_omp_clause_num_workers): Likewise.
1756 (c_parser_omp_clause_vector_length): Likewise.
1757 (c_parser_omp_clause_num_teams): Likewise.
1758 (c_parser_omp_clause_thread_limit): Likewise.
1759 * c-typeck.c (build_c_cast): Likewise.
1760 (c_cast_expr): Likewise.
1761
20cb53c9 17622015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1763
1764 * c-typeck.c (c_tree_equal): Use real_equal instead of
1765 REAL_VALUES_EQUAL.
1766
6d02e6b2 17672015-10-04 Jason Merrill <jason@redhat.com>
1768
1769 * c-parser.c (c_lex_one_token): Handle @synchronized.
1770 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1771 can change whether the function is transaction_safe.
1772
802c32cd 17732015-10-02 Marek Polacek <polacek@redhat.com>
1774
1775 PR c/67730
1776 * c-typeck.c (convert_for_assignment): Use the expansion point
1777 location throughout.
1778
ef17a71a 17792015-10-02 Marek Polacek <polacek@redhat.com>
1780
1781 PR c/64249
1782 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1783 and pass it down to c_parser_if_statement.
1784 (c_parser_else_body): Add CHAIN parameter and pass it down to
1785 c_parser_statement_after_labels.
1786 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1787 duplicated if-else-if conditions.
1788
7e93eb1a 17892015-10-01 Marek Polacek <polacek@redhat.com>
1790
1791 * c-typeck.c (convert_for_assignment): Improve commentary.
1792
ab4c803c 17932015-09-30 Marek Polacek <polacek@redhat.com>
1794
1795 PR c/67730
1796 * c-typeck.c (c_finish_return): Use the expansion point location for
1797 certain "return with value" warnings.
1798
ed536208 17992015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1800
1801 * c-parser.c (pragma_lex): Add loc argument.
1802
03e8b174 18032015-09-15 Marek Polacek <polacek@redhat.com>
1804
1805 PR c/67580
1806 * c-decl.c (tag_exists_p): New function.
1807 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1808 struct/union/enum keywords are missing.
1809 * c-tree.h (tag_exists_p): Declare.
1810
a39b4dc0 18112015-09-15 Marek Polacek <polacek@redhat.com>
1812
1813 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1814 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1815 Return NULL_TREE instead of 0.
1816 (lookup_name): Return NULL_TREE instead of 0.
1817 (lookup_name_in_scope): Likewise.
1818 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1819 (parser_xref_tag): Use false instead of 0.
1820 (start_struct): Use true instead of 1.
1821 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1822
85f5e2ee 18232015-09-14 Marek Polacek <polacek@redhat.com>
1824
1825 * c-typeck.c (set_nonincremental_init_from_string): Use
1826 HOST_WIDE_INT_M1U when shifting a negative value.
1827
739237d5 18282015-09-09 Mark Wielaard <mjw@redhat.com>
1829
1830 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1831 parm against NULL.
1832
d2b2788c 18332015-09-10 Jakub Jelinek <jakub@redhat.com>
1834
1835 PR c/67502
1836 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1837 into OMP_FOR_PRE_BODY rather than before the loop.
1838
deef87db 18392015-09-09 Jakub Jelinek <jakub@redhat.com>
1840
c43f93d7 1841 PR c/67501
1842 * c-parser.c (c_parser_oacc_all_clauses,
1843 c_parser_omp_all_clauses): Remove invalid clause from
1844 list of clauses even if parser->error is set.
1845
0fdcfb93 1846 PR c/67500
1847 * c-parser.c (c_parser_omp_clause_aligned,
1848 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1849 test for errors.
1850 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1851 error_mark_node.
1852
deef87db 1853 PR c/67495
1854 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1855 instead of c_parser_unary_expression. If the result is !lvalue_p,
1856 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1857
e96292e9 18582015-09-04 Marek Polacek <polacek@redhat.com>
1859
1860 PR sanitizer/67279
1861 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1862
547c6b1f 18632015-09-03 Martin Sebor <msebor@redhat.com>
1864
1865 PR c/66516
6ccd7236 1866 * c-typeck.c (convert_arguments, parser_build_unary_op,
1867 build_conditional_expr, c_cast_expr, convert_for_assignment,
1868 build_binary_op, _objc_common_truthvalue_conversion): Call
547c6b1f 1869 reject_gcc_builtin.
1870 (c_decl_implicit): Define.
1871
bd66724c 18722015-09-02 Marek Polacek <polacek@redhat.com>
1873
1874 PR c/67432
1875 * c-parser.c (c_parser_enum_specifier): Give a better error for
1876 an empty enum.
1877
6dc50383 18782015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1879
1880 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1881
7ad1d78d 18822015-08-12 Marek Polacek <polacek@redhat.com>
1883
1884 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1885 LOC to it.
1886
c9099388 18872015-08-03 Marek Polacek <polacek@redhat.com>
1888
1889 PR c/67088
1890 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1891 Use it.
1892 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1893
9255be07 18942015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1895
1896 * c-parser.c (c_parser_if_body): Take token_indent_info
1897 argument. Call warn_for_misleading_indentation even when the
1898 body is a semicolon. Extract token_indent_infos corresponding
1899 to the guard, body and next tokens. Adjust call to
1900 warn_for_misleading_indentation accordingly.
1901 (c_parser_else_body): Likewise.
1902 (c_parser_if_statement): Likewise.
1903 (c_parser_while_statement): Likewise.
1904 (c_parser_for_statement): Likewise.
1905
dbbd4c6d 19062015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1907 Manuel López-Ibáñez <manu@gcc.gnu.org>
1908
1909 * c-decl.c (get_parm_info): Remove static var. Update warning
1910 message.
1911
6784a472 19122015-07-27 Marek Polacek <polacek@redhat.com>
1913
1914 PR c++/66555
1915 PR c/54979
1916 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1917
8d669e79 19182015-07-20 Marek Polacek <polacek@redhat.com>
1919
1920 PR c++/55095
1921 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1922 (build_binary_op): Warn about left shift overflows.
1923
1eacc14a 19242015-07-09 Andrew MacLeod <amacleod@redhat.com>
1925
1926 * c-array-notation.c: Adjust includes for flags.h changes.
1927 * c-objc-common.c: Likewise.
1928
9ef16211 19292015-07-07 Andrew MacLeod <amacleod@redhat.com>
1930
1931 * c-array-notation.c: Adjust includes.
1932 * c-aux-info.c: Likewise.
1933 * c-convert.c: Likewise.
1934 * c-decl.c: Likewise.
1935 * c-errors.c: Likewise.
1936 * c-lang.c: Likewise.
1937 * c-objc-common.c: Likewise.
1938 * c-parser.c: Likewise.
1939 * c-typeck.c: Likewise.
1940
0949f227 19412015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1942
1943 PR fortran/66605
1944 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1945
be23b16f 19462015-06-29 Marek Polacek <polacek@redhat.com>
1947
1948 PR c/66322
1949 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1950 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1951 about -Wswitch-bool here.
1952 (do_case): Update c_add_case_label call.
1953 (c_finish_case): Update c_do_switch_warnings call.
1954
6290f0db 19552015-06-27 Marek Polacek <polacek@redhat.com>
1956
1957 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1958
aa3e402e 19592015-06-26 Marek Polacek <polacek@redhat.com>
1960
1961 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1962 INDIRECT_REF_P.
1963 * c-typeck.c (array_to_pointer_conversion): Likewise.
1964 (build_unary_op): Likewise.
1965 (c_finish_return): Likewise.
1966
ec2e0095 19672015-06-25 Andrew MacLeod <amacleod@redhat.com>
1968
1969 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1970 * c-parser.c: Likewise.
1971
770ff93b 19722015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1973
1974 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1975 instead of pointer_hash.
1976 (detect_field_duplicates): Likewise.
1977
f48c7f4a 19782015-06-25 Marek Polacek <polacek@redhat.com>
1979
1980 * c-array-notation.c: Use VAR_P throughout.
1981 * c-decl.c: Likewise.
1982 * c-objc-common.c: Likewise.
1983 * c-parser.c: Likewise.
1984 * c-typeck.c: Likewise.
1985
ce41e81a 19862015-06-25 Marek Polacek <polacek@redhat.com>
1987
1988 * c-decl.c: Use is_global_var throughout.
1989 * c-parser.c: Likewise.
1990 * c-typeck.c: Likewise.
1991
f2ab3bac 19922015-06-17 Andrew MacLeod <amacleod@redhat.com>
1993
1994 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1995 * c-aux-info.c: Likewise.
1996 * c-convert.c: Likewise.
1997 * c-decl.c: Likewise.
1998 * c-errors.c: Likewise.
1999 * c-lang.c: Likewise.
2000 * c-objc-common.c: Likewise.
2001 * c-parser.c: Likewise.
2002 * c-typeck.c: Likewise.
2003
647730ab 20042015-06-11 Jan Hubicka <hubicka@ucw.cz>
2005
2006 PR middle-end/66325
2007 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2008 variants.
2009
dd4b0a0d 20102015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2011
2012 * c-decl.c (pop_scope): Register the main translation unit
2013 through the new debug hook.
2014
64486212 20152015-06-08 Andrew MacLeod <amacleod@redhat.com>
2016
2017 * c-array-notation.c : Adjust include files.
2018 * c-aux-info.c : Likewise.
2019 * c-convert.c : Likewise.
2020 * c-decl.c : Likewise.
2021 * c-errors.c : Likewise.
2022 * c-lang.c : Likewise.
2023 * c-lang.h : Likewise.
2024 * c-objc-common.c : Likewise.
2025 * c-parser.c : Likewise.
2026 * c-typeck.c : Likewise.
2027
3a1c9df2 20282015-06-05 Aldy Hernandez <aldyh@redhat.com>
2029
2030 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2031 immediately clobber it.
2032 (c_write_global_declarations_1): Remove call to
2033 check_global_declaration_1.
2034 (c_write_global_declarations_2): Remove.
2035 (c_write_final_cleanups): Rename from c_write_global_declarations.
2036 Remove call to finalize_compilation_unit.
2037 Remove calls to debugging hooks.
2038 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2039 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2040 * c-tree.h: Remove c_write_global_declarations.
2041
f77c0292 20422015-06-04 Andrew MacLeod <amacleod@redhat.com>
2043
2044 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2045 * c-aux-info.c: Likewise.
2046 * c-convert.c: Likewise.
2047 * c-decl.c: Likewise.
2048 * c-errors.c: Likewise.
2049 * c-lang.c: Likewise.
2050 * c-objc-common.c: Likewise.
2051 * c-parser.c: Likewise.
2052 * c-typeck.c: Likewise.
2053
b44134dc 20542015-06-04 Marek Polacek <polacek@redhat.com>
2055
2056 PR c/66341
2057 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2058 it is a lvalue.
2059
d1df0bfc 20602015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2061
2062 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2063 Warn for empty struct.
2064 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2065
f8363c5d 20662015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2067
2068 * c-decl.c (start_function): Call plugin before parsing.
2069 (finish_function): Call plugin after parsing.
2070
5b9761f5 20712015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2072
2073 PR c/49551
2074 * c-decl.c (merge_decls): Merge DECL_COMMON.
2075
eeec71b4 20762015-05-22 Jim Wilson <jim.wilson@linaro.org>
2077
2078 * Make-lang.in (check_gcc_pallelize): Define.
2079
5a4c69dd 20802015-05-22 Marek Polacek <polacek@redhat.com>
2081
2082 PR c/47043
2083 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2084 attributes.
2085
5650b4ff 20862015-05-21 Marek Polacek <polacek@redhat.com>
2087
2088 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2089 DECL_BUILT_IN.
2090
b443c459 20912015-05-20 Marek Polacek <polacek@redhat.com>
2092
2093 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2094 * c-typeck.c: Likewise.
2095
9e73638f 20962015-05-19 Marek Polacek <polacek@redhat.com>
2097
2098 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2099
d7729e26 21002015-05-19 Jakub Jelinek <jakub@redhat.com>
2101
2102 PR middle-end/66199
2103 * c-parser.c (c_parser_omp_for_loop): Don't add
2104 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2105 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2106 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2107 constructs.
2108
dfcf26a5 21092015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2110
2111 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
9e73638f 2112 swaps.
dfcf26a5 2113
09172322 21142015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2115
2116 PR fortran/44054
2117 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2118 accessor function.
2119
aac24642 21202015-05-14 Marek Polacek <polacek@redhat.com>
2121
2122 PR c/66066
2123 PR c/66127
2124 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2125 rather than with 0.
2126
e5f01cba 21272015-05-12 David Malcolm <dmalcolm@redhat.com>
2128
2129 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2130 to add a call to warn_for_misleading_indentation.
2131 (c_parser_else_body): Likewise, adding param "else_loc".
2132 (c_parser_if_statement): Check for misleading indentation.
2133 (c_parser_while_statement): Likewise.
2134 (c_parser_for_statement): Likewise.
2135
dc5945dc 21362015-05-08 Marek Polacek <polacek@redhat.com>
2137
2138 PR c/64918
2139 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2140 (output_init_element): Likewise.
2141
cdc64059 21422015-05-07 Marek Polacek <polacek@redhat.com>
2143
2144 PR c/65179
2145 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2146 value.
2147
6fa7118e 21482015-04-30 Marek Polacek <polacek@redhat.com>
2149
2150 * c-typeck.c (set_init_label): Call error_at instead of error and
2151 pass LOC to it.
2152
98f44804 2153 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2154 the type of a decl.
2155
2cd7caae 2156 * c-typeck.c (c_build_va_arg): Clarify the error message.
2157
95cfd391 21582015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2159
2160 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2161 OMP_STANDALONE_CLAUSES.
2162
e65e39f8 21632015-04-28 Marek Polacek <polacek@redhat.com>
2164
2165 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2166
5580bf42 21672015-04-28 Marek Polacek <polacek@redhat.com>
2168
2169 PR c/65901
2170 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2171
c3468fc2 21722015-04-25 Marek Polacek <polacek@redhat.com>
2173
2174 PR c/52085
2175 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2176 attribute.
2177
0cd6b1b4 21782015-04-23 Marek Polacek <polacek@redhat.com>
2179
2180 PR c/65345
2181 * c-decl.c (set_labels_context_r): New function.
2182 (store_parm_decls): Call it via walk_tree_without_duplicates.
2183 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2184 instead of create_tmp_var. Build TARGET_EXPR instead of
2185 COMPOUND_EXPR.
2186 (build_atomic_assign): Use create_tmp_var_raw instead of
2187 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2188
05a827ce 21892015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2190
2191 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2192 (c_parser_omp_target_update): Add missed %> to error_at ().
2193
de801c28 21942015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2195
2196 PR target/55143
2197 * c-decl.c (c_default_pointer_mode): Remove definition.
2198 * c-tree.h (c_default_pointer_mode): Remove declaration.
2199
c3b1dca4 22002015-03-27 Tobias Burnus <burnus@net-b.de>
2201
2202 PR c/65586
2203 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2204 error out.
2205 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2206 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2207 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2208
1443772f 22092015-03-19 Jakub Jelinek <jakub@redhat.com>
2210
2211 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2212 attribute for DECL_EXTERNAL VAR_DECLs.
2213
76738f56 22142015-03-11 Jakub Jelinek <jakub@redhat.com>
2215
2216 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2217 argument.
2218
16f958b3 22192015-03-10 Jakub Jelinek <jakub@redhat.com>
2220
2221 PR c/65120
2222 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2223 before preparing arguments to warn_logical_not_parentheses.
2224
6054103a 22252015-03-09 Jakub Jelinek <jakub@redhat.com>
2226
2227 PR c/65120
2228 * c-typeck.c (parser_build_binary_op): Don't warn for
2229 !!x == y or !b == y where b is _Bool.
2230
de3a1e03 22312015-03-09 Marek Polacek <polacek@redhat.com>
2232
2233 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2234 * c-decl.c (grokdeclarator): Likewise.
2235 * c-typeck.c (build_binary_op): Likewise.
2236
084e6bf0 22372015-02-27 Marek Polacek <polacek@redhat.com>
2238
2239 PR c/65228
2240 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2241
4d7c4134 22422015-02-14 Marek Polacek <polacek@redhat.com>
2243
2244 PR c/64768
2245 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2246 declared through a typedef name.
2247
b1380826 22482015-02-13 Marek Polacek <polacek@redhat.com>
2249
2250 PR c/65050
2251 * c-decl.c (grokdeclarator): Print also the type when giving
2252 the error message about array's incomplete element type.
2253
35ff54b5 22542015-02-11 Jakub Jelinek <jakub@redhat.com>
2255
2256 PR c/64824
2257 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2258 check in the POP macro.
2259
46861609 22602015-02-09 Marek Polacek <polacek@redhat.com>
2261
2262 PR c/64856
2263 * c-typeck.c (process_init_element): Don't always wrap
2264 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2265 initializing a range of elements.
2266
bbf8fbec 22672015-02-04 Jakub Jelinek <jakub@redhat.com>
2268
2269 PR c/64824
2270 PR c/64868
2271 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2272
46861609 22732015-02-02 Bruno Loff <bruno.loff@gmail.com>
1f0ce3ac 2274
2275 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2276 processing enum declaration.
2277
70279be9 22782015-01-29 Marek Polacek <polacek@redhat.com>
2279
2280 PR c/64709
2281 * c-typeck.c (pop_init_level): If constructor_elements has
2282 exactly one element with integer_zerop value, set constructor_zeroinit
2283 to 1. Remove braces around warning_init call.
2284
591970b4 22852015-01-27 Jakub Jelinek <jakub@redhat.com>
2286
2287 PR c/64766
2288 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2289 of FUNCTION_DECLs with error_mark_node.
2290
87778dc4 22912015-01-26 Jakub Jelinek <jakub@redhat.com>
2292
2293 PR c/64778
2294 * c-typeck.c (convert_arguments): Return -1 if there are
2295 error_args, even if we've diagnosed too many arguments.
2296
cffdfb3d 22972015-01-21 Richard Biener <rguenther@suse.de>
2298
2299 PR middle-end/64313
2300 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2301 for builtins the user declared correctly.
2302
ca4c3545 23032015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2304 Bernd Schmidt <bernds@codesourcery.com>
2305 Cesar Philippidis <cesar@codesourcery.com>
2306 James Norris <jnorris@codesourcery.com>
2307 Jakub Jelinek <jakub@redhat.com>
2308 Ilmir Usmanov <i.usmanov@samsung.com>
2309
2310 * c-parser.c: Include "gomp-constants.h".
2311 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2312 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2313 Use OMP_CLAUSE_SET_MAP_KIND.
2314 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2315 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2316 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2317 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2318 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2319 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2320 "copyout", "create", "delete", "deviceptr", "gang", "host",
2321 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2322 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2323 "present_or_create", "pcreate", "seq", "self", "vector",
2324 "vector_length", "wait", "worker".
2325 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2326 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2327 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2328 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2329 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2330 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2331 (c_parser_oacc_data_clause_deviceptr)
2332 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2333 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2334 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2335 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2336 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2337 (c_parser_oacc_parallel, c_parser_oacc_update)
2338 (c_parser_oacc_wait): New functions.
2339 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2340 (c_finish_oacc_data): New prototypes.
2341 * c-typeck.c: Include "gomp-constants.h".
2342 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2343 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2344 OMP_CLAUSE_SET_MAP_KIND.
2345 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2346 (c_finish_oacc_data): New functions.
2347 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2348 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2349 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2350 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2351 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2352 GOMP_MAP_FORCE_DEVICEPTR.
2353
1f78217c 23542015-01-09 Michael Collison <michael.collison@linaro.org>
2355
2356 * c-array-notation.c: Include hash-set.h, machmode.h,
2357 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2358 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2359 * c-aux-info.c: Ditto.
2360 * c-convert.c: Ditto.
2361 * c-decl.c: Ditto.
2362 * c-errors.c: Ditto.
2363 * c-lang.c: Dittoxs.
2364 * c-objc-common.c: Ditto.
2365 * c-parser.c: Ditto.
2366 * c-typeck.c: Include hash-set.h, machmode.h,
2367 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2368 fold-const.h, wide-int.h, inchash.h, real.h and
2369 fixed-value.h due to flattening of tree.h.
2370
15e18a8c 23712015-01-07 Marek Polacek <polacek@redhat.com>
2372
2373 PR c/64417
2374 * c-typeck.c (process_init_element): Disallow initialization of
2375 a flexible array member with a string constant if the structure
2376 is in an array.
2377
d353bf18 23782015-01-05 Jakub Jelinek <jakub@redhat.com>
2379
823a9dd4 2380 PR sanitizer/64344
2381 * c-typeck.c (convert_for_assignment, c_finish_return): For
2382 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2383 types also set in_late_binary_op around convert call.
2384 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2385 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2386 result on expr as last argument to ubsan_instrument_float_cast,
2387 if in_late_binary_op, don't use c_save_expr but save_expr.
2388
d353bf18 2389 Update copyright years.
2390
92b63884 23912015-01-05 Marek Polacek <polacek@redhat.com>
2392
2393 PR c/64423
2394 * c-typeck.c (build_array_ref): Pass loc down to
2395 warn_array_subscript_with_type_char.
2396
92a44a68 23972014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
8a8211df 2398
2399 * c-typeck.c: New behavious for pointers to arrays with qualifiers
a49621cf 2400 (common-pointer-type): For pointers to arrays take qualifiers from
8a8211df 2401 element type.
a49621cf 2402 (build_conditional_expr): Add warnings for lost qualifiers.
8a8211df 2403 (comp-target-types): Allow pointers to arrays with different qualifiers.
a49621cf 2404 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
8a8211df 2405 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
a49621cf 2406 to PEDWARN_FOR_QUALIFIERS.
8a8211df 2407
35ea0139 24082014-12-17 Jakub Jelinek <jakub@redhat.com>
2409
2410 PR sanitizer/64289
2411 * c-convert.c: Include ubsan.h.
2412 (convert): For real -> integral casts and
2413 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2414 instead instrument the float cast directly.
2415
f9e245b2 24162014-11-29 Jakub Jelinek <jakub@redhat.com>
2417
2418 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2419 c_finish_stmt_expr): Remove NULL last argument from
2420 create_tmp_var_raw and create_tmp_var calls.
2421 * c-array-notation.c (fix_builtin_array_notation_fn,
2422 build_array_notation_expr, fix_conditional_array_notations_1,
2423 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2424
fce2dbd1 24252014-11-28 Marek Polacek <polacek@redhat.com>
2426
2427 PR c/63862
2428 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2429 convert the right operand to integer type.
2430
396c36b7 24312014-11-25 Marek Polacek <polacek@redhat.com>
2432
2433 PR c/63877
2434 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2435 for inline functions.
2436
c61ef207 24372014-11-21 Jakub Jelinek <jakub@redhat.com>
2438
2439 PR target/63764
2440 * c-typeck.c (build_array_ref): Adjust
2441 convert_vector_to_pointer_for_subscript caller. If it returns true,
2442 call non_lvalue_loc on the result.
2443
565353e8 24442014-11-11 Richard Biener <rguenther@suse.de>
2445
2446 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2447 to true.
2448
fdd735a7 24492014-11-10 Andi Kleen <ak@linux.intel.com>
2450
2451 PR c/60804
2452 * c-parser.c (c_parser_statement_after_labels): Call
2453 check_no_cilk.
2454 (c_parser_if_statement): Dito.
2455 (c_parser_switch_statement): Dito.
2456 (c_parser_while_statement): Dito.
2457 (c_parser_do_statement): Dito.
2458 (c_parser_for_statement): Dito.
2459 * c-typeck.c (c_finish_loop): Dito.
2460
0feb4de1 24612014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2462
2463 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2464 OPT_Wshift_count_overflow in the warnings.
2465
a3fec48a 24662014-10-30 Marek Polacek <polacek@redhat.com>
2467
2468 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2469 print the stripped version as well, if they're not the same.
2470
3754d046 24712014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2472
2473 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2474 machine_mode.
2475
1140c305 24762014-10-28 Andrew MacLeod <amacleod@redhat.com>
2477
2478 * c-decl.c: Adjust include files.
2479 * c-parser.c: Ditto.
2480
ab103e33 24812014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2482 Tom Tromey <tromey@redhat.com>
2483
2484 * c-tree.h (enum c_oracle_request): New.
2485 (c_binding_oracle_function): New typedef.
2486 (c_binding_oracle, c_pushtag, c_bind): Declare.
2487 * c-decl.c (c_binding_oracle): New global.
2488 (I_SYMBOL_CHECKED): New macro.
2489 (i_symbol_binding): New function.
2490 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2491 (I_TAG_CHECKED): New macro.
2492 (i_tag_binding): New function.
2493 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2494 (I_LABEL_CHECKED): New macro.
2495 (i_label_binding): New function.
2496 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2497 (c_print_identifier): Save and restore c_binding_oracle.
2498 (c_pushtag, c_bind): New functions.
2499
94ea8568 25002014-10-27 Andrew MacLeod <amacleod@redhat.com>
2501
2502 * c-typeck.c: Adjust include files.
2503
32ecf960 25042014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2505
2506 PR c++/53061
2507 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2508 initialization here...
2509 (c_initialize_diagnostics): ... but here. Set defaults after
2510 building pretty-printer.
2511
2981340f 25122014-10-23 Marek Polacek <polacek@redhat.com>
2513
2514 PR c/63626
2515 * c-decl.c (pop_scope): Don't print warning in external_scope.
2516
d303aeaf 25172014-10-19 Marek Polacek <polacek@redhat.com>
2518
2519 PR c/63567
2520 * c-typeck.c (output_init_element): Allow initializing objects with
2521 static storage duration with compound literals even in C99 and add
2522 pedwarn for it.
2523
bccf97da 25242014-10-17 Marek Polacek <polacek@redhat.com>
2525
2526 PR c/63567
2527 * c-typeck.c (digest_init): Allow initializing objects with static
2528 storage duration with compound literals even in C99 and add pedwarn
2529 for it.
2530
d9c77450 25312014-10-17 Marek Polacek <polacek@redhat.com>
2532
2533 PR c/63543
2534 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2535 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2536 error multiple times. Print the type.
2537
a2bbd0a7 25382014-10-17 Marek Polacek <polacek@redhat.com>
2539
2540 PR c/63549
2541 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2542 type.
2543
e610d2b2 25442014-10-17 Marek Polacek <polacek@redhat.com>
2545
2546 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2547 (start_function): Use OPT_Wimplicit_int instead of 0.
2548 (store_parm_decls_oldstyle): Likewise.
2549
6b6e56b6 25502014-10-17 Alan Modra <amodra@gmail.com>
2551
2552 PR middle-end/61848
2553 * c-decl.c (merge_decls): Don't merge section name or tls model
2554 to newdecl symtab node, instead merge to olddecl. Override
2555 existing olddecl section name. Set tls_model for all thread-local
2556 vars, not just OMP thread-private ones. Remove incorrect comment.
2557
a3020f2f 25582014-10-16 Andrew MacLeod <amacleod@redhat.com>
2559
2560 * c-decl.c: Adjust include files.
2561
9f75f026 25622014-10-14 DJ Delorie <dj@redhat.com>
2563
2564 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2565 (c_token_starts_typename): Check all __intN, not just __int128.
2566 (c_token_starts_declspecs): Likewise.
2567 (c_parser_declspecs): Likewise.
2568 (c_parser_attribute_any_word): Likewise.
2569 (c_parser_objc_selector): Likewise.
2570 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2571 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2572 is specified.
2573 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2574 __int128.
2575 (finish_declspecs): Likewise.
2576
4f284d4a 25772014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2578
a49621cf 2579 * c-parser.c (c_parser_all_labels): New function to replace
4f284d4a 2580 the duplicate code.
a49621cf 2581 (c_parser_statement): Call the new function.
4f284d4a 2582
61a892dc 25832014-10-09 Marek Polacek <polacek@redhat.com>
2584
2585 PR c/63480
2586 * c-typeck.c (pop_init_level): Don't warn about initializing
2587 with { }.
2588
4e888fd9 25892014-10-07 Marek Polacek <polacek@redhat.com>
2590
2591 PR c/59717
2592 * c-decl.c (header_for_builtin_fn): New function.
2593 (implicitly_declare): Suggest which header to include.
2594
224bdd51 25952014-10-07 Marek Polacek <polacek@redhat.com>
2596
2597 * c-convert.c (convert): Use error_operand_p.
2598 * c-typeck.c (require_complete_type): Likewise.
2599 (really_atomic_lvalue): Likewise.
2600 (digest_init): Likewise.
2601 (handle_omp_array_sections_1): Likewise.
2602
a2bc79db 26032014-10-03 Marek Polacek <polacek@redhat.com>
2604
2605 PR c/63453
2606 * c-decl.c (pop_scope): Don't warn about "inline function declared
2607 but never defined" for functions marked with gnu_inline attribute.
2608
4fc4088b 26092014-09-25 Jakub Jelinek <jakub@redhat.com>
2610
2611 PR c++/63249
2612 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2613 on low_bound and length.
2614
5213d6c9 26152014-09-24 Marek Polacek <polacek@redhat.com>
2616
2617 PR c/61405
2618 PR c/53874
2619 * c-parser.c: Don't define CPP_KEYWORD.
2620 (c_parser_switch_statement): Pass original type to c_finish_case.
2621 * c-tree.h (c_finish_case): Update declaration.
2622 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2623 conditionally to c_do_switch_warnings.
2624
6ea2b1bc 26252014-09-03 Marek Polacek <polacek@redhat.com>
2626
2627 PR c/62024
2628 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2629 conversions.
2630
40750995 26312014-09-02 Jakub Jelinek <jakub@redhat.com>
2632 Balaji V. Iyer <balaji.v.iyer@intel.com>
2633 Igor Zamyatin <igor.zamyatin@intel.com>
2634
2635 * c-parser.c (c_parser_cilk_for): New function.
2636 (c_parser_cilk_grainsize): Likewise.
2637 (c_get_temp_regvar): Likewise.
2638 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2639 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2640 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2641 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2642 case.
2643
8c583613 26442014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2645
2646 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2647 with using HOST_WIDE_INT without truncation to 'int'
2648
dc6229e8 26492014-08-22 Marek Polacek <polacek@redhat.com>
2650
2651 PR c++/62199
2652 * c-typeck.c (parser_build_binary_op): Adjust call to
2653 warn_logical_not_parentheses.
2654
5fdda74b 26552014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2656
2657 PR other/62008
2658 * c-parser.c (c_parser_array_notation): Check for correct
2659 type of an array added.
2660
78bf4156 26612014-08-19 Marek Polacek <polacek@redhat.com>
2662
2663 PR c++/62153
2664 * c-typeck.c (build_binary_op): If either operand of a comparison
2665 is a boolean expression, call maybe_warn_bool_compare.
2666
005b8fe7 26672014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2668
2669 PR c/45584
2670 * c-typeck.c (build_c_cast): Do a conversion even when the
2671 TYPE_MAIN_VARIANTs are the same.
2672
508ea33a 26732014-08-19 Marek Polacek <polacek@redhat.com>
2674
2675 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2676 pedwarn_c99 instead of pedwarn.
2677 (grokfield): Likewise.
2678 (warn_defaults_to): New function.
2679 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2680 Unconditionally call pedwarn_c99 instead of pedwarn.
2681 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2682 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2683 check flag_isoc11 before.
2684 * c-errors.c (pedwarn_c99): Change the return type to bool.
2685 Handle -Wc99-c11-compat.
2686 * c-parser.c (disable_extension_diagnostics): Handle
2687 warn_c99_c11_compat.
2688 (restore_extension_diagnostics): Likewise.
2689 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2690 instead of pedwarn, don't check flag_isoc11 before.
2691 (c_parser_declspecs): Likewise.
2692 (c_parser_alignas_specifier): Likewise.
2693 (c_parser_alignof_expression): Likewise.
2694 (c_parser_generic_selection): Likewise.
2695 * c-tree.h (pedwarn_c99): Update declaration.
2696 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2697 of pedwarn_c99.
2698
806fe15e 26992014-08-19 Marek Polacek <polacek@redhat.com>
2700
2701 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2702 to pedwarn_c90.
2703 * c-errors.c: Include "opts.h".
2704 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2705 * c-parser.c (disable_extension_diagnostics): Handle negative value
2706 of warn_c90_c99_compat, too.
2707 (restore_extension_diagnostics): Likewise.
2708 (c_parser_compound_statement_nostart): Pass
2709 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2710
89868e45 27112014-08-12 Marek Polacek <polacek@redhat.com>
2712
2713 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2714 Add pedwarn.
2715 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2716 Likewise.
2717 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2718
92a44a68 27192014-08-10 Marek Polacek <polacek@redhat.com>
890c2e2f 2720
2721 PR c/51849
2722 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2723 Call pedwarn_c90 instead of pedwarn.
2724 (check_bitfield_type_and_width): Likewise.
2725 (declspecs_add_qual): Likewise.
2726 (declspecs_add_type): Likewise.
2727 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2728 Adjust to only call pedwarn_c90.
2729 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2730 pedwarn_c90 instead of pedwarn.
2731 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2732 * c-parser.c (disable_extension_diagnostics): Handle
2733 warn_c90_c99_compat.
2734 (restore_extension_diagnostics): Likewise.
2735 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2736 pedwarn_c90 instead of pedwarn.
2737 (c_parser_initelt): Likewise.
2738 (c_parser_postfix_expression): Likewise.
2739 (c_parser_postfix_expression_after_paren_type): Likewise.
2740 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2741 * c-tree.h: Fix formatting.
2742 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2743 pedwarn_c90 instead of pedwarn.
2744
7149db5f 27452014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2746
2747 * c-typeck.c: Remove include of pointer-set.h.
2748
1c75251e 27492014-08-07 Marek Polacek <polacek@redhat.com>
2750
2751 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2752
06ecf488 27532014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2754
2755 * c-typeck.c: Use hash_map instead of pointer_map.
2756
431205b7 27572014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2758
2759 * c-decl.c: Use hash_set instead of pointer_set.
2760
3394c80c 27612014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2762
2763 PR middle-end/61455
2764 * c-array-notation.c (expand_array_notations): Handling
2765 of DECL_EXPR added.
2766
f22a2cb7 27672014-07-31 Marc Glisse <marc.glisse@inria.fr>
2768
2769 PR c++/60517
2770 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2771 a local variable.
2772
74691f46 27732014-07-30 Tom Tromey <tromey@redhat.com>
2774
2775 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2776 field.
2777 (really_start_incremental_init, push_init_level): Initialize
2778 designator_depth.
2779 (pop_init_level): Set global designator_depth.
2780 (process_init_element): Check for designated_init attribute.
2781
f9767fb6 27822014-07-20 Marek Polacek <polacek@redhat.com>
2783
2784 PR c/61852
2785 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2786 (implicitly_declare): Pass location to implicit_decl_warning.
2787
305d96bc 27882014-07-14 Jakub Jelinek <jakub@redhat.com>
2789
2790 PR middle-end/61294
2791 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2792 If non-NULL, call c_parser_check_literal_zero.
2793 (c_parser_check_literal_zero): New function.
2794 (c_parser_postfix_expression_after_primary): Adjust
2795 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2796
87d59e72 27972014-07-06 Marek Polacek <polacek@redhat.com>
2798
2799 PR c/6940
2800 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2801 * c-tree.h (C_ARRAY_PARAMETER): Define.
2802 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2803 function parameter.
2804
752098c8 28052014-07-02 Jan Hubicka <hubicka@ucw.cz>
92a44a68 2806 Chen Gang <gang.chen.5i5j@gmail.com>
752098c8 2807
2808 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2809 releasing symbol.
2810
1207866e 28112014-07-01 Marek Polacek <polacek@redhat.com>
2812
2813 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2814 instead of 0 to WARN_FOR_ASSIGNMENT.
2815
7a6bbb76 28162014-07-01 Marek Polacek <polacek@redhat.com>
2817
2818 PR c/58286
2819 * c-typeck.c (convert_for_assignment): Pass
2820 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2821
70575064 28222014-06-30 Marek Polacek <polacek@redhat.com>
2823
2824 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2825 has no_sanitize_undefined attribute.
2826
4879e4cf 28272014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2828
2829 PR middle-end/57541
2830 * c-array-notation.c (fix_builtin_array_notation_fn):
2831 Check for 0 arguments in builtin call. Check that bultin argument is
2832 correct.
2833 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2834 index.
2835
45c5b823 28362014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2837
2838 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2839 qualifiers in __auto_type for atomic types.
2840 (c_parser_typeof_specifier): Discard all type qualifiers in
2841 __typeof__ for atomic types.
2842
430b73ee 28432014-06-25 Marek Polacek <polacek@redhat.com>
2844
2845 PR c/61162
2846 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2847 the return expression to c_finish_return.
2848
9580cb79 28492014-06-25 Jakub Jelinek <jakub@redhat.com>
2850
2851 * c-typeck.c (c_finish_omp_clauses): Make sure
2852 OMP_CLAUSE_LINEAR_STEP has correct type.
2853
c1f445d2 28542014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2855
2856 * c-decl.c: Adjust.
2857
e471cc6f 28582014-06-24 Jakub Jelinek <jakub@redhat.com>
2859
2860 * c-parser.c (c_parser_omp_for_loop): For
2861 #pragma omp parallel for simd move lastprivate clause from parallel
2862 to for rather than simd.
2863
499b7390 28642014-06-23 Marek Polacek <polacek@redhat.com>
2865
2866 * c-typeck.c (parser_build_binary_op): Don't call
2867 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2868
5e68df57 28692014-06-15 Jan Hubicka <hubicka@ucw.cz>
2870
2871 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2872 * c-decl.c (merge_decls): Likewise.
2873
064b0d02 28742014-06-09 Marek Polacek <polacek@redhat.com>
2875
2876 PR c/36446
2877 * c-typeck.c (error_init): Call inform instead of error_at.
2878 (pedwarn_init): Call inform instead of pedwarn.
2879 (warning_init): Call inform instead of warning_at.
2880
71e19e54 28812014-06-07 Jan Hubicka <hubicka@ucw.cz>
2882
2883 * c-decl.c (merge_decls): Use set_decl_section_name.
2884 (duplicate_decls): Remove node if it exists.
2885
95cdf3fd 28862014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2887
2888 PR c/53119
2889 * c-typeck.c (push_init_level, process_init_element,
2890 pop_init_level): Correct check for zero initialization, move
2891 missing brace warning to respect zero initialization.
2892
a07f86a6 28932014-06-05 Marek Polacek <polacek@redhat.com>
2894
2895 PR c/56724
2896 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2897
32dc1512 28982014-06-05 Marek Polacek <polacek@redhat.com>
2899
2900 PR c/49706
2901 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2902 on the left hand side operand of a comparison.
2903
64cf1262 29042014-06-05 Marek Polacek <polacek@redhat.com>
2905
2906 PR c/48062
2907 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2908 Print note only if the warning was printed.
2909
071f6d39 29102014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2911
2912 PR c/58942
2913 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2914 with a pointer.
2915
c69ec07d 29162014-06-03 Marek Polacek <polacek@redhat.com>
2917
2918 PR c/60439
2919 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2920 c_start_case.
2921 * c-tree.h (c_start_case): Update.
2922 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2923 switch condition has boolean value.
2924
f7715905 29252014-06-02 Andrew MacLeod <amacleod@redhat.com>
2926
2927 * c-decl.c: Include builtins.h.
2928 * c-parser.c: Likewise.
2929
dcfff6f9 29302014-05-27 Marek Polacek <polacek@redhat.com>
2931
2932 PR c/56724
2933 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2934 error and warning calls to error_at and warning_at. Pass location of
2935 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2936 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2937 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2938
c048c42c 29392014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2940
2941 PR c/61191
2942 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2943 function parameters.
2944
8c016392 29452014-05-23 Jan Hubicka <hubicka@ucw.cz>
2946
2947 * c-decl.c (merge_decls): Preserve symtab node pointers.
2948 (duplicate_decls): Free new decl.
2949
184a718f 29502014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2951
6ce915ef 2952 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2953 initialization.
2954
184a718f 2955 * c-parser.c (c_parser_omp_target): Return bool values.
2956
22ac3f78 29572014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2958
2959 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2960 num_teams_loc variable to num_thread_limit_loc.
2961
3ab4693e 29622014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2963
2964 * c-array-notation.c (expand_array_notations): Use void_node
2965 instead of void_zero_node.
2966
25a27413 29672014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2968
2969 * c-decl.c (finish_struct): Adjust.
2970 (finish_enum): Likewise.
2971 (bind): Adjust.
2972 (record_inline_static): Likewise.
2973 (push_scope): Likewise.
2974 (make_label): Likewise.
2975 (lookup_label_for_goto): Likewise.
2976 (finish_struct): Likewise.
2977 (finish_enum): Likewise.
2978 (store_parm_decls): Likewise.
2979 (c_push_function_context): Likewise.
2980 * c-lang.h: Remove usage of variable_size gty attribute.
2981 * c-parser.c (c_parse_init): Adjust.
2982 (c_parse_file): Likewise.
2983
172b8440 29842014-05-13 Marek Polacek <polacek@redhat.com>
2985
2986 PR c/61162
2987 * c-typeck.c (convert_for_assignment): Pass location to
2988 WARN_FOR_ASSIGNMENT instead of input_location.
2989
c9e51d25 29902014-05-10 Marek Polacek <polacek@redhat.com>
2991
2992 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2993 maybe_warn_string_init.
2994 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2995 maybe_warn_string_init.
2996 * c-tree.h (maybe_warn_string_init): Update declaration.
2997 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2998 Call pedwarn_init with loc instead of with input_location.
2999 (digest_init): Pass init_loc to maybe_warn_string_init.
3000 (pop_init_level): Call pedwarn_init with loc instead of with
3001 input_location.
3002 (set_init_index): Likewise.
3003 (process_init_element): Likewise.
3004
53de1631 30052014-05-09 Marek Polacek <polacek@redhat.com>
3006
3007 PR c/61096
3008 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3009 (c_parser_initelt): Pass location to set_init_label. Pass array index
3010 location to set_init_index.
3011 * c-tree.h (push_init_level): Update declaration.
3012 (pop_init_level): Likewise.
3013 (set_init_index): Likewise.
3014 (set_init_label): Likewise.
3015 * c-typeck.c (error_init): Add location parameter. Call error_at
3016 instead of error.
3017 (digest_init): Pass init_loc to error_init.
3018 (really_start_incremental_init):
3019 (push_init_level): Add location parameter. Pass loc to pop_init_level
3020 and error_init.
3021 (pop_init_level): Likewise.
3022 (set_designator): Add location parameter. Pass loc to pop_init_level,
3023 push_init_level, and error_init.
3024 (set_init_index): Add location parameter. Pass loc to error_init and
3025 set_designator.
3026 (set_init_label): Likewise.
3027 (output_init_element): Pass loc to error_init.
3028 (process_init_element): Pass loc to error_init, pop_init_level,
3029 pedwarn_init, and push_init_level.
3030
3e5a8b00 30312014-05-09 Marek Polacek <polacek@redhat.com>
3032
3033 PR c/50459
3034 * c-parser.c (c_parser_attributes): Parse the arguments as an
3035 expression-list if the attribute takes identifier.
3036
c2c4ae8d 30372014-05-08 Marek Polacek <polacek@redhat.com>
3038
3039 PR c/61053
3040 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3041 TYPE_ALIGN_UNIT.
3042
2026249a 30432014-05-08 Marek Polacek <polacek@redhat.com>
3044
3045 PR c/61077
3046 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3047 of main.
3048
960d5a55 30492014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3050 Mike Stump <mikestump@comcast.net>
3051 Richard Sandiford <rdsandiford@googlemail.com>
3052
3053 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3054 (finish_enum): Use wide-int interfaces.
3055 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3056 * c-typeck.c (build_c_cast): Likewise.
3057 (set_nonincremental_init_from_string): Likewise.
3058 (c_tree_equal): Likewise.
3059
e0e14cbd 30602014-05-02 Marek Polacek <polacek@redhat.com>
3061
3062 PR c/25801
3063 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3064 Return size_one_node when the type is not complete.
3065 (pointer_diff): Remove comment.
3066 (build_unary_op): Improve error messages.
3067
27ff10cb 30682014-05-02 Marek Polacek <polacek@redhat.com>
3069
3070 * c-typeck.c (c_finish_return): Separate warning_at calls.
3071
68410ce9 30722014-05-02 Marek Polacek <polacek@redhat.com>
3073
3074 * c-tree.h (error_init): Remove declaration.
3075 (pedwarn_init): Likewise.
3076 * c-typeck.c (error_init): Make static and move above.
3077 (pedwarn_init): Likewise.
3078 (warning_init): Move above.
3079 (maybe_warn_string_init): Likewise.
3080
e8e27117 30812014-05-01 Jeff Law <law@redhat.com>
3082
3083 Revert:
3084
3085 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3086 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3087 avoid goto.
3088
971df357 30892014-05-02 Marek Polacek <polacek@redhat.com>
3090
3091 PR c/60784
3092 * c-typeck.c (push_init_level): Set constructor_designated to
3093 p->designated for structures.
3094
de548fe5 30952014-05-01 Marek Polacek <polacek@redhat.com>
3096
3097 PR c/60915
3098 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3099 function-definition has an attribute after the declarator.
3100
053a0ded 31012014-05-01 Marek Polacek <polacek@redhat.com>
3102
3103 PR c/60257
3104 * c-typeck.c (warning_init): Add location_t parameter. Call
3105 warning_at instead of warning.
3106 (push_init_level): Pass input_location to warning_init.
3107 (add_pending_init): Add location_t parameter. Pass loc to
3108 warning_init.
3109 (set_nonincremental_init): Pass input_location to add_pending_init.
3110 (set_nonincremental_init_from_string): Likewise.
3111 (output_init_element): Pass loc to warning_init and to
3112 add_pending_init.
3113
694296f2 31142014-05-01 Marek Polacek <polacek@redhat.com>
3115
3116 PR c/43395
3117 * c-typeck.c (c_finish_return): Distinguish between label and variable
3118 when warning about returning local address.
3119
86bbd7f9 31202014-05-01 Marek Polacek <polacek@redhat.com>
3121
3122 PR c/29467
3123 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3124 in C89 mode.
3125
e4ab2ef3 31262014-05-01 Marek Polacek <polacek@redhat.com>
3127
3128 PR c/43245
3129 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3130 instead of 0 to WARN_FOR_QUALIFIERS.
3131
ca3999cb 31322014-05-01 Marek Polacek <polacek@redhat.com>
3133
3134 PR c/56989
3135 * c-typeck.c (default_conversion): Use better location for
3136 error call.
3137
52cc0072 31382014-04-30 Marek Polacek <polacek@redhat.com>
3139
3140 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3141 also when SANITIZE_FLOAT_DIVIDE is on.
3142
af379dd3 31432014-04-30 Marek Polacek <polacek@redhat.com>
3144
3145 PR c/60139
3146 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3147 and pedwarn_init. Use loc insted of input_location.
3148
b069c2a0 31492014-04-30 Marek Polacek <polacek@redhat.com>
3150
3151 PR c/60351
3152 * c-typeck.c (build_binary_op): Use location when warning about
3153 shift count.
3154
4a026b48 31552014-04-25 Marek Polacek <polacek@redhat.com>
3156
3157 PR c/18079
3158 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3159 always_inline/noinline and hot/cold attributes.
3160
adc93f31 31612014-04-25 Marek Polacek <polacek@redhat.com>
3162
3163 PR c/60114
3164 * c-parser.c (c_parser_initelt): Pass input_location to
3165 process_init_element.
3166 (c_parser_initval): Pass loc to process_init_element.
3167 * c-tree.h (process_init_element): Adjust declaration.
3168 * c-typeck.c (push_init_level): Pass input_location to
3169 process_init_element.
3170 (pop_init_level): Likewise.
3171 (set_designator): Likewise.
3172 (output_init_element): Add location_t parameter. Pass loc to
3173 digest_init.
3174 (output_pending_init_elements): Pass input_location to
3175 output_init_element.
3176 (process_init_element): Add location_t parameter. Pass loc to
3177 output_init_element.
3178
e1029911 31792014-04-24 Jakub Jelinek <jakub@redhat.com>
3180
3181 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3182 atomic-clause, allow comma in between atomic-clause and
3183 seq_cst.
3184
9f0a7bc6 31852014-04-22 Jakub Jelinek <jakub@redhat.com>
3186
3187 PR c/59073
3188 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3189 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3190
094da06d 31912014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3192
3193 PR middle-end/60469
3194 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3195 create_tmp_var instead build_decl for creating temps.
3196 (build_array_notation_expr): Likewise.
3197 (fix_conditional_array_notations_1): Likewise.
3198 (fix_array_notation_expr): Likewise.
3199 (fix_array_notation_call_expr): Likewise.
3200
5a672e62 32012014-03-28 Jakub Jelinek <jakub@redhat.com>
3202
3203 PR c++/60689
3204 * c-tree.h (c_build_function_call_vec): New prototype.
3205 * c-typeck.c (build_function_call_vec): Don't call
3206 resolve_overloaded_builtin here.
3207 (c_build_function_call_vec): New wrapper function around
3208 build_function_call_vec. Call resolve_overloaded_builtin here.
3209 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3210 Call c_build_function_call_vec instead of build_function_call_vec.
3211 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3212 * c-decl.c (finish_decl): Likewise.
3213
f40f5e0e 32142014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3215
3216 PR c/55383
3217 * c-typeck.c: Use correct format string in cast-qual warning
3218
9ec099a3 32192014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3220
3221 * c-decl.c (c_decl_attributes): Use
3222 lang_hooks.types.omp_mappable_type.
3223 * c-typeck.c (c_finish_omp_clauses): Likewise.
3224
3bfdc94f 32252014-03-06 Marek Polacek <polacek@redhat.com>
3226
3227 PR c/60197
3228 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3229 of checking tree code.
3230
8f1128f8 32312014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3232
3233 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3234 (c_parser_parameter_declaration): Likewise.
3235
977b1853 32362014-02-19 Marek Polacek <polacek@redhat.com>
3237
3238 PR c/60195
3239 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3240 Call mark_exp_read on exp.value.
3241 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3242 TREE_ADDRESSABLE on old instead of val.
3243 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3244
825cd6ef 32452014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3246
3247 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3248 C_EXPR_APPEND by vec_safe_push.
3249 * c-tree.h (C_EXPR_APPEND): Remove.
3250
ec761d5a 32512014-01-31 Marek Polacek <polacek@redhat.com>
3252
3253 PR c/59963
3254 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3255 build_function_call_vec.
3256 (build_function_call): Likewise.
3257 (build_atomic_assign): Likewise.
3258 (build_function_call_vec): Add arg_loc parameter. Use it.
3259 (convert_arguments): Likewise.
3260 (convert_for_assignment): Rename rhs_loc to expr_loc.
3261 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3262 (c_parser_objc_keywordexpr): Likewise.
3263 (c_parser_postfix_expression_after_primary): Call
3264 build_function_call_vec with expr_loc rather than op_loc.
3265 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3266 build_function_call_vec.
3267 (c_parser_expr_list): Add locations parameter. Fill it with locations
3268 of function arguments.
3269 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3270
22a75734 32712014-01-30 Marek Polacek <polacek@redhat.com>
3272
3273 PR c/59940
3274 * c-typeck.c (build_function_call_vec): Use loc parameter.
3275 (convert_arguments): Add location parameter. Use it.
3276 (ep_convert_and_check): Likewise.
3277 (build_atomic_assign): Adjust convert_for_assignment call.
3278 (build_modify_expr): Likewise.
3279 (digest_init): Likewise.
3280 (c_finish_return): Likewise.
3281 (build_conditional_expr): Adjust ep_convert_and_check calls.
3282 (convert_for_assignment): Add rhs_loc parameter. Use it.
3283 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3284 calls.
3285
29f580ac 32862014-01-30 Richard Biener <rguenther@suse.de>
3287
3288 PR c/59905
3289 * c-typeck.c (build_function_call_vec): Do not replace calls
3290 to a function via an incompatible type with a runtime abort.
3291
a89e6c15 32922014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3293
3294 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3295 flag_enable_cilkplus with flag_cilkplus.
3296 (c_parser_direct_declarator_inner): Likewise.
3297 (c_parser_attribute_any_word): Likewise.
3298 (c_parser_attributes): Likewise.
3299 (c_parser_compound_statement): Likewise.
3300 (c_parser_statement_after_labels): Likewise.
3301 (c_parser_if_statement): Likewise.
3302 (c_parser_switch_statement): Likewise.
3303 (c_parser_do_statement): Likewise.
3304 (c_parser_for_statement): Likewise.
3305 (c_parser_unary_expression): Likewise.
3306 (c_parser_postfix_expression): Likewise.
3307 (c_parser_postfix_expression_after_primary): Likewise.
3308 (c_parser_postfix_expression_after_primary): Likewise.
3309 (c_parser_omp_clause_name): Likewise.
3310 (c_finish_omp_declare_simd): Likewise.
3311 (c_parser_cilk_verify_simd): Likewise.
3312 * c-typeck.c (build_array_ref): Likewise.
3313 (build_function_call_vec): Likewise.
3314 (convert_arguments): Likewise.
3315 (build_compound_expr): Likewise.
3316 (c_finish_return): Likewise.
3317 (c_finish_if_stmt): Likewise.
3318 (c_finish_loop): Likewise.
3319 (build_binary_op): Likewise.
3320
2623625f 33212014-01-23 Marek Polacek <polacek@redhat.com>
3322
3323 PR c/59846
3324 * c-typeck.c (parser_build_binary_op): Use location instead of
3325 input_location.
3326 (build_binary_op): Pass location to shorten_compare.
3327
46da3601 33282014-01-23 Marek Polacek <polacek@redhat.com>
3329
3330 PR c/58346
3331 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3332 an empty aggregate.
3333
9a9db3c1 33342014-01-23 Marek Polacek <polacek@redhat.com>
3335
3336 PR c/59871
3337 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3338 of a comma expression.
3339 (emit_side_effect_warnings): Likewise.
3340
69c9b607 33412014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3342
3343 PR c/59825
3344 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3345 function to use walk_tree and moved a lot of its functionality to
3346 expand_array_notations.
3347 (expand_array_notations): New function.
3348
7e005ab5 33492014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3350
3351 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3352 attribute an attribute without value.
3353
d6779b5f 33542014-01-23 Jakub Jelinek <jakub@redhat.com>
3355
3356 PR middle-end/58809
3357 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3358 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3359
ec431042 33602014-01-22 Marek Polacek <polacek@redhat.com>
3361
3362 PR c/59891
3363 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3364 of remove_c_maybe_const_expr on op1 and op2.
3365
1248c663 33662014-01-15 Jakub Jelinek <jakub@redhat.com>
3367
3368 PR c/58943
3369 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3370 effects, preevaluate rhs using SAVE_EXPR first.
3371
0bc789fc 33722014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3373
3374 PR c++/59631
3375 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3376 statements with if-elseif statements.
3377
6685d11c 33782014-01-06 Marek Polacek <polacek@redhat.com>
3379
3380 PR c/57773
3381 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3382 defined bit-field types only in ISO C.
3383
3aea1f79 33842014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3385
3386 Update copyright years
3387
e4f22041 33882014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3389
3390 * c-array-notation.c: Use the standard form for the copyright notice.
3391
74acc703 33922013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3393
3394 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3395 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3396 field in parser is not empty. If not-empty, call the function
3397 c_parser_finish_omp_declare_simd.
3398 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3399 between SIMD-enabled functions and #pragma simd. Added new parameter.
3400 (c_parser_cilk_all_clauses): Modified the usage of the function
3401 c_parser_cilk_clause_vectorlength as mentioned above.
3402 (c_parser_cilk_simd_fn_vector_attrs): New function.
3403 (c_finish_cilk_simd_fn_tokens): Likewise.
3404 (is_cilkplus_vector_p): Likewise.
3405 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3406 "nomask," and "mask" strings in clause name.
3407 (c_parser_omp_all_clauses): Added 3 new case statements:
3408 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3409 PRAGMA_CILK_CLAUSE_NOMASK.
3410 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3411 check for vector attribute and if so call the function
3412 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3413 called the function c_finish_cilk_simd_fn_tokens.
3414 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3415 parser field is non-empty. If so, parse them as you would parse
3416 the omp declare simd pragma.
3417 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3418 Added a check when step is a parameter and flag it as error.
3419 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3420 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3421 pragma_omp_clause.
3422
395dc01c 34232013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3424
3425 * c-parser.c (c_parser_omp_parallel): Fix description.
3426
433e804e 34272013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3428
3429 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3430 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3431 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3432 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3433
a179a7dc 34342013-12-04 Joseph Myers <joseph@codesourcery.com>
3435
3436 PR c/52023
3437 * c-parser.c (c_parser_alignas_specifier): Use
3438 c_sizeof_or_alignof_type instead of c_alignof.
3439 (c_parser_alignof_expression): Likewise, with min_alignof
3440 parameter depending on alignof spelling used.
3441
bdf1e3c7 34422013-12-04 Marek Polacek <polacek@redhat.com>
3443
3444 PR c/54113
3445 * c-decl.c (start_function): Don't warn for missing prototype for
3446 inline functions.
3447
05e8f674 34482013-12-03 Marek Polacek <polacek@redhat.com>
3449
3450 PR c/59351
3451 * c-decl.c (build_compound_literal): Allow compound literals with
3452 empty initial value.
3453
39f74d66 34542013-12-02 Joseph Myers <joseph@codesourcery.com>
3455
3456 PR c/58235
3457 * c-typeck.c (build_modify_expr): Diagnose assignment to
3458 expression with array type.
3459
f221adca 34602013-11-29 Joseph Myers <joseph@codesourcery.com>
3461
3462 PR c/42262
3463 * c-typeck.c (process_init_element): Do not treat a string as
3464 initializing a whole array when used with a designator for an
3465 individual element.
3466
75bce827 34672013-11-29 Joseph Myers <joseph@codesourcery.com>
3468
3469 PR c/57574
3470 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3471 an inline function following a static declaration.
3472
dc133326 34732013-11-28 Jakub Jelinek <jakub@redhat.com>
3474
3475 PR c/59310
3476 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3477 to p_name before calling c_parser_omp_teams instead of after.
3478 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3479 argument. Remove unused p_name variable.
3480
d09768a4 34812013-11-27 Aldy Hernandez <aldyh@redhat.com>
3482 Jakub Jelinek <jakub@redhat.com>
3483
3484 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3485 external_scope is NULL.
3486
73fd9cbe 34872013-11-27 Tom de Vries <tom@codesourcery.com>
3488 Marc Glisse <marc.glisse@inria.fr>
3489
3490 PR c++/59032
3491 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3492
bc61cadb 34932013-11-22 Andrew MacLeod <amacleod@redhat.com>
3494
3495 * c-typeck.c: Add required include files from gimple.h.
3496
3df42822 34972013-11-22 David Malcolm <dmalcolm@redhat.com>
3498
3499 * c-decl.c (define_label, shadow_tag_warned)
3500 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3501 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3502 (declspecs_add_type): Remove use of in_system_header macro.
3503 * c-parser.c (c_parser_unary_expression): Likewise.
3504 * c-typeck.c (store_init_value, process_init_element)
3505 (c_start_case): Likewise.
3506
3507 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3508 macro.
3509
3510 * c-parser.c (c_parser_set_source_position_from_token): Remove
3511 reference to in_system_header from comment.
3512
08f817b3 35132013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3514
3515 * c-decl.c (grokdeclarator): Update comment to refer to
3516 tree_to_[su]hwi rather than tree_low_cst.
3517
6a0712d4 35182013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3519
3520 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3521 tree_to_uhwi throughout.
3522
fcb97e84 35232013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3524
3525 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3526 throughout.
3527
35ec552a 35282013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3529
3530 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3531 throughout.
3532
f2697631 35332013-11-15 Aldy Hernandez <aldyh@redhat.com>
3534
3535 * c-parser.c (c_parser_cilk_simd): New.
3536 (c_parser_cilk_verify_simd): New.
3537 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3538 (c_parser_omp_for_loop): Add case for NE_EXPR.
3539 Set c_break_label for CILK_SIMD.
3540 (c_parser_cilk_clause_vectorlength): New.
3541 (c_parser_cilk_clause_linear): New.
3542 (c_parser_cilk_clause_name): New.
3543 (c_parser_cilk_all_clauses): New.
3544 * c-typeck.c (build_unary_op): Pass location argument to
3545 readonly_error.
3546 (build_modify_expr): Same.
3547 (build_asm_expr): Same.
3548 (c_finish_bc_stmt): Error on break/continue in loops.
3549
e795d6e1 35502013-11-14 Andrew MacLeod <amacleod@redhat.com>
3551
3552 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3553
9ed99284 35542013-11-14 Diego Novillo <dnovillo@google.com>
3555
3556 * c-decl.c: Include print-tree.h.
3557 Include stor-layout.h.
3558 Include varasm.h.
3559 Include attribs.h.
3560 Include stringpool.h.
3561 * c-lang.c: Include fold-const.h.
3562 * c-parser.c: Include stringpool.h.
3563 Include attribs.h.
3564 Include stor-layout.h.
3565 Include varasm.h.
3566 Include trans-mem.h.
3567 * c-typeck.c: Include stor-layout.h.
3568 Include trans-mem.h.
3569 Include varasm.h.
3570 Include stmt.h.
3571
4fba5eb9 35722013-11-13 Joseph Myers <joseph@codesourcery.com>
3573
3574 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3575 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3576 __auto_type.
3577 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3578 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3579 RID_AUTO_TYPE.
3580 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3581 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3582 (c_parser_declarator, c_parser_direct_declarator_inner)
3583 (c_parser_parameter_declaration, c_parser_type_name): All callers
3584 changed.
3585 (c_parser_declaration_or_fndef): Handle declarations with type
3586 determined from the initializer.
3587
a8783bee 35882013-11-12 Andrew MacLeod <amacleod@redhat.com>
3589
e795d6e1 3590 * c-typeck.c: Include gimplify.h.
a8783bee 3591
d184e0c0 35922013-11-12 Joseph Myers <joseph@codesourcery.com>
3593
3594 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3595 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3596 comment.
3597 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3598 or _Thread_local as appropriate in diagnostics.
3599 (build_null_declspecs): Initialize ret->thread_gnu_p.
3600 (declspecs_add_scspec): Handle either __thread or _Thread_local
3601 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3602 pedantic. Do not disallow _Thread_local extern and _Thread_local
3603 static.
3604
b560fabd 36052013-11-07 Joseph Myers <joseph@codesourcery.com>
3606 Andrew MacLeod <amacleod@redhat.com>
3607
3608 * c-aux-info.c (gen_type): Handle atomic qualifier.
3609 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3610 qualifiers when compating types.
3611 (shadow_tag_warned): Handle atomic_p in declspecs.
3612 (quals_from_declspecs): Likewise.
3613 (start_decl): Use c_type_promotes_to when promoting argument
3614 types.
3615 (grokdeclarator): Handle _Atomic.
3616 (get_parm_info): Diagnose any qualifier on "void" as only
3617 parameter.
3618 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3619 comparing types. Use c_type_promotes_to when promoting argument
3620 types.
3621 (finish_function): Use c_type_promotes_to when promoting argument
3622 types.
3623 (build_null_declspecs): Handle atomic_p in declspecs.
3624 (declspecs_add_qual): Handle RID_ATOMIC.
3625 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3626 (c_token_starts_declspecs): Handle RID_ATOMIC.
3627 (c_parser_declspecs): Handle atomic type specifiers and
3628 qualifiers.
3629 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3630 from types of expressions with atomic type.
3631 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3632 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3633 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3634 (c_parser_statement_after_labels, c_parser_switch_statement)
3635 (c_parser_for_statement, c_parser_expr_no_commas)
3636 (c_parser_conditional_expression, c_parser_binary_expression)
3637 (c_parser_cast_expression, c_parser_unary_expression)
3638 (c_parser_postfix_expression)
3639 (c_parser_postfix_expression_after_primary, c_parser_expression):
3640 Use convert_lvalue_to_rvalue.
3641 (c_parser_expression_conv, c_parser_expr_list): Document
3642 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3643 (c_parser_objc_synchronized_statement): Use
3644 convert_lvalue_to_rvalue.
3645 (c_parser_objc_selector): Handle RID_ATOMIC.
3646 (c_parser_objc_receiver, c_parser_array_notation): Use
3647 convert_lvalue_to_rvalue.
3648 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3649 _Atomic (type-name).
3650 (struct c_declspecs): Add atomic_p field.
3651 (convert_lvalue_to_rvalue): Declare.
3652 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3653 corresponding atomic types.
3654 (qualify_type): Don't add _Atomic qualifiers from second argument.
3655 (comp_target_types): Do not allow _Atomic mismatches.
3656 (type_lists_compatible_p): Do not remove atomic qualifiers when
3657 comparing types.
3658 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3659 (build_atomic_assign): New functions.
3660 (build_unary_op): Use build_atomic_assign for atomic increment and
3661 decrement.
3662 (build_conditional_expr): Do not treat _Atomic void as a qualified
3663 version of void.
3664 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3665 (find_anonymous_field_with_type, convert_to_anonymous_field)
3666 (convert_for_assignment): Do not remove atomic qualifiers when
3667 comparing types.
3668 (digest_init): Do not accept initialization of arrays of atomic
3669 elements by string constants.
3670 (build_asm_expr): Use convert_lvalue_to_rvalue.
3671 (build_binary_op): Do not treat _Atomic void as a qualified
3672 version of void.
3673
8b023e7c 36742013-11-06 DJ Delorie <dj@redhat.com>
3675
3676 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3677 both explicit and builtin, print the location of the explicit one.
3678
c630ef93 36792013-11-05 Tobias Burnus <burnus@net-b.de>
3680
3681 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3682 c_parser_omp_distribute, c_parser_omp_teams,
3683 c_parser_omp_target, c_parser_omp_declare): Handle
3684 -fopenmp-simd.
3685
2c4c3477 36862013-11-03 Marek Polacek <polacek@redhat.com>
3687
3688 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3689
df205251 36902013-11-01 Jakub Jelinek <jakub@redhat.com>
3691
3692 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3693 check_dup_generic at the end, unless remove is true.
3694 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3695 remove = true;.
3696 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3697
23871d0c 36982013-10-31 Jakub Jelinek <jakub@redhat.com>
3699
3700 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3701 with decl that is not pointer nor array.
3702
d037099f 37032013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3704
3705 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3706 a spawning function is found.
3707 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3708 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3709 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3710 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3711 case.
3712 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3713 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3714 expr.
3715 (c_finish_return): Added a check to reject _Cilk_spawn in return
3716 expression.
3717 (build_cilk_spawn): New function.
3718 (build_cilk_sync): Likewise.
3719 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3720
4c90c04c 37212013-10-27 Tobias Burnus <burnus@net-b.de>
3722
3723 PR other/33426
3724 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3725 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3726 (c_parser_statement_after_labels): Update calls.
3727
48a972c8 37282013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 3729
3730 PR other/33426
3731 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3732 Handle PRAGMA_IVDEP.
3733 (c_parser_statement_after_labels): Update call.
3734
12f86df0 37352013-10-24 Marek Polacek <polacek@redhat.com>
3736
3737 * c-parser.c (c_parser_struct_declaration): Add a comment.
3738 (c_parser_declarator): Don't allow _Alignas here.
3739
7740abd8 37402013-10-17 Andrew MacLeod <amacleod@redhat.com>
3741
3742 * c-parser.c: Include omp-low.h.
3743 * c-typeck.c: Likewise.
3744
43d03c23 37452013-10-17 Marek Polacek <polacek@redhat.com>
3746
3747 PR c/58267
3748 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3749 Document syntax of the array-declarator.
3750 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3751 are not permitted.
3752 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3753 (c_parser_struct_declaration): Likewise.
3754 (c_parser_declarator): Likewise.
3755 (c_parser_direct_declarator_inner): Likewise.
3756 (c_parser_parameter_declaration): Likewise.
3757 (c_parser_type_name): Likewise.
3758
bc7bff74 37592013-10-11 Jakub Jelinek <jakub@redhat.com>
3760
3761 * c-lang.h (current_omp_declare_target_attribute): New extern
3762 decl.
3763 * c-parser.c: Include c-lang.h.
3764 (struct c_parser): Change tokens to c_token *.
3765 Add tokens_buf field. Change tokens_avail type to unsigned int.
3766 (c_parser_consume_token): If parser->tokens isn't
3767 &parser->tokens_buf[0], increment parser->tokens.
3768 (c_parser_consume_pragma): Likewise.
3769 (enum pragma_context): Add pragma_struct and pragma_param.
3770 (c_parser_external_declaration): Adjust
3771 c_parser_declaration_or_fndef caller.
3772 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3773 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3774 Adjust recursive call.
3775 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3776 of pragma_external.
3777 (c_parser_parameter_declaration): Use pragma_param instead of
3778 pragma_external.
3779 (c_parser_compound_statement_nostart, c_parser_label,
3780 c_parser_for_statement): Adjust
3781 c_parser_declaration_or_fndef callers.
3782 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3783 it through to c_parser_conditional_expression.
3784 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3785 pass it through to c_parser_binary_expression. Adjust recursive
3786 call.
3787 (c_parser_binary_expression): Remove prec argument, add
3788 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3789 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3790 binop matches it, use build2 instead of parser_build_binary_op.
3791 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3792 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3793 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3794 Handle pragma_struct and pragma_param the same as pragma_external.
3795 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3796 (c_parser_omp_variable_list): Parse array sections for
3797 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3798 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3799 (c_parser_omp_clause_reduction): Handle user defined reductions.
3800 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3801 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3802 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3803 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3804 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3805 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3806 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3807 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3808 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3809 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3810 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3811 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3812 (c_parser_omp_for_loop): Add CODE argument, pass it through
3813 to c_finish_omp_for. Change last argument to cclauses,
3814 and adjust uses to grab parallel clauses from the array of all
3815 the split clauses. Adjust c_parser_binary_expression,
3816 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3817 (omp_split_clauses): New function.
3818 (c_parser_omp_simd): New function.
3819 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3820 Allow the function to be called also when parsing combined constructs,
3821 and call c_parser_omp_simd when parsing for simd.
3822 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3823 #pragma omp section, require exactly one structured-block instead of
3824 sequence of statements.
3825 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3826 Allow the function to be called also when parsing combined constructs.
3827 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3828 Allow the function to be called also when parsing combined
3829 constructs.
3830 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3831 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3832 c_parser_omp_teams, c_parser_omp_target_data,
3833 c_parser_omp_target_update, c_parser_omp_target,
3834 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3835 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3836 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3837 (c_parser_omp_construct): Add p_name and mask vars. Handle
3838 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3839 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3840 and c_parser_omp_sections callers.
3841 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3842 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3843 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3844 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3845 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3846 OMP_CLAUSE_DEPEND.
3847 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3848 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3849 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3850 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3851 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3852 * c-typeck.c: Include tree-inline.h.
3853 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3854 handle_omp_array_sections_1, handle_omp_array_sections,
3855 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3856 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3857 user defined reductions.
3858 (c_tree_equal): New function.
3859 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3860 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3861 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3862 c_check_omp_declare_reduction_r): New prototypes.
3863 * c-decl.c (current_omp_declare_target_attribute): New variable.
3864 (c_decl_attributes): New function.
3865 (start_decl, start_function): Use it instead of decl_attributes.
3866 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3867 c_omp_reduction_decl, c_omp_reduction_lookup,
3868 c_check_omp_declare_reduction_r): New functions.
3869
3ce7d1bd 38702013-09-25 Tom Tromey <tromey@redhat.com>
3871
3872 * Make-lang.in (c/gccspec.o): Remove.
3873 (CFLAGS-c/gccspec.o): New variable.
3874 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3875 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3876 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3877
96da1c1d 38782013-09-25 Tom Tromey <tromey@redhat.com>
3879
3880 * Make-lang.in (c/gccspec.o): Don't use subshell.
3881
1b309377 38822013-09-18 Marek Polacek <polacek@redhat.com>
3883
3884 PR sanitize/58443
3885 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3886 Remove unnecessary check.
3887
05f893e1 38882013-09-18 Marek Polacek <polacek@redhat.com>
3889
3890 PR sanitizer/58411
3891 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3892 no_sanitize_undefined attribute.
3893
bda0b9d2 38942013-09-13 Kai Tietz <ktietz@redhat.com>
3895
3896 PR target/57848
3897 * c-decl.c (c_builtin_function_ext_scope): Remove
3898 wrong assumption that it is never called on prexisting
3899 symbol.
3900
73437615 39012013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3902
3903 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3904
eaab24b9 39052013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3906
3907 * c-objc-common.c (c_tree_printer): Tidy.
3908
9e46467d 39092013-08-30 Marek Polacek <polacek@redhat.com>
3910
3911 * c-typeck.c (build_binary_op): Add division by zero and shift
3912 instrumentation.
3913
f8234178 39142013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
f9086116 3915 Joseph Myers <joseph@codesourcery.com>
f8234178 3916
c90a7d10 3917 PR c/35649
f8234178 3918 * c-typeck.c (c_common_type): Prefer double_type_node over
3919 other REAL_TYPE types with the same precision.
3920 (convert_arguments): Likewise.
3921
6f07f480 39222013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3923
3924 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3925 (c_initialize_diagnostics): Call a destructor for the early printer.
3926
eed6bc21 39272013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3928
3929 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3930 printer initialization.
3931
57717943 39322013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
eed6bc21 3933
57717943 3934 PR c/57490
3935 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3936 check for truth values.
3937 (expand_array_notation_exprs): Added truth values case. Removed an
3938 unwanted else. Added for-loop to walk through subtrees in default
3939 case.
3940
a94db6b0 39412013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3942
3943 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3944
e76163a9 39452013-07-23 Joseph Myers <joseph@codesourcery.com>
3946
3947 * c-parser.c (struct c_generic_association): Fix typo.
3948
7aa04c8d 39492013-07-23 Tom Tromey <tromey@redhat.com>
3950 Joseph Myers <joseph@codesourcery.com>
3951
3952 * c-parser.c (struct c_generic_association): New.
3953 (c_generic_association_d): New typedef.
3954 (c_parser_generic_selection): New function.
3955 (c_parser_postfix_expression): Handle RID_GENERIC.
3956
76bbe4ca 39572013-07-13 Jason Merrill <jason@redhat.com>
3958
3959 PR c++/57793
3960 * c-decl.c (finish_struct): Check for too-large class.
3961
21ebaa24 39622013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 3963
3964 PR c/57821
3965 * c-typeck.c (set_init_index): When folding, check for index overflow.
3966
936c3081 39672013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3968
3969 * c-parser.c (c_parser_array_notation): Removed rejection of array
3970 notations in an array of function pointers.
3971
50acebe0 39722013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3973
3974 * c-array-notation.c (make_triplet_val_inv): New function.
3975 (create_cmp_incr): Likewise.
3976 (create_array_refs): Likewise.
3977 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3978 Also modularized common parts between functions and called the function.
3979 (build_array_notation_expr): Likewise.
3980 (fix_conditional_array_notations_1): Likewise.
3981 (fix_array_notation_expr): Likewise.
3982 (fix_array_notation_call_expr): Likewise.
3983
01e6cdb4 39842013-06-18 Marek Polacek <polacek@redhat.com>
3985
3986 PR c/57630
3987 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3988
6a3adac6 39892013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3990
3991 * c-array-notation.c (build_array_notation_expr): Reject array notation
3992 mismatch between LHS and RHS even inside a call_expr. Also, removed
3993 a couple while statements that were dead code.
3994
62aab3f3 39952013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3996
3997 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3998 excessive precision expressions in function parameters. Also removed
3999 couple unwanted while statements.
4000
bfc83720 40012013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4002
4003 * c-array-notation.c (expand_array_notation_exprs): Added
4004 ARRAY_NOTATION_REF case.
4005
09970d67 40062013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4007
4008 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4009 function to c-family/array-notation-common.c.
4010 (is_cilkplus_reduce_builtin): Likewise.
4011 (find_rank): Likewise.
4012 (extract_array_notation_exprs): Likewise.
4013 (replace_array_notations): Likewise.
4014 (find_inv_trees): Likewise.
4015 (replace_inv_trees): Likewise.
4016 (contains_array_notation_expr): Likewise.
4017 (find_correct_array_notation_type): Likewise.
4018 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4019 (struct inv_list): Moved this to c-family/array-notation-common.c.
4020 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4021
6e13bc01 40222013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4023
4024 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4025 reduction functions outside the for-loop. Added a check if the fundecl
4026 is non-NULL. Finally, removed an unwanted if-statement, and made the
4027 body unconditional.
4028
cc92dddc 40292013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4030
4031 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4032 condition of the if-statement matches the rank of else-block and then-
4033 block when array notations are used.
4034 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4035 expression after the entire function body is parsed.
4036 (c_parser_expr_no_commas): Delayed creating array notation expressions
4037 to the end of function parsing.
4038 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4039 whole if-statement instead of just the condition.
4040 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4041
eddc63fd 40422013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4043
4044 PR c/57474
4045 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4046 array to NULL_TREE if they are unused. Also added a check for the
4047 field to be NULL before its fields are used in future.
4048
a2115a4a 40492013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4050
4051 PR bootstrap/57450
4052 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4053 (build_array_notation_expr): Likewise.
4054
3c6d4197 40552013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4056
4057 * c-typeck.c (build_array_ref): Added a check to see if array's
4058 index is greater than one. If true, then emit an error.
4059 (build_function_call_vec): Exclude error reporting and checking
4060 for builtin array-notation functions.
4061 (convert_arguments): Likewise.
4062 (c_finish_return): Added a check for array notations as a return
4063 expression. If true, then emit an error.
4064 (c_finish_loop): Added a check for array notations in a loop
4065 condition. If true then emit an error.
4066 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4067 (build_binary_op): Added a check for array notation expr inside
4068 op1 and op0. If present, we call another function to find correct
4069 type.
4070 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4071 * c-parser.c (c_parser_compound_statement): Check if array
4072 notation code is used in tree, if so, then transform them into
4073 appropriate C code.
4074 (c_parser_expr_no_commas): Check if array notation is used in LHS
4075 or RHS, if so, then build array notation expression instead of
4076 regular modify.
4077 (c_parser_postfix_expression_after_primary): Added a check for
4078 colon(s) after square braces, if so then handle it like an array
4079 notation. Also, break up array notations in unary op if found.
4080 (c_parser_direct_declarator_inner): Added a check for array
4081 notation.
4082 (c_parser_compound_statement): Added a check for array notation in
4083 a stmt. If one is present, then expand array notation expr.
4084 (c_parser_if_statement): Likewise.
4085 (c_parser_switch_statement): Added a check for array notations in
4086 a switch statement's condition. If true, then output an error.
4087 (c_parser_while_statement): Similarly, but for a while.
4088 (c_parser_do_statement): Similarly, but for a do-while.
4089 (c_parser_for_statement): Similarly, but for a for-loop.
4090 (c_parser_unary_expression): Check if array notation is used in a
4091 pre-increment or pre-decrement expression. If true, then expand
4092 them.
4093 (c_parser_array_notation): New function.
4094 * c-array-notation.c: New file.
4095 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4096
2c1c8a2c 40972013-05-23 Mike Stump <mikestump@comcast.net>
4098
4099 * c-typeck.c (convert_for_assignment): Handle references to memory
4100 spaces better.
4101
be5f9e46 41022013-05-16 Jason Merrill <jason@redhat.com>
4103
4104 * Make-lang.in (cc1$(exeext)): Use link mutex.
4105
9205a6cc 41062013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4107
4108 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4109 to simply use OPT_Wpointer_arith.
4110 (build_unary_op): Likewise.
4111
0b049e15 41122013-04-03 Jakub Jelinek <jakub@redhat.com>
4113
4114 PR c/19449
4115 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4116 argument. If set, or it temporarily for parsing of the first
4117 argument into force_folding_builtin_constant_p.
4118 (c_parser_postfix_expression): Adjust callers.
4119
8e966116 41202013-03-21 Richard Biener <rguenther@suse.de>
4121
4122 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4123 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4124
b862f263 41252013-02-12 Marek Polacek <polacek@redhat.com>
4126
4127 PR c/44938
4128 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4129 origtypes to NULL.
4130
54550ecb 41312013-01-24 Jakub Jelinek <jakub@redhat.com>
4132
4133 PR c/56078
4134 * c-typeck.c (set_nonincremental_init_from_string): If
4135 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4136 returned false.
4137 (process_init_element): Likewise.
4138
035b65e2 41392012-12-20 Jakub Jelinek <jakub@redhat.com>
4140
4141 PR c++/55619
4142 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4143 argument, don't call default_function_array_conversion
4144 nor c_fully_fold here.
4145 (c_parser_asm_statement): Adjust callers.
4146 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4147 and outputs here, and call default_function_array_conversion
4148 on inputs that don't need to be addressable.
4149
7cbb7f1a 41502012-12-18 Jakub Jelinek <jakub@redhat.com>
4151
4152 PR c/39464
4153 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4154 warning require that both c_common_unsigned_type as well as
4155 c_common_signed_type is the same for both mvl and mvr types.
4156
f1f41a6c 41572012-11-16 Diego Novillo <dnovillo@google.com>
4158
4159 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4160
4161 * c-common.c: Use new vec API in vec.h.
4162 * c-common.h: Likewise.
4163 * c-gimplify.c: Likewise.
4164 * c-pragma.c: Likewise.
4165 * c-pretty-print.c: Likewise.
4166 * c-pretty-print.h: Likewise.
4167 * c-semantics.c: Likewise.
4168 * c-decl.c: Likewise.
4169 * c-parser.c: Likewise.
4170 * c-tree.h: Likewise.
4171 * c-typeck.c: Likewise.
4172
8b447d3f 41732012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4174
4175 PR c++/54930
4176 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4177
08fc5390 41782012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4179
4180 PR c/53066
4181 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4182 shadows a function, unless the variable is a function or a
4183 pointer-to-function.
4184
57f872a2 41852012-10-12 Jakub Jelinek <jakub@redhat.com>
4186
4187 PR c/54381
4188 * c-parser.c (struct c_tree_loc_pair): Removed.
4189 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4190 add location_t * and tree * arguments, fill in array of 3
4191 sizeof_arg trees and corresponding locs.
4192 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4193 c_parser_expr_list callers.
4194 (c_parser_postfix_expression_after_primary): Likewise. Pass
4195 array of 3 sizeof_arg trees and locs (corresponding to first
4196 3 arguments) to sizeof_pointer_memaccess_warning.
4197
d1455aa3 41982012-10-09 Lawrence Crowl <crowl@google.com>
4199
4200 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4201 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4202 hash table.
4203
b0e7825e 42042012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4205
4206 PR c++/54194
4207 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4208 call.
4209
41ed701a 42102012-10-09 Marc Glisse <marc.glisse@inria.fr>
4211
4212 PR c++/54427
4213 * c-typeck.c: Include c-common.h.
4214 (enum stv_conv): Moved to c-common.h.
4215 (scalar_to_vector): Moved to c-common.c.
4216 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4217 * Make-lang.in: c-typeck.c depends on c-common.h.
4218
ef34afc1 42192012-10-04 Arnaud Charlet <charlet@adacore.com>
4220
4221 * c-decl.c (c_write_global_declarations): Fix handling of
4222 -fdump-ada-spec*.
4223
7bd765d4 42242012-09-30 Sharad Singhai <singhai@google.com>
4225
4226 * c-decl.c (c_write_global_declarations): Use a different method
4227 to determine if the dump has ben initialized.
4228
c4b1a13a 42292012-09-14 Joseph Myers <joseph@codesourcery.com>
4230
4231 PR c/54552
4232 * c-typeck.c (c_cast_expr): When casting to a type requiring
4233 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4234 c_fully_fold first.
4235
bb554051 42362012-09-14 Joseph Myers <joseph@codesourcery.com>
4237
4238 PR c/54103
4239 * c-typeck.c (build_unary_op): Pass original argument of
4240 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4241 any C_MAYBE_CONST_EXPR, if it has integer operands.
4242 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4243 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4244 to c_objc_common_truthvalue_conversion, then remove any
4245 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4246 c_objc_common_truthvalue_conversion not
4247 c_common_truthvalue_conversion.
4248 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4249 call note_integer_operands for arguments with integer operands
4250 that are not integer constants.
4251
c708c6ef 42522012-09-13 Jakub Jelinek <jakub@redhat.com>
4253
4254 PR c/54559
4255 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4256 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4257
cce20430 42582012-08-31 Jakub Jelinek <jakub@redhat.com>
4259
4260 PR c/54428
4261 * c-convert.c (convert): Don't call fold_convert_loc if
4262 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4263 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4264 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4265
a90d57ed 42662012-08-24 Jakub Jelinek <jakub@redhat.com>
4267
4268 PR c/54355
4269 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4270 for nested and empty_ok arguments in the call to
4271 c_parser_declaration_or_fndef.
4272
f003f5dc 42732012-08-17 Jakub Jelinek <jakub@redhat.com>
4274
4275 * c-tree.h (c_last_sizeof_arg): Declare.
4276 * c-parser.c (struct c_tree_loc_pair): New type.
4277 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4278 non-NULL.
4279 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4280 (c_parser_postfix_expression_after_primary): Likewise. Call
4281 sizeof_pointer_memaccess_warning if needed.
4282 (sizeof_ptr_memacc_comptypes): New function.
4283 * c-typeck.c (c_last_sizeof_arg): New global variable.
4284 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4285
a5656b73 42862012-07-24 Uros Bizjak <ubizjak@gmail.com>
4287
4288 * c-lang.h (lang_decl): Add variable_size GTY option.
4289
b9ed1410 42902012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4291
4292 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4293 * Make-lang.in: Fix dependencies.
4294
e53d55e7 42952012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4296
4297 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4298 and add language Makefile hooks.
4299 * config-lang.in: New file.
4300 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4301 add the required "normal" config-lang.in rules.
4302 * c-lang.h: Moved from gcc/ to here.
4303 * c-tree.h: Likewise.
4304 * c-objc-common.c: Likewise.
4305 * c-objc-common.h: Likewise.
4306 * c-typeck.c: Likewise.
4307 * c-convert.c: Likewise.
4308 * c-lang.c: Likewise.
4309 * c-aux-info.c: Likewise.
4310 * c-errors.c: Likewise.
4311 * gccspec.c: Likewise.
4312 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4313 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4314\f
aad93da1 4315Copyright (C) 2012-2017 Free Software Foundation, Inc.
e53d55e7 4316
4317Copying and distribution of this file, with or without modification,
4318are permitted in any medium without royalty provided the copyright
4319notice and this notice are preserved.