]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR middle-end/79805 (ICE (verify_flow_info failed) with -fnon-call-exceptions -O)
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
324ff1a0
JJ
12017-02-28 Jakub Jelinek <jakub@redhat.com>
2
3 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
4 instead of just cond ? "..." : "...".
5 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
6 for "enter"/"exit" keyword.
7 (c_finish_oacc_routine): Don't use %s to supply portions of the
8 message.
9
4227c9ad
JJ
102017-02-24 Jakub Jelinek <jakub@redhat.com>
11
12 PR c++/79588
13 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
14 handle -Wrestrict here.
15 * c-typeck.c (build_function_call_vec): Adjust
16 check_function_arguments caller.
17
5d972e66
RB
182017-02-23 Richard Biener <rguenther@suse.de>
19
20 PR c/79684
21 * gimple-parser.c (c_parser_gimple_statement): Use set_error
22 to initialize c_exprs to return.
23 (c_parser_gimple_binary_expression): Likewise.
24 (c_parser_gimple_unary_expression): Likewise.
25 (c_parser_gimple_postfix_expression): Likewise.
26
61ac5ebe
MP
272017-02-22 Marek Polacek <polacek@redhat.com>
28
29 PR c/79662
30 * c-typeck.c (convert_arguments): Handle error_mark_node.
31
41d1b0b1
PK
322017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
33
34 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
35 value of c_parser_parse_ssa_name against error_mark_node and emit
36 error if ssa name is anonymous and written as default definition.
37
eab1f169
PK
382017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
39
40 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
41 FMA_EXPR.
42
bcac0b4d
JJ
432017-02-16 Jakub Jelinek <jakub@redhat.com>
44
45 PR c++/79512
46 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
47 ignore #pragma omp target even when not followed by identifier.
48
1be33173
PK
492017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
50
51 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
52 (c_parser_gimple_unary_expression): Likewise.
53
aa326bfb
JJ
542017-02-13 Jakub Jelinek <jakub@redhat.com>
55
56 * c-parser.c (c_parser_oacc_declare): Add missing space in
57 diagnostics.
58
8a398bc5
PK
592017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
60
61 PR c/79478
62 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
63 set_c_expr_source_range when parsing ssa-name.
64
3dcde5ef
PG
652017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
66 Richard Biener <rguenther@suse.de>
67
68 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
69 building IL when arguments are error_mark_node.
70 (c_parser_gimple_unary_expression): Likewise.
71 (c_parser_gimple_if_stmt): Likewise.
72 (c_parser_gimple_switch_stmt): Likewise.
73 (c_parser_gimple_return_stmt): Likewise.
74 (c_parser_parse_ssa_name): When name lookup fails do not build
75 an SSA name. Use undeclared rather than not declared in error
76 reporting.
77
192b048b
MP
782017-02-09 Marek Polacek <polacek@redhat.com>
79
80 PR c/79428
81 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
82 instead of c_parser_skip_until_found.
83
56f71478
JJ
842017-02-09 Jakub Jelinek <jakub@redhat.com>
85
86 PR c/79431
87 * c-parser.c (c_parser_omp_declare_target): Don't invoke
88 symtab_node::get on automatic variables.
89
02889d23
CLT
902016-02-09 Nathan Sidwell <nathan@codesourcery.com>
91 Chung-Lin Tang <cltang@codesourcery.com>
92
93 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
94 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
95 semantic checking.
96 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
97
7af4b20d
RB
982017-02-07 Richard Biener <rguenther@suse.de>
99
100 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
101 (c_parser_gimple_postfix_expression_after_primary):
102 Do not use c_build_function_call_vec to avoid folding and promotion.
103 Simplify.
104
e5e391d6
MO
1052017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
106
107 PR lto/79061
108 * c-decl.c (pop_scope): Pass main_input_filename to
109 build_translation_unit_decl.
110
c2e84327
DM
1112017-01-24 David Malcolm <dmalcolm@redhat.com>
112
113 * c-parser.c: Include "read-rtl-function.h" and
114 "run-rtl-passes.h".
115 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
116 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
117 production. Update for renaming of field "gimple_pass" to
118 "gimple_or_rtl_pass". If __RTL was seen, call
119 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
120 to an auto_timevar, to cope with early exit.
121 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
122 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
123 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
124 Handle RID_RTL.
125 (c_parser_parse_rtl_body): New function.
126 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
127 (struct c_declspecs): Rename field "gimple_pass" to
128 "gimple_or_rtl_pass". Add field "rtl_p".
129 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
130 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
131 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
132 (c_parser_gimple_or_rtl_pass_list): ...this.
133
2ebd93e1
MP
1342017-01-20 Marek Polacek <polacek@redhat.com>
135
136 PR c/64279
137 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
138
b1c95bb5
RB
1392017-01-13 Richard Biener <rguenther@suse.de>
140
141 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
142 nops.
143
25329913
RB
1442017-01-13 Richard Biener <rguenther@suse.de>
145
146 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
147 _Literal ( type-name ) number.
148
6bb4ea5c
RB
1492017-01-12 Richard Biener <rguenther@suse.de>
150
151 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
152 __MEM.
153
6b5b4e9c
JJ
1542017-01-11 Jakub Jelinek <jakub@redhat.com>
155
156 PR c++/72813
157 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
158 PCH file.
159
e3252775
RB
1602017-01-11 Richard Biener <rguenther@suse.de>
161
162 PR bootstrap/79052
163 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
164 returns on parse errors.
165
a9342885
MP
1662017-01-04 Marek Polacek <polacek@redhat.com>
167
168 PR c++/64767
169 * c-parser.c (c_parser_postfix_expression): Mark zero character
170 constants by setting original_type in c_expr.
171 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
172 with a zero character constant.
173 (char_type_p): New function.
174
5dd9a9d0
DM
1752017-01-04 David Malcolm <dmalcolm@redhat.com>
176
177 * c-parser.c (c_parser_declaration_or_fndef): Create a
178 rich_location at init_loc and parse it to start_init.
179 (last_init_list_comma): New global.
180 (c_parser_braced_init): Update last_init_list_comma when parsing
181 commas. Pass it to pop_init_level. Pass location of closing
182 brace to pop_init_level.
183 (c_parser_postfix_expression_after_paren_type): Create a
184 rich_location at type_loc and parse it to start_init.
185 (c_parser_omp_declare_reduction): Likewise for loc.
186 * c-tree.h (start_init): Add rich_location * param.
187 (pop_init_level): Add location_t param.
188 * c-typeck.c (struct initializer_stack): Add field
189 "missing_brace_richloc".
190 (start_init): Add richloc param, use it to initialize
191 the stack node's missing_brace_richloc.
192 (last_init_list_comma): New decl.
193 (finish_implicit_inits): Pass last_init_list_comma to
194 pop_init_level.
195 (push_init_level): When finding missing open braces, add fix-it
196 hints to the richloc.
197 (pop_init_level): Add "insert_before" param and pass it
198 when calling pop_init_level. Add fixits about missing
199 close braces to any richloc. Use the richloc for the
200 -Wmissing-braces warning.
201 (set_designator): Pass last_init_list_comma to pop_init_level.
202 (process_init_element): Likewise.
203
cbe34bb5
JJ
2042017-01-01 Jakub Jelinek <jakub@redhat.com>
205
206 Update copyright years.
207
d17680f3
JJ
2082016-12-21 Jakub Jelinek <jakub@redhat.com>
209
0dba7960
JJ
210 PR bootstrap/78817
211 * c-typeck.c (build_function_call_vec): If check_function_arguments
212 returns true, set TREE_NO_WARNING on CALL_EXPR.
213
d17680f3
JJ
214 PR c/77767
215 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
216 to *expr instead of overwriting it.
217
aa90531e
RB
2182016-12-20 Richard Biener <rguenther@suse.de>
219
220 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
221 error recovery.
222 (c_parser_gimple_statement): Only build assigns for non-error
223 stmts.
224 (c_parser_gimple_postfix_expression_after): Improve error recovery.
225
629b3d75
MJ
2262016-12-14 Martin Jambor <mjambor@suse.cz>
227
228 * c-parser.c: Include omp-general.h and omp-offload.h instead of
229 omp-low.h.
230 (c_finish_oacc_routine): Adjusted call to
231 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
232 to use their new names.
233 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
234 use its new name.
235 (c_parser_oacc_update): Likewise.
236 (c_parser_omp_simd): Likewise.
237 (c_parser_omp_target_update): Likewise.
238 * c-typeck.c: Include omp-general.h instead of omp-low.h.
239 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
240 name.
241 (c_finish_omp_cancellation_point): Likewise.
242 * gimple-parser.c: Do not include omp-low.h
243
c5af52eb
CP
2442016-12-02 Cesar Philippidis <cesar@codesourcery.com>
245 James Norris <jnorris@codesourcery.com>
246
247 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
248 EXIT_DATA,WAIT} are not used in compound statements.
249 (c_parser_oacc_enter_exit_data): Update diagnostics.
250
48330c93
BE
2512016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
252
253 PR c++/71973
254 * c-decl.c (diagnose_mismatched_decls): Use
255 OPT_Wbuiltin_declaration_mismatch here too.
256
899ca90e 2572016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
258 Alan Hayward <alan.hayward@arm.com>
259 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
260
261 * c-decl.c (merge_decls): Use SET_DECL_MODE.
262 (make_label, finish_struct): Likewise.
263
1ee62b92 2642016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 265 Richard Biener <rguenther@suse.de>
22b15758 266
8e745a17
JJ
267 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
268 * config-lang.in (gtfiles): Add c/c-parser.h.
269 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
270 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
271 * c-parser.c (enum c_id_kind, struct c_token,
272 c_parser_next_token_is, c_parser_next_token_is_not,
273 c_parser_next_token_is_keyword,
274 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
275 Split out to ...
276 * c-parser.h: ... new header.
277 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 278 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
279 c_token_starts_typename, c_parser_next_token_starts_declspecs,
280 c_parser_next_tokens_start_declaration, c_parser_consume_token,
281 c_parser_error, c_parser_require, c_parser_skip_until_found,
282 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
283 c_parser_type_name): Export.
284 (c_parser_tokens_buf): New function.
285 (c_parser_error): Likewise.
286 (c_parser_set_error): Likewise.
287 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
288 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
289 via c_parser_parse_gimple_body.
8e745a17
JJ
290 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
291 c_token_starts_typename, c_parser_next_token_starts_declspecs,
292 c_parser_next_tokens_start_declaration, c_parser_consume_token,
293 c_parser_error, c_parser_require, c_parser_skip_until_found,
294 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
295 c_parser_type_name): Declare.
1ee62b92
PG
296 (struct c_parser): Declare forward.
297 (c_parser_tokens_buf): Declare.
8e745a17
JJ
298 (c_parser_error): Likewise.
299 (c_parser_set_error): Likewise.
300 * gimple-parser.c: New file.
301 * gimple-parser.h: Likewise.
1ee62b92 302
22b15758
UB
3032016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
304
305 PR c/35503
306 * c-parser.c (c_parser_postfix_expression_after_primary): Call
307 warn_for_restrict.
308
84ff4775
LCW
3092016-09-11 Le-Chun Wu <lcwu@google.com>
310 Mark Wielaard <mjw@redhat.com>
311
312 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
313 to the given -Wshadow= variant.
314
4d0cdd0c
TP
3152016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
316
317 * c-typeck.c: Include memmodel.h.
318
1202f33e
JJ
3192016-10-13 Jakub Jelinek <jakub@redhat.com>
320
321 PR target/77957
322 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
323 instead of lhd_return_null_tree_v.
324
8a14afd0
BS
3252016-10-07 Bernd Schmidt <bschmidt@redhat.com>
326
327 PR c++/69733
328 * c-decl.c (smallest_type_quals_location): New static function.
329 (grokdeclarator): Try to find the correct location for an ignored
330 qualifier.
331
81fea426
MP
3322016-09-26 Marek Polacek <polacek@redhat.com>
333
334 PR c/7652
335 * c-decl.c (pop_scope): Add gcc_fallthrough.
336
3372016-09-26 Marek Polacek <polacek@redhat.com>
338
339 PR c/7652
340 * c-parser.c (struct c_token): Add flags field.
341 (c_lex_one_token): Pass it to c_lex_with_flags.
342 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
343 into IFN_FALLTHROUGH.
344 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
345 attribute fallthrough after a case label or default label.
346 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
347
9a2300e9
MP
3482016-09-24 Marek Polacek <polacek@redhat.com>
349
350 PR c/77490
351 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
352 have boolean value. Warn about ++/-- on booleans.
353
7de76362
JJ
3542016-09-23 Jakub Jelinek <jakub@redhat.com>
355
356 * c-parser.c (incomplete_record_decls): Remove unnecessary
357 = vNULL initialization of file scope vec.
358
5b73d2ab
MP
3592016-09-16 Marek Polacek <polacek@redhat.com>
360
361 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
362
e51fbec3
MP
3632016-09-14 Marek Polacek <polacek@redhat.com>
364
365 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
366 (fix_array_notation_expr): Likewise.
367 * c-decl.c (finish_decl): Likewise.
368 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
369 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
370 (function_to_pointer_conversion): Use false instead of 0.
371 (convert_lvalue_to_rvalue): Likewise.
372 (parser_build_unary_op): Likewise.
373 (build_atomic_assign): Likewise.
374 (build_unary_op): Change nonconvert parameter type to bool, use
375 true/false instead of 1/0.
376 (build_binary_op): Use true instead of 1.
377
254830ba
DM
3782016-09-13 David Malcolm <dmalcolm@redhat.com>
379
380 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
381 of add_fixit_insert to add_fixit_insert_before.
382
4c13ba17
MP
3832016-09-13 Marek Polacek <polacek@redhat.com>
384
385 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
386 it.
387
54dcdb88
BE
3882016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
389
390 PR c++/77496
391 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
392 COMPOUND_EXPR to warn_for_omitted_condop.
393
e5106e27
DM
3942016-09-07 David Malcolm <dmalcolm@redhat.com>
395
396 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
397 c_get_substring_location for this new langhook.
398
9dc5773f
JJ
3992016-09-02 Jakub Jelinek <jakub@redhat.com>
400
401 PR c/65467
402 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
403 flag_openmp.
404 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
405 instead of mark_exp_read on low_bound/length expression.
406 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
407 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
408 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
409 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
410 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
411 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
412 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
413 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
414 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
415 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
416 instead of mark_expr_read.
417 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
418 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
419 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
420 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
421 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
422 array section bases outside of depend clause, for depend clause
423 use convert_lvalue_to_rvalue on the base.
424 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
425 linear, aligned, map, to and from clauses.
426 (c_omp_clause_copy_ctor): New function.
427
295844f6
MP
4282016-09-01 Marek Polacek <polacek@redhat.com>
429
430 PR c/7652
431 * c-typeck.c (composite_type): Add FALLTHRU comment.
432
089af25c
DM
4332016-08-31 David Malcolm <dmalcolm@redhat.com>
434
435 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
436 to the insertion fixits for "struct", "union", and "enum".
437
f9087798
DM
4382016-08-30 David Malcolm <dmalcolm@redhat.com>
439
440 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
441 rather than add_fixit_misspelled_id.
442 (undeclared_variable): Likewise.
443 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
444 now-redundant "here" params from add_fixit_insert method calls.
445 (c_parser_parameter_declaration): Likewise.
446 * c-typeck.c (build_component_ref): Remove now-redundant range
447 param from add_fixit_replace method calls.
448
ebef225f
MP
4492016-08-25 Marek Polacek <polacek@redhat.com>
450
451 * c-typeck.c (parser_build_binary_op): Pass LHS to
452 warn_logical_not_parentheses.
453
fe377a48
MP
4542016-08-25 Marek Polacek <polacek@redhat.com>
455
456 PR c/77323
457 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
458 or _FloatN or _FloatNx is not supported.
459 (finish_declspecs): Set type to integer_type_node when _FloatN or
460 _FloatNx is not supported.
461
c65699ef
JM
4622016-08-19 Joseph Myers <joseph@codesourcery.com>
463
464 PR c/32187
465 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
466 (struct c_declspecs): Add field floatn_nx_idx.
467 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
468 and _FloatNx type specifiers.
469 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
470 (c_parser_declspecs, c_parser_attribute_any_word)
471 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
472 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
473 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
474 narrower than double.
475
2f1364c2
JJ
4762016-08-12 Jakub Jelinek <jakub@redhat.com>
477 Martin Liska <mliska@suse.cz>
478
479 PR c/67410
480 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
481 % to determine val element to change. Assert that
482 wchar_bytes * charwidth fits into val array.
483
191816a3
MP
4842016-08-12 Marek Polacek <polacek@redhat.com>
485
486 PR c/7652
487 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
488 (c_parser_postfix_expression): Likewise.
489 * c-typeck.c (build_unary_op): Adjust fall through comment.
490 (c_mark_addressable): Likewise.
491
b95a64bb
JJ
4922016-08-11 Jakub Jelinek <jakub@redhat.com>
493
494 PR c/72816
495 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
496 array member through typedef, for orig_qual_indirect == 0 clear
497 orig_qual_type.
498
895aa8e1
DM
4992016-08-08 David Malcolm <dmalcolm@redhat.com>
500
501 PR c/64955
502 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
503 this up to selftest::run_c_tests.
504 (selftest::run_c_tests): New function.
505
0b212d8c
TS
5062016-08-04 Thomas Schwinge <thomas@codesourcery.com>
507
ae9281fc
TS
508 * c-parser.c (struct oacc_routine_data): Add error_seen and
509 fndecl_seen members.
510 (c_finish_oacc_routine): Use these.
511 (c_parser_declaration_or_fndef): Adjust.
512 (c_parser_oacc_routine): Likewise. Support more C language
513 constructs, and improve diagnostics. Move pragma context
514 checking...
515 (c_parser_pragma): ... here.
516
0b212d8c
TS
517 * c-parser.c (struct oacc_routine_data): New.
518 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
519 Simplify code.
520 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
521 declare target" attribute.
522
76e2c821
JB
5232016-08-01 Jan Beulich <jbeulich@suse.com>
524
525 * c-fold.c (c_fully_fold_internal): Also emit shift count
526 warnings for vector types.
527 * c-typeck.c (build_binary_op): Likewise.
528
f618a472
MP
5292016-07-29 Marek Polacek <polacek@redhat.com>
530
531 PR c/71742
532 * c-decl.c (finish_struct): Rephrase an error message.
533
efd0786f
MP
534 PR c/71853
535 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
536 to error node for invalid code.
537
e00dceaf
MP
538 PR c/71573
539 * c-decl.c (implicitly_declare): Return decl early not only for
540 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
541
673a107a
JJ
5422016-07-29 Jakub Jelinek <jakub@redhat.com>
543
544 PR c/71969
545 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
546 on GNU extern inline functions.
547
a5b5c8b6
MP
5482016-07-29 Marek Polacek <polacek@redhat.com>
549
550 PR c/71583
551 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
552 check expr.value.
553
e3fe09c1
UB
5542016-07-22 Uros Bizjak <ubizjak@gmail.com>
555
556 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
557
7c8f7eaa
DM
5582016-07-20 David Malcolm <dmalcolm@redhat.com>
559
560 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
561 spellcheck-tree.h
562 (best_macro_match): Likewise, converting from a typedef to a
563 subclass.
564 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
565 (lookup_name_fuzzy): Update for change of best_macro_match to a
566 subclass with a ctor that calls cpp_forall_identifiers.
567
de6a69ee
DM
5682016-07-20 David Malcolm <dmalcolm@redhat.com>
569
570 * c-decl.c (implicit_decl_warning): Update for conversion of
571 return type of lookup_name_fuzzy to const char *.
572 (undeclared_variable): Likewise.
573 (lookup_name_fuzzy): Convert return type from tree to
574 const char *.
575 * c-parser.c (c_parser_declaration_or_fndef): Update for
576 conversion of return type of lookup_name_fuzzy to const char *.
577 (c_parser_parameter_declaration): Likewise.
578
b1c9c068
CP
5792016-07-15 Cesar Philippidis <cesar@codesourcery.com>
580
581 * c-parser.c (c_parser_oacc_declare): Don't scan for
582 GOMP_MAP_POINTER.
583 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
584 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
585 zero-length subarrays.
586
ddbbcb19
JJ
5872016-07-15 Jakub Jelinek <jakub@redhat.com>
588
589 PR c/71858
590 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
591 instead of FUZZY_LOOKUP_NAME.
592 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
593 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
594
dd36b877
JJ
5952016-07-14 Jakub Jelinek <jakub@redhat.com>
596
597 PR c/71858
598 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
599
8c681247
TS
6002016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
601
602 * c-parser.c (c_parser_generic_selection): Make type of variable
603 auto_vec.
604 (c_parser_omp_declare_simd): Likewise.
605
bf4fa671
TS
6062016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
607
608 * c-decl.c (struct c_struct_parse_info): Change member types
609 from vec to auto_vec.
610 (start_struct): Adjust.
611 (finish_struct): Likewise.
612
557e8c49
JJ
6132016-07-02 Jakub Jelinek <jakub@redhat.com>
614
615 PR c/71719
616 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
617
54d19c3b
TS
6182016-06-29 Thomas Schwinge <thomas@codesourcery.com>
619
620 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
621 Move pragma context checking into...
622 (c_parser_omp_cancellation_point): ... here, and improve
623 diagnostic messages.
624 * c-typeck.c (c_finish_omp_cancel)
625 (c_finish_omp_cancellation_point): Improve diagnostic messages.
626
152ef731
JJ
6272016-06-29 Jakub Jelinek <jakub@redhat.com>
628
629 PR c/71685
630 * c-typeck.c (c_build_qualified_type): Don't clear
631 C_TYPE_INCOMPLETE_VARS for the main variant.
632
6332016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
634
635 PR c/71552
636 * c-typeck.c (output_init_element): Diagnose incompatible types
637 before non-constant initializers.
638
e9ac1f86
JJ
6392016-06-28 Jakub Jelinek <jakub@redhat.com>
640
641 * Make-lang.in: Don't cat ../stage_current if it does not exist.
642
277d7ee0
AK
6432016-06-23 Andi Kleen <ak@linux.intel.com>
644
645 * Make-lang.in: Add support for autofdo.
646
1a4f11c8
DM
6472016-06-22 David Malcolm <dmalcolm@redhat.com>
648
649 PR c/70339
650 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
651 (implicit_decl_warning): When issuing warnings for implicit
652 declarations, attempt to provide a suggestion via
653 lookup_name_fuzzy.
654 (undeclared_variable): Likewise when issuing errors.
655 (lookup_name_in_scope): Likewise.
656 (struct edit_distance_traits<cpp_hashnode *>): New struct.
657 (best_macro_match): New typedef.
658 (find_closest_macro_cpp_cb): New function.
659 (lookup_name_fuzzy): New function.
660 * c-parser.c: Include gcc-rich-location.h.
661 (c_token_starts_typename): Split out case CPP_KEYWORD into...
662 (c_keyword_starts_typename): ...this new function.
663 (c_parser_declaration_or_fndef): When issuing errors about
664 missing "struct" etc, add a fixit. For other kinds of errors,
665 attempt to provide a suggestion via lookup_name_fuzzy.
666 (c_parser_parms_declarator): When looking ahead to detect typos in
667 type names, also reject CPP_KEYWORD.
668 (c_parser_parameter_declaration): When issuing errors about
669 unknown type names, attempt to provide a suggestion via
670 lookup_name_fuzzy.
671 * c-tree.h (c_keyword_starts_typename): New prototype.
672
5a578671
JM
6732016-06-20 Joseph Myers <joseph@codesourcery.com>
674
675 PR c/71601
676 * c-typeck.c (build_conditional_expr): Return error_mark_node if
677 c_common_type returns error_mark_node.
678
3f8257db 6792016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
680
681 PR c/69507
682 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
683 __alignof__ (expression).
684
6a3f203c
DM
6852016-06-14 David Malcolm <dmalcolm@redhat.com>
686
687 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
688
264757fb
DM
6892016-06-14 David Malcolm <dmalcolm@redhat.com>
690
691 * c-typeck.c (build_component_ref): Simplify fixit code by
692 using gcc_rich_location::add_fixit_misspelled_id.
693 (set_init_label): Likewise.
694
f7e4f2e3
DM
6952016-06-13 David Malcolm <dmalcolm@redhat.com>
696
697 * c-parser.c (c_parser_initelt): Provide location of name for new
698 location_t param of set_init_label.
699 * c-tree.h (set_init_label): Add location_t param.
700 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
701 param and use it when issuing error messages about unrecognized
702 field names. Attempt to provide a fixit hint if appropriate,
703 otherwise update the error message to provide the type name.
704
4b1ffdb1
TS
7052016-06-10 Thomas Schwinge <thomas@codesourcery.com>
706
707 PR c/71381
708 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
709 Loosen checking.
710
44a845ca
MS
7112016-06-08 Martin Sebor <msebor@redhat.com>
712 Jakub Jelinek <jakub@redhat.com>
713
714 PR c++/70507
715 PR c/68120
716 * c-typeck.c (convert_arguments): Don't promote last argument
717 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
718
92a5f2ba
MP
7192016-06-08 Marek Polacek <polacek@redhat.com>
720
721 PR c/71418
722 * c-decl.c (grokdeclarator): Check TYPE_P.
723
08203f73
MP
724 PR c/71426
725 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
726 code.
727
6ffd47b7
DM
7282016-06-07 David Malcolm <dmalcolm@redhat.com>
729
730 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
731 and structure element reference, capture the location of the
732 element name token and pass it to build_component_ref.
733 (c_parser_postfix_expression_after_primary): Likewise for
734 structure element dereference.
735 (c_parser_omp_variable_list): Likewise for
736 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
737 * c-tree.h (build_component_ref): Add location_t param.
738 * c-typeck.c (build_component_ref): Add location_t param
739 COMPONENT_LOC. Use it, if available, when issuing hints about
740 mispelled member names to provide a fixit replacement hint.
741
1f40cff3
MP
7422016-06-06 Marek Polacek <polacek@redhat.com>
743
744 PR c/71362
745 * c-parser.c (c_parser_direct_declarator): Set location.
746
5545a907
MP
7472016-06-06 Marek Polacek <polacek@redhat.com>
748
749 * c-typeck.c (comptypes_internal): Handle comparisons of
750 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
751 TYPE_REF_CAN_ALIAS_ALL.
752
b605f663
CLT
7532016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
754
755 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
756 arguments as addressable when async clause exists.
757
00631022
JJ
7582016-05-30 Jakub Jelinek <jakub@redhat.com>
759
760 PR c++/71349
761 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
762 when combined with target construct.
763
7211a097
JJ
7642016-05-26 Jakub Jelinek <jakub@redhat.com>
765
766 * c-parser.c (c_parser_omp_clause_schedule): Warn if
767 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
768
95efe6b6
MP
7692016-05-25 Marek Polacek <polacek@redhat.com>
770
771 PR c/71265
772 * c-decl.c (c_make_fname_decl): Don't check seen_error.
773
a23faf7a
MP
774 PR c/71266
775 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
776
e46c7770
CP
7772016-05-24 Cesar Philippidis <cesar@codesourcery.com>
778
779 * c-parser.c (c_parser_oacc_declare): Add support for
780 GOMP_MAP_FIRSTPRIVATE_POINTER.
781 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
782 argument with enum c_omp_region_type ort.
783 (handle_omp_array_sections): Likewise. Update call to
784 handle_omp_array_sections_1.
785 (c_finish_omp_clauses): Add specific errors and warning messages for
786 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
787 call to handle_omp_array_sections.
788
a04e69c0
TS
7892016-05-24 Thomas Schwinge <thomas@codesourcery.com>
790
791 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
792
f17a223d
RB
7932016-05-24 Richard Biener <rguenther@suse.de>
794
795 PR middle-end/70434
796 PR c/69504
797 * c-typeck.c (build_array_ref): Do not complain about indexing
798 non-lvalue vectors. Adjust for function name change.
799
79063edd
MS
8002016-05-20 Martin Sebor <msebor@redhat.com>
801
802 PR c/71115
803 * c-typeck.c (error_init): Use
804 expansion_point_location_if_in_system_header.
805 (warning_init): Same.
806
8a40fef3
DM
8072016-05-19 David Malcolm <dmalcolm@redhat.com>
808
809 PR c/71171
810 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
811 in error-handling.
812 (c_parser_postfix_expression): Likewise.
813 * c-tree.h (c_expr::set_error): New method.
814 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
815 that result's range is initialized.
816
e9892350
JG
8172016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
818
819 * c-typeck.c (parser_build_unary_op): Fix formatting.
820
8fad45f5
MW
8212016-05-16 Matthew Wahab <matthew.wahab@arm.com>
822
823 * c-decl.c (grokdeclarator): Remove errmsg and use of
824 targetm.invalid_return_type.
825 (grokparms): Remove errmsg and use of
826 targetm.invalid_parameter_type.
827
aa4b467b
JM
8282016-05-13 Joseph Myers <joseph@codesourcery.com>
829
830 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
831 function return type.
832
4f2e1536
MP
8332016-05-12 Marek Polacek <polacek@redhat.com>
834
835 PR c/70756
836 * c-decl.c (build_compound_literal): Pass LOC down to
837 c_incomplete_type_error.
838 * c-tree.h (require_complete_type): Adjust declaration.
839 (c_incomplete_type_error): Likewise.
840 * c-typeck.c (require_complete_type): Add location parameter, pass it
841 down to c_incomplete_type_error.
842 (c_incomplete_type_error): Add location parameter, pass it down to
843 error_at.
844 (build_component_ref): Pass location down to c_incomplete_type_error.
845 (default_conversion): Pass location down to require_complete_type.
846 (build_array_ref): Likewise.
847 (build_function_call_vec): Likewise.
848 (convert_arguments): Likewise.
849 (build_unary_op): Likewise.
850 (build_c_cast): Likewise.
851 (build_modify_expr): Likewise.
852 (convert_for_assignment): Likewise.
853 (c_finish_omp_clauses): Likewise.
854
d6e83a8d
MM
8552016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
856
857 PR c/43651
858 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
859 is enabled.
860 * c-errors.c (pedwarn_c90): Return true if warned.
861 * c-tree.h (pedwarn_c90): Change return type to bool.
862 (enum c_declspec_word): Add new enumerator cdw_atomic.
863
5c3a10fb
MP
8642016-05-11 Marek Polacek <polacek@redhat.com>
865
866 PR c++/71024
867 * c-decl.c (diagnose_mismatched_decls): Factor out code to
868 diagnose_mismatched_attributes and call it.
869
cf68d92c
MP
8702016-05-10 Marek Polacek <polacek@redhat.com>
871
872 PR c/70255
873 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
874 on a declaration following the definition.
875
351f85c5
JJ
8762016-05-05 Jakub Jelinek <jakub@redhat.com>
877
878 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
879 parse it through to c_parser_c99_block_statement.
880 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
881 caller.
882
deef7113
MP
8832016-05-04 Marek Polacek <polacek@redhat.com>
884
885 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
886 OPT_Wdangling_else.
887
de55efd5
MP
8882016-05-04 Marek Polacek <polacek@redhat.com>
889
890 PR c/48778
891 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
892 for macro expansions.
893
79ce98bc
MP
8942016-05-03 Marek Polacek <polacek@redhat.com>
895
896 PR c/70859
897 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
898 check_builtin_function_arguments.
899
fb2647aa
RB
9002016-05-03 Richard Biener <rguenther@suse.de>
901
902 * Make-lang.in (cc1-checksum.c): For stage-final re-use
903 the checksum from the previous stage.
904
77886428
CP
9052016-05-02 Cesar Philippidis <cesar@codesourcery.com>
906
907 * c-parser.c (c_parser_oacc_all_clauses): Update call to
908 c_finish_omp_clauses.
909 (c_parser_omp_all_clauses): Likewise.
910 (c_parser_oacc_cache): Likewise.
911 (c_parser_oacc_loop): Likewise.
912 (omp_split_clauses): Likewise.
913 (c_parser_omp_declare_target): Likewise.
914 (c_parser_cilk_all_clauses): Likewise.
915 (c_parser_cilk_for): Likewise.
916 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
917 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
918
7176a4a0
MP
9192016-05-02 Marek Polacek <polacek@redhat.com>
920
921 PR c/70851
922 * c-decl.c (grokdeclarator): Diagnose when array's size has an
923 incomplete type.
924
e7ff0319
CP
9252016-04-29 Cesar Philippidis <cesar@codesourcery.com>
926
927 PR middle-end/70626
928 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
929 OACC_LOOP_CLAUSE_MASK.
930 (c_parser_oacc_kernels_parallel): Update call to
931 c_oacc_split_loop_clauses.
932
9f405ce1
AM
9332016-04-28 Andrew MacLeod <amacleod@redhat.com>
934
935 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
936 argument to build_modify_expr in two cases.
937
c1e1f433
BS
9382016-04-27 Bernd Schmidt <bschmidt@redhat.com>
939
940 * c-parser.c (c_parser_postfix_expression_after_primary): Call
941 warn_for_memset instead of warning directly here.
942
2448a956
MP
9432016-04-26 Marek Polacek <polacek@redhat.com>
944
945 PR c/67784
946 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
947 out of ...
948 (c_parser_for_statement): ... here.
949 (c_parser_if_statement): Use it.
950 (c_parser_switch_statement): Use it.
951 (c_parser_while_statement): Use it.
952
b02a5e26
MP
953 PR c/70791
954 * c-decl.c (pushdecl): Pass LOCUS down to warning.
955
477d4906
IV
9562016-04-20 Ilya Verbin <ilya.verbin@intel.com>
957
958 PR c++/69363
959 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
960 instead of c_finish_cilk_clauses.
961 * c-tree.h (c_finish_omp_clauses): Add new default argument.
962 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
963 floating-point variables in the linear clause for Cilk Plus.
964
fe37c7af
MM
9652016-04-18 Michael Matz <matz@suse.de>
966
967 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
968 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
969
949505a9
MP
9702016-04-15 Marek Polacek <polacek@redhat.com>
971
972 PR c/70671
973 * c-typeck.c (build_unary_op): Pass location down to error and
974 warning call.
975
dda1bf61
JJ
9762016-04-15 Jakub Jelinek <jakub@redhat.com>
977
978 PR c/70436
979 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
980 where needed.
981 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
982 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
983 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
984 Adjust c_parser_pragma callers.
985 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
986 caller.
987 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
988 c_parser_statement.
989 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
990 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
991 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
992 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
993 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
994 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
995 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
996 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
997 down where needed.
998 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
999 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1000 calls.
1001
99cd9857
MP
10022016-04-13 Marek Polacek <polacek@redhat.com>
1003
1004 PR c/70436
1005 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1006 adjust callers.
1007 (c_parser_statement): Likewise.
1008 (c_parser_c99_block_statement): Likewise.
1009 (c_parser_while_statement): Likewise.
1010 (c_parser_for_statement): Likewise.
1011 (c_parser_if_body): Don't set IF_P here.
1012 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1013 about dangling else here.
1014 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1015 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1016 warn about dangling else here.
1017
f13355da
MP
10182016-04-04 Marek Polacek <polacek@redhat.com>
1019
1020 PR c/70307
1021 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1022
5fde6a45
MP
10232016-03-31 Marek Polacek <polacek@redhat.com>
1024
1025 PR c/70297
1026 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1027
4bbf545b
DM
10282016-03-18 David Malcolm <dmalcolm@redhat.com>
1029
1030 PR c/70281
1031 * c-parser.c (c_parser_postfix_expression): Set the source range
1032 for uses of "__builtin_types_compatible_p".
1033
fcc2b74f
JJ
10342016-03-17 Jakub Jelinek <jakub@redhat.com>
1035
1036 PR c/70280
1037 * c-typeck.c (composite_type): Don't count void_list_node
1038 into len, if the list is terminated by void_list_node, start
1039 with void_list_node instead of NULL for newargs. Stop
1040 at void_list_node.
1041
ab4c578f
MP
10422016-03-16 Marek Polacek <polacek@redhat.com>
1043
1044 PR c/70093
1045 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1046 nested functions returning VM types.
1047
96b3c82d
CP
10482016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1049
1050 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1051 when calling c_finish_omp_clauses.
1052
29b9828f
BS
10532016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1054
1055 PR c/69824
1056 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1057 for later.
1058
7ff6ca38
MP
10592016-03-04 Marek Polacek <polacek@redhat.com>
1060
1061 PR c/69798
1062 * c-parser.c (c_parser_postfix_expression): Call
1063 c_parser_cast_expression rather than c_parser_postfix_expression.
1064
686e2237
JJ
10652016-03-01 Jakub Jelinek <jakub@redhat.com>
1066
1067 PR c/69796
1068 PR c/69974
1069 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1070 of incomplete decls to error_mark_node.
1071
0b05329b
MP
10722016-02-24 Marek Polacek <polacek@redhat.com>
1073
1074 PR c/69819
1075 * c-decl.c (finish_decl): Don't update the copy of the type of a
1076 different decl type.
1077
067fbd8b
JJ
10782016-02-23 Jakub Jelinek <jakub@redhat.com>
1079
1080 PR objc/69844
1081 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1082 in id_kind reclassification.
1083
bf14eba2
JJ
10842016-02-16 Jakub Jelinek <jakub@redhat.com>
1085
1086 PR c/69835
1087 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1088
ba539195
JN
10892016-02-16 James Norris <jnorris@codesourcery.com>
1090
1091 PR c/64748
1092 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1093
16595a1f
BS
10942016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1095
f48dfe98
BS
1096 * c-decl.c (build_null_declspecs): Zero the entire struct.
1097
16595a1f
BS
1098 PR c/69522
1099 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1100 callers changed. If nested_p is true, use it to call
1101 finish_implicit_inits.
1102 * c-tree.h (finish_implicit_inits): Declare.
1103 * c-typeck.c (finish_implicit_inits): New function. Move code
1104 from ...
1105 (push_init_level): ... here.
1106 (set_designator, process_init_element): Call finish_implicit_inits.
1107
66756373
JJ
11082016-02-11 Jakub Jelinek <jakub@redhat.com>
1109
1110 PR c/69768
1111 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1112 arguments for -Waddress warning.
1113
1066e9b5
JJ
11142016-02-04 Jakub Jelinek <jakub@redhat.com>
1115
1116 PR c/69669
1117 * c-decl.c (finish_enum): When honoring mode attribute,
1118 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1119
3a5d2ba4
JJ
11202016-01-29 Jakub Jelinek <jakub@redhat.com>
1121
1122 PR debug/69518
1123 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1124 all type variants, not just TYPE_MAIN_VARIANT.
1125
cbdd8ae0
JJ
11262016-01-27 Jakub Jelinek <jakub@redhat.com>
1127
1128 PR debug/66869
1129 * c-decl.c (c_write_global_declarations_1): Warn with
1130 warn_unused_function if static prototype without definition
1131 is not C_DECL_USED.
1132
fa74a4bc
MP
11332016-01-27 Marek Polacek <polacek@redhat.com>
1134
1135 PR c/68062
1136 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1137 to unsigned, if needed. Add -Wsign-compare warning.
1138
13f92e8d
JJ
11392016-01-26 Jakub Jelinek <jakub@redhat.com>
1140
1141 PR tree-optimization/69483
1142 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1143
cd8e73dc 11442016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1145
1146 PR c/24293
1147 * c-tree.h (incomplete_record_decls): Declare.
1148 * c-parser.c (incomplete_record_decls): Define.
1149 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1150 report error if any decl has zero size.
1151 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1152 or enum type to incomplete_record_decls.
1153
e6d6ec9e
TV
11542016-01-14 Tom de Vries <tom@codesourcery.com>
1155
1156 PR tree-optimization/68773
1157 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1158 set force_output.
1159
00083992
MP
11602016-01-14 Marek Polacek <polacek@redhat.com>
1161
1162 PR c/69262
1163 * c-decl.c (grokdeclarator): Provide more information for invalid
1164 array declarations.
1165
7443cf13
DM
11662016-01-06 David Malcolm <dmalcolm@redhat.com>
1167
1168 * c-parser.c (c_parser_unary_expression): For dereferences, build
1169 a combined location before calling build_indirect_ref, so that
1170 error reports cover the full range, manually updating the c_expr
1171 src_range.
1172
6b131d5b
MP
11732016-01-06 Marek Polacek <polacek@redhat.com>
1174
1175 PR sanitizer/69099
1176 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1177 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1178 NULL.
1179
818ab71a
JJ
11802016-01-04 Jakub Jelinek <jakub@redhat.com>
1181
1182 Update copyright years.
1183
2fe0a208
MP
11842016-01-04 Marek Polacek <polacek@redhat.com>
1185
1186 PR c/68908
1187 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1188 optimization to use __atomic_fetch_* built-in if possible.
1189
c7b48c8a
TS
11902015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1191
1192 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1193 into...
1194 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1195 all users.
1196
fda5652f
MP
11972015-12-22 Marek Polacek <polacek@redhat.com>
1198
1199 PR c/69002
1200 * c-typeck.c (build_component_ref): Warn when acessing elements of
1201 atomic structures or unions.
1202
745e411d
DM
12032015-12-21 David Malcolm <dmalcolm@redhat.com>
1204
1205 * c-typeck.c: Include "gcc-rich-location.h".
1206 (build_binary_op): In the two places that call binary_op_error,
1207 create a gcc_rich_location and populate it with the location of
1208 the binary op and its two operands.
1209
94c40e19
DM
12102015-12-16 David Malcolm <dmalcolm@redhat.com>
1211
1212 * c-parser.c (c_parser_statement_after_labels): When calling
1213 c_finish_return, Use the return expression's location if it has
1214 one, falling back to the location of the first token within it.
1215 * c-typeck.c (c_finish_return): When issuing warnings about
1216 the incorrect presence/absence of a return value, issue a note
1217 showing the declaration of the function.
1218
de67c4c3
DM
12192015-12-16 David Malcolm <dmalcolm@redhat.com>
1220
1221 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1222 to 4.
1223 (c_parser_peek_nth_token): New function.
1224 (c_parser_peek_conflict_marker): New function.
1225 (c_parser_error): Detect conflict markers and report them as such.
1226
a10704e1
DM
12272015-12-16 David Malcolm <dmalcolm@redhat.com>
1228
1229 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1230 to preserve range information for the primary expression
1231 in the call to c_parser_postfix_expression_after_primary.
1232
8062bca6
DM
12332015-12-16 David Malcolm <dmalcolm@redhat.com>
1234
1235 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1236 expression location, falling back on the first token location,
1237 rather than always using the latter.
1238
d06f8b75
MP
12392015-12-16 Marek Polacek <polacek@redhat.com>
1240
1241 PR c/64637
1242 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1243 available.
1244
2994fb91
MP
12452015-12-15 Marek Polacek <polacek@redhat.com>
1246
1247 PR c/68907
1248 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1249 artificial decl.
1250
a1b93f8d
DM
12512015-12-08 David Malcolm <dmalcolm@redhat.com>
1252
1253 * c-parser.c (c_parser_alignof_expression): Capture location of
1254 closing parenthesis (if any), or of end of unary expression, and
1255 use it to build a src_range for the expression.
1256
46c6e1e2
DM
12572015-12-08 David Malcolm <dmalcolm@redhat.com>
1258
1259 PR c/68757
1260 * c-parser.c (c_parser_get_builtin_args): Add
1261 "out_close_paren_loc" param, and write back to it.
1262 (c_parser_postfix_expression): Capture the closing
1263 parenthesis location for RID_CHOOSE_EXPR,
1264 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1265 RID_BUILTIN_SHUFFLE and use it to set the source range
1266 for such expressions; within RID_BUILTIN_COMPLEX set
1267 the underlying location.
1268
66189108
MP
12692015-12-07 Marek Polacek <polacek@redhat.com>
1270
1271 PR c/68668
1272 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1273 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1274
f187980b
EB
12752015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1276
1277 * c-tree.h (c_build_va_arg): Adjust prototype.
1278 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1279 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1280 parameter, adjust throughout and issue an error if EXPR is a component
1281 with reverse storage order.
1282
4250754e
JM
12832015-12-02 Jason Merrill <jason@redhat.com>
1284
1285 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1286 (c_fully_fold_internal, decl_constant_value_for_optimization):
1287 Move from c-common.c.
1288 * c-tree.h: Declare decl_constant_value_for_optimization.
1289 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1290
e9e32ee6
JM
12912015-12-02 Joseph Myers <joseph@codesourcery.com>
1292
1293 PR c/68162
1294 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1295 following link from declarator to next declarator. Track original
1296 qualified type and pass it to c_build_qualified_type.
1297 * c-typeck.c (c_build_qualified_type): Add arguments
1298 orig_qual_type and orig_qual_indirect.
1299
ff7a55bf
TS
13002015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1301
1302 * c-parser.c (c_parser_omp_clause_name)
1303 (c_parser_oacc_all_clauses): Alphabetical sorting.
1304
657e4e47
JJ
13052015-12-02 Jakub Jelinek <jakub@redhat.com>
1306
1307 PR c/68533
1308 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1309 for diagnostics.
1310
37d5ad46
JB
13112015-12-01 Julian Brown <julian@codesourcery.com>
1312 Cesar Philippidis <cesar@codesourcery.com>
1313 James Norris <James_Norris@mentor.com>
1314
1315 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1316 (c_parser_oacc_clause_use_device): New function.
1317 (c_parser_oacc_all_clauses): Add use_device support.
1318 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1319 (c_parser_oacc_host_data): New function.
1320 (c_parser_omp_construct): Add host_data support.
1321 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1322 * c-typeck.c (c_finish_oacc_host_data): New function.
1323 (c_finish_omp_clauses): Add use_device support.
1324
a4850ce9
JH
13252015-11-29 Jan Hubicka <hubicka@ucw.cz>
1326
1327 PR c/67106
1328 * c-decl.c: Set TYPE_PACKED in variants.
1329
b58d3df2
ML
13302015-11-27 Martin Liska <mliska@suse.cz>
1331
1332 PR c++/68312
1333 * c-array-notation.c (fix_builtin_array_notation_fn):
1334 Use release_vec_vec instead of vec::release.
1335 (build_array_notation_expr): Likewise.
1336 (fix_conditional_array_notations_1): Likewise.
1337 (fix_array_notation_expr): Likewise.
1338 (fix_array_notation_call_expr): Likewise.
1339
aec17bfe
JJ
13402015-11-27 Jakub Jelinek <jakub@redhat.com>
1341
1342 PR c/63326
1343 * c-parser.c (c_parser_compound_statement_nostart): If
1344 last_label is true, use pragma_stmt instead of pragma_compound
1345 as second c_parser_pragma argument.
1346 (c_parser_omp_ordered, c_parser_omp_target_update,
1347 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1348 false as second argument to c_parser_skip_to_pragma_eol after
1349 diagnosing standalone directives used in pragma_stmt context.
1350
688c4de0
IV
13512015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1352
1353 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1354 with "if (ENABLE_OFFLOADING)".
1355
cbd03aee
DM
13562015-11-23 David Malcolm <dmalcolm@redhat.com>
1357
1358 PR objc/68438
1359 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1360 for various Objective-C constructs: Class.name syntax,
1361 @selector(), @protocol(), @encode(), and [] message syntax.
1362
a87a86e1
DM
13632015-11-20 David Malcolm <dmalcolm@redhat.com>
1364
1365 PR 62314
1366 * c-typeck.c (should_suggest_deref_p): New function.
1367 (build_component_ref): Special-case POINTER_TYPE when
1368 generating a "not a structure of union" error message, and
1369 suggest a "->" rather than a ".", providing a fix-it hint.
1370
8ece8dfb
DM
13712015-11-19 David Malcolm <dmalcolm@redhat.com>
1372
1373 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1374 candidate into a new function, find_closest_identifier.
1375
433068cc
MP
13762015-11-19 Marek Polacek <polacek@redhat.com>
1377
1378 PR c/68412
1379 * c-typeck.c (parser_build_binary_op): Properly handle
1380 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1381
bef08b71
DM
13822015-11-17 David Malcolm <dmalcolm@redhat.com>
1383
1384 * c-parser.c (set_c_expr_source_range): Bulletproof both
1385 overloaded implementations against NULL expr->value.
1386 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1387 values.
1388 (c_parser_unary_expression): Likewise when handling addresses of
1389 labels.
1390 (c_parser_postfix_expression): Likewise for statement expressions,
1391 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1392 __builtin_va_arg, and for __builtin_offset_of.
1393 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1394 src_range using the range of the braced initializer.
1395 (c_parser_transaction_expression): Set src_range for "ret" to a
1396 sane pair of values.
1397
fff77217
KY
13982015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1399
1400 * c-parser.c (c_finish_omp_declare_simd): Look for
1401 "simd" attribute as well. Update error message.
1402
1d899da2
TS
14032015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1404
1405 * c-parser.c (c_parser_omp_declare_target): Adjust.
1406
e4606348
JJ
14072015-11-14 Jakub Jelinek <jakub@redhat.com>
1408
1409 * c-typeck.c (c_finish_omp_clauses): Don't mark
1410 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1411
3e636daf
MP
14122015-11-14 Marek Polacek <polacek@redhat.com>
1413
1414 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1415 * c-typeck.c: Likewise.
1416
ebedc9a3
DM
14172015-11-13 David Malcolm <dmalcolm@redhat.com>
1418
1419 * c-decl.c (warn_defaults_to): Pass line_table to
1420 rich_location ctor.
1421 * c-errors.c (pedwarn_c99): Likewise.
1422 (pedwarn_c90): Likewise.
1423 * c-parser.c (set_c_expr_source_range): New functions.
1424 (c_token::get_range): New method.
1425 (c_token::get_finish): New method.
1426 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1427 based on the range from the start of the LHS to the end of the
1428 RHS.
1429 (c_parser_conditional_expression): Likewise, based on the range
1430 from the start of the cond.value to the end of exp2.value.
1431 (c_parser_binary_expression): Call set_c_expr_source_range on
1432 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1433 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1434 based on the cast_loc through to the end of the expr.
1435 (c_parser_unary_expression): Likewise, based on the
1436 op_loc through to the end of op.
1437 (c_parser_sizeof_expression) Likewise, based on the start of the
1438 sizeof token through to either the closing paren or the end of
1439 expr.
1440 (c_parser_postfix_expression): Likewise, using the token range,
1441 or from the open paren through to the close paren for
1442 parenthesized expressions.
1443 (c_parser_postfix_expression_after_primary): Likewise, for
1444 various kinds of expression.
1445 * c-tree.h (struct c_expr): Add field "src_range".
1446 (c_expr::get_start): New method.
1447 (c_expr::get_finish): New method.
1448 (set_c_expr_source_range): New decls.
1449 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1450 on ret for prefix unary ops.
1451 (parser_build_binary_op): Likewise, running from the start of
1452 arg1.value through to the end of arg2.value.
1453
ec8b536f
MP
14542015-11-13 Marek Polacek <polacek@redhat.com>
1455
1456 PR c/68320
1457 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1458
277fe616
DM
14592015-11-13 David Malcolm <dmalcolm@redhat.com>
1460
1461 * c-typeck.c: Include spellcheck.h.
1462 (lookup_field_fuzzy_find_candidates): New function.
1463 (lookup_field_fuzzy): New function.
1464 (build_component_ref): If the field was not found, try using
1465 lookup_field_fuzzy and potentially offer a suggestion.
1466
6e232ba4
JN
14672015-11-12 James Norris <jnorris@codesourcery.com>
1468 Joseph Myers <joseph@codesourcery.com>
1469
1470 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1471 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1472 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1473 and PRAGMA_OMP_CLAUSE_LINK.
1474 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1475 and PRAGMA_OACC_CLAUSE_LINK.
1476 (OACC_DECLARE_CLAUSE_MASK): New definition.
1477 (c_parser_oacc_declare): New function.
1478
9be4f715
MP
14792015-11-12 Marek Polacek <polacek@redhat.com>
1480
1481 PR c/67784
1482 * c-parser.c (c_parser_for_statement): Reclassify the token in
1483 a correct scope.
1484
e78bede6
MP
14852015-11-11 Marek Polacek <polacek@redhat.com>
1486
1487 PR c/68107
1488 PR c++/68266
1489 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1490 checking the size of an array.
1491
69f293c9
AM
14922015-11-11 Andrew MacLeod <amacleod@redhat.com>
1493
1494 * c-array-notation.c: Remove unused header files.
1495 * c-aux-info.c: Likewise.
1496 * c-convert.c: Likewise.
1497 * c-decl.c: Likewise.
1498 * c-errors.c: Likewise.
1499 * c-lang.c: Likewise.
1500 * c-objc-common.c: Likewise.
1501 * c-parser.c: Likewise.
1502 * c-typeck.c: Likewise.
1503 * gccspec.c: Likewise.
1504
3a40d81d
NS
15052015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1506 Cesar Philippidis <cesar@codesourcery.com>
1507 James Norris <jnorris@codesourcery.com>
1508 Julian Brown <julian@codesourcery.com>
1509 Nathan Sidwell <nathan@codesourcery.com>
1510
1511 c/
1512 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1513 routine arg.
1514 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1515 (c_parser_pragma): Parse 'acc routine'.
1516 (OACC_ROUTINE_CLAUSE_MARK): Define.
1517 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1518
fc402eec
AA
15192015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1520
1521 PR debug/67192
1522 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1523 location of the backward-goto to the start of the loop body.
1524
f6b0b3db
AA
15252015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1526
1527 PR debug/67192
1528 * c-parser.c (c_parser_while_statement): Finish the loop before
1529 parsing ahead for misleading indentation.
1530 (c_parser_for_statement): Likewise.
1531
ee45a32d
EB
15322015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1533
1534 * c-decl.c (finish_struct): If the structure has reverse storage
1535 order, rewrite the type of array fields with scalar component. Call
1536 maybe_apply_pragma_scalar_storage_order on entry.
1537 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1538 errors on bit-fields and reverse SSO here and not...
1539 (c_mark_addressable): ...here.
1540 (output_init_element): Adjust call to initializer_constant_valid_p.
1541 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1542
8a645150
DM
15432015-11-06 David Malcolm <dmalcolm@redhat.com>
1544
1545 * c-decl.c (warn_defaults_to): Update for change in signature
1546 of diagnostic_set_info.
1547 * c-errors.c (pedwarn_c99): Likewise.
1548 (pedwarn_c90): Likewise.
1549 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1550 for textinfo::set_location.
1551
7a5e4956
CP
15522015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1553 Thomas Schwinge <thomas@codesourcery.com>
1554 James Norris <jnorris@codesourcery.com>
1555
1556 * c-parser.c (c_parser_omp_clause_name): Add support for
1557 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1558 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1559 default(none) in OpenACC.
1560 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1561 arguments.
1562 (c_parser_oacc_clause_tile): New function.
1563 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1564 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1565 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1566 TILE}.
1567 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1568 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1569 FIRSTPRIVATE}.
1570 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1571 (c_parser_oacc_update): Update the error message for missing clauses.
1572 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1573 and OMP_CLAUSE_INDEPENDENT.
1574
bfcfbfa0
MP
15752015-11-05 Marek Polacek <polacek@redhat.com>
1576
1577 PR c/68090
1578 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1579 deal with pre-evaluation on invalid types.
1580
e01d41e5
JJ
15812015-11-05 Jakub Jelinek <jakub@redhat.com>
1582 Ilya Verbin <ilya.verbin@intel.com>
1583
1584 * c-parser.c: Include context.h and gimple-expr.h.
1585 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1586 monotonic together with nonmonotonic.
1587 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1588 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1589 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1590 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1591 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1592 expressions on combined target teams before the target.
1593 (c_parser_omp_declare_target): If decl has "omp declare target" or
1594 "omp declare target link" attribute, and cgraph or varpool node already
1595 exists, then set corresponding flags. Call c_finish_omp_clauses
1596 in the parenthesized extended-list syntax case.
1597 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1598 declare target.
1599 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1600 on OMP_CLAUSE_REDUCTION array sections.
1601 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1602 into the constant offset, or for variable low-bound using
1603 POINTER_PLUS_EXPR. For structure element based array sections use
1604 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1605 (c_finish_omp_clauses): Drop generic_field_head, structure
1606 elements are now always mapped even as array section bases,
1607 diagnose same var in data sharing and mapping clauses. Diagnose if
1608 linear step on declare simd is neither a constant nor a uniform
1609 parameter. Look through POINTER_PLUS_EXPR for array section
1610 reductions. Diagnose the same var or function appearing multiple
1611 times on the same directive. Fix up wording for the to clause if t
1612 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1613 modifier on kinds other than dynamic or guided or nonmonotonic
1614 modifier together with ordered clause.
1615
4bf9e5a8
TS
16162015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1617 Chung-Lin Tang <cltang@codesourcery.com>
1618
1619 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1620
2adfab87
AM
16212015-10-29 Andrew MacLeod <amacleod@redhat.com>
1622
1623 * c-array-notation.c: Reorder #include's and remove duplicates.
1624 * c-aux-info.c: Likewise.
1625 * c-convert.c: Likewise.
1626 * c-decl.c: Likewise.
1627 * c-errors.c: Likewise.
1628 * c-lang.c: Likewise.
1629 * c-objc-common.c: Likewise.
1630 * c-parser.c: Likewise.
1631 * c-typeck.c: Likewise.
1632
e922069e
JW
16332015-10-26 Jim Wilson <jim.wilson@linaro.org>
1634
1635 PR debug/66068
1636 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1637 after calling build_qualified_type.
1638
765dd391
CP
16392015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1640 Thomas Schwinge <thomas@codesourcery.com>
1641 James Norris <jnorris@codesourcery.com>
1642 Joseph Myers <joseph@codesourcery.com>
1643 Julian Brown <julian@codesourcery.com>
1644 Bernd Schmidt <bschmidt@redhat.com>
1645
1646 * c-parser.c (c_parser_oacc_shape_clause): New.
1647 (c_parser_oacc_simple_clause): New.
1648 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1649 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1650
88bae6f4
TS
16512015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1652 James Norris <jnorris@codesourcery.com>
1653 Cesar Philippidis <cesar@codesourcery.com>
1654
1655 PR c/64765
1656 PR c/64880
1657 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1658 parameters, and handle these. Adjust all users.
1659 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1660 into...
1661 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1662 all users.
1663 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1664 declare functions.
1665 (c_finish_omp_construct): Declare function.
1666 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1667 Merge functions into...
1668 (c_finish_omp_construct): ... this new function.
1669
a8fc2579
RB
16702015-10-22 Richard Biener <rguenther@suse.de>
1671
1672 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1673 before folding a MINUS_EXPR.
1674
e9122ef6
MP
16752015-10-21 Marek Polacek <polacek@redhat.com>
1676
1677 PR c/68024
1678 * c-decl.c (start_function): Warn about vararg functions without
1679 a prototype.
1680
9f47c7e5
IE
16812015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1682
1683 * c-typeck.c (build_conditional_expr): Use boolean vector
1684 type for vector comparison.
1685 (build_vec_cmp): New.
1686 (build_binary_op): Use build_vec_cmp for comparison.
1687
fa60eeb9
MP
16882015-10-20 Marek Polacek <polacek@redhat.com>
1689
1690 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1691
2c7020eb
MP
16922015-10-20 Marek Polacek <polacek@redhat.com>
1693
1694 PR c/67964
1695 * c-parser.c (c_parser_attributes): Break out of the loop if the
1696 token after an attribute isn't a comma.
1697
d9a6bd32
JJ
16982015-10-13 Jakub Jelinek <jakub@redhat.com>
1699 Aldy Hernandez <aldyh@redhat.com>
1700
1701 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1702 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1703 (c_parser_omp_variable_list): Handle structure elements for
1704 map, to and from clauses. Handle array sections in reduction
1705 clause. Formatting fixes.
1706 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1707 if clause modifiers.
1708 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1709 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1710 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1711 c_parser_omp_clause_is_device_ptr): New functions.
1712 (c_parser_omp_clause_ordered): Parse optional parameter.
1713 (c_parser_omp_clause_reduction): Handle array reductions.
1714 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1715 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1716 functions.
1717 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1718 (c_parser_omp_clause_depend_sink): New function.
1719 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1720 (c_parser_omp_clause_map): Parse release/delete map kinds and
1721 optional always modifier.
1722 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1723 and c_finish_omp_clauses callers.
1724 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1725 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1726 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1727 (OMP_CRITICAL_CLAUSE_MASK): Define.
1728 (c_parser_omp_critical): Parse critical clauses.
1729 (c_parser_omp_for_loop): Handle doacross loops, adjust
1730 c_finish_omp_for and c_finish_omp_clauses callers.
1731 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1732 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1733 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1734 (c_parser_omp_for): Disallow ordered clause when combined with
1735 distribute. Disallow linear clause when combined with distribute
1736 and not combined with simd.
1737 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1738 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1739 parse clauses and if depend clause is found, don't parse a body.
1740 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1741 Allow target parallel without for after it.
1742 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1743 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1744 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1745 invalid kinds.
1746 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1747 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1748 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1749 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1750 functions.
1751 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1752 defaultmap and is_device_ptr clauses.
1753 (c_parser_omp_target): Parse target parallel and target simd. Set
1754 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1755 and target exit data. Diagnose invalid map kinds.
1756 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1757 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1758 construct.
1759 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1760 &omp_priv.
1761 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1762 (c_parser_omp_taskloop): New function.
1763 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1764 handle PRAGMA_OMP_TASKLOOP.
1765 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1766 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1767 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1768 Add IS_OMP argument, handle structure element bases, diagnose
1769 bitfields, pass IS_OMP recursively, diagnose known zero length
1770 array sections in depend clauses, handle array sections in reduction
1771 clause, diagnose negative length even for pointers.
1772 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1773 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1774 array sections in reduction clause, set
1775 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1776 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1777 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1778 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1779
21ba0cea
MP
17802015-10-06 Marek Polacek <polacek@redhat.com>
1781
1782 * c-parser.c (c_parser_statement_after_labels): Use
1783 protected_set_expr_location.
1784 (c_parser_omp_clause_num_gangs): Likewise.
1785 (c_parser_omp_clause_num_threads): Likewise.
1786 (c_parser_omp_clause_num_workers): Likewise.
1787 (c_parser_omp_clause_vector_length): Likewise.
1788 (c_parser_omp_clause_num_teams): Likewise.
1789 (c_parser_omp_clause_thread_limit): Likewise.
1790 * c-typeck.c (build_c_cast): Likewise.
1791 (c_cast_expr): Likewise.
1792
624d31fe
RS
17932015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1794
1795 * c-typeck.c (c_tree_equal): Use real_equal instead of
1796 REAL_VALUES_EQUAL.
1797
b8fd7909
JM
17982015-10-04 Jason Merrill <jason@redhat.com>
1799
1800 * c-parser.c (c_lex_one_token): Handle @synchronized.
1801 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1802 can change whether the function is transaction_safe.
1803
1c7485af
MP
18042015-10-02 Marek Polacek <polacek@redhat.com>
1805
1806 PR c/67730
1807 * c-typeck.c (convert_for_assignment): Use the expansion point
1808 location throughout.
1809
3e3b8d63
MP
18102015-10-02 Marek Polacek <polacek@redhat.com>
1811
1812 PR c/64249
1813 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1814 and pass it down to c_parser_if_statement.
1815 (c_parser_else_body): Add CHAIN parameter and pass it down to
1816 c_parser_statement_after_labels.
1817 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1818 duplicated if-else-if conditions.
1819
aabef2de
MP
18202015-10-01 Marek Polacek <polacek@redhat.com>
1821
1822 * c-typeck.c (convert_for_assignment): Improve commentary.
1823
de8ddd5f
MP
18242015-09-30 Marek Polacek <polacek@redhat.com>
1825
1826 PR c/67730
1827 * c-typeck.c (c_finish_return): Use the expansion point location for
1828 certain "return with value" warnings.
1829
c4914de6
MLI
18302015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1831
1832 * c-parser.c (pragma_lex): Add loc argument.
1833
0e36f5c7
MP
18342015-09-15 Marek Polacek <polacek@redhat.com>
1835
1836 PR c/67580
1837 * c-decl.c (tag_exists_p): New function.
1838 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1839 struct/union/enum keywords are missing.
1840 * c-tree.h (tag_exists_p): Declare.
1841
2f3bb934
MP
18422015-09-15 Marek Polacek <polacek@redhat.com>
1843
1844 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1845 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1846 Return NULL_TREE instead of 0.
1847 (lookup_name): Return NULL_TREE instead of 0.
1848 (lookup_name_in_scope): Likewise.
1849 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1850 (parser_xref_tag): Use false instead of 0.
1851 (start_struct): Use true instead of 1.
1852 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1853
aa256c4a
MP
18542015-09-14 Marek Polacek <polacek@redhat.com>
1855
1856 * c-typeck.c (set_nonincremental_init_from_string): Use
1857 HOST_WIDE_INT_M1U when shifting a negative value.
1858
dbb68221
MW
18592015-09-09 Mark Wielaard <mjw@redhat.com>
1860
1861 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1862 parm against NULL.
1863
a8a098ac
JJ
18642015-09-10 Jakub Jelinek <jakub@redhat.com>
1865
1866 PR c/67502
1867 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1868 into OMP_FOR_PRE_BODY rather than before the loop.
1869
f4b189d5
JJ
18702015-09-09 Jakub Jelinek <jakub@redhat.com>
1871
0bb99c11
JJ
1872 PR c/67501
1873 * c-parser.c (c_parser_oacc_all_clauses,
1874 c_parser_omp_all_clauses): Remove invalid clause from
1875 list of clauses even if parser->error is set.
1876
fce5e5e3
JJ
1877 PR c/67500
1878 * c-parser.c (c_parser_omp_clause_aligned,
1879 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1880 test for errors.
1881 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1882 error_mark_node.
1883
f4b189d5
JJ
1884 PR c/67495
1885 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1886 instead of c_parser_unary_expression. If the result is !lvalue_p,
1887 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1888
b2aaf235
MP
18892015-09-04 Marek Polacek <polacek@redhat.com>
1890
1891 PR sanitizer/67279
1892 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1893
1807ffc1
MS
18942015-09-03 Martin Sebor <msebor@redhat.com>
1895
1896 PR c/66516
8b652e65
JJ
1897 * c-typeck.c (convert_arguments, parser_build_unary_op,
1898 build_conditional_expr, c_cast_expr, convert_for_assignment,
1899 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1900 reject_gcc_builtin.
1901 (c_decl_implicit): Define.
1902
d04ff417
MP
19032015-09-02 Marek Polacek <polacek@redhat.com>
1904
1905 PR c/67432
1906 * c-parser.c (c_parser_enum_specifier): Give a better error for
1907 an empty enum.
1908
a79683d5
TS
19092015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1910
1911 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1912
191a6b94
MP
19132015-08-12 Marek Polacek <polacek@redhat.com>
1914
1915 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1916 LOC to it.
1917
420a9d9b
MP
19182015-08-03 Marek Polacek <polacek@redhat.com>
1919
1920 PR c/67088
1921 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1922 Use it.
1923 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1924
992118a1
PP
19252015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1926
1927 * c-parser.c (c_parser_if_body): Take token_indent_info
1928 argument. Call warn_for_misleading_indentation even when the
1929 body is a semicolon. Extract token_indent_infos corresponding
1930 to the guard, body and next tokens. Adjust call to
1931 warn_for_misleading_indentation accordingly.
1932 (c_parser_else_body): Likewise.
1933 (c_parser_if_statement): Likewise.
1934 (c_parser_while_statement): Likewise.
1935 (c_parser_for_statement): Likewise.
1936
46308474
LFSM
19372015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1938 Manuel López-Ibáñez <manu@gcc.gnu.org>
1939
1940 * c-decl.c (get_parm_info): Remove static var. Update warning
1941 message.
1942
05b28fd6
MP
19432015-07-27 Marek Polacek <polacek@redhat.com>
1944
1945 PR c++/66555
1946 PR c/54979
1947 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1948
451b5e48
MP
19492015-07-20 Marek Polacek <polacek@redhat.com>
1950
1951 PR c++/55095
1952 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1953 (build_binary_op): Warn about left shift overflows.
1954
1916bcb5
AM
19552015-07-09 Andrew MacLeod <amacleod@redhat.com>
1956
1957 * c-array-notation.c: Adjust includes for flags.h changes.
1958 * c-objc-common.c: Likewise.
1959
c7131fb2
AM
19602015-07-07 Andrew MacLeod <amacleod@redhat.com>
1961
1962 * c-array-notation.c: Adjust includes.
1963 * c-aux-info.c: Likewise.
1964 * c-convert.c: Likewise.
1965 * c-decl.c: Likewise.
1966 * c-errors.c: Likewise.
1967 * c-lang.c: Likewise.
1968 * c-objc-common.c: Likewise.
1969 * c-parser.c: Likewise.
1970 * c-typeck.c: Likewise.
1971
da2e71c9
MLI
19722015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1973
1974 PR fortran/66605
1975 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1976
b155cfd9
MP
19772015-06-29 Marek Polacek <polacek@redhat.com>
1978
1979 PR c/66322
1980 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1981 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1982 about -Wswitch-bool here.
1983 (do_case): Update c_add_case_label call.
1984 (c_finish_case): Update c_do_switch_warnings call.
1985
31521951
MP
19862015-06-27 Marek Polacek <polacek@redhat.com>
1987
1988 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1989
22d03525
MP
19902015-06-26 Marek Polacek <polacek@redhat.com>
1991
1992 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1993 INDIRECT_REF_P.
1994 * c-typeck.c (array_to_pointer_conversion): Likewise.
1995 (build_unary_op): Likewise.
1996 (c_finish_return): Likewise.
1997
f0889939
AM
19982015-06-25 Andrew MacLeod <amacleod@redhat.com>
1999
2000 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2001 * c-parser.c: Likewise.
2002
8d67ee55
RS
20032015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2004
2005 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2006 instead of pointer_hash.
2007 (detect_field_duplicates): Likewise.
2008
0ae9bd27
MP
20092015-06-25 Marek Polacek <polacek@redhat.com>
2010
2011 * c-array-notation.c: Use VAR_P throughout.
2012 * c-decl.c: Likewise.
2013 * c-objc-common.c: Likewise.
2014 * c-parser.c: Likewise.
2015 * c-typeck.c: Likewise.
2016
62f9079a
MP
20172015-06-25 Marek Polacek <polacek@redhat.com>
2018
2019 * c-decl.c: Use is_global_var throughout.
2020 * c-parser.c: Likewise.
2021 * c-typeck.c: Likewise.
2022
abb226c9
AM
20232015-06-17 Andrew MacLeod <amacleod@redhat.com>
2024
2025 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2026 * c-aux-info.c: Likewise.
2027 * c-convert.c: Likewise.
2028 * c-decl.c: Likewise.
2029 * c-errors.c: Likewise.
2030 * c-lang.c: Likewise.
2031 * c-objc-common.c: Likewise.
2032 * c-parser.c: Likewise.
2033 * c-typeck.c: Likewise.
2034
8cbababc
JH
20352015-06-11 Jan Hubicka <hubicka@ucw.cz>
2036
2037 PR middle-end/66325
2038 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2039 variants.
2040
a0349665
PMR
20412015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2042
2043 * c-decl.c (pop_scope): Register the main translation unit
2044 through the new debug hook.
2045
13fdf2e2
AM
20462015-06-08 Andrew MacLeod <amacleod@redhat.com>
2047
2048 * c-array-notation.c : Adjust include files.
2049 * c-aux-info.c : Likewise.
2050 * c-convert.c : Likewise.
2051 * c-decl.c : Likewise.
2052 * c-errors.c : Likewise.
2053 * c-lang.c : Likewise.
2054 * c-lang.h : Likewise.
2055 * c-objc-common.c : Likewise.
2056 * c-parser.c : Likewise.
2057 * c-typeck.c : Likewise.
2058
d7438551
AH
20592015-06-05 Aldy Hernandez <aldyh@redhat.com>
2060
2061 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2062 immediately clobber it.
2063 (c_write_global_declarations_1): Remove call to
2064 check_global_declaration_1.
2065 (c_write_global_declarations_2): Remove.
2066 (c_write_final_cleanups): Rename from c_write_global_declarations.
2067 Remove call to finalize_compilation_unit.
2068 Remove calls to debugging hooks.
2069 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2070 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2071 * c-tree.h: Remove c_write_global_declarations.
2072
ecb9f223
AM
20732015-06-04 Andrew MacLeod <amacleod@redhat.com>
2074
2075 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2076 * c-aux-info.c: Likewise.
2077 * c-convert.c: Likewise.
2078 * c-decl.c: Likewise.
2079 * c-errors.c: Likewise.
2080 * c-lang.c: Likewise.
2081 * c-objc-common.c: Likewise.
2082 * c-parser.c: Likewise.
2083 * c-typeck.c: Likewise.
2084
9482b620
MP
20852015-06-04 Marek Polacek <polacek@redhat.com>
2086
2087 PR c/66341
2088 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2089 it is a lvalue.
2090
bc51ace3
PK
20912015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2092
2093 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2094 Warn for empty struct.
2095 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2096
ea5b45b6
AT
20972015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2098
2099 * c-decl.c (start_function): Call plugin before parsing.
2100 (finish_function): Call plugin after parsing.
2101
c2d47482
PK
21022015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2103
2104 PR c/49551
2105 * c-decl.c (merge_decls): Merge DECL_COMMON.
2106
a95492ab
JW
21072015-05-22 Jim Wilson <jim.wilson@linaro.org>
2108
2109 * Make-lang.in (check_gcc_pallelize): Define.
2110
fd5c817a
MP
21112015-05-22 Marek Polacek <polacek@redhat.com>
2112
2113 PR c/47043
2114 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2115 attributes.
2116
c7b70a3c
MP
21172015-05-21 Marek Polacek <polacek@redhat.com>
2118
2119 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2120 DECL_BUILT_IN.
2121
21b634ae
MP
21222015-05-20 Marek Polacek <polacek@redhat.com>
2123
2124 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2125 * c-typeck.c: Likewise.
2126
296a8c2f
MP
21272015-05-19 Marek Polacek <polacek@redhat.com>
2128
2129 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2130
41b37d5e
JJ
21312015-05-19 Jakub Jelinek <jakub@redhat.com>
2132
2133 PR middle-end/66199
2134 * c-parser.c (c_parser_omp_for_loop): Don't add
2135 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2136 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2137 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2138 constructs.
2139
fab27f52
MM
21402015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2141
2142 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2143 swaps.
fab27f52 2144
40de31cf
MLI
21452015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2146
2147 PR fortran/44054
2148 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2149 accessor function.
2150
3aa3c9fc
MP
21512015-05-14 Marek Polacek <polacek@redhat.com>
2152
2153 PR c/66066
2154 PR c/66127
2155 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2156 rather than with 0.
2157
c3388e62
DM
21582015-05-12 David Malcolm <dmalcolm@redhat.com>
2159
2160 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2161 to add a call to warn_for_misleading_indentation.
2162 (c_parser_else_body): Likewise, adding param "else_loc".
2163 (c_parser_if_statement): Check for misleading indentation.
2164 (c_parser_while_statement): Likewise.
2165 (c_parser_for_statement): Likewise.
2166
755e528f
MP
21672015-05-08 Marek Polacek <polacek@redhat.com>
2168
2169 PR c/64918
2170 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2171 (output_init_element): Likewise.
2172
0173bd2a
MP
21732015-05-07 Marek Polacek <polacek@redhat.com>
2174
2175 PR c/65179
2176 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2177 value.
2178
9babc352
MP
21792015-04-30 Marek Polacek <polacek@redhat.com>
2180
2181 * c-typeck.c (set_init_label): Call error_at instead of error and
2182 pass LOC to it.
2183
ac9f18db
MP
2184 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2185 the type of a decl.
2186
ec3fba51
MP
2187 * c-typeck.c (c_build_va_arg): Clarify the error message.
2188
b811915d
TS
21892015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2190
2191 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2192 OMP_STANDALONE_CLAUSES.
2193
f3075008
MP
21942015-04-28 Marek Polacek <polacek@redhat.com>
2195
2196 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2197
4e81b788
MP
21982015-04-28 Marek Polacek <polacek@redhat.com>
2199
2200 PR c/65901
2201 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2202
6c1db78e
MP
22032015-04-25 Marek Polacek <polacek@redhat.com>
2204
2205 PR c/52085
2206 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2207 attribute.
2208
5c4abbb8
MP
22092015-04-23 Marek Polacek <polacek@redhat.com>
2210
2211 PR c/65345
2212 * c-decl.c (set_labels_context_r): New function.
2213 (store_parm_decls): Call it via walk_tree_without_duplicates.
2214 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2215 instead of create_tmp_var. Build TARGET_EXPR instead of
2216 COMPOUND_EXPR.
2217 (build_atomic_assign): Use create_tmp_var_raw instead of
2218 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2219
06aca1d5
IV
22202015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2221
2222 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2223 (c_parser_omp_target_update): Add missed %> to error_at ().
2224
8fba1830
BRF
22252015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2226
2227 PR target/55143
2228 * c-decl.c (c_default_pointer_mode): Remove definition.
2229 * c-tree.h (c_default_pointer_mode): Remove declaration.
2230
62021f64
TB
22312015-03-27 Tobias Burnus <burnus@net-b.de>
2232
2233 PR c/65586
2234 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2235 error out.
2236 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2237 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2238 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2239
9b65e171
JJ
22402015-03-19 Jakub Jelinek <jakub@redhat.com>
2241
2242 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2243 attribute for DECL_EXTERNAL VAR_DECLs.
2244
17958621
JJ
22452015-03-11 Jakub Jelinek <jakub@redhat.com>
2246
2247 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2248 argument.
2249
7ccb1a11
JJ
22502015-03-10 Jakub Jelinek <jakub@redhat.com>
2251
2252 PR c/65120
2253 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2254 before preparing arguments to warn_logical_not_parentheses.
2255
01177669
JJ
22562015-03-09 Jakub Jelinek <jakub@redhat.com>
2257
2258 PR c/65120
2259 * c-typeck.c (parser_build_binary_op): Don't warn for
2260 !!x == y or !b == y where b is _Bool.
2261
802ac282
MP
22622015-03-09 Marek Polacek <polacek@redhat.com>
2263
2264 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2265 * c-decl.c (grokdeclarator): Likewise.
2266 * c-typeck.c (build_binary_op): Likewise.
2267
e5165b60
MP
22682015-02-27 Marek Polacek <polacek@redhat.com>
2269
2270 PR c/65228
2271 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2272
065d214c
MP
22732015-02-14 Marek Polacek <polacek@redhat.com>
2274
2275 PR c/64768
2276 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2277 declared through a typedef name.
2278
e5d9235b
MP
22792015-02-13 Marek Polacek <polacek@redhat.com>
2280
2281 PR c/65050
2282 * c-decl.c (grokdeclarator): Print also the type when giving
2283 the error message about array's incomplete element type.
2284
fa01ffcc
JJ
22852015-02-11 Jakub Jelinek <jakub@redhat.com>
2286
2287 PR c/64824
2288 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2289 check in the POP macro.
2290
c3e38a03
MP
22912015-02-09 Marek Polacek <polacek@redhat.com>
2292
2293 PR c/64856
2294 * c-typeck.c (process_init_element): Don't always wrap
2295 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2296 initializing a range of elements.
2297
4886ec8e
JJ
22982015-02-04 Jakub Jelinek <jakub@redhat.com>
2299
2300 PR c/64824
2301 PR c/64868
2302 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2303
c3e38a03 23042015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2305
2306 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2307 processing enum declaration.
2308
7b33f0c8
MP
23092015-01-29 Marek Polacek <polacek@redhat.com>
2310
2311 PR c/64709
2312 * c-typeck.c (pop_init_level): If constructor_elements has
2313 exactly one element with integer_zerop value, set constructor_zeroinit
2314 to 1. Remove braces around warning_init call.
2315
dea63e49
JJ
23162015-01-27 Jakub Jelinek <jakub@redhat.com>
2317
2318 PR c/64766
2319 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2320 of FUNCTION_DECLs with error_mark_node.
2321
d38f7dce
JJ
23222015-01-26 Jakub Jelinek <jakub@redhat.com>
2323
2324 PR c/64778
2325 * c-typeck.c (convert_arguments): Return -1 if there are
2326 error_args, even if we've diagnosed too many arguments.
2327
cbf5d0e7
RB
23282015-01-21 Richard Biener <rguenther@suse.de>
2329
2330 PR middle-end/64313
2331 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2332 for builtins the user declared correctly.
2333
41dbbb37
TS
23342015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2335 Bernd Schmidt <bernds@codesourcery.com>
2336 Cesar Philippidis <cesar@codesourcery.com>
2337 James Norris <jnorris@codesourcery.com>
2338 Jakub Jelinek <jakub@redhat.com>
2339 Ilmir Usmanov <i.usmanov@samsung.com>
2340
2341 * c-parser.c: Include "gomp-constants.h".
2342 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2343 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2344 Use OMP_CLAUSE_SET_MAP_KIND.
2345 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2346 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2347 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2348 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2349 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2350 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2351 "copyout", "create", "delete", "deviceptr", "gang", "host",
2352 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2353 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2354 "present_or_create", "pcreate", "seq", "self", "vector",
2355 "vector_length", "wait", "worker".
2356 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2357 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2358 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2359 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2360 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2361 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2362 (c_parser_oacc_data_clause_deviceptr)
2363 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2364 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2365 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2366 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2367 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2368 (c_parser_oacc_parallel, c_parser_oacc_update)
2369 (c_parser_oacc_wait): New functions.
2370 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2371 (c_finish_oacc_data): New prototypes.
2372 * c-typeck.c: Include "gomp-constants.h".
2373 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2374 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2375 OMP_CLAUSE_SET_MAP_KIND.
2376 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2377 (c_finish_oacc_data): New functions.
2378 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2379 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2380 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2381 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2382 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2383 GOMP_MAP_FORCE_DEVICEPTR.
2384
adfac8df
JJ
23852015-01-09 Michael Collison <michael.collison@linaro.org>
2386
2387 * c-array-notation.c: Include hash-set.h, machmode.h,
2388 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2389 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2390 * c-aux-info.c: Ditto.
2391 * c-convert.c: Ditto.
2392 * c-decl.c: Ditto.
2393 * c-errors.c: Ditto.
2394 * c-lang.c: Dittoxs.
2395 * c-objc-common.c: Ditto.
2396 * c-parser.c: Ditto.
2397 * c-typeck.c: Include hash-set.h, machmode.h,
2398 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2399 fold-const.h, wide-int.h, inchash.h, real.h and
2400 fixed-value.h due to flattening of tree.h.
2401
2cc901dc
MP
24022015-01-07 Marek Polacek <polacek@redhat.com>
2403
2404 PR c/64417
2405 * c-typeck.c (process_init_element): Disallow initialization of
2406 a flexible array member with a string constant if the structure
2407 is in an array.
2408
5624e564
JJ
24092015-01-05 Jakub Jelinek <jakub@redhat.com>
2410
e5341100
JJ
2411 PR sanitizer/64344
2412 * c-typeck.c (convert_for_assignment, c_finish_return): For
2413 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2414 types also set in_late_binary_op around convert call.
2415 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2416 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2417 result on expr as last argument to ubsan_instrument_float_cast,
2418 if in_late_binary_op, don't use c_save_expr but save_expr.
2419
5624e564
JJ
2420 Update copyright years.
2421
5bd012f8
MP
24222015-01-05 Marek Polacek <polacek@redhat.com>
2423
2424 PR c/64423
2425 * c-typeck.c (build_array_ref): Pass loc down to
2426 warn_array_subscript_with_type_char.
2427
3f8257db 24282014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2429
2430 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2431 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2432 element type.
8e745a17 2433 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2434 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2435 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2436 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2437 to PEDWARN_FOR_QUALIFIERS.
768952be 2438
8f94a8c4
JJ
24392014-12-17 Jakub Jelinek <jakub@redhat.com>
2440
2441 PR sanitizer/64289
2442 * c-convert.c: Include ubsan.h.
2443 (convert): For real -> integral casts and
2444 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2445 instead instrument the float cast directly.
2446
b731b390
JJ
24472014-11-29 Jakub Jelinek <jakub@redhat.com>
2448
2449 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2450 c_finish_stmt_expr): Remove NULL last argument from
2451 create_tmp_var_raw and create_tmp_var calls.
2452 * c-array-notation.c (fix_builtin_array_notation_fn,
2453 build_array_notation_expr, fix_conditional_array_notations_1,
2454 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2455
541e35a6
MP
24562014-11-28 Marek Polacek <polacek@redhat.com>
2457
2458 PR c/63862
2459 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2460 convert the right operand to integer type.
2461
b286be94
MP
24622014-11-25 Marek Polacek <polacek@redhat.com>
2463
2464 PR c/63877
2465 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2466 for inline functions.
2467
aa7da51a
JJ
24682014-11-21 Jakub Jelinek <jakub@redhat.com>
2469
2470 PR target/63764
2471 * c-typeck.c (build_array_ref): Adjust
2472 convert_vector_to_pointer_for_subscript caller. If it returns true,
2473 call non_lvalue_loc on the result.
2474
d876207f
RB
24752014-11-11 Richard Biener <rguenther@suse.de>
2476
2477 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2478 to true.
2479
e5e44252
AK
24802014-11-10 Andi Kleen <ak@linux.intel.com>
2481
2482 PR c/60804
2483 * c-parser.c (c_parser_statement_after_labels): Call
2484 check_no_cilk.
2485 (c_parser_if_statement): Dito.
2486 (c_parser_switch_statement): Dito.
2487 (c_parser_while_statement): Dito.
2488 (c_parser_do_statement): Dito.
2489 (c_parser_for_statement): Dito.
2490 * c-typeck.c (c_finish_loop): Dito.
2491
13c21655
PC
24922014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2493
2494 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2495 OPT_Wshift_count_overflow in the warnings.
2496
2d51fcef
MP
24972014-10-30 Marek Polacek <polacek@redhat.com>
2498
2499 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2500 print the stripped version as well, if they're not the same.
2501
ef4bddc2
RS
25022014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2503
2504 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2505 machine_mode.
2506
c582198b
AM
25072014-10-28 Andrew MacLeod <amacleod@redhat.com>
2508
2509 * c-decl.c: Adjust include files.
2510 * c-parser.c: Ditto.
2511
ddc8de03
PM
25122014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2513 Tom Tromey <tromey@redhat.com>
2514
2515 * c-tree.h (enum c_oracle_request): New.
2516 (c_binding_oracle_function): New typedef.
2517 (c_binding_oracle, c_pushtag, c_bind): Declare.
2518 * c-decl.c (c_binding_oracle): New global.
2519 (I_SYMBOL_CHECKED): New macro.
2520 (i_symbol_binding): New function.
2521 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2522 (I_TAG_CHECKED): New macro.
2523 (i_tag_binding): New function.
2524 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2525 (I_LABEL_CHECKED): New macro.
2526 (i_label_binding): New function.
2527 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2528 (c_print_identifier): Save and restore c_binding_oracle.
2529 (c_pushtag, c_bind): New functions.
2530
60393bbc
AM
25312014-10-27 Andrew MacLeod <amacleod@redhat.com>
2532
2533 * c-typeck.c: Adjust include files.
2534
d723bb7c
MLI
25352014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2536
2537 PR c++/53061
2538 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2539 initialization here...
2540 (c_initialize_diagnostics): ... but here. Set defaults after
2541 building pretty-printer.
2542
1bc5a451
MP
25432014-10-23 Marek Polacek <polacek@redhat.com>
2544
2545 PR c/63626
2546 * c-decl.c (pop_scope): Don't print warning in external_scope.
2547
4435bb92
MP
25482014-10-19 Marek Polacek <polacek@redhat.com>
2549
2550 PR c/63567
2551 * c-typeck.c (output_init_element): Allow initializing objects with
2552 static storage duration with compound literals even in C99 and add
2553 pedwarn for it.
2554
7278465e
MP
25552014-10-17 Marek Polacek <polacek@redhat.com>
2556
2557 PR c/63567
2558 * c-typeck.c (digest_init): Allow initializing objects with static
2559 storage duration with compound literals even in C99 and add pedwarn
2560 for it.
2561
d9b7be2e
MP
25622014-10-17 Marek Polacek <polacek@redhat.com>
2563
2564 PR c/63543
2565 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2566 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2567 error multiple times. Print the type.
2568
f406ae1f
MP
25692014-10-17 Marek Polacek <polacek@redhat.com>
2570
2571 PR c/63549
2572 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2573 type.
2574
92574c7c
MP
25752014-10-17 Marek Polacek <polacek@redhat.com>
2576
2577 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2578 (start_function): Use OPT_Wimplicit_int instead of 0.
2579 (store_parm_decls_oldstyle): Likewise.
2580
1bc4a978
MT
25812014-10-17 Alan Modra <amodra@gmail.com>
2582
2583 PR middle-end/61848
2584 * c-decl.c (merge_decls): Don't merge section name or tls model
2585 to newdecl symtab node, instead merge to olddecl. Override
2586 existing olddecl section name. Set tls_model for all thread-local
2587 vars, not just OMP thread-private ones. Remove incorrect comment.
2588
83685514
AM
25892014-10-16 Andrew MacLeod <amacleod@redhat.com>
2590
2591 * c-decl.c: Adjust include files.
2592
78a7c317
DD
25932014-10-14 DJ Delorie <dj@redhat.com>
2594
2595 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2596 (c_token_starts_typename): Check all __intN, not just __int128.
2597 (c_token_starts_declspecs): Likewise.
2598 (c_parser_declspecs): Likewise.
2599 (c_parser_attribute_any_word): Likewise.
2600 (c_parser_objc_selector): Likewise.
2601 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2602 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2603 is specified.
2604 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2605 __int128.
2606 (finish_declspecs): Likewise.
2607
74d98c1e
AB
26082014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2609
8e745a17 2610 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 2611 the duplicate code.
8e745a17 2612 (c_parser_statement): Call the new function.
74d98c1e 2613
84937de2
MP
26142014-10-09 Marek Polacek <polacek@redhat.com>
2615
2616 PR c/63480
2617 * c-typeck.c (pop_init_level): Don't warn about initializing
2618 with { }.
2619
0382aaa0
MP
26202014-10-07 Marek Polacek <polacek@redhat.com>
2621
2622 PR c/59717
2623 * c-decl.c (header_for_builtin_fn): New function.
2624 (implicitly_declare): Suggest which header to include.
2625
7a0ca710
MP
26262014-10-07 Marek Polacek <polacek@redhat.com>
2627
2628 * c-convert.c (convert): Use error_operand_p.
2629 * c-typeck.c (require_complete_type): Likewise.
2630 (really_atomic_lvalue): Likewise.
2631 (digest_init): Likewise.
2632 (handle_omp_array_sections_1): Likewise.
2633
6bc8a126
MP
26342014-10-03 Marek Polacek <polacek@redhat.com>
2635
2636 PR c/63453
2637 * c-decl.c (pop_scope): Don't warn about "inline function declared
2638 but never defined" for functions marked with gnu_inline attribute.
2639
d90c0a59
JJ
26402014-09-25 Jakub Jelinek <jakub@redhat.com>
2641
2642 PR c++/63249
2643 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2644 on low_bound and length.
2645
083e891e
MP
26462014-09-24 Marek Polacek <polacek@redhat.com>
2647
2648 PR c/61405
2649 PR c/53874
2650 * c-parser.c: Don't define CPP_KEYWORD.
2651 (c_parser_switch_statement): Pass original type to c_finish_case.
2652 * c-tree.h (c_finish_case): Update declaration.
2653 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2654 conditionally to c_do_switch_warnings.
2655
8d95fe25
MP
26562014-09-03 Marek Polacek <polacek@redhat.com>
2657
2658 PR c/62024
2659 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2660 conversions.
2661
9a771876
JJ
26622014-09-02 Jakub Jelinek <jakub@redhat.com>
2663 Balaji V. Iyer <balaji.v.iyer@intel.com>
2664 Igor Zamyatin <igor.zamyatin@intel.com>
2665
2666 * c-parser.c (c_parser_cilk_for): New function.
2667 (c_parser_cilk_grainsize): Likewise.
2668 (c_get_temp_regvar): Likewise.
2669 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2670 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2671 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2672 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2673 case.
2674
b7679d96
CG
26752014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2676
2677 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2678 with using HOST_WIDE_INT without truncation to 'int'
2679
59ea0364
MP
26802014-08-22 Marek Polacek <polacek@redhat.com>
2681
2682 PR c++/62199
2683 * c-typeck.c (parser_build_binary_op): Adjust call to
2684 warn_logical_not_parentheses.
2685
671a475e
IZ
26862014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2687
2688 PR other/62008
2689 * c-parser.c (c_parser_array_notation): Check for correct
2690 type of an array added.
2691
04159acf
MP
26922014-08-19 Marek Polacek <polacek@redhat.com>
2693
2694 PR c++/62153
2695 * c-typeck.c (build_binary_op): If either operand of a comparison
2696 is a boolean expression, call maybe_warn_bool_compare.
2697
c77935ee
PP
26982014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2699
2700 PR c/45584
2701 * c-typeck.c (build_c_cast): Do a conversion even when the
2702 TYPE_MAIN_VARIANTs are the same.
2703
35aff4fb
MP
27042014-08-19 Marek Polacek <polacek@redhat.com>
2705
2706 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2707 pedwarn_c99 instead of pedwarn.
2708 (grokfield): Likewise.
2709 (warn_defaults_to): New function.
2710 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2711 Unconditionally call pedwarn_c99 instead of pedwarn.
2712 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2713 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2714 check flag_isoc11 before.
2715 * c-errors.c (pedwarn_c99): Change the return type to bool.
2716 Handle -Wc99-c11-compat.
2717 * c-parser.c (disable_extension_diagnostics): Handle
2718 warn_c99_c11_compat.
2719 (restore_extension_diagnostics): Likewise.
2720 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2721 instead of pedwarn, don't check flag_isoc11 before.
2722 (c_parser_declspecs): Likewise.
2723 (c_parser_alignas_specifier): Likewise.
2724 (c_parser_alignof_expression): Likewise.
2725 (c_parser_generic_selection): Likewise.
2726 * c-tree.h (pedwarn_c99): Update declaration.
2727 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2728 of pedwarn_c99.
2729
177cce46
MP
27302014-08-19 Marek Polacek <polacek@redhat.com>
2731
2732 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2733 to pedwarn_c90.
2734 * c-errors.c: Include "opts.h".
2735 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2736 * c-parser.c (disable_extension_diagnostics): Handle negative value
2737 of warn_c90_c99_compat, too.
2738 (restore_extension_diagnostics): Likewise.
2739 (c_parser_compound_statement_nostart): Pass
2740 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2741
6dc99c33
MP
27422014-08-12 Marek Polacek <polacek@redhat.com>
2743
2744 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2745 Add pedwarn.
2746 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2747 Likewise.
2748 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2749
3f8257db 27502014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
2751
2752 PR c/51849
2753 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2754 Call pedwarn_c90 instead of pedwarn.
2755 (check_bitfield_type_and_width): Likewise.
2756 (declspecs_add_qual): Likewise.
2757 (declspecs_add_type): Likewise.
2758 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2759 Adjust to only call pedwarn_c90.
2760 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2761 pedwarn_c90 instead of pedwarn.
2762 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2763 * c-parser.c (disable_extension_diagnostics): Handle
2764 warn_c90_c99_compat.
2765 (restore_extension_diagnostics): Likewise.
2766 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2767 pedwarn_c90 instead of pedwarn.
2768 (c_parser_initelt): Likewise.
2769 (c_parser_postfix_expression): Likewise.
2770 (c_parser_postfix_expression_after_paren_type): Likewise.
2771 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2772 * c-tree.h: Fix formatting.
2773 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2774 pedwarn_c90 instead of pedwarn.
2775
9f25a338
TS
27762014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2777
2778 * c-typeck.c: Remove include of pointer-set.h.
2779
044331a8
MP
27802014-08-07 Marek Polacek <polacek@redhat.com>
2781
2782 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2783
b787e7a2
TS
27842014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2785
2786 * c-typeck.c: Use hash_map instead of pointer_map.
2787
6e2830c3
TS
27882014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2789
2790 * c-decl.c: Use hash_set instead of pointer_set.
2791
a7ee52fb
IZ
27922014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2793
2794 PR middle-end/61455
2795 * c-array-notation.c (expand_array_notations): Handling
2796 of DECL_EXPR added.
2797
b4dfdc11
MG
27982014-07-31 Marc Glisse <marc.glisse@inria.fr>
2799
2800 PR c++/60517
2801 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2802 a local variable.
2803
976d5a22
TT
28042014-07-30 Tom Tromey <tromey@redhat.com>
2805
2806 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2807 field.
2808 (really_start_incremental_init, push_init_level): Initialize
2809 designator_depth.
2810 (pop_init_level): Set global designator_depth.
2811 (process_init_element): Check for designated_init attribute.
2812
30281de2
MP
28132014-07-20 Marek Polacek <polacek@redhat.com>
2814
2815 PR c/61852
2816 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2817 (implicitly_declare): Pass location to implicit_decl_warning.
2818
b108f48f
JJ
28192014-07-14 Jakub Jelinek <jakub@redhat.com>
2820
2821 PR middle-end/61294
2822 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2823 If non-NULL, call c_parser_check_literal_zero.
2824 (c_parser_check_literal_zero): New function.
2825 (c_parser_postfix_expression_after_primary): Adjust
2826 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2827
773ec47f
MP
28282014-07-06 Marek Polacek <polacek@redhat.com>
2829
2830 PR c/6940
2831 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2832 * c-tree.h (C_ARRAY_PARAMETER): Define.
2833 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2834 function parameter.
2835
22e1cf1c 28362014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 2837 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
2838
2839 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2840 releasing symbol.
2841
52ec0ea3
MP
28422014-07-01 Marek Polacek <polacek@redhat.com>
2843
2844 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2845 instead of 0 to WARN_FOR_ASSIGNMENT.
2846
d5c3d343
MP
28472014-07-01 Marek Polacek <polacek@redhat.com>
2848
2849 PR c/58286
2850 * c-typeck.c (convert_for_assignment): Pass
2851 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2852
6a7253a4
MP
28532014-06-30 Marek Polacek <polacek@redhat.com>
2854
2855 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2856 has no_sanitize_undefined attribute.
2857
5e88a8f4
IZ
28582014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2859
2860 PR middle-end/57541
2861 * c-array-notation.c (fix_builtin_array_notation_fn):
2862 Check for 0 arguments in builtin call. Check that bultin argument is
2863 correct.
2864 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2865 index.
2866
9698b078
SH
28672014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2868
2869 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2870 qualifiers in __auto_type for atomic types.
2871 (c_parser_typeof_specifier): Discard all type qualifiers in
2872 __typeof__ for atomic types.
2873
6e07c515
MP
28742014-06-25 Marek Polacek <polacek@redhat.com>
2875
2876 PR c/61162
2877 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2878 the return expression to c_finish_return.
2879
da6f124d
JJ
28802014-06-25 Jakub Jelinek <jakub@redhat.com>
2881
2882 * c-typeck.c (c_finish_omp_clauses): Make sure
2883 OMP_CLAUSE_LINEAR_STEP has correct type.
2884
c203e8a7
TS
28852014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2886
2887 * c-decl.c: Adjust.
2888
56ad0e38
JJ
28892014-06-24 Jakub Jelinek <jakub@redhat.com>
2890
2891 * c-parser.c (c_parser_omp_for_loop): For
2892 #pragma omp parallel for simd move lastprivate clause from parallel
2893 to for rather than simd.
2894
47c2554f
MP
28952014-06-23 Marek Polacek <polacek@redhat.com>
2896
2897 * c-typeck.c (parser_build_binary_op): Don't call
2898 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2899
56363ffd
JH
29002014-06-15 Jan Hubicka <hubicka@ucw.cz>
2901
2902 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2903 * c-decl.c (merge_decls): Likewise.
2904
d7ff7ae5
MP
29052014-06-09 Marek Polacek <polacek@redhat.com>
2906
2907 PR c/36446
2908 * c-typeck.c (error_init): Call inform instead of error_at.
2909 (pedwarn_init): Call inform instead of pedwarn.
2910 (warning_init): Call inform instead of warning_at.
2911
24d047a3
JH
29122014-06-07 Jan Hubicka <hubicka@ucw.cz>
2913
2914 * c-decl.c (merge_decls): Use set_decl_section_name.
2915 (duplicate_decls): Remove node if it exists.
2916
9bac5cbb
G
29172014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2918
2919 PR c/53119
2920 * c-typeck.c (push_init_level, process_init_element,
2921 pop_init_level): Correct check for zero initialization, move
2922 missing brace warning to respect zero initialization.
2923
8ffcdea8
MP
29242014-06-05 Marek Polacek <polacek@redhat.com>
2925
2926 PR c/56724
2927 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2928
742938c9
MP
29292014-06-05 Marek Polacek <polacek@redhat.com>
2930
2931 PR c/49706
2932 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2933 on the left hand side operand of a comparison.
2934
6447c55d
MP
29352014-06-05 Marek Polacek <polacek@redhat.com>
2936
2937 PR c/48062
2938 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2939 Print note only if the warning was printed.
2940
9dc7743c
IZ
29412014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2942
2943 PR c/58942
2944 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2945 with a pointer.
2946
fedfecef
MP
29472014-06-03 Marek Polacek <polacek@redhat.com>
2948
2949 PR c/60439
2950 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2951 c_start_case.
2952 * c-tree.h (c_start_case): Update.
2953 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2954 switch condition has boolean value.
2955
9b2b7279
AM
29562014-06-02 Andrew MacLeod <amacleod@redhat.com>
2957
2958 * c-decl.c: Include builtins.h.
2959 * c-parser.c: Likewise.
2960
5c1bc275
MP
29612014-05-27 Marek Polacek <polacek@redhat.com>
2962
2963 PR c/56724
2964 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2965 error and warning calls to error_at and warning_at. Pass location of
2966 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2967 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2968 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2969
97563bc8
IZ
29702014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2971
2972 PR c/61191
2973 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2974 function parameters.
2975
aede2c10
JH
29762014-05-23 Jan Hubicka <hubicka@ucw.cz>
2977
2978 * c-decl.c (merge_decls): Preserve symtab node pointers.
2979 (duplicate_decls): Free new decl.
2980
edbba2ce
TS
29812014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2982
f3316c6d
TS
2983 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2984 initialization.
2985
edbba2ce
TS
2986 * c-parser.c (c_parser_omp_target): Return bool values.
2987
68c81f24
TS
29882014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2989
2990 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2991 num_teams_loc variable to num_thread_limit_loc.
2992
632f2871
RS
29932014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2994
2995 * c-array-notation.c (expand_array_notations): Use void_node
2996 instead of void_zero_node.
2997
766090c2
TS
29982014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2999
3000 * c-decl.c (finish_struct): Adjust.
3001 (finish_enum): Likewise.
3002 (bind): Adjust.
3003 (record_inline_static): Likewise.
3004 (push_scope): Likewise.
3005 (make_label): Likewise.
3006 (lookup_label_for_goto): Likewise.
3007 (finish_struct): Likewise.
3008 (finish_enum): Likewise.
3009 (store_parm_decls): Likewise.
3010 (c_push_function_context): Likewise.
3011 * c-lang.h: Remove usage of variable_size gty attribute.
3012 * c-parser.c (c_parse_init): Adjust.
3013 (c_parse_file): Likewise.
3014
2b107f6b
MP
30152014-05-13 Marek Polacek <polacek@redhat.com>
3016
3017 PR c/61162
3018 * c-typeck.c (convert_for_assignment): Pass location to
3019 WARN_FOR_ASSIGNMENT instead of input_location.
3020
d033409e
MP
30212014-05-10 Marek Polacek <polacek@redhat.com>
3022
3023 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3024 maybe_warn_string_init.
3025 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3026 maybe_warn_string_init.
3027 * c-tree.h (maybe_warn_string_init): Update declaration.
3028 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3029 Call pedwarn_init with loc instead of with input_location.
3030 (digest_init): Pass init_loc to maybe_warn_string_init.
3031 (pop_init_level): Call pedwarn_init with loc instead of with
3032 input_location.
3033 (set_init_index): Likewise.
3034 (process_init_element): Likewise.
3035
ea58ef42
MP
30362014-05-09 Marek Polacek <polacek@redhat.com>
3037
3038 PR c/61096
3039 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3040 (c_parser_initelt): Pass location to set_init_label. Pass array index
3041 location to set_init_index.
3042 * c-tree.h (push_init_level): Update declaration.
3043 (pop_init_level): Likewise.
3044 (set_init_index): Likewise.
3045 (set_init_label): Likewise.
3046 * c-typeck.c (error_init): Add location parameter. Call error_at
3047 instead of error.
3048 (digest_init): Pass init_loc to error_init.
3049 (really_start_incremental_init):
3050 (push_init_level): Add location parameter. Pass loc to pop_init_level
3051 and error_init.
3052 (pop_init_level): Likewise.
3053 (set_designator): Add location parameter. Pass loc to pop_init_level,
3054 push_init_level, and error_init.
3055 (set_init_index): Add location parameter. Pass loc to error_init and
3056 set_designator.
3057 (set_init_label): Likewise.
3058 (output_init_element): Pass loc to error_init.
3059 (process_init_element): Pass loc to error_init, pop_init_level,
3060 pedwarn_init, and push_init_level.
3061
661a0813
MP
30622014-05-09 Marek Polacek <polacek@redhat.com>
3063
3064 PR c/50459
3065 * c-parser.c (c_parser_attributes): Parse the arguments as an
3066 expression-list if the attribute takes identifier.
3067
2793eeab
MP
30682014-05-08 Marek Polacek <polacek@redhat.com>
3069
3070 PR c/61053
3071 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3072 TYPE_ALIGN_UNIT.
3073
f827930a
MP
30742014-05-08 Marek Polacek <polacek@redhat.com>
3075
3076 PR c/61077
3077 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3078 of main.
3079
1d60af08
KZ
30802014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3081 Mike Stump <mikestump@comcast.net>
3082 Richard Sandiford <rdsandiford@googlemail.com>
3083
3084 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3085 (finish_enum): Use wide-int interfaces.
3086 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3087 * c-typeck.c (build_c_cast): Likewise.
3088 (set_nonincremental_init_from_string): Likewise.
3089 (c_tree_equal): Likewise.
3090
a0e24419
MP
30912014-05-02 Marek Polacek <polacek@redhat.com>
3092
3093 PR c/25801
3094 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3095 Return size_one_node when the type is not complete.
3096 (pointer_diff): Remove comment.
3097 (build_unary_op): Improve error messages.
3098
19fc9faa
MP
30992014-05-02 Marek Polacek <polacek@redhat.com>
3100
3101 * c-typeck.c (c_finish_return): Separate warning_at calls.
3102
63bc4e87
MP
31032014-05-02 Marek Polacek <polacek@redhat.com>
3104
3105 * c-tree.h (error_init): Remove declaration.
3106 (pedwarn_init): Likewise.
3107 * c-typeck.c (error_init): Make static and move above.
3108 (pedwarn_init): Likewise.
3109 (warning_init): Move above.
3110 (maybe_warn_string_init): Likewise.
3111
4bd2511b
JL
31122014-05-01 Jeff Law <law@redhat.com>
3113
3114 Revert:
3115
3116 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3117 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3118 avoid goto.
3119
6a358dcb
MP
31202014-05-02 Marek Polacek <polacek@redhat.com>
3121
3122 PR c/60784
3123 * c-typeck.c (push_init_level): Set constructor_designated to
3124 p->designated for structures.
3125
ae5ebda4
MP
31262014-05-01 Marek Polacek <polacek@redhat.com>
3127
3128 PR c/60915
3129 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3130 function-definition has an attribute after the declarator.
3131
96b40f8d
MP
31322014-05-01 Marek Polacek <polacek@redhat.com>
3133
3134 PR c/60257
3135 * c-typeck.c (warning_init): Add location_t parameter. Call
3136 warning_at instead of warning.
3137 (push_init_level): Pass input_location to warning_init.
3138 (add_pending_init): Add location_t parameter. Pass loc to
3139 warning_init.
3140 (set_nonincremental_init): Pass input_location to add_pending_init.
3141 (set_nonincremental_init_from_string): Likewise.
3142 (output_init_element): Pass loc to warning_init and to
3143 add_pending_init.
3144
32e00768
MP
31452014-05-01 Marek Polacek <polacek@redhat.com>
3146
3147 PR c/43395
3148 * c-typeck.c (c_finish_return): Distinguish between label and variable
3149 when warning about returning local address.
3150
c9379ce2
MP
31512014-05-01 Marek Polacek <polacek@redhat.com>
3152
3153 PR c/29467
3154 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3155 in C89 mode.
3156
d00887e8
MP
31572014-05-01 Marek Polacek <polacek@redhat.com>
3158
3159 PR c/43245
3160 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3161 instead of 0 to WARN_FOR_QUALIFIERS.
3162
5436fa2e
MP
31632014-05-01 Marek Polacek <polacek@redhat.com>
3164
3165 PR c/56989
3166 * c-typeck.c (default_conversion): Use better location for
3167 error call.
3168
f8ed5150
MP
31692014-04-30 Marek Polacek <polacek@redhat.com>
3170
3171 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3172 also when SANITIZE_FLOAT_DIVIDE is on.
3173
8337d1db
MP
31742014-04-30 Marek Polacek <polacek@redhat.com>
3175
3176 PR c/60139
3177 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3178 and pedwarn_init. Use loc insted of input_location.
3179
c4bdc42f
MP
31802014-04-30 Marek Polacek <polacek@redhat.com>
3181
3182 PR c/60351
3183 * c-typeck.c (build_binary_op): Use location when warning about
3184 shift count.
3185
45484dcf
MP
31862014-04-25 Marek Polacek <polacek@redhat.com>
3187
3188 PR c/18079
3189 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3190 always_inline/noinline and hot/cold attributes.
3191
34cf811f
MP
31922014-04-25 Marek Polacek <polacek@redhat.com>
3193
3194 PR c/60114
3195 * c-parser.c (c_parser_initelt): Pass input_location to
3196 process_init_element.
3197 (c_parser_initval): Pass loc to process_init_element.
3198 * c-tree.h (process_init_element): Adjust declaration.
3199 * c-typeck.c (push_init_level): Pass input_location to
3200 process_init_element.
3201 (pop_init_level): Likewise.
3202 (set_designator): Likewise.
3203 (output_init_element): Add location_t parameter. Pass loc to
3204 digest_init.
3205 (output_pending_init_elements): Pass input_location to
3206 output_init_element.
3207 (process_init_element): Add location_t parameter. Pass loc to
3208 output_init_element.
3209
42056eac
JJ
32102014-04-24 Jakub Jelinek <jakub@redhat.com>
3211
3212 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3213 atomic-clause, allow comma in between atomic-clause and
3214 seq_cst.
3215
e162a134
JJ
32162014-04-22 Jakub Jelinek <jakub@redhat.com>
3217
3218 PR c/59073
3219 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3220 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3221
2f6babac
IZ
32222014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3223
3224 PR middle-end/60469
3225 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3226 create_tmp_var instead build_decl for creating temps.
3227 (build_array_notation_expr): Likewise.
3228 (fix_conditional_array_notations_1): Likewise.
3229 (fix_array_notation_expr): Likewise.
3230 (fix_array_notation_call_expr): Likewise.
3231
8edbfaa6
JJ
32322014-03-28 Jakub Jelinek <jakub@redhat.com>
3233
3234 PR c++/60689
3235 * c-tree.h (c_build_function_call_vec): New prototype.
3236 * c-typeck.c (build_function_call_vec): Don't call
3237 resolve_overloaded_builtin here.
3238 (c_build_function_call_vec): New wrapper function around
3239 build_function_call_vec. Call resolve_overloaded_builtin here.
3240 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3241 Call c_build_function_call_vec instead of build_function_call_vec.
3242 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3243 * c-decl.c (finish_decl): Likewise.
3244
7485aeea
MLI
32452014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3246
3247 PR c/55383
3248 * c-typeck.c: Use correct format string in cast-qual warning
3249
b17a8b07
TS
32502014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3251
3252 * c-decl.c (c_decl_attributes): Use
3253 lang_hooks.types.omp_mappable_type.
3254 * c-typeck.c (c_finish_omp_clauses): Likewise.
3255
3af9c5e9
MP
32562014-03-06 Marek Polacek <polacek@redhat.com>
3257
3258 PR c/60197
3259 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3260 of checking tree code.
3261
1c9f5f33
PK
32622014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3263
3264 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3265 (c_parser_parameter_declaration): Likewise.
3266
cc28fc7f
MP
32672014-02-19 Marek Polacek <polacek@redhat.com>
3268
3269 PR c/60195
3270 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3271 Call mark_exp_read on exp.value.
3272 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3273 TREE_ADDRESSABLE on old instead of val.
3274 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3275
b581c05c
PK
32762014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3277
3278 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3279 C_EXPR_APPEND by vec_safe_push.
3280 * c-tree.h (C_EXPR_APPEND): Remove.
3281
81e5eca8
MP
32822014-01-31 Marek Polacek <polacek@redhat.com>
3283
3284 PR c/59963
3285 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3286 build_function_call_vec.
3287 (build_function_call): Likewise.
3288 (build_atomic_assign): Likewise.
3289 (build_function_call_vec): Add arg_loc parameter. Use it.
3290 (convert_arguments): Likewise.
3291 (convert_for_assignment): Rename rhs_loc to expr_loc.
3292 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3293 (c_parser_objc_keywordexpr): Likewise.
3294 (c_parser_postfix_expression_after_primary): Call
3295 build_function_call_vec with expr_loc rather than op_loc.
3296 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3297 build_function_call_vec.
3298 (c_parser_expr_list): Add locations parameter. Fill it with locations
3299 of function arguments.
3300 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3301
68fca595
MP
33022014-01-30 Marek Polacek <polacek@redhat.com>
3303
3304 PR c/59940
3305 * c-typeck.c (build_function_call_vec): Use loc parameter.
3306 (convert_arguments): Add location parameter. Use it.
3307 (ep_convert_and_check): Likewise.
3308 (build_atomic_assign): Adjust convert_for_assignment call.
3309 (build_modify_expr): Likewise.
3310 (digest_init): Likewise.
3311 (c_finish_return): Likewise.
3312 (build_conditional_expr): Adjust ep_convert_and_check calls.
3313 (convert_for_assignment): Add rhs_loc parameter. Use it.
3314 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3315 calls.
3316
fa337f3a
RB
33172014-01-30 Richard Biener <rguenther@suse.de>
3318
3319 PR c/59905
3320 * c-typeck.c (build_function_call_vec): Do not replace calls
3321 to a function via an incompatible type with a runtime abort.
3322
b72271b9
BI
33232014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3324
3325 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3326 flag_enable_cilkplus with flag_cilkplus.
3327 (c_parser_direct_declarator_inner): Likewise.
3328 (c_parser_attribute_any_word): Likewise.
3329 (c_parser_attributes): Likewise.
3330 (c_parser_compound_statement): Likewise.
3331 (c_parser_statement_after_labels): Likewise.
3332 (c_parser_if_statement): Likewise.
3333 (c_parser_switch_statement): Likewise.
3334 (c_parser_do_statement): Likewise.
3335 (c_parser_for_statement): Likewise.
3336 (c_parser_unary_expression): Likewise.
3337 (c_parser_postfix_expression): Likewise.
3338 (c_parser_postfix_expression_after_primary): Likewise.
3339 (c_parser_postfix_expression_after_primary): Likewise.
3340 (c_parser_omp_clause_name): Likewise.
3341 (c_finish_omp_declare_simd): Likewise.
3342 (c_parser_cilk_verify_simd): Likewise.
3343 * c-typeck.c (build_array_ref): Likewise.
3344 (build_function_call_vec): Likewise.
3345 (convert_arguments): Likewise.
3346 (build_compound_expr): Likewise.
3347 (c_finish_return): Likewise.
3348 (c_finish_if_stmt): Likewise.
3349 (c_finish_loop): Likewise.
3350 (build_binary_op): Likewise.
3351
393e8e8b
MP
33522014-01-23 Marek Polacek <polacek@redhat.com>
3353
3354 PR c/59846
3355 * c-typeck.c (parser_build_binary_op): Use location instead of
3356 input_location.
3357 (build_binary_op): Pass location to shorten_compare.
3358
f04dda30
MP
33592014-01-23 Marek Polacek <polacek@redhat.com>
3360
3361 PR c/58346
3362 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3363 an empty aggregate.
3364
789eadcd
MP
33652014-01-23 Marek Polacek <polacek@redhat.com>
3366
3367 PR c/59871
3368 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3369 of a comma expression.
3370 (emit_side_effect_warnings): Likewise.
3371
40f14e9f
BI
33722014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3373
3374 PR c/59825
3375 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3376 function to use walk_tree and moved a lot of its functionality to
3377 expand_array_notations.
3378 (expand_array_notations): New function.
3379
74558dd9
BI
33802014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3381
3382 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3383 attribute an attribute without value.
3384
652fea39
JJ
33852014-01-23 Jakub Jelinek <jakub@redhat.com>
3386
3387 PR middle-end/58809
3388 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3389 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3390
f34f1c87
MP
33912014-01-22 Marek Polacek <polacek@redhat.com>
3392
3393 PR c/59891
3394 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3395 of remove_c_maybe_const_expr on op1 and op2.
3396
241f845a
JJ
33972014-01-15 Jakub Jelinek <jakub@redhat.com>
3398
3399 PR c/58943
3400 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3401 effects, preevaluate rhs using SAVE_EXPR first.
3402
9a74f20c
BI
34032014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3404
3405 PR c++/59631
3406 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3407 statements with if-elseif statements.
3408
96066ce1
MP
34092014-01-06 Marek Polacek <polacek@redhat.com>
3410
3411 PR c/57773
3412 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3413 defined bit-field types only in ISO C.
3414
23a5b65a
RS
34152014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3416
3417 Update copyright years
3418
f9030485
RS
34192014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3420
3421 * c-array-notation.c: Use the standard form for the copyright notice.
3422
41958c28
BI
34232013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3424
3425 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3426 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3427 field in parser is not empty. If not-empty, call the function
3428 c_parser_finish_omp_declare_simd.
3429 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3430 between SIMD-enabled functions and #pragma simd. Added new parameter.
3431 (c_parser_cilk_all_clauses): Modified the usage of the function
3432 c_parser_cilk_clause_vectorlength as mentioned above.
3433 (c_parser_cilk_simd_fn_vector_attrs): New function.
3434 (c_finish_cilk_simd_fn_tokens): Likewise.
3435 (is_cilkplus_vector_p): Likewise.
3436 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3437 "nomask," and "mask" strings in clause name.
3438 (c_parser_omp_all_clauses): Added 3 new case statements:
3439 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3440 PRAGMA_CILK_CLAUSE_NOMASK.
3441 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3442 check for vector attribute and if so call the function
3443 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3444 called the function c_finish_cilk_simd_fn_tokens.
3445 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3446 parser field is non-empty. If so, parse them as you would parse
3447 the omp declare simd pragma.
3448 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3449 Added a check when step is a parameter and flag it as error.
3450 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3451 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3452 pragma_omp_clause.
3453
cef0fd0e
TS
34542013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3455
3456 * c-parser.c (c_parser_omp_parallel): Fix description.
3457
12893402
BI
34582013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3459
3460 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3461 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3462 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3463 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3464
296674db
JM
34652013-12-04 Joseph Myers <joseph@codesourcery.com>
3466
3467 PR c/52023
3468 * c-parser.c (c_parser_alignas_specifier): Use
3469 c_sizeof_or_alignof_type instead of c_alignof.
3470 (c_parser_alignof_expression): Likewise, with min_alignof
3471 parameter depending on alignof spelling used.
3472
edd28054
MP
34732013-12-04 Marek Polacek <polacek@redhat.com>
3474
3475 PR c/54113
3476 * c-decl.c (start_function): Don't warn for missing prototype for
3477 inline functions.
3478
da0fc454
MP
34792013-12-03 Marek Polacek <polacek@redhat.com>
3480
3481 PR c/59351
3482 * c-decl.c (build_compound_literal): Allow compound literals with
3483 empty initial value.
3484
4c2ecab0
JM
34852013-12-02 Joseph Myers <joseph@codesourcery.com>
3486
3487 PR c/58235
3488 * c-typeck.c (build_modify_expr): Diagnose assignment to
3489 expression with array type.
3490
340baef7
JM
34912013-11-29 Joseph Myers <joseph@codesourcery.com>
3492
3493 PR c/42262
3494 * c-typeck.c (process_init_element): Do not treat a string as
3495 initializing a whole array when used with a designator for an
3496 individual element.
3497
6763b9f7
JM
34982013-11-29 Joseph Myers <joseph@codesourcery.com>
3499
3500 PR c/57574
3501 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3502 an inline function following a static declaration.
3503
e7bd1de1
JJ
35042013-11-28 Jakub Jelinek <jakub@redhat.com>
3505
3506 PR c/59310
3507 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3508 to p_name before calling c_parser_omp_teams instead of after.
3509 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3510 argument. Remove unused p_name variable.
3511
0136f8f0
AH
35122013-11-27 Aldy Hernandez <aldyh@redhat.com>
3513 Jakub Jelinek <jakub@redhat.com>
3514
3515 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3516 external_scope is NULL.
3517
241b71bb
TV
35182013-11-27 Tom de Vries <tom@codesourcery.com>
3519 Marc Glisse <marc.glisse@inria.fr>
3520
3521 PR c++/59032
3522 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3523
2fb9a547
AM
35242013-11-22 Andrew MacLeod <amacleod@redhat.com>
3525
3526 * c-typeck.c: Add required include files from gimple.h.
3527
8400e75e
DM
35282013-11-22 David Malcolm <dmalcolm@redhat.com>
3529
3530 * c-decl.c (define_label, shadow_tag_warned)
3531 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3532 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3533 (declspecs_add_type): Remove use of in_system_header macro.
3534 * c-parser.c (c_parser_unary_expression): Likewise.
3535 * c-typeck.c (store_init_value, process_init_element)
3536 (c_start_case): Likewise.
3537
3538 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3539 macro.
3540
3541 * c-parser.c (c_parser_set_source_position_from_token): Remove
3542 reference to in_system_header from comment.
3543
386b1f1f
RS
35442013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3545
3546 * c-decl.c (grokdeclarator): Update comment to refer to
3547 tree_to_[su]hwi rather than tree_low_cst.
3548
ae7e9ddd
RS
35492013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3550
3551 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3552 tree_to_uhwi throughout.
3553
9439e9a1
RS
35542013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3555
3556 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3557 throughout.
3558
9541ffee
RS
35592013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3560
3561 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3562 throughout.
3563
c02065fc
AH
35642013-11-15 Aldy Hernandez <aldyh@redhat.com>
3565
3566 * c-parser.c (c_parser_cilk_simd): New.
3567 (c_parser_cilk_verify_simd): New.
3568 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3569 (c_parser_omp_for_loop): Add case for NE_EXPR.
3570 Set c_break_label for CILK_SIMD.
3571 (c_parser_cilk_clause_vectorlength): New.
3572 (c_parser_cilk_clause_linear): New.
3573 (c_parser_cilk_clause_name): New.
3574 (c_parser_cilk_all_clauses): New.
3575 * c-typeck.c (build_unary_op): Pass location argument to
3576 readonly_error.
3577 (build_modify_expr): Same.
3578 (build_asm_expr): Same.
3579 (c_finish_bc_stmt): Error on break/continue in loops.
3580
18f429e2
AM
35812013-11-14 Andrew MacLeod <amacleod@redhat.com>
3582
3583 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3584
d8a2d370
DN
35852013-11-14 Diego Novillo <dnovillo@google.com>
3586
3587 * c-decl.c: Include print-tree.h.
3588 Include stor-layout.h.
3589 Include varasm.h.
3590 Include attribs.h.
3591 Include stringpool.h.
3592 * c-lang.c: Include fold-const.h.
3593 * c-parser.c: Include stringpool.h.
3594 Include attribs.h.
3595 Include stor-layout.h.
3596 Include varasm.h.
3597 Include trans-mem.h.
3598 * c-typeck.c: Include stor-layout.h.
3599 Include trans-mem.h.
3600 Include varasm.h.
3601 Include stmt.h.
3602
38b7bc7f
JM
36032013-11-13 Joseph Myers <joseph@codesourcery.com>
3604
3605 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3606 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3607 __auto_type.
3608 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3609 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3610 RID_AUTO_TYPE.
3611 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3612 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3613 (c_parser_declarator, c_parser_direct_declarator_inner)
3614 (c_parser_parameter_declaration, c_parser_type_name): All callers
3615 changed.
3616 (c_parser_declaration_or_fndef): Handle declarations with type
3617 determined from the initializer.
3618
45b0be94
AM
36192013-11-12 Andrew MacLeod <amacleod@redhat.com>
3620
18f429e2 3621 * c-typeck.c: Include gimplify.h.
45b0be94 3622
582d9b50
JM
36232013-11-12 Joseph Myers <joseph@codesourcery.com>
3624
3625 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3626 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3627 comment.
3628 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3629 or _Thread_local as appropriate in diagnostics.
3630 (build_null_declspecs): Initialize ret->thread_gnu_p.
3631 (declspecs_add_scspec): Handle either __thread or _Thread_local
3632 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3633 pedantic. Do not disallow _Thread_local extern and _Thread_local
3634 static.
3635
267bac10
JM
36362013-11-07 Joseph Myers <joseph@codesourcery.com>
3637 Andrew MacLeod <amacleod@redhat.com>
3638
3639 * c-aux-info.c (gen_type): Handle atomic qualifier.
3640 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3641 qualifiers when compating types.
3642 (shadow_tag_warned): Handle atomic_p in declspecs.
3643 (quals_from_declspecs): Likewise.
3644 (start_decl): Use c_type_promotes_to when promoting argument
3645 types.
3646 (grokdeclarator): Handle _Atomic.
3647 (get_parm_info): Diagnose any qualifier on "void" as only
3648 parameter.
3649 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3650 comparing types. Use c_type_promotes_to when promoting argument
3651 types.
3652 (finish_function): Use c_type_promotes_to when promoting argument
3653 types.
3654 (build_null_declspecs): Handle atomic_p in declspecs.
3655 (declspecs_add_qual): Handle RID_ATOMIC.
3656 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3657 (c_token_starts_declspecs): Handle RID_ATOMIC.
3658 (c_parser_declspecs): Handle atomic type specifiers and
3659 qualifiers.
3660 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3661 from types of expressions with atomic type.
3662 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3663 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3664 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3665 (c_parser_statement_after_labels, c_parser_switch_statement)
3666 (c_parser_for_statement, c_parser_expr_no_commas)
3667 (c_parser_conditional_expression, c_parser_binary_expression)
3668 (c_parser_cast_expression, c_parser_unary_expression)
3669 (c_parser_postfix_expression)
3670 (c_parser_postfix_expression_after_primary, c_parser_expression):
3671 Use convert_lvalue_to_rvalue.
3672 (c_parser_expression_conv, c_parser_expr_list): Document
3673 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3674 (c_parser_objc_synchronized_statement): Use
3675 convert_lvalue_to_rvalue.
3676 (c_parser_objc_selector): Handle RID_ATOMIC.
3677 (c_parser_objc_receiver, c_parser_array_notation): Use
3678 convert_lvalue_to_rvalue.
3679 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3680 _Atomic (type-name).
3681 (struct c_declspecs): Add atomic_p field.
3682 (convert_lvalue_to_rvalue): Declare.
3683 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3684 corresponding atomic types.
3685 (qualify_type): Don't add _Atomic qualifiers from second argument.
3686 (comp_target_types): Do not allow _Atomic mismatches.
3687 (type_lists_compatible_p): Do not remove atomic qualifiers when
3688 comparing types.
3689 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3690 (build_atomic_assign): New functions.
3691 (build_unary_op): Use build_atomic_assign for atomic increment and
3692 decrement.
3693 (build_conditional_expr): Do not treat _Atomic void as a qualified
3694 version of void.
3695 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3696 (find_anonymous_field_with_type, convert_to_anonymous_field)
3697 (convert_for_assignment): Do not remove atomic qualifiers when
3698 comparing types.
3699 (digest_init): Do not accept initialization of arrays of atomic
3700 elements by string constants.
3701 (build_asm_expr): Use convert_lvalue_to_rvalue.
3702 (build_binary_op): Do not treat _Atomic void as a qualified
3703 version of void.
3704
0c249d4b
DD
37052013-11-06 DJ Delorie <dj@redhat.com>
3706
3707 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3708 both explicit and builtin, print the location of the explicit one.
3709
6d7f7e0a
TB
37102013-11-05 Tobias Burnus <burnus@net-b.de>
3711
3712 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3713 c_parser_omp_distribute, c_parser_omp_teams,
3714 c_parser_omp_target, c_parser_omp_declare): Handle
3715 -fopenmp-simd.
3716
b906f4ca
MP
37172013-11-03 Marek Polacek <polacek@redhat.com>
3718
3719 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3720
ee1d5a02
JJ
37212013-11-01 Jakub Jelinek <jakub@redhat.com>
3722
3723 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3724 check_dup_generic at the end, unless remove is true.
3725 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3726 remove = true;.
3727 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3728
5a9785fb
JJ
37292013-10-31 Jakub Jelinek <jakub@redhat.com>
3730
3731 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3732 with decl that is not pointer nor array.
3733
939b37da
BI
37342013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3735
3736 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3737 a spawning function is found.
3738 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3739 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3740 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3741 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3742 case.
3743 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3744 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3745 expr.
3746 (c_finish_return): Added a check to reject _Cilk_spawn in return
3747 expression.
3748 (build_cilk_spawn): New function.
3749 (build_cilk_sync): Likewise.
3750 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3751
d4af74d4
TB
37522013-10-27 Tobias Burnus <burnus@net-b.de>
3753
3754 PR other/33426
3755 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3756 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3757 (c_parser_statement_after_labels): Update calls.
3758
d73749df 37592013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3760
3761 PR other/33426
3762 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3763 Handle PRAGMA_IVDEP.
3764 (c_parser_statement_after_labels): Update call.
3765
f28aa681
MP
37662013-10-24 Marek Polacek <polacek@redhat.com>
3767
3768 * c-parser.c (c_parser_struct_declaration): Add a comment.
3769 (c_parser_declarator): Don't allow _Alignas here.
3770
0645c1a2
AM
37712013-10-17 Andrew MacLeod <amacleod@redhat.com>
3772
3773 * c-parser.c: Include omp-low.h.
3774 * c-typeck.c: Likewise.
3775
568a31f2
MP
37762013-10-17 Marek Polacek <polacek@redhat.com>
3777
3778 PR c/58267
3779 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3780 Document syntax of the array-declarator.
3781 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3782 are not permitted.
3783 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3784 (c_parser_struct_declaration): Likewise.
3785 (c_parser_declarator): Likewise.
3786 (c_parser_direct_declarator_inner): Likewise.
3787 (c_parser_parameter_declaration): Likewise.
3788 (c_parser_type_name): Likewise.
3789
acf0174b
JJ
37902013-10-11 Jakub Jelinek <jakub@redhat.com>
3791
3792 * c-lang.h (current_omp_declare_target_attribute): New extern
3793 decl.
3794 * c-parser.c: Include c-lang.h.
3795 (struct c_parser): Change tokens to c_token *.
3796 Add tokens_buf field. Change tokens_avail type to unsigned int.
3797 (c_parser_consume_token): If parser->tokens isn't
3798 &parser->tokens_buf[0], increment parser->tokens.
3799 (c_parser_consume_pragma): Likewise.
3800 (enum pragma_context): Add pragma_struct and pragma_param.
3801 (c_parser_external_declaration): Adjust
3802 c_parser_declaration_or_fndef caller.
3803 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3804 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3805 Adjust recursive call.
3806 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3807 of pragma_external.
3808 (c_parser_parameter_declaration): Use pragma_param instead of
3809 pragma_external.
3810 (c_parser_compound_statement_nostart, c_parser_label,
3811 c_parser_for_statement): Adjust
3812 c_parser_declaration_or_fndef callers.
3813 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3814 it through to c_parser_conditional_expression.
3815 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3816 pass it through to c_parser_binary_expression. Adjust recursive
3817 call.
3818 (c_parser_binary_expression): Remove prec argument, add
3819 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3820 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3821 binop matches it, use build2 instead of parser_build_binary_op.
3822 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3823 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3824 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3825 Handle pragma_struct and pragma_param the same as pragma_external.
3826 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3827 (c_parser_omp_variable_list): Parse array sections for
3828 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3829 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3830 (c_parser_omp_clause_reduction): Handle user defined reductions.
3831 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3832 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3833 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3834 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3835 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3836 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3837 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3838 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3839 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3840 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3841 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3842 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3843 (c_parser_omp_for_loop): Add CODE argument, pass it through
3844 to c_finish_omp_for. Change last argument to cclauses,
3845 and adjust uses to grab parallel clauses from the array of all
3846 the split clauses. Adjust c_parser_binary_expression,
3847 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3848 (omp_split_clauses): New function.
3849 (c_parser_omp_simd): New function.
3850 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3851 Allow the function to be called also when parsing combined constructs,
3852 and call c_parser_omp_simd when parsing for simd.
3853 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3854 #pragma omp section, require exactly one structured-block instead of
3855 sequence of statements.
3856 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3857 Allow the function to be called also when parsing combined constructs.
3858 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3859 Allow the function to be called also when parsing combined
3860 constructs.
3861 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3862 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3863 c_parser_omp_teams, c_parser_omp_target_data,
3864 c_parser_omp_target_update, c_parser_omp_target,
3865 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3866 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3867 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3868 (c_parser_omp_construct): Add p_name and mask vars. Handle
3869 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3870 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3871 and c_parser_omp_sections callers.
3872 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3873 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3874 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3875 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3876 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3877 OMP_CLAUSE_DEPEND.
3878 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3879 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3880 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3881 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3882 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3883 * c-typeck.c: Include tree-inline.h.
3884 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3885 handle_omp_array_sections_1, handle_omp_array_sections,
3886 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3887 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3888 user defined reductions.
3889 (c_tree_equal): New function.
3890 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3891 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3892 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3893 c_check_omp_declare_reduction_r): New prototypes.
3894 * c-decl.c (current_omp_declare_target_attribute): New variable.
3895 (c_decl_attributes): New function.
3896 (start_decl, start_function): Use it instead of decl_attributes.
3897 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3898 c_omp_reduction_decl, c_omp_reduction_lookup,
3899 c_check_omp_declare_reduction_r): New functions.
3900
0a6c2227
TT
39012013-09-25 Tom Tromey <tromey@redhat.com>
3902
3903 * Make-lang.in (c/gccspec.o): Remove.
3904 (CFLAGS-c/gccspec.o): New variable.
3905 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3906 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3907 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3908
f3bc55f0
TT
39092013-09-25 Tom Tromey <tromey@redhat.com>
3910
3911 * Make-lang.in (c/gccspec.o): Don't use subshell.
3912
a24d975c
MP
39132013-09-18 Marek Polacek <polacek@redhat.com>
3914
3915 PR sanitize/58443
3916 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3917 Remove unnecessary check.
3918
ce6923c5
MP
39192013-09-18 Marek Polacek <polacek@redhat.com>
3920
3921 PR sanitizer/58411
3922 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3923 no_sanitize_undefined attribute.
3924
a1e51df9
KT
39252013-09-13 Kai Tietz <ktietz@redhat.com>
3926
3927 PR target/57848
3928 * c-decl.c (c_builtin_function_ext_scope): Remove
3929 wrong assumption that it is never called on prexisting
3930 symbol.
3931
0af94e6f
JR
39322013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3933
3934 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3935
20059c8b
GDR
39362013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3937
3938 * c-objc-common.c (c_tree_printer): Tidy.
3939
de5a5fa1
MP
39402013-08-30 Marek Polacek <polacek@redhat.com>
3941
3942 * c-typeck.c (build_binary_op): Add division by zero and shift
3943 instrumentation.
3944
2531a1d9 39452013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 3946 Joseph Myers <joseph@codesourcery.com>
2531a1d9 3947
6e2bcc98 3948 PR c/35649
2531a1d9
JR
3949 * c-typeck.c (c_common_type): Prefer double_type_node over
3950 other REAL_TYPE types with the same precision.
3951 (convert_arguments): Likewise.
3952
025311c4
GDR
39532013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3954
3955 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3956 (c_initialize_diagnostics): Call a destructor for the early printer.
3957
da6ca2b5
GDR
39582013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3959
3960 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3961 printer initialization.
3962
318cda85 39632013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 3964
318cda85
BI
3965 PR c/57490
3966 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3967 check for truth values.
3968 (expand_array_notation_exprs): Added truth values case. Removed an
3969 unwanted else. Added for-loop to walk through subtrees in default
3970 case.
3971
b066401f
GDR
39722013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3973
3974 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3975
fb48aadc
JM
39762013-07-23 Joseph Myers <joseph@codesourcery.com>
3977
3978 * c-parser.c (struct c_generic_association): Fix typo.
3979
433cc7b0
TT
39802013-07-23 Tom Tromey <tromey@redhat.com>
3981 Joseph Myers <joseph@codesourcery.com>
3982
3983 * c-parser.c (struct c_generic_association): New.
3984 (c_generic_association_d): New typedef.
3985 (c_parser_generic_selection): New function.
3986 (c_parser_postfix_expression): Handle RID_GENERIC.
3987
26d40c3d
JM
39882013-07-13 Jason Merrill <jason@redhat.com>
3989
3990 PR c++/57793
3991 * c-decl.c (finish_struct): Check for too-large class.
3992
ecdbd01a 39932013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
3994
3995 PR c/57821
3996 * c-typeck.c (set_init_index): When folding, check for index overflow.
3997
1141ed3f
BI
39982013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3999
4000 * c-parser.c (c_parser_array_notation): Removed rejection of array
4001 notations in an array of function pointers.
4002
713b46fa
BI
40032013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4004
4005 * c-array-notation.c (make_triplet_val_inv): New function.
4006 (create_cmp_incr): Likewise.
4007 (create_array_refs): Likewise.
4008 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4009 Also modularized common parts between functions and called the function.
4010 (build_array_notation_expr): Likewise.
4011 (fix_conditional_array_notations_1): Likewise.
4012 (fix_array_notation_expr): Likewise.
4013 (fix_array_notation_call_expr): Likewise.
4014
92f20202
MP
40152013-06-18 Marek Polacek <polacek@redhat.com>
4016
4017 PR c/57630
4018 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4019
73a23b06
BI
40202013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4021
4022 * c-array-notation.c (build_array_notation_expr): Reject array notation
4023 mismatch between LHS and RHS even inside a call_expr. Also, removed
4024 a couple while statements that were dead code.
4025
00b8517d
BI
40262013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4027
4028 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4029 excessive precision expressions in function parameters. Also removed
4030 couple unwanted while statements.
4031
1509bdda
BI
40322013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4033
4034 * c-array-notation.c (expand_array_notation_exprs): Added
4035 ARRAY_NOTATION_REF case.
4036
d60f1706
BI
40372013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4038
4039 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4040 function to c-family/array-notation-common.c.
4041 (is_cilkplus_reduce_builtin): Likewise.
4042 (find_rank): Likewise.
4043 (extract_array_notation_exprs): Likewise.
4044 (replace_array_notations): Likewise.
4045 (find_inv_trees): Likewise.
4046 (replace_inv_trees): Likewise.
4047 (contains_array_notation_expr): Likewise.
4048 (find_correct_array_notation_type): Likewise.
4049 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4050 (struct inv_list): Moved this to c-family/array-notation-common.c.
4051 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4052
6d6efbb3
BI
40532013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4054
4055 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4056 reduction functions outside the for-loop. Added a check if the fundecl
4057 is non-NULL. Finally, removed an unwanted if-statement, and made the
4058 body unconditional.
4059
25c22937
BI
40602013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4061
4062 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4063 condition of the if-statement matches the rank of else-block and then-
4064 block when array notations are used.
4065 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4066 expression after the entire function body is parsed.
4067 (c_parser_expr_no_commas): Delayed creating array notation expressions
4068 to the end of function parsing.
4069 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4070 whole if-statement instead of just the condition.
4071 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4072
edd25645
BI
40732013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4074
4075 PR c/57474
4076 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4077 array to NULL_TREE if they are unused. Also added a check for the
4078 field to be NULL before its fields are used in future.
4079
065ce7f1
RO
40802013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4081
4082 PR bootstrap/57450
4083 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4084 (build_array_notation_expr): Likewise.
4085
36536d79
BI
40862013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4087
4088 * c-typeck.c (build_array_ref): Added a check to see if array's
4089 index is greater than one. If true, then emit an error.
4090 (build_function_call_vec): Exclude error reporting and checking
4091 for builtin array-notation functions.
4092 (convert_arguments): Likewise.
4093 (c_finish_return): Added a check for array notations as a return
4094 expression. If true, then emit an error.
4095 (c_finish_loop): Added a check for array notations in a loop
4096 condition. If true then emit an error.
4097 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4098 (build_binary_op): Added a check for array notation expr inside
4099 op1 and op0. If present, we call another function to find correct
4100 type.
4101 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4102 * c-parser.c (c_parser_compound_statement): Check if array
4103 notation code is used in tree, if so, then transform them into
4104 appropriate C code.
4105 (c_parser_expr_no_commas): Check if array notation is used in LHS
4106 or RHS, if so, then build array notation expression instead of
4107 regular modify.
4108 (c_parser_postfix_expression_after_primary): Added a check for
4109 colon(s) after square braces, if so then handle it like an array
4110 notation. Also, break up array notations in unary op if found.
4111 (c_parser_direct_declarator_inner): Added a check for array
4112 notation.
4113 (c_parser_compound_statement): Added a check for array notation in
4114 a stmt. If one is present, then expand array notation expr.
4115 (c_parser_if_statement): Likewise.
4116 (c_parser_switch_statement): Added a check for array notations in
4117 a switch statement's condition. If true, then output an error.
4118 (c_parser_while_statement): Similarly, but for a while.
4119 (c_parser_do_statement): Similarly, but for a do-while.
4120 (c_parser_for_statement): Similarly, but for a for-loop.
4121 (c_parser_unary_expression): Check if array notation is used in a
4122 pre-increment or pre-decrement expression. If true, then expand
4123 them.
4124 (c_parser_array_notation): New function.
4125 * c-array-notation.c: New file.
4126 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4127
cd192ccc
MS
41282013-05-23 Mike Stump <mikestump@comcast.net>
4129
4130 * c-typeck.c (convert_for_assignment): Handle references to memory
4131 spaces better.
4132
427b248d
JM
41332013-05-16 Jason Merrill <jason@redhat.com>
4134
4135 * Make-lang.in (cc1$(exeext)): Use link mutex.
4136
44d90fe1
PC
41372013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4138
4139 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4140 to simply use OPT_Wpointer_arith.
4141 (build_unary_op): Likewise.
4142
4e7d7b3d
JJ
41432013-04-03 Jakub Jelinek <jakub@redhat.com>
4144
4145 PR c/19449
4146 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4147 argument. If set, or it temporarily for parsing of the first
4148 argument into force_folding_builtin_constant_p.
4149 (c_parser_postfix_expression): Adjust callers.
4150
839b422f
RB
41512013-03-21 Richard Biener <rguenther@suse.de>
4152
4153 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4154 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4155
2ee028f1
MP
41562013-02-12 Marek Polacek <polacek@redhat.com>
4157
4158 PR c/44938
4159 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4160 origtypes to NULL.
4161
8824edff
JJ
41622013-01-24 Jakub Jelinek <jakub@redhat.com>
4163
4164 PR c/56078
4165 * c-typeck.c (set_nonincremental_init_from_string): If
4166 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4167 returned false.
4168 (process_init_element): Likewise.
4169
eadd3d0d
JJ
41702012-12-20 Jakub Jelinek <jakub@redhat.com>
4171
4172 PR c++/55619
4173 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4174 argument, don't call default_function_array_conversion
4175 nor c_fully_fold here.
4176 (c_parser_asm_statement): Adjust callers.
4177 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4178 and outputs here, and call default_function_array_conversion
4179 on inputs that don't need to be addressable.
4180
f8a93a2e
JJ
41812012-12-18 Jakub Jelinek <jakub@redhat.com>
4182
4183 PR c/39464
4184 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4185 warning require that both c_common_unsigned_type as well as
4186 c_common_signed_type is the same for both mvl and mvr types.
4187
9771b263
DN
41882012-11-16 Diego Novillo <dnovillo@google.com>
4189
4190 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4191
4192 * c-common.c: Use new vec API in vec.h.
4193 * c-common.h: Likewise.
4194 * c-gimplify.c: Likewise.
4195 * c-pragma.c: Likewise.
4196 * c-pretty-print.c: Likewise.
4197 * c-pretty-print.h: Likewise.
4198 * c-semantics.c: Likewise.
4199 * c-decl.c: Likewise.
4200 * c-parser.c: Likewise.
4201 * c-tree.h: Likewise.
4202 * c-typeck.c: Likewise.
4203
880661a4
JW
42042012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4205
4206 PR c++/54930
4207 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4208
077d1abe
MLI
42092012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4210
4211 PR c/53066
4212 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4213 shadows a function, unless the variable is a function or a
4214 pointer-to-function.
4215
3a785c97
JJ
42162012-10-12 Jakub Jelinek <jakub@redhat.com>
4217
4218 PR c/54381
4219 * c-parser.c (struct c_tree_loc_pair): Removed.
4220 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4221 add location_t * and tree * arguments, fill in array of 3
4222 sizeof_arg trees and corresponding locs.
4223 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4224 c_parser_expr_list callers.
4225 (c_parser_postfix_expression_after_primary): Likewise. Pass
4226 array of 3 sizeof_arg trees and locs (corresponding to first
4227 3 arguments) to sizeof_pointer_memaccess_warning.
4228
703c8606
LC
42292012-10-09 Lawrence Crowl <crowl@google.com>
4230
4231 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4232 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4233 hash table.
4234
5d9de0d0
PC
42352012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4236
4237 PR c++/54194
4238 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4239 call.
4240
a212e43f
MG
42412012-10-09 Marc Glisse <marc.glisse@inria.fr>
4242
4243 PR c++/54427
4244 * c-typeck.c: Include c-common.h.
4245 (enum stv_conv): Moved to c-common.h.
4246 (scalar_to_vector): Moved to c-common.c.
4247 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4248 * Make-lang.in: c-typeck.c depends on c-common.h.
4249
3b78de56
AC
42502012-10-04 Arnaud Charlet <charlet@adacore.com>
4251
4252 * c-decl.c (c_write_global_declarations): Fix handling of
4253 -fdump-ada-spec*.
4254
78c60e3d
SS
42552012-09-30 Sharad Singhai <singhai@google.com>
4256
4257 * c-decl.c (c_write_global_declarations): Use a different method
4258 to determine if the dump has ben initialized.
4259
9f33203d
JM
42602012-09-14 Joseph Myers <joseph@codesourcery.com>
4261
4262 PR c/54552
4263 * c-typeck.c (c_cast_expr): When casting to a type requiring
4264 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4265 c_fully_fold first.
4266
a27d595d
JM
42672012-09-14 Joseph Myers <joseph@codesourcery.com>
4268
4269 PR c/54103
4270 * c-typeck.c (build_unary_op): Pass original argument of
4271 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4272 any C_MAYBE_CONST_EXPR, if it has integer operands.
4273 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4274 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4275 to c_objc_common_truthvalue_conversion, then remove any
4276 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4277 c_objc_common_truthvalue_conversion not
4278 c_common_truthvalue_conversion.
4279 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4280 call note_integer_operands for arguments with integer operands
4281 that are not integer constants.
4282
9feb29df
JJ
42832012-09-13 Jakub Jelinek <jakub@redhat.com>
4284
4285 PR c/54559
4286 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4287 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4288
d409320c
JJ
42892012-08-31 Jakub Jelinek <jakub@redhat.com>
4290
4291 PR c/54428
4292 * c-convert.c (convert): Don't call fold_convert_loc if
4293 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4294 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4295 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4296
6265d07c
JJ
42972012-08-24 Jakub Jelinek <jakub@redhat.com>
4298
4299 PR c/54355
4300 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4301 for nested and empty_ok arguments in the call to
4302 c_parser_declaration_or_fndef.
4303
1a4049e7
JJ
43042012-08-17 Jakub Jelinek <jakub@redhat.com>
4305
4306 * c-tree.h (c_last_sizeof_arg): Declare.
4307 * c-parser.c (struct c_tree_loc_pair): New type.
4308 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4309 non-NULL.
4310 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4311 (c_parser_postfix_expression_after_primary): Likewise. Call
4312 sizeof_pointer_memaccess_warning if needed.
4313 (sizeof_ptr_memacc_comptypes): New function.
4314 * c-typeck.c (c_last_sizeof_arg): New global variable.
4315 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4316
0229aee9
UB
43172012-07-24 Uros Bizjak <ubizjak@gmail.com>
4318
4319 * c-lang.h (lang_decl): Add variable_size GTY option.
4320
7ee2468b
SB
43212012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4322
4323 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4324 * Make-lang.in: Fix dependencies.
4325
d4a10d0a
SB
43262012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4327
4328 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4329 and add language Makefile hooks.
4330 * config-lang.in: New file.
4331 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4332 add the required "normal" config-lang.in rules.
4333 * c-lang.h: Moved from gcc/ to here.
4334 * c-tree.h: Likewise.
4335 * c-objc-common.c: Likewise.
4336 * c-objc-common.h: Likewise.
4337 * c-typeck.c: Likewise.
4338 * c-convert.c: Likewise.
4339 * c-lang.c: Likewise.
4340 * c-aux-info.c: Likewise.
4341 * c-errors.c: Likewise.
4342 * gccspec.c: Likewise.
4343 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4344 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4345\f
cbe34bb5 4346Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4347
4348Copying and distribution of this file, with or without modification,
4349are permitted in any medium without royalty provided the copyright
4350notice and this notice are preserved.