]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR fortran/78670 ([F03] Incorrect file position with namelist read under DTIO)
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
a9e4a1a5
JJ
12017-03-27 Jakub Jelinek <jakub@redhat.com>
2
3 PR middle-end/80162
4 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
5 * c-typeck.c (c_mark_addressable): Likewise. Look through
6 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
7 to ARRAY_TYPE.
8 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
9
ee3ff394
MP
102017-03-23 Marek Polacek <polacek@redhat.com>
11
12 * c-tree.h: Remove a C_RID_YYCODE reference.
13
4d1b8e70
JJ
142017-03-21 Jakub Jelinek <jakub@redhat.com>
15
16 PR c/80097
17 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
18 optional COMPOUND_EXPR with ubsan instrumentation.
19
31dc71a8
MP
202017-03-17 Marek Polacek <polacek@redhat.com>
21
22 * c-parser.c: Add C11 references.
23
d579c385
MP
242017-03-15 Marek Polacek <polacek@redhat.com>
25
26 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
27
85059a38
MP
282017-03-11 Marek Polacek <polacek@redhat.com>
29
30 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
31
2f6f187a
DM
322017-03-10 David Malcolm <dmalcolm@redhat.com>
33
34 PR translation/79848
35 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
36 "%qs".
37 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
38
36618428
MP
392017-03-09 Marek Polacek <polacek@redhat.com>
40
41 PR sanitizer/79757
42 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
43 parameter declarations with initializers.
44
01e5af5a
JJ
452017-03-09 Jakub Jelinek <jakub@redhat.com>
46
47 PR c/79969
48 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
49 TYPE_STUB_DECL.
50
a71dbc63
JJ
512017-03-07 Jakub Jelinek <jakub@redhat.com>
52
53 PR c/79834
54 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
55 for "may only be used in compound statements" diagnostics, change it
56 such that the same translatable string is used for all pragmas. For
57 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
58 diagnostics.
59 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
60 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
61 "may only be used in compound statements" diagnostics, such that the
62 same translatable string is used for all pragmas.
63
1ff4bae6
MP
642017-03-04 Marek Polacek <polacek@redhat.com>
65
66 PR c/79847
67 * c-decl.c (implicit_decl_warning): Add missing space.
68
7f5a7d78
MP
692017-03-03 Marek Polacek <polacek@redhat.com>
70
71 PR c/79758
72 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
73 current_function_prototype_arg_types is error_mark_node. Fix
74 formatting. Use TREE_VALUE instead of TREE_TYPE.
75
883c8f06
JJ
762017-03-03 Jakub Jelinek <jakub@redhat.com>
77
79c9b7a8
JJ
78 PR c/79837
79 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
80 %<min%> or %<max%> in the diagnostics, instead mention identifier.
81 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
82 diagnostics.
83
883c8f06
JJ
84 PR c/79836
85 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
86 instead of %<_Generic>.
87 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
88 (c_parser_omp_target_exit_data): Use %<release%> instead of
89 %<release>.
90
324ff1a0
JJ
912017-02-28 Jakub Jelinek <jakub@redhat.com>
92
93 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
94 instead of just cond ? "..." : "...".
95 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
96 for "enter"/"exit" keyword.
97 (c_finish_oacc_routine): Don't use %s to supply portions of the
98 message.
99
4227c9ad
JJ
1002017-02-24 Jakub Jelinek <jakub@redhat.com>
101
102 PR c++/79588
103 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
104 handle -Wrestrict here.
105 * c-typeck.c (build_function_call_vec): Adjust
106 check_function_arguments caller.
107
5d972e66
RB
1082017-02-23 Richard Biener <rguenther@suse.de>
109
110 PR c/79684
111 * gimple-parser.c (c_parser_gimple_statement): Use set_error
112 to initialize c_exprs to return.
113 (c_parser_gimple_binary_expression): Likewise.
114 (c_parser_gimple_unary_expression): Likewise.
115 (c_parser_gimple_postfix_expression): Likewise.
116
61ac5ebe
MP
1172017-02-22 Marek Polacek <polacek@redhat.com>
118
119 PR c/79662
120 * c-typeck.c (convert_arguments): Handle error_mark_node.
121
41d1b0b1
PK
1222017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
123
124 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
125 value of c_parser_parse_ssa_name against error_mark_node and emit
126 error if ssa name is anonymous and written as default definition.
127
eab1f169
PK
1282017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
129
130 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
131 FMA_EXPR.
132
bcac0b4d
JJ
1332017-02-16 Jakub Jelinek <jakub@redhat.com>
134
135 PR c++/79512
136 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
137 ignore #pragma omp target even when not followed by identifier.
138
1be33173
PK
1392017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
140
141 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
142 (c_parser_gimple_unary_expression): Likewise.
143
aa326bfb
JJ
1442017-02-13 Jakub Jelinek <jakub@redhat.com>
145
146 * c-parser.c (c_parser_oacc_declare): Add missing space in
147 diagnostics.
148
8a398bc5
PK
1492017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
150
151 PR c/79478
152 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
153 set_c_expr_source_range when parsing ssa-name.
154
3dcde5ef
PG
1552017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
156 Richard Biener <rguenther@suse.de>
157
158 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
159 building IL when arguments are error_mark_node.
160 (c_parser_gimple_unary_expression): Likewise.
161 (c_parser_gimple_if_stmt): Likewise.
162 (c_parser_gimple_switch_stmt): Likewise.
163 (c_parser_gimple_return_stmt): Likewise.
164 (c_parser_parse_ssa_name): When name lookup fails do not build
165 an SSA name. Use undeclared rather than not declared in error
166 reporting.
167
192b048b
MP
1682017-02-09 Marek Polacek <polacek@redhat.com>
169
170 PR c/79428
171 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
172 instead of c_parser_skip_until_found.
173
56f71478
JJ
1742017-02-09 Jakub Jelinek <jakub@redhat.com>
175
176 PR c/79431
177 * c-parser.c (c_parser_omp_declare_target): Don't invoke
178 symtab_node::get on automatic variables.
179
02889d23
CLT
1802016-02-09 Nathan Sidwell <nathan@codesourcery.com>
181 Chung-Lin Tang <cltang@codesourcery.com>
182
183 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
184 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
185 semantic checking.
186 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
187
7af4b20d
RB
1882017-02-07 Richard Biener <rguenther@suse.de>
189
190 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
191 (c_parser_gimple_postfix_expression_after_primary):
192 Do not use c_build_function_call_vec to avoid folding and promotion.
193 Simplify.
194
e5e391d6
MO
1952017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
196
197 PR lto/79061
198 * c-decl.c (pop_scope): Pass main_input_filename to
199 build_translation_unit_decl.
200
c2e84327
DM
2012017-01-24 David Malcolm <dmalcolm@redhat.com>
202
203 * c-parser.c: Include "read-rtl-function.h" and
204 "run-rtl-passes.h".
205 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
206 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
207 production. Update for renaming of field "gimple_pass" to
208 "gimple_or_rtl_pass". If __RTL was seen, call
209 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
210 to an auto_timevar, to cope with early exit.
211 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
212 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
213 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
214 Handle RID_RTL.
215 (c_parser_parse_rtl_body): New function.
216 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
217 (struct c_declspecs): Rename field "gimple_pass" to
218 "gimple_or_rtl_pass". Add field "rtl_p".
219 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
220 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
221 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
222 (c_parser_gimple_or_rtl_pass_list): ...this.
223
2ebd93e1
MP
2242017-01-20 Marek Polacek <polacek@redhat.com>
225
226 PR c/64279
227 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
228
b1c95bb5
RB
2292017-01-13 Richard Biener <rguenther@suse.de>
230
231 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
232 nops.
233
25329913
RB
2342017-01-13 Richard Biener <rguenther@suse.de>
235
236 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
237 _Literal ( type-name ) number.
238
6bb4ea5c
RB
2392017-01-12 Richard Biener <rguenther@suse.de>
240
241 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
242 __MEM.
243
6b5b4e9c
JJ
2442017-01-11 Jakub Jelinek <jakub@redhat.com>
245
246 PR c++/72813
247 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
248 PCH file.
249
e3252775
RB
2502017-01-11 Richard Biener <rguenther@suse.de>
251
252 PR bootstrap/79052
253 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
254 returns on parse errors.
255
a9342885
MP
2562017-01-04 Marek Polacek <polacek@redhat.com>
257
258 PR c++/64767
259 * c-parser.c (c_parser_postfix_expression): Mark zero character
260 constants by setting original_type in c_expr.
261 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
262 with a zero character constant.
263 (char_type_p): New function.
264
5dd9a9d0
DM
2652017-01-04 David Malcolm <dmalcolm@redhat.com>
266
267 * c-parser.c (c_parser_declaration_or_fndef): Create a
268 rich_location at init_loc and parse it to start_init.
269 (last_init_list_comma): New global.
270 (c_parser_braced_init): Update last_init_list_comma when parsing
271 commas. Pass it to pop_init_level. Pass location of closing
272 brace to pop_init_level.
273 (c_parser_postfix_expression_after_paren_type): Create a
274 rich_location at type_loc and parse it to start_init.
275 (c_parser_omp_declare_reduction): Likewise for loc.
276 * c-tree.h (start_init): Add rich_location * param.
277 (pop_init_level): Add location_t param.
278 * c-typeck.c (struct initializer_stack): Add field
279 "missing_brace_richloc".
280 (start_init): Add richloc param, use it to initialize
281 the stack node's missing_brace_richloc.
282 (last_init_list_comma): New decl.
283 (finish_implicit_inits): Pass last_init_list_comma to
284 pop_init_level.
285 (push_init_level): When finding missing open braces, add fix-it
286 hints to the richloc.
287 (pop_init_level): Add "insert_before" param and pass it
288 when calling pop_init_level. Add fixits about missing
289 close braces to any richloc. Use the richloc for the
290 -Wmissing-braces warning.
291 (set_designator): Pass last_init_list_comma to pop_init_level.
292 (process_init_element): Likewise.
293
cbe34bb5
JJ
2942017-01-01 Jakub Jelinek <jakub@redhat.com>
295
296 Update copyright years.
297
d17680f3
JJ
2982016-12-21 Jakub Jelinek <jakub@redhat.com>
299
0dba7960
JJ
300 PR bootstrap/78817
301 * c-typeck.c (build_function_call_vec): If check_function_arguments
302 returns true, set TREE_NO_WARNING on CALL_EXPR.
303
d17680f3
JJ
304 PR c/77767
305 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
306 to *expr instead of overwriting it.
307
aa90531e
RB
3082016-12-20 Richard Biener <rguenther@suse.de>
309
310 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
311 error recovery.
312 (c_parser_gimple_statement): Only build assigns for non-error
313 stmts.
314 (c_parser_gimple_postfix_expression_after): Improve error recovery.
315
629b3d75
MJ
3162016-12-14 Martin Jambor <mjambor@suse.cz>
317
318 * c-parser.c: Include omp-general.h and omp-offload.h instead of
319 omp-low.h.
320 (c_finish_oacc_routine): Adjusted call to
321 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
322 to use their new names.
323 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
324 use its new name.
325 (c_parser_oacc_update): Likewise.
326 (c_parser_omp_simd): Likewise.
327 (c_parser_omp_target_update): Likewise.
328 * c-typeck.c: Include omp-general.h instead of omp-low.h.
329 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
330 name.
331 (c_finish_omp_cancellation_point): Likewise.
332 * gimple-parser.c: Do not include omp-low.h
333
c5af52eb
CP
3342016-12-02 Cesar Philippidis <cesar@codesourcery.com>
335 James Norris <jnorris@codesourcery.com>
336
337 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
338 EXIT_DATA,WAIT} are not used in compound statements.
339 (c_parser_oacc_enter_exit_data): Update diagnostics.
340
48330c93
BE
3412016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
342
343 PR c++/71973
344 * c-decl.c (diagnose_mismatched_decls): Use
345 OPT_Wbuiltin_declaration_mismatch here too.
346
899ca90e 3472016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
348 Alan Hayward <alan.hayward@arm.com>
349 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
350
351 * c-decl.c (merge_decls): Use SET_DECL_MODE.
352 (make_label, finish_struct): Likewise.
353
1ee62b92 3542016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 355 Richard Biener <rguenther@suse.de>
22b15758 356
8e745a17
JJ
357 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
358 * config-lang.in (gtfiles): Add c/c-parser.h.
359 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
360 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
361 * c-parser.c (enum c_id_kind, struct c_token,
362 c_parser_next_token_is, c_parser_next_token_is_not,
363 c_parser_next_token_is_keyword,
364 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
365 Split out to ...
366 * c-parser.h: ... new header.
367 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 368 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
369 c_token_starts_typename, c_parser_next_token_starts_declspecs,
370 c_parser_next_tokens_start_declaration, c_parser_consume_token,
371 c_parser_error, c_parser_require, c_parser_skip_until_found,
372 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
373 c_parser_type_name): Export.
374 (c_parser_tokens_buf): New function.
375 (c_parser_error): Likewise.
376 (c_parser_set_error): Likewise.
377 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
378 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
379 via c_parser_parse_gimple_body.
8e745a17
JJ
380 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
381 c_token_starts_typename, c_parser_next_token_starts_declspecs,
382 c_parser_next_tokens_start_declaration, c_parser_consume_token,
383 c_parser_error, c_parser_require, c_parser_skip_until_found,
384 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
385 c_parser_type_name): Declare.
1ee62b92
PG
386 (struct c_parser): Declare forward.
387 (c_parser_tokens_buf): Declare.
8e745a17
JJ
388 (c_parser_error): Likewise.
389 (c_parser_set_error): Likewise.
390 * gimple-parser.c: New file.
391 * gimple-parser.h: Likewise.
1ee62b92 392
22b15758
UB
3932016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
394
395 PR c/35503
396 * c-parser.c (c_parser_postfix_expression_after_primary): Call
397 warn_for_restrict.
398
84ff4775
LCW
3992016-09-11 Le-Chun Wu <lcwu@google.com>
400 Mark Wielaard <mjw@redhat.com>
401
402 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
403 to the given -Wshadow= variant.
404
4d0cdd0c
TP
4052016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
406
407 * c-typeck.c: Include memmodel.h.
408
1202f33e
JJ
4092016-10-13 Jakub Jelinek <jakub@redhat.com>
410
411 PR target/77957
412 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
413 instead of lhd_return_null_tree_v.
414
8a14afd0
BS
4152016-10-07 Bernd Schmidt <bschmidt@redhat.com>
416
417 PR c++/69733
418 * c-decl.c (smallest_type_quals_location): New static function.
419 (grokdeclarator): Try to find the correct location for an ignored
420 qualifier.
421
81fea426
MP
4222016-09-26 Marek Polacek <polacek@redhat.com>
423
424 PR c/7652
425 * c-decl.c (pop_scope): Add gcc_fallthrough.
426
4272016-09-26 Marek Polacek <polacek@redhat.com>
428
429 PR c/7652
430 * c-parser.c (struct c_token): Add flags field.
431 (c_lex_one_token): Pass it to c_lex_with_flags.
432 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
433 into IFN_FALLTHROUGH.
434 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
435 attribute fallthrough after a case label or default label.
436 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
437
9a2300e9
MP
4382016-09-24 Marek Polacek <polacek@redhat.com>
439
440 PR c/77490
441 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
442 have boolean value. Warn about ++/-- on booleans.
443
7de76362
JJ
4442016-09-23 Jakub Jelinek <jakub@redhat.com>
445
446 * c-parser.c (incomplete_record_decls): Remove unnecessary
447 = vNULL initialization of file scope vec.
448
5b73d2ab
MP
4492016-09-16 Marek Polacek <polacek@redhat.com>
450
451 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
452
e51fbec3
MP
4532016-09-14 Marek Polacek <polacek@redhat.com>
454
455 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
456 (fix_array_notation_expr): Likewise.
457 * c-decl.c (finish_decl): Likewise.
458 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
459 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
460 (function_to_pointer_conversion): Use false instead of 0.
461 (convert_lvalue_to_rvalue): Likewise.
462 (parser_build_unary_op): Likewise.
463 (build_atomic_assign): Likewise.
464 (build_unary_op): Change nonconvert parameter type to bool, use
465 true/false instead of 1/0.
466 (build_binary_op): Use true instead of 1.
467
254830ba
DM
4682016-09-13 David Malcolm <dmalcolm@redhat.com>
469
470 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
471 of add_fixit_insert to add_fixit_insert_before.
472
4c13ba17
MP
4732016-09-13 Marek Polacek <polacek@redhat.com>
474
475 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
476 it.
477
54dcdb88
BE
4782016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
479
480 PR c++/77496
481 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
482 COMPOUND_EXPR to warn_for_omitted_condop.
483
e5106e27
DM
4842016-09-07 David Malcolm <dmalcolm@redhat.com>
485
486 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
487 c_get_substring_location for this new langhook.
488
9dc5773f
JJ
4892016-09-02 Jakub Jelinek <jakub@redhat.com>
490
491 PR c/65467
492 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
493 flag_openmp.
494 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
495 instead of mark_exp_read on low_bound/length expression.
496 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
497 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
498 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
499 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
500 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
501 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
502 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
503 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
504 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
505 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
506 instead of mark_expr_read.
507 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
508 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
509 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
510 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
511 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
512 array section bases outside of depend clause, for depend clause
513 use convert_lvalue_to_rvalue on the base.
514 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
515 linear, aligned, map, to and from clauses.
516 (c_omp_clause_copy_ctor): New function.
517
295844f6
MP
5182016-09-01 Marek Polacek <polacek@redhat.com>
519
520 PR c/7652
521 * c-typeck.c (composite_type): Add FALLTHRU comment.
522
089af25c
DM
5232016-08-31 David Malcolm <dmalcolm@redhat.com>
524
525 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
526 to the insertion fixits for "struct", "union", and "enum".
527
f9087798
DM
5282016-08-30 David Malcolm <dmalcolm@redhat.com>
529
530 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
531 rather than add_fixit_misspelled_id.
532 (undeclared_variable): Likewise.
533 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
534 now-redundant "here" params from add_fixit_insert method calls.
535 (c_parser_parameter_declaration): Likewise.
536 * c-typeck.c (build_component_ref): Remove now-redundant range
537 param from add_fixit_replace method calls.
538
ebef225f
MP
5392016-08-25 Marek Polacek <polacek@redhat.com>
540
541 * c-typeck.c (parser_build_binary_op): Pass LHS to
542 warn_logical_not_parentheses.
543
fe377a48
MP
5442016-08-25 Marek Polacek <polacek@redhat.com>
545
546 PR c/77323
547 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
548 or _FloatN or _FloatNx is not supported.
549 (finish_declspecs): Set type to integer_type_node when _FloatN or
550 _FloatNx is not supported.
551
c65699ef
JM
5522016-08-19 Joseph Myers <joseph@codesourcery.com>
553
554 PR c/32187
555 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
556 (struct c_declspecs): Add field floatn_nx_idx.
557 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
558 and _FloatNx type specifiers.
559 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
560 (c_parser_declspecs, c_parser_attribute_any_word)
561 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
562 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
563 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
564 narrower than double.
565
2f1364c2
JJ
5662016-08-12 Jakub Jelinek <jakub@redhat.com>
567 Martin Liska <mliska@suse.cz>
568
569 PR c/67410
570 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
571 % to determine val element to change. Assert that
572 wchar_bytes * charwidth fits into val array.
573
191816a3
MP
5742016-08-12 Marek Polacek <polacek@redhat.com>
575
576 PR c/7652
577 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
578 (c_parser_postfix_expression): Likewise.
579 * c-typeck.c (build_unary_op): Adjust fall through comment.
580 (c_mark_addressable): Likewise.
581
b95a64bb
JJ
5822016-08-11 Jakub Jelinek <jakub@redhat.com>
583
584 PR c/72816
585 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
586 array member through typedef, for orig_qual_indirect == 0 clear
587 orig_qual_type.
588
895aa8e1
DM
5892016-08-08 David Malcolm <dmalcolm@redhat.com>
590
591 PR c/64955
592 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
593 this up to selftest::run_c_tests.
594 (selftest::run_c_tests): New function.
595
0b212d8c
TS
5962016-08-04 Thomas Schwinge <thomas@codesourcery.com>
597
ae9281fc
TS
598 * c-parser.c (struct oacc_routine_data): Add error_seen and
599 fndecl_seen members.
600 (c_finish_oacc_routine): Use these.
601 (c_parser_declaration_or_fndef): Adjust.
602 (c_parser_oacc_routine): Likewise. Support more C language
603 constructs, and improve diagnostics. Move pragma context
604 checking...
605 (c_parser_pragma): ... here.
606
0b212d8c
TS
607 * c-parser.c (struct oacc_routine_data): New.
608 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
609 Simplify code.
610 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
611 declare target" attribute.
612
76e2c821
JB
6132016-08-01 Jan Beulich <jbeulich@suse.com>
614
615 * c-fold.c (c_fully_fold_internal): Also emit shift count
616 warnings for vector types.
617 * c-typeck.c (build_binary_op): Likewise.
618
f618a472
MP
6192016-07-29 Marek Polacek <polacek@redhat.com>
620
621 PR c/71742
622 * c-decl.c (finish_struct): Rephrase an error message.
623
efd0786f
MP
624 PR c/71853
625 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
626 to error node for invalid code.
627
e00dceaf
MP
628 PR c/71573
629 * c-decl.c (implicitly_declare): Return decl early not only for
630 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
631
673a107a
JJ
6322016-07-29 Jakub Jelinek <jakub@redhat.com>
633
634 PR c/71969
635 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
636 on GNU extern inline functions.
637
a5b5c8b6
MP
6382016-07-29 Marek Polacek <polacek@redhat.com>
639
640 PR c/71583
641 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
642 check expr.value.
643
e3fe09c1
UB
6442016-07-22 Uros Bizjak <ubizjak@gmail.com>
645
646 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
647
7c8f7eaa
DM
6482016-07-20 David Malcolm <dmalcolm@redhat.com>
649
650 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
651 spellcheck-tree.h
652 (best_macro_match): Likewise, converting from a typedef to a
653 subclass.
654 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
655 (lookup_name_fuzzy): Update for change of best_macro_match to a
656 subclass with a ctor that calls cpp_forall_identifiers.
657
de6a69ee
DM
6582016-07-20 David Malcolm <dmalcolm@redhat.com>
659
660 * c-decl.c (implicit_decl_warning): Update for conversion of
661 return type of lookup_name_fuzzy to const char *.
662 (undeclared_variable): Likewise.
663 (lookup_name_fuzzy): Convert return type from tree to
664 const char *.
665 * c-parser.c (c_parser_declaration_or_fndef): Update for
666 conversion of return type of lookup_name_fuzzy to const char *.
667 (c_parser_parameter_declaration): Likewise.
668
b1c9c068
CP
6692016-07-15 Cesar Philippidis <cesar@codesourcery.com>
670
671 * c-parser.c (c_parser_oacc_declare): Don't scan for
672 GOMP_MAP_POINTER.
673 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
674 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
675 zero-length subarrays.
676
ddbbcb19
JJ
6772016-07-15 Jakub Jelinek <jakub@redhat.com>
678
679 PR c/71858
680 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
681 instead of FUZZY_LOOKUP_NAME.
682 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
683 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
684
dd36b877
JJ
6852016-07-14 Jakub Jelinek <jakub@redhat.com>
686
687 PR c/71858
688 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
689
8c681247
TS
6902016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
691
692 * c-parser.c (c_parser_generic_selection): Make type of variable
693 auto_vec.
694 (c_parser_omp_declare_simd): Likewise.
695
bf4fa671
TS
6962016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
697
698 * c-decl.c (struct c_struct_parse_info): Change member types
699 from vec to auto_vec.
700 (start_struct): Adjust.
701 (finish_struct): Likewise.
702
557e8c49
JJ
7032016-07-02 Jakub Jelinek <jakub@redhat.com>
704
705 PR c/71719
706 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
707
54d19c3b
TS
7082016-06-29 Thomas Schwinge <thomas@codesourcery.com>
709
710 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
711 Move pragma context checking into...
712 (c_parser_omp_cancellation_point): ... here, and improve
713 diagnostic messages.
714 * c-typeck.c (c_finish_omp_cancel)
715 (c_finish_omp_cancellation_point): Improve diagnostic messages.
716
152ef731
JJ
7172016-06-29 Jakub Jelinek <jakub@redhat.com>
718
719 PR c/71685
720 * c-typeck.c (c_build_qualified_type): Don't clear
721 C_TYPE_INCOMPLETE_VARS for the main variant.
722
7232016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
724
725 PR c/71552
726 * c-typeck.c (output_init_element): Diagnose incompatible types
727 before non-constant initializers.
728
e9ac1f86
JJ
7292016-06-28 Jakub Jelinek <jakub@redhat.com>
730
731 * Make-lang.in: Don't cat ../stage_current if it does not exist.
732
277d7ee0
AK
7332016-06-23 Andi Kleen <ak@linux.intel.com>
734
735 * Make-lang.in: Add support for autofdo.
736
1a4f11c8
DM
7372016-06-22 David Malcolm <dmalcolm@redhat.com>
738
739 PR c/70339
740 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
741 (implicit_decl_warning): When issuing warnings for implicit
742 declarations, attempt to provide a suggestion via
743 lookup_name_fuzzy.
744 (undeclared_variable): Likewise when issuing errors.
745 (lookup_name_in_scope): Likewise.
746 (struct edit_distance_traits<cpp_hashnode *>): New struct.
747 (best_macro_match): New typedef.
748 (find_closest_macro_cpp_cb): New function.
749 (lookup_name_fuzzy): New function.
750 * c-parser.c: Include gcc-rich-location.h.
751 (c_token_starts_typename): Split out case CPP_KEYWORD into...
752 (c_keyword_starts_typename): ...this new function.
753 (c_parser_declaration_or_fndef): When issuing errors about
754 missing "struct" etc, add a fixit. For other kinds of errors,
755 attempt to provide a suggestion via lookup_name_fuzzy.
756 (c_parser_parms_declarator): When looking ahead to detect typos in
757 type names, also reject CPP_KEYWORD.
758 (c_parser_parameter_declaration): When issuing errors about
759 unknown type names, attempt to provide a suggestion via
760 lookup_name_fuzzy.
761 * c-tree.h (c_keyword_starts_typename): New prototype.
762
5a578671
JM
7632016-06-20 Joseph Myers <joseph@codesourcery.com>
764
765 PR c/71601
766 * c-typeck.c (build_conditional_expr): Return error_mark_node if
767 c_common_type returns error_mark_node.
768
3f8257db 7692016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
770
771 PR c/69507
772 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
773 __alignof__ (expression).
774
6a3f203c
DM
7752016-06-14 David Malcolm <dmalcolm@redhat.com>
776
777 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
778
264757fb
DM
7792016-06-14 David Malcolm <dmalcolm@redhat.com>
780
781 * c-typeck.c (build_component_ref): Simplify fixit code by
782 using gcc_rich_location::add_fixit_misspelled_id.
783 (set_init_label): Likewise.
784
f7e4f2e3
DM
7852016-06-13 David Malcolm <dmalcolm@redhat.com>
786
787 * c-parser.c (c_parser_initelt): Provide location of name for new
788 location_t param of set_init_label.
789 * c-tree.h (set_init_label): Add location_t param.
790 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
791 param and use it when issuing error messages about unrecognized
792 field names. Attempt to provide a fixit hint if appropriate,
793 otherwise update the error message to provide the type name.
794
4b1ffdb1
TS
7952016-06-10 Thomas Schwinge <thomas@codesourcery.com>
796
797 PR c/71381
798 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
799 Loosen checking.
800
44a845ca
MS
8012016-06-08 Martin Sebor <msebor@redhat.com>
802 Jakub Jelinek <jakub@redhat.com>
803
804 PR c++/70507
805 PR c/68120
806 * c-typeck.c (convert_arguments): Don't promote last argument
807 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
808
92a5f2ba
MP
8092016-06-08 Marek Polacek <polacek@redhat.com>
810
811 PR c/71418
812 * c-decl.c (grokdeclarator): Check TYPE_P.
813
08203f73
MP
814 PR c/71426
815 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
816 code.
817
6ffd47b7
DM
8182016-06-07 David Malcolm <dmalcolm@redhat.com>
819
820 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
821 and structure element reference, capture the location of the
822 element name token and pass it to build_component_ref.
823 (c_parser_postfix_expression_after_primary): Likewise for
824 structure element dereference.
825 (c_parser_omp_variable_list): Likewise for
826 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
827 * c-tree.h (build_component_ref): Add location_t param.
828 * c-typeck.c (build_component_ref): Add location_t param
829 COMPONENT_LOC. Use it, if available, when issuing hints about
830 mispelled member names to provide a fixit replacement hint.
831
1f40cff3
MP
8322016-06-06 Marek Polacek <polacek@redhat.com>
833
834 PR c/71362
835 * c-parser.c (c_parser_direct_declarator): Set location.
836
5545a907
MP
8372016-06-06 Marek Polacek <polacek@redhat.com>
838
839 * c-typeck.c (comptypes_internal): Handle comparisons of
840 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
841 TYPE_REF_CAN_ALIAS_ALL.
842
b605f663
CLT
8432016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
844
845 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
846 arguments as addressable when async clause exists.
847
00631022
JJ
8482016-05-30 Jakub Jelinek <jakub@redhat.com>
849
850 PR c++/71349
851 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
852 when combined with target construct.
853
7211a097
JJ
8542016-05-26 Jakub Jelinek <jakub@redhat.com>
855
856 * c-parser.c (c_parser_omp_clause_schedule): Warn if
857 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
858
95efe6b6
MP
8592016-05-25 Marek Polacek <polacek@redhat.com>
860
861 PR c/71265
862 * c-decl.c (c_make_fname_decl): Don't check seen_error.
863
a23faf7a
MP
864 PR c/71266
865 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
866
e46c7770
CP
8672016-05-24 Cesar Philippidis <cesar@codesourcery.com>
868
869 * c-parser.c (c_parser_oacc_declare): Add support for
870 GOMP_MAP_FIRSTPRIVATE_POINTER.
871 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
872 argument with enum c_omp_region_type ort.
873 (handle_omp_array_sections): Likewise. Update call to
874 handle_omp_array_sections_1.
875 (c_finish_omp_clauses): Add specific errors and warning messages for
876 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
877 call to handle_omp_array_sections.
878
a04e69c0
TS
8792016-05-24 Thomas Schwinge <thomas@codesourcery.com>
880
881 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
882
f17a223d
RB
8832016-05-24 Richard Biener <rguenther@suse.de>
884
885 PR middle-end/70434
886 PR c/69504
887 * c-typeck.c (build_array_ref): Do not complain about indexing
888 non-lvalue vectors. Adjust for function name change.
889
79063edd
MS
8902016-05-20 Martin Sebor <msebor@redhat.com>
891
892 PR c/71115
893 * c-typeck.c (error_init): Use
894 expansion_point_location_if_in_system_header.
895 (warning_init): Same.
896
8a40fef3
DM
8972016-05-19 David Malcolm <dmalcolm@redhat.com>
898
899 PR c/71171
900 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
901 in error-handling.
902 (c_parser_postfix_expression): Likewise.
903 * c-tree.h (c_expr::set_error): New method.
904 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
905 that result's range is initialized.
906
e9892350
JG
9072016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
908
909 * c-typeck.c (parser_build_unary_op): Fix formatting.
910
8fad45f5
MW
9112016-05-16 Matthew Wahab <matthew.wahab@arm.com>
912
913 * c-decl.c (grokdeclarator): Remove errmsg and use of
914 targetm.invalid_return_type.
915 (grokparms): Remove errmsg and use of
916 targetm.invalid_parameter_type.
917
aa4b467b
JM
9182016-05-13 Joseph Myers <joseph@codesourcery.com>
919
920 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
921 function return type.
922
4f2e1536
MP
9232016-05-12 Marek Polacek <polacek@redhat.com>
924
925 PR c/70756
926 * c-decl.c (build_compound_literal): Pass LOC down to
927 c_incomplete_type_error.
928 * c-tree.h (require_complete_type): Adjust declaration.
929 (c_incomplete_type_error): Likewise.
930 * c-typeck.c (require_complete_type): Add location parameter, pass it
931 down to c_incomplete_type_error.
932 (c_incomplete_type_error): Add location parameter, pass it down to
933 error_at.
934 (build_component_ref): Pass location down to c_incomplete_type_error.
935 (default_conversion): Pass location down to require_complete_type.
936 (build_array_ref): Likewise.
937 (build_function_call_vec): Likewise.
938 (convert_arguments): Likewise.
939 (build_unary_op): Likewise.
940 (build_c_cast): Likewise.
941 (build_modify_expr): Likewise.
942 (convert_for_assignment): Likewise.
943 (c_finish_omp_clauses): Likewise.
944
d6e83a8d
MM
9452016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
946
947 PR c/43651
948 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
949 is enabled.
950 * c-errors.c (pedwarn_c90): Return true if warned.
951 * c-tree.h (pedwarn_c90): Change return type to bool.
952 (enum c_declspec_word): Add new enumerator cdw_atomic.
953
5c3a10fb
MP
9542016-05-11 Marek Polacek <polacek@redhat.com>
955
956 PR c++/71024
957 * c-decl.c (diagnose_mismatched_decls): Factor out code to
958 diagnose_mismatched_attributes and call it.
959
cf68d92c
MP
9602016-05-10 Marek Polacek <polacek@redhat.com>
961
962 PR c/70255
963 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
964 on a declaration following the definition.
965
351f85c5
JJ
9662016-05-05 Jakub Jelinek <jakub@redhat.com>
967
968 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
969 parse it through to c_parser_c99_block_statement.
970 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
971 caller.
972
deef7113
MP
9732016-05-04 Marek Polacek <polacek@redhat.com>
974
975 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
976 OPT_Wdangling_else.
977
de55efd5
MP
9782016-05-04 Marek Polacek <polacek@redhat.com>
979
980 PR c/48778
981 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
982 for macro expansions.
983
79ce98bc
MP
9842016-05-03 Marek Polacek <polacek@redhat.com>
985
986 PR c/70859
987 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
988 check_builtin_function_arguments.
989
fb2647aa
RB
9902016-05-03 Richard Biener <rguenther@suse.de>
991
992 * Make-lang.in (cc1-checksum.c): For stage-final re-use
993 the checksum from the previous stage.
994
77886428
CP
9952016-05-02 Cesar Philippidis <cesar@codesourcery.com>
996
997 * c-parser.c (c_parser_oacc_all_clauses): Update call to
998 c_finish_omp_clauses.
999 (c_parser_omp_all_clauses): Likewise.
1000 (c_parser_oacc_cache): Likewise.
1001 (c_parser_oacc_loop): Likewise.
1002 (omp_split_clauses): Likewise.
1003 (c_parser_omp_declare_target): Likewise.
1004 (c_parser_cilk_all_clauses): Likewise.
1005 (c_parser_cilk_for): Likewise.
1006 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1007 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1008
7176a4a0
MP
10092016-05-02 Marek Polacek <polacek@redhat.com>
1010
1011 PR c/70851
1012 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1013 incomplete type.
1014
e7ff0319
CP
10152016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1016
1017 PR middle-end/70626
1018 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1019 OACC_LOOP_CLAUSE_MASK.
1020 (c_parser_oacc_kernels_parallel): Update call to
1021 c_oacc_split_loop_clauses.
1022
9f405ce1
AM
10232016-04-28 Andrew MacLeod <amacleod@redhat.com>
1024
1025 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1026 argument to build_modify_expr in two cases.
1027
c1e1f433
BS
10282016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1029
1030 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1031 warn_for_memset instead of warning directly here.
1032
2448a956
MP
10332016-04-26 Marek Polacek <polacek@redhat.com>
1034
1035 PR c/67784
1036 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1037 out of ...
1038 (c_parser_for_statement): ... here.
1039 (c_parser_if_statement): Use it.
1040 (c_parser_switch_statement): Use it.
1041 (c_parser_while_statement): Use it.
1042
b02a5e26
MP
1043 PR c/70791
1044 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1045
477d4906
IV
10462016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1047
1048 PR c++/69363
1049 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1050 instead of c_finish_cilk_clauses.
1051 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1052 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1053 floating-point variables in the linear clause for Cilk Plus.
1054
fe37c7af
MM
10552016-04-18 Michael Matz <matz@suse.de>
1056
1057 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1058 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1059
949505a9
MP
10602016-04-15 Marek Polacek <polacek@redhat.com>
1061
1062 PR c/70671
1063 * c-typeck.c (build_unary_op): Pass location down to error and
1064 warning call.
1065
dda1bf61
JJ
10662016-04-15 Jakub Jelinek <jakub@redhat.com>
1067
1068 PR c/70436
1069 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1070 where needed.
1071 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1072 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1073 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1074 Adjust c_parser_pragma callers.
1075 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1076 caller.
1077 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1078 c_parser_statement.
1079 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1080 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1081 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1082 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1083 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1084 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1085 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1086 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1087 down where needed.
1088 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1089 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1090 calls.
1091
99cd9857
MP
10922016-04-13 Marek Polacek <polacek@redhat.com>
1093
1094 PR c/70436
1095 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1096 adjust callers.
1097 (c_parser_statement): Likewise.
1098 (c_parser_c99_block_statement): Likewise.
1099 (c_parser_while_statement): Likewise.
1100 (c_parser_for_statement): Likewise.
1101 (c_parser_if_body): Don't set IF_P here.
1102 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1103 about dangling else here.
1104 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1105 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1106 warn about dangling else here.
1107
f13355da
MP
11082016-04-04 Marek Polacek <polacek@redhat.com>
1109
1110 PR c/70307
1111 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1112
5fde6a45
MP
11132016-03-31 Marek Polacek <polacek@redhat.com>
1114
1115 PR c/70297
1116 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1117
4bbf545b
DM
11182016-03-18 David Malcolm <dmalcolm@redhat.com>
1119
1120 PR c/70281
1121 * c-parser.c (c_parser_postfix_expression): Set the source range
1122 for uses of "__builtin_types_compatible_p".
1123
fcc2b74f
JJ
11242016-03-17 Jakub Jelinek <jakub@redhat.com>
1125
1126 PR c/70280
1127 * c-typeck.c (composite_type): Don't count void_list_node
1128 into len, if the list is terminated by void_list_node, start
1129 with void_list_node instead of NULL for newargs. Stop
1130 at void_list_node.
1131
ab4c578f
MP
11322016-03-16 Marek Polacek <polacek@redhat.com>
1133
1134 PR c/70093
1135 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1136 nested functions returning VM types.
1137
96b3c82d
CP
11382016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1139
1140 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1141 when calling c_finish_omp_clauses.
1142
29b9828f
BS
11432016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1144
1145 PR c/69824
1146 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1147 for later.
1148
7ff6ca38
MP
11492016-03-04 Marek Polacek <polacek@redhat.com>
1150
1151 PR c/69798
1152 * c-parser.c (c_parser_postfix_expression): Call
1153 c_parser_cast_expression rather than c_parser_postfix_expression.
1154
686e2237
JJ
11552016-03-01 Jakub Jelinek <jakub@redhat.com>
1156
1157 PR c/69796
1158 PR c/69974
1159 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1160 of incomplete decls to error_mark_node.
1161
0b05329b
MP
11622016-02-24 Marek Polacek <polacek@redhat.com>
1163
1164 PR c/69819
1165 * c-decl.c (finish_decl): Don't update the copy of the type of a
1166 different decl type.
1167
067fbd8b
JJ
11682016-02-23 Jakub Jelinek <jakub@redhat.com>
1169
1170 PR objc/69844
1171 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1172 in id_kind reclassification.
1173
bf14eba2
JJ
11742016-02-16 Jakub Jelinek <jakub@redhat.com>
1175
1176 PR c/69835
1177 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1178
ba539195
JN
11792016-02-16 James Norris <jnorris@codesourcery.com>
1180
1181 PR c/64748
1182 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1183
16595a1f
BS
11842016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1185
f48dfe98
BS
1186 * c-decl.c (build_null_declspecs): Zero the entire struct.
1187
16595a1f
BS
1188 PR c/69522
1189 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1190 callers changed. If nested_p is true, use it to call
1191 finish_implicit_inits.
1192 * c-tree.h (finish_implicit_inits): Declare.
1193 * c-typeck.c (finish_implicit_inits): New function. Move code
1194 from ...
1195 (push_init_level): ... here.
1196 (set_designator, process_init_element): Call finish_implicit_inits.
1197
66756373
JJ
11982016-02-11 Jakub Jelinek <jakub@redhat.com>
1199
1200 PR c/69768
1201 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1202 arguments for -Waddress warning.
1203
1066e9b5
JJ
12042016-02-04 Jakub Jelinek <jakub@redhat.com>
1205
1206 PR c/69669
1207 * c-decl.c (finish_enum): When honoring mode attribute,
1208 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1209
3a5d2ba4
JJ
12102016-01-29 Jakub Jelinek <jakub@redhat.com>
1211
1212 PR debug/69518
1213 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1214 all type variants, not just TYPE_MAIN_VARIANT.
1215
cbdd8ae0
JJ
12162016-01-27 Jakub Jelinek <jakub@redhat.com>
1217
1218 PR debug/66869
1219 * c-decl.c (c_write_global_declarations_1): Warn with
1220 warn_unused_function if static prototype without definition
1221 is not C_DECL_USED.
1222
fa74a4bc
MP
12232016-01-27 Marek Polacek <polacek@redhat.com>
1224
1225 PR c/68062
1226 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1227 to unsigned, if needed. Add -Wsign-compare warning.
1228
13f92e8d
JJ
12292016-01-26 Jakub Jelinek <jakub@redhat.com>
1230
1231 PR tree-optimization/69483
1232 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1233
cd8e73dc 12342016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1235
1236 PR c/24293
1237 * c-tree.h (incomplete_record_decls): Declare.
1238 * c-parser.c (incomplete_record_decls): Define.
1239 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1240 report error if any decl has zero size.
1241 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1242 or enum type to incomplete_record_decls.
1243
e6d6ec9e
TV
12442016-01-14 Tom de Vries <tom@codesourcery.com>
1245
1246 PR tree-optimization/68773
1247 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1248 set force_output.
1249
00083992
MP
12502016-01-14 Marek Polacek <polacek@redhat.com>
1251
1252 PR c/69262
1253 * c-decl.c (grokdeclarator): Provide more information for invalid
1254 array declarations.
1255
7443cf13
DM
12562016-01-06 David Malcolm <dmalcolm@redhat.com>
1257
1258 * c-parser.c (c_parser_unary_expression): For dereferences, build
1259 a combined location before calling build_indirect_ref, so that
1260 error reports cover the full range, manually updating the c_expr
1261 src_range.
1262
6b131d5b
MP
12632016-01-06 Marek Polacek <polacek@redhat.com>
1264
1265 PR sanitizer/69099
1266 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1267 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1268 NULL.
1269
818ab71a
JJ
12702016-01-04 Jakub Jelinek <jakub@redhat.com>
1271
1272 Update copyright years.
1273
2fe0a208
MP
12742016-01-04 Marek Polacek <polacek@redhat.com>
1275
1276 PR c/68908
1277 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1278 optimization to use __atomic_fetch_* built-in if possible.
1279
c7b48c8a
TS
12802015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1281
1282 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1283 into...
1284 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1285 all users.
1286
fda5652f
MP
12872015-12-22 Marek Polacek <polacek@redhat.com>
1288
1289 PR c/69002
1290 * c-typeck.c (build_component_ref): Warn when acessing elements of
1291 atomic structures or unions.
1292
745e411d
DM
12932015-12-21 David Malcolm <dmalcolm@redhat.com>
1294
1295 * c-typeck.c: Include "gcc-rich-location.h".
1296 (build_binary_op): In the two places that call binary_op_error,
1297 create a gcc_rich_location and populate it with the location of
1298 the binary op and its two operands.
1299
94c40e19
DM
13002015-12-16 David Malcolm <dmalcolm@redhat.com>
1301
1302 * c-parser.c (c_parser_statement_after_labels): When calling
1303 c_finish_return, Use the return expression's location if it has
1304 one, falling back to the location of the first token within it.
1305 * c-typeck.c (c_finish_return): When issuing warnings about
1306 the incorrect presence/absence of a return value, issue a note
1307 showing the declaration of the function.
1308
de67c4c3
DM
13092015-12-16 David Malcolm <dmalcolm@redhat.com>
1310
1311 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1312 to 4.
1313 (c_parser_peek_nth_token): New function.
1314 (c_parser_peek_conflict_marker): New function.
1315 (c_parser_error): Detect conflict markers and report them as such.
1316
a10704e1
DM
13172015-12-16 David Malcolm <dmalcolm@redhat.com>
1318
1319 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1320 to preserve range information for the primary expression
1321 in the call to c_parser_postfix_expression_after_primary.
1322
8062bca6
DM
13232015-12-16 David Malcolm <dmalcolm@redhat.com>
1324
1325 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1326 expression location, falling back on the first token location,
1327 rather than always using the latter.
1328
d06f8b75
MP
13292015-12-16 Marek Polacek <polacek@redhat.com>
1330
1331 PR c/64637
1332 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1333 available.
1334
2994fb91
MP
13352015-12-15 Marek Polacek <polacek@redhat.com>
1336
1337 PR c/68907
1338 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1339 artificial decl.
1340
a1b93f8d
DM
13412015-12-08 David Malcolm <dmalcolm@redhat.com>
1342
1343 * c-parser.c (c_parser_alignof_expression): Capture location of
1344 closing parenthesis (if any), or of end of unary expression, and
1345 use it to build a src_range for the expression.
1346
46c6e1e2
DM
13472015-12-08 David Malcolm <dmalcolm@redhat.com>
1348
1349 PR c/68757
1350 * c-parser.c (c_parser_get_builtin_args): Add
1351 "out_close_paren_loc" param, and write back to it.
1352 (c_parser_postfix_expression): Capture the closing
1353 parenthesis location for RID_CHOOSE_EXPR,
1354 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1355 RID_BUILTIN_SHUFFLE and use it to set the source range
1356 for such expressions; within RID_BUILTIN_COMPLEX set
1357 the underlying location.
1358
66189108
MP
13592015-12-07 Marek Polacek <polacek@redhat.com>
1360
1361 PR c/68668
1362 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1363 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1364
f187980b
EB
13652015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1366
1367 * c-tree.h (c_build_va_arg): Adjust prototype.
1368 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1369 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1370 parameter, adjust throughout and issue an error if EXPR is a component
1371 with reverse storage order.
1372
4250754e
JM
13732015-12-02 Jason Merrill <jason@redhat.com>
1374
1375 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1376 (c_fully_fold_internal, decl_constant_value_for_optimization):
1377 Move from c-common.c.
1378 * c-tree.h: Declare decl_constant_value_for_optimization.
1379 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1380
e9e32ee6
JM
13812015-12-02 Joseph Myers <joseph@codesourcery.com>
1382
1383 PR c/68162
1384 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1385 following link from declarator to next declarator. Track original
1386 qualified type and pass it to c_build_qualified_type.
1387 * c-typeck.c (c_build_qualified_type): Add arguments
1388 orig_qual_type and orig_qual_indirect.
1389
ff7a55bf
TS
13902015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1391
1392 * c-parser.c (c_parser_omp_clause_name)
1393 (c_parser_oacc_all_clauses): Alphabetical sorting.
1394
657e4e47
JJ
13952015-12-02 Jakub Jelinek <jakub@redhat.com>
1396
1397 PR c/68533
1398 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1399 for diagnostics.
1400
37d5ad46
JB
14012015-12-01 Julian Brown <julian@codesourcery.com>
1402 Cesar Philippidis <cesar@codesourcery.com>
1403 James Norris <James_Norris@mentor.com>
1404
1405 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1406 (c_parser_oacc_clause_use_device): New function.
1407 (c_parser_oacc_all_clauses): Add use_device support.
1408 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1409 (c_parser_oacc_host_data): New function.
1410 (c_parser_omp_construct): Add host_data support.
1411 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1412 * c-typeck.c (c_finish_oacc_host_data): New function.
1413 (c_finish_omp_clauses): Add use_device support.
1414
a4850ce9
JH
14152015-11-29 Jan Hubicka <hubicka@ucw.cz>
1416
1417 PR c/67106
1418 * c-decl.c: Set TYPE_PACKED in variants.
1419
b58d3df2
ML
14202015-11-27 Martin Liska <mliska@suse.cz>
1421
1422 PR c++/68312
1423 * c-array-notation.c (fix_builtin_array_notation_fn):
1424 Use release_vec_vec instead of vec::release.
1425 (build_array_notation_expr): Likewise.
1426 (fix_conditional_array_notations_1): Likewise.
1427 (fix_array_notation_expr): Likewise.
1428 (fix_array_notation_call_expr): Likewise.
1429
aec17bfe
JJ
14302015-11-27 Jakub Jelinek <jakub@redhat.com>
1431
1432 PR c/63326
1433 * c-parser.c (c_parser_compound_statement_nostart): If
1434 last_label is true, use pragma_stmt instead of pragma_compound
1435 as second c_parser_pragma argument.
1436 (c_parser_omp_ordered, c_parser_omp_target_update,
1437 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1438 false as second argument to c_parser_skip_to_pragma_eol after
1439 diagnosing standalone directives used in pragma_stmt context.
1440
688c4de0
IV
14412015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1442
1443 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1444 with "if (ENABLE_OFFLOADING)".
1445
cbd03aee
DM
14462015-11-23 David Malcolm <dmalcolm@redhat.com>
1447
1448 PR objc/68438
1449 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1450 for various Objective-C constructs: Class.name syntax,
1451 @selector(), @protocol(), @encode(), and [] message syntax.
1452
a87a86e1
DM
14532015-11-20 David Malcolm <dmalcolm@redhat.com>
1454
1455 PR 62314
1456 * c-typeck.c (should_suggest_deref_p): New function.
1457 (build_component_ref): Special-case POINTER_TYPE when
1458 generating a "not a structure of union" error message, and
1459 suggest a "->" rather than a ".", providing a fix-it hint.
1460
8ece8dfb
DM
14612015-11-19 David Malcolm <dmalcolm@redhat.com>
1462
1463 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1464 candidate into a new function, find_closest_identifier.
1465
433068cc
MP
14662015-11-19 Marek Polacek <polacek@redhat.com>
1467
1468 PR c/68412
1469 * c-typeck.c (parser_build_binary_op): Properly handle
1470 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1471
bef08b71
DM
14722015-11-17 David Malcolm <dmalcolm@redhat.com>
1473
1474 * c-parser.c (set_c_expr_source_range): Bulletproof both
1475 overloaded implementations against NULL expr->value.
1476 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1477 values.
1478 (c_parser_unary_expression): Likewise when handling addresses of
1479 labels.
1480 (c_parser_postfix_expression): Likewise for statement expressions,
1481 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1482 __builtin_va_arg, and for __builtin_offset_of.
1483 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1484 src_range using the range of the braced initializer.
1485 (c_parser_transaction_expression): Set src_range for "ret" to a
1486 sane pair of values.
1487
fff77217
KY
14882015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1489
1490 * c-parser.c (c_finish_omp_declare_simd): Look for
1491 "simd" attribute as well. Update error message.
1492
1d899da2
TS
14932015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1494
1495 * c-parser.c (c_parser_omp_declare_target): Adjust.
1496
e4606348
JJ
14972015-11-14 Jakub Jelinek <jakub@redhat.com>
1498
1499 * c-typeck.c (c_finish_omp_clauses): Don't mark
1500 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1501
3e636daf
MP
15022015-11-14 Marek Polacek <polacek@redhat.com>
1503
1504 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1505 * c-typeck.c: Likewise.
1506
ebedc9a3
DM
15072015-11-13 David Malcolm <dmalcolm@redhat.com>
1508
1509 * c-decl.c (warn_defaults_to): Pass line_table to
1510 rich_location ctor.
1511 * c-errors.c (pedwarn_c99): Likewise.
1512 (pedwarn_c90): Likewise.
1513 * c-parser.c (set_c_expr_source_range): New functions.
1514 (c_token::get_range): New method.
1515 (c_token::get_finish): New method.
1516 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1517 based on the range from the start of the LHS to the end of the
1518 RHS.
1519 (c_parser_conditional_expression): Likewise, based on the range
1520 from the start of the cond.value to the end of exp2.value.
1521 (c_parser_binary_expression): Call set_c_expr_source_range on
1522 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1523 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1524 based on the cast_loc through to the end of the expr.
1525 (c_parser_unary_expression): Likewise, based on the
1526 op_loc through to the end of op.
1527 (c_parser_sizeof_expression) Likewise, based on the start of the
1528 sizeof token through to either the closing paren or the end of
1529 expr.
1530 (c_parser_postfix_expression): Likewise, using the token range,
1531 or from the open paren through to the close paren for
1532 parenthesized expressions.
1533 (c_parser_postfix_expression_after_primary): Likewise, for
1534 various kinds of expression.
1535 * c-tree.h (struct c_expr): Add field "src_range".
1536 (c_expr::get_start): New method.
1537 (c_expr::get_finish): New method.
1538 (set_c_expr_source_range): New decls.
1539 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1540 on ret for prefix unary ops.
1541 (parser_build_binary_op): Likewise, running from the start of
1542 arg1.value through to the end of arg2.value.
1543
ec8b536f
MP
15442015-11-13 Marek Polacek <polacek@redhat.com>
1545
1546 PR c/68320
1547 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1548
277fe616
DM
15492015-11-13 David Malcolm <dmalcolm@redhat.com>
1550
1551 * c-typeck.c: Include spellcheck.h.
1552 (lookup_field_fuzzy_find_candidates): New function.
1553 (lookup_field_fuzzy): New function.
1554 (build_component_ref): If the field was not found, try using
1555 lookup_field_fuzzy and potentially offer a suggestion.
1556
6e232ba4
JN
15572015-11-12 James Norris <jnorris@codesourcery.com>
1558 Joseph Myers <joseph@codesourcery.com>
1559
1560 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1561 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1562 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1563 and PRAGMA_OMP_CLAUSE_LINK.
1564 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1565 and PRAGMA_OACC_CLAUSE_LINK.
1566 (OACC_DECLARE_CLAUSE_MASK): New definition.
1567 (c_parser_oacc_declare): New function.
1568
9be4f715
MP
15692015-11-12 Marek Polacek <polacek@redhat.com>
1570
1571 PR c/67784
1572 * c-parser.c (c_parser_for_statement): Reclassify the token in
1573 a correct scope.
1574
e78bede6
MP
15752015-11-11 Marek Polacek <polacek@redhat.com>
1576
1577 PR c/68107
1578 PR c++/68266
1579 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1580 checking the size of an array.
1581
69f293c9
AM
15822015-11-11 Andrew MacLeod <amacleod@redhat.com>
1583
1584 * c-array-notation.c: Remove unused header files.
1585 * c-aux-info.c: Likewise.
1586 * c-convert.c: Likewise.
1587 * c-decl.c: Likewise.
1588 * c-errors.c: Likewise.
1589 * c-lang.c: Likewise.
1590 * c-objc-common.c: Likewise.
1591 * c-parser.c: Likewise.
1592 * c-typeck.c: Likewise.
1593 * gccspec.c: Likewise.
1594
3a40d81d
NS
15952015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1596 Cesar Philippidis <cesar@codesourcery.com>
1597 James Norris <jnorris@codesourcery.com>
1598 Julian Brown <julian@codesourcery.com>
1599 Nathan Sidwell <nathan@codesourcery.com>
1600
1601 c/
1602 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1603 routine arg.
1604 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1605 (c_parser_pragma): Parse 'acc routine'.
1606 (OACC_ROUTINE_CLAUSE_MARK): Define.
1607 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1608
fc402eec
AA
16092015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1610
1611 PR debug/67192
1612 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1613 location of the backward-goto to the start of the loop body.
1614
f6b0b3db
AA
16152015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1616
1617 PR debug/67192
1618 * c-parser.c (c_parser_while_statement): Finish the loop before
1619 parsing ahead for misleading indentation.
1620 (c_parser_for_statement): Likewise.
1621
ee45a32d
EB
16222015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1623
1624 * c-decl.c (finish_struct): If the structure has reverse storage
1625 order, rewrite the type of array fields with scalar component. Call
1626 maybe_apply_pragma_scalar_storage_order on entry.
1627 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1628 errors on bit-fields and reverse SSO here and not...
1629 (c_mark_addressable): ...here.
1630 (output_init_element): Adjust call to initializer_constant_valid_p.
1631 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1632
8a645150
DM
16332015-11-06 David Malcolm <dmalcolm@redhat.com>
1634
1635 * c-decl.c (warn_defaults_to): Update for change in signature
1636 of diagnostic_set_info.
1637 * c-errors.c (pedwarn_c99): Likewise.
1638 (pedwarn_c90): Likewise.
1639 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1640 for textinfo::set_location.
1641
7a5e4956
CP
16422015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1643 Thomas Schwinge <thomas@codesourcery.com>
1644 James Norris <jnorris@codesourcery.com>
1645
1646 * c-parser.c (c_parser_omp_clause_name): Add support for
1647 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1648 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1649 default(none) in OpenACC.
1650 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1651 arguments.
1652 (c_parser_oacc_clause_tile): New function.
1653 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1654 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1655 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1656 TILE}.
1657 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1658 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1659 FIRSTPRIVATE}.
1660 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1661 (c_parser_oacc_update): Update the error message for missing clauses.
1662 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1663 and OMP_CLAUSE_INDEPENDENT.
1664
bfcfbfa0
MP
16652015-11-05 Marek Polacek <polacek@redhat.com>
1666
1667 PR c/68090
1668 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1669 deal with pre-evaluation on invalid types.
1670
e01d41e5
JJ
16712015-11-05 Jakub Jelinek <jakub@redhat.com>
1672 Ilya Verbin <ilya.verbin@intel.com>
1673
1674 * c-parser.c: Include context.h and gimple-expr.h.
1675 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1676 monotonic together with nonmonotonic.
1677 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1678 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1679 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1680 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1681 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1682 expressions on combined target teams before the target.
1683 (c_parser_omp_declare_target): If decl has "omp declare target" or
1684 "omp declare target link" attribute, and cgraph or varpool node already
1685 exists, then set corresponding flags. Call c_finish_omp_clauses
1686 in the parenthesized extended-list syntax case.
1687 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1688 declare target.
1689 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1690 on OMP_CLAUSE_REDUCTION array sections.
1691 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1692 into the constant offset, or for variable low-bound using
1693 POINTER_PLUS_EXPR. For structure element based array sections use
1694 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1695 (c_finish_omp_clauses): Drop generic_field_head, structure
1696 elements are now always mapped even as array section bases,
1697 diagnose same var in data sharing and mapping clauses. Diagnose if
1698 linear step on declare simd is neither a constant nor a uniform
1699 parameter. Look through POINTER_PLUS_EXPR for array section
1700 reductions. Diagnose the same var or function appearing multiple
1701 times on the same directive. Fix up wording for the to clause if t
1702 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1703 modifier on kinds other than dynamic or guided or nonmonotonic
1704 modifier together with ordered clause.
1705
4bf9e5a8
TS
17062015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1707 Chung-Lin Tang <cltang@codesourcery.com>
1708
1709 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1710
2adfab87
AM
17112015-10-29 Andrew MacLeod <amacleod@redhat.com>
1712
1713 * c-array-notation.c: Reorder #include's and remove duplicates.
1714 * c-aux-info.c: Likewise.
1715 * c-convert.c: Likewise.
1716 * c-decl.c: Likewise.
1717 * c-errors.c: Likewise.
1718 * c-lang.c: Likewise.
1719 * c-objc-common.c: Likewise.
1720 * c-parser.c: Likewise.
1721 * c-typeck.c: Likewise.
1722
e922069e
JW
17232015-10-26 Jim Wilson <jim.wilson@linaro.org>
1724
1725 PR debug/66068
1726 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1727 after calling build_qualified_type.
1728
765dd391
CP
17292015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1730 Thomas Schwinge <thomas@codesourcery.com>
1731 James Norris <jnorris@codesourcery.com>
1732 Joseph Myers <joseph@codesourcery.com>
1733 Julian Brown <julian@codesourcery.com>
1734 Bernd Schmidt <bschmidt@redhat.com>
1735
1736 * c-parser.c (c_parser_oacc_shape_clause): New.
1737 (c_parser_oacc_simple_clause): New.
1738 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1739 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1740
88bae6f4
TS
17412015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1742 James Norris <jnorris@codesourcery.com>
1743 Cesar Philippidis <cesar@codesourcery.com>
1744
1745 PR c/64765
1746 PR c/64880
1747 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1748 parameters, and handle these. Adjust all users.
1749 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1750 into...
1751 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1752 all users.
1753 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1754 declare functions.
1755 (c_finish_omp_construct): Declare function.
1756 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1757 Merge functions into...
1758 (c_finish_omp_construct): ... this new function.
1759
a8fc2579
RB
17602015-10-22 Richard Biener <rguenther@suse.de>
1761
1762 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1763 before folding a MINUS_EXPR.
1764
e9122ef6
MP
17652015-10-21 Marek Polacek <polacek@redhat.com>
1766
1767 PR c/68024
1768 * c-decl.c (start_function): Warn about vararg functions without
1769 a prototype.
1770
9f47c7e5
IE
17712015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1772
1773 * c-typeck.c (build_conditional_expr): Use boolean vector
1774 type for vector comparison.
1775 (build_vec_cmp): New.
1776 (build_binary_op): Use build_vec_cmp for comparison.
1777
fa60eeb9
MP
17782015-10-20 Marek Polacek <polacek@redhat.com>
1779
1780 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1781
2c7020eb
MP
17822015-10-20 Marek Polacek <polacek@redhat.com>
1783
1784 PR c/67964
1785 * c-parser.c (c_parser_attributes): Break out of the loop if the
1786 token after an attribute isn't a comma.
1787
d9a6bd32
JJ
17882015-10-13 Jakub Jelinek <jakub@redhat.com>
1789 Aldy Hernandez <aldyh@redhat.com>
1790
1791 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1792 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1793 (c_parser_omp_variable_list): Handle structure elements for
1794 map, to and from clauses. Handle array sections in reduction
1795 clause. Formatting fixes.
1796 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1797 if clause modifiers.
1798 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1799 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1800 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1801 c_parser_omp_clause_is_device_ptr): New functions.
1802 (c_parser_omp_clause_ordered): Parse optional parameter.
1803 (c_parser_omp_clause_reduction): Handle array reductions.
1804 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1805 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1806 functions.
1807 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1808 (c_parser_omp_clause_depend_sink): New function.
1809 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1810 (c_parser_omp_clause_map): Parse release/delete map kinds and
1811 optional always modifier.
1812 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1813 and c_finish_omp_clauses callers.
1814 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1815 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1816 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1817 (OMP_CRITICAL_CLAUSE_MASK): Define.
1818 (c_parser_omp_critical): Parse critical clauses.
1819 (c_parser_omp_for_loop): Handle doacross loops, adjust
1820 c_finish_omp_for and c_finish_omp_clauses callers.
1821 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1822 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1823 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1824 (c_parser_omp_for): Disallow ordered clause when combined with
1825 distribute. Disallow linear clause when combined with distribute
1826 and not combined with simd.
1827 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1828 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1829 parse clauses and if depend clause is found, don't parse a body.
1830 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1831 Allow target parallel without for after it.
1832 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1833 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1834 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1835 invalid kinds.
1836 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1837 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1838 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1839 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1840 functions.
1841 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1842 defaultmap and is_device_ptr clauses.
1843 (c_parser_omp_target): Parse target parallel and target simd. Set
1844 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1845 and target exit data. Diagnose invalid map kinds.
1846 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1847 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1848 construct.
1849 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1850 &omp_priv.
1851 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1852 (c_parser_omp_taskloop): New function.
1853 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1854 handle PRAGMA_OMP_TASKLOOP.
1855 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1856 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1857 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1858 Add IS_OMP argument, handle structure element bases, diagnose
1859 bitfields, pass IS_OMP recursively, diagnose known zero length
1860 array sections in depend clauses, handle array sections in reduction
1861 clause, diagnose negative length even for pointers.
1862 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1863 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1864 array sections in reduction clause, set
1865 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1866 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1867 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1868 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1869
21ba0cea
MP
18702015-10-06 Marek Polacek <polacek@redhat.com>
1871
1872 * c-parser.c (c_parser_statement_after_labels): Use
1873 protected_set_expr_location.
1874 (c_parser_omp_clause_num_gangs): Likewise.
1875 (c_parser_omp_clause_num_threads): Likewise.
1876 (c_parser_omp_clause_num_workers): Likewise.
1877 (c_parser_omp_clause_vector_length): Likewise.
1878 (c_parser_omp_clause_num_teams): Likewise.
1879 (c_parser_omp_clause_thread_limit): Likewise.
1880 * c-typeck.c (build_c_cast): Likewise.
1881 (c_cast_expr): Likewise.
1882
624d31fe
RS
18832015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1884
1885 * c-typeck.c (c_tree_equal): Use real_equal instead of
1886 REAL_VALUES_EQUAL.
1887
b8fd7909
JM
18882015-10-04 Jason Merrill <jason@redhat.com>
1889
1890 * c-parser.c (c_lex_one_token): Handle @synchronized.
1891 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1892 can change whether the function is transaction_safe.
1893
1c7485af
MP
18942015-10-02 Marek Polacek <polacek@redhat.com>
1895
1896 PR c/67730
1897 * c-typeck.c (convert_for_assignment): Use the expansion point
1898 location throughout.
1899
3e3b8d63
MP
19002015-10-02 Marek Polacek <polacek@redhat.com>
1901
1902 PR c/64249
1903 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1904 and pass it down to c_parser_if_statement.
1905 (c_parser_else_body): Add CHAIN parameter and pass it down to
1906 c_parser_statement_after_labels.
1907 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1908 duplicated if-else-if conditions.
1909
aabef2de
MP
19102015-10-01 Marek Polacek <polacek@redhat.com>
1911
1912 * c-typeck.c (convert_for_assignment): Improve commentary.
1913
de8ddd5f
MP
19142015-09-30 Marek Polacek <polacek@redhat.com>
1915
1916 PR c/67730
1917 * c-typeck.c (c_finish_return): Use the expansion point location for
1918 certain "return with value" warnings.
1919
c4914de6
MLI
19202015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1921
1922 * c-parser.c (pragma_lex): Add loc argument.
1923
0e36f5c7
MP
19242015-09-15 Marek Polacek <polacek@redhat.com>
1925
1926 PR c/67580
1927 * c-decl.c (tag_exists_p): New function.
1928 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1929 struct/union/enum keywords are missing.
1930 * c-tree.h (tag_exists_p): Declare.
1931
2f3bb934
MP
19322015-09-15 Marek Polacek <polacek@redhat.com>
1933
1934 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1935 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1936 Return NULL_TREE instead of 0.
1937 (lookup_name): Return NULL_TREE instead of 0.
1938 (lookup_name_in_scope): Likewise.
1939 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1940 (parser_xref_tag): Use false instead of 0.
1941 (start_struct): Use true instead of 1.
1942 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1943
aa256c4a
MP
19442015-09-14 Marek Polacek <polacek@redhat.com>
1945
1946 * c-typeck.c (set_nonincremental_init_from_string): Use
1947 HOST_WIDE_INT_M1U when shifting a negative value.
1948
dbb68221
MW
19492015-09-09 Mark Wielaard <mjw@redhat.com>
1950
1951 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1952 parm against NULL.
1953
a8a098ac
JJ
19542015-09-10 Jakub Jelinek <jakub@redhat.com>
1955
1956 PR c/67502
1957 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1958 into OMP_FOR_PRE_BODY rather than before the loop.
1959
f4b189d5
JJ
19602015-09-09 Jakub Jelinek <jakub@redhat.com>
1961
0bb99c11
JJ
1962 PR c/67501
1963 * c-parser.c (c_parser_oacc_all_clauses,
1964 c_parser_omp_all_clauses): Remove invalid clause from
1965 list of clauses even if parser->error is set.
1966
fce5e5e3
JJ
1967 PR c/67500
1968 * c-parser.c (c_parser_omp_clause_aligned,
1969 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1970 test for errors.
1971 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1972 error_mark_node.
1973
f4b189d5
JJ
1974 PR c/67495
1975 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1976 instead of c_parser_unary_expression. If the result is !lvalue_p,
1977 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1978
b2aaf235
MP
19792015-09-04 Marek Polacek <polacek@redhat.com>
1980
1981 PR sanitizer/67279
1982 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1983
1807ffc1
MS
19842015-09-03 Martin Sebor <msebor@redhat.com>
1985
1986 PR c/66516
8b652e65
JJ
1987 * c-typeck.c (convert_arguments, parser_build_unary_op,
1988 build_conditional_expr, c_cast_expr, convert_for_assignment,
1989 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1990 reject_gcc_builtin.
1991 (c_decl_implicit): Define.
1992
d04ff417
MP
19932015-09-02 Marek Polacek <polacek@redhat.com>
1994
1995 PR c/67432
1996 * c-parser.c (c_parser_enum_specifier): Give a better error for
1997 an empty enum.
1998
a79683d5
TS
19992015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2000
2001 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2002
191a6b94
MP
20032015-08-12 Marek Polacek <polacek@redhat.com>
2004
2005 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2006 LOC to it.
2007
420a9d9b
MP
20082015-08-03 Marek Polacek <polacek@redhat.com>
2009
2010 PR c/67088
2011 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2012 Use it.
2013 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2014
992118a1
PP
20152015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2016
2017 * c-parser.c (c_parser_if_body): Take token_indent_info
2018 argument. Call warn_for_misleading_indentation even when the
2019 body is a semicolon. Extract token_indent_infos corresponding
2020 to the guard, body and next tokens. Adjust call to
2021 warn_for_misleading_indentation accordingly.
2022 (c_parser_else_body): Likewise.
2023 (c_parser_if_statement): Likewise.
2024 (c_parser_while_statement): Likewise.
2025 (c_parser_for_statement): Likewise.
2026
46308474
LFSM
20272015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2028 Manuel López-Ibáñez <manu@gcc.gnu.org>
2029
2030 * c-decl.c (get_parm_info): Remove static var. Update warning
2031 message.
2032
05b28fd6
MP
20332015-07-27 Marek Polacek <polacek@redhat.com>
2034
2035 PR c++/66555
2036 PR c/54979
2037 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2038
451b5e48
MP
20392015-07-20 Marek Polacek <polacek@redhat.com>
2040
2041 PR c++/55095
2042 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2043 (build_binary_op): Warn about left shift overflows.
2044
1916bcb5
AM
20452015-07-09 Andrew MacLeod <amacleod@redhat.com>
2046
2047 * c-array-notation.c: Adjust includes for flags.h changes.
2048 * c-objc-common.c: Likewise.
2049
c7131fb2
AM
20502015-07-07 Andrew MacLeod <amacleod@redhat.com>
2051
2052 * c-array-notation.c: Adjust includes.
2053 * c-aux-info.c: Likewise.
2054 * c-convert.c: Likewise.
2055 * c-decl.c: Likewise.
2056 * c-errors.c: Likewise.
2057 * c-lang.c: Likewise.
2058 * c-objc-common.c: Likewise.
2059 * c-parser.c: Likewise.
2060 * c-typeck.c: Likewise.
2061
da2e71c9
MLI
20622015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2063
2064 PR fortran/66605
2065 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2066
b155cfd9
MP
20672015-06-29 Marek Polacek <polacek@redhat.com>
2068
2069 PR c/66322
2070 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2071 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2072 about -Wswitch-bool here.
2073 (do_case): Update c_add_case_label call.
2074 (c_finish_case): Update c_do_switch_warnings call.
2075
31521951
MP
20762015-06-27 Marek Polacek <polacek@redhat.com>
2077
2078 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2079
22d03525
MP
20802015-06-26 Marek Polacek <polacek@redhat.com>
2081
2082 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2083 INDIRECT_REF_P.
2084 * c-typeck.c (array_to_pointer_conversion): Likewise.
2085 (build_unary_op): Likewise.
2086 (c_finish_return): Likewise.
2087
f0889939
AM
20882015-06-25 Andrew MacLeod <amacleod@redhat.com>
2089
2090 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2091 * c-parser.c: Likewise.
2092
8d67ee55
RS
20932015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2094
2095 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2096 instead of pointer_hash.
2097 (detect_field_duplicates): Likewise.
2098
0ae9bd27
MP
20992015-06-25 Marek Polacek <polacek@redhat.com>
2100
2101 * c-array-notation.c: Use VAR_P throughout.
2102 * c-decl.c: Likewise.
2103 * c-objc-common.c: Likewise.
2104 * c-parser.c: Likewise.
2105 * c-typeck.c: Likewise.
2106
62f9079a
MP
21072015-06-25 Marek Polacek <polacek@redhat.com>
2108
2109 * c-decl.c: Use is_global_var throughout.
2110 * c-parser.c: Likewise.
2111 * c-typeck.c: Likewise.
2112
abb226c9
AM
21132015-06-17 Andrew MacLeod <amacleod@redhat.com>
2114
2115 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2116 * c-aux-info.c: Likewise.
2117 * c-convert.c: Likewise.
2118 * c-decl.c: Likewise.
2119 * c-errors.c: Likewise.
2120 * c-lang.c: Likewise.
2121 * c-objc-common.c: Likewise.
2122 * c-parser.c: Likewise.
2123 * c-typeck.c: Likewise.
2124
8cbababc
JH
21252015-06-11 Jan Hubicka <hubicka@ucw.cz>
2126
2127 PR middle-end/66325
2128 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2129 variants.
2130
a0349665
PMR
21312015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2132
2133 * c-decl.c (pop_scope): Register the main translation unit
2134 through the new debug hook.
2135
13fdf2e2
AM
21362015-06-08 Andrew MacLeod <amacleod@redhat.com>
2137
2138 * c-array-notation.c : Adjust include files.
2139 * c-aux-info.c : Likewise.
2140 * c-convert.c : Likewise.
2141 * c-decl.c : Likewise.
2142 * c-errors.c : Likewise.
2143 * c-lang.c : Likewise.
2144 * c-lang.h : Likewise.
2145 * c-objc-common.c : Likewise.
2146 * c-parser.c : Likewise.
2147 * c-typeck.c : Likewise.
2148
d7438551
AH
21492015-06-05 Aldy Hernandez <aldyh@redhat.com>
2150
2151 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2152 immediately clobber it.
2153 (c_write_global_declarations_1): Remove call to
2154 check_global_declaration_1.
2155 (c_write_global_declarations_2): Remove.
2156 (c_write_final_cleanups): Rename from c_write_global_declarations.
2157 Remove call to finalize_compilation_unit.
2158 Remove calls to debugging hooks.
2159 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2160 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2161 * c-tree.h: Remove c_write_global_declarations.
2162
ecb9f223
AM
21632015-06-04 Andrew MacLeod <amacleod@redhat.com>
2164
2165 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2166 * c-aux-info.c: Likewise.
2167 * c-convert.c: Likewise.
2168 * c-decl.c: Likewise.
2169 * c-errors.c: Likewise.
2170 * c-lang.c: Likewise.
2171 * c-objc-common.c: Likewise.
2172 * c-parser.c: Likewise.
2173 * c-typeck.c: Likewise.
2174
9482b620
MP
21752015-06-04 Marek Polacek <polacek@redhat.com>
2176
2177 PR c/66341
2178 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2179 it is a lvalue.
2180
bc51ace3
PK
21812015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2182
2183 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2184 Warn for empty struct.
2185 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2186
ea5b45b6
AT
21872015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2188
2189 * c-decl.c (start_function): Call plugin before parsing.
2190 (finish_function): Call plugin after parsing.
2191
c2d47482
PK
21922015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2193
2194 PR c/49551
2195 * c-decl.c (merge_decls): Merge DECL_COMMON.
2196
a95492ab
JW
21972015-05-22 Jim Wilson <jim.wilson@linaro.org>
2198
2199 * Make-lang.in (check_gcc_pallelize): Define.
2200
fd5c817a
MP
22012015-05-22 Marek Polacek <polacek@redhat.com>
2202
2203 PR c/47043
2204 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2205 attributes.
2206
c7b70a3c
MP
22072015-05-21 Marek Polacek <polacek@redhat.com>
2208
2209 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2210 DECL_BUILT_IN.
2211
21b634ae
MP
22122015-05-20 Marek Polacek <polacek@redhat.com>
2213
2214 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2215 * c-typeck.c: Likewise.
2216
296a8c2f
MP
22172015-05-19 Marek Polacek <polacek@redhat.com>
2218
2219 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2220
41b37d5e
JJ
22212015-05-19 Jakub Jelinek <jakub@redhat.com>
2222
2223 PR middle-end/66199
2224 * c-parser.c (c_parser_omp_for_loop): Don't add
2225 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2226 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2227 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2228 constructs.
2229
fab27f52
MM
22302015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2231
2232 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2233 swaps.
fab27f52 2234
40de31cf
MLI
22352015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2236
2237 PR fortran/44054
2238 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2239 accessor function.
2240
3aa3c9fc
MP
22412015-05-14 Marek Polacek <polacek@redhat.com>
2242
2243 PR c/66066
2244 PR c/66127
2245 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2246 rather than with 0.
2247
c3388e62
DM
22482015-05-12 David Malcolm <dmalcolm@redhat.com>
2249
2250 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2251 to add a call to warn_for_misleading_indentation.
2252 (c_parser_else_body): Likewise, adding param "else_loc".
2253 (c_parser_if_statement): Check for misleading indentation.
2254 (c_parser_while_statement): Likewise.
2255 (c_parser_for_statement): Likewise.
2256
755e528f
MP
22572015-05-08 Marek Polacek <polacek@redhat.com>
2258
2259 PR c/64918
2260 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2261 (output_init_element): Likewise.
2262
0173bd2a
MP
22632015-05-07 Marek Polacek <polacek@redhat.com>
2264
2265 PR c/65179
2266 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2267 value.
2268
9babc352
MP
22692015-04-30 Marek Polacek <polacek@redhat.com>
2270
2271 * c-typeck.c (set_init_label): Call error_at instead of error and
2272 pass LOC to it.
2273
ac9f18db
MP
2274 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2275 the type of a decl.
2276
ec3fba51
MP
2277 * c-typeck.c (c_build_va_arg): Clarify the error message.
2278
b811915d
TS
22792015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2280
2281 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2282 OMP_STANDALONE_CLAUSES.
2283
f3075008
MP
22842015-04-28 Marek Polacek <polacek@redhat.com>
2285
2286 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2287
4e81b788
MP
22882015-04-28 Marek Polacek <polacek@redhat.com>
2289
2290 PR c/65901
2291 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2292
6c1db78e
MP
22932015-04-25 Marek Polacek <polacek@redhat.com>
2294
2295 PR c/52085
2296 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2297 attribute.
2298
5c4abbb8
MP
22992015-04-23 Marek Polacek <polacek@redhat.com>
2300
2301 PR c/65345
2302 * c-decl.c (set_labels_context_r): New function.
2303 (store_parm_decls): Call it via walk_tree_without_duplicates.
2304 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2305 instead of create_tmp_var. Build TARGET_EXPR instead of
2306 COMPOUND_EXPR.
2307 (build_atomic_assign): Use create_tmp_var_raw instead of
2308 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2309
06aca1d5
IV
23102015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2311
2312 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2313 (c_parser_omp_target_update): Add missed %> to error_at ().
2314
8fba1830
BRF
23152015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2316
2317 PR target/55143
2318 * c-decl.c (c_default_pointer_mode): Remove definition.
2319 * c-tree.h (c_default_pointer_mode): Remove declaration.
2320
62021f64
TB
23212015-03-27 Tobias Burnus <burnus@net-b.de>
2322
2323 PR c/65586
2324 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2325 error out.
2326 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2327 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2328 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2329
9b65e171
JJ
23302015-03-19 Jakub Jelinek <jakub@redhat.com>
2331
2332 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2333 attribute for DECL_EXTERNAL VAR_DECLs.
2334
17958621
JJ
23352015-03-11 Jakub Jelinek <jakub@redhat.com>
2336
2337 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2338 argument.
2339
7ccb1a11
JJ
23402015-03-10 Jakub Jelinek <jakub@redhat.com>
2341
2342 PR c/65120
2343 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2344 before preparing arguments to warn_logical_not_parentheses.
2345
01177669
JJ
23462015-03-09 Jakub Jelinek <jakub@redhat.com>
2347
2348 PR c/65120
2349 * c-typeck.c (parser_build_binary_op): Don't warn for
2350 !!x == y or !b == y where b is _Bool.
2351
802ac282
MP
23522015-03-09 Marek Polacek <polacek@redhat.com>
2353
2354 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2355 * c-decl.c (grokdeclarator): Likewise.
2356 * c-typeck.c (build_binary_op): Likewise.
2357
e5165b60
MP
23582015-02-27 Marek Polacek <polacek@redhat.com>
2359
2360 PR c/65228
2361 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2362
065d214c
MP
23632015-02-14 Marek Polacek <polacek@redhat.com>
2364
2365 PR c/64768
2366 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2367 declared through a typedef name.
2368
e5d9235b
MP
23692015-02-13 Marek Polacek <polacek@redhat.com>
2370
2371 PR c/65050
2372 * c-decl.c (grokdeclarator): Print also the type when giving
2373 the error message about array's incomplete element type.
2374
fa01ffcc
JJ
23752015-02-11 Jakub Jelinek <jakub@redhat.com>
2376
2377 PR c/64824
2378 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2379 check in the POP macro.
2380
c3e38a03
MP
23812015-02-09 Marek Polacek <polacek@redhat.com>
2382
2383 PR c/64856
2384 * c-typeck.c (process_init_element): Don't always wrap
2385 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2386 initializing a range of elements.
2387
4886ec8e
JJ
23882015-02-04 Jakub Jelinek <jakub@redhat.com>
2389
2390 PR c/64824
2391 PR c/64868
2392 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2393
c3e38a03 23942015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2395
2396 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2397 processing enum declaration.
2398
7b33f0c8
MP
23992015-01-29 Marek Polacek <polacek@redhat.com>
2400
2401 PR c/64709
2402 * c-typeck.c (pop_init_level): If constructor_elements has
2403 exactly one element with integer_zerop value, set constructor_zeroinit
2404 to 1. Remove braces around warning_init call.
2405
dea63e49
JJ
24062015-01-27 Jakub Jelinek <jakub@redhat.com>
2407
2408 PR c/64766
2409 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2410 of FUNCTION_DECLs with error_mark_node.
2411
d38f7dce
JJ
24122015-01-26 Jakub Jelinek <jakub@redhat.com>
2413
2414 PR c/64778
2415 * c-typeck.c (convert_arguments): Return -1 if there are
2416 error_args, even if we've diagnosed too many arguments.
2417
cbf5d0e7
RB
24182015-01-21 Richard Biener <rguenther@suse.de>
2419
2420 PR middle-end/64313
2421 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2422 for builtins the user declared correctly.
2423
41dbbb37
TS
24242015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2425 Bernd Schmidt <bernds@codesourcery.com>
2426 Cesar Philippidis <cesar@codesourcery.com>
2427 James Norris <jnorris@codesourcery.com>
2428 Jakub Jelinek <jakub@redhat.com>
2429 Ilmir Usmanov <i.usmanov@samsung.com>
2430
2431 * c-parser.c: Include "gomp-constants.h".
2432 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2433 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2434 Use OMP_CLAUSE_SET_MAP_KIND.
2435 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2436 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2437 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2438 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2439 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2440 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2441 "copyout", "create", "delete", "deviceptr", "gang", "host",
2442 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2443 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2444 "present_or_create", "pcreate", "seq", "self", "vector",
2445 "vector_length", "wait", "worker".
2446 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2447 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2448 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2449 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2450 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2451 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2452 (c_parser_oacc_data_clause_deviceptr)
2453 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2454 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2455 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2456 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2457 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2458 (c_parser_oacc_parallel, c_parser_oacc_update)
2459 (c_parser_oacc_wait): New functions.
2460 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2461 (c_finish_oacc_data): New prototypes.
2462 * c-typeck.c: Include "gomp-constants.h".
2463 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2464 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2465 OMP_CLAUSE_SET_MAP_KIND.
2466 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2467 (c_finish_oacc_data): New functions.
2468 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2469 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2470 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2471 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2472 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2473 GOMP_MAP_FORCE_DEVICEPTR.
2474
adfac8df
JJ
24752015-01-09 Michael Collison <michael.collison@linaro.org>
2476
2477 * c-array-notation.c: Include hash-set.h, machmode.h,
2478 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2479 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2480 * c-aux-info.c: Ditto.
2481 * c-convert.c: Ditto.
2482 * c-decl.c: Ditto.
2483 * c-errors.c: Ditto.
2484 * c-lang.c: Dittoxs.
2485 * c-objc-common.c: Ditto.
2486 * c-parser.c: Ditto.
2487 * c-typeck.c: Include hash-set.h, machmode.h,
2488 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2489 fold-const.h, wide-int.h, inchash.h, real.h and
2490 fixed-value.h due to flattening of tree.h.
2491
2cc901dc
MP
24922015-01-07 Marek Polacek <polacek@redhat.com>
2493
2494 PR c/64417
2495 * c-typeck.c (process_init_element): Disallow initialization of
2496 a flexible array member with a string constant if the structure
2497 is in an array.
2498
5624e564
JJ
24992015-01-05 Jakub Jelinek <jakub@redhat.com>
2500
e5341100
JJ
2501 PR sanitizer/64344
2502 * c-typeck.c (convert_for_assignment, c_finish_return): For
2503 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2504 types also set in_late_binary_op around convert call.
2505 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2506 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2507 result on expr as last argument to ubsan_instrument_float_cast,
2508 if in_late_binary_op, don't use c_save_expr but save_expr.
2509
5624e564
JJ
2510 Update copyright years.
2511
5bd012f8
MP
25122015-01-05 Marek Polacek <polacek@redhat.com>
2513
2514 PR c/64423
2515 * c-typeck.c (build_array_ref): Pass loc down to
2516 warn_array_subscript_with_type_char.
2517
3f8257db 25182014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2519
2520 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2521 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2522 element type.
8e745a17 2523 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2524 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2525 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2526 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2527 to PEDWARN_FOR_QUALIFIERS.
768952be 2528
8f94a8c4
JJ
25292014-12-17 Jakub Jelinek <jakub@redhat.com>
2530
2531 PR sanitizer/64289
2532 * c-convert.c: Include ubsan.h.
2533 (convert): For real -> integral casts and
2534 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2535 instead instrument the float cast directly.
2536
b731b390
JJ
25372014-11-29 Jakub Jelinek <jakub@redhat.com>
2538
2539 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2540 c_finish_stmt_expr): Remove NULL last argument from
2541 create_tmp_var_raw and create_tmp_var calls.
2542 * c-array-notation.c (fix_builtin_array_notation_fn,
2543 build_array_notation_expr, fix_conditional_array_notations_1,
2544 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2545
541e35a6
MP
25462014-11-28 Marek Polacek <polacek@redhat.com>
2547
2548 PR c/63862
2549 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2550 convert the right operand to integer type.
2551
b286be94
MP
25522014-11-25 Marek Polacek <polacek@redhat.com>
2553
2554 PR c/63877
2555 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2556 for inline functions.
2557
aa7da51a
JJ
25582014-11-21 Jakub Jelinek <jakub@redhat.com>
2559
2560 PR target/63764
2561 * c-typeck.c (build_array_ref): Adjust
2562 convert_vector_to_pointer_for_subscript caller. If it returns true,
2563 call non_lvalue_loc on the result.
2564
d876207f
RB
25652014-11-11 Richard Biener <rguenther@suse.de>
2566
2567 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2568 to true.
2569
e5e44252
AK
25702014-11-10 Andi Kleen <ak@linux.intel.com>
2571
2572 PR c/60804
2573 * c-parser.c (c_parser_statement_after_labels): Call
2574 check_no_cilk.
2575 (c_parser_if_statement): Dito.
2576 (c_parser_switch_statement): Dito.
2577 (c_parser_while_statement): Dito.
2578 (c_parser_do_statement): Dito.
2579 (c_parser_for_statement): Dito.
2580 * c-typeck.c (c_finish_loop): Dito.
2581
13c21655
PC
25822014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2583
2584 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2585 OPT_Wshift_count_overflow in the warnings.
2586
2d51fcef
MP
25872014-10-30 Marek Polacek <polacek@redhat.com>
2588
2589 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2590 print the stripped version as well, if they're not the same.
2591
ef4bddc2
RS
25922014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2593
2594 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2595 machine_mode.
2596
c582198b
AM
25972014-10-28 Andrew MacLeod <amacleod@redhat.com>
2598
2599 * c-decl.c: Adjust include files.
2600 * c-parser.c: Ditto.
2601
ddc8de03
PM
26022014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2603 Tom Tromey <tromey@redhat.com>
2604
2605 * c-tree.h (enum c_oracle_request): New.
2606 (c_binding_oracle_function): New typedef.
2607 (c_binding_oracle, c_pushtag, c_bind): Declare.
2608 * c-decl.c (c_binding_oracle): New global.
2609 (I_SYMBOL_CHECKED): New macro.
2610 (i_symbol_binding): New function.
2611 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2612 (I_TAG_CHECKED): New macro.
2613 (i_tag_binding): New function.
2614 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2615 (I_LABEL_CHECKED): New macro.
2616 (i_label_binding): New function.
2617 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2618 (c_print_identifier): Save and restore c_binding_oracle.
2619 (c_pushtag, c_bind): New functions.
2620
60393bbc
AM
26212014-10-27 Andrew MacLeod <amacleod@redhat.com>
2622
2623 * c-typeck.c: Adjust include files.
2624
d723bb7c
MLI
26252014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2626
2627 PR c++/53061
2628 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2629 initialization here...
2630 (c_initialize_diagnostics): ... but here. Set defaults after
2631 building pretty-printer.
2632
1bc5a451
MP
26332014-10-23 Marek Polacek <polacek@redhat.com>
2634
2635 PR c/63626
2636 * c-decl.c (pop_scope): Don't print warning in external_scope.
2637
4435bb92
MP
26382014-10-19 Marek Polacek <polacek@redhat.com>
2639
2640 PR c/63567
2641 * c-typeck.c (output_init_element): Allow initializing objects with
2642 static storage duration with compound literals even in C99 and add
2643 pedwarn for it.
2644
7278465e
MP
26452014-10-17 Marek Polacek <polacek@redhat.com>
2646
2647 PR c/63567
2648 * c-typeck.c (digest_init): Allow initializing objects with static
2649 storage duration with compound literals even in C99 and add pedwarn
2650 for it.
2651
d9b7be2e
MP
26522014-10-17 Marek Polacek <polacek@redhat.com>
2653
2654 PR c/63543
2655 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2656 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2657 error multiple times. Print the type.
2658
f406ae1f
MP
26592014-10-17 Marek Polacek <polacek@redhat.com>
2660
2661 PR c/63549
2662 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2663 type.
2664
92574c7c
MP
26652014-10-17 Marek Polacek <polacek@redhat.com>
2666
2667 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2668 (start_function): Use OPT_Wimplicit_int instead of 0.
2669 (store_parm_decls_oldstyle): Likewise.
2670
1bc4a978
MT
26712014-10-17 Alan Modra <amodra@gmail.com>
2672
2673 PR middle-end/61848
2674 * c-decl.c (merge_decls): Don't merge section name or tls model
2675 to newdecl symtab node, instead merge to olddecl. Override
2676 existing olddecl section name. Set tls_model for all thread-local
2677 vars, not just OMP thread-private ones. Remove incorrect comment.
2678
83685514
AM
26792014-10-16 Andrew MacLeod <amacleod@redhat.com>
2680
2681 * c-decl.c: Adjust include files.
2682
78a7c317
DD
26832014-10-14 DJ Delorie <dj@redhat.com>
2684
2685 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2686 (c_token_starts_typename): Check all __intN, not just __int128.
2687 (c_token_starts_declspecs): Likewise.
2688 (c_parser_declspecs): Likewise.
2689 (c_parser_attribute_any_word): Likewise.
2690 (c_parser_objc_selector): Likewise.
2691 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2692 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2693 is specified.
2694 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2695 __int128.
2696 (finish_declspecs): Likewise.
2697
74d98c1e
AB
26982014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2699
8e745a17 2700 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 2701 the duplicate code.
8e745a17 2702 (c_parser_statement): Call the new function.
74d98c1e 2703
84937de2
MP
27042014-10-09 Marek Polacek <polacek@redhat.com>
2705
2706 PR c/63480
2707 * c-typeck.c (pop_init_level): Don't warn about initializing
2708 with { }.
2709
0382aaa0
MP
27102014-10-07 Marek Polacek <polacek@redhat.com>
2711
2712 PR c/59717
2713 * c-decl.c (header_for_builtin_fn): New function.
2714 (implicitly_declare): Suggest which header to include.
2715
7a0ca710
MP
27162014-10-07 Marek Polacek <polacek@redhat.com>
2717
2718 * c-convert.c (convert): Use error_operand_p.
2719 * c-typeck.c (require_complete_type): Likewise.
2720 (really_atomic_lvalue): Likewise.
2721 (digest_init): Likewise.
2722 (handle_omp_array_sections_1): Likewise.
2723
6bc8a126
MP
27242014-10-03 Marek Polacek <polacek@redhat.com>
2725
2726 PR c/63453
2727 * c-decl.c (pop_scope): Don't warn about "inline function declared
2728 but never defined" for functions marked with gnu_inline attribute.
2729
d90c0a59
JJ
27302014-09-25 Jakub Jelinek <jakub@redhat.com>
2731
2732 PR c++/63249
2733 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2734 on low_bound and length.
2735
083e891e
MP
27362014-09-24 Marek Polacek <polacek@redhat.com>
2737
2738 PR c/61405
2739 PR c/53874
2740 * c-parser.c: Don't define CPP_KEYWORD.
2741 (c_parser_switch_statement): Pass original type to c_finish_case.
2742 * c-tree.h (c_finish_case): Update declaration.
2743 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2744 conditionally to c_do_switch_warnings.
2745
8d95fe25
MP
27462014-09-03 Marek Polacek <polacek@redhat.com>
2747
2748 PR c/62024
2749 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2750 conversions.
2751
9a771876
JJ
27522014-09-02 Jakub Jelinek <jakub@redhat.com>
2753 Balaji V. Iyer <balaji.v.iyer@intel.com>
2754 Igor Zamyatin <igor.zamyatin@intel.com>
2755
2756 * c-parser.c (c_parser_cilk_for): New function.
2757 (c_parser_cilk_grainsize): Likewise.
2758 (c_get_temp_regvar): Likewise.
2759 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2760 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2761 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2762 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2763 case.
2764
b7679d96
CG
27652014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2766
2767 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2768 with using HOST_WIDE_INT without truncation to 'int'
2769
59ea0364
MP
27702014-08-22 Marek Polacek <polacek@redhat.com>
2771
2772 PR c++/62199
2773 * c-typeck.c (parser_build_binary_op): Adjust call to
2774 warn_logical_not_parentheses.
2775
671a475e
IZ
27762014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2777
2778 PR other/62008
2779 * c-parser.c (c_parser_array_notation): Check for correct
2780 type of an array added.
2781
04159acf
MP
27822014-08-19 Marek Polacek <polacek@redhat.com>
2783
2784 PR c++/62153
2785 * c-typeck.c (build_binary_op): If either operand of a comparison
2786 is a boolean expression, call maybe_warn_bool_compare.
2787
c77935ee
PP
27882014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2789
2790 PR c/45584
2791 * c-typeck.c (build_c_cast): Do a conversion even when the
2792 TYPE_MAIN_VARIANTs are the same.
2793
35aff4fb
MP
27942014-08-19 Marek Polacek <polacek@redhat.com>
2795
2796 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2797 pedwarn_c99 instead of pedwarn.
2798 (grokfield): Likewise.
2799 (warn_defaults_to): New function.
2800 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2801 Unconditionally call pedwarn_c99 instead of pedwarn.
2802 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2803 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2804 check flag_isoc11 before.
2805 * c-errors.c (pedwarn_c99): Change the return type to bool.
2806 Handle -Wc99-c11-compat.
2807 * c-parser.c (disable_extension_diagnostics): Handle
2808 warn_c99_c11_compat.
2809 (restore_extension_diagnostics): Likewise.
2810 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2811 instead of pedwarn, don't check flag_isoc11 before.
2812 (c_parser_declspecs): Likewise.
2813 (c_parser_alignas_specifier): Likewise.
2814 (c_parser_alignof_expression): Likewise.
2815 (c_parser_generic_selection): Likewise.
2816 * c-tree.h (pedwarn_c99): Update declaration.
2817 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2818 of pedwarn_c99.
2819
177cce46
MP
28202014-08-19 Marek Polacek <polacek@redhat.com>
2821
2822 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2823 to pedwarn_c90.
2824 * c-errors.c: Include "opts.h".
2825 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2826 * c-parser.c (disable_extension_diagnostics): Handle negative value
2827 of warn_c90_c99_compat, too.
2828 (restore_extension_diagnostics): Likewise.
2829 (c_parser_compound_statement_nostart): Pass
2830 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2831
6dc99c33
MP
28322014-08-12 Marek Polacek <polacek@redhat.com>
2833
2834 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2835 Add pedwarn.
2836 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2837 Likewise.
2838 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2839
3f8257db 28402014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
2841
2842 PR c/51849
2843 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2844 Call pedwarn_c90 instead of pedwarn.
2845 (check_bitfield_type_and_width): Likewise.
2846 (declspecs_add_qual): Likewise.
2847 (declspecs_add_type): Likewise.
2848 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2849 Adjust to only call pedwarn_c90.
2850 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2851 pedwarn_c90 instead of pedwarn.
2852 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2853 * c-parser.c (disable_extension_diagnostics): Handle
2854 warn_c90_c99_compat.
2855 (restore_extension_diagnostics): Likewise.
2856 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2857 pedwarn_c90 instead of pedwarn.
2858 (c_parser_initelt): Likewise.
2859 (c_parser_postfix_expression): Likewise.
2860 (c_parser_postfix_expression_after_paren_type): Likewise.
2861 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2862 * c-tree.h: Fix formatting.
2863 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2864 pedwarn_c90 instead of pedwarn.
2865
9f25a338
TS
28662014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2867
2868 * c-typeck.c: Remove include of pointer-set.h.
2869
044331a8
MP
28702014-08-07 Marek Polacek <polacek@redhat.com>
2871
2872 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2873
b787e7a2
TS
28742014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2875
2876 * c-typeck.c: Use hash_map instead of pointer_map.
2877
6e2830c3
TS
28782014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2879
2880 * c-decl.c: Use hash_set instead of pointer_set.
2881
a7ee52fb
IZ
28822014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2883
2884 PR middle-end/61455
2885 * c-array-notation.c (expand_array_notations): Handling
2886 of DECL_EXPR added.
2887
b4dfdc11
MG
28882014-07-31 Marc Glisse <marc.glisse@inria.fr>
2889
2890 PR c++/60517
2891 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2892 a local variable.
2893
976d5a22
TT
28942014-07-30 Tom Tromey <tromey@redhat.com>
2895
2896 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2897 field.
2898 (really_start_incremental_init, push_init_level): Initialize
2899 designator_depth.
2900 (pop_init_level): Set global designator_depth.
2901 (process_init_element): Check for designated_init attribute.
2902
30281de2
MP
29032014-07-20 Marek Polacek <polacek@redhat.com>
2904
2905 PR c/61852
2906 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2907 (implicitly_declare): Pass location to implicit_decl_warning.
2908
b108f48f
JJ
29092014-07-14 Jakub Jelinek <jakub@redhat.com>
2910
2911 PR middle-end/61294
2912 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2913 If non-NULL, call c_parser_check_literal_zero.
2914 (c_parser_check_literal_zero): New function.
2915 (c_parser_postfix_expression_after_primary): Adjust
2916 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2917
773ec47f
MP
29182014-07-06 Marek Polacek <polacek@redhat.com>
2919
2920 PR c/6940
2921 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2922 * c-tree.h (C_ARRAY_PARAMETER): Define.
2923 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2924 function parameter.
2925
22e1cf1c 29262014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 2927 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
2928
2929 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2930 releasing symbol.
2931
52ec0ea3
MP
29322014-07-01 Marek Polacek <polacek@redhat.com>
2933
2934 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2935 instead of 0 to WARN_FOR_ASSIGNMENT.
2936
d5c3d343
MP
29372014-07-01 Marek Polacek <polacek@redhat.com>
2938
2939 PR c/58286
2940 * c-typeck.c (convert_for_assignment): Pass
2941 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2942
6a7253a4
MP
29432014-06-30 Marek Polacek <polacek@redhat.com>
2944
2945 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2946 has no_sanitize_undefined attribute.
2947
5e88a8f4
IZ
29482014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2949
2950 PR middle-end/57541
2951 * c-array-notation.c (fix_builtin_array_notation_fn):
2952 Check for 0 arguments in builtin call. Check that bultin argument is
2953 correct.
2954 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2955 index.
2956
9698b078
SH
29572014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2958
2959 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2960 qualifiers in __auto_type for atomic types.
2961 (c_parser_typeof_specifier): Discard all type qualifiers in
2962 __typeof__ for atomic types.
2963
6e07c515
MP
29642014-06-25 Marek Polacek <polacek@redhat.com>
2965
2966 PR c/61162
2967 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2968 the return expression to c_finish_return.
2969
da6f124d
JJ
29702014-06-25 Jakub Jelinek <jakub@redhat.com>
2971
2972 * c-typeck.c (c_finish_omp_clauses): Make sure
2973 OMP_CLAUSE_LINEAR_STEP has correct type.
2974
c203e8a7
TS
29752014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2976
2977 * c-decl.c: Adjust.
2978
56ad0e38
JJ
29792014-06-24 Jakub Jelinek <jakub@redhat.com>
2980
2981 * c-parser.c (c_parser_omp_for_loop): For
2982 #pragma omp parallel for simd move lastprivate clause from parallel
2983 to for rather than simd.
2984
47c2554f
MP
29852014-06-23 Marek Polacek <polacek@redhat.com>
2986
2987 * c-typeck.c (parser_build_binary_op): Don't call
2988 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2989
56363ffd
JH
29902014-06-15 Jan Hubicka <hubicka@ucw.cz>
2991
2992 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2993 * c-decl.c (merge_decls): Likewise.
2994
d7ff7ae5
MP
29952014-06-09 Marek Polacek <polacek@redhat.com>
2996
2997 PR c/36446
2998 * c-typeck.c (error_init): Call inform instead of error_at.
2999 (pedwarn_init): Call inform instead of pedwarn.
3000 (warning_init): Call inform instead of warning_at.
3001
24d047a3
JH
30022014-06-07 Jan Hubicka <hubicka@ucw.cz>
3003
3004 * c-decl.c (merge_decls): Use set_decl_section_name.
3005 (duplicate_decls): Remove node if it exists.
3006
9bac5cbb
G
30072014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3008
3009 PR c/53119
3010 * c-typeck.c (push_init_level, process_init_element,
3011 pop_init_level): Correct check for zero initialization, move
3012 missing brace warning to respect zero initialization.
3013
8ffcdea8
MP
30142014-06-05 Marek Polacek <polacek@redhat.com>
3015
3016 PR c/56724
3017 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3018
742938c9
MP
30192014-06-05 Marek Polacek <polacek@redhat.com>
3020
3021 PR c/49706
3022 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3023 on the left hand side operand of a comparison.
3024
6447c55d
MP
30252014-06-05 Marek Polacek <polacek@redhat.com>
3026
3027 PR c/48062
3028 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3029 Print note only if the warning was printed.
3030
9dc7743c
IZ
30312014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3032
3033 PR c/58942
3034 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3035 with a pointer.
3036
fedfecef
MP
30372014-06-03 Marek Polacek <polacek@redhat.com>
3038
3039 PR c/60439
3040 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3041 c_start_case.
3042 * c-tree.h (c_start_case): Update.
3043 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3044 switch condition has boolean value.
3045
9b2b7279
AM
30462014-06-02 Andrew MacLeod <amacleod@redhat.com>
3047
3048 * c-decl.c: Include builtins.h.
3049 * c-parser.c: Likewise.
3050
5c1bc275
MP
30512014-05-27 Marek Polacek <polacek@redhat.com>
3052
3053 PR c/56724
3054 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3055 error and warning calls to error_at and warning_at. Pass location of
3056 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3057 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3058 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3059
97563bc8
IZ
30602014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3061
3062 PR c/61191
3063 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3064 function parameters.
3065
aede2c10
JH
30662014-05-23 Jan Hubicka <hubicka@ucw.cz>
3067
3068 * c-decl.c (merge_decls): Preserve symtab node pointers.
3069 (duplicate_decls): Free new decl.
3070
edbba2ce
TS
30712014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3072
f3316c6d
TS
3073 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3074 initialization.
3075
edbba2ce
TS
3076 * c-parser.c (c_parser_omp_target): Return bool values.
3077
68c81f24
TS
30782014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3079
3080 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3081 num_teams_loc variable to num_thread_limit_loc.
3082
632f2871
RS
30832014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3084
3085 * c-array-notation.c (expand_array_notations): Use void_node
3086 instead of void_zero_node.
3087
766090c2
TS
30882014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3089
3090 * c-decl.c (finish_struct): Adjust.
3091 (finish_enum): Likewise.
3092 (bind): Adjust.
3093 (record_inline_static): Likewise.
3094 (push_scope): Likewise.
3095 (make_label): Likewise.
3096 (lookup_label_for_goto): Likewise.
3097 (finish_struct): Likewise.
3098 (finish_enum): Likewise.
3099 (store_parm_decls): Likewise.
3100 (c_push_function_context): Likewise.
3101 * c-lang.h: Remove usage of variable_size gty attribute.
3102 * c-parser.c (c_parse_init): Adjust.
3103 (c_parse_file): Likewise.
3104
2b107f6b
MP
31052014-05-13 Marek Polacek <polacek@redhat.com>
3106
3107 PR c/61162
3108 * c-typeck.c (convert_for_assignment): Pass location to
3109 WARN_FOR_ASSIGNMENT instead of input_location.
3110
d033409e
MP
31112014-05-10 Marek Polacek <polacek@redhat.com>
3112
3113 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3114 maybe_warn_string_init.
3115 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3116 maybe_warn_string_init.
3117 * c-tree.h (maybe_warn_string_init): Update declaration.
3118 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3119 Call pedwarn_init with loc instead of with input_location.
3120 (digest_init): Pass init_loc to maybe_warn_string_init.
3121 (pop_init_level): Call pedwarn_init with loc instead of with
3122 input_location.
3123 (set_init_index): Likewise.
3124 (process_init_element): Likewise.
3125
ea58ef42
MP
31262014-05-09 Marek Polacek <polacek@redhat.com>
3127
3128 PR c/61096
3129 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3130 (c_parser_initelt): Pass location to set_init_label. Pass array index
3131 location to set_init_index.
3132 * c-tree.h (push_init_level): Update declaration.
3133 (pop_init_level): Likewise.
3134 (set_init_index): Likewise.
3135 (set_init_label): Likewise.
3136 * c-typeck.c (error_init): Add location parameter. Call error_at
3137 instead of error.
3138 (digest_init): Pass init_loc to error_init.
3139 (really_start_incremental_init):
3140 (push_init_level): Add location parameter. Pass loc to pop_init_level
3141 and error_init.
3142 (pop_init_level): Likewise.
3143 (set_designator): Add location parameter. Pass loc to pop_init_level,
3144 push_init_level, and error_init.
3145 (set_init_index): Add location parameter. Pass loc to error_init and
3146 set_designator.
3147 (set_init_label): Likewise.
3148 (output_init_element): Pass loc to error_init.
3149 (process_init_element): Pass loc to error_init, pop_init_level,
3150 pedwarn_init, and push_init_level.
3151
661a0813
MP
31522014-05-09 Marek Polacek <polacek@redhat.com>
3153
3154 PR c/50459
3155 * c-parser.c (c_parser_attributes): Parse the arguments as an
3156 expression-list if the attribute takes identifier.
3157
2793eeab
MP
31582014-05-08 Marek Polacek <polacek@redhat.com>
3159
3160 PR c/61053
3161 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3162 TYPE_ALIGN_UNIT.
3163
f827930a
MP
31642014-05-08 Marek Polacek <polacek@redhat.com>
3165
3166 PR c/61077
3167 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3168 of main.
3169
1d60af08
KZ
31702014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3171 Mike Stump <mikestump@comcast.net>
3172 Richard Sandiford <rdsandiford@googlemail.com>
3173
3174 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3175 (finish_enum): Use wide-int interfaces.
3176 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3177 * c-typeck.c (build_c_cast): Likewise.
3178 (set_nonincremental_init_from_string): Likewise.
3179 (c_tree_equal): Likewise.
3180
a0e24419
MP
31812014-05-02 Marek Polacek <polacek@redhat.com>
3182
3183 PR c/25801
3184 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3185 Return size_one_node when the type is not complete.
3186 (pointer_diff): Remove comment.
3187 (build_unary_op): Improve error messages.
3188
19fc9faa
MP
31892014-05-02 Marek Polacek <polacek@redhat.com>
3190
3191 * c-typeck.c (c_finish_return): Separate warning_at calls.
3192
63bc4e87
MP
31932014-05-02 Marek Polacek <polacek@redhat.com>
3194
3195 * c-tree.h (error_init): Remove declaration.
3196 (pedwarn_init): Likewise.
3197 * c-typeck.c (error_init): Make static and move above.
3198 (pedwarn_init): Likewise.
3199 (warning_init): Move above.
3200 (maybe_warn_string_init): Likewise.
3201
4bd2511b
JL
32022014-05-01 Jeff Law <law@redhat.com>
3203
3204 Revert:
3205
3206 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3207 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3208 avoid goto.
3209
6a358dcb
MP
32102014-05-02 Marek Polacek <polacek@redhat.com>
3211
3212 PR c/60784
3213 * c-typeck.c (push_init_level): Set constructor_designated to
3214 p->designated for structures.
3215
ae5ebda4
MP
32162014-05-01 Marek Polacek <polacek@redhat.com>
3217
3218 PR c/60915
3219 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3220 function-definition has an attribute after the declarator.
3221
96b40f8d
MP
32222014-05-01 Marek Polacek <polacek@redhat.com>
3223
3224 PR c/60257
3225 * c-typeck.c (warning_init): Add location_t parameter. Call
3226 warning_at instead of warning.
3227 (push_init_level): Pass input_location to warning_init.
3228 (add_pending_init): Add location_t parameter. Pass loc to
3229 warning_init.
3230 (set_nonincremental_init): Pass input_location to add_pending_init.
3231 (set_nonincremental_init_from_string): Likewise.
3232 (output_init_element): Pass loc to warning_init and to
3233 add_pending_init.
3234
32e00768
MP
32352014-05-01 Marek Polacek <polacek@redhat.com>
3236
3237 PR c/43395
3238 * c-typeck.c (c_finish_return): Distinguish between label and variable
3239 when warning about returning local address.
3240
c9379ce2
MP
32412014-05-01 Marek Polacek <polacek@redhat.com>
3242
3243 PR c/29467
3244 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3245 in C89 mode.
3246
d00887e8
MP
32472014-05-01 Marek Polacek <polacek@redhat.com>
3248
3249 PR c/43245
3250 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3251 instead of 0 to WARN_FOR_QUALIFIERS.
3252
5436fa2e
MP
32532014-05-01 Marek Polacek <polacek@redhat.com>
3254
3255 PR c/56989
3256 * c-typeck.c (default_conversion): Use better location for
3257 error call.
3258
f8ed5150
MP
32592014-04-30 Marek Polacek <polacek@redhat.com>
3260
3261 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3262 also when SANITIZE_FLOAT_DIVIDE is on.
3263
8337d1db
MP
32642014-04-30 Marek Polacek <polacek@redhat.com>
3265
3266 PR c/60139
3267 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3268 and pedwarn_init. Use loc insted of input_location.
3269
c4bdc42f
MP
32702014-04-30 Marek Polacek <polacek@redhat.com>
3271
3272 PR c/60351
3273 * c-typeck.c (build_binary_op): Use location when warning about
3274 shift count.
3275
45484dcf
MP
32762014-04-25 Marek Polacek <polacek@redhat.com>
3277
3278 PR c/18079
3279 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3280 always_inline/noinline and hot/cold attributes.
3281
34cf811f
MP
32822014-04-25 Marek Polacek <polacek@redhat.com>
3283
3284 PR c/60114
3285 * c-parser.c (c_parser_initelt): Pass input_location to
3286 process_init_element.
3287 (c_parser_initval): Pass loc to process_init_element.
3288 * c-tree.h (process_init_element): Adjust declaration.
3289 * c-typeck.c (push_init_level): Pass input_location to
3290 process_init_element.
3291 (pop_init_level): Likewise.
3292 (set_designator): Likewise.
3293 (output_init_element): Add location_t parameter. Pass loc to
3294 digest_init.
3295 (output_pending_init_elements): Pass input_location to
3296 output_init_element.
3297 (process_init_element): Add location_t parameter. Pass loc to
3298 output_init_element.
3299
42056eac
JJ
33002014-04-24 Jakub Jelinek <jakub@redhat.com>
3301
3302 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3303 atomic-clause, allow comma in between atomic-clause and
3304 seq_cst.
3305
e162a134
JJ
33062014-04-22 Jakub Jelinek <jakub@redhat.com>
3307
3308 PR c/59073
3309 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3310 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3311
2f6babac
IZ
33122014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3313
3314 PR middle-end/60469
3315 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3316 create_tmp_var instead build_decl for creating temps.
3317 (build_array_notation_expr): Likewise.
3318 (fix_conditional_array_notations_1): Likewise.
3319 (fix_array_notation_expr): Likewise.
3320 (fix_array_notation_call_expr): Likewise.
3321
8edbfaa6
JJ
33222014-03-28 Jakub Jelinek <jakub@redhat.com>
3323
3324 PR c++/60689
3325 * c-tree.h (c_build_function_call_vec): New prototype.
3326 * c-typeck.c (build_function_call_vec): Don't call
3327 resolve_overloaded_builtin here.
3328 (c_build_function_call_vec): New wrapper function around
3329 build_function_call_vec. Call resolve_overloaded_builtin here.
3330 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3331 Call c_build_function_call_vec instead of build_function_call_vec.
3332 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3333 * c-decl.c (finish_decl): Likewise.
3334
7485aeea
MLI
33352014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3336
3337 PR c/55383
3338 * c-typeck.c: Use correct format string in cast-qual warning
3339
b17a8b07
TS
33402014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3341
3342 * c-decl.c (c_decl_attributes): Use
3343 lang_hooks.types.omp_mappable_type.
3344 * c-typeck.c (c_finish_omp_clauses): Likewise.
3345
3af9c5e9
MP
33462014-03-06 Marek Polacek <polacek@redhat.com>
3347
3348 PR c/60197
3349 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3350 of checking tree code.
3351
1c9f5f33
PK
33522014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3353
3354 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3355 (c_parser_parameter_declaration): Likewise.
3356
cc28fc7f
MP
33572014-02-19 Marek Polacek <polacek@redhat.com>
3358
3359 PR c/60195
3360 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3361 Call mark_exp_read on exp.value.
3362 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3363 TREE_ADDRESSABLE on old instead of val.
3364 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3365
b581c05c
PK
33662014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3367
3368 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3369 C_EXPR_APPEND by vec_safe_push.
3370 * c-tree.h (C_EXPR_APPEND): Remove.
3371
81e5eca8
MP
33722014-01-31 Marek Polacek <polacek@redhat.com>
3373
3374 PR c/59963
3375 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3376 build_function_call_vec.
3377 (build_function_call): Likewise.
3378 (build_atomic_assign): Likewise.
3379 (build_function_call_vec): Add arg_loc parameter. Use it.
3380 (convert_arguments): Likewise.
3381 (convert_for_assignment): Rename rhs_loc to expr_loc.
3382 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3383 (c_parser_objc_keywordexpr): Likewise.
3384 (c_parser_postfix_expression_after_primary): Call
3385 build_function_call_vec with expr_loc rather than op_loc.
3386 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3387 build_function_call_vec.
3388 (c_parser_expr_list): Add locations parameter. Fill it with locations
3389 of function arguments.
3390 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3391
68fca595
MP
33922014-01-30 Marek Polacek <polacek@redhat.com>
3393
3394 PR c/59940
3395 * c-typeck.c (build_function_call_vec): Use loc parameter.
3396 (convert_arguments): Add location parameter. Use it.
3397 (ep_convert_and_check): Likewise.
3398 (build_atomic_assign): Adjust convert_for_assignment call.
3399 (build_modify_expr): Likewise.
3400 (digest_init): Likewise.
3401 (c_finish_return): Likewise.
3402 (build_conditional_expr): Adjust ep_convert_and_check calls.
3403 (convert_for_assignment): Add rhs_loc parameter. Use it.
3404 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3405 calls.
3406
fa337f3a
RB
34072014-01-30 Richard Biener <rguenther@suse.de>
3408
3409 PR c/59905
3410 * c-typeck.c (build_function_call_vec): Do not replace calls
3411 to a function via an incompatible type with a runtime abort.
3412
b72271b9
BI
34132014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3414
3415 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3416 flag_enable_cilkplus with flag_cilkplus.
3417 (c_parser_direct_declarator_inner): Likewise.
3418 (c_parser_attribute_any_word): Likewise.
3419 (c_parser_attributes): Likewise.
3420 (c_parser_compound_statement): Likewise.
3421 (c_parser_statement_after_labels): Likewise.
3422 (c_parser_if_statement): Likewise.
3423 (c_parser_switch_statement): Likewise.
3424 (c_parser_do_statement): Likewise.
3425 (c_parser_for_statement): Likewise.
3426 (c_parser_unary_expression): Likewise.
3427 (c_parser_postfix_expression): Likewise.
3428 (c_parser_postfix_expression_after_primary): Likewise.
3429 (c_parser_postfix_expression_after_primary): Likewise.
3430 (c_parser_omp_clause_name): Likewise.
3431 (c_finish_omp_declare_simd): Likewise.
3432 (c_parser_cilk_verify_simd): Likewise.
3433 * c-typeck.c (build_array_ref): Likewise.
3434 (build_function_call_vec): Likewise.
3435 (convert_arguments): Likewise.
3436 (build_compound_expr): Likewise.
3437 (c_finish_return): Likewise.
3438 (c_finish_if_stmt): Likewise.
3439 (c_finish_loop): Likewise.
3440 (build_binary_op): Likewise.
3441
393e8e8b
MP
34422014-01-23 Marek Polacek <polacek@redhat.com>
3443
3444 PR c/59846
3445 * c-typeck.c (parser_build_binary_op): Use location instead of
3446 input_location.
3447 (build_binary_op): Pass location to shorten_compare.
3448
f04dda30
MP
34492014-01-23 Marek Polacek <polacek@redhat.com>
3450
3451 PR c/58346
3452 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3453 an empty aggregate.
3454
789eadcd
MP
34552014-01-23 Marek Polacek <polacek@redhat.com>
3456
3457 PR c/59871
3458 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3459 of a comma expression.
3460 (emit_side_effect_warnings): Likewise.
3461
40f14e9f
BI
34622014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3463
3464 PR c/59825
3465 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3466 function to use walk_tree and moved a lot of its functionality to
3467 expand_array_notations.
3468 (expand_array_notations): New function.
3469
74558dd9
BI
34702014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3471
3472 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3473 attribute an attribute without value.
3474
652fea39
JJ
34752014-01-23 Jakub Jelinek <jakub@redhat.com>
3476
3477 PR middle-end/58809
3478 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3479 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3480
f34f1c87
MP
34812014-01-22 Marek Polacek <polacek@redhat.com>
3482
3483 PR c/59891
3484 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3485 of remove_c_maybe_const_expr on op1 and op2.
3486
241f845a
JJ
34872014-01-15 Jakub Jelinek <jakub@redhat.com>
3488
3489 PR c/58943
3490 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3491 effects, preevaluate rhs using SAVE_EXPR first.
3492
9a74f20c
BI
34932014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3494
3495 PR c++/59631
3496 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3497 statements with if-elseif statements.
3498
96066ce1
MP
34992014-01-06 Marek Polacek <polacek@redhat.com>
3500
3501 PR c/57773
3502 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3503 defined bit-field types only in ISO C.
3504
23a5b65a
RS
35052014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3506
3507 Update copyright years
3508
f9030485
RS
35092014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3510
3511 * c-array-notation.c: Use the standard form for the copyright notice.
3512
41958c28
BI
35132013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3514
3515 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3516 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3517 field in parser is not empty. If not-empty, call the function
3518 c_parser_finish_omp_declare_simd.
3519 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3520 between SIMD-enabled functions and #pragma simd. Added new parameter.
3521 (c_parser_cilk_all_clauses): Modified the usage of the function
3522 c_parser_cilk_clause_vectorlength as mentioned above.
3523 (c_parser_cilk_simd_fn_vector_attrs): New function.
3524 (c_finish_cilk_simd_fn_tokens): Likewise.
3525 (is_cilkplus_vector_p): Likewise.
3526 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3527 "nomask," and "mask" strings in clause name.
3528 (c_parser_omp_all_clauses): Added 3 new case statements:
3529 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3530 PRAGMA_CILK_CLAUSE_NOMASK.
3531 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3532 check for vector attribute and if so call the function
3533 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3534 called the function c_finish_cilk_simd_fn_tokens.
3535 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3536 parser field is non-empty. If so, parse them as you would parse
3537 the omp declare simd pragma.
3538 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3539 Added a check when step is a parameter and flag it as error.
3540 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3541 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3542 pragma_omp_clause.
3543
cef0fd0e
TS
35442013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3545
3546 * c-parser.c (c_parser_omp_parallel): Fix description.
3547
12893402
BI
35482013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3549
3550 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3551 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3552 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3553 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3554
296674db
JM
35552013-12-04 Joseph Myers <joseph@codesourcery.com>
3556
3557 PR c/52023
3558 * c-parser.c (c_parser_alignas_specifier): Use
3559 c_sizeof_or_alignof_type instead of c_alignof.
3560 (c_parser_alignof_expression): Likewise, with min_alignof
3561 parameter depending on alignof spelling used.
3562
edd28054
MP
35632013-12-04 Marek Polacek <polacek@redhat.com>
3564
3565 PR c/54113
3566 * c-decl.c (start_function): Don't warn for missing prototype for
3567 inline functions.
3568
da0fc454
MP
35692013-12-03 Marek Polacek <polacek@redhat.com>
3570
3571 PR c/59351
3572 * c-decl.c (build_compound_literal): Allow compound literals with
3573 empty initial value.
3574
4c2ecab0
JM
35752013-12-02 Joseph Myers <joseph@codesourcery.com>
3576
3577 PR c/58235
3578 * c-typeck.c (build_modify_expr): Diagnose assignment to
3579 expression with array type.
3580
340baef7
JM
35812013-11-29 Joseph Myers <joseph@codesourcery.com>
3582
3583 PR c/42262
3584 * c-typeck.c (process_init_element): Do not treat a string as
3585 initializing a whole array when used with a designator for an
3586 individual element.
3587
6763b9f7
JM
35882013-11-29 Joseph Myers <joseph@codesourcery.com>
3589
3590 PR c/57574
3591 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3592 an inline function following a static declaration.
3593
e7bd1de1
JJ
35942013-11-28 Jakub Jelinek <jakub@redhat.com>
3595
3596 PR c/59310
3597 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3598 to p_name before calling c_parser_omp_teams instead of after.
3599 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3600 argument. Remove unused p_name variable.
3601
0136f8f0
AH
36022013-11-27 Aldy Hernandez <aldyh@redhat.com>
3603 Jakub Jelinek <jakub@redhat.com>
3604
3605 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3606 external_scope is NULL.
3607
241b71bb
TV
36082013-11-27 Tom de Vries <tom@codesourcery.com>
3609 Marc Glisse <marc.glisse@inria.fr>
3610
3611 PR c++/59032
3612 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3613
2fb9a547
AM
36142013-11-22 Andrew MacLeod <amacleod@redhat.com>
3615
3616 * c-typeck.c: Add required include files from gimple.h.
3617
8400e75e
DM
36182013-11-22 David Malcolm <dmalcolm@redhat.com>
3619
3620 * c-decl.c (define_label, shadow_tag_warned)
3621 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3622 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3623 (declspecs_add_type): Remove use of in_system_header macro.
3624 * c-parser.c (c_parser_unary_expression): Likewise.
3625 * c-typeck.c (store_init_value, process_init_element)
3626 (c_start_case): Likewise.
3627
3628 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3629 macro.
3630
3631 * c-parser.c (c_parser_set_source_position_from_token): Remove
3632 reference to in_system_header from comment.
3633
386b1f1f
RS
36342013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3635
3636 * c-decl.c (grokdeclarator): Update comment to refer to
3637 tree_to_[su]hwi rather than tree_low_cst.
3638
ae7e9ddd
RS
36392013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3640
3641 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3642 tree_to_uhwi throughout.
3643
9439e9a1
RS
36442013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3645
3646 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3647 throughout.
3648
9541ffee
RS
36492013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3650
3651 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3652 throughout.
3653
c02065fc
AH
36542013-11-15 Aldy Hernandez <aldyh@redhat.com>
3655
3656 * c-parser.c (c_parser_cilk_simd): New.
3657 (c_parser_cilk_verify_simd): New.
3658 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3659 (c_parser_omp_for_loop): Add case for NE_EXPR.
3660 Set c_break_label for CILK_SIMD.
3661 (c_parser_cilk_clause_vectorlength): New.
3662 (c_parser_cilk_clause_linear): New.
3663 (c_parser_cilk_clause_name): New.
3664 (c_parser_cilk_all_clauses): New.
3665 * c-typeck.c (build_unary_op): Pass location argument to
3666 readonly_error.
3667 (build_modify_expr): Same.
3668 (build_asm_expr): Same.
3669 (c_finish_bc_stmt): Error on break/continue in loops.
3670
18f429e2
AM
36712013-11-14 Andrew MacLeod <amacleod@redhat.com>
3672
3673 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3674
d8a2d370
DN
36752013-11-14 Diego Novillo <dnovillo@google.com>
3676
3677 * c-decl.c: Include print-tree.h.
3678 Include stor-layout.h.
3679 Include varasm.h.
3680 Include attribs.h.
3681 Include stringpool.h.
3682 * c-lang.c: Include fold-const.h.
3683 * c-parser.c: Include stringpool.h.
3684 Include attribs.h.
3685 Include stor-layout.h.
3686 Include varasm.h.
3687 Include trans-mem.h.
3688 * c-typeck.c: Include stor-layout.h.
3689 Include trans-mem.h.
3690 Include varasm.h.
3691 Include stmt.h.
3692
38b7bc7f
JM
36932013-11-13 Joseph Myers <joseph@codesourcery.com>
3694
3695 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3696 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3697 __auto_type.
3698 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3699 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3700 RID_AUTO_TYPE.
3701 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3702 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3703 (c_parser_declarator, c_parser_direct_declarator_inner)
3704 (c_parser_parameter_declaration, c_parser_type_name): All callers
3705 changed.
3706 (c_parser_declaration_or_fndef): Handle declarations with type
3707 determined from the initializer.
3708
45b0be94
AM
37092013-11-12 Andrew MacLeod <amacleod@redhat.com>
3710
18f429e2 3711 * c-typeck.c: Include gimplify.h.
45b0be94 3712
582d9b50
JM
37132013-11-12 Joseph Myers <joseph@codesourcery.com>
3714
3715 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3716 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3717 comment.
3718 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3719 or _Thread_local as appropriate in diagnostics.
3720 (build_null_declspecs): Initialize ret->thread_gnu_p.
3721 (declspecs_add_scspec): Handle either __thread or _Thread_local
3722 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3723 pedantic. Do not disallow _Thread_local extern and _Thread_local
3724 static.
3725
267bac10
JM
37262013-11-07 Joseph Myers <joseph@codesourcery.com>
3727 Andrew MacLeod <amacleod@redhat.com>
3728
3729 * c-aux-info.c (gen_type): Handle atomic qualifier.
3730 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3731 qualifiers when compating types.
3732 (shadow_tag_warned): Handle atomic_p in declspecs.
3733 (quals_from_declspecs): Likewise.
3734 (start_decl): Use c_type_promotes_to when promoting argument
3735 types.
3736 (grokdeclarator): Handle _Atomic.
3737 (get_parm_info): Diagnose any qualifier on "void" as only
3738 parameter.
3739 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3740 comparing types. Use c_type_promotes_to when promoting argument
3741 types.
3742 (finish_function): Use c_type_promotes_to when promoting argument
3743 types.
3744 (build_null_declspecs): Handle atomic_p in declspecs.
3745 (declspecs_add_qual): Handle RID_ATOMIC.
3746 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3747 (c_token_starts_declspecs): Handle RID_ATOMIC.
3748 (c_parser_declspecs): Handle atomic type specifiers and
3749 qualifiers.
3750 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3751 from types of expressions with atomic type.
3752 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3753 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3754 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3755 (c_parser_statement_after_labels, c_parser_switch_statement)
3756 (c_parser_for_statement, c_parser_expr_no_commas)
3757 (c_parser_conditional_expression, c_parser_binary_expression)
3758 (c_parser_cast_expression, c_parser_unary_expression)
3759 (c_parser_postfix_expression)
3760 (c_parser_postfix_expression_after_primary, c_parser_expression):
3761 Use convert_lvalue_to_rvalue.
3762 (c_parser_expression_conv, c_parser_expr_list): Document
3763 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3764 (c_parser_objc_synchronized_statement): Use
3765 convert_lvalue_to_rvalue.
3766 (c_parser_objc_selector): Handle RID_ATOMIC.
3767 (c_parser_objc_receiver, c_parser_array_notation): Use
3768 convert_lvalue_to_rvalue.
3769 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3770 _Atomic (type-name).
3771 (struct c_declspecs): Add atomic_p field.
3772 (convert_lvalue_to_rvalue): Declare.
3773 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3774 corresponding atomic types.
3775 (qualify_type): Don't add _Atomic qualifiers from second argument.
3776 (comp_target_types): Do not allow _Atomic mismatches.
3777 (type_lists_compatible_p): Do not remove atomic qualifiers when
3778 comparing types.
3779 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3780 (build_atomic_assign): New functions.
3781 (build_unary_op): Use build_atomic_assign for atomic increment and
3782 decrement.
3783 (build_conditional_expr): Do not treat _Atomic void as a qualified
3784 version of void.
3785 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3786 (find_anonymous_field_with_type, convert_to_anonymous_field)
3787 (convert_for_assignment): Do not remove atomic qualifiers when
3788 comparing types.
3789 (digest_init): Do not accept initialization of arrays of atomic
3790 elements by string constants.
3791 (build_asm_expr): Use convert_lvalue_to_rvalue.
3792 (build_binary_op): Do not treat _Atomic void as a qualified
3793 version of void.
3794
0c249d4b
DD
37952013-11-06 DJ Delorie <dj@redhat.com>
3796
3797 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3798 both explicit and builtin, print the location of the explicit one.
3799
6d7f7e0a
TB
38002013-11-05 Tobias Burnus <burnus@net-b.de>
3801
3802 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3803 c_parser_omp_distribute, c_parser_omp_teams,
3804 c_parser_omp_target, c_parser_omp_declare): Handle
3805 -fopenmp-simd.
3806
b906f4ca
MP
38072013-11-03 Marek Polacek <polacek@redhat.com>
3808
3809 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3810
ee1d5a02
JJ
38112013-11-01 Jakub Jelinek <jakub@redhat.com>
3812
3813 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3814 check_dup_generic at the end, unless remove is true.
3815 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3816 remove = true;.
3817 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3818
5a9785fb
JJ
38192013-10-31 Jakub Jelinek <jakub@redhat.com>
3820
3821 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3822 with decl that is not pointer nor array.
3823
939b37da
BI
38242013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3825
3826 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3827 a spawning function is found.
3828 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3829 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3830 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3831 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3832 case.
3833 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3834 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3835 expr.
3836 (c_finish_return): Added a check to reject _Cilk_spawn in return
3837 expression.
3838 (build_cilk_spawn): New function.
3839 (build_cilk_sync): Likewise.
3840 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3841
d4af74d4
TB
38422013-10-27 Tobias Burnus <burnus@net-b.de>
3843
3844 PR other/33426
3845 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3846 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3847 (c_parser_statement_after_labels): Update calls.
3848
d73749df 38492013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3850
3851 PR other/33426
3852 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3853 Handle PRAGMA_IVDEP.
3854 (c_parser_statement_after_labels): Update call.
3855
f28aa681
MP
38562013-10-24 Marek Polacek <polacek@redhat.com>
3857
3858 * c-parser.c (c_parser_struct_declaration): Add a comment.
3859 (c_parser_declarator): Don't allow _Alignas here.
3860
0645c1a2
AM
38612013-10-17 Andrew MacLeod <amacleod@redhat.com>
3862
3863 * c-parser.c: Include omp-low.h.
3864 * c-typeck.c: Likewise.
3865
568a31f2
MP
38662013-10-17 Marek Polacek <polacek@redhat.com>
3867
3868 PR c/58267
3869 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3870 Document syntax of the array-declarator.
3871 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3872 are not permitted.
3873 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3874 (c_parser_struct_declaration): Likewise.
3875 (c_parser_declarator): Likewise.
3876 (c_parser_direct_declarator_inner): Likewise.
3877 (c_parser_parameter_declaration): Likewise.
3878 (c_parser_type_name): Likewise.
3879
acf0174b
JJ
38802013-10-11 Jakub Jelinek <jakub@redhat.com>
3881
3882 * c-lang.h (current_omp_declare_target_attribute): New extern
3883 decl.
3884 * c-parser.c: Include c-lang.h.
3885 (struct c_parser): Change tokens to c_token *.
3886 Add tokens_buf field. Change tokens_avail type to unsigned int.
3887 (c_parser_consume_token): If parser->tokens isn't
3888 &parser->tokens_buf[0], increment parser->tokens.
3889 (c_parser_consume_pragma): Likewise.
3890 (enum pragma_context): Add pragma_struct and pragma_param.
3891 (c_parser_external_declaration): Adjust
3892 c_parser_declaration_or_fndef caller.
3893 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3894 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3895 Adjust recursive call.
3896 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3897 of pragma_external.
3898 (c_parser_parameter_declaration): Use pragma_param instead of
3899 pragma_external.
3900 (c_parser_compound_statement_nostart, c_parser_label,
3901 c_parser_for_statement): Adjust
3902 c_parser_declaration_or_fndef callers.
3903 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3904 it through to c_parser_conditional_expression.
3905 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3906 pass it through to c_parser_binary_expression. Adjust recursive
3907 call.
3908 (c_parser_binary_expression): Remove prec argument, add
3909 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3910 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3911 binop matches it, use build2 instead of parser_build_binary_op.
3912 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3913 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3914 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3915 Handle pragma_struct and pragma_param the same as pragma_external.
3916 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3917 (c_parser_omp_variable_list): Parse array sections for
3918 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3919 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3920 (c_parser_omp_clause_reduction): Handle user defined reductions.
3921 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3922 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3923 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3924 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3925 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3926 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3927 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3928 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3929 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3930 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3931 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3932 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3933 (c_parser_omp_for_loop): Add CODE argument, pass it through
3934 to c_finish_omp_for. Change last argument to cclauses,
3935 and adjust uses to grab parallel clauses from the array of all
3936 the split clauses. Adjust c_parser_binary_expression,
3937 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3938 (omp_split_clauses): New function.
3939 (c_parser_omp_simd): New function.
3940 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3941 Allow the function to be called also when parsing combined constructs,
3942 and call c_parser_omp_simd when parsing for simd.
3943 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3944 #pragma omp section, require exactly one structured-block instead of
3945 sequence of statements.
3946 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3947 Allow the function to be called also when parsing combined constructs.
3948 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3949 Allow the function to be called also when parsing combined
3950 constructs.
3951 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3952 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3953 c_parser_omp_teams, c_parser_omp_target_data,
3954 c_parser_omp_target_update, c_parser_omp_target,
3955 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3956 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3957 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3958 (c_parser_omp_construct): Add p_name and mask vars. Handle
3959 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3960 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3961 and c_parser_omp_sections callers.
3962 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3963 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3964 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3965 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3966 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3967 OMP_CLAUSE_DEPEND.
3968 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3969 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3970 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3971 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3972 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3973 * c-typeck.c: Include tree-inline.h.
3974 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3975 handle_omp_array_sections_1, handle_omp_array_sections,
3976 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3977 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3978 user defined reductions.
3979 (c_tree_equal): New function.
3980 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3981 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3982 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3983 c_check_omp_declare_reduction_r): New prototypes.
3984 * c-decl.c (current_omp_declare_target_attribute): New variable.
3985 (c_decl_attributes): New function.
3986 (start_decl, start_function): Use it instead of decl_attributes.
3987 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3988 c_omp_reduction_decl, c_omp_reduction_lookup,
3989 c_check_omp_declare_reduction_r): New functions.
3990
0a6c2227
TT
39912013-09-25 Tom Tromey <tromey@redhat.com>
3992
3993 * Make-lang.in (c/gccspec.o): Remove.
3994 (CFLAGS-c/gccspec.o): New variable.
3995 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3996 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3997 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3998
f3bc55f0
TT
39992013-09-25 Tom Tromey <tromey@redhat.com>
4000
4001 * Make-lang.in (c/gccspec.o): Don't use subshell.
4002
a24d975c
MP
40032013-09-18 Marek Polacek <polacek@redhat.com>
4004
4005 PR sanitize/58443
4006 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4007 Remove unnecessary check.
4008
ce6923c5
MP
40092013-09-18 Marek Polacek <polacek@redhat.com>
4010
4011 PR sanitizer/58411
4012 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4013 no_sanitize_undefined attribute.
4014
a1e51df9
KT
40152013-09-13 Kai Tietz <ktietz@redhat.com>
4016
4017 PR target/57848
4018 * c-decl.c (c_builtin_function_ext_scope): Remove
4019 wrong assumption that it is never called on prexisting
4020 symbol.
4021
0af94e6f
JR
40222013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4023
4024 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4025
20059c8b
GDR
40262013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4027
4028 * c-objc-common.c (c_tree_printer): Tidy.
4029
de5a5fa1
MP
40302013-08-30 Marek Polacek <polacek@redhat.com>
4031
4032 * c-typeck.c (build_binary_op): Add division by zero and shift
4033 instrumentation.
4034
2531a1d9 40352013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4036 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4037
6e2bcc98 4038 PR c/35649
2531a1d9
JR
4039 * c-typeck.c (c_common_type): Prefer double_type_node over
4040 other REAL_TYPE types with the same precision.
4041 (convert_arguments): Likewise.
4042
025311c4
GDR
40432013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4044
4045 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4046 (c_initialize_diagnostics): Call a destructor for the early printer.
4047
da6ca2b5
GDR
40482013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4049
4050 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4051 printer initialization.
4052
318cda85 40532013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4054
318cda85
BI
4055 PR c/57490
4056 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4057 check for truth values.
4058 (expand_array_notation_exprs): Added truth values case. Removed an
4059 unwanted else. Added for-loop to walk through subtrees in default
4060 case.
4061
b066401f
GDR
40622013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4063
4064 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4065
fb48aadc
JM
40662013-07-23 Joseph Myers <joseph@codesourcery.com>
4067
4068 * c-parser.c (struct c_generic_association): Fix typo.
4069
433cc7b0
TT
40702013-07-23 Tom Tromey <tromey@redhat.com>
4071 Joseph Myers <joseph@codesourcery.com>
4072
4073 * c-parser.c (struct c_generic_association): New.
4074 (c_generic_association_d): New typedef.
4075 (c_parser_generic_selection): New function.
4076 (c_parser_postfix_expression): Handle RID_GENERIC.
4077
26d40c3d
JM
40782013-07-13 Jason Merrill <jason@redhat.com>
4079
4080 PR c++/57793
4081 * c-decl.c (finish_struct): Check for too-large class.
4082
ecdbd01a 40832013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4084
4085 PR c/57821
4086 * c-typeck.c (set_init_index): When folding, check for index overflow.
4087
1141ed3f
BI
40882013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4089
4090 * c-parser.c (c_parser_array_notation): Removed rejection of array
4091 notations in an array of function pointers.
4092
713b46fa
BI
40932013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4094
4095 * c-array-notation.c (make_triplet_val_inv): New function.
4096 (create_cmp_incr): Likewise.
4097 (create_array_refs): Likewise.
4098 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4099 Also modularized common parts between functions and called the function.
4100 (build_array_notation_expr): Likewise.
4101 (fix_conditional_array_notations_1): Likewise.
4102 (fix_array_notation_expr): Likewise.
4103 (fix_array_notation_call_expr): Likewise.
4104
92f20202
MP
41052013-06-18 Marek Polacek <polacek@redhat.com>
4106
4107 PR c/57630
4108 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4109
73a23b06
BI
41102013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4111
4112 * c-array-notation.c (build_array_notation_expr): Reject array notation
4113 mismatch between LHS and RHS even inside a call_expr. Also, removed
4114 a couple while statements that were dead code.
4115
00b8517d
BI
41162013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4117
4118 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4119 excessive precision expressions in function parameters. Also removed
4120 couple unwanted while statements.
4121
1509bdda
BI
41222013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4123
4124 * c-array-notation.c (expand_array_notation_exprs): Added
4125 ARRAY_NOTATION_REF case.
4126
d60f1706
BI
41272013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4128
4129 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4130 function to c-family/array-notation-common.c.
4131 (is_cilkplus_reduce_builtin): Likewise.
4132 (find_rank): Likewise.
4133 (extract_array_notation_exprs): Likewise.
4134 (replace_array_notations): Likewise.
4135 (find_inv_trees): Likewise.
4136 (replace_inv_trees): Likewise.
4137 (contains_array_notation_expr): Likewise.
4138 (find_correct_array_notation_type): Likewise.
4139 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4140 (struct inv_list): Moved this to c-family/array-notation-common.c.
4141 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4142
6d6efbb3
BI
41432013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4144
4145 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4146 reduction functions outside the for-loop. Added a check if the fundecl
4147 is non-NULL. Finally, removed an unwanted if-statement, and made the
4148 body unconditional.
4149
25c22937
BI
41502013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4151
4152 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4153 condition of the if-statement matches the rank of else-block and then-
4154 block when array notations are used.
4155 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4156 expression after the entire function body is parsed.
4157 (c_parser_expr_no_commas): Delayed creating array notation expressions
4158 to the end of function parsing.
4159 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4160 whole if-statement instead of just the condition.
4161 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4162
edd25645
BI
41632013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4164
4165 PR c/57474
4166 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4167 array to NULL_TREE if they are unused. Also added a check for the
4168 field to be NULL before its fields are used in future.
4169
065ce7f1
RO
41702013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4171
4172 PR bootstrap/57450
4173 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4174 (build_array_notation_expr): Likewise.
4175
36536d79
BI
41762013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4177
4178 * c-typeck.c (build_array_ref): Added a check to see if array's
4179 index is greater than one. If true, then emit an error.
4180 (build_function_call_vec): Exclude error reporting and checking
4181 for builtin array-notation functions.
4182 (convert_arguments): Likewise.
4183 (c_finish_return): Added a check for array notations as a return
4184 expression. If true, then emit an error.
4185 (c_finish_loop): Added a check for array notations in a loop
4186 condition. If true then emit an error.
4187 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4188 (build_binary_op): Added a check for array notation expr inside
4189 op1 and op0. If present, we call another function to find correct
4190 type.
4191 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4192 * c-parser.c (c_parser_compound_statement): Check if array
4193 notation code is used in tree, if so, then transform them into
4194 appropriate C code.
4195 (c_parser_expr_no_commas): Check if array notation is used in LHS
4196 or RHS, if so, then build array notation expression instead of
4197 regular modify.
4198 (c_parser_postfix_expression_after_primary): Added a check for
4199 colon(s) after square braces, if so then handle it like an array
4200 notation. Also, break up array notations in unary op if found.
4201 (c_parser_direct_declarator_inner): Added a check for array
4202 notation.
4203 (c_parser_compound_statement): Added a check for array notation in
4204 a stmt. If one is present, then expand array notation expr.
4205 (c_parser_if_statement): Likewise.
4206 (c_parser_switch_statement): Added a check for array notations in
4207 a switch statement's condition. If true, then output an error.
4208 (c_parser_while_statement): Similarly, but for a while.
4209 (c_parser_do_statement): Similarly, but for a do-while.
4210 (c_parser_for_statement): Similarly, but for a for-loop.
4211 (c_parser_unary_expression): Check if array notation is used in a
4212 pre-increment or pre-decrement expression. If true, then expand
4213 them.
4214 (c_parser_array_notation): New function.
4215 * c-array-notation.c: New file.
4216 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4217
cd192ccc
MS
42182013-05-23 Mike Stump <mikestump@comcast.net>
4219
4220 * c-typeck.c (convert_for_assignment): Handle references to memory
4221 spaces better.
4222
427b248d
JM
42232013-05-16 Jason Merrill <jason@redhat.com>
4224
4225 * Make-lang.in (cc1$(exeext)): Use link mutex.
4226
44d90fe1
PC
42272013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4228
4229 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4230 to simply use OPT_Wpointer_arith.
4231 (build_unary_op): Likewise.
4232
4e7d7b3d
JJ
42332013-04-03 Jakub Jelinek <jakub@redhat.com>
4234
4235 PR c/19449
4236 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4237 argument. If set, or it temporarily for parsing of the first
4238 argument into force_folding_builtin_constant_p.
4239 (c_parser_postfix_expression): Adjust callers.
4240
839b422f
RB
42412013-03-21 Richard Biener <rguenther@suse.de>
4242
4243 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4244 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4245
2ee028f1
MP
42462013-02-12 Marek Polacek <polacek@redhat.com>
4247
4248 PR c/44938
4249 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4250 origtypes to NULL.
4251
8824edff
JJ
42522013-01-24 Jakub Jelinek <jakub@redhat.com>
4253
4254 PR c/56078
4255 * c-typeck.c (set_nonincremental_init_from_string): If
4256 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4257 returned false.
4258 (process_init_element): Likewise.
4259
eadd3d0d
JJ
42602012-12-20 Jakub Jelinek <jakub@redhat.com>
4261
4262 PR c++/55619
4263 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4264 argument, don't call default_function_array_conversion
4265 nor c_fully_fold here.
4266 (c_parser_asm_statement): Adjust callers.
4267 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4268 and outputs here, and call default_function_array_conversion
4269 on inputs that don't need to be addressable.
4270
f8a93a2e
JJ
42712012-12-18 Jakub Jelinek <jakub@redhat.com>
4272
4273 PR c/39464
4274 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4275 warning require that both c_common_unsigned_type as well as
4276 c_common_signed_type is the same for both mvl and mvr types.
4277
9771b263
DN
42782012-11-16 Diego Novillo <dnovillo@google.com>
4279
4280 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4281
4282 * c-common.c: Use new vec API in vec.h.
4283 * c-common.h: Likewise.
4284 * c-gimplify.c: Likewise.
4285 * c-pragma.c: Likewise.
4286 * c-pretty-print.c: Likewise.
4287 * c-pretty-print.h: Likewise.
4288 * c-semantics.c: Likewise.
4289 * c-decl.c: Likewise.
4290 * c-parser.c: Likewise.
4291 * c-tree.h: Likewise.
4292 * c-typeck.c: Likewise.
4293
880661a4
JW
42942012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4295
4296 PR c++/54930
4297 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4298
077d1abe
MLI
42992012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4300
4301 PR c/53066
4302 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4303 shadows a function, unless the variable is a function or a
4304 pointer-to-function.
4305
3a785c97
JJ
43062012-10-12 Jakub Jelinek <jakub@redhat.com>
4307
4308 PR c/54381
4309 * c-parser.c (struct c_tree_loc_pair): Removed.
4310 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4311 add location_t * and tree * arguments, fill in array of 3
4312 sizeof_arg trees and corresponding locs.
4313 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4314 c_parser_expr_list callers.
4315 (c_parser_postfix_expression_after_primary): Likewise. Pass
4316 array of 3 sizeof_arg trees and locs (corresponding to first
4317 3 arguments) to sizeof_pointer_memaccess_warning.
4318
703c8606
LC
43192012-10-09 Lawrence Crowl <crowl@google.com>
4320
4321 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4322 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4323 hash table.
4324
5d9de0d0
PC
43252012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4326
4327 PR c++/54194
4328 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4329 call.
4330
a212e43f
MG
43312012-10-09 Marc Glisse <marc.glisse@inria.fr>
4332
4333 PR c++/54427
4334 * c-typeck.c: Include c-common.h.
4335 (enum stv_conv): Moved to c-common.h.
4336 (scalar_to_vector): Moved to c-common.c.
4337 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4338 * Make-lang.in: c-typeck.c depends on c-common.h.
4339
3b78de56
AC
43402012-10-04 Arnaud Charlet <charlet@adacore.com>
4341
4342 * c-decl.c (c_write_global_declarations): Fix handling of
4343 -fdump-ada-spec*.
4344
78c60e3d
SS
43452012-09-30 Sharad Singhai <singhai@google.com>
4346
4347 * c-decl.c (c_write_global_declarations): Use a different method
4348 to determine if the dump has ben initialized.
4349
9f33203d
JM
43502012-09-14 Joseph Myers <joseph@codesourcery.com>
4351
4352 PR c/54552
4353 * c-typeck.c (c_cast_expr): When casting to a type requiring
4354 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4355 c_fully_fold first.
4356
a27d595d
JM
43572012-09-14 Joseph Myers <joseph@codesourcery.com>
4358
4359 PR c/54103
4360 * c-typeck.c (build_unary_op): Pass original argument of
4361 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4362 any C_MAYBE_CONST_EXPR, if it has integer operands.
4363 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4364 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4365 to c_objc_common_truthvalue_conversion, then remove any
4366 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4367 c_objc_common_truthvalue_conversion not
4368 c_common_truthvalue_conversion.
4369 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4370 call note_integer_operands for arguments with integer operands
4371 that are not integer constants.
4372
9feb29df
JJ
43732012-09-13 Jakub Jelinek <jakub@redhat.com>
4374
4375 PR c/54559
4376 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4377 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4378
d409320c
JJ
43792012-08-31 Jakub Jelinek <jakub@redhat.com>
4380
4381 PR c/54428
4382 * c-convert.c (convert): Don't call fold_convert_loc if
4383 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4384 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4385 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4386
6265d07c
JJ
43872012-08-24 Jakub Jelinek <jakub@redhat.com>
4388
4389 PR c/54355
4390 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4391 for nested and empty_ok arguments in the call to
4392 c_parser_declaration_or_fndef.
4393
1a4049e7
JJ
43942012-08-17 Jakub Jelinek <jakub@redhat.com>
4395
4396 * c-tree.h (c_last_sizeof_arg): Declare.
4397 * c-parser.c (struct c_tree_loc_pair): New type.
4398 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4399 non-NULL.
4400 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4401 (c_parser_postfix_expression_after_primary): Likewise. Call
4402 sizeof_pointer_memaccess_warning if needed.
4403 (sizeof_ptr_memacc_comptypes): New function.
4404 * c-typeck.c (c_last_sizeof_arg): New global variable.
4405 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4406
0229aee9
UB
44072012-07-24 Uros Bizjak <ubizjak@gmail.com>
4408
4409 * c-lang.h (lang_decl): Add variable_size GTY option.
4410
7ee2468b
SB
44112012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4412
4413 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4414 * Make-lang.in: Fix dependencies.
4415
d4a10d0a
SB
44162012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4417
4418 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4419 and add language Makefile hooks.
4420 * config-lang.in: New file.
4421 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4422 add the required "normal" config-lang.in rules.
4423 * c-lang.h: Moved from gcc/ to here.
4424 * c-tree.h: Likewise.
4425 * c-objc-common.c: Likewise.
4426 * c-objc-common.h: Likewise.
4427 * c-typeck.c: Likewise.
4428 * c-convert.c: Likewise.
4429 * c-lang.c: Likewise.
4430 * c-aux-info.c: Likewise.
4431 * c-errors.c: Likewise.
4432 * gccspec.c: Likewise.
4433 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4434 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4435\f
cbe34bb5 4436Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4437
4438Copying and distribution of this file, with or without modification,
4439are permitted in any medium without royalty provided the copyright
4440notice and this notice are preserved.