]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Remove trailing period from various diagnostic messages (PR translation/79923)
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
36618428
MP
12017-03-09 Marek Polacek <polacek@redhat.com>
2
3 PR sanitizer/79757
4 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
5 parameter declarations with initializers.
6
01e5af5a
JJ
72017-03-09 Jakub Jelinek <jakub@redhat.com>
8
9 PR c/79969
10 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
11 TYPE_STUB_DECL.
12
a71dbc63
JJ
132017-03-07 Jakub Jelinek <jakub@redhat.com>
14
15 PR c/79834
16 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
17 for "may only be used in compound statements" diagnostics, change it
18 such that the same translatable string is used for all pragmas. For
19 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
20 diagnostics.
21 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
22 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
23 "may only be used in compound statements" diagnostics, such that the
24 same translatable string is used for all pragmas.
25
1ff4bae6
MP
262017-03-04 Marek Polacek <polacek@redhat.com>
27
28 PR c/79847
29 * c-decl.c (implicit_decl_warning): Add missing space.
30
7f5a7d78
MP
312017-03-03 Marek Polacek <polacek@redhat.com>
32
33 PR c/79758
34 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
35 current_function_prototype_arg_types is error_mark_node. Fix
36 formatting. Use TREE_VALUE instead of TREE_TYPE.
37
883c8f06
JJ
382017-03-03 Jakub Jelinek <jakub@redhat.com>
39
79c9b7a8
JJ
40 PR c/79837
41 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
42 %<min%> or %<max%> in the diagnostics, instead mention identifier.
43 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
44 diagnostics.
45
883c8f06
JJ
46 PR c/79836
47 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
48 instead of %<_Generic>.
49 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
50 (c_parser_omp_target_exit_data): Use %<release%> instead of
51 %<release>.
52
324ff1a0
JJ
532017-02-28 Jakub Jelinek <jakub@redhat.com>
54
55 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
56 instead of just cond ? "..." : "...".
57 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
58 for "enter"/"exit" keyword.
59 (c_finish_oacc_routine): Don't use %s to supply portions of the
60 message.
61
4227c9ad
JJ
622017-02-24 Jakub Jelinek <jakub@redhat.com>
63
64 PR c++/79588
65 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
66 handle -Wrestrict here.
67 * c-typeck.c (build_function_call_vec): Adjust
68 check_function_arguments caller.
69
5d972e66
RB
702017-02-23 Richard Biener <rguenther@suse.de>
71
72 PR c/79684
73 * gimple-parser.c (c_parser_gimple_statement): Use set_error
74 to initialize c_exprs to return.
75 (c_parser_gimple_binary_expression): Likewise.
76 (c_parser_gimple_unary_expression): Likewise.
77 (c_parser_gimple_postfix_expression): Likewise.
78
61ac5ebe
MP
792017-02-22 Marek Polacek <polacek@redhat.com>
80
81 PR c/79662
82 * c-typeck.c (convert_arguments): Handle error_mark_node.
83
41d1b0b1
PK
842017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
85
86 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
87 value of c_parser_parse_ssa_name against error_mark_node and emit
88 error if ssa name is anonymous and written as default definition.
89
eab1f169
PK
902017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
91
92 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
93 FMA_EXPR.
94
bcac0b4d
JJ
952017-02-16 Jakub Jelinek <jakub@redhat.com>
96
97 PR c++/79512
98 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
99 ignore #pragma omp target even when not followed by identifier.
100
1be33173
PK
1012017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
102
103 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
104 (c_parser_gimple_unary_expression): Likewise.
105
aa326bfb
JJ
1062017-02-13 Jakub Jelinek <jakub@redhat.com>
107
108 * c-parser.c (c_parser_oacc_declare): Add missing space in
109 diagnostics.
110
8a398bc5
PK
1112017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
112
113 PR c/79478
114 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
115 set_c_expr_source_range when parsing ssa-name.
116
3dcde5ef
PG
1172017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
118 Richard Biener <rguenther@suse.de>
119
120 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
121 building IL when arguments are error_mark_node.
122 (c_parser_gimple_unary_expression): Likewise.
123 (c_parser_gimple_if_stmt): Likewise.
124 (c_parser_gimple_switch_stmt): Likewise.
125 (c_parser_gimple_return_stmt): Likewise.
126 (c_parser_parse_ssa_name): When name lookup fails do not build
127 an SSA name. Use undeclared rather than not declared in error
128 reporting.
129
192b048b
MP
1302017-02-09 Marek Polacek <polacek@redhat.com>
131
132 PR c/79428
133 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
134 instead of c_parser_skip_until_found.
135
56f71478
JJ
1362017-02-09 Jakub Jelinek <jakub@redhat.com>
137
138 PR c/79431
139 * c-parser.c (c_parser_omp_declare_target): Don't invoke
140 symtab_node::get on automatic variables.
141
02889d23
CLT
1422016-02-09 Nathan Sidwell <nathan@codesourcery.com>
143 Chung-Lin Tang <cltang@codesourcery.com>
144
145 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
146 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
147 semantic checking.
148 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
149
7af4b20d
RB
1502017-02-07 Richard Biener <rguenther@suse.de>
151
152 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
153 (c_parser_gimple_postfix_expression_after_primary):
154 Do not use c_build_function_call_vec to avoid folding and promotion.
155 Simplify.
156
e5e391d6
MO
1572017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
158
159 PR lto/79061
160 * c-decl.c (pop_scope): Pass main_input_filename to
161 build_translation_unit_decl.
162
c2e84327
DM
1632017-01-24 David Malcolm <dmalcolm@redhat.com>
164
165 * c-parser.c: Include "read-rtl-function.h" and
166 "run-rtl-passes.h".
167 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
168 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
169 production. Update for renaming of field "gimple_pass" to
170 "gimple_or_rtl_pass". If __RTL was seen, call
171 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
172 to an auto_timevar, to cope with early exit.
173 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
174 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
175 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
176 Handle RID_RTL.
177 (c_parser_parse_rtl_body): New function.
178 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
179 (struct c_declspecs): Rename field "gimple_pass" to
180 "gimple_or_rtl_pass". Add field "rtl_p".
181 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
182 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
183 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
184 (c_parser_gimple_or_rtl_pass_list): ...this.
185
2ebd93e1
MP
1862017-01-20 Marek Polacek <polacek@redhat.com>
187
188 PR c/64279
189 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
190
b1c95bb5
RB
1912017-01-13 Richard Biener <rguenther@suse.de>
192
193 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
194 nops.
195
25329913
RB
1962017-01-13 Richard Biener <rguenther@suse.de>
197
198 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
199 _Literal ( type-name ) number.
200
6bb4ea5c
RB
2012017-01-12 Richard Biener <rguenther@suse.de>
202
203 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
204 __MEM.
205
6b5b4e9c
JJ
2062017-01-11 Jakub Jelinek <jakub@redhat.com>
207
208 PR c++/72813
209 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
210 PCH file.
211
e3252775
RB
2122017-01-11 Richard Biener <rguenther@suse.de>
213
214 PR bootstrap/79052
215 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
216 returns on parse errors.
217
a9342885
MP
2182017-01-04 Marek Polacek <polacek@redhat.com>
219
220 PR c++/64767
221 * c-parser.c (c_parser_postfix_expression): Mark zero character
222 constants by setting original_type in c_expr.
223 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
224 with a zero character constant.
225 (char_type_p): New function.
226
5dd9a9d0
DM
2272017-01-04 David Malcolm <dmalcolm@redhat.com>
228
229 * c-parser.c (c_parser_declaration_or_fndef): Create a
230 rich_location at init_loc and parse it to start_init.
231 (last_init_list_comma): New global.
232 (c_parser_braced_init): Update last_init_list_comma when parsing
233 commas. Pass it to pop_init_level. Pass location of closing
234 brace to pop_init_level.
235 (c_parser_postfix_expression_after_paren_type): Create a
236 rich_location at type_loc and parse it to start_init.
237 (c_parser_omp_declare_reduction): Likewise for loc.
238 * c-tree.h (start_init): Add rich_location * param.
239 (pop_init_level): Add location_t param.
240 * c-typeck.c (struct initializer_stack): Add field
241 "missing_brace_richloc".
242 (start_init): Add richloc param, use it to initialize
243 the stack node's missing_brace_richloc.
244 (last_init_list_comma): New decl.
245 (finish_implicit_inits): Pass last_init_list_comma to
246 pop_init_level.
247 (push_init_level): When finding missing open braces, add fix-it
248 hints to the richloc.
249 (pop_init_level): Add "insert_before" param and pass it
250 when calling pop_init_level. Add fixits about missing
251 close braces to any richloc. Use the richloc for the
252 -Wmissing-braces warning.
253 (set_designator): Pass last_init_list_comma to pop_init_level.
254 (process_init_element): Likewise.
255
cbe34bb5
JJ
2562017-01-01 Jakub Jelinek <jakub@redhat.com>
257
258 Update copyright years.
259
d17680f3
JJ
2602016-12-21 Jakub Jelinek <jakub@redhat.com>
261
0dba7960
JJ
262 PR bootstrap/78817
263 * c-typeck.c (build_function_call_vec): If check_function_arguments
264 returns true, set TREE_NO_WARNING on CALL_EXPR.
265
d17680f3
JJ
266 PR c/77767
267 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
268 to *expr instead of overwriting it.
269
aa90531e
RB
2702016-12-20 Richard Biener <rguenther@suse.de>
271
272 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
273 error recovery.
274 (c_parser_gimple_statement): Only build assigns for non-error
275 stmts.
276 (c_parser_gimple_postfix_expression_after): Improve error recovery.
277
629b3d75
MJ
2782016-12-14 Martin Jambor <mjambor@suse.cz>
279
280 * c-parser.c: Include omp-general.h and omp-offload.h instead of
281 omp-low.h.
282 (c_finish_oacc_routine): Adjusted call to
283 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
284 to use their new names.
285 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
286 use its new name.
287 (c_parser_oacc_update): Likewise.
288 (c_parser_omp_simd): Likewise.
289 (c_parser_omp_target_update): Likewise.
290 * c-typeck.c: Include omp-general.h instead of omp-low.h.
291 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
292 name.
293 (c_finish_omp_cancellation_point): Likewise.
294 * gimple-parser.c: Do not include omp-low.h
295
c5af52eb
CP
2962016-12-02 Cesar Philippidis <cesar@codesourcery.com>
297 James Norris <jnorris@codesourcery.com>
298
299 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
300 EXIT_DATA,WAIT} are not used in compound statements.
301 (c_parser_oacc_enter_exit_data): Update diagnostics.
302
48330c93
BE
3032016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
304
305 PR c++/71973
306 * c-decl.c (diagnose_mismatched_decls): Use
307 OPT_Wbuiltin_declaration_mismatch here too.
308
899ca90e 3092016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
310 Alan Hayward <alan.hayward@arm.com>
311 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
312
313 * c-decl.c (merge_decls): Use SET_DECL_MODE.
314 (make_label, finish_struct): Likewise.
315
1ee62b92 3162016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 317 Richard Biener <rguenther@suse.de>
22b15758 318
8e745a17
JJ
319 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
320 * config-lang.in (gtfiles): Add c/c-parser.h.
321 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
322 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
323 * c-parser.c (enum c_id_kind, struct c_token,
324 c_parser_next_token_is, c_parser_next_token_is_not,
325 c_parser_next_token_is_keyword,
326 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
327 Split out to ...
328 * c-parser.h: ... new header.
329 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 330 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
331 c_token_starts_typename, c_parser_next_token_starts_declspecs,
332 c_parser_next_tokens_start_declaration, c_parser_consume_token,
333 c_parser_error, c_parser_require, c_parser_skip_until_found,
334 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
335 c_parser_type_name): Export.
336 (c_parser_tokens_buf): New function.
337 (c_parser_error): Likewise.
338 (c_parser_set_error): Likewise.
339 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
340 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
341 via c_parser_parse_gimple_body.
8e745a17
JJ
342 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
343 c_token_starts_typename, c_parser_next_token_starts_declspecs,
344 c_parser_next_tokens_start_declaration, c_parser_consume_token,
345 c_parser_error, c_parser_require, c_parser_skip_until_found,
346 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
347 c_parser_type_name): Declare.
1ee62b92
PG
348 (struct c_parser): Declare forward.
349 (c_parser_tokens_buf): Declare.
8e745a17
JJ
350 (c_parser_error): Likewise.
351 (c_parser_set_error): Likewise.
352 * gimple-parser.c: New file.
353 * gimple-parser.h: Likewise.
1ee62b92 354
22b15758
UB
3552016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
356
357 PR c/35503
358 * c-parser.c (c_parser_postfix_expression_after_primary): Call
359 warn_for_restrict.
360
84ff4775
LCW
3612016-09-11 Le-Chun Wu <lcwu@google.com>
362 Mark Wielaard <mjw@redhat.com>
363
364 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
365 to the given -Wshadow= variant.
366
4d0cdd0c
TP
3672016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
368
369 * c-typeck.c: Include memmodel.h.
370
1202f33e
JJ
3712016-10-13 Jakub Jelinek <jakub@redhat.com>
372
373 PR target/77957
374 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
375 instead of lhd_return_null_tree_v.
376
8a14afd0
BS
3772016-10-07 Bernd Schmidt <bschmidt@redhat.com>
378
379 PR c++/69733
380 * c-decl.c (smallest_type_quals_location): New static function.
381 (grokdeclarator): Try to find the correct location for an ignored
382 qualifier.
383
81fea426
MP
3842016-09-26 Marek Polacek <polacek@redhat.com>
385
386 PR c/7652
387 * c-decl.c (pop_scope): Add gcc_fallthrough.
388
3892016-09-26 Marek Polacek <polacek@redhat.com>
390
391 PR c/7652
392 * c-parser.c (struct c_token): Add flags field.
393 (c_lex_one_token): Pass it to c_lex_with_flags.
394 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
395 into IFN_FALLTHROUGH.
396 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
397 attribute fallthrough after a case label or default label.
398 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
399
9a2300e9
MP
4002016-09-24 Marek Polacek <polacek@redhat.com>
401
402 PR c/77490
403 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
404 have boolean value. Warn about ++/-- on booleans.
405
7de76362
JJ
4062016-09-23 Jakub Jelinek <jakub@redhat.com>
407
408 * c-parser.c (incomplete_record_decls): Remove unnecessary
409 = vNULL initialization of file scope vec.
410
5b73d2ab
MP
4112016-09-16 Marek Polacek <polacek@redhat.com>
412
413 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
414
e51fbec3
MP
4152016-09-14 Marek Polacek <polacek@redhat.com>
416
417 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
418 (fix_array_notation_expr): Likewise.
419 * c-decl.c (finish_decl): Likewise.
420 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
421 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
422 (function_to_pointer_conversion): Use false instead of 0.
423 (convert_lvalue_to_rvalue): Likewise.
424 (parser_build_unary_op): Likewise.
425 (build_atomic_assign): Likewise.
426 (build_unary_op): Change nonconvert parameter type to bool, use
427 true/false instead of 1/0.
428 (build_binary_op): Use true instead of 1.
429
254830ba
DM
4302016-09-13 David Malcolm <dmalcolm@redhat.com>
431
432 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
433 of add_fixit_insert to add_fixit_insert_before.
434
4c13ba17
MP
4352016-09-13 Marek Polacek <polacek@redhat.com>
436
437 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
438 it.
439
54dcdb88
BE
4402016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
441
442 PR c++/77496
443 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
444 COMPOUND_EXPR to warn_for_omitted_condop.
445
e5106e27
DM
4462016-09-07 David Malcolm <dmalcolm@redhat.com>
447
448 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
449 c_get_substring_location for this new langhook.
450
9dc5773f
JJ
4512016-09-02 Jakub Jelinek <jakub@redhat.com>
452
453 PR c/65467
454 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
455 flag_openmp.
456 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
457 instead of mark_exp_read on low_bound/length expression.
458 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
459 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
460 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
461 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
462 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
463 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
464 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
465 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
466 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
467 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
468 instead of mark_expr_read.
469 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
470 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
471 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
472 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
473 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
474 array section bases outside of depend clause, for depend clause
475 use convert_lvalue_to_rvalue on the base.
476 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
477 linear, aligned, map, to and from clauses.
478 (c_omp_clause_copy_ctor): New function.
479
295844f6
MP
4802016-09-01 Marek Polacek <polacek@redhat.com>
481
482 PR c/7652
483 * c-typeck.c (composite_type): Add FALLTHRU comment.
484
089af25c
DM
4852016-08-31 David Malcolm <dmalcolm@redhat.com>
486
487 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
488 to the insertion fixits for "struct", "union", and "enum".
489
f9087798
DM
4902016-08-30 David Malcolm <dmalcolm@redhat.com>
491
492 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
493 rather than add_fixit_misspelled_id.
494 (undeclared_variable): Likewise.
495 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
496 now-redundant "here" params from add_fixit_insert method calls.
497 (c_parser_parameter_declaration): Likewise.
498 * c-typeck.c (build_component_ref): Remove now-redundant range
499 param from add_fixit_replace method calls.
500
ebef225f
MP
5012016-08-25 Marek Polacek <polacek@redhat.com>
502
503 * c-typeck.c (parser_build_binary_op): Pass LHS to
504 warn_logical_not_parentheses.
505
fe377a48
MP
5062016-08-25 Marek Polacek <polacek@redhat.com>
507
508 PR c/77323
509 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
510 or _FloatN or _FloatNx is not supported.
511 (finish_declspecs): Set type to integer_type_node when _FloatN or
512 _FloatNx is not supported.
513
c65699ef
JM
5142016-08-19 Joseph Myers <joseph@codesourcery.com>
515
516 PR c/32187
517 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
518 (struct c_declspecs): Add field floatn_nx_idx.
519 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
520 and _FloatNx type specifiers.
521 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
522 (c_parser_declspecs, c_parser_attribute_any_word)
523 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
524 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
525 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
526 narrower than double.
527
2f1364c2
JJ
5282016-08-12 Jakub Jelinek <jakub@redhat.com>
529 Martin Liska <mliska@suse.cz>
530
531 PR c/67410
532 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
533 % to determine val element to change. Assert that
534 wchar_bytes * charwidth fits into val array.
535
191816a3
MP
5362016-08-12 Marek Polacek <polacek@redhat.com>
537
538 PR c/7652
539 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
540 (c_parser_postfix_expression): Likewise.
541 * c-typeck.c (build_unary_op): Adjust fall through comment.
542 (c_mark_addressable): Likewise.
543
b95a64bb
JJ
5442016-08-11 Jakub Jelinek <jakub@redhat.com>
545
546 PR c/72816
547 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
548 array member through typedef, for orig_qual_indirect == 0 clear
549 orig_qual_type.
550
895aa8e1
DM
5512016-08-08 David Malcolm <dmalcolm@redhat.com>
552
553 PR c/64955
554 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
555 this up to selftest::run_c_tests.
556 (selftest::run_c_tests): New function.
557
0b212d8c
TS
5582016-08-04 Thomas Schwinge <thomas@codesourcery.com>
559
ae9281fc
TS
560 * c-parser.c (struct oacc_routine_data): Add error_seen and
561 fndecl_seen members.
562 (c_finish_oacc_routine): Use these.
563 (c_parser_declaration_or_fndef): Adjust.
564 (c_parser_oacc_routine): Likewise. Support more C language
565 constructs, and improve diagnostics. Move pragma context
566 checking...
567 (c_parser_pragma): ... here.
568
0b212d8c
TS
569 * c-parser.c (struct oacc_routine_data): New.
570 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
571 Simplify code.
572 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
573 declare target" attribute.
574
76e2c821
JB
5752016-08-01 Jan Beulich <jbeulich@suse.com>
576
577 * c-fold.c (c_fully_fold_internal): Also emit shift count
578 warnings for vector types.
579 * c-typeck.c (build_binary_op): Likewise.
580
f618a472
MP
5812016-07-29 Marek Polacek <polacek@redhat.com>
582
583 PR c/71742
584 * c-decl.c (finish_struct): Rephrase an error message.
585
efd0786f
MP
586 PR c/71853
587 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
588 to error node for invalid code.
589
e00dceaf
MP
590 PR c/71573
591 * c-decl.c (implicitly_declare): Return decl early not only for
592 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
593
673a107a
JJ
5942016-07-29 Jakub Jelinek <jakub@redhat.com>
595
596 PR c/71969
597 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
598 on GNU extern inline functions.
599
a5b5c8b6
MP
6002016-07-29 Marek Polacek <polacek@redhat.com>
601
602 PR c/71583
603 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
604 check expr.value.
605
e3fe09c1
UB
6062016-07-22 Uros Bizjak <ubizjak@gmail.com>
607
608 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
609
7c8f7eaa
DM
6102016-07-20 David Malcolm <dmalcolm@redhat.com>
611
612 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
613 spellcheck-tree.h
614 (best_macro_match): Likewise, converting from a typedef to a
615 subclass.
616 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
617 (lookup_name_fuzzy): Update for change of best_macro_match to a
618 subclass with a ctor that calls cpp_forall_identifiers.
619
de6a69ee
DM
6202016-07-20 David Malcolm <dmalcolm@redhat.com>
621
622 * c-decl.c (implicit_decl_warning): Update for conversion of
623 return type of lookup_name_fuzzy to const char *.
624 (undeclared_variable): Likewise.
625 (lookup_name_fuzzy): Convert return type from tree to
626 const char *.
627 * c-parser.c (c_parser_declaration_or_fndef): Update for
628 conversion of return type of lookup_name_fuzzy to const char *.
629 (c_parser_parameter_declaration): Likewise.
630
b1c9c068
CP
6312016-07-15 Cesar Philippidis <cesar@codesourcery.com>
632
633 * c-parser.c (c_parser_oacc_declare): Don't scan for
634 GOMP_MAP_POINTER.
635 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
636 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
637 zero-length subarrays.
638
ddbbcb19
JJ
6392016-07-15 Jakub Jelinek <jakub@redhat.com>
640
641 PR c/71858
642 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
643 instead of FUZZY_LOOKUP_NAME.
644 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
645 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
646
dd36b877
JJ
6472016-07-14 Jakub Jelinek <jakub@redhat.com>
648
649 PR c/71858
650 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
651
8c681247
TS
6522016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
653
654 * c-parser.c (c_parser_generic_selection): Make type of variable
655 auto_vec.
656 (c_parser_omp_declare_simd): Likewise.
657
bf4fa671
TS
6582016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
659
660 * c-decl.c (struct c_struct_parse_info): Change member types
661 from vec to auto_vec.
662 (start_struct): Adjust.
663 (finish_struct): Likewise.
664
557e8c49
JJ
6652016-07-02 Jakub Jelinek <jakub@redhat.com>
666
667 PR c/71719
668 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
669
54d19c3b
TS
6702016-06-29 Thomas Schwinge <thomas@codesourcery.com>
671
672 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
673 Move pragma context checking into...
674 (c_parser_omp_cancellation_point): ... here, and improve
675 diagnostic messages.
676 * c-typeck.c (c_finish_omp_cancel)
677 (c_finish_omp_cancellation_point): Improve diagnostic messages.
678
152ef731
JJ
6792016-06-29 Jakub Jelinek <jakub@redhat.com>
680
681 PR c/71685
682 * c-typeck.c (c_build_qualified_type): Don't clear
683 C_TYPE_INCOMPLETE_VARS for the main variant.
684
6852016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
686
687 PR c/71552
688 * c-typeck.c (output_init_element): Diagnose incompatible types
689 before non-constant initializers.
690
e9ac1f86
JJ
6912016-06-28 Jakub Jelinek <jakub@redhat.com>
692
693 * Make-lang.in: Don't cat ../stage_current if it does not exist.
694
277d7ee0
AK
6952016-06-23 Andi Kleen <ak@linux.intel.com>
696
697 * Make-lang.in: Add support for autofdo.
698
1a4f11c8
DM
6992016-06-22 David Malcolm <dmalcolm@redhat.com>
700
701 PR c/70339
702 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
703 (implicit_decl_warning): When issuing warnings for implicit
704 declarations, attempt to provide a suggestion via
705 lookup_name_fuzzy.
706 (undeclared_variable): Likewise when issuing errors.
707 (lookup_name_in_scope): Likewise.
708 (struct edit_distance_traits<cpp_hashnode *>): New struct.
709 (best_macro_match): New typedef.
710 (find_closest_macro_cpp_cb): New function.
711 (lookup_name_fuzzy): New function.
712 * c-parser.c: Include gcc-rich-location.h.
713 (c_token_starts_typename): Split out case CPP_KEYWORD into...
714 (c_keyword_starts_typename): ...this new function.
715 (c_parser_declaration_or_fndef): When issuing errors about
716 missing "struct" etc, add a fixit. For other kinds of errors,
717 attempt to provide a suggestion via lookup_name_fuzzy.
718 (c_parser_parms_declarator): When looking ahead to detect typos in
719 type names, also reject CPP_KEYWORD.
720 (c_parser_parameter_declaration): When issuing errors about
721 unknown type names, attempt to provide a suggestion via
722 lookup_name_fuzzy.
723 * c-tree.h (c_keyword_starts_typename): New prototype.
724
5a578671
JM
7252016-06-20 Joseph Myers <joseph@codesourcery.com>
726
727 PR c/71601
728 * c-typeck.c (build_conditional_expr): Return error_mark_node if
729 c_common_type returns error_mark_node.
730
3f8257db 7312016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
732
733 PR c/69507
734 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
735 __alignof__ (expression).
736
6a3f203c
DM
7372016-06-14 David Malcolm <dmalcolm@redhat.com>
738
739 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
740
264757fb
DM
7412016-06-14 David Malcolm <dmalcolm@redhat.com>
742
743 * c-typeck.c (build_component_ref): Simplify fixit code by
744 using gcc_rich_location::add_fixit_misspelled_id.
745 (set_init_label): Likewise.
746
f7e4f2e3
DM
7472016-06-13 David Malcolm <dmalcolm@redhat.com>
748
749 * c-parser.c (c_parser_initelt): Provide location of name for new
750 location_t param of set_init_label.
751 * c-tree.h (set_init_label): Add location_t param.
752 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
753 param and use it when issuing error messages about unrecognized
754 field names. Attempt to provide a fixit hint if appropriate,
755 otherwise update the error message to provide the type name.
756
4b1ffdb1
TS
7572016-06-10 Thomas Schwinge <thomas@codesourcery.com>
758
759 PR c/71381
760 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
761 Loosen checking.
762
44a845ca
MS
7632016-06-08 Martin Sebor <msebor@redhat.com>
764 Jakub Jelinek <jakub@redhat.com>
765
766 PR c++/70507
767 PR c/68120
768 * c-typeck.c (convert_arguments): Don't promote last argument
769 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
770
92a5f2ba
MP
7712016-06-08 Marek Polacek <polacek@redhat.com>
772
773 PR c/71418
774 * c-decl.c (grokdeclarator): Check TYPE_P.
775
08203f73
MP
776 PR c/71426
777 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
778 code.
779
6ffd47b7
DM
7802016-06-07 David Malcolm <dmalcolm@redhat.com>
781
782 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
783 and structure element reference, capture the location of the
784 element name token and pass it to build_component_ref.
785 (c_parser_postfix_expression_after_primary): Likewise for
786 structure element dereference.
787 (c_parser_omp_variable_list): Likewise for
788 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
789 * c-tree.h (build_component_ref): Add location_t param.
790 * c-typeck.c (build_component_ref): Add location_t param
791 COMPONENT_LOC. Use it, if available, when issuing hints about
792 mispelled member names to provide a fixit replacement hint.
793
1f40cff3
MP
7942016-06-06 Marek Polacek <polacek@redhat.com>
795
796 PR c/71362
797 * c-parser.c (c_parser_direct_declarator): Set location.
798
5545a907
MP
7992016-06-06 Marek Polacek <polacek@redhat.com>
800
801 * c-typeck.c (comptypes_internal): Handle comparisons of
802 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
803 TYPE_REF_CAN_ALIAS_ALL.
804
b605f663
CLT
8052016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
806
807 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
808 arguments as addressable when async clause exists.
809
00631022
JJ
8102016-05-30 Jakub Jelinek <jakub@redhat.com>
811
812 PR c++/71349
813 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
814 when combined with target construct.
815
7211a097
JJ
8162016-05-26 Jakub Jelinek <jakub@redhat.com>
817
818 * c-parser.c (c_parser_omp_clause_schedule): Warn if
819 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
820
95efe6b6
MP
8212016-05-25 Marek Polacek <polacek@redhat.com>
822
823 PR c/71265
824 * c-decl.c (c_make_fname_decl): Don't check seen_error.
825
a23faf7a
MP
826 PR c/71266
827 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
828
e46c7770
CP
8292016-05-24 Cesar Philippidis <cesar@codesourcery.com>
830
831 * c-parser.c (c_parser_oacc_declare): Add support for
832 GOMP_MAP_FIRSTPRIVATE_POINTER.
833 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
834 argument with enum c_omp_region_type ort.
835 (handle_omp_array_sections): Likewise. Update call to
836 handle_omp_array_sections_1.
837 (c_finish_omp_clauses): Add specific errors and warning messages for
838 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
839 call to handle_omp_array_sections.
840
a04e69c0
TS
8412016-05-24 Thomas Schwinge <thomas@codesourcery.com>
842
843 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
844
f17a223d
RB
8452016-05-24 Richard Biener <rguenther@suse.de>
846
847 PR middle-end/70434
848 PR c/69504
849 * c-typeck.c (build_array_ref): Do not complain about indexing
850 non-lvalue vectors. Adjust for function name change.
851
79063edd
MS
8522016-05-20 Martin Sebor <msebor@redhat.com>
853
854 PR c/71115
855 * c-typeck.c (error_init): Use
856 expansion_point_location_if_in_system_header.
857 (warning_init): Same.
858
8a40fef3
DM
8592016-05-19 David Malcolm <dmalcolm@redhat.com>
860
861 PR c/71171
862 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
863 in error-handling.
864 (c_parser_postfix_expression): Likewise.
865 * c-tree.h (c_expr::set_error): New method.
866 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
867 that result's range is initialized.
868
e9892350
JG
8692016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
870
871 * c-typeck.c (parser_build_unary_op): Fix formatting.
872
8fad45f5
MW
8732016-05-16 Matthew Wahab <matthew.wahab@arm.com>
874
875 * c-decl.c (grokdeclarator): Remove errmsg and use of
876 targetm.invalid_return_type.
877 (grokparms): Remove errmsg and use of
878 targetm.invalid_parameter_type.
879
aa4b467b
JM
8802016-05-13 Joseph Myers <joseph@codesourcery.com>
881
882 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
883 function return type.
884
4f2e1536
MP
8852016-05-12 Marek Polacek <polacek@redhat.com>
886
887 PR c/70756
888 * c-decl.c (build_compound_literal): Pass LOC down to
889 c_incomplete_type_error.
890 * c-tree.h (require_complete_type): Adjust declaration.
891 (c_incomplete_type_error): Likewise.
892 * c-typeck.c (require_complete_type): Add location parameter, pass it
893 down to c_incomplete_type_error.
894 (c_incomplete_type_error): Add location parameter, pass it down to
895 error_at.
896 (build_component_ref): Pass location down to c_incomplete_type_error.
897 (default_conversion): Pass location down to require_complete_type.
898 (build_array_ref): Likewise.
899 (build_function_call_vec): Likewise.
900 (convert_arguments): Likewise.
901 (build_unary_op): Likewise.
902 (build_c_cast): Likewise.
903 (build_modify_expr): Likewise.
904 (convert_for_assignment): Likewise.
905 (c_finish_omp_clauses): Likewise.
906
d6e83a8d
MM
9072016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
908
909 PR c/43651
910 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
911 is enabled.
912 * c-errors.c (pedwarn_c90): Return true if warned.
913 * c-tree.h (pedwarn_c90): Change return type to bool.
914 (enum c_declspec_word): Add new enumerator cdw_atomic.
915
5c3a10fb
MP
9162016-05-11 Marek Polacek <polacek@redhat.com>
917
918 PR c++/71024
919 * c-decl.c (diagnose_mismatched_decls): Factor out code to
920 diagnose_mismatched_attributes and call it.
921
cf68d92c
MP
9222016-05-10 Marek Polacek <polacek@redhat.com>
923
924 PR c/70255
925 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
926 on a declaration following the definition.
927
351f85c5
JJ
9282016-05-05 Jakub Jelinek <jakub@redhat.com>
929
930 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
931 parse it through to c_parser_c99_block_statement.
932 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
933 caller.
934
deef7113
MP
9352016-05-04 Marek Polacek <polacek@redhat.com>
936
937 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
938 OPT_Wdangling_else.
939
de55efd5
MP
9402016-05-04 Marek Polacek <polacek@redhat.com>
941
942 PR c/48778
943 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
944 for macro expansions.
945
79ce98bc
MP
9462016-05-03 Marek Polacek <polacek@redhat.com>
947
948 PR c/70859
949 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
950 check_builtin_function_arguments.
951
fb2647aa
RB
9522016-05-03 Richard Biener <rguenther@suse.de>
953
954 * Make-lang.in (cc1-checksum.c): For stage-final re-use
955 the checksum from the previous stage.
956
77886428
CP
9572016-05-02 Cesar Philippidis <cesar@codesourcery.com>
958
959 * c-parser.c (c_parser_oacc_all_clauses): Update call to
960 c_finish_omp_clauses.
961 (c_parser_omp_all_clauses): Likewise.
962 (c_parser_oacc_cache): Likewise.
963 (c_parser_oacc_loop): Likewise.
964 (omp_split_clauses): Likewise.
965 (c_parser_omp_declare_target): Likewise.
966 (c_parser_cilk_all_clauses): Likewise.
967 (c_parser_cilk_for): Likewise.
968 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
969 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
970
7176a4a0
MP
9712016-05-02 Marek Polacek <polacek@redhat.com>
972
973 PR c/70851
974 * c-decl.c (grokdeclarator): Diagnose when array's size has an
975 incomplete type.
976
e7ff0319
CP
9772016-04-29 Cesar Philippidis <cesar@codesourcery.com>
978
979 PR middle-end/70626
980 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
981 OACC_LOOP_CLAUSE_MASK.
982 (c_parser_oacc_kernels_parallel): Update call to
983 c_oacc_split_loop_clauses.
984
9f405ce1
AM
9852016-04-28 Andrew MacLeod <amacleod@redhat.com>
986
987 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
988 argument to build_modify_expr in two cases.
989
c1e1f433
BS
9902016-04-27 Bernd Schmidt <bschmidt@redhat.com>
991
992 * c-parser.c (c_parser_postfix_expression_after_primary): Call
993 warn_for_memset instead of warning directly here.
994
2448a956
MP
9952016-04-26 Marek Polacek <polacek@redhat.com>
996
997 PR c/67784
998 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
999 out of ...
1000 (c_parser_for_statement): ... here.
1001 (c_parser_if_statement): Use it.
1002 (c_parser_switch_statement): Use it.
1003 (c_parser_while_statement): Use it.
1004
b02a5e26
MP
1005 PR c/70791
1006 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1007
477d4906
IV
10082016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1009
1010 PR c++/69363
1011 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1012 instead of c_finish_cilk_clauses.
1013 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1014 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1015 floating-point variables in the linear clause for Cilk Plus.
1016
fe37c7af
MM
10172016-04-18 Michael Matz <matz@suse.de>
1018
1019 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1020 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1021
949505a9
MP
10222016-04-15 Marek Polacek <polacek@redhat.com>
1023
1024 PR c/70671
1025 * c-typeck.c (build_unary_op): Pass location down to error and
1026 warning call.
1027
dda1bf61
JJ
10282016-04-15 Jakub Jelinek <jakub@redhat.com>
1029
1030 PR c/70436
1031 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1032 where needed.
1033 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1034 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1035 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1036 Adjust c_parser_pragma callers.
1037 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1038 caller.
1039 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1040 c_parser_statement.
1041 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1042 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1043 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1044 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1045 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1046 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1047 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1048 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1049 down where needed.
1050 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1051 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1052 calls.
1053
99cd9857
MP
10542016-04-13 Marek Polacek <polacek@redhat.com>
1055
1056 PR c/70436
1057 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1058 adjust callers.
1059 (c_parser_statement): Likewise.
1060 (c_parser_c99_block_statement): Likewise.
1061 (c_parser_while_statement): Likewise.
1062 (c_parser_for_statement): Likewise.
1063 (c_parser_if_body): Don't set IF_P here.
1064 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1065 about dangling else here.
1066 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1067 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1068 warn about dangling else here.
1069
f13355da
MP
10702016-04-04 Marek Polacek <polacek@redhat.com>
1071
1072 PR c/70307
1073 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1074
5fde6a45
MP
10752016-03-31 Marek Polacek <polacek@redhat.com>
1076
1077 PR c/70297
1078 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1079
4bbf545b
DM
10802016-03-18 David Malcolm <dmalcolm@redhat.com>
1081
1082 PR c/70281
1083 * c-parser.c (c_parser_postfix_expression): Set the source range
1084 for uses of "__builtin_types_compatible_p".
1085
fcc2b74f
JJ
10862016-03-17 Jakub Jelinek <jakub@redhat.com>
1087
1088 PR c/70280
1089 * c-typeck.c (composite_type): Don't count void_list_node
1090 into len, if the list is terminated by void_list_node, start
1091 with void_list_node instead of NULL for newargs. Stop
1092 at void_list_node.
1093
ab4c578f
MP
10942016-03-16 Marek Polacek <polacek@redhat.com>
1095
1096 PR c/70093
1097 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1098 nested functions returning VM types.
1099
96b3c82d
CP
11002016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1101
1102 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1103 when calling c_finish_omp_clauses.
1104
29b9828f
BS
11052016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1106
1107 PR c/69824
1108 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1109 for later.
1110
7ff6ca38
MP
11112016-03-04 Marek Polacek <polacek@redhat.com>
1112
1113 PR c/69798
1114 * c-parser.c (c_parser_postfix_expression): Call
1115 c_parser_cast_expression rather than c_parser_postfix_expression.
1116
686e2237
JJ
11172016-03-01 Jakub Jelinek <jakub@redhat.com>
1118
1119 PR c/69796
1120 PR c/69974
1121 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1122 of incomplete decls to error_mark_node.
1123
0b05329b
MP
11242016-02-24 Marek Polacek <polacek@redhat.com>
1125
1126 PR c/69819
1127 * c-decl.c (finish_decl): Don't update the copy of the type of a
1128 different decl type.
1129
067fbd8b
JJ
11302016-02-23 Jakub Jelinek <jakub@redhat.com>
1131
1132 PR objc/69844
1133 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1134 in id_kind reclassification.
1135
bf14eba2
JJ
11362016-02-16 Jakub Jelinek <jakub@redhat.com>
1137
1138 PR c/69835
1139 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1140
ba539195
JN
11412016-02-16 James Norris <jnorris@codesourcery.com>
1142
1143 PR c/64748
1144 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1145
16595a1f
BS
11462016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1147
f48dfe98
BS
1148 * c-decl.c (build_null_declspecs): Zero the entire struct.
1149
16595a1f
BS
1150 PR c/69522
1151 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1152 callers changed. If nested_p is true, use it to call
1153 finish_implicit_inits.
1154 * c-tree.h (finish_implicit_inits): Declare.
1155 * c-typeck.c (finish_implicit_inits): New function. Move code
1156 from ...
1157 (push_init_level): ... here.
1158 (set_designator, process_init_element): Call finish_implicit_inits.
1159
66756373
JJ
11602016-02-11 Jakub Jelinek <jakub@redhat.com>
1161
1162 PR c/69768
1163 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1164 arguments for -Waddress warning.
1165
1066e9b5
JJ
11662016-02-04 Jakub Jelinek <jakub@redhat.com>
1167
1168 PR c/69669
1169 * c-decl.c (finish_enum): When honoring mode attribute,
1170 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1171
3a5d2ba4
JJ
11722016-01-29 Jakub Jelinek <jakub@redhat.com>
1173
1174 PR debug/69518
1175 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1176 all type variants, not just TYPE_MAIN_VARIANT.
1177
cbdd8ae0
JJ
11782016-01-27 Jakub Jelinek <jakub@redhat.com>
1179
1180 PR debug/66869
1181 * c-decl.c (c_write_global_declarations_1): Warn with
1182 warn_unused_function if static prototype without definition
1183 is not C_DECL_USED.
1184
fa74a4bc
MP
11852016-01-27 Marek Polacek <polacek@redhat.com>
1186
1187 PR c/68062
1188 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1189 to unsigned, if needed. Add -Wsign-compare warning.
1190
13f92e8d
JJ
11912016-01-26 Jakub Jelinek <jakub@redhat.com>
1192
1193 PR tree-optimization/69483
1194 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1195
cd8e73dc 11962016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1197
1198 PR c/24293
1199 * c-tree.h (incomplete_record_decls): Declare.
1200 * c-parser.c (incomplete_record_decls): Define.
1201 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1202 report error if any decl has zero size.
1203 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1204 or enum type to incomplete_record_decls.
1205
e6d6ec9e
TV
12062016-01-14 Tom de Vries <tom@codesourcery.com>
1207
1208 PR tree-optimization/68773
1209 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1210 set force_output.
1211
00083992
MP
12122016-01-14 Marek Polacek <polacek@redhat.com>
1213
1214 PR c/69262
1215 * c-decl.c (grokdeclarator): Provide more information for invalid
1216 array declarations.
1217
7443cf13
DM
12182016-01-06 David Malcolm <dmalcolm@redhat.com>
1219
1220 * c-parser.c (c_parser_unary_expression): For dereferences, build
1221 a combined location before calling build_indirect_ref, so that
1222 error reports cover the full range, manually updating the c_expr
1223 src_range.
1224
6b131d5b
MP
12252016-01-06 Marek Polacek <polacek@redhat.com>
1226
1227 PR sanitizer/69099
1228 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1229 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1230 NULL.
1231
818ab71a
JJ
12322016-01-04 Jakub Jelinek <jakub@redhat.com>
1233
1234 Update copyright years.
1235
2fe0a208
MP
12362016-01-04 Marek Polacek <polacek@redhat.com>
1237
1238 PR c/68908
1239 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1240 optimization to use __atomic_fetch_* built-in if possible.
1241
c7b48c8a
TS
12422015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1243
1244 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1245 into...
1246 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1247 all users.
1248
fda5652f
MP
12492015-12-22 Marek Polacek <polacek@redhat.com>
1250
1251 PR c/69002
1252 * c-typeck.c (build_component_ref): Warn when acessing elements of
1253 atomic structures or unions.
1254
745e411d
DM
12552015-12-21 David Malcolm <dmalcolm@redhat.com>
1256
1257 * c-typeck.c: Include "gcc-rich-location.h".
1258 (build_binary_op): In the two places that call binary_op_error,
1259 create a gcc_rich_location and populate it with the location of
1260 the binary op and its two operands.
1261
94c40e19
DM
12622015-12-16 David Malcolm <dmalcolm@redhat.com>
1263
1264 * c-parser.c (c_parser_statement_after_labels): When calling
1265 c_finish_return, Use the return expression's location if it has
1266 one, falling back to the location of the first token within it.
1267 * c-typeck.c (c_finish_return): When issuing warnings about
1268 the incorrect presence/absence of a return value, issue a note
1269 showing the declaration of the function.
1270
de67c4c3
DM
12712015-12-16 David Malcolm <dmalcolm@redhat.com>
1272
1273 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1274 to 4.
1275 (c_parser_peek_nth_token): New function.
1276 (c_parser_peek_conflict_marker): New function.
1277 (c_parser_error): Detect conflict markers and report them as such.
1278
a10704e1
DM
12792015-12-16 David Malcolm <dmalcolm@redhat.com>
1280
1281 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1282 to preserve range information for the primary expression
1283 in the call to c_parser_postfix_expression_after_primary.
1284
8062bca6
DM
12852015-12-16 David Malcolm <dmalcolm@redhat.com>
1286
1287 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1288 expression location, falling back on the first token location,
1289 rather than always using the latter.
1290
d06f8b75
MP
12912015-12-16 Marek Polacek <polacek@redhat.com>
1292
1293 PR c/64637
1294 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1295 available.
1296
2994fb91
MP
12972015-12-15 Marek Polacek <polacek@redhat.com>
1298
1299 PR c/68907
1300 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1301 artificial decl.
1302
a1b93f8d
DM
13032015-12-08 David Malcolm <dmalcolm@redhat.com>
1304
1305 * c-parser.c (c_parser_alignof_expression): Capture location of
1306 closing parenthesis (if any), or of end of unary expression, and
1307 use it to build a src_range for the expression.
1308
46c6e1e2
DM
13092015-12-08 David Malcolm <dmalcolm@redhat.com>
1310
1311 PR c/68757
1312 * c-parser.c (c_parser_get_builtin_args): Add
1313 "out_close_paren_loc" param, and write back to it.
1314 (c_parser_postfix_expression): Capture the closing
1315 parenthesis location for RID_CHOOSE_EXPR,
1316 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1317 RID_BUILTIN_SHUFFLE and use it to set the source range
1318 for such expressions; within RID_BUILTIN_COMPLEX set
1319 the underlying location.
1320
66189108
MP
13212015-12-07 Marek Polacek <polacek@redhat.com>
1322
1323 PR c/68668
1324 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1325 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1326
f187980b
EB
13272015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1328
1329 * c-tree.h (c_build_va_arg): Adjust prototype.
1330 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1331 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1332 parameter, adjust throughout and issue an error if EXPR is a component
1333 with reverse storage order.
1334
4250754e
JM
13352015-12-02 Jason Merrill <jason@redhat.com>
1336
1337 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1338 (c_fully_fold_internal, decl_constant_value_for_optimization):
1339 Move from c-common.c.
1340 * c-tree.h: Declare decl_constant_value_for_optimization.
1341 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1342
e9e32ee6
JM
13432015-12-02 Joseph Myers <joseph@codesourcery.com>
1344
1345 PR c/68162
1346 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1347 following link from declarator to next declarator. Track original
1348 qualified type and pass it to c_build_qualified_type.
1349 * c-typeck.c (c_build_qualified_type): Add arguments
1350 orig_qual_type and orig_qual_indirect.
1351
ff7a55bf
TS
13522015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1353
1354 * c-parser.c (c_parser_omp_clause_name)
1355 (c_parser_oacc_all_clauses): Alphabetical sorting.
1356
657e4e47
JJ
13572015-12-02 Jakub Jelinek <jakub@redhat.com>
1358
1359 PR c/68533
1360 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1361 for diagnostics.
1362
37d5ad46
JB
13632015-12-01 Julian Brown <julian@codesourcery.com>
1364 Cesar Philippidis <cesar@codesourcery.com>
1365 James Norris <James_Norris@mentor.com>
1366
1367 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1368 (c_parser_oacc_clause_use_device): New function.
1369 (c_parser_oacc_all_clauses): Add use_device support.
1370 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1371 (c_parser_oacc_host_data): New function.
1372 (c_parser_omp_construct): Add host_data support.
1373 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1374 * c-typeck.c (c_finish_oacc_host_data): New function.
1375 (c_finish_omp_clauses): Add use_device support.
1376
a4850ce9
JH
13772015-11-29 Jan Hubicka <hubicka@ucw.cz>
1378
1379 PR c/67106
1380 * c-decl.c: Set TYPE_PACKED in variants.
1381
b58d3df2
ML
13822015-11-27 Martin Liska <mliska@suse.cz>
1383
1384 PR c++/68312
1385 * c-array-notation.c (fix_builtin_array_notation_fn):
1386 Use release_vec_vec instead of vec::release.
1387 (build_array_notation_expr): Likewise.
1388 (fix_conditional_array_notations_1): Likewise.
1389 (fix_array_notation_expr): Likewise.
1390 (fix_array_notation_call_expr): Likewise.
1391
aec17bfe
JJ
13922015-11-27 Jakub Jelinek <jakub@redhat.com>
1393
1394 PR c/63326
1395 * c-parser.c (c_parser_compound_statement_nostart): If
1396 last_label is true, use pragma_stmt instead of pragma_compound
1397 as second c_parser_pragma argument.
1398 (c_parser_omp_ordered, c_parser_omp_target_update,
1399 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1400 false as second argument to c_parser_skip_to_pragma_eol after
1401 diagnosing standalone directives used in pragma_stmt context.
1402
688c4de0
IV
14032015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1404
1405 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1406 with "if (ENABLE_OFFLOADING)".
1407
cbd03aee
DM
14082015-11-23 David Malcolm <dmalcolm@redhat.com>
1409
1410 PR objc/68438
1411 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1412 for various Objective-C constructs: Class.name syntax,
1413 @selector(), @protocol(), @encode(), and [] message syntax.
1414
a87a86e1
DM
14152015-11-20 David Malcolm <dmalcolm@redhat.com>
1416
1417 PR 62314
1418 * c-typeck.c (should_suggest_deref_p): New function.
1419 (build_component_ref): Special-case POINTER_TYPE when
1420 generating a "not a structure of union" error message, and
1421 suggest a "->" rather than a ".", providing a fix-it hint.
1422
8ece8dfb
DM
14232015-11-19 David Malcolm <dmalcolm@redhat.com>
1424
1425 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1426 candidate into a new function, find_closest_identifier.
1427
433068cc
MP
14282015-11-19 Marek Polacek <polacek@redhat.com>
1429
1430 PR c/68412
1431 * c-typeck.c (parser_build_binary_op): Properly handle
1432 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1433
bef08b71
DM
14342015-11-17 David Malcolm <dmalcolm@redhat.com>
1435
1436 * c-parser.c (set_c_expr_source_range): Bulletproof both
1437 overloaded implementations against NULL expr->value.
1438 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1439 values.
1440 (c_parser_unary_expression): Likewise when handling addresses of
1441 labels.
1442 (c_parser_postfix_expression): Likewise for statement expressions,
1443 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1444 __builtin_va_arg, and for __builtin_offset_of.
1445 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1446 src_range using the range of the braced initializer.
1447 (c_parser_transaction_expression): Set src_range for "ret" to a
1448 sane pair of values.
1449
fff77217
KY
14502015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1451
1452 * c-parser.c (c_finish_omp_declare_simd): Look for
1453 "simd" attribute as well. Update error message.
1454
1d899da2
TS
14552015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1456
1457 * c-parser.c (c_parser_omp_declare_target): Adjust.
1458
e4606348
JJ
14592015-11-14 Jakub Jelinek <jakub@redhat.com>
1460
1461 * c-typeck.c (c_finish_omp_clauses): Don't mark
1462 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1463
3e636daf
MP
14642015-11-14 Marek Polacek <polacek@redhat.com>
1465
1466 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1467 * c-typeck.c: Likewise.
1468
ebedc9a3
DM
14692015-11-13 David Malcolm <dmalcolm@redhat.com>
1470
1471 * c-decl.c (warn_defaults_to): Pass line_table to
1472 rich_location ctor.
1473 * c-errors.c (pedwarn_c99): Likewise.
1474 (pedwarn_c90): Likewise.
1475 * c-parser.c (set_c_expr_source_range): New functions.
1476 (c_token::get_range): New method.
1477 (c_token::get_finish): New method.
1478 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1479 based on the range from the start of the LHS to the end of the
1480 RHS.
1481 (c_parser_conditional_expression): Likewise, based on the range
1482 from the start of the cond.value to the end of exp2.value.
1483 (c_parser_binary_expression): Call set_c_expr_source_range on
1484 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1485 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1486 based on the cast_loc through to the end of the expr.
1487 (c_parser_unary_expression): Likewise, based on the
1488 op_loc through to the end of op.
1489 (c_parser_sizeof_expression) Likewise, based on the start of the
1490 sizeof token through to either the closing paren or the end of
1491 expr.
1492 (c_parser_postfix_expression): Likewise, using the token range,
1493 or from the open paren through to the close paren for
1494 parenthesized expressions.
1495 (c_parser_postfix_expression_after_primary): Likewise, for
1496 various kinds of expression.
1497 * c-tree.h (struct c_expr): Add field "src_range".
1498 (c_expr::get_start): New method.
1499 (c_expr::get_finish): New method.
1500 (set_c_expr_source_range): New decls.
1501 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1502 on ret for prefix unary ops.
1503 (parser_build_binary_op): Likewise, running from the start of
1504 arg1.value through to the end of arg2.value.
1505
ec8b536f
MP
15062015-11-13 Marek Polacek <polacek@redhat.com>
1507
1508 PR c/68320
1509 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1510
277fe616
DM
15112015-11-13 David Malcolm <dmalcolm@redhat.com>
1512
1513 * c-typeck.c: Include spellcheck.h.
1514 (lookup_field_fuzzy_find_candidates): New function.
1515 (lookup_field_fuzzy): New function.
1516 (build_component_ref): If the field was not found, try using
1517 lookup_field_fuzzy and potentially offer a suggestion.
1518
6e232ba4
JN
15192015-11-12 James Norris <jnorris@codesourcery.com>
1520 Joseph Myers <joseph@codesourcery.com>
1521
1522 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1523 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1524 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1525 and PRAGMA_OMP_CLAUSE_LINK.
1526 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1527 and PRAGMA_OACC_CLAUSE_LINK.
1528 (OACC_DECLARE_CLAUSE_MASK): New definition.
1529 (c_parser_oacc_declare): New function.
1530
9be4f715
MP
15312015-11-12 Marek Polacek <polacek@redhat.com>
1532
1533 PR c/67784
1534 * c-parser.c (c_parser_for_statement): Reclassify the token in
1535 a correct scope.
1536
e78bede6
MP
15372015-11-11 Marek Polacek <polacek@redhat.com>
1538
1539 PR c/68107
1540 PR c++/68266
1541 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1542 checking the size of an array.
1543
69f293c9
AM
15442015-11-11 Andrew MacLeod <amacleod@redhat.com>
1545
1546 * c-array-notation.c: Remove unused header files.
1547 * c-aux-info.c: Likewise.
1548 * c-convert.c: Likewise.
1549 * c-decl.c: Likewise.
1550 * c-errors.c: Likewise.
1551 * c-lang.c: Likewise.
1552 * c-objc-common.c: Likewise.
1553 * c-parser.c: Likewise.
1554 * c-typeck.c: Likewise.
1555 * gccspec.c: Likewise.
1556
3a40d81d
NS
15572015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1558 Cesar Philippidis <cesar@codesourcery.com>
1559 James Norris <jnorris@codesourcery.com>
1560 Julian Brown <julian@codesourcery.com>
1561 Nathan Sidwell <nathan@codesourcery.com>
1562
1563 c/
1564 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1565 routine arg.
1566 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1567 (c_parser_pragma): Parse 'acc routine'.
1568 (OACC_ROUTINE_CLAUSE_MARK): Define.
1569 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1570
fc402eec
AA
15712015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1572
1573 PR debug/67192
1574 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1575 location of the backward-goto to the start of the loop body.
1576
f6b0b3db
AA
15772015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1578
1579 PR debug/67192
1580 * c-parser.c (c_parser_while_statement): Finish the loop before
1581 parsing ahead for misleading indentation.
1582 (c_parser_for_statement): Likewise.
1583
ee45a32d
EB
15842015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1585
1586 * c-decl.c (finish_struct): If the structure has reverse storage
1587 order, rewrite the type of array fields with scalar component. Call
1588 maybe_apply_pragma_scalar_storage_order on entry.
1589 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1590 errors on bit-fields and reverse SSO here and not...
1591 (c_mark_addressable): ...here.
1592 (output_init_element): Adjust call to initializer_constant_valid_p.
1593 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1594
8a645150
DM
15952015-11-06 David Malcolm <dmalcolm@redhat.com>
1596
1597 * c-decl.c (warn_defaults_to): Update for change in signature
1598 of diagnostic_set_info.
1599 * c-errors.c (pedwarn_c99): Likewise.
1600 (pedwarn_c90): Likewise.
1601 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1602 for textinfo::set_location.
1603
7a5e4956
CP
16042015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1605 Thomas Schwinge <thomas@codesourcery.com>
1606 James Norris <jnorris@codesourcery.com>
1607
1608 * c-parser.c (c_parser_omp_clause_name): Add support for
1609 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1610 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1611 default(none) in OpenACC.
1612 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1613 arguments.
1614 (c_parser_oacc_clause_tile): New function.
1615 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1616 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1617 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1618 TILE}.
1619 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1620 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1621 FIRSTPRIVATE}.
1622 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1623 (c_parser_oacc_update): Update the error message for missing clauses.
1624 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1625 and OMP_CLAUSE_INDEPENDENT.
1626
bfcfbfa0
MP
16272015-11-05 Marek Polacek <polacek@redhat.com>
1628
1629 PR c/68090
1630 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1631 deal with pre-evaluation on invalid types.
1632
e01d41e5
JJ
16332015-11-05 Jakub Jelinek <jakub@redhat.com>
1634 Ilya Verbin <ilya.verbin@intel.com>
1635
1636 * c-parser.c: Include context.h and gimple-expr.h.
1637 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1638 monotonic together with nonmonotonic.
1639 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1640 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1641 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1642 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1643 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1644 expressions on combined target teams before the target.
1645 (c_parser_omp_declare_target): If decl has "omp declare target" or
1646 "omp declare target link" attribute, and cgraph or varpool node already
1647 exists, then set corresponding flags. Call c_finish_omp_clauses
1648 in the parenthesized extended-list syntax case.
1649 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1650 declare target.
1651 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1652 on OMP_CLAUSE_REDUCTION array sections.
1653 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1654 into the constant offset, or for variable low-bound using
1655 POINTER_PLUS_EXPR. For structure element based array sections use
1656 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1657 (c_finish_omp_clauses): Drop generic_field_head, structure
1658 elements are now always mapped even as array section bases,
1659 diagnose same var in data sharing and mapping clauses. Diagnose if
1660 linear step on declare simd is neither a constant nor a uniform
1661 parameter. Look through POINTER_PLUS_EXPR for array section
1662 reductions. Diagnose the same var or function appearing multiple
1663 times on the same directive. Fix up wording for the to clause if t
1664 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1665 modifier on kinds other than dynamic or guided or nonmonotonic
1666 modifier together with ordered clause.
1667
4bf9e5a8
TS
16682015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1669 Chung-Lin Tang <cltang@codesourcery.com>
1670
1671 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1672
2adfab87
AM
16732015-10-29 Andrew MacLeod <amacleod@redhat.com>
1674
1675 * c-array-notation.c: Reorder #include's and remove duplicates.
1676 * c-aux-info.c: Likewise.
1677 * c-convert.c: Likewise.
1678 * c-decl.c: Likewise.
1679 * c-errors.c: Likewise.
1680 * c-lang.c: Likewise.
1681 * c-objc-common.c: Likewise.
1682 * c-parser.c: Likewise.
1683 * c-typeck.c: Likewise.
1684
e922069e
JW
16852015-10-26 Jim Wilson <jim.wilson@linaro.org>
1686
1687 PR debug/66068
1688 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1689 after calling build_qualified_type.
1690
765dd391
CP
16912015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1692 Thomas Schwinge <thomas@codesourcery.com>
1693 James Norris <jnorris@codesourcery.com>
1694 Joseph Myers <joseph@codesourcery.com>
1695 Julian Brown <julian@codesourcery.com>
1696 Bernd Schmidt <bschmidt@redhat.com>
1697
1698 * c-parser.c (c_parser_oacc_shape_clause): New.
1699 (c_parser_oacc_simple_clause): New.
1700 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1701 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1702
88bae6f4
TS
17032015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1704 James Norris <jnorris@codesourcery.com>
1705 Cesar Philippidis <cesar@codesourcery.com>
1706
1707 PR c/64765
1708 PR c/64880
1709 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1710 parameters, and handle these. Adjust all users.
1711 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1712 into...
1713 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1714 all users.
1715 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1716 declare functions.
1717 (c_finish_omp_construct): Declare function.
1718 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1719 Merge functions into...
1720 (c_finish_omp_construct): ... this new function.
1721
a8fc2579
RB
17222015-10-22 Richard Biener <rguenther@suse.de>
1723
1724 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1725 before folding a MINUS_EXPR.
1726
e9122ef6
MP
17272015-10-21 Marek Polacek <polacek@redhat.com>
1728
1729 PR c/68024
1730 * c-decl.c (start_function): Warn about vararg functions without
1731 a prototype.
1732
9f47c7e5
IE
17332015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1734
1735 * c-typeck.c (build_conditional_expr): Use boolean vector
1736 type for vector comparison.
1737 (build_vec_cmp): New.
1738 (build_binary_op): Use build_vec_cmp for comparison.
1739
fa60eeb9
MP
17402015-10-20 Marek Polacek <polacek@redhat.com>
1741
1742 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1743
2c7020eb
MP
17442015-10-20 Marek Polacek <polacek@redhat.com>
1745
1746 PR c/67964
1747 * c-parser.c (c_parser_attributes): Break out of the loop if the
1748 token after an attribute isn't a comma.
1749
d9a6bd32
JJ
17502015-10-13 Jakub Jelinek <jakub@redhat.com>
1751 Aldy Hernandez <aldyh@redhat.com>
1752
1753 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1754 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1755 (c_parser_omp_variable_list): Handle structure elements for
1756 map, to and from clauses. Handle array sections in reduction
1757 clause. Formatting fixes.
1758 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1759 if clause modifiers.
1760 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1761 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1762 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1763 c_parser_omp_clause_is_device_ptr): New functions.
1764 (c_parser_omp_clause_ordered): Parse optional parameter.
1765 (c_parser_omp_clause_reduction): Handle array reductions.
1766 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1767 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1768 functions.
1769 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1770 (c_parser_omp_clause_depend_sink): New function.
1771 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1772 (c_parser_omp_clause_map): Parse release/delete map kinds and
1773 optional always modifier.
1774 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1775 and c_finish_omp_clauses callers.
1776 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1777 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1778 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1779 (OMP_CRITICAL_CLAUSE_MASK): Define.
1780 (c_parser_omp_critical): Parse critical clauses.
1781 (c_parser_omp_for_loop): Handle doacross loops, adjust
1782 c_finish_omp_for and c_finish_omp_clauses callers.
1783 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1784 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1785 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1786 (c_parser_omp_for): Disallow ordered clause when combined with
1787 distribute. Disallow linear clause when combined with distribute
1788 and not combined with simd.
1789 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1790 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1791 parse clauses and if depend clause is found, don't parse a body.
1792 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1793 Allow target parallel without for after it.
1794 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1795 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1796 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1797 invalid kinds.
1798 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1799 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1800 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1801 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1802 functions.
1803 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1804 defaultmap and is_device_ptr clauses.
1805 (c_parser_omp_target): Parse target parallel and target simd. Set
1806 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1807 and target exit data. Diagnose invalid map kinds.
1808 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1809 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1810 construct.
1811 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1812 &omp_priv.
1813 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1814 (c_parser_omp_taskloop): New function.
1815 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1816 handle PRAGMA_OMP_TASKLOOP.
1817 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1818 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1819 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1820 Add IS_OMP argument, handle structure element bases, diagnose
1821 bitfields, pass IS_OMP recursively, diagnose known zero length
1822 array sections in depend clauses, handle array sections in reduction
1823 clause, diagnose negative length even for pointers.
1824 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1825 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1826 array sections in reduction clause, set
1827 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1828 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1829 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1830 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1831
21ba0cea
MP
18322015-10-06 Marek Polacek <polacek@redhat.com>
1833
1834 * c-parser.c (c_parser_statement_after_labels): Use
1835 protected_set_expr_location.
1836 (c_parser_omp_clause_num_gangs): Likewise.
1837 (c_parser_omp_clause_num_threads): Likewise.
1838 (c_parser_omp_clause_num_workers): Likewise.
1839 (c_parser_omp_clause_vector_length): Likewise.
1840 (c_parser_omp_clause_num_teams): Likewise.
1841 (c_parser_omp_clause_thread_limit): Likewise.
1842 * c-typeck.c (build_c_cast): Likewise.
1843 (c_cast_expr): Likewise.
1844
624d31fe
RS
18452015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1846
1847 * c-typeck.c (c_tree_equal): Use real_equal instead of
1848 REAL_VALUES_EQUAL.
1849
b8fd7909
JM
18502015-10-04 Jason Merrill <jason@redhat.com>
1851
1852 * c-parser.c (c_lex_one_token): Handle @synchronized.
1853 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1854 can change whether the function is transaction_safe.
1855
1c7485af
MP
18562015-10-02 Marek Polacek <polacek@redhat.com>
1857
1858 PR c/67730
1859 * c-typeck.c (convert_for_assignment): Use the expansion point
1860 location throughout.
1861
3e3b8d63
MP
18622015-10-02 Marek Polacek <polacek@redhat.com>
1863
1864 PR c/64249
1865 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1866 and pass it down to c_parser_if_statement.
1867 (c_parser_else_body): Add CHAIN parameter and pass it down to
1868 c_parser_statement_after_labels.
1869 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1870 duplicated if-else-if conditions.
1871
aabef2de
MP
18722015-10-01 Marek Polacek <polacek@redhat.com>
1873
1874 * c-typeck.c (convert_for_assignment): Improve commentary.
1875
de8ddd5f
MP
18762015-09-30 Marek Polacek <polacek@redhat.com>
1877
1878 PR c/67730
1879 * c-typeck.c (c_finish_return): Use the expansion point location for
1880 certain "return with value" warnings.
1881
c4914de6
MLI
18822015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1883
1884 * c-parser.c (pragma_lex): Add loc argument.
1885
0e36f5c7
MP
18862015-09-15 Marek Polacek <polacek@redhat.com>
1887
1888 PR c/67580
1889 * c-decl.c (tag_exists_p): New function.
1890 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1891 struct/union/enum keywords are missing.
1892 * c-tree.h (tag_exists_p): Declare.
1893
2f3bb934
MP
18942015-09-15 Marek Polacek <polacek@redhat.com>
1895
1896 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1897 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1898 Return NULL_TREE instead of 0.
1899 (lookup_name): Return NULL_TREE instead of 0.
1900 (lookup_name_in_scope): Likewise.
1901 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1902 (parser_xref_tag): Use false instead of 0.
1903 (start_struct): Use true instead of 1.
1904 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1905
aa256c4a
MP
19062015-09-14 Marek Polacek <polacek@redhat.com>
1907
1908 * c-typeck.c (set_nonincremental_init_from_string): Use
1909 HOST_WIDE_INT_M1U when shifting a negative value.
1910
dbb68221
MW
19112015-09-09 Mark Wielaard <mjw@redhat.com>
1912
1913 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1914 parm against NULL.
1915
a8a098ac
JJ
19162015-09-10 Jakub Jelinek <jakub@redhat.com>
1917
1918 PR c/67502
1919 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1920 into OMP_FOR_PRE_BODY rather than before the loop.
1921
f4b189d5
JJ
19222015-09-09 Jakub Jelinek <jakub@redhat.com>
1923
0bb99c11
JJ
1924 PR c/67501
1925 * c-parser.c (c_parser_oacc_all_clauses,
1926 c_parser_omp_all_clauses): Remove invalid clause from
1927 list of clauses even if parser->error is set.
1928
fce5e5e3
JJ
1929 PR c/67500
1930 * c-parser.c (c_parser_omp_clause_aligned,
1931 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1932 test for errors.
1933 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1934 error_mark_node.
1935
f4b189d5
JJ
1936 PR c/67495
1937 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1938 instead of c_parser_unary_expression. If the result is !lvalue_p,
1939 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1940
b2aaf235
MP
19412015-09-04 Marek Polacek <polacek@redhat.com>
1942
1943 PR sanitizer/67279
1944 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1945
1807ffc1
MS
19462015-09-03 Martin Sebor <msebor@redhat.com>
1947
1948 PR c/66516
8b652e65
JJ
1949 * c-typeck.c (convert_arguments, parser_build_unary_op,
1950 build_conditional_expr, c_cast_expr, convert_for_assignment,
1951 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1952 reject_gcc_builtin.
1953 (c_decl_implicit): Define.
1954
d04ff417
MP
19552015-09-02 Marek Polacek <polacek@redhat.com>
1956
1957 PR c/67432
1958 * c-parser.c (c_parser_enum_specifier): Give a better error for
1959 an empty enum.
1960
a79683d5
TS
19612015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1962
1963 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1964
191a6b94
MP
19652015-08-12 Marek Polacek <polacek@redhat.com>
1966
1967 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1968 LOC to it.
1969
420a9d9b
MP
19702015-08-03 Marek Polacek <polacek@redhat.com>
1971
1972 PR c/67088
1973 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1974 Use it.
1975 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1976
992118a1
PP
19772015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1978
1979 * c-parser.c (c_parser_if_body): Take token_indent_info
1980 argument. Call warn_for_misleading_indentation even when the
1981 body is a semicolon. Extract token_indent_infos corresponding
1982 to the guard, body and next tokens. Adjust call to
1983 warn_for_misleading_indentation accordingly.
1984 (c_parser_else_body): Likewise.
1985 (c_parser_if_statement): Likewise.
1986 (c_parser_while_statement): Likewise.
1987 (c_parser_for_statement): Likewise.
1988
46308474
LFSM
19892015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1990 Manuel López-Ibáñez <manu@gcc.gnu.org>
1991
1992 * c-decl.c (get_parm_info): Remove static var. Update warning
1993 message.
1994
05b28fd6
MP
19952015-07-27 Marek Polacek <polacek@redhat.com>
1996
1997 PR c++/66555
1998 PR c/54979
1999 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2000
451b5e48
MP
20012015-07-20 Marek Polacek <polacek@redhat.com>
2002
2003 PR c++/55095
2004 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2005 (build_binary_op): Warn about left shift overflows.
2006
1916bcb5
AM
20072015-07-09 Andrew MacLeod <amacleod@redhat.com>
2008
2009 * c-array-notation.c: Adjust includes for flags.h changes.
2010 * c-objc-common.c: Likewise.
2011
c7131fb2
AM
20122015-07-07 Andrew MacLeod <amacleod@redhat.com>
2013
2014 * c-array-notation.c: Adjust includes.
2015 * c-aux-info.c: Likewise.
2016 * c-convert.c: Likewise.
2017 * c-decl.c: Likewise.
2018 * c-errors.c: Likewise.
2019 * c-lang.c: Likewise.
2020 * c-objc-common.c: Likewise.
2021 * c-parser.c: Likewise.
2022 * c-typeck.c: Likewise.
2023
da2e71c9
MLI
20242015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2025
2026 PR fortran/66605
2027 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2028
b155cfd9
MP
20292015-06-29 Marek Polacek <polacek@redhat.com>
2030
2031 PR c/66322
2032 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2033 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2034 about -Wswitch-bool here.
2035 (do_case): Update c_add_case_label call.
2036 (c_finish_case): Update c_do_switch_warnings call.
2037
31521951
MP
20382015-06-27 Marek Polacek <polacek@redhat.com>
2039
2040 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2041
22d03525
MP
20422015-06-26 Marek Polacek <polacek@redhat.com>
2043
2044 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2045 INDIRECT_REF_P.
2046 * c-typeck.c (array_to_pointer_conversion): Likewise.
2047 (build_unary_op): Likewise.
2048 (c_finish_return): Likewise.
2049
f0889939
AM
20502015-06-25 Andrew MacLeod <amacleod@redhat.com>
2051
2052 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2053 * c-parser.c: Likewise.
2054
8d67ee55
RS
20552015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2056
2057 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2058 instead of pointer_hash.
2059 (detect_field_duplicates): Likewise.
2060
0ae9bd27
MP
20612015-06-25 Marek Polacek <polacek@redhat.com>
2062
2063 * c-array-notation.c: Use VAR_P throughout.
2064 * c-decl.c: Likewise.
2065 * c-objc-common.c: Likewise.
2066 * c-parser.c: Likewise.
2067 * c-typeck.c: Likewise.
2068
62f9079a
MP
20692015-06-25 Marek Polacek <polacek@redhat.com>
2070
2071 * c-decl.c: Use is_global_var throughout.
2072 * c-parser.c: Likewise.
2073 * c-typeck.c: Likewise.
2074
abb226c9
AM
20752015-06-17 Andrew MacLeod <amacleod@redhat.com>
2076
2077 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2078 * c-aux-info.c: Likewise.
2079 * c-convert.c: Likewise.
2080 * c-decl.c: Likewise.
2081 * c-errors.c: Likewise.
2082 * c-lang.c: Likewise.
2083 * c-objc-common.c: Likewise.
2084 * c-parser.c: Likewise.
2085 * c-typeck.c: Likewise.
2086
8cbababc
JH
20872015-06-11 Jan Hubicka <hubicka@ucw.cz>
2088
2089 PR middle-end/66325
2090 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2091 variants.
2092
a0349665
PMR
20932015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2094
2095 * c-decl.c (pop_scope): Register the main translation unit
2096 through the new debug hook.
2097
13fdf2e2
AM
20982015-06-08 Andrew MacLeod <amacleod@redhat.com>
2099
2100 * c-array-notation.c : Adjust include files.
2101 * c-aux-info.c : Likewise.
2102 * c-convert.c : Likewise.
2103 * c-decl.c : Likewise.
2104 * c-errors.c : Likewise.
2105 * c-lang.c : Likewise.
2106 * c-lang.h : Likewise.
2107 * c-objc-common.c : Likewise.
2108 * c-parser.c : Likewise.
2109 * c-typeck.c : Likewise.
2110
d7438551
AH
21112015-06-05 Aldy Hernandez <aldyh@redhat.com>
2112
2113 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2114 immediately clobber it.
2115 (c_write_global_declarations_1): Remove call to
2116 check_global_declaration_1.
2117 (c_write_global_declarations_2): Remove.
2118 (c_write_final_cleanups): Rename from c_write_global_declarations.
2119 Remove call to finalize_compilation_unit.
2120 Remove calls to debugging hooks.
2121 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2122 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2123 * c-tree.h: Remove c_write_global_declarations.
2124
ecb9f223
AM
21252015-06-04 Andrew MacLeod <amacleod@redhat.com>
2126
2127 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2128 * c-aux-info.c: Likewise.
2129 * c-convert.c: Likewise.
2130 * c-decl.c: Likewise.
2131 * c-errors.c: Likewise.
2132 * c-lang.c: Likewise.
2133 * c-objc-common.c: Likewise.
2134 * c-parser.c: Likewise.
2135 * c-typeck.c: Likewise.
2136
9482b620
MP
21372015-06-04 Marek Polacek <polacek@redhat.com>
2138
2139 PR c/66341
2140 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2141 it is a lvalue.
2142
bc51ace3
PK
21432015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2144
2145 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2146 Warn for empty struct.
2147 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2148
ea5b45b6
AT
21492015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2150
2151 * c-decl.c (start_function): Call plugin before parsing.
2152 (finish_function): Call plugin after parsing.
2153
c2d47482
PK
21542015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2155
2156 PR c/49551
2157 * c-decl.c (merge_decls): Merge DECL_COMMON.
2158
a95492ab
JW
21592015-05-22 Jim Wilson <jim.wilson@linaro.org>
2160
2161 * Make-lang.in (check_gcc_pallelize): Define.
2162
fd5c817a
MP
21632015-05-22 Marek Polacek <polacek@redhat.com>
2164
2165 PR c/47043
2166 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2167 attributes.
2168
c7b70a3c
MP
21692015-05-21 Marek Polacek <polacek@redhat.com>
2170
2171 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2172 DECL_BUILT_IN.
2173
21b634ae
MP
21742015-05-20 Marek Polacek <polacek@redhat.com>
2175
2176 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2177 * c-typeck.c: Likewise.
2178
296a8c2f
MP
21792015-05-19 Marek Polacek <polacek@redhat.com>
2180
2181 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2182
41b37d5e
JJ
21832015-05-19 Jakub Jelinek <jakub@redhat.com>
2184
2185 PR middle-end/66199
2186 * c-parser.c (c_parser_omp_for_loop): Don't add
2187 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2188 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2189 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2190 constructs.
2191
fab27f52
MM
21922015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2193
2194 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2195 swaps.
fab27f52 2196
40de31cf
MLI
21972015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2198
2199 PR fortran/44054
2200 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2201 accessor function.
2202
3aa3c9fc
MP
22032015-05-14 Marek Polacek <polacek@redhat.com>
2204
2205 PR c/66066
2206 PR c/66127
2207 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2208 rather than with 0.
2209
c3388e62
DM
22102015-05-12 David Malcolm <dmalcolm@redhat.com>
2211
2212 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2213 to add a call to warn_for_misleading_indentation.
2214 (c_parser_else_body): Likewise, adding param "else_loc".
2215 (c_parser_if_statement): Check for misleading indentation.
2216 (c_parser_while_statement): Likewise.
2217 (c_parser_for_statement): Likewise.
2218
755e528f
MP
22192015-05-08 Marek Polacek <polacek@redhat.com>
2220
2221 PR c/64918
2222 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2223 (output_init_element): Likewise.
2224
0173bd2a
MP
22252015-05-07 Marek Polacek <polacek@redhat.com>
2226
2227 PR c/65179
2228 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2229 value.
2230
9babc352
MP
22312015-04-30 Marek Polacek <polacek@redhat.com>
2232
2233 * c-typeck.c (set_init_label): Call error_at instead of error and
2234 pass LOC to it.
2235
ac9f18db
MP
2236 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2237 the type of a decl.
2238
ec3fba51
MP
2239 * c-typeck.c (c_build_va_arg): Clarify the error message.
2240
b811915d
TS
22412015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2242
2243 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2244 OMP_STANDALONE_CLAUSES.
2245
f3075008
MP
22462015-04-28 Marek Polacek <polacek@redhat.com>
2247
2248 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2249
4e81b788
MP
22502015-04-28 Marek Polacek <polacek@redhat.com>
2251
2252 PR c/65901
2253 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2254
6c1db78e
MP
22552015-04-25 Marek Polacek <polacek@redhat.com>
2256
2257 PR c/52085
2258 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2259 attribute.
2260
5c4abbb8
MP
22612015-04-23 Marek Polacek <polacek@redhat.com>
2262
2263 PR c/65345
2264 * c-decl.c (set_labels_context_r): New function.
2265 (store_parm_decls): Call it via walk_tree_without_duplicates.
2266 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2267 instead of create_tmp_var. Build TARGET_EXPR instead of
2268 COMPOUND_EXPR.
2269 (build_atomic_assign): Use create_tmp_var_raw instead of
2270 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2271
06aca1d5
IV
22722015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2273
2274 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2275 (c_parser_omp_target_update): Add missed %> to error_at ().
2276
8fba1830
BRF
22772015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2278
2279 PR target/55143
2280 * c-decl.c (c_default_pointer_mode): Remove definition.
2281 * c-tree.h (c_default_pointer_mode): Remove declaration.
2282
62021f64
TB
22832015-03-27 Tobias Burnus <burnus@net-b.de>
2284
2285 PR c/65586
2286 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2287 error out.
2288 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2289 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2290 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2291
9b65e171
JJ
22922015-03-19 Jakub Jelinek <jakub@redhat.com>
2293
2294 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2295 attribute for DECL_EXTERNAL VAR_DECLs.
2296
17958621
JJ
22972015-03-11 Jakub Jelinek <jakub@redhat.com>
2298
2299 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2300 argument.
2301
7ccb1a11
JJ
23022015-03-10 Jakub Jelinek <jakub@redhat.com>
2303
2304 PR c/65120
2305 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2306 before preparing arguments to warn_logical_not_parentheses.
2307
01177669
JJ
23082015-03-09 Jakub Jelinek <jakub@redhat.com>
2309
2310 PR c/65120
2311 * c-typeck.c (parser_build_binary_op): Don't warn for
2312 !!x == y or !b == y where b is _Bool.
2313
802ac282
MP
23142015-03-09 Marek Polacek <polacek@redhat.com>
2315
2316 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2317 * c-decl.c (grokdeclarator): Likewise.
2318 * c-typeck.c (build_binary_op): Likewise.
2319
e5165b60
MP
23202015-02-27 Marek Polacek <polacek@redhat.com>
2321
2322 PR c/65228
2323 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2324
065d214c
MP
23252015-02-14 Marek Polacek <polacek@redhat.com>
2326
2327 PR c/64768
2328 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2329 declared through a typedef name.
2330
e5d9235b
MP
23312015-02-13 Marek Polacek <polacek@redhat.com>
2332
2333 PR c/65050
2334 * c-decl.c (grokdeclarator): Print also the type when giving
2335 the error message about array's incomplete element type.
2336
fa01ffcc
JJ
23372015-02-11 Jakub Jelinek <jakub@redhat.com>
2338
2339 PR c/64824
2340 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2341 check in the POP macro.
2342
c3e38a03
MP
23432015-02-09 Marek Polacek <polacek@redhat.com>
2344
2345 PR c/64856
2346 * c-typeck.c (process_init_element): Don't always wrap
2347 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2348 initializing a range of elements.
2349
4886ec8e
JJ
23502015-02-04 Jakub Jelinek <jakub@redhat.com>
2351
2352 PR c/64824
2353 PR c/64868
2354 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2355
c3e38a03 23562015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2357
2358 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2359 processing enum declaration.
2360
7b33f0c8
MP
23612015-01-29 Marek Polacek <polacek@redhat.com>
2362
2363 PR c/64709
2364 * c-typeck.c (pop_init_level): If constructor_elements has
2365 exactly one element with integer_zerop value, set constructor_zeroinit
2366 to 1. Remove braces around warning_init call.
2367
dea63e49
JJ
23682015-01-27 Jakub Jelinek <jakub@redhat.com>
2369
2370 PR c/64766
2371 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2372 of FUNCTION_DECLs with error_mark_node.
2373
d38f7dce
JJ
23742015-01-26 Jakub Jelinek <jakub@redhat.com>
2375
2376 PR c/64778
2377 * c-typeck.c (convert_arguments): Return -1 if there are
2378 error_args, even if we've diagnosed too many arguments.
2379
cbf5d0e7
RB
23802015-01-21 Richard Biener <rguenther@suse.de>
2381
2382 PR middle-end/64313
2383 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2384 for builtins the user declared correctly.
2385
41dbbb37
TS
23862015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2387 Bernd Schmidt <bernds@codesourcery.com>
2388 Cesar Philippidis <cesar@codesourcery.com>
2389 James Norris <jnorris@codesourcery.com>
2390 Jakub Jelinek <jakub@redhat.com>
2391 Ilmir Usmanov <i.usmanov@samsung.com>
2392
2393 * c-parser.c: Include "gomp-constants.h".
2394 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2395 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2396 Use OMP_CLAUSE_SET_MAP_KIND.
2397 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2398 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2399 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2400 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2401 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2402 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2403 "copyout", "create", "delete", "deviceptr", "gang", "host",
2404 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2405 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2406 "present_or_create", "pcreate", "seq", "self", "vector",
2407 "vector_length", "wait", "worker".
2408 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2409 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2410 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2411 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2412 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2413 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2414 (c_parser_oacc_data_clause_deviceptr)
2415 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2416 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2417 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2418 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2419 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2420 (c_parser_oacc_parallel, c_parser_oacc_update)
2421 (c_parser_oacc_wait): New functions.
2422 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2423 (c_finish_oacc_data): New prototypes.
2424 * c-typeck.c: Include "gomp-constants.h".
2425 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2426 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2427 OMP_CLAUSE_SET_MAP_KIND.
2428 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2429 (c_finish_oacc_data): New functions.
2430 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2431 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2432 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2433 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2434 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2435 GOMP_MAP_FORCE_DEVICEPTR.
2436
adfac8df
JJ
24372015-01-09 Michael Collison <michael.collison@linaro.org>
2438
2439 * c-array-notation.c: Include hash-set.h, machmode.h,
2440 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2441 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2442 * c-aux-info.c: Ditto.
2443 * c-convert.c: Ditto.
2444 * c-decl.c: Ditto.
2445 * c-errors.c: Ditto.
2446 * c-lang.c: Dittoxs.
2447 * c-objc-common.c: Ditto.
2448 * c-parser.c: Ditto.
2449 * c-typeck.c: Include hash-set.h, machmode.h,
2450 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2451 fold-const.h, wide-int.h, inchash.h, real.h and
2452 fixed-value.h due to flattening of tree.h.
2453
2cc901dc
MP
24542015-01-07 Marek Polacek <polacek@redhat.com>
2455
2456 PR c/64417
2457 * c-typeck.c (process_init_element): Disallow initialization of
2458 a flexible array member with a string constant if the structure
2459 is in an array.
2460
5624e564
JJ
24612015-01-05 Jakub Jelinek <jakub@redhat.com>
2462
e5341100
JJ
2463 PR sanitizer/64344
2464 * c-typeck.c (convert_for_assignment, c_finish_return): For
2465 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2466 types also set in_late_binary_op around convert call.
2467 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2468 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2469 result on expr as last argument to ubsan_instrument_float_cast,
2470 if in_late_binary_op, don't use c_save_expr but save_expr.
2471
5624e564
JJ
2472 Update copyright years.
2473
5bd012f8
MP
24742015-01-05 Marek Polacek <polacek@redhat.com>
2475
2476 PR c/64423
2477 * c-typeck.c (build_array_ref): Pass loc down to
2478 warn_array_subscript_with_type_char.
2479
3f8257db 24802014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2481
2482 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2483 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2484 element type.
8e745a17 2485 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2486 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2487 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2488 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2489 to PEDWARN_FOR_QUALIFIERS.
768952be 2490
8f94a8c4
JJ
24912014-12-17 Jakub Jelinek <jakub@redhat.com>
2492
2493 PR sanitizer/64289
2494 * c-convert.c: Include ubsan.h.
2495 (convert): For real -> integral casts and
2496 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2497 instead instrument the float cast directly.
2498
b731b390
JJ
24992014-11-29 Jakub Jelinek <jakub@redhat.com>
2500
2501 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2502 c_finish_stmt_expr): Remove NULL last argument from
2503 create_tmp_var_raw and create_tmp_var calls.
2504 * c-array-notation.c (fix_builtin_array_notation_fn,
2505 build_array_notation_expr, fix_conditional_array_notations_1,
2506 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2507
541e35a6
MP
25082014-11-28 Marek Polacek <polacek@redhat.com>
2509
2510 PR c/63862
2511 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2512 convert the right operand to integer type.
2513
b286be94
MP
25142014-11-25 Marek Polacek <polacek@redhat.com>
2515
2516 PR c/63877
2517 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2518 for inline functions.
2519
aa7da51a
JJ
25202014-11-21 Jakub Jelinek <jakub@redhat.com>
2521
2522 PR target/63764
2523 * c-typeck.c (build_array_ref): Adjust
2524 convert_vector_to_pointer_for_subscript caller. If it returns true,
2525 call non_lvalue_loc on the result.
2526
d876207f
RB
25272014-11-11 Richard Biener <rguenther@suse.de>
2528
2529 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2530 to true.
2531
e5e44252
AK
25322014-11-10 Andi Kleen <ak@linux.intel.com>
2533
2534 PR c/60804
2535 * c-parser.c (c_parser_statement_after_labels): Call
2536 check_no_cilk.
2537 (c_parser_if_statement): Dito.
2538 (c_parser_switch_statement): Dito.
2539 (c_parser_while_statement): Dito.
2540 (c_parser_do_statement): Dito.
2541 (c_parser_for_statement): Dito.
2542 * c-typeck.c (c_finish_loop): Dito.
2543
13c21655
PC
25442014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2545
2546 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2547 OPT_Wshift_count_overflow in the warnings.
2548
2d51fcef
MP
25492014-10-30 Marek Polacek <polacek@redhat.com>
2550
2551 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2552 print the stripped version as well, if they're not the same.
2553
ef4bddc2
RS
25542014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2555
2556 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2557 machine_mode.
2558
c582198b
AM
25592014-10-28 Andrew MacLeod <amacleod@redhat.com>
2560
2561 * c-decl.c: Adjust include files.
2562 * c-parser.c: Ditto.
2563
ddc8de03
PM
25642014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2565 Tom Tromey <tromey@redhat.com>
2566
2567 * c-tree.h (enum c_oracle_request): New.
2568 (c_binding_oracle_function): New typedef.
2569 (c_binding_oracle, c_pushtag, c_bind): Declare.
2570 * c-decl.c (c_binding_oracle): New global.
2571 (I_SYMBOL_CHECKED): New macro.
2572 (i_symbol_binding): New function.
2573 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2574 (I_TAG_CHECKED): New macro.
2575 (i_tag_binding): New function.
2576 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2577 (I_LABEL_CHECKED): New macro.
2578 (i_label_binding): New function.
2579 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2580 (c_print_identifier): Save and restore c_binding_oracle.
2581 (c_pushtag, c_bind): New functions.
2582
60393bbc
AM
25832014-10-27 Andrew MacLeod <amacleod@redhat.com>
2584
2585 * c-typeck.c: Adjust include files.
2586
d723bb7c
MLI
25872014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2588
2589 PR c++/53061
2590 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2591 initialization here...
2592 (c_initialize_diagnostics): ... but here. Set defaults after
2593 building pretty-printer.
2594
1bc5a451
MP
25952014-10-23 Marek Polacek <polacek@redhat.com>
2596
2597 PR c/63626
2598 * c-decl.c (pop_scope): Don't print warning in external_scope.
2599
4435bb92
MP
26002014-10-19 Marek Polacek <polacek@redhat.com>
2601
2602 PR c/63567
2603 * c-typeck.c (output_init_element): Allow initializing objects with
2604 static storage duration with compound literals even in C99 and add
2605 pedwarn for it.
2606
7278465e
MP
26072014-10-17 Marek Polacek <polacek@redhat.com>
2608
2609 PR c/63567
2610 * c-typeck.c (digest_init): Allow initializing objects with static
2611 storage duration with compound literals even in C99 and add pedwarn
2612 for it.
2613
d9b7be2e
MP
26142014-10-17 Marek Polacek <polacek@redhat.com>
2615
2616 PR c/63543
2617 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2618 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2619 error multiple times. Print the type.
2620
f406ae1f
MP
26212014-10-17 Marek Polacek <polacek@redhat.com>
2622
2623 PR c/63549
2624 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2625 type.
2626
92574c7c
MP
26272014-10-17 Marek Polacek <polacek@redhat.com>
2628
2629 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2630 (start_function): Use OPT_Wimplicit_int instead of 0.
2631 (store_parm_decls_oldstyle): Likewise.
2632
1bc4a978
MT
26332014-10-17 Alan Modra <amodra@gmail.com>
2634
2635 PR middle-end/61848
2636 * c-decl.c (merge_decls): Don't merge section name or tls model
2637 to newdecl symtab node, instead merge to olddecl. Override
2638 existing olddecl section name. Set tls_model for all thread-local
2639 vars, not just OMP thread-private ones. Remove incorrect comment.
2640
83685514
AM
26412014-10-16 Andrew MacLeod <amacleod@redhat.com>
2642
2643 * c-decl.c: Adjust include files.
2644
78a7c317
DD
26452014-10-14 DJ Delorie <dj@redhat.com>
2646
2647 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2648 (c_token_starts_typename): Check all __intN, not just __int128.
2649 (c_token_starts_declspecs): Likewise.
2650 (c_parser_declspecs): Likewise.
2651 (c_parser_attribute_any_word): Likewise.
2652 (c_parser_objc_selector): Likewise.
2653 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2654 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2655 is specified.
2656 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2657 __int128.
2658 (finish_declspecs): Likewise.
2659
74d98c1e
AB
26602014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2661
8e745a17 2662 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 2663 the duplicate code.
8e745a17 2664 (c_parser_statement): Call the new function.
74d98c1e 2665
84937de2
MP
26662014-10-09 Marek Polacek <polacek@redhat.com>
2667
2668 PR c/63480
2669 * c-typeck.c (pop_init_level): Don't warn about initializing
2670 with { }.
2671
0382aaa0
MP
26722014-10-07 Marek Polacek <polacek@redhat.com>
2673
2674 PR c/59717
2675 * c-decl.c (header_for_builtin_fn): New function.
2676 (implicitly_declare): Suggest which header to include.
2677
7a0ca710
MP
26782014-10-07 Marek Polacek <polacek@redhat.com>
2679
2680 * c-convert.c (convert): Use error_operand_p.
2681 * c-typeck.c (require_complete_type): Likewise.
2682 (really_atomic_lvalue): Likewise.
2683 (digest_init): Likewise.
2684 (handle_omp_array_sections_1): Likewise.
2685
6bc8a126
MP
26862014-10-03 Marek Polacek <polacek@redhat.com>
2687
2688 PR c/63453
2689 * c-decl.c (pop_scope): Don't warn about "inline function declared
2690 but never defined" for functions marked with gnu_inline attribute.
2691
d90c0a59
JJ
26922014-09-25 Jakub Jelinek <jakub@redhat.com>
2693
2694 PR c++/63249
2695 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2696 on low_bound and length.
2697
083e891e
MP
26982014-09-24 Marek Polacek <polacek@redhat.com>
2699
2700 PR c/61405
2701 PR c/53874
2702 * c-parser.c: Don't define CPP_KEYWORD.
2703 (c_parser_switch_statement): Pass original type to c_finish_case.
2704 * c-tree.h (c_finish_case): Update declaration.
2705 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2706 conditionally to c_do_switch_warnings.
2707
8d95fe25
MP
27082014-09-03 Marek Polacek <polacek@redhat.com>
2709
2710 PR c/62024
2711 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2712 conversions.
2713
9a771876
JJ
27142014-09-02 Jakub Jelinek <jakub@redhat.com>
2715 Balaji V. Iyer <balaji.v.iyer@intel.com>
2716 Igor Zamyatin <igor.zamyatin@intel.com>
2717
2718 * c-parser.c (c_parser_cilk_for): New function.
2719 (c_parser_cilk_grainsize): Likewise.
2720 (c_get_temp_regvar): Likewise.
2721 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2722 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2723 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2724 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2725 case.
2726
b7679d96
CG
27272014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2728
2729 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2730 with using HOST_WIDE_INT without truncation to 'int'
2731
59ea0364
MP
27322014-08-22 Marek Polacek <polacek@redhat.com>
2733
2734 PR c++/62199
2735 * c-typeck.c (parser_build_binary_op): Adjust call to
2736 warn_logical_not_parentheses.
2737
671a475e
IZ
27382014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2739
2740 PR other/62008
2741 * c-parser.c (c_parser_array_notation): Check for correct
2742 type of an array added.
2743
04159acf
MP
27442014-08-19 Marek Polacek <polacek@redhat.com>
2745
2746 PR c++/62153
2747 * c-typeck.c (build_binary_op): If either operand of a comparison
2748 is a boolean expression, call maybe_warn_bool_compare.
2749
c77935ee
PP
27502014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2751
2752 PR c/45584
2753 * c-typeck.c (build_c_cast): Do a conversion even when the
2754 TYPE_MAIN_VARIANTs are the same.
2755
35aff4fb
MP
27562014-08-19 Marek Polacek <polacek@redhat.com>
2757
2758 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2759 pedwarn_c99 instead of pedwarn.
2760 (grokfield): Likewise.
2761 (warn_defaults_to): New function.
2762 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2763 Unconditionally call pedwarn_c99 instead of pedwarn.
2764 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2765 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2766 check flag_isoc11 before.
2767 * c-errors.c (pedwarn_c99): Change the return type to bool.
2768 Handle -Wc99-c11-compat.
2769 * c-parser.c (disable_extension_diagnostics): Handle
2770 warn_c99_c11_compat.
2771 (restore_extension_diagnostics): Likewise.
2772 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2773 instead of pedwarn, don't check flag_isoc11 before.
2774 (c_parser_declspecs): Likewise.
2775 (c_parser_alignas_specifier): Likewise.
2776 (c_parser_alignof_expression): Likewise.
2777 (c_parser_generic_selection): Likewise.
2778 * c-tree.h (pedwarn_c99): Update declaration.
2779 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2780 of pedwarn_c99.
2781
177cce46
MP
27822014-08-19 Marek Polacek <polacek@redhat.com>
2783
2784 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2785 to pedwarn_c90.
2786 * c-errors.c: Include "opts.h".
2787 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2788 * c-parser.c (disable_extension_diagnostics): Handle negative value
2789 of warn_c90_c99_compat, too.
2790 (restore_extension_diagnostics): Likewise.
2791 (c_parser_compound_statement_nostart): Pass
2792 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2793
6dc99c33
MP
27942014-08-12 Marek Polacek <polacek@redhat.com>
2795
2796 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2797 Add pedwarn.
2798 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2799 Likewise.
2800 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2801
3f8257db 28022014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
2803
2804 PR c/51849
2805 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2806 Call pedwarn_c90 instead of pedwarn.
2807 (check_bitfield_type_and_width): Likewise.
2808 (declspecs_add_qual): Likewise.
2809 (declspecs_add_type): Likewise.
2810 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2811 Adjust to only call pedwarn_c90.
2812 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2813 pedwarn_c90 instead of pedwarn.
2814 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2815 * c-parser.c (disable_extension_diagnostics): Handle
2816 warn_c90_c99_compat.
2817 (restore_extension_diagnostics): Likewise.
2818 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2819 pedwarn_c90 instead of pedwarn.
2820 (c_parser_initelt): Likewise.
2821 (c_parser_postfix_expression): Likewise.
2822 (c_parser_postfix_expression_after_paren_type): Likewise.
2823 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2824 * c-tree.h: Fix formatting.
2825 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2826 pedwarn_c90 instead of pedwarn.
2827
9f25a338
TS
28282014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2829
2830 * c-typeck.c: Remove include of pointer-set.h.
2831
044331a8
MP
28322014-08-07 Marek Polacek <polacek@redhat.com>
2833
2834 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2835
b787e7a2
TS
28362014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2837
2838 * c-typeck.c: Use hash_map instead of pointer_map.
2839
6e2830c3
TS
28402014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2841
2842 * c-decl.c: Use hash_set instead of pointer_set.
2843
a7ee52fb
IZ
28442014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2845
2846 PR middle-end/61455
2847 * c-array-notation.c (expand_array_notations): Handling
2848 of DECL_EXPR added.
2849
b4dfdc11
MG
28502014-07-31 Marc Glisse <marc.glisse@inria.fr>
2851
2852 PR c++/60517
2853 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2854 a local variable.
2855
976d5a22
TT
28562014-07-30 Tom Tromey <tromey@redhat.com>
2857
2858 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2859 field.
2860 (really_start_incremental_init, push_init_level): Initialize
2861 designator_depth.
2862 (pop_init_level): Set global designator_depth.
2863 (process_init_element): Check for designated_init attribute.
2864
30281de2
MP
28652014-07-20 Marek Polacek <polacek@redhat.com>
2866
2867 PR c/61852
2868 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2869 (implicitly_declare): Pass location to implicit_decl_warning.
2870
b108f48f
JJ
28712014-07-14 Jakub Jelinek <jakub@redhat.com>
2872
2873 PR middle-end/61294
2874 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2875 If non-NULL, call c_parser_check_literal_zero.
2876 (c_parser_check_literal_zero): New function.
2877 (c_parser_postfix_expression_after_primary): Adjust
2878 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2879
773ec47f
MP
28802014-07-06 Marek Polacek <polacek@redhat.com>
2881
2882 PR c/6940
2883 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2884 * c-tree.h (C_ARRAY_PARAMETER): Define.
2885 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2886 function parameter.
2887
22e1cf1c 28882014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 2889 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
2890
2891 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2892 releasing symbol.
2893
52ec0ea3
MP
28942014-07-01 Marek Polacek <polacek@redhat.com>
2895
2896 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2897 instead of 0 to WARN_FOR_ASSIGNMENT.
2898
d5c3d343
MP
28992014-07-01 Marek Polacek <polacek@redhat.com>
2900
2901 PR c/58286
2902 * c-typeck.c (convert_for_assignment): Pass
2903 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2904
6a7253a4
MP
29052014-06-30 Marek Polacek <polacek@redhat.com>
2906
2907 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2908 has no_sanitize_undefined attribute.
2909
5e88a8f4
IZ
29102014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2911
2912 PR middle-end/57541
2913 * c-array-notation.c (fix_builtin_array_notation_fn):
2914 Check for 0 arguments in builtin call. Check that bultin argument is
2915 correct.
2916 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2917 index.
2918
9698b078
SH
29192014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2920
2921 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2922 qualifiers in __auto_type for atomic types.
2923 (c_parser_typeof_specifier): Discard all type qualifiers in
2924 __typeof__ for atomic types.
2925
6e07c515
MP
29262014-06-25 Marek Polacek <polacek@redhat.com>
2927
2928 PR c/61162
2929 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2930 the return expression to c_finish_return.
2931
da6f124d
JJ
29322014-06-25 Jakub Jelinek <jakub@redhat.com>
2933
2934 * c-typeck.c (c_finish_omp_clauses): Make sure
2935 OMP_CLAUSE_LINEAR_STEP has correct type.
2936
c203e8a7
TS
29372014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2938
2939 * c-decl.c: Adjust.
2940
56ad0e38
JJ
29412014-06-24 Jakub Jelinek <jakub@redhat.com>
2942
2943 * c-parser.c (c_parser_omp_for_loop): For
2944 #pragma omp parallel for simd move lastprivate clause from parallel
2945 to for rather than simd.
2946
47c2554f
MP
29472014-06-23 Marek Polacek <polacek@redhat.com>
2948
2949 * c-typeck.c (parser_build_binary_op): Don't call
2950 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2951
56363ffd
JH
29522014-06-15 Jan Hubicka <hubicka@ucw.cz>
2953
2954 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2955 * c-decl.c (merge_decls): Likewise.
2956
d7ff7ae5
MP
29572014-06-09 Marek Polacek <polacek@redhat.com>
2958
2959 PR c/36446
2960 * c-typeck.c (error_init): Call inform instead of error_at.
2961 (pedwarn_init): Call inform instead of pedwarn.
2962 (warning_init): Call inform instead of warning_at.
2963
24d047a3
JH
29642014-06-07 Jan Hubicka <hubicka@ucw.cz>
2965
2966 * c-decl.c (merge_decls): Use set_decl_section_name.
2967 (duplicate_decls): Remove node if it exists.
2968
9bac5cbb
G
29692014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2970
2971 PR c/53119
2972 * c-typeck.c (push_init_level, process_init_element,
2973 pop_init_level): Correct check for zero initialization, move
2974 missing brace warning to respect zero initialization.
2975
8ffcdea8
MP
29762014-06-05 Marek Polacek <polacek@redhat.com>
2977
2978 PR c/56724
2979 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2980
742938c9
MP
29812014-06-05 Marek Polacek <polacek@redhat.com>
2982
2983 PR c/49706
2984 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2985 on the left hand side operand of a comparison.
2986
6447c55d
MP
29872014-06-05 Marek Polacek <polacek@redhat.com>
2988
2989 PR c/48062
2990 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2991 Print note only if the warning was printed.
2992
9dc7743c
IZ
29932014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2994
2995 PR c/58942
2996 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2997 with a pointer.
2998
fedfecef
MP
29992014-06-03 Marek Polacek <polacek@redhat.com>
3000
3001 PR c/60439
3002 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3003 c_start_case.
3004 * c-tree.h (c_start_case): Update.
3005 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3006 switch condition has boolean value.
3007
9b2b7279
AM
30082014-06-02 Andrew MacLeod <amacleod@redhat.com>
3009
3010 * c-decl.c: Include builtins.h.
3011 * c-parser.c: Likewise.
3012
5c1bc275
MP
30132014-05-27 Marek Polacek <polacek@redhat.com>
3014
3015 PR c/56724
3016 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3017 error and warning calls to error_at and warning_at. Pass location of
3018 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3019 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3020 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3021
97563bc8
IZ
30222014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3023
3024 PR c/61191
3025 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3026 function parameters.
3027
aede2c10
JH
30282014-05-23 Jan Hubicka <hubicka@ucw.cz>
3029
3030 * c-decl.c (merge_decls): Preserve symtab node pointers.
3031 (duplicate_decls): Free new decl.
3032
edbba2ce
TS
30332014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3034
f3316c6d
TS
3035 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3036 initialization.
3037
edbba2ce
TS
3038 * c-parser.c (c_parser_omp_target): Return bool values.
3039
68c81f24
TS
30402014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3041
3042 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3043 num_teams_loc variable to num_thread_limit_loc.
3044
632f2871
RS
30452014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3046
3047 * c-array-notation.c (expand_array_notations): Use void_node
3048 instead of void_zero_node.
3049
766090c2
TS
30502014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3051
3052 * c-decl.c (finish_struct): Adjust.
3053 (finish_enum): Likewise.
3054 (bind): Adjust.
3055 (record_inline_static): Likewise.
3056 (push_scope): Likewise.
3057 (make_label): Likewise.
3058 (lookup_label_for_goto): Likewise.
3059 (finish_struct): Likewise.
3060 (finish_enum): Likewise.
3061 (store_parm_decls): Likewise.
3062 (c_push_function_context): Likewise.
3063 * c-lang.h: Remove usage of variable_size gty attribute.
3064 * c-parser.c (c_parse_init): Adjust.
3065 (c_parse_file): Likewise.
3066
2b107f6b
MP
30672014-05-13 Marek Polacek <polacek@redhat.com>
3068
3069 PR c/61162
3070 * c-typeck.c (convert_for_assignment): Pass location to
3071 WARN_FOR_ASSIGNMENT instead of input_location.
3072
d033409e
MP
30732014-05-10 Marek Polacek <polacek@redhat.com>
3074
3075 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3076 maybe_warn_string_init.
3077 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3078 maybe_warn_string_init.
3079 * c-tree.h (maybe_warn_string_init): Update declaration.
3080 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3081 Call pedwarn_init with loc instead of with input_location.
3082 (digest_init): Pass init_loc to maybe_warn_string_init.
3083 (pop_init_level): Call pedwarn_init with loc instead of with
3084 input_location.
3085 (set_init_index): Likewise.
3086 (process_init_element): Likewise.
3087
ea58ef42
MP
30882014-05-09 Marek Polacek <polacek@redhat.com>
3089
3090 PR c/61096
3091 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3092 (c_parser_initelt): Pass location to set_init_label. Pass array index
3093 location to set_init_index.
3094 * c-tree.h (push_init_level): Update declaration.
3095 (pop_init_level): Likewise.
3096 (set_init_index): Likewise.
3097 (set_init_label): Likewise.
3098 * c-typeck.c (error_init): Add location parameter. Call error_at
3099 instead of error.
3100 (digest_init): Pass init_loc to error_init.
3101 (really_start_incremental_init):
3102 (push_init_level): Add location parameter. Pass loc to pop_init_level
3103 and error_init.
3104 (pop_init_level): Likewise.
3105 (set_designator): Add location parameter. Pass loc to pop_init_level,
3106 push_init_level, and error_init.
3107 (set_init_index): Add location parameter. Pass loc to error_init and
3108 set_designator.
3109 (set_init_label): Likewise.
3110 (output_init_element): Pass loc to error_init.
3111 (process_init_element): Pass loc to error_init, pop_init_level,
3112 pedwarn_init, and push_init_level.
3113
661a0813
MP
31142014-05-09 Marek Polacek <polacek@redhat.com>
3115
3116 PR c/50459
3117 * c-parser.c (c_parser_attributes): Parse the arguments as an
3118 expression-list if the attribute takes identifier.
3119
2793eeab
MP
31202014-05-08 Marek Polacek <polacek@redhat.com>
3121
3122 PR c/61053
3123 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3124 TYPE_ALIGN_UNIT.
3125
f827930a
MP
31262014-05-08 Marek Polacek <polacek@redhat.com>
3127
3128 PR c/61077
3129 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3130 of main.
3131
1d60af08
KZ
31322014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3133 Mike Stump <mikestump@comcast.net>
3134 Richard Sandiford <rdsandiford@googlemail.com>
3135
3136 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3137 (finish_enum): Use wide-int interfaces.
3138 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3139 * c-typeck.c (build_c_cast): Likewise.
3140 (set_nonincremental_init_from_string): Likewise.
3141 (c_tree_equal): Likewise.
3142
a0e24419
MP
31432014-05-02 Marek Polacek <polacek@redhat.com>
3144
3145 PR c/25801
3146 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3147 Return size_one_node when the type is not complete.
3148 (pointer_diff): Remove comment.
3149 (build_unary_op): Improve error messages.
3150
19fc9faa
MP
31512014-05-02 Marek Polacek <polacek@redhat.com>
3152
3153 * c-typeck.c (c_finish_return): Separate warning_at calls.
3154
63bc4e87
MP
31552014-05-02 Marek Polacek <polacek@redhat.com>
3156
3157 * c-tree.h (error_init): Remove declaration.
3158 (pedwarn_init): Likewise.
3159 * c-typeck.c (error_init): Make static and move above.
3160 (pedwarn_init): Likewise.
3161 (warning_init): Move above.
3162 (maybe_warn_string_init): Likewise.
3163
4bd2511b
JL
31642014-05-01 Jeff Law <law@redhat.com>
3165
3166 Revert:
3167
3168 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3169 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3170 avoid goto.
3171
6a358dcb
MP
31722014-05-02 Marek Polacek <polacek@redhat.com>
3173
3174 PR c/60784
3175 * c-typeck.c (push_init_level): Set constructor_designated to
3176 p->designated for structures.
3177
ae5ebda4
MP
31782014-05-01 Marek Polacek <polacek@redhat.com>
3179
3180 PR c/60915
3181 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3182 function-definition has an attribute after the declarator.
3183
96b40f8d
MP
31842014-05-01 Marek Polacek <polacek@redhat.com>
3185
3186 PR c/60257
3187 * c-typeck.c (warning_init): Add location_t parameter. Call
3188 warning_at instead of warning.
3189 (push_init_level): Pass input_location to warning_init.
3190 (add_pending_init): Add location_t parameter. Pass loc to
3191 warning_init.
3192 (set_nonincremental_init): Pass input_location to add_pending_init.
3193 (set_nonincremental_init_from_string): Likewise.
3194 (output_init_element): Pass loc to warning_init and to
3195 add_pending_init.
3196
32e00768
MP
31972014-05-01 Marek Polacek <polacek@redhat.com>
3198
3199 PR c/43395
3200 * c-typeck.c (c_finish_return): Distinguish between label and variable
3201 when warning about returning local address.
3202
c9379ce2
MP
32032014-05-01 Marek Polacek <polacek@redhat.com>
3204
3205 PR c/29467
3206 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3207 in C89 mode.
3208
d00887e8
MP
32092014-05-01 Marek Polacek <polacek@redhat.com>
3210
3211 PR c/43245
3212 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3213 instead of 0 to WARN_FOR_QUALIFIERS.
3214
5436fa2e
MP
32152014-05-01 Marek Polacek <polacek@redhat.com>
3216
3217 PR c/56989
3218 * c-typeck.c (default_conversion): Use better location for
3219 error call.
3220
f8ed5150
MP
32212014-04-30 Marek Polacek <polacek@redhat.com>
3222
3223 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3224 also when SANITIZE_FLOAT_DIVIDE is on.
3225
8337d1db
MP
32262014-04-30 Marek Polacek <polacek@redhat.com>
3227
3228 PR c/60139
3229 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3230 and pedwarn_init. Use loc insted of input_location.
3231
c4bdc42f
MP
32322014-04-30 Marek Polacek <polacek@redhat.com>
3233
3234 PR c/60351
3235 * c-typeck.c (build_binary_op): Use location when warning about
3236 shift count.
3237
45484dcf
MP
32382014-04-25 Marek Polacek <polacek@redhat.com>
3239
3240 PR c/18079
3241 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3242 always_inline/noinline and hot/cold attributes.
3243
34cf811f
MP
32442014-04-25 Marek Polacek <polacek@redhat.com>
3245
3246 PR c/60114
3247 * c-parser.c (c_parser_initelt): Pass input_location to
3248 process_init_element.
3249 (c_parser_initval): Pass loc to process_init_element.
3250 * c-tree.h (process_init_element): Adjust declaration.
3251 * c-typeck.c (push_init_level): Pass input_location to
3252 process_init_element.
3253 (pop_init_level): Likewise.
3254 (set_designator): Likewise.
3255 (output_init_element): Add location_t parameter. Pass loc to
3256 digest_init.
3257 (output_pending_init_elements): Pass input_location to
3258 output_init_element.
3259 (process_init_element): Add location_t parameter. Pass loc to
3260 output_init_element.
3261
42056eac
JJ
32622014-04-24 Jakub Jelinek <jakub@redhat.com>
3263
3264 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3265 atomic-clause, allow comma in between atomic-clause and
3266 seq_cst.
3267
e162a134
JJ
32682014-04-22 Jakub Jelinek <jakub@redhat.com>
3269
3270 PR c/59073
3271 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3272 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3273
2f6babac
IZ
32742014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3275
3276 PR middle-end/60469
3277 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3278 create_tmp_var instead build_decl for creating temps.
3279 (build_array_notation_expr): Likewise.
3280 (fix_conditional_array_notations_1): Likewise.
3281 (fix_array_notation_expr): Likewise.
3282 (fix_array_notation_call_expr): Likewise.
3283
8edbfaa6
JJ
32842014-03-28 Jakub Jelinek <jakub@redhat.com>
3285
3286 PR c++/60689
3287 * c-tree.h (c_build_function_call_vec): New prototype.
3288 * c-typeck.c (build_function_call_vec): Don't call
3289 resolve_overloaded_builtin here.
3290 (c_build_function_call_vec): New wrapper function around
3291 build_function_call_vec. Call resolve_overloaded_builtin here.
3292 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3293 Call c_build_function_call_vec instead of build_function_call_vec.
3294 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3295 * c-decl.c (finish_decl): Likewise.
3296
7485aeea
MLI
32972014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3298
3299 PR c/55383
3300 * c-typeck.c: Use correct format string in cast-qual warning
3301
b17a8b07
TS
33022014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3303
3304 * c-decl.c (c_decl_attributes): Use
3305 lang_hooks.types.omp_mappable_type.
3306 * c-typeck.c (c_finish_omp_clauses): Likewise.
3307
3af9c5e9
MP
33082014-03-06 Marek Polacek <polacek@redhat.com>
3309
3310 PR c/60197
3311 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3312 of checking tree code.
3313
1c9f5f33
PK
33142014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3315
3316 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3317 (c_parser_parameter_declaration): Likewise.
3318
cc28fc7f
MP
33192014-02-19 Marek Polacek <polacek@redhat.com>
3320
3321 PR c/60195
3322 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3323 Call mark_exp_read on exp.value.
3324 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3325 TREE_ADDRESSABLE on old instead of val.
3326 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3327
b581c05c
PK
33282014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3329
3330 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3331 C_EXPR_APPEND by vec_safe_push.
3332 * c-tree.h (C_EXPR_APPEND): Remove.
3333
81e5eca8
MP
33342014-01-31 Marek Polacek <polacek@redhat.com>
3335
3336 PR c/59963
3337 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3338 build_function_call_vec.
3339 (build_function_call): Likewise.
3340 (build_atomic_assign): Likewise.
3341 (build_function_call_vec): Add arg_loc parameter. Use it.
3342 (convert_arguments): Likewise.
3343 (convert_for_assignment): Rename rhs_loc to expr_loc.
3344 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3345 (c_parser_objc_keywordexpr): Likewise.
3346 (c_parser_postfix_expression_after_primary): Call
3347 build_function_call_vec with expr_loc rather than op_loc.
3348 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3349 build_function_call_vec.
3350 (c_parser_expr_list): Add locations parameter. Fill it with locations
3351 of function arguments.
3352 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3353
68fca595
MP
33542014-01-30 Marek Polacek <polacek@redhat.com>
3355
3356 PR c/59940
3357 * c-typeck.c (build_function_call_vec): Use loc parameter.
3358 (convert_arguments): Add location parameter. Use it.
3359 (ep_convert_and_check): Likewise.
3360 (build_atomic_assign): Adjust convert_for_assignment call.
3361 (build_modify_expr): Likewise.
3362 (digest_init): Likewise.
3363 (c_finish_return): Likewise.
3364 (build_conditional_expr): Adjust ep_convert_and_check calls.
3365 (convert_for_assignment): Add rhs_loc parameter. Use it.
3366 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3367 calls.
3368
fa337f3a
RB
33692014-01-30 Richard Biener <rguenther@suse.de>
3370
3371 PR c/59905
3372 * c-typeck.c (build_function_call_vec): Do not replace calls
3373 to a function via an incompatible type with a runtime abort.
3374
b72271b9
BI
33752014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3376
3377 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3378 flag_enable_cilkplus with flag_cilkplus.
3379 (c_parser_direct_declarator_inner): Likewise.
3380 (c_parser_attribute_any_word): Likewise.
3381 (c_parser_attributes): Likewise.
3382 (c_parser_compound_statement): Likewise.
3383 (c_parser_statement_after_labels): Likewise.
3384 (c_parser_if_statement): Likewise.
3385 (c_parser_switch_statement): Likewise.
3386 (c_parser_do_statement): Likewise.
3387 (c_parser_for_statement): Likewise.
3388 (c_parser_unary_expression): Likewise.
3389 (c_parser_postfix_expression): Likewise.
3390 (c_parser_postfix_expression_after_primary): Likewise.
3391 (c_parser_postfix_expression_after_primary): Likewise.
3392 (c_parser_omp_clause_name): Likewise.
3393 (c_finish_omp_declare_simd): Likewise.
3394 (c_parser_cilk_verify_simd): Likewise.
3395 * c-typeck.c (build_array_ref): Likewise.
3396 (build_function_call_vec): Likewise.
3397 (convert_arguments): Likewise.
3398 (build_compound_expr): Likewise.
3399 (c_finish_return): Likewise.
3400 (c_finish_if_stmt): Likewise.
3401 (c_finish_loop): Likewise.
3402 (build_binary_op): Likewise.
3403
393e8e8b
MP
34042014-01-23 Marek Polacek <polacek@redhat.com>
3405
3406 PR c/59846
3407 * c-typeck.c (parser_build_binary_op): Use location instead of
3408 input_location.
3409 (build_binary_op): Pass location to shorten_compare.
3410
f04dda30
MP
34112014-01-23 Marek Polacek <polacek@redhat.com>
3412
3413 PR c/58346
3414 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3415 an empty aggregate.
3416
789eadcd
MP
34172014-01-23 Marek Polacek <polacek@redhat.com>
3418
3419 PR c/59871
3420 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3421 of a comma expression.
3422 (emit_side_effect_warnings): Likewise.
3423
40f14e9f
BI
34242014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3425
3426 PR c/59825
3427 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3428 function to use walk_tree and moved a lot of its functionality to
3429 expand_array_notations.
3430 (expand_array_notations): New function.
3431
74558dd9
BI
34322014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3433
3434 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3435 attribute an attribute without value.
3436
652fea39
JJ
34372014-01-23 Jakub Jelinek <jakub@redhat.com>
3438
3439 PR middle-end/58809
3440 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3441 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3442
f34f1c87
MP
34432014-01-22 Marek Polacek <polacek@redhat.com>
3444
3445 PR c/59891
3446 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3447 of remove_c_maybe_const_expr on op1 and op2.
3448
241f845a
JJ
34492014-01-15 Jakub Jelinek <jakub@redhat.com>
3450
3451 PR c/58943
3452 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3453 effects, preevaluate rhs using SAVE_EXPR first.
3454
9a74f20c
BI
34552014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3456
3457 PR c++/59631
3458 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3459 statements with if-elseif statements.
3460
96066ce1
MP
34612014-01-06 Marek Polacek <polacek@redhat.com>
3462
3463 PR c/57773
3464 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3465 defined bit-field types only in ISO C.
3466
23a5b65a
RS
34672014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3468
3469 Update copyright years
3470
f9030485
RS
34712014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3472
3473 * c-array-notation.c: Use the standard form for the copyright notice.
3474
41958c28
BI
34752013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3476
3477 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3478 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3479 field in parser is not empty. If not-empty, call the function
3480 c_parser_finish_omp_declare_simd.
3481 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3482 between SIMD-enabled functions and #pragma simd. Added new parameter.
3483 (c_parser_cilk_all_clauses): Modified the usage of the function
3484 c_parser_cilk_clause_vectorlength as mentioned above.
3485 (c_parser_cilk_simd_fn_vector_attrs): New function.
3486 (c_finish_cilk_simd_fn_tokens): Likewise.
3487 (is_cilkplus_vector_p): Likewise.
3488 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3489 "nomask," and "mask" strings in clause name.
3490 (c_parser_omp_all_clauses): Added 3 new case statements:
3491 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3492 PRAGMA_CILK_CLAUSE_NOMASK.
3493 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3494 check for vector attribute and if so call the function
3495 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3496 called the function c_finish_cilk_simd_fn_tokens.
3497 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3498 parser field is non-empty. If so, parse them as you would parse
3499 the omp declare simd pragma.
3500 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3501 Added a check when step is a parameter and flag it as error.
3502 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3503 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3504 pragma_omp_clause.
3505
cef0fd0e
TS
35062013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3507
3508 * c-parser.c (c_parser_omp_parallel): Fix description.
3509
12893402
BI
35102013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3511
3512 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3513 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3514 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3515 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3516
296674db
JM
35172013-12-04 Joseph Myers <joseph@codesourcery.com>
3518
3519 PR c/52023
3520 * c-parser.c (c_parser_alignas_specifier): Use
3521 c_sizeof_or_alignof_type instead of c_alignof.
3522 (c_parser_alignof_expression): Likewise, with min_alignof
3523 parameter depending on alignof spelling used.
3524
edd28054
MP
35252013-12-04 Marek Polacek <polacek@redhat.com>
3526
3527 PR c/54113
3528 * c-decl.c (start_function): Don't warn for missing prototype for
3529 inline functions.
3530
da0fc454
MP
35312013-12-03 Marek Polacek <polacek@redhat.com>
3532
3533 PR c/59351
3534 * c-decl.c (build_compound_literal): Allow compound literals with
3535 empty initial value.
3536
4c2ecab0
JM
35372013-12-02 Joseph Myers <joseph@codesourcery.com>
3538
3539 PR c/58235
3540 * c-typeck.c (build_modify_expr): Diagnose assignment to
3541 expression with array type.
3542
340baef7
JM
35432013-11-29 Joseph Myers <joseph@codesourcery.com>
3544
3545 PR c/42262
3546 * c-typeck.c (process_init_element): Do not treat a string as
3547 initializing a whole array when used with a designator for an
3548 individual element.
3549
6763b9f7
JM
35502013-11-29 Joseph Myers <joseph@codesourcery.com>
3551
3552 PR c/57574
3553 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3554 an inline function following a static declaration.
3555
e7bd1de1
JJ
35562013-11-28 Jakub Jelinek <jakub@redhat.com>
3557
3558 PR c/59310
3559 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3560 to p_name before calling c_parser_omp_teams instead of after.
3561 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3562 argument. Remove unused p_name variable.
3563
0136f8f0
AH
35642013-11-27 Aldy Hernandez <aldyh@redhat.com>
3565 Jakub Jelinek <jakub@redhat.com>
3566
3567 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3568 external_scope is NULL.
3569
241b71bb
TV
35702013-11-27 Tom de Vries <tom@codesourcery.com>
3571 Marc Glisse <marc.glisse@inria.fr>
3572
3573 PR c++/59032
3574 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3575
2fb9a547
AM
35762013-11-22 Andrew MacLeod <amacleod@redhat.com>
3577
3578 * c-typeck.c: Add required include files from gimple.h.
3579
8400e75e
DM
35802013-11-22 David Malcolm <dmalcolm@redhat.com>
3581
3582 * c-decl.c (define_label, shadow_tag_warned)
3583 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3584 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3585 (declspecs_add_type): Remove use of in_system_header macro.
3586 * c-parser.c (c_parser_unary_expression): Likewise.
3587 * c-typeck.c (store_init_value, process_init_element)
3588 (c_start_case): Likewise.
3589
3590 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3591 macro.
3592
3593 * c-parser.c (c_parser_set_source_position_from_token): Remove
3594 reference to in_system_header from comment.
3595
386b1f1f
RS
35962013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3597
3598 * c-decl.c (grokdeclarator): Update comment to refer to
3599 tree_to_[su]hwi rather than tree_low_cst.
3600
ae7e9ddd
RS
36012013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3602
3603 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3604 tree_to_uhwi throughout.
3605
9439e9a1
RS
36062013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3607
3608 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3609 throughout.
3610
9541ffee
RS
36112013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3612
3613 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3614 throughout.
3615
c02065fc
AH
36162013-11-15 Aldy Hernandez <aldyh@redhat.com>
3617
3618 * c-parser.c (c_parser_cilk_simd): New.
3619 (c_parser_cilk_verify_simd): New.
3620 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3621 (c_parser_omp_for_loop): Add case for NE_EXPR.
3622 Set c_break_label for CILK_SIMD.
3623 (c_parser_cilk_clause_vectorlength): New.
3624 (c_parser_cilk_clause_linear): New.
3625 (c_parser_cilk_clause_name): New.
3626 (c_parser_cilk_all_clauses): New.
3627 * c-typeck.c (build_unary_op): Pass location argument to
3628 readonly_error.
3629 (build_modify_expr): Same.
3630 (build_asm_expr): Same.
3631 (c_finish_bc_stmt): Error on break/continue in loops.
3632
18f429e2
AM
36332013-11-14 Andrew MacLeod <amacleod@redhat.com>
3634
3635 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3636
d8a2d370
DN
36372013-11-14 Diego Novillo <dnovillo@google.com>
3638
3639 * c-decl.c: Include print-tree.h.
3640 Include stor-layout.h.
3641 Include varasm.h.
3642 Include attribs.h.
3643 Include stringpool.h.
3644 * c-lang.c: Include fold-const.h.
3645 * c-parser.c: Include stringpool.h.
3646 Include attribs.h.
3647 Include stor-layout.h.
3648 Include varasm.h.
3649 Include trans-mem.h.
3650 * c-typeck.c: Include stor-layout.h.
3651 Include trans-mem.h.
3652 Include varasm.h.
3653 Include stmt.h.
3654
38b7bc7f
JM
36552013-11-13 Joseph Myers <joseph@codesourcery.com>
3656
3657 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3658 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3659 __auto_type.
3660 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3661 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3662 RID_AUTO_TYPE.
3663 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3664 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3665 (c_parser_declarator, c_parser_direct_declarator_inner)
3666 (c_parser_parameter_declaration, c_parser_type_name): All callers
3667 changed.
3668 (c_parser_declaration_or_fndef): Handle declarations with type
3669 determined from the initializer.
3670
45b0be94
AM
36712013-11-12 Andrew MacLeod <amacleod@redhat.com>
3672
18f429e2 3673 * c-typeck.c: Include gimplify.h.
45b0be94 3674
582d9b50
JM
36752013-11-12 Joseph Myers <joseph@codesourcery.com>
3676
3677 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3678 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3679 comment.
3680 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3681 or _Thread_local as appropriate in diagnostics.
3682 (build_null_declspecs): Initialize ret->thread_gnu_p.
3683 (declspecs_add_scspec): Handle either __thread or _Thread_local
3684 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3685 pedantic. Do not disallow _Thread_local extern and _Thread_local
3686 static.
3687
267bac10
JM
36882013-11-07 Joseph Myers <joseph@codesourcery.com>
3689 Andrew MacLeod <amacleod@redhat.com>
3690
3691 * c-aux-info.c (gen_type): Handle atomic qualifier.
3692 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3693 qualifiers when compating types.
3694 (shadow_tag_warned): Handle atomic_p in declspecs.
3695 (quals_from_declspecs): Likewise.
3696 (start_decl): Use c_type_promotes_to when promoting argument
3697 types.
3698 (grokdeclarator): Handle _Atomic.
3699 (get_parm_info): Diagnose any qualifier on "void" as only
3700 parameter.
3701 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3702 comparing types. Use c_type_promotes_to when promoting argument
3703 types.
3704 (finish_function): Use c_type_promotes_to when promoting argument
3705 types.
3706 (build_null_declspecs): Handle atomic_p in declspecs.
3707 (declspecs_add_qual): Handle RID_ATOMIC.
3708 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3709 (c_token_starts_declspecs): Handle RID_ATOMIC.
3710 (c_parser_declspecs): Handle atomic type specifiers and
3711 qualifiers.
3712 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3713 from types of expressions with atomic type.
3714 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3715 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3716 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3717 (c_parser_statement_after_labels, c_parser_switch_statement)
3718 (c_parser_for_statement, c_parser_expr_no_commas)
3719 (c_parser_conditional_expression, c_parser_binary_expression)
3720 (c_parser_cast_expression, c_parser_unary_expression)
3721 (c_parser_postfix_expression)
3722 (c_parser_postfix_expression_after_primary, c_parser_expression):
3723 Use convert_lvalue_to_rvalue.
3724 (c_parser_expression_conv, c_parser_expr_list): Document
3725 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3726 (c_parser_objc_synchronized_statement): Use
3727 convert_lvalue_to_rvalue.
3728 (c_parser_objc_selector): Handle RID_ATOMIC.
3729 (c_parser_objc_receiver, c_parser_array_notation): Use
3730 convert_lvalue_to_rvalue.
3731 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3732 _Atomic (type-name).
3733 (struct c_declspecs): Add atomic_p field.
3734 (convert_lvalue_to_rvalue): Declare.
3735 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3736 corresponding atomic types.
3737 (qualify_type): Don't add _Atomic qualifiers from second argument.
3738 (comp_target_types): Do not allow _Atomic mismatches.
3739 (type_lists_compatible_p): Do not remove atomic qualifiers when
3740 comparing types.
3741 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3742 (build_atomic_assign): New functions.
3743 (build_unary_op): Use build_atomic_assign for atomic increment and
3744 decrement.
3745 (build_conditional_expr): Do not treat _Atomic void as a qualified
3746 version of void.
3747 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3748 (find_anonymous_field_with_type, convert_to_anonymous_field)
3749 (convert_for_assignment): Do not remove atomic qualifiers when
3750 comparing types.
3751 (digest_init): Do not accept initialization of arrays of atomic
3752 elements by string constants.
3753 (build_asm_expr): Use convert_lvalue_to_rvalue.
3754 (build_binary_op): Do not treat _Atomic void as a qualified
3755 version of void.
3756
0c249d4b
DD
37572013-11-06 DJ Delorie <dj@redhat.com>
3758
3759 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3760 both explicit and builtin, print the location of the explicit one.
3761
6d7f7e0a
TB
37622013-11-05 Tobias Burnus <burnus@net-b.de>
3763
3764 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3765 c_parser_omp_distribute, c_parser_omp_teams,
3766 c_parser_omp_target, c_parser_omp_declare): Handle
3767 -fopenmp-simd.
3768
b906f4ca
MP
37692013-11-03 Marek Polacek <polacek@redhat.com>
3770
3771 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3772
ee1d5a02
JJ
37732013-11-01 Jakub Jelinek <jakub@redhat.com>
3774
3775 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3776 check_dup_generic at the end, unless remove is true.
3777 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3778 remove = true;.
3779 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3780
5a9785fb
JJ
37812013-10-31 Jakub Jelinek <jakub@redhat.com>
3782
3783 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3784 with decl that is not pointer nor array.
3785
939b37da
BI
37862013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3787
3788 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3789 a spawning function is found.
3790 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3791 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3792 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3793 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3794 case.
3795 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3796 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3797 expr.
3798 (c_finish_return): Added a check to reject _Cilk_spawn in return
3799 expression.
3800 (build_cilk_spawn): New function.
3801 (build_cilk_sync): Likewise.
3802 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3803
d4af74d4
TB
38042013-10-27 Tobias Burnus <burnus@net-b.de>
3805
3806 PR other/33426
3807 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3808 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3809 (c_parser_statement_after_labels): Update calls.
3810
d73749df 38112013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3812
3813 PR other/33426
3814 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3815 Handle PRAGMA_IVDEP.
3816 (c_parser_statement_after_labels): Update call.
3817
f28aa681
MP
38182013-10-24 Marek Polacek <polacek@redhat.com>
3819
3820 * c-parser.c (c_parser_struct_declaration): Add a comment.
3821 (c_parser_declarator): Don't allow _Alignas here.
3822
0645c1a2
AM
38232013-10-17 Andrew MacLeod <amacleod@redhat.com>
3824
3825 * c-parser.c: Include omp-low.h.
3826 * c-typeck.c: Likewise.
3827
568a31f2
MP
38282013-10-17 Marek Polacek <polacek@redhat.com>
3829
3830 PR c/58267
3831 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3832 Document syntax of the array-declarator.
3833 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3834 are not permitted.
3835 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3836 (c_parser_struct_declaration): Likewise.
3837 (c_parser_declarator): Likewise.
3838 (c_parser_direct_declarator_inner): Likewise.
3839 (c_parser_parameter_declaration): Likewise.
3840 (c_parser_type_name): Likewise.
3841
acf0174b
JJ
38422013-10-11 Jakub Jelinek <jakub@redhat.com>
3843
3844 * c-lang.h (current_omp_declare_target_attribute): New extern
3845 decl.
3846 * c-parser.c: Include c-lang.h.
3847 (struct c_parser): Change tokens to c_token *.
3848 Add tokens_buf field. Change tokens_avail type to unsigned int.
3849 (c_parser_consume_token): If parser->tokens isn't
3850 &parser->tokens_buf[0], increment parser->tokens.
3851 (c_parser_consume_pragma): Likewise.
3852 (enum pragma_context): Add pragma_struct and pragma_param.
3853 (c_parser_external_declaration): Adjust
3854 c_parser_declaration_or_fndef caller.
3855 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3856 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3857 Adjust recursive call.
3858 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3859 of pragma_external.
3860 (c_parser_parameter_declaration): Use pragma_param instead of
3861 pragma_external.
3862 (c_parser_compound_statement_nostart, c_parser_label,
3863 c_parser_for_statement): Adjust
3864 c_parser_declaration_or_fndef callers.
3865 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3866 it through to c_parser_conditional_expression.
3867 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3868 pass it through to c_parser_binary_expression. Adjust recursive
3869 call.
3870 (c_parser_binary_expression): Remove prec argument, add
3871 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3872 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3873 binop matches it, use build2 instead of parser_build_binary_op.
3874 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3875 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3876 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3877 Handle pragma_struct and pragma_param the same as pragma_external.
3878 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3879 (c_parser_omp_variable_list): Parse array sections for
3880 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3881 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3882 (c_parser_omp_clause_reduction): Handle user defined reductions.
3883 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3884 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3885 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3886 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3887 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3888 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3889 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3890 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3891 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3892 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3893 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3894 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3895 (c_parser_omp_for_loop): Add CODE argument, pass it through
3896 to c_finish_omp_for. Change last argument to cclauses,
3897 and adjust uses to grab parallel clauses from the array of all
3898 the split clauses. Adjust c_parser_binary_expression,
3899 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3900 (omp_split_clauses): New function.
3901 (c_parser_omp_simd): New function.
3902 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3903 Allow the function to be called also when parsing combined constructs,
3904 and call c_parser_omp_simd when parsing for simd.
3905 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3906 #pragma omp section, require exactly one structured-block instead of
3907 sequence of statements.
3908 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3909 Allow the function to be called also when parsing combined constructs.
3910 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3911 Allow the function to be called also when parsing combined
3912 constructs.
3913 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3914 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3915 c_parser_omp_teams, c_parser_omp_target_data,
3916 c_parser_omp_target_update, c_parser_omp_target,
3917 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3918 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3919 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3920 (c_parser_omp_construct): Add p_name and mask vars. Handle
3921 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3922 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3923 and c_parser_omp_sections callers.
3924 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3925 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3926 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3927 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3928 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3929 OMP_CLAUSE_DEPEND.
3930 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3931 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3932 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3933 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3934 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3935 * c-typeck.c: Include tree-inline.h.
3936 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3937 handle_omp_array_sections_1, handle_omp_array_sections,
3938 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3939 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3940 user defined reductions.
3941 (c_tree_equal): New function.
3942 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3943 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3944 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3945 c_check_omp_declare_reduction_r): New prototypes.
3946 * c-decl.c (current_omp_declare_target_attribute): New variable.
3947 (c_decl_attributes): New function.
3948 (start_decl, start_function): Use it instead of decl_attributes.
3949 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3950 c_omp_reduction_decl, c_omp_reduction_lookup,
3951 c_check_omp_declare_reduction_r): New functions.
3952
0a6c2227
TT
39532013-09-25 Tom Tromey <tromey@redhat.com>
3954
3955 * Make-lang.in (c/gccspec.o): Remove.
3956 (CFLAGS-c/gccspec.o): New variable.
3957 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3958 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3959 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3960
f3bc55f0
TT
39612013-09-25 Tom Tromey <tromey@redhat.com>
3962
3963 * Make-lang.in (c/gccspec.o): Don't use subshell.
3964
a24d975c
MP
39652013-09-18 Marek Polacek <polacek@redhat.com>
3966
3967 PR sanitize/58443
3968 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3969 Remove unnecessary check.
3970
ce6923c5
MP
39712013-09-18 Marek Polacek <polacek@redhat.com>
3972
3973 PR sanitizer/58411
3974 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3975 no_sanitize_undefined attribute.
3976
a1e51df9
KT
39772013-09-13 Kai Tietz <ktietz@redhat.com>
3978
3979 PR target/57848
3980 * c-decl.c (c_builtin_function_ext_scope): Remove
3981 wrong assumption that it is never called on prexisting
3982 symbol.
3983
0af94e6f
JR
39842013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3985
3986 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3987
20059c8b
GDR
39882013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3989
3990 * c-objc-common.c (c_tree_printer): Tidy.
3991
de5a5fa1
MP
39922013-08-30 Marek Polacek <polacek@redhat.com>
3993
3994 * c-typeck.c (build_binary_op): Add division by zero and shift
3995 instrumentation.
3996
2531a1d9 39972013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 3998 Joseph Myers <joseph@codesourcery.com>
2531a1d9 3999
6e2bcc98 4000 PR c/35649
2531a1d9
JR
4001 * c-typeck.c (c_common_type): Prefer double_type_node over
4002 other REAL_TYPE types with the same precision.
4003 (convert_arguments): Likewise.
4004
025311c4
GDR
40052013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4006
4007 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4008 (c_initialize_diagnostics): Call a destructor for the early printer.
4009
da6ca2b5
GDR
40102013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4011
4012 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4013 printer initialization.
4014
318cda85 40152013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4016
318cda85
BI
4017 PR c/57490
4018 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4019 check for truth values.
4020 (expand_array_notation_exprs): Added truth values case. Removed an
4021 unwanted else. Added for-loop to walk through subtrees in default
4022 case.
4023
b066401f
GDR
40242013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4025
4026 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4027
fb48aadc
JM
40282013-07-23 Joseph Myers <joseph@codesourcery.com>
4029
4030 * c-parser.c (struct c_generic_association): Fix typo.
4031
433cc7b0
TT
40322013-07-23 Tom Tromey <tromey@redhat.com>
4033 Joseph Myers <joseph@codesourcery.com>
4034
4035 * c-parser.c (struct c_generic_association): New.
4036 (c_generic_association_d): New typedef.
4037 (c_parser_generic_selection): New function.
4038 (c_parser_postfix_expression): Handle RID_GENERIC.
4039
26d40c3d
JM
40402013-07-13 Jason Merrill <jason@redhat.com>
4041
4042 PR c++/57793
4043 * c-decl.c (finish_struct): Check for too-large class.
4044
ecdbd01a 40452013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4046
4047 PR c/57821
4048 * c-typeck.c (set_init_index): When folding, check for index overflow.
4049
1141ed3f
BI
40502013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4051
4052 * c-parser.c (c_parser_array_notation): Removed rejection of array
4053 notations in an array of function pointers.
4054
713b46fa
BI
40552013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4056
4057 * c-array-notation.c (make_triplet_val_inv): New function.
4058 (create_cmp_incr): Likewise.
4059 (create_array_refs): Likewise.
4060 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4061 Also modularized common parts between functions and called the function.
4062 (build_array_notation_expr): Likewise.
4063 (fix_conditional_array_notations_1): Likewise.
4064 (fix_array_notation_expr): Likewise.
4065 (fix_array_notation_call_expr): Likewise.
4066
92f20202
MP
40672013-06-18 Marek Polacek <polacek@redhat.com>
4068
4069 PR c/57630
4070 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4071
73a23b06
BI
40722013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4073
4074 * c-array-notation.c (build_array_notation_expr): Reject array notation
4075 mismatch between LHS and RHS even inside a call_expr. Also, removed
4076 a couple while statements that were dead code.
4077
00b8517d
BI
40782013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4079
4080 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4081 excessive precision expressions in function parameters. Also removed
4082 couple unwanted while statements.
4083
1509bdda
BI
40842013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4085
4086 * c-array-notation.c (expand_array_notation_exprs): Added
4087 ARRAY_NOTATION_REF case.
4088
d60f1706
BI
40892013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4090
4091 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4092 function to c-family/array-notation-common.c.
4093 (is_cilkplus_reduce_builtin): Likewise.
4094 (find_rank): Likewise.
4095 (extract_array_notation_exprs): Likewise.
4096 (replace_array_notations): Likewise.
4097 (find_inv_trees): Likewise.
4098 (replace_inv_trees): Likewise.
4099 (contains_array_notation_expr): Likewise.
4100 (find_correct_array_notation_type): Likewise.
4101 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4102 (struct inv_list): Moved this to c-family/array-notation-common.c.
4103 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4104
6d6efbb3
BI
41052013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4106
4107 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4108 reduction functions outside the for-loop. Added a check if the fundecl
4109 is non-NULL. Finally, removed an unwanted if-statement, and made the
4110 body unconditional.
4111
25c22937
BI
41122013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4113
4114 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4115 condition of the if-statement matches the rank of else-block and then-
4116 block when array notations are used.
4117 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4118 expression after the entire function body is parsed.
4119 (c_parser_expr_no_commas): Delayed creating array notation expressions
4120 to the end of function parsing.
4121 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4122 whole if-statement instead of just the condition.
4123 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4124
edd25645
BI
41252013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4126
4127 PR c/57474
4128 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4129 array to NULL_TREE if they are unused. Also added a check for the
4130 field to be NULL before its fields are used in future.
4131
065ce7f1
RO
41322013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4133
4134 PR bootstrap/57450
4135 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4136 (build_array_notation_expr): Likewise.
4137
36536d79
BI
41382013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4139
4140 * c-typeck.c (build_array_ref): Added a check to see if array's
4141 index is greater than one. If true, then emit an error.
4142 (build_function_call_vec): Exclude error reporting and checking
4143 for builtin array-notation functions.
4144 (convert_arguments): Likewise.
4145 (c_finish_return): Added a check for array notations as a return
4146 expression. If true, then emit an error.
4147 (c_finish_loop): Added a check for array notations in a loop
4148 condition. If true then emit an error.
4149 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4150 (build_binary_op): Added a check for array notation expr inside
4151 op1 and op0. If present, we call another function to find correct
4152 type.
4153 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4154 * c-parser.c (c_parser_compound_statement): Check if array
4155 notation code is used in tree, if so, then transform them into
4156 appropriate C code.
4157 (c_parser_expr_no_commas): Check if array notation is used in LHS
4158 or RHS, if so, then build array notation expression instead of
4159 regular modify.
4160 (c_parser_postfix_expression_after_primary): Added a check for
4161 colon(s) after square braces, if so then handle it like an array
4162 notation. Also, break up array notations in unary op if found.
4163 (c_parser_direct_declarator_inner): Added a check for array
4164 notation.
4165 (c_parser_compound_statement): Added a check for array notation in
4166 a stmt. If one is present, then expand array notation expr.
4167 (c_parser_if_statement): Likewise.
4168 (c_parser_switch_statement): Added a check for array notations in
4169 a switch statement's condition. If true, then output an error.
4170 (c_parser_while_statement): Similarly, but for a while.
4171 (c_parser_do_statement): Similarly, but for a do-while.
4172 (c_parser_for_statement): Similarly, but for a for-loop.
4173 (c_parser_unary_expression): Check if array notation is used in a
4174 pre-increment or pre-decrement expression. If true, then expand
4175 them.
4176 (c_parser_array_notation): New function.
4177 * c-array-notation.c: New file.
4178 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4179
cd192ccc
MS
41802013-05-23 Mike Stump <mikestump@comcast.net>
4181
4182 * c-typeck.c (convert_for_assignment): Handle references to memory
4183 spaces better.
4184
427b248d
JM
41852013-05-16 Jason Merrill <jason@redhat.com>
4186
4187 * Make-lang.in (cc1$(exeext)): Use link mutex.
4188
44d90fe1
PC
41892013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4190
4191 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4192 to simply use OPT_Wpointer_arith.
4193 (build_unary_op): Likewise.
4194
4e7d7b3d
JJ
41952013-04-03 Jakub Jelinek <jakub@redhat.com>
4196
4197 PR c/19449
4198 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4199 argument. If set, or it temporarily for parsing of the first
4200 argument into force_folding_builtin_constant_p.
4201 (c_parser_postfix_expression): Adjust callers.
4202
839b422f
RB
42032013-03-21 Richard Biener <rguenther@suse.de>
4204
4205 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4206 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4207
2ee028f1
MP
42082013-02-12 Marek Polacek <polacek@redhat.com>
4209
4210 PR c/44938
4211 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4212 origtypes to NULL.
4213
8824edff
JJ
42142013-01-24 Jakub Jelinek <jakub@redhat.com>
4215
4216 PR c/56078
4217 * c-typeck.c (set_nonincremental_init_from_string): If
4218 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4219 returned false.
4220 (process_init_element): Likewise.
4221
eadd3d0d
JJ
42222012-12-20 Jakub Jelinek <jakub@redhat.com>
4223
4224 PR c++/55619
4225 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4226 argument, don't call default_function_array_conversion
4227 nor c_fully_fold here.
4228 (c_parser_asm_statement): Adjust callers.
4229 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4230 and outputs here, and call default_function_array_conversion
4231 on inputs that don't need to be addressable.
4232
f8a93a2e
JJ
42332012-12-18 Jakub Jelinek <jakub@redhat.com>
4234
4235 PR c/39464
4236 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4237 warning require that both c_common_unsigned_type as well as
4238 c_common_signed_type is the same for both mvl and mvr types.
4239
9771b263
DN
42402012-11-16 Diego Novillo <dnovillo@google.com>
4241
4242 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4243
4244 * c-common.c: Use new vec API in vec.h.
4245 * c-common.h: Likewise.
4246 * c-gimplify.c: Likewise.
4247 * c-pragma.c: Likewise.
4248 * c-pretty-print.c: Likewise.
4249 * c-pretty-print.h: Likewise.
4250 * c-semantics.c: Likewise.
4251 * c-decl.c: Likewise.
4252 * c-parser.c: Likewise.
4253 * c-tree.h: Likewise.
4254 * c-typeck.c: Likewise.
4255
880661a4
JW
42562012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4257
4258 PR c++/54930
4259 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4260
077d1abe
MLI
42612012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4262
4263 PR c/53066
4264 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4265 shadows a function, unless the variable is a function or a
4266 pointer-to-function.
4267
3a785c97
JJ
42682012-10-12 Jakub Jelinek <jakub@redhat.com>
4269
4270 PR c/54381
4271 * c-parser.c (struct c_tree_loc_pair): Removed.
4272 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4273 add location_t * and tree * arguments, fill in array of 3
4274 sizeof_arg trees and corresponding locs.
4275 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4276 c_parser_expr_list callers.
4277 (c_parser_postfix_expression_after_primary): Likewise. Pass
4278 array of 3 sizeof_arg trees and locs (corresponding to first
4279 3 arguments) to sizeof_pointer_memaccess_warning.
4280
703c8606
LC
42812012-10-09 Lawrence Crowl <crowl@google.com>
4282
4283 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4284 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4285 hash table.
4286
5d9de0d0
PC
42872012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4288
4289 PR c++/54194
4290 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4291 call.
4292
a212e43f
MG
42932012-10-09 Marc Glisse <marc.glisse@inria.fr>
4294
4295 PR c++/54427
4296 * c-typeck.c: Include c-common.h.
4297 (enum stv_conv): Moved to c-common.h.
4298 (scalar_to_vector): Moved to c-common.c.
4299 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4300 * Make-lang.in: c-typeck.c depends on c-common.h.
4301
3b78de56
AC
43022012-10-04 Arnaud Charlet <charlet@adacore.com>
4303
4304 * c-decl.c (c_write_global_declarations): Fix handling of
4305 -fdump-ada-spec*.
4306
78c60e3d
SS
43072012-09-30 Sharad Singhai <singhai@google.com>
4308
4309 * c-decl.c (c_write_global_declarations): Use a different method
4310 to determine if the dump has ben initialized.
4311
9f33203d
JM
43122012-09-14 Joseph Myers <joseph@codesourcery.com>
4313
4314 PR c/54552
4315 * c-typeck.c (c_cast_expr): When casting to a type requiring
4316 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4317 c_fully_fold first.
4318
a27d595d
JM
43192012-09-14 Joseph Myers <joseph@codesourcery.com>
4320
4321 PR c/54103
4322 * c-typeck.c (build_unary_op): Pass original argument of
4323 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4324 any C_MAYBE_CONST_EXPR, if it has integer operands.
4325 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4326 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4327 to c_objc_common_truthvalue_conversion, then remove any
4328 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4329 c_objc_common_truthvalue_conversion not
4330 c_common_truthvalue_conversion.
4331 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4332 call note_integer_operands for arguments with integer operands
4333 that are not integer constants.
4334
9feb29df
JJ
43352012-09-13 Jakub Jelinek <jakub@redhat.com>
4336
4337 PR c/54559
4338 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4339 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4340
d409320c
JJ
43412012-08-31 Jakub Jelinek <jakub@redhat.com>
4342
4343 PR c/54428
4344 * c-convert.c (convert): Don't call fold_convert_loc if
4345 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4346 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4347 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4348
6265d07c
JJ
43492012-08-24 Jakub Jelinek <jakub@redhat.com>
4350
4351 PR c/54355
4352 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4353 for nested and empty_ok arguments in the call to
4354 c_parser_declaration_or_fndef.
4355
1a4049e7
JJ
43562012-08-17 Jakub Jelinek <jakub@redhat.com>
4357
4358 * c-tree.h (c_last_sizeof_arg): Declare.
4359 * c-parser.c (struct c_tree_loc_pair): New type.
4360 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4361 non-NULL.
4362 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4363 (c_parser_postfix_expression_after_primary): Likewise. Call
4364 sizeof_pointer_memaccess_warning if needed.
4365 (sizeof_ptr_memacc_comptypes): New function.
4366 * c-typeck.c (c_last_sizeof_arg): New global variable.
4367 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4368
0229aee9
UB
43692012-07-24 Uros Bizjak <ubizjak@gmail.com>
4370
4371 * c-lang.h (lang_decl): Add variable_size GTY option.
4372
7ee2468b
SB
43732012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4374
4375 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4376 * Make-lang.in: Fix dependencies.
4377
d4a10d0a
SB
43782012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4379
4380 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4381 and add language Makefile hooks.
4382 * config-lang.in: New file.
4383 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4384 add the required "normal" config-lang.in rules.
4385 * c-lang.h: Moved from gcc/ to here.
4386 * c-tree.h: Likewise.
4387 * c-objc-common.c: Likewise.
4388 * c-objc-common.h: Likewise.
4389 * c-typeck.c: Likewise.
4390 * c-convert.c: Likewise.
4391 * c-lang.c: Likewise.
4392 * c-aux-info.c: Likewise.
4393 * c-errors.c: Likewise.
4394 * gccspec.c: Likewise.
4395 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4396 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4397\f
cbe34bb5 4398Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4399
4400Copying and distribution of this file, with or without modification,
4401are permitted in any medium without royalty provided the copyright
4402notice and this notice are preserved.