]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
diagnostic.c: add print_option_information
[gcc.git] / gcc / c / ChangeLog
CommitLineData
815d9cc6
XR
12017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2
3 PR c++/80038
4 * c-gimplify.c (c_gimplify_expr): Remove calls to
5 cilk_gimplifY_call_params_in_spawned_fn.
6
1c4ea66f
DM
72017-04-25 David Malcolm <dmalcolm@redhat.com>
8
9 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
10 hint for removing extra semicolon.
11
666f7903
JJ
122017-04-21 Jakub Jelinek <jakub@redhat.com>
13
14 PR c/80468
15 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
16 enabled, set specs->type to integer_type_node.
17
5764ee3c
JW
182017-04-03 Jonathan Wakely <jwakely@redhat.com>
19
20 * c-array-notation.c: Fix typo in comment.
21
10fa8dfb
MP
222017-03-29 Marek Polacek <polacek@redhat.com>
23
24 PR c/79730
25 * c-decl.c (finish_decl): Check VAR_P.
26
a9e4a1a5
JJ
272017-03-27 Jakub Jelinek <jakub@redhat.com>
28
29 PR middle-end/80162
30 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
31 * c-typeck.c (c_mark_addressable): Likewise. Look through
32 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
33 to ARRAY_TYPE.
34 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
35
ee3ff394
MP
362017-03-23 Marek Polacek <polacek@redhat.com>
37
38 * c-tree.h: Remove a C_RID_YYCODE reference.
39
4d1b8e70
JJ
402017-03-21 Jakub Jelinek <jakub@redhat.com>
41
42 PR c/80097
43 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
44 optional COMPOUND_EXPR with ubsan instrumentation.
45
31dc71a8
MP
462017-03-17 Marek Polacek <polacek@redhat.com>
47
48 * c-parser.c: Add C11 references.
49
d579c385
MP
502017-03-15 Marek Polacek <polacek@redhat.com>
51
52 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
53
85059a38
MP
542017-03-11 Marek Polacek <polacek@redhat.com>
55
56 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
57
2f6f187a
DM
582017-03-10 David Malcolm <dmalcolm@redhat.com>
59
60 PR translation/79848
61 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
62 "%qs".
63 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
64
36618428
MP
652017-03-09 Marek Polacek <polacek@redhat.com>
66
67 PR sanitizer/79757
68 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
69 parameter declarations with initializers.
70
01e5af5a
JJ
712017-03-09 Jakub Jelinek <jakub@redhat.com>
72
73 PR c/79969
74 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
75 TYPE_STUB_DECL.
76
a71dbc63
JJ
772017-03-07 Jakub Jelinek <jakub@redhat.com>
78
79 PR c/79834
80 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
81 for "may only be used in compound statements" diagnostics, change it
82 such that the same translatable string is used for all pragmas. For
83 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
84 diagnostics.
85 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
86 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
87 "may only be used in compound statements" diagnostics, such that the
88 same translatable string is used for all pragmas.
89
1ff4bae6
MP
902017-03-04 Marek Polacek <polacek@redhat.com>
91
92 PR c/79847
93 * c-decl.c (implicit_decl_warning): Add missing space.
94
7f5a7d78
MP
952017-03-03 Marek Polacek <polacek@redhat.com>
96
97 PR c/79758
98 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
99 current_function_prototype_arg_types is error_mark_node. Fix
100 formatting. Use TREE_VALUE instead of TREE_TYPE.
101
883c8f06
JJ
1022017-03-03 Jakub Jelinek <jakub@redhat.com>
103
79c9b7a8
JJ
104 PR c/79837
105 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
106 %<min%> or %<max%> in the diagnostics, instead mention identifier.
107 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
108 diagnostics.
109
883c8f06
JJ
110 PR c/79836
111 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
112 instead of %<_Generic>.
113 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
114 (c_parser_omp_target_exit_data): Use %<release%> instead of
115 %<release>.
116
324ff1a0
JJ
1172017-02-28 Jakub Jelinek <jakub@redhat.com>
118
119 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
120 instead of just cond ? "..." : "...".
121 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
122 for "enter"/"exit" keyword.
123 (c_finish_oacc_routine): Don't use %s to supply portions of the
124 message.
125
4227c9ad
JJ
1262017-02-24 Jakub Jelinek <jakub@redhat.com>
127
128 PR c++/79588
129 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
130 handle -Wrestrict here.
131 * c-typeck.c (build_function_call_vec): Adjust
132 check_function_arguments caller.
133
5d972e66
RB
1342017-02-23 Richard Biener <rguenther@suse.de>
135
136 PR c/79684
137 * gimple-parser.c (c_parser_gimple_statement): Use set_error
138 to initialize c_exprs to return.
139 (c_parser_gimple_binary_expression): Likewise.
140 (c_parser_gimple_unary_expression): Likewise.
141 (c_parser_gimple_postfix_expression): Likewise.
142
61ac5ebe
MP
1432017-02-22 Marek Polacek <polacek@redhat.com>
144
145 PR c/79662
146 * c-typeck.c (convert_arguments): Handle error_mark_node.
147
41d1b0b1
PK
1482017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
149
150 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
151 value of c_parser_parse_ssa_name against error_mark_node and emit
152 error if ssa name is anonymous and written as default definition.
153
eab1f169
PK
1542017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
155
156 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
157 FMA_EXPR.
158
bcac0b4d
JJ
1592017-02-16 Jakub Jelinek <jakub@redhat.com>
160
161 PR c++/79512
162 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
163 ignore #pragma omp target even when not followed by identifier.
164
1be33173
PK
1652017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
166
167 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
168 (c_parser_gimple_unary_expression): Likewise.
169
aa326bfb
JJ
1702017-02-13 Jakub Jelinek <jakub@redhat.com>
171
172 * c-parser.c (c_parser_oacc_declare): Add missing space in
173 diagnostics.
174
8a398bc5
PK
1752017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
176
177 PR c/79478
178 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
179 set_c_expr_source_range when parsing ssa-name.
180
3dcde5ef
PG
1812017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
182 Richard Biener <rguenther@suse.de>
183
184 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
185 building IL when arguments are error_mark_node.
186 (c_parser_gimple_unary_expression): Likewise.
187 (c_parser_gimple_if_stmt): Likewise.
188 (c_parser_gimple_switch_stmt): Likewise.
189 (c_parser_gimple_return_stmt): Likewise.
190 (c_parser_parse_ssa_name): When name lookup fails do not build
191 an SSA name. Use undeclared rather than not declared in error
192 reporting.
193
192b048b
MP
1942017-02-09 Marek Polacek <polacek@redhat.com>
195
196 PR c/79428
197 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
198 instead of c_parser_skip_until_found.
199
56f71478
JJ
2002017-02-09 Jakub Jelinek <jakub@redhat.com>
201
202 PR c/79431
203 * c-parser.c (c_parser_omp_declare_target): Don't invoke
204 symtab_node::get on automatic variables.
205
02889d23
CLT
2062016-02-09 Nathan Sidwell <nathan@codesourcery.com>
207 Chung-Lin Tang <cltang@codesourcery.com>
208
209 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
210 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
211 semantic checking.
212 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
213
7af4b20d
RB
2142017-02-07 Richard Biener <rguenther@suse.de>
215
216 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
217 (c_parser_gimple_postfix_expression_after_primary):
218 Do not use c_build_function_call_vec to avoid folding and promotion.
219 Simplify.
220
e5e391d6
MO
2212017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
222
223 PR lto/79061
224 * c-decl.c (pop_scope): Pass main_input_filename to
225 build_translation_unit_decl.
226
c2e84327
DM
2272017-01-24 David Malcolm <dmalcolm@redhat.com>
228
229 * c-parser.c: Include "read-rtl-function.h" and
230 "run-rtl-passes.h".
231 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
232 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
233 production. Update for renaming of field "gimple_pass" to
234 "gimple_or_rtl_pass". If __RTL was seen, call
235 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
236 to an auto_timevar, to cope with early exit.
237 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
238 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
239 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
240 Handle RID_RTL.
241 (c_parser_parse_rtl_body): New function.
242 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
243 (struct c_declspecs): Rename field "gimple_pass" to
244 "gimple_or_rtl_pass". Add field "rtl_p".
245 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
246 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
247 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
248 (c_parser_gimple_or_rtl_pass_list): ...this.
249
2ebd93e1
MP
2502017-01-20 Marek Polacek <polacek@redhat.com>
251
252 PR c/64279
253 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
254
b1c95bb5
RB
2552017-01-13 Richard Biener <rguenther@suse.de>
256
257 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
258 nops.
259
25329913
RB
2602017-01-13 Richard Biener <rguenther@suse.de>
261
262 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
263 _Literal ( type-name ) number.
264
6bb4ea5c
RB
2652017-01-12 Richard Biener <rguenther@suse.de>
266
267 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
268 __MEM.
269
6b5b4e9c
JJ
2702017-01-11 Jakub Jelinek <jakub@redhat.com>
271
272 PR c++/72813
273 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
274 PCH file.
275
e3252775
RB
2762017-01-11 Richard Biener <rguenther@suse.de>
277
278 PR bootstrap/79052
279 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
280 returns on parse errors.
281
a9342885
MP
2822017-01-04 Marek Polacek <polacek@redhat.com>
283
284 PR c++/64767
285 * c-parser.c (c_parser_postfix_expression): Mark zero character
286 constants by setting original_type in c_expr.
287 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
288 with a zero character constant.
289 (char_type_p): New function.
290
5dd9a9d0
DM
2912017-01-04 David Malcolm <dmalcolm@redhat.com>
292
293 * c-parser.c (c_parser_declaration_or_fndef): Create a
294 rich_location at init_loc and parse it to start_init.
295 (last_init_list_comma): New global.
296 (c_parser_braced_init): Update last_init_list_comma when parsing
297 commas. Pass it to pop_init_level. Pass location of closing
298 brace to pop_init_level.
299 (c_parser_postfix_expression_after_paren_type): Create a
300 rich_location at type_loc and parse it to start_init.
301 (c_parser_omp_declare_reduction): Likewise for loc.
302 * c-tree.h (start_init): Add rich_location * param.
303 (pop_init_level): Add location_t param.
304 * c-typeck.c (struct initializer_stack): Add field
305 "missing_brace_richloc".
306 (start_init): Add richloc param, use it to initialize
307 the stack node's missing_brace_richloc.
308 (last_init_list_comma): New decl.
309 (finish_implicit_inits): Pass last_init_list_comma to
310 pop_init_level.
311 (push_init_level): When finding missing open braces, add fix-it
312 hints to the richloc.
313 (pop_init_level): Add "insert_before" param and pass it
314 when calling pop_init_level. Add fixits about missing
315 close braces to any richloc. Use the richloc for the
316 -Wmissing-braces warning.
317 (set_designator): Pass last_init_list_comma to pop_init_level.
318 (process_init_element): Likewise.
319
cbe34bb5
JJ
3202017-01-01 Jakub Jelinek <jakub@redhat.com>
321
322 Update copyright years.
323
d17680f3
JJ
3242016-12-21 Jakub Jelinek <jakub@redhat.com>
325
0dba7960
JJ
326 PR bootstrap/78817
327 * c-typeck.c (build_function_call_vec): If check_function_arguments
328 returns true, set TREE_NO_WARNING on CALL_EXPR.
329
d17680f3
JJ
330 PR c/77767
331 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
332 to *expr instead of overwriting it.
333
aa90531e
RB
3342016-12-20 Richard Biener <rguenther@suse.de>
335
336 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
337 error recovery.
338 (c_parser_gimple_statement): Only build assigns for non-error
339 stmts.
340 (c_parser_gimple_postfix_expression_after): Improve error recovery.
341
629b3d75
MJ
3422016-12-14 Martin Jambor <mjambor@suse.cz>
343
344 * c-parser.c: Include omp-general.h and omp-offload.h instead of
345 omp-low.h.
346 (c_finish_oacc_routine): Adjusted call to
347 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
348 to use their new names.
349 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
350 use its new name.
351 (c_parser_oacc_update): Likewise.
352 (c_parser_omp_simd): Likewise.
353 (c_parser_omp_target_update): Likewise.
354 * c-typeck.c: Include omp-general.h instead of omp-low.h.
355 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
356 name.
357 (c_finish_omp_cancellation_point): Likewise.
358 * gimple-parser.c: Do not include omp-low.h
359
c5af52eb
CP
3602016-12-02 Cesar Philippidis <cesar@codesourcery.com>
361 James Norris <jnorris@codesourcery.com>
362
363 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
364 EXIT_DATA,WAIT} are not used in compound statements.
365 (c_parser_oacc_enter_exit_data): Update diagnostics.
366
48330c93
BE
3672016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
368
369 PR c++/71973
370 * c-decl.c (diagnose_mismatched_decls): Use
371 OPT_Wbuiltin_declaration_mismatch here too.
372
899ca90e 3732016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
374 Alan Hayward <alan.hayward@arm.com>
375 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
376
377 * c-decl.c (merge_decls): Use SET_DECL_MODE.
378 (make_label, finish_struct): Likewise.
379
1ee62b92 3802016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 381 Richard Biener <rguenther@suse.de>
22b15758 382
8e745a17
JJ
383 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
384 * config-lang.in (gtfiles): Add c/c-parser.h.
385 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
386 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
387 * c-parser.c (enum c_id_kind, struct c_token,
388 c_parser_next_token_is, c_parser_next_token_is_not,
389 c_parser_next_token_is_keyword,
390 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
391 Split out to ...
392 * c-parser.h: ... new header.
393 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 394 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
395 c_token_starts_typename, c_parser_next_token_starts_declspecs,
396 c_parser_next_tokens_start_declaration, c_parser_consume_token,
397 c_parser_error, c_parser_require, c_parser_skip_until_found,
398 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
399 c_parser_type_name): Export.
400 (c_parser_tokens_buf): New function.
401 (c_parser_error): Likewise.
402 (c_parser_set_error): Likewise.
403 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
404 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
405 via c_parser_parse_gimple_body.
8e745a17
JJ
406 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
407 c_token_starts_typename, c_parser_next_token_starts_declspecs,
408 c_parser_next_tokens_start_declaration, c_parser_consume_token,
409 c_parser_error, c_parser_require, c_parser_skip_until_found,
410 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
411 c_parser_type_name): Declare.
1ee62b92
PG
412 (struct c_parser): Declare forward.
413 (c_parser_tokens_buf): Declare.
8e745a17
JJ
414 (c_parser_error): Likewise.
415 (c_parser_set_error): Likewise.
416 * gimple-parser.c: New file.
417 * gimple-parser.h: Likewise.
1ee62b92 418
22b15758
UB
4192016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
420
421 PR c/35503
422 * c-parser.c (c_parser_postfix_expression_after_primary): Call
423 warn_for_restrict.
424
84ff4775
LCW
4252016-09-11 Le-Chun Wu <lcwu@google.com>
426 Mark Wielaard <mjw@redhat.com>
427
428 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
429 to the given -Wshadow= variant.
430
4d0cdd0c
TP
4312016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
432
433 * c-typeck.c: Include memmodel.h.
434
1202f33e
JJ
4352016-10-13 Jakub Jelinek <jakub@redhat.com>
436
437 PR target/77957
438 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
439 instead of lhd_return_null_tree_v.
440
8a14afd0
BS
4412016-10-07 Bernd Schmidt <bschmidt@redhat.com>
442
443 PR c++/69733
444 * c-decl.c (smallest_type_quals_location): New static function.
445 (grokdeclarator): Try to find the correct location for an ignored
446 qualifier.
447
81fea426
MP
4482016-09-26 Marek Polacek <polacek@redhat.com>
449
450 PR c/7652
451 * c-decl.c (pop_scope): Add gcc_fallthrough.
452
4532016-09-26 Marek Polacek <polacek@redhat.com>
454
455 PR c/7652
456 * c-parser.c (struct c_token): Add flags field.
457 (c_lex_one_token): Pass it to c_lex_with_flags.
458 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
459 into IFN_FALLTHROUGH.
460 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
461 attribute fallthrough after a case label or default label.
462 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
463
9a2300e9
MP
4642016-09-24 Marek Polacek <polacek@redhat.com>
465
466 PR c/77490
467 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
468 have boolean value. Warn about ++/-- on booleans.
469
7de76362
JJ
4702016-09-23 Jakub Jelinek <jakub@redhat.com>
471
472 * c-parser.c (incomplete_record_decls): Remove unnecessary
473 = vNULL initialization of file scope vec.
474
5b73d2ab
MP
4752016-09-16 Marek Polacek <polacek@redhat.com>
476
477 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
478
e51fbec3
MP
4792016-09-14 Marek Polacek <polacek@redhat.com>
480
481 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
482 (fix_array_notation_expr): Likewise.
483 * c-decl.c (finish_decl): Likewise.
484 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
485 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
486 (function_to_pointer_conversion): Use false instead of 0.
487 (convert_lvalue_to_rvalue): Likewise.
488 (parser_build_unary_op): Likewise.
489 (build_atomic_assign): Likewise.
490 (build_unary_op): Change nonconvert parameter type to bool, use
491 true/false instead of 1/0.
492 (build_binary_op): Use true instead of 1.
493
254830ba
DM
4942016-09-13 David Malcolm <dmalcolm@redhat.com>
495
496 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
497 of add_fixit_insert to add_fixit_insert_before.
498
4c13ba17
MP
4992016-09-13 Marek Polacek <polacek@redhat.com>
500
501 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
502 it.
503
54dcdb88
BE
5042016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
505
506 PR c++/77496
507 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
508 COMPOUND_EXPR to warn_for_omitted_condop.
509
e5106e27
DM
5102016-09-07 David Malcolm <dmalcolm@redhat.com>
511
512 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
513 c_get_substring_location for this new langhook.
514
9dc5773f
JJ
5152016-09-02 Jakub Jelinek <jakub@redhat.com>
516
517 PR c/65467
518 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
519 flag_openmp.
520 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
521 instead of mark_exp_read on low_bound/length expression.
522 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
523 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
524 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
525 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
526 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
527 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
528 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
529 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
530 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
531 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
532 instead of mark_expr_read.
533 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
534 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
535 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
536 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
537 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
538 array section bases outside of depend clause, for depend clause
539 use convert_lvalue_to_rvalue on the base.
540 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
541 linear, aligned, map, to and from clauses.
542 (c_omp_clause_copy_ctor): New function.
543
295844f6
MP
5442016-09-01 Marek Polacek <polacek@redhat.com>
545
546 PR c/7652
547 * c-typeck.c (composite_type): Add FALLTHRU comment.
548
089af25c
DM
5492016-08-31 David Malcolm <dmalcolm@redhat.com>
550
551 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
552 to the insertion fixits for "struct", "union", and "enum".
553
f9087798
DM
5542016-08-30 David Malcolm <dmalcolm@redhat.com>
555
556 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
557 rather than add_fixit_misspelled_id.
558 (undeclared_variable): Likewise.
559 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
560 now-redundant "here" params from add_fixit_insert method calls.
561 (c_parser_parameter_declaration): Likewise.
562 * c-typeck.c (build_component_ref): Remove now-redundant range
563 param from add_fixit_replace method calls.
564
ebef225f
MP
5652016-08-25 Marek Polacek <polacek@redhat.com>
566
567 * c-typeck.c (parser_build_binary_op): Pass LHS to
568 warn_logical_not_parentheses.
569
fe377a48
MP
5702016-08-25 Marek Polacek <polacek@redhat.com>
571
572 PR c/77323
573 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
574 or _FloatN or _FloatNx is not supported.
575 (finish_declspecs): Set type to integer_type_node when _FloatN or
576 _FloatNx is not supported.
577
c65699ef
JM
5782016-08-19 Joseph Myers <joseph@codesourcery.com>
579
580 PR c/32187
581 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
582 (struct c_declspecs): Add field floatn_nx_idx.
583 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
584 and _FloatNx type specifiers.
585 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
586 (c_parser_declspecs, c_parser_attribute_any_word)
587 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
588 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
589 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
590 narrower than double.
591
2f1364c2
JJ
5922016-08-12 Jakub Jelinek <jakub@redhat.com>
593 Martin Liska <mliska@suse.cz>
594
595 PR c/67410
596 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
597 % to determine val element to change. Assert that
598 wchar_bytes * charwidth fits into val array.
599
191816a3
MP
6002016-08-12 Marek Polacek <polacek@redhat.com>
601
602 PR c/7652
603 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
604 (c_parser_postfix_expression): Likewise.
605 * c-typeck.c (build_unary_op): Adjust fall through comment.
606 (c_mark_addressable): Likewise.
607
b95a64bb
JJ
6082016-08-11 Jakub Jelinek <jakub@redhat.com>
609
610 PR c/72816
611 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
612 array member through typedef, for orig_qual_indirect == 0 clear
613 orig_qual_type.
614
895aa8e1
DM
6152016-08-08 David Malcolm <dmalcolm@redhat.com>
616
617 PR c/64955
618 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
619 this up to selftest::run_c_tests.
620 (selftest::run_c_tests): New function.
621
0b212d8c
TS
6222016-08-04 Thomas Schwinge <thomas@codesourcery.com>
623
ae9281fc
TS
624 * c-parser.c (struct oacc_routine_data): Add error_seen and
625 fndecl_seen members.
626 (c_finish_oacc_routine): Use these.
627 (c_parser_declaration_or_fndef): Adjust.
628 (c_parser_oacc_routine): Likewise. Support more C language
629 constructs, and improve diagnostics. Move pragma context
630 checking...
631 (c_parser_pragma): ... here.
632
0b212d8c
TS
633 * c-parser.c (struct oacc_routine_data): New.
634 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
635 Simplify code.
636 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
637 declare target" attribute.
638
76e2c821
JB
6392016-08-01 Jan Beulich <jbeulich@suse.com>
640
641 * c-fold.c (c_fully_fold_internal): Also emit shift count
642 warnings for vector types.
643 * c-typeck.c (build_binary_op): Likewise.
644
f618a472
MP
6452016-07-29 Marek Polacek <polacek@redhat.com>
646
647 PR c/71742
648 * c-decl.c (finish_struct): Rephrase an error message.
649
efd0786f
MP
650 PR c/71853
651 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
652 to error node for invalid code.
653
e00dceaf
MP
654 PR c/71573
655 * c-decl.c (implicitly_declare): Return decl early not only for
656 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
657
673a107a
JJ
6582016-07-29 Jakub Jelinek <jakub@redhat.com>
659
660 PR c/71969
661 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
662 on GNU extern inline functions.
663
a5b5c8b6
MP
6642016-07-29 Marek Polacek <polacek@redhat.com>
665
666 PR c/71583
667 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
668 check expr.value.
669
e3fe09c1
UB
6702016-07-22 Uros Bizjak <ubizjak@gmail.com>
671
672 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
673
7c8f7eaa
DM
6742016-07-20 David Malcolm <dmalcolm@redhat.com>
675
676 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
677 spellcheck-tree.h
678 (best_macro_match): Likewise, converting from a typedef to a
679 subclass.
680 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
681 (lookup_name_fuzzy): Update for change of best_macro_match to a
682 subclass with a ctor that calls cpp_forall_identifiers.
683
de6a69ee
DM
6842016-07-20 David Malcolm <dmalcolm@redhat.com>
685
686 * c-decl.c (implicit_decl_warning): Update for conversion of
687 return type of lookup_name_fuzzy to const char *.
688 (undeclared_variable): Likewise.
689 (lookup_name_fuzzy): Convert return type from tree to
690 const char *.
691 * c-parser.c (c_parser_declaration_or_fndef): Update for
692 conversion of return type of lookup_name_fuzzy to const char *.
693 (c_parser_parameter_declaration): Likewise.
694
b1c9c068
CP
6952016-07-15 Cesar Philippidis <cesar@codesourcery.com>
696
697 * c-parser.c (c_parser_oacc_declare): Don't scan for
698 GOMP_MAP_POINTER.
699 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
700 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
701 zero-length subarrays.
702
ddbbcb19
JJ
7032016-07-15 Jakub Jelinek <jakub@redhat.com>
704
705 PR c/71858
706 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
707 instead of FUZZY_LOOKUP_NAME.
708 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
709 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
710
dd36b877
JJ
7112016-07-14 Jakub Jelinek <jakub@redhat.com>
712
713 PR c/71858
714 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
715
8c681247
TS
7162016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
717
718 * c-parser.c (c_parser_generic_selection): Make type of variable
719 auto_vec.
720 (c_parser_omp_declare_simd): Likewise.
721
bf4fa671
TS
7222016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
723
724 * c-decl.c (struct c_struct_parse_info): Change member types
725 from vec to auto_vec.
726 (start_struct): Adjust.
727 (finish_struct): Likewise.
728
557e8c49
JJ
7292016-07-02 Jakub Jelinek <jakub@redhat.com>
730
731 PR c/71719
732 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
733
54d19c3b
TS
7342016-06-29 Thomas Schwinge <thomas@codesourcery.com>
735
736 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
737 Move pragma context checking into...
738 (c_parser_omp_cancellation_point): ... here, and improve
739 diagnostic messages.
740 * c-typeck.c (c_finish_omp_cancel)
741 (c_finish_omp_cancellation_point): Improve diagnostic messages.
742
152ef731
JJ
7432016-06-29 Jakub Jelinek <jakub@redhat.com>
744
745 PR c/71685
746 * c-typeck.c (c_build_qualified_type): Don't clear
747 C_TYPE_INCOMPLETE_VARS for the main variant.
748
7492016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
750
751 PR c/71552
752 * c-typeck.c (output_init_element): Diagnose incompatible types
753 before non-constant initializers.
754
e9ac1f86
JJ
7552016-06-28 Jakub Jelinek <jakub@redhat.com>
756
757 * Make-lang.in: Don't cat ../stage_current if it does not exist.
758
277d7ee0
AK
7592016-06-23 Andi Kleen <ak@linux.intel.com>
760
761 * Make-lang.in: Add support for autofdo.
762
1a4f11c8
DM
7632016-06-22 David Malcolm <dmalcolm@redhat.com>
764
765 PR c/70339
766 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
767 (implicit_decl_warning): When issuing warnings for implicit
768 declarations, attempt to provide a suggestion via
769 lookup_name_fuzzy.
770 (undeclared_variable): Likewise when issuing errors.
771 (lookup_name_in_scope): Likewise.
772 (struct edit_distance_traits<cpp_hashnode *>): New struct.
773 (best_macro_match): New typedef.
774 (find_closest_macro_cpp_cb): New function.
775 (lookup_name_fuzzy): New function.
776 * c-parser.c: Include gcc-rich-location.h.
777 (c_token_starts_typename): Split out case CPP_KEYWORD into...
778 (c_keyword_starts_typename): ...this new function.
779 (c_parser_declaration_or_fndef): When issuing errors about
780 missing "struct" etc, add a fixit. For other kinds of errors,
781 attempt to provide a suggestion via lookup_name_fuzzy.
782 (c_parser_parms_declarator): When looking ahead to detect typos in
783 type names, also reject CPP_KEYWORD.
784 (c_parser_parameter_declaration): When issuing errors about
785 unknown type names, attempt to provide a suggestion via
786 lookup_name_fuzzy.
787 * c-tree.h (c_keyword_starts_typename): New prototype.
788
5a578671
JM
7892016-06-20 Joseph Myers <joseph@codesourcery.com>
790
791 PR c/71601
792 * c-typeck.c (build_conditional_expr): Return error_mark_node if
793 c_common_type returns error_mark_node.
794
3f8257db 7952016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
796
797 PR c/69507
798 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
799 __alignof__ (expression).
800
6a3f203c
DM
8012016-06-14 David Malcolm <dmalcolm@redhat.com>
802
803 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
804
264757fb
DM
8052016-06-14 David Malcolm <dmalcolm@redhat.com>
806
807 * c-typeck.c (build_component_ref): Simplify fixit code by
808 using gcc_rich_location::add_fixit_misspelled_id.
809 (set_init_label): Likewise.
810
f7e4f2e3
DM
8112016-06-13 David Malcolm <dmalcolm@redhat.com>
812
813 * c-parser.c (c_parser_initelt): Provide location of name for new
814 location_t param of set_init_label.
815 * c-tree.h (set_init_label): Add location_t param.
816 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
817 param and use it when issuing error messages about unrecognized
818 field names. Attempt to provide a fixit hint if appropriate,
819 otherwise update the error message to provide the type name.
820
4b1ffdb1
TS
8212016-06-10 Thomas Schwinge <thomas@codesourcery.com>
822
823 PR c/71381
824 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
825 Loosen checking.
826
44a845ca
MS
8272016-06-08 Martin Sebor <msebor@redhat.com>
828 Jakub Jelinek <jakub@redhat.com>
829
830 PR c++/70507
831 PR c/68120
832 * c-typeck.c (convert_arguments): Don't promote last argument
833 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
834
92a5f2ba
MP
8352016-06-08 Marek Polacek <polacek@redhat.com>
836
837 PR c/71418
838 * c-decl.c (grokdeclarator): Check TYPE_P.
839
08203f73
MP
840 PR c/71426
841 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
842 code.
843
6ffd47b7
DM
8442016-06-07 David Malcolm <dmalcolm@redhat.com>
845
846 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
847 and structure element reference, capture the location of the
848 element name token and pass it to build_component_ref.
849 (c_parser_postfix_expression_after_primary): Likewise for
850 structure element dereference.
851 (c_parser_omp_variable_list): Likewise for
852 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
853 * c-tree.h (build_component_ref): Add location_t param.
854 * c-typeck.c (build_component_ref): Add location_t param
855 COMPONENT_LOC. Use it, if available, when issuing hints about
856 mispelled member names to provide a fixit replacement hint.
857
1f40cff3
MP
8582016-06-06 Marek Polacek <polacek@redhat.com>
859
860 PR c/71362
861 * c-parser.c (c_parser_direct_declarator): Set location.
862
5545a907
MP
8632016-06-06 Marek Polacek <polacek@redhat.com>
864
865 * c-typeck.c (comptypes_internal): Handle comparisons of
866 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
867 TYPE_REF_CAN_ALIAS_ALL.
868
b605f663
CLT
8692016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
870
871 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
872 arguments as addressable when async clause exists.
873
00631022
JJ
8742016-05-30 Jakub Jelinek <jakub@redhat.com>
875
876 PR c++/71349
877 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
878 when combined with target construct.
879
7211a097
JJ
8802016-05-26 Jakub Jelinek <jakub@redhat.com>
881
882 * c-parser.c (c_parser_omp_clause_schedule): Warn if
883 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
884
95efe6b6
MP
8852016-05-25 Marek Polacek <polacek@redhat.com>
886
887 PR c/71265
888 * c-decl.c (c_make_fname_decl): Don't check seen_error.
889
a23faf7a
MP
890 PR c/71266
891 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
892
e46c7770
CP
8932016-05-24 Cesar Philippidis <cesar@codesourcery.com>
894
895 * c-parser.c (c_parser_oacc_declare): Add support for
896 GOMP_MAP_FIRSTPRIVATE_POINTER.
897 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
898 argument with enum c_omp_region_type ort.
899 (handle_omp_array_sections): Likewise. Update call to
900 handle_omp_array_sections_1.
901 (c_finish_omp_clauses): Add specific errors and warning messages for
902 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
903 call to handle_omp_array_sections.
904
a04e69c0
TS
9052016-05-24 Thomas Schwinge <thomas@codesourcery.com>
906
907 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
908
f17a223d
RB
9092016-05-24 Richard Biener <rguenther@suse.de>
910
911 PR middle-end/70434
912 PR c/69504
913 * c-typeck.c (build_array_ref): Do not complain about indexing
914 non-lvalue vectors. Adjust for function name change.
915
79063edd
MS
9162016-05-20 Martin Sebor <msebor@redhat.com>
917
918 PR c/71115
919 * c-typeck.c (error_init): Use
920 expansion_point_location_if_in_system_header.
921 (warning_init): Same.
922
8a40fef3
DM
9232016-05-19 David Malcolm <dmalcolm@redhat.com>
924
925 PR c/71171
926 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
927 in error-handling.
928 (c_parser_postfix_expression): Likewise.
929 * c-tree.h (c_expr::set_error): New method.
930 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
931 that result's range is initialized.
932
e9892350
JG
9332016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
934
935 * c-typeck.c (parser_build_unary_op): Fix formatting.
936
8fad45f5
MW
9372016-05-16 Matthew Wahab <matthew.wahab@arm.com>
938
939 * c-decl.c (grokdeclarator): Remove errmsg and use of
940 targetm.invalid_return_type.
941 (grokparms): Remove errmsg and use of
942 targetm.invalid_parameter_type.
943
aa4b467b
JM
9442016-05-13 Joseph Myers <joseph@codesourcery.com>
945
946 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
947 function return type.
948
4f2e1536
MP
9492016-05-12 Marek Polacek <polacek@redhat.com>
950
951 PR c/70756
952 * c-decl.c (build_compound_literal): Pass LOC down to
953 c_incomplete_type_error.
954 * c-tree.h (require_complete_type): Adjust declaration.
955 (c_incomplete_type_error): Likewise.
956 * c-typeck.c (require_complete_type): Add location parameter, pass it
957 down to c_incomplete_type_error.
958 (c_incomplete_type_error): Add location parameter, pass it down to
959 error_at.
960 (build_component_ref): Pass location down to c_incomplete_type_error.
961 (default_conversion): Pass location down to require_complete_type.
962 (build_array_ref): Likewise.
963 (build_function_call_vec): Likewise.
964 (convert_arguments): Likewise.
965 (build_unary_op): Likewise.
966 (build_c_cast): Likewise.
967 (build_modify_expr): Likewise.
968 (convert_for_assignment): Likewise.
969 (c_finish_omp_clauses): Likewise.
970
d6e83a8d
MM
9712016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
972
973 PR c/43651
974 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
975 is enabled.
976 * c-errors.c (pedwarn_c90): Return true if warned.
977 * c-tree.h (pedwarn_c90): Change return type to bool.
978 (enum c_declspec_word): Add new enumerator cdw_atomic.
979
5c3a10fb
MP
9802016-05-11 Marek Polacek <polacek@redhat.com>
981
982 PR c++/71024
983 * c-decl.c (diagnose_mismatched_decls): Factor out code to
984 diagnose_mismatched_attributes and call it.
985
cf68d92c
MP
9862016-05-10 Marek Polacek <polacek@redhat.com>
987
988 PR c/70255
989 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
990 on a declaration following the definition.
991
351f85c5
JJ
9922016-05-05 Jakub Jelinek <jakub@redhat.com>
993
994 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
995 parse it through to c_parser_c99_block_statement.
996 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
997 caller.
998
deef7113
MP
9992016-05-04 Marek Polacek <polacek@redhat.com>
1000
1001 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1002 OPT_Wdangling_else.
1003
de55efd5
MP
10042016-05-04 Marek Polacek <polacek@redhat.com>
1005
1006 PR c/48778
1007 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1008 for macro expansions.
1009
79ce98bc
MP
10102016-05-03 Marek Polacek <polacek@redhat.com>
1011
1012 PR c/70859
1013 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1014 check_builtin_function_arguments.
1015
fb2647aa
RB
10162016-05-03 Richard Biener <rguenther@suse.de>
1017
1018 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1019 the checksum from the previous stage.
1020
77886428
CP
10212016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1022
1023 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1024 c_finish_omp_clauses.
1025 (c_parser_omp_all_clauses): Likewise.
1026 (c_parser_oacc_cache): Likewise.
1027 (c_parser_oacc_loop): Likewise.
1028 (omp_split_clauses): Likewise.
1029 (c_parser_omp_declare_target): Likewise.
1030 (c_parser_cilk_all_clauses): Likewise.
1031 (c_parser_cilk_for): Likewise.
1032 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1033 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1034
7176a4a0
MP
10352016-05-02 Marek Polacek <polacek@redhat.com>
1036
1037 PR c/70851
1038 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1039 incomplete type.
1040
e7ff0319
CP
10412016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1042
1043 PR middle-end/70626
1044 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1045 OACC_LOOP_CLAUSE_MASK.
1046 (c_parser_oacc_kernels_parallel): Update call to
1047 c_oacc_split_loop_clauses.
1048
9f405ce1
AM
10492016-04-28 Andrew MacLeod <amacleod@redhat.com>
1050
1051 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1052 argument to build_modify_expr in two cases.
1053
c1e1f433
BS
10542016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1055
1056 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1057 warn_for_memset instead of warning directly here.
1058
2448a956
MP
10592016-04-26 Marek Polacek <polacek@redhat.com>
1060
1061 PR c/67784
1062 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1063 out of ...
1064 (c_parser_for_statement): ... here.
1065 (c_parser_if_statement): Use it.
1066 (c_parser_switch_statement): Use it.
1067 (c_parser_while_statement): Use it.
1068
b02a5e26
MP
1069 PR c/70791
1070 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1071
477d4906
IV
10722016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1073
1074 PR c++/69363
1075 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1076 instead of c_finish_cilk_clauses.
1077 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1078 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1079 floating-point variables in the linear clause for Cilk Plus.
1080
fe37c7af
MM
10812016-04-18 Michael Matz <matz@suse.de>
1082
1083 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1084 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1085
949505a9
MP
10862016-04-15 Marek Polacek <polacek@redhat.com>
1087
1088 PR c/70671
1089 * c-typeck.c (build_unary_op): Pass location down to error and
1090 warning call.
1091
dda1bf61
JJ
10922016-04-15 Jakub Jelinek <jakub@redhat.com>
1093
1094 PR c/70436
1095 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1096 where needed.
1097 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1098 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1099 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1100 Adjust c_parser_pragma callers.
1101 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1102 caller.
1103 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1104 c_parser_statement.
1105 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1106 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1107 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1108 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1109 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1110 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1111 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1112 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1113 down where needed.
1114 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1115 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1116 calls.
1117
99cd9857
MP
11182016-04-13 Marek Polacek <polacek@redhat.com>
1119
1120 PR c/70436
1121 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1122 adjust callers.
1123 (c_parser_statement): Likewise.
1124 (c_parser_c99_block_statement): Likewise.
1125 (c_parser_while_statement): Likewise.
1126 (c_parser_for_statement): Likewise.
1127 (c_parser_if_body): Don't set IF_P here.
1128 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1129 about dangling else here.
1130 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1131 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1132 warn about dangling else here.
1133
f13355da
MP
11342016-04-04 Marek Polacek <polacek@redhat.com>
1135
1136 PR c/70307
1137 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1138
5fde6a45
MP
11392016-03-31 Marek Polacek <polacek@redhat.com>
1140
1141 PR c/70297
1142 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1143
4bbf545b
DM
11442016-03-18 David Malcolm <dmalcolm@redhat.com>
1145
1146 PR c/70281
1147 * c-parser.c (c_parser_postfix_expression): Set the source range
1148 for uses of "__builtin_types_compatible_p".
1149
fcc2b74f
JJ
11502016-03-17 Jakub Jelinek <jakub@redhat.com>
1151
1152 PR c/70280
1153 * c-typeck.c (composite_type): Don't count void_list_node
1154 into len, if the list is terminated by void_list_node, start
1155 with void_list_node instead of NULL for newargs. Stop
1156 at void_list_node.
1157
ab4c578f
MP
11582016-03-16 Marek Polacek <polacek@redhat.com>
1159
1160 PR c/70093
1161 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1162 nested functions returning VM types.
1163
96b3c82d
CP
11642016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1165
1166 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1167 when calling c_finish_omp_clauses.
1168
29b9828f
BS
11692016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1170
1171 PR c/69824
1172 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1173 for later.
1174
7ff6ca38
MP
11752016-03-04 Marek Polacek <polacek@redhat.com>
1176
1177 PR c/69798
1178 * c-parser.c (c_parser_postfix_expression): Call
1179 c_parser_cast_expression rather than c_parser_postfix_expression.
1180
686e2237
JJ
11812016-03-01 Jakub Jelinek <jakub@redhat.com>
1182
1183 PR c/69796
1184 PR c/69974
1185 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1186 of incomplete decls to error_mark_node.
1187
0b05329b
MP
11882016-02-24 Marek Polacek <polacek@redhat.com>
1189
1190 PR c/69819
1191 * c-decl.c (finish_decl): Don't update the copy of the type of a
1192 different decl type.
1193
067fbd8b
JJ
11942016-02-23 Jakub Jelinek <jakub@redhat.com>
1195
1196 PR objc/69844
1197 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1198 in id_kind reclassification.
1199
bf14eba2
JJ
12002016-02-16 Jakub Jelinek <jakub@redhat.com>
1201
1202 PR c/69835
1203 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1204
ba539195
JN
12052016-02-16 James Norris <jnorris@codesourcery.com>
1206
1207 PR c/64748
1208 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1209
16595a1f
BS
12102016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1211
f48dfe98
BS
1212 * c-decl.c (build_null_declspecs): Zero the entire struct.
1213
16595a1f
BS
1214 PR c/69522
1215 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1216 callers changed. If nested_p is true, use it to call
1217 finish_implicit_inits.
1218 * c-tree.h (finish_implicit_inits): Declare.
1219 * c-typeck.c (finish_implicit_inits): New function. Move code
1220 from ...
1221 (push_init_level): ... here.
1222 (set_designator, process_init_element): Call finish_implicit_inits.
1223
66756373
JJ
12242016-02-11 Jakub Jelinek <jakub@redhat.com>
1225
1226 PR c/69768
1227 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1228 arguments for -Waddress warning.
1229
1066e9b5
JJ
12302016-02-04 Jakub Jelinek <jakub@redhat.com>
1231
1232 PR c/69669
1233 * c-decl.c (finish_enum): When honoring mode attribute,
1234 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1235
3a5d2ba4
JJ
12362016-01-29 Jakub Jelinek <jakub@redhat.com>
1237
1238 PR debug/69518
1239 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1240 all type variants, not just TYPE_MAIN_VARIANT.
1241
cbdd8ae0
JJ
12422016-01-27 Jakub Jelinek <jakub@redhat.com>
1243
1244 PR debug/66869
1245 * c-decl.c (c_write_global_declarations_1): Warn with
1246 warn_unused_function if static prototype without definition
1247 is not C_DECL_USED.
1248
fa74a4bc
MP
12492016-01-27 Marek Polacek <polacek@redhat.com>
1250
1251 PR c/68062
1252 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1253 to unsigned, if needed. Add -Wsign-compare warning.
1254
13f92e8d
JJ
12552016-01-26 Jakub Jelinek <jakub@redhat.com>
1256
1257 PR tree-optimization/69483
1258 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1259
cd8e73dc 12602016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1261
1262 PR c/24293
1263 * c-tree.h (incomplete_record_decls): Declare.
1264 * c-parser.c (incomplete_record_decls): Define.
1265 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1266 report error if any decl has zero size.
1267 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1268 or enum type to incomplete_record_decls.
1269
e6d6ec9e
TV
12702016-01-14 Tom de Vries <tom@codesourcery.com>
1271
1272 PR tree-optimization/68773
1273 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1274 set force_output.
1275
00083992
MP
12762016-01-14 Marek Polacek <polacek@redhat.com>
1277
1278 PR c/69262
1279 * c-decl.c (grokdeclarator): Provide more information for invalid
1280 array declarations.
1281
7443cf13
DM
12822016-01-06 David Malcolm <dmalcolm@redhat.com>
1283
1284 * c-parser.c (c_parser_unary_expression): For dereferences, build
1285 a combined location before calling build_indirect_ref, so that
1286 error reports cover the full range, manually updating the c_expr
1287 src_range.
1288
6b131d5b
MP
12892016-01-06 Marek Polacek <polacek@redhat.com>
1290
1291 PR sanitizer/69099
1292 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1293 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1294 NULL.
1295
818ab71a
JJ
12962016-01-04 Jakub Jelinek <jakub@redhat.com>
1297
1298 Update copyright years.
1299
2fe0a208
MP
13002016-01-04 Marek Polacek <polacek@redhat.com>
1301
1302 PR c/68908
1303 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1304 optimization to use __atomic_fetch_* built-in if possible.
1305
c7b48c8a
TS
13062015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1307
1308 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1309 into...
1310 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1311 all users.
1312
fda5652f
MP
13132015-12-22 Marek Polacek <polacek@redhat.com>
1314
1315 PR c/69002
1316 * c-typeck.c (build_component_ref): Warn when acessing elements of
1317 atomic structures or unions.
1318
745e411d
DM
13192015-12-21 David Malcolm <dmalcolm@redhat.com>
1320
1321 * c-typeck.c: Include "gcc-rich-location.h".
1322 (build_binary_op): In the two places that call binary_op_error,
1323 create a gcc_rich_location and populate it with the location of
1324 the binary op and its two operands.
1325
94c40e19
DM
13262015-12-16 David Malcolm <dmalcolm@redhat.com>
1327
1328 * c-parser.c (c_parser_statement_after_labels): When calling
1329 c_finish_return, Use the return expression's location if it has
1330 one, falling back to the location of the first token within it.
1331 * c-typeck.c (c_finish_return): When issuing warnings about
1332 the incorrect presence/absence of a return value, issue a note
1333 showing the declaration of the function.
1334
de67c4c3
DM
13352015-12-16 David Malcolm <dmalcolm@redhat.com>
1336
1337 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1338 to 4.
1339 (c_parser_peek_nth_token): New function.
1340 (c_parser_peek_conflict_marker): New function.
1341 (c_parser_error): Detect conflict markers and report them as such.
1342
a10704e1
DM
13432015-12-16 David Malcolm <dmalcolm@redhat.com>
1344
1345 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1346 to preserve range information for the primary expression
1347 in the call to c_parser_postfix_expression_after_primary.
1348
8062bca6
DM
13492015-12-16 David Malcolm <dmalcolm@redhat.com>
1350
1351 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1352 expression location, falling back on the first token location,
1353 rather than always using the latter.
1354
d06f8b75
MP
13552015-12-16 Marek Polacek <polacek@redhat.com>
1356
1357 PR c/64637
1358 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1359 available.
1360
2994fb91
MP
13612015-12-15 Marek Polacek <polacek@redhat.com>
1362
1363 PR c/68907
1364 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1365 artificial decl.
1366
a1b93f8d
DM
13672015-12-08 David Malcolm <dmalcolm@redhat.com>
1368
1369 * c-parser.c (c_parser_alignof_expression): Capture location of
1370 closing parenthesis (if any), or of end of unary expression, and
1371 use it to build a src_range for the expression.
1372
46c6e1e2
DM
13732015-12-08 David Malcolm <dmalcolm@redhat.com>
1374
1375 PR c/68757
1376 * c-parser.c (c_parser_get_builtin_args): Add
1377 "out_close_paren_loc" param, and write back to it.
1378 (c_parser_postfix_expression): Capture the closing
1379 parenthesis location for RID_CHOOSE_EXPR,
1380 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1381 RID_BUILTIN_SHUFFLE and use it to set the source range
1382 for such expressions; within RID_BUILTIN_COMPLEX set
1383 the underlying location.
1384
66189108
MP
13852015-12-07 Marek Polacek <polacek@redhat.com>
1386
1387 PR c/68668
1388 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1389 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1390
f187980b
EB
13912015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1392
1393 * c-tree.h (c_build_va_arg): Adjust prototype.
1394 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1395 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1396 parameter, adjust throughout and issue an error if EXPR is a component
1397 with reverse storage order.
1398
4250754e
JM
13992015-12-02 Jason Merrill <jason@redhat.com>
1400
1401 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1402 (c_fully_fold_internal, decl_constant_value_for_optimization):
1403 Move from c-common.c.
1404 * c-tree.h: Declare decl_constant_value_for_optimization.
1405 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1406
e9e32ee6
JM
14072015-12-02 Joseph Myers <joseph@codesourcery.com>
1408
1409 PR c/68162
1410 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1411 following link from declarator to next declarator. Track original
1412 qualified type and pass it to c_build_qualified_type.
1413 * c-typeck.c (c_build_qualified_type): Add arguments
1414 orig_qual_type and orig_qual_indirect.
1415
ff7a55bf
TS
14162015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1417
1418 * c-parser.c (c_parser_omp_clause_name)
1419 (c_parser_oacc_all_clauses): Alphabetical sorting.
1420
657e4e47
JJ
14212015-12-02 Jakub Jelinek <jakub@redhat.com>
1422
1423 PR c/68533
1424 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1425 for diagnostics.
1426
37d5ad46
JB
14272015-12-01 Julian Brown <julian@codesourcery.com>
1428 Cesar Philippidis <cesar@codesourcery.com>
1429 James Norris <James_Norris@mentor.com>
1430
1431 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1432 (c_parser_oacc_clause_use_device): New function.
1433 (c_parser_oacc_all_clauses): Add use_device support.
1434 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1435 (c_parser_oacc_host_data): New function.
1436 (c_parser_omp_construct): Add host_data support.
1437 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1438 * c-typeck.c (c_finish_oacc_host_data): New function.
1439 (c_finish_omp_clauses): Add use_device support.
1440
a4850ce9
JH
14412015-11-29 Jan Hubicka <hubicka@ucw.cz>
1442
1443 PR c/67106
1444 * c-decl.c: Set TYPE_PACKED in variants.
1445
b58d3df2
ML
14462015-11-27 Martin Liska <mliska@suse.cz>
1447
1448 PR c++/68312
1449 * c-array-notation.c (fix_builtin_array_notation_fn):
1450 Use release_vec_vec instead of vec::release.
1451 (build_array_notation_expr): Likewise.
1452 (fix_conditional_array_notations_1): Likewise.
1453 (fix_array_notation_expr): Likewise.
1454 (fix_array_notation_call_expr): Likewise.
1455
aec17bfe
JJ
14562015-11-27 Jakub Jelinek <jakub@redhat.com>
1457
1458 PR c/63326
1459 * c-parser.c (c_parser_compound_statement_nostart): If
1460 last_label is true, use pragma_stmt instead of pragma_compound
1461 as second c_parser_pragma argument.
1462 (c_parser_omp_ordered, c_parser_omp_target_update,
1463 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1464 false as second argument to c_parser_skip_to_pragma_eol after
1465 diagnosing standalone directives used in pragma_stmt context.
1466
688c4de0
IV
14672015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1468
1469 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1470 with "if (ENABLE_OFFLOADING)".
1471
cbd03aee
DM
14722015-11-23 David Malcolm <dmalcolm@redhat.com>
1473
1474 PR objc/68438
1475 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1476 for various Objective-C constructs: Class.name syntax,
1477 @selector(), @protocol(), @encode(), and [] message syntax.
1478
a87a86e1
DM
14792015-11-20 David Malcolm <dmalcolm@redhat.com>
1480
1481 PR 62314
1482 * c-typeck.c (should_suggest_deref_p): New function.
1483 (build_component_ref): Special-case POINTER_TYPE when
1484 generating a "not a structure of union" error message, and
1485 suggest a "->" rather than a ".", providing a fix-it hint.
1486
8ece8dfb
DM
14872015-11-19 David Malcolm <dmalcolm@redhat.com>
1488
1489 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1490 candidate into a new function, find_closest_identifier.
1491
433068cc
MP
14922015-11-19 Marek Polacek <polacek@redhat.com>
1493
1494 PR c/68412
1495 * c-typeck.c (parser_build_binary_op): Properly handle
1496 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1497
bef08b71
DM
14982015-11-17 David Malcolm <dmalcolm@redhat.com>
1499
1500 * c-parser.c (set_c_expr_source_range): Bulletproof both
1501 overloaded implementations against NULL expr->value.
1502 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1503 values.
1504 (c_parser_unary_expression): Likewise when handling addresses of
1505 labels.
1506 (c_parser_postfix_expression): Likewise for statement expressions,
1507 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1508 __builtin_va_arg, and for __builtin_offset_of.
1509 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1510 src_range using the range of the braced initializer.
1511 (c_parser_transaction_expression): Set src_range for "ret" to a
1512 sane pair of values.
1513
fff77217
KY
15142015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1515
1516 * c-parser.c (c_finish_omp_declare_simd): Look for
1517 "simd" attribute as well. Update error message.
1518
1d899da2
TS
15192015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1520
1521 * c-parser.c (c_parser_omp_declare_target): Adjust.
1522
e4606348
JJ
15232015-11-14 Jakub Jelinek <jakub@redhat.com>
1524
1525 * c-typeck.c (c_finish_omp_clauses): Don't mark
1526 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1527
3e636daf
MP
15282015-11-14 Marek Polacek <polacek@redhat.com>
1529
1530 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1531 * c-typeck.c: Likewise.
1532
ebedc9a3
DM
15332015-11-13 David Malcolm <dmalcolm@redhat.com>
1534
1535 * c-decl.c (warn_defaults_to): Pass line_table to
1536 rich_location ctor.
1537 * c-errors.c (pedwarn_c99): Likewise.
1538 (pedwarn_c90): Likewise.
1539 * c-parser.c (set_c_expr_source_range): New functions.
1540 (c_token::get_range): New method.
1541 (c_token::get_finish): New method.
1542 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1543 based on the range from the start of the LHS to the end of the
1544 RHS.
1545 (c_parser_conditional_expression): Likewise, based on the range
1546 from the start of the cond.value to the end of exp2.value.
1547 (c_parser_binary_expression): Call set_c_expr_source_range on
1548 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1549 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1550 based on the cast_loc through to the end of the expr.
1551 (c_parser_unary_expression): Likewise, based on the
1552 op_loc through to the end of op.
1553 (c_parser_sizeof_expression) Likewise, based on the start of the
1554 sizeof token through to either the closing paren or the end of
1555 expr.
1556 (c_parser_postfix_expression): Likewise, using the token range,
1557 or from the open paren through to the close paren for
1558 parenthesized expressions.
1559 (c_parser_postfix_expression_after_primary): Likewise, for
1560 various kinds of expression.
1561 * c-tree.h (struct c_expr): Add field "src_range".
1562 (c_expr::get_start): New method.
1563 (c_expr::get_finish): New method.
1564 (set_c_expr_source_range): New decls.
1565 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1566 on ret for prefix unary ops.
1567 (parser_build_binary_op): Likewise, running from the start of
1568 arg1.value through to the end of arg2.value.
1569
ec8b536f
MP
15702015-11-13 Marek Polacek <polacek@redhat.com>
1571
1572 PR c/68320
1573 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1574
277fe616
DM
15752015-11-13 David Malcolm <dmalcolm@redhat.com>
1576
1577 * c-typeck.c: Include spellcheck.h.
1578 (lookup_field_fuzzy_find_candidates): New function.
1579 (lookup_field_fuzzy): New function.
1580 (build_component_ref): If the field was not found, try using
1581 lookup_field_fuzzy and potentially offer a suggestion.
1582
6e232ba4
JN
15832015-11-12 James Norris <jnorris@codesourcery.com>
1584 Joseph Myers <joseph@codesourcery.com>
1585
1586 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1587 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1588 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1589 and PRAGMA_OMP_CLAUSE_LINK.
1590 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1591 and PRAGMA_OACC_CLAUSE_LINK.
1592 (OACC_DECLARE_CLAUSE_MASK): New definition.
1593 (c_parser_oacc_declare): New function.
1594
9be4f715
MP
15952015-11-12 Marek Polacek <polacek@redhat.com>
1596
1597 PR c/67784
1598 * c-parser.c (c_parser_for_statement): Reclassify the token in
1599 a correct scope.
1600
e78bede6
MP
16012015-11-11 Marek Polacek <polacek@redhat.com>
1602
1603 PR c/68107
1604 PR c++/68266
1605 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1606 checking the size of an array.
1607
69f293c9
AM
16082015-11-11 Andrew MacLeod <amacleod@redhat.com>
1609
1610 * c-array-notation.c: Remove unused header files.
1611 * c-aux-info.c: Likewise.
1612 * c-convert.c: Likewise.
1613 * c-decl.c: Likewise.
1614 * c-errors.c: Likewise.
1615 * c-lang.c: Likewise.
1616 * c-objc-common.c: Likewise.
1617 * c-parser.c: Likewise.
1618 * c-typeck.c: Likewise.
1619 * gccspec.c: Likewise.
1620
3a40d81d
NS
16212015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1622 Cesar Philippidis <cesar@codesourcery.com>
1623 James Norris <jnorris@codesourcery.com>
1624 Julian Brown <julian@codesourcery.com>
1625 Nathan Sidwell <nathan@codesourcery.com>
1626
1627 c/
1628 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1629 routine arg.
1630 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1631 (c_parser_pragma): Parse 'acc routine'.
1632 (OACC_ROUTINE_CLAUSE_MARK): Define.
1633 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1634
fc402eec
AA
16352015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1636
1637 PR debug/67192
1638 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1639 location of the backward-goto to the start of the loop body.
1640
f6b0b3db
AA
16412015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1642
1643 PR debug/67192
1644 * c-parser.c (c_parser_while_statement): Finish the loop before
1645 parsing ahead for misleading indentation.
1646 (c_parser_for_statement): Likewise.
1647
ee45a32d
EB
16482015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1649
1650 * c-decl.c (finish_struct): If the structure has reverse storage
1651 order, rewrite the type of array fields with scalar component. Call
1652 maybe_apply_pragma_scalar_storage_order on entry.
1653 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1654 errors on bit-fields and reverse SSO here and not...
1655 (c_mark_addressable): ...here.
1656 (output_init_element): Adjust call to initializer_constant_valid_p.
1657 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1658
8a645150
DM
16592015-11-06 David Malcolm <dmalcolm@redhat.com>
1660
1661 * c-decl.c (warn_defaults_to): Update for change in signature
1662 of diagnostic_set_info.
1663 * c-errors.c (pedwarn_c99): Likewise.
1664 (pedwarn_c90): Likewise.
1665 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1666 for textinfo::set_location.
1667
7a5e4956
CP
16682015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1669 Thomas Schwinge <thomas@codesourcery.com>
1670 James Norris <jnorris@codesourcery.com>
1671
1672 * c-parser.c (c_parser_omp_clause_name): Add support for
1673 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1674 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1675 default(none) in OpenACC.
1676 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1677 arguments.
1678 (c_parser_oacc_clause_tile): New function.
1679 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1680 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1681 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1682 TILE}.
1683 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1684 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1685 FIRSTPRIVATE}.
1686 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1687 (c_parser_oacc_update): Update the error message for missing clauses.
1688 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1689 and OMP_CLAUSE_INDEPENDENT.
1690
bfcfbfa0
MP
16912015-11-05 Marek Polacek <polacek@redhat.com>
1692
1693 PR c/68090
1694 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1695 deal with pre-evaluation on invalid types.
1696
e01d41e5
JJ
16972015-11-05 Jakub Jelinek <jakub@redhat.com>
1698 Ilya Verbin <ilya.verbin@intel.com>
1699
1700 * c-parser.c: Include context.h and gimple-expr.h.
1701 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1702 monotonic together with nonmonotonic.
1703 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1704 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1705 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1706 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1707 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1708 expressions on combined target teams before the target.
1709 (c_parser_omp_declare_target): If decl has "omp declare target" or
1710 "omp declare target link" attribute, and cgraph or varpool node already
1711 exists, then set corresponding flags. Call c_finish_omp_clauses
1712 in the parenthesized extended-list syntax case.
1713 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1714 declare target.
1715 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1716 on OMP_CLAUSE_REDUCTION array sections.
1717 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1718 into the constant offset, or for variable low-bound using
1719 POINTER_PLUS_EXPR. For structure element based array sections use
1720 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1721 (c_finish_omp_clauses): Drop generic_field_head, structure
1722 elements are now always mapped even as array section bases,
1723 diagnose same var in data sharing and mapping clauses. Diagnose if
1724 linear step on declare simd is neither a constant nor a uniform
1725 parameter. Look through POINTER_PLUS_EXPR for array section
1726 reductions. Diagnose the same var or function appearing multiple
1727 times on the same directive. Fix up wording for the to clause if t
1728 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1729 modifier on kinds other than dynamic or guided or nonmonotonic
1730 modifier together with ordered clause.
1731
4bf9e5a8
TS
17322015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1733 Chung-Lin Tang <cltang@codesourcery.com>
1734
1735 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1736
2adfab87
AM
17372015-10-29 Andrew MacLeod <amacleod@redhat.com>
1738
1739 * c-array-notation.c: Reorder #include's and remove duplicates.
1740 * c-aux-info.c: Likewise.
1741 * c-convert.c: Likewise.
1742 * c-decl.c: Likewise.
1743 * c-errors.c: Likewise.
1744 * c-lang.c: Likewise.
1745 * c-objc-common.c: Likewise.
1746 * c-parser.c: Likewise.
1747 * c-typeck.c: Likewise.
1748
e922069e
JW
17492015-10-26 Jim Wilson <jim.wilson@linaro.org>
1750
1751 PR debug/66068
1752 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1753 after calling build_qualified_type.
1754
765dd391
CP
17552015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1756 Thomas Schwinge <thomas@codesourcery.com>
1757 James Norris <jnorris@codesourcery.com>
1758 Joseph Myers <joseph@codesourcery.com>
1759 Julian Brown <julian@codesourcery.com>
1760 Bernd Schmidt <bschmidt@redhat.com>
1761
1762 * c-parser.c (c_parser_oacc_shape_clause): New.
1763 (c_parser_oacc_simple_clause): New.
1764 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1765 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1766
88bae6f4
TS
17672015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1768 James Norris <jnorris@codesourcery.com>
1769 Cesar Philippidis <cesar@codesourcery.com>
1770
1771 PR c/64765
1772 PR c/64880
1773 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1774 parameters, and handle these. Adjust all users.
1775 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1776 into...
1777 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1778 all users.
1779 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1780 declare functions.
1781 (c_finish_omp_construct): Declare function.
1782 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1783 Merge functions into...
1784 (c_finish_omp_construct): ... this new function.
1785
a8fc2579
RB
17862015-10-22 Richard Biener <rguenther@suse.de>
1787
1788 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1789 before folding a MINUS_EXPR.
1790
e9122ef6
MP
17912015-10-21 Marek Polacek <polacek@redhat.com>
1792
1793 PR c/68024
1794 * c-decl.c (start_function): Warn about vararg functions without
1795 a prototype.
1796
9f47c7e5
IE
17972015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1798
1799 * c-typeck.c (build_conditional_expr): Use boolean vector
1800 type for vector comparison.
1801 (build_vec_cmp): New.
1802 (build_binary_op): Use build_vec_cmp for comparison.
1803
fa60eeb9
MP
18042015-10-20 Marek Polacek <polacek@redhat.com>
1805
1806 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1807
2c7020eb
MP
18082015-10-20 Marek Polacek <polacek@redhat.com>
1809
1810 PR c/67964
1811 * c-parser.c (c_parser_attributes): Break out of the loop if the
1812 token after an attribute isn't a comma.
1813
d9a6bd32
JJ
18142015-10-13 Jakub Jelinek <jakub@redhat.com>
1815 Aldy Hernandez <aldyh@redhat.com>
1816
1817 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1818 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1819 (c_parser_omp_variable_list): Handle structure elements for
1820 map, to and from clauses. Handle array sections in reduction
1821 clause. Formatting fixes.
1822 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1823 if clause modifiers.
1824 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1825 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1826 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1827 c_parser_omp_clause_is_device_ptr): New functions.
1828 (c_parser_omp_clause_ordered): Parse optional parameter.
1829 (c_parser_omp_clause_reduction): Handle array reductions.
1830 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1831 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1832 functions.
1833 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1834 (c_parser_omp_clause_depend_sink): New function.
1835 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1836 (c_parser_omp_clause_map): Parse release/delete map kinds and
1837 optional always modifier.
1838 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1839 and c_finish_omp_clauses callers.
1840 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1841 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1842 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1843 (OMP_CRITICAL_CLAUSE_MASK): Define.
1844 (c_parser_omp_critical): Parse critical clauses.
1845 (c_parser_omp_for_loop): Handle doacross loops, adjust
1846 c_finish_omp_for and c_finish_omp_clauses callers.
1847 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1848 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1849 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1850 (c_parser_omp_for): Disallow ordered clause when combined with
1851 distribute. Disallow linear clause when combined with distribute
1852 and not combined with simd.
1853 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1854 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1855 parse clauses and if depend clause is found, don't parse a body.
1856 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1857 Allow target parallel without for after it.
1858 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1859 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1860 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1861 invalid kinds.
1862 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1863 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1864 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1865 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1866 functions.
1867 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1868 defaultmap and is_device_ptr clauses.
1869 (c_parser_omp_target): Parse target parallel and target simd. Set
1870 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1871 and target exit data. Diagnose invalid map kinds.
1872 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1873 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1874 construct.
1875 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1876 &omp_priv.
1877 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1878 (c_parser_omp_taskloop): New function.
1879 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1880 handle PRAGMA_OMP_TASKLOOP.
1881 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1882 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1883 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1884 Add IS_OMP argument, handle structure element bases, diagnose
1885 bitfields, pass IS_OMP recursively, diagnose known zero length
1886 array sections in depend clauses, handle array sections in reduction
1887 clause, diagnose negative length even for pointers.
1888 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1889 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1890 array sections in reduction clause, set
1891 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1892 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1893 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1894 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1895
21ba0cea
MP
18962015-10-06 Marek Polacek <polacek@redhat.com>
1897
1898 * c-parser.c (c_parser_statement_after_labels): Use
1899 protected_set_expr_location.
1900 (c_parser_omp_clause_num_gangs): Likewise.
1901 (c_parser_omp_clause_num_threads): Likewise.
1902 (c_parser_omp_clause_num_workers): Likewise.
1903 (c_parser_omp_clause_vector_length): Likewise.
1904 (c_parser_omp_clause_num_teams): Likewise.
1905 (c_parser_omp_clause_thread_limit): Likewise.
1906 * c-typeck.c (build_c_cast): Likewise.
1907 (c_cast_expr): Likewise.
1908
624d31fe
RS
19092015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1910
1911 * c-typeck.c (c_tree_equal): Use real_equal instead of
1912 REAL_VALUES_EQUAL.
1913
b8fd7909
JM
19142015-10-04 Jason Merrill <jason@redhat.com>
1915
1916 * c-parser.c (c_lex_one_token): Handle @synchronized.
1917 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1918 can change whether the function is transaction_safe.
1919
1c7485af
MP
19202015-10-02 Marek Polacek <polacek@redhat.com>
1921
1922 PR c/67730
1923 * c-typeck.c (convert_for_assignment): Use the expansion point
1924 location throughout.
1925
3e3b8d63
MP
19262015-10-02 Marek Polacek <polacek@redhat.com>
1927
1928 PR c/64249
1929 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1930 and pass it down to c_parser_if_statement.
1931 (c_parser_else_body): Add CHAIN parameter and pass it down to
1932 c_parser_statement_after_labels.
1933 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1934 duplicated if-else-if conditions.
1935
aabef2de
MP
19362015-10-01 Marek Polacek <polacek@redhat.com>
1937
1938 * c-typeck.c (convert_for_assignment): Improve commentary.
1939
de8ddd5f
MP
19402015-09-30 Marek Polacek <polacek@redhat.com>
1941
1942 PR c/67730
1943 * c-typeck.c (c_finish_return): Use the expansion point location for
1944 certain "return with value" warnings.
1945
c4914de6
MLI
19462015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1947
1948 * c-parser.c (pragma_lex): Add loc argument.
1949
0e36f5c7
MP
19502015-09-15 Marek Polacek <polacek@redhat.com>
1951
1952 PR c/67580
1953 * c-decl.c (tag_exists_p): New function.
1954 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1955 struct/union/enum keywords are missing.
1956 * c-tree.h (tag_exists_p): Declare.
1957
2f3bb934
MP
19582015-09-15 Marek Polacek <polacek@redhat.com>
1959
1960 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1961 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1962 Return NULL_TREE instead of 0.
1963 (lookup_name): Return NULL_TREE instead of 0.
1964 (lookup_name_in_scope): Likewise.
1965 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1966 (parser_xref_tag): Use false instead of 0.
1967 (start_struct): Use true instead of 1.
1968 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1969
aa256c4a
MP
19702015-09-14 Marek Polacek <polacek@redhat.com>
1971
1972 * c-typeck.c (set_nonincremental_init_from_string): Use
1973 HOST_WIDE_INT_M1U when shifting a negative value.
1974
dbb68221
MW
19752015-09-09 Mark Wielaard <mjw@redhat.com>
1976
1977 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1978 parm against NULL.
1979
a8a098ac
JJ
19802015-09-10 Jakub Jelinek <jakub@redhat.com>
1981
1982 PR c/67502
1983 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1984 into OMP_FOR_PRE_BODY rather than before the loop.
1985
f4b189d5
JJ
19862015-09-09 Jakub Jelinek <jakub@redhat.com>
1987
0bb99c11
JJ
1988 PR c/67501
1989 * c-parser.c (c_parser_oacc_all_clauses,
1990 c_parser_omp_all_clauses): Remove invalid clause from
1991 list of clauses even if parser->error is set.
1992
fce5e5e3
JJ
1993 PR c/67500
1994 * c-parser.c (c_parser_omp_clause_aligned,
1995 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1996 test for errors.
1997 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1998 error_mark_node.
1999
f4b189d5
JJ
2000 PR c/67495
2001 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2002 instead of c_parser_unary_expression. If the result is !lvalue_p,
2003 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2004
b2aaf235
MP
20052015-09-04 Marek Polacek <polacek@redhat.com>
2006
2007 PR sanitizer/67279
2008 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2009
1807ffc1
MS
20102015-09-03 Martin Sebor <msebor@redhat.com>
2011
2012 PR c/66516
8b652e65
JJ
2013 * c-typeck.c (convert_arguments, parser_build_unary_op,
2014 build_conditional_expr, c_cast_expr, convert_for_assignment,
2015 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2016 reject_gcc_builtin.
2017 (c_decl_implicit): Define.
2018
d04ff417
MP
20192015-09-02 Marek Polacek <polacek@redhat.com>
2020
2021 PR c/67432
2022 * c-parser.c (c_parser_enum_specifier): Give a better error for
2023 an empty enum.
2024
a79683d5
TS
20252015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2026
2027 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2028
191a6b94
MP
20292015-08-12 Marek Polacek <polacek@redhat.com>
2030
2031 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2032 LOC to it.
2033
420a9d9b
MP
20342015-08-03 Marek Polacek <polacek@redhat.com>
2035
2036 PR c/67088
2037 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2038 Use it.
2039 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2040
992118a1
PP
20412015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2042
2043 * c-parser.c (c_parser_if_body): Take token_indent_info
2044 argument. Call warn_for_misleading_indentation even when the
2045 body is a semicolon. Extract token_indent_infos corresponding
2046 to the guard, body and next tokens. Adjust call to
2047 warn_for_misleading_indentation accordingly.
2048 (c_parser_else_body): Likewise.
2049 (c_parser_if_statement): Likewise.
2050 (c_parser_while_statement): Likewise.
2051 (c_parser_for_statement): Likewise.
2052
46308474
LFSM
20532015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2054 Manuel López-Ibáñez <manu@gcc.gnu.org>
2055
2056 * c-decl.c (get_parm_info): Remove static var. Update warning
2057 message.
2058
05b28fd6
MP
20592015-07-27 Marek Polacek <polacek@redhat.com>
2060
2061 PR c++/66555
2062 PR c/54979
2063 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2064
451b5e48
MP
20652015-07-20 Marek Polacek <polacek@redhat.com>
2066
2067 PR c++/55095
2068 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2069 (build_binary_op): Warn about left shift overflows.
2070
1916bcb5
AM
20712015-07-09 Andrew MacLeod <amacleod@redhat.com>
2072
2073 * c-array-notation.c: Adjust includes for flags.h changes.
2074 * c-objc-common.c: Likewise.
2075
c7131fb2
AM
20762015-07-07 Andrew MacLeod <amacleod@redhat.com>
2077
2078 * c-array-notation.c: Adjust includes.
2079 * c-aux-info.c: Likewise.
2080 * c-convert.c: Likewise.
2081 * c-decl.c: Likewise.
2082 * c-errors.c: Likewise.
2083 * c-lang.c: Likewise.
2084 * c-objc-common.c: Likewise.
2085 * c-parser.c: Likewise.
2086 * c-typeck.c: Likewise.
2087
da2e71c9
MLI
20882015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2089
2090 PR fortran/66605
2091 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2092
b155cfd9
MP
20932015-06-29 Marek Polacek <polacek@redhat.com>
2094
2095 PR c/66322
2096 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2097 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2098 about -Wswitch-bool here.
2099 (do_case): Update c_add_case_label call.
2100 (c_finish_case): Update c_do_switch_warnings call.
2101
31521951
MP
21022015-06-27 Marek Polacek <polacek@redhat.com>
2103
2104 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2105
22d03525
MP
21062015-06-26 Marek Polacek <polacek@redhat.com>
2107
2108 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2109 INDIRECT_REF_P.
2110 * c-typeck.c (array_to_pointer_conversion): Likewise.
2111 (build_unary_op): Likewise.
2112 (c_finish_return): Likewise.
2113
f0889939
AM
21142015-06-25 Andrew MacLeod <amacleod@redhat.com>
2115
2116 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2117 * c-parser.c: Likewise.
2118
8d67ee55
RS
21192015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2120
2121 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2122 instead of pointer_hash.
2123 (detect_field_duplicates): Likewise.
2124
0ae9bd27
MP
21252015-06-25 Marek Polacek <polacek@redhat.com>
2126
2127 * c-array-notation.c: Use VAR_P throughout.
2128 * c-decl.c: Likewise.
2129 * c-objc-common.c: Likewise.
2130 * c-parser.c: Likewise.
2131 * c-typeck.c: Likewise.
2132
62f9079a
MP
21332015-06-25 Marek Polacek <polacek@redhat.com>
2134
2135 * c-decl.c: Use is_global_var throughout.
2136 * c-parser.c: Likewise.
2137 * c-typeck.c: Likewise.
2138
abb226c9
AM
21392015-06-17 Andrew MacLeod <amacleod@redhat.com>
2140
2141 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2142 * c-aux-info.c: Likewise.
2143 * c-convert.c: Likewise.
2144 * c-decl.c: Likewise.
2145 * c-errors.c: Likewise.
2146 * c-lang.c: Likewise.
2147 * c-objc-common.c: Likewise.
2148 * c-parser.c: Likewise.
2149 * c-typeck.c: Likewise.
2150
8cbababc
JH
21512015-06-11 Jan Hubicka <hubicka@ucw.cz>
2152
2153 PR middle-end/66325
2154 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2155 variants.
2156
a0349665
PMR
21572015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2158
2159 * c-decl.c (pop_scope): Register the main translation unit
2160 through the new debug hook.
2161
13fdf2e2
AM
21622015-06-08 Andrew MacLeod <amacleod@redhat.com>
2163
2164 * c-array-notation.c : Adjust include files.
2165 * c-aux-info.c : Likewise.
2166 * c-convert.c : Likewise.
2167 * c-decl.c : Likewise.
2168 * c-errors.c : Likewise.
2169 * c-lang.c : Likewise.
2170 * c-lang.h : Likewise.
2171 * c-objc-common.c : Likewise.
2172 * c-parser.c : Likewise.
2173 * c-typeck.c : Likewise.
2174
d7438551
AH
21752015-06-05 Aldy Hernandez <aldyh@redhat.com>
2176
2177 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2178 immediately clobber it.
2179 (c_write_global_declarations_1): Remove call to
2180 check_global_declaration_1.
2181 (c_write_global_declarations_2): Remove.
2182 (c_write_final_cleanups): Rename from c_write_global_declarations.
2183 Remove call to finalize_compilation_unit.
2184 Remove calls to debugging hooks.
2185 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2186 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2187 * c-tree.h: Remove c_write_global_declarations.
2188
ecb9f223
AM
21892015-06-04 Andrew MacLeod <amacleod@redhat.com>
2190
2191 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2192 * c-aux-info.c: Likewise.
2193 * c-convert.c: Likewise.
2194 * c-decl.c: Likewise.
2195 * c-errors.c: Likewise.
2196 * c-lang.c: Likewise.
2197 * c-objc-common.c: Likewise.
2198 * c-parser.c: Likewise.
2199 * c-typeck.c: Likewise.
2200
9482b620
MP
22012015-06-04 Marek Polacek <polacek@redhat.com>
2202
2203 PR c/66341
2204 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2205 it is a lvalue.
2206
bc51ace3
PK
22072015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2208
2209 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2210 Warn for empty struct.
2211 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2212
ea5b45b6
AT
22132015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2214
2215 * c-decl.c (start_function): Call plugin before parsing.
2216 (finish_function): Call plugin after parsing.
2217
c2d47482
PK
22182015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2219
2220 PR c/49551
2221 * c-decl.c (merge_decls): Merge DECL_COMMON.
2222
a95492ab
JW
22232015-05-22 Jim Wilson <jim.wilson@linaro.org>
2224
2225 * Make-lang.in (check_gcc_pallelize): Define.
2226
fd5c817a
MP
22272015-05-22 Marek Polacek <polacek@redhat.com>
2228
2229 PR c/47043
2230 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2231 attributes.
2232
c7b70a3c
MP
22332015-05-21 Marek Polacek <polacek@redhat.com>
2234
2235 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2236 DECL_BUILT_IN.
2237
21b634ae
MP
22382015-05-20 Marek Polacek <polacek@redhat.com>
2239
2240 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2241 * c-typeck.c: Likewise.
2242
296a8c2f
MP
22432015-05-19 Marek Polacek <polacek@redhat.com>
2244
2245 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2246
41b37d5e
JJ
22472015-05-19 Jakub Jelinek <jakub@redhat.com>
2248
2249 PR middle-end/66199
2250 * c-parser.c (c_parser_omp_for_loop): Don't add
2251 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2252 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2253 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2254 constructs.
2255
fab27f52
MM
22562015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2257
2258 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2259 swaps.
fab27f52 2260
40de31cf
MLI
22612015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2262
2263 PR fortran/44054
2264 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2265 accessor function.
2266
3aa3c9fc
MP
22672015-05-14 Marek Polacek <polacek@redhat.com>
2268
2269 PR c/66066
2270 PR c/66127
2271 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2272 rather than with 0.
2273
c3388e62
DM
22742015-05-12 David Malcolm <dmalcolm@redhat.com>
2275
2276 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2277 to add a call to warn_for_misleading_indentation.
2278 (c_parser_else_body): Likewise, adding param "else_loc".
2279 (c_parser_if_statement): Check for misleading indentation.
2280 (c_parser_while_statement): Likewise.
2281 (c_parser_for_statement): Likewise.
2282
755e528f
MP
22832015-05-08 Marek Polacek <polacek@redhat.com>
2284
2285 PR c/64918
2286 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2287 (output_init_element): Likewise.
2288
0173bd2a
MP
22892015-05-07 Marek Polacek <polacek@redhat.com>
2290
2291 PR c/65179
2292 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2293 value.
2294
9babc352
MP
22952015-04-30 Marek Polacek <polacek@redhat.com>
2296
2297 * c-typeck.c (set_init_label): Call error_at instead of error and
2298 pass LOC to it.
2299
ac9f18db
MP
2300 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2301 the type of a decl.
2302
ec3fba51
MP
2303 * c-typeck.c (c_build_va_arg): Clarify the error message.
2304
b811915d
TS
23052015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2306
2307 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2308 OMP_STANDALONE_CLAUSES.
2309
f3075008
MP
23102015-04-28 Marek Polacek <polacek@redhat.com>
2311
2312 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2313
4e81b788
MP
23142015-04-28 Marek Polacek <polacek@redhat.com>
2315
2316 PR c/65901
2317 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2318
6c1db78e
MP
23192015-04-25 Marek Polacek <polacek@redhat.com>
2320
2321 PR c/52085
2322 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2323 attribute.
2324
5c4abbb8
MP
23252015-04-23 Marek Polacek <polacek@redhat.com>
2326
2327 PR c/65345
2328 * c-decl.c (set_labels_context_r): New function.
2329 (store_parm_decls): Call it via walk_tree_without_duplicates.
2330 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2331 instead of create_tmp_var. Build TARGET_EXPR instead of
2332 COMPOUND_EXPR.
2333 (build_atomic_assign): Use create_tmp_var_raw instead of
2334 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2335
06aca1d5
IV
23362015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2337
2338 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2339 (c_parser_omp_target_update): Add missed %> to error_at ().
2340
8fba1830
BRF
23412015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2342
2343 PR target/55143
2344 * c-decl.c (c_default_pointer_mode): Remove definition.
2345 * c-tree.h (c_default_pointer_mode): Remove declaration.
2346
62021f64
TB
23472015-03-27 Tobias Burnus <burnus@net-b.de>
2348
2349 PR c/65586
2350 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2351 error out.
2352 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2353 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2354 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2355
9b65e171
JJ
23562015-03-19 Jakub Jelinek <jakub@redhat.com>
2357
2358 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2359 attribute for DECL_EXTERNAL VAR_DECLs.
2360
17958621
JJ
23612015-03-11 Jakub Jelinek <jakub@redhat.com>
2362
2363 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2364 argument.
2365
7ccb1a11
JJ
23662015-03-10 Jakub Jelinek <jakub@redhat.com>
2367
2368 PR c/65120
2369 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2370 before preparing arguments to warn_logical_not_parentheses.
2371
01177669
JJ
23722015-03-09 Jakub Jelinek <jakub@redhat.com>
2373
2374 PR c/65120
2375 * c-typeck.c (parser_build_binary_op): Don't warn for
2376 !!x == y or !b == y where b is _Bool.
2377
802ac282
MP
23782015-03-09 Marek Polacek <polacek@redhat.com>
2379
2380 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2381 * c-decl.c (grokdeclarator): Likewise.
2382 * c-typeck.c (build_binary_op): Likewise.
2383
e5165b60
MP
23842015-02-27 Marek Polacek <polacek@redhat.com>
2385
2386 PR c/65228
2387 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2388
065d214c
MP
23892015-02-14 Marek Polacek <polacek@redhat.com>
2390
2391 PR c/64768
2392 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2393 declared through a typedef name.
2394
e5d9235b
MP
23952015-02-13 Marek Polacek <polacek@redhat.com>
2396
2397 PR c/65050
2398 * c-decl.c (grokdeclarator): Print also the type when giving
2399 the error message about array's incomplete element type.
2400
fa01ffcc
JJ
24012015-02-11 Jakub Jelinek <jakub@redhat.com>
2402
2403 PR c/64824
2404 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2405 check in the POP macro.
2406
c3e38a03
MP
24072015-02-09 Marek Polacek <polacek@redhat.com>
2408
2409 PR c/64856
2410 * c-typeck.c (process_init_element): Don't always wrap
2411 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2412 initializing a range of elements.
2413
4886ec8e
JJ
24142015-02-04 Jakub Jelinek <jakub@redhat.com>
2415
2416 PR c/64824
2417 PR c/64868
2418 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2419
c3e38a03 24202015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2421
2422 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2423 processing enum declaration.
2424
7b33f0c8
MP
24252015-01-29 Marek Polacek <polacek@redhat.com>
2426
2427 PR c/64709
2428 * c-typeck.c (pop_init_level): If constructor_elements has
2429 exactly one element with integer_zerop value, set constructor_zeroinit
2430 to 1. Remove braces around warning_init call.
2431
dea63e49
JJ
24322015-01-27 Jakub Jelinek <jakub@redhat.com>
2433
2434 PR c/64766
2435 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2436 of FUNCTION_DECLs with error_mark_node.
2437
d38f7dce
JJ
24382015-01-26 Jakub Jelinek <jakub@redhat.com>
2439
2440 PR c/64778
2441 * c-typeck.c (convert_arguments): Return -1 if there are
2442 error_args, even if we've diagnosed too many arguments.
2443
cbf5d0e7
RB
24442015-01-21 Richard Biener <rguenther@suse.de>
2445
2446 PR middle-end/64313
2447 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2448 for builtins the user declared correctly.
2449
41dbbb37
TS
24502015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2451 Bernd Schmidt <bernds@codesourcery.com>
2452 Cesar Philippidis <cesar@codesourcery.com>
2453 James Norris <jnorris@codesourcery.com>
2454 Jakub Jelinek <jakub@redhat.com>
2455 Ilmir Usmanov <i.usmanov@samsung.com>
2456
2457 * c-parser.c: Include "gomp-constants.h".
2458 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2459 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2460 Use OMP_CLAUSE_SET_MAP_KIND.
2461 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2462 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2463 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2464 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2465 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2466 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2467 "copyout", "create", "delete", "deviceptr", "gang", "host",
2468 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2469 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2470 "present_or_create", "pcreate", "seq", "self", "vector",
2471 "vector_length", "wait", "worker".
2472 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2473 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2474 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2475 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2476 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2477 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2478 (c_parser_oacc_data_clause_deviceptr)
2479 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2480 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2481 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2482 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2483 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2484 (c_parser_oacc_parallel, c_parser_oacc_update)
2485 (c_parser_oacc_wait): New functions.
2486 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2487 (c_finish_oacc_data): New prototypes.
2488 * c-typeck.c: Include "gomp-constants.h".
2489 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2490 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2491 OMP_CLAUSE_SET_MAP_KIND.
2492 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2493 (c_finish_oacc_data): New functions.
2494 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2495 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2496 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2497 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2498 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2499 GOMP_MAP_FORCE_DEVICEPTR.
2500
adfac8df
JJ
25012015-01-09 Michael Collison <michael.collison@linaro.org>
2502
2503 * c-array-notation.c: Include hash-set.h, machmode.h,
2504 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2505 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2506 * c-aux-info.c: Ditto.
2507 * c-convert.c: Ditto.
2508 * c-decl.c: Ditto.
2509 * c-errors.c: Ditto.
2510 * c-lang.c: Dittoxs.
2511 * c-objc-common.c: Ditto.
2512 * c-parser.c: Ditto.
2513 * c-typeck.c: Include hash-set.h, machmode.h,
2514 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2515 fold-const.h, wide-int.h, inchash.h, real.h and
2516 fixed-value.h due to flattening of tree.h.
2517
2cc901dc
MP
25182015-01-07 Marek Polacek <polacek@redhat.com>
2519
2520 PR c/64417
2521 * c-typeck.c (process_init_element): Disallow initialization of
2522 a flexible array member with a string constant if the structure
2523 is in an array.
2524
5624e564
JJ
25252015-01-05 Jakub Jelinek <jakub@redhat.com>
2526
e5341100
JJ
2527 PR sanitizer/64344
2528 * c-typeck.c (convert_for_assignment, c_finish_return): For
2529 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2530 types also set in_late_binary_op around convert call.
2531 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2532 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2533 result on expr as last argument to ubsan_instrument_float_cast,
2534 if in_late_binary_op, don't use c_save_expr but save_expr.
2535
5624e564
JJ
2536 Update copyright years.
2537
5bd012f8
MP
25382015-01-05 Marek Polacek <polacek@redhat.com>
2539
2540 PR c/64423
2541 * c-typeck.c (build_array_ref): Pass loc down to
2542 warn_array_subscript_with_type_char.
2543
3f8257db 25442014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2545
2546 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2547 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2548 element type.
8e745a17 2549 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2550 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2551 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2552 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2553 to PEDWARN_FOR_QUALIFIERS.
768952be 2554
8f94a8c4
JJ
25552014-12-17 Jakub Jelinek <jakub@redhat.com>
2556
2557 PR sanitizer/64289
2558 * c-convert.c: Include ubsan.h.
2559 (convert): For real -> integral casts and
2560 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2561 instead instrument the float cast directly.
2562
b731b390
JJ
25632014-11-29 Jakub Jelinek <jakub@redhat.com>
2564
2565 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2566 c_finish_stmt_expr): Remove NULL last argument from
2567 create_tmp_var_raw and create_tmp_var calls.
2568 * c-array-notation.c (fix_builtin_array_notation_fn,
2569 build_array_notation_expr, fix_conditional_array_notations_1,
2570 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2571
541e35a6
MP
25722014-11-28 Marek Polacek <polacek@redhat.com>
2573
2574 PR c/63862
2575 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2576 convert the right operand to integer type.
2577
b286be94
MP
25782014-11-25 Marek Polacek <polacek@redhat.com>
2579
2580 PR c/63877
2581 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2582 for inline functions.
2583
aa7da51a
JJ
25842014-11-21 Jakub Jelinek <jakub@redhat.com>
2585
2586 PR target/63764
2587 * c-typeck.c (build_array_ref): Adjust
2588 convert_vector_to_pointer_for_subscript caller. If it returns true,
2589 call non_lvalue_loc on the result.
2590
d876207f
RB
25912014-11-11 Richard Biener <rguenther@suse.de>
2592
2593 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2594 to true.
2595
e5e44252
AK
25962014-11-10 Andi Kleen <ak@linux.intel.com>
2597
2598 PR c/60804
2599 * c-parser.c (c_parser_statement_after_labels): Call
2600 check_no_cilk.
2601 (c_parser_if_statement): Dito.
2602 (c_parser_switch_statement): Dito.
2603 (c_parser_while_statement): Dito.
2604 (c_parser_do_statement): Dito.
2605 (c_parser_for_statement): Dito.
2606 * c-typeck.c (c_finish_loop): Dito.
2607
13c21655
PC
26082014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2609
2610 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2611 OPT_Wshift_count_overflow in the warnings.
2612
2d51fcef
MP
26132014-10-30 Marek Polacek <polacek@redhat.com>
2614
2615 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2616 print the stripped version as well, if they're not the same.
2617
ef4bddc2
RS
26182014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2619
2620 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2621 machine_mode.
2622
c582198b
AM
26232014-10-28 Andrew MacLeod <amacleod@redhat.com>
2624
2625 * c-decl.c: Adjust include files.
2626 * c-parser.c: Ditto.
2627
ddc8de03
PM
26282014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2629 Tom Tromey <tromey@redhat.com>
2630
2631 * c-tree.h (enum c_oracle_request): New.
2632 (c_binding_oracle_function): New typedef.
2633 (c_binding_oracle, c_pushtag, c_bind): Declare.
2634 * c-decl.c (c_binding_oracle): New global.
2635 (I_SYMBOL_CHECKED): New macro.
2636 (i_symbol_binding): New function.
2637 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2638 (I_TAG_CHECKED): New macro.
2639 (i_tag_binding): New function.
2640 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2641 (I_LABEL_CHECKED): New macro.
2642 (i_label_binding): New function.
2643 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2644 (c_print_identifier): Save and restore c_binding_oracle.
2645 (c_pushtag, c_bind): New functions.
2646
60393bbc
AM
26472014-10-27 Andrew MacLeod <amacleod@redhat.com>
2648
2649 * c-typeck.c: Adjust include files.
2650
d723bb7c
MLI
26512014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2652
2653 PR c++/53061
2654 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2655 initialization here...
2656 (c_initialize_diagnostics): ... but here. Set defaults after
2657 building pretty-printer.
2658
1bc5a451
MP
26592014-10-23 Marek Polacek <polacek@redhat.com>
2660
2661 PR c/63626
2662 * c-decl.c (pop_scope): Don't print warning in external_scope.
2663
4435bb92
MP
26642014-10-19 Marek Polacek <polacek@redhat.com>
2665
2666 PR c/63567
2667 * c-typeck.c (output_init_element): Allow initializing objects with
2668 static storage duration with compound literals even in C99 and add
2669 pedwarn for it.
2670
7278465e
MP
26712014-10-17 Marek Polacek <polacek@redhat.com>
2672
2673 PR c/63567
2674 * c-typeck.c (digest_init): Allow initializing objects with static
2675 storage duration with compound literals even in C99 and add pedwarn
2676 for it.
2677
d9b7be2e
MP
26782014-10-17 Marek Polacek <polacek@redhat.com>
2679
2680 PR c/63543
2681 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2682 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2683 error multiple times. Print the type.
2684
f406ae1f
MP
26852014-10-17 Marek Polacek <polacek@redhat.com>
2686
2687 PR c/63549
2688 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2689 type.
2690
92574c7c
MP
26912014-10-17 Marek Polacek <polacek@redhat.com>
2692
2693 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2694 (start_function): Use OPT_Wimplicit_int instead of 0.
2695 (store_parm_decls_oldstyle): Likewise.
2696
1bc4a978
MT
26972014-10-17 Alan Modra <amodra@gmail.com>
2698
2699 PR middle-end/61848
2700 * c-decl.c (merge_decls): Don't merge section name or tls model
2701 to newdecl symtab node, instead merge to olddecl. Override
2702 existing olddecl section name. Set tls_model for all thread-local
2703 vars, not just OMP thread-private ones. Remove incorrect comment.
2704
83685514
AM
27052014-10-16 Andrew MacLeod <amacleod@redhat.com>
2706
2707 * c-decl.c: Adjust include files.
2708
78a7c317
DD
27092014-10-14 DJ Delorie <dj@redhat.com>
2710
2711 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2712 (c_token_starts_typename): Check all __intN, not just __int128.
2713 (c_token_starts_declspecs): Likewise.
2714 (c_parser_declspecs): Likewise.
2715 (c_parser_attribute_any_word): Likewise.
2716 (c_parser_objc_selector): Likewise.
2717 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2718 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2719 is specified.
2720 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2721 __int128.
2722 (finish_declspecs): Likewise.
2723
74d98c1e
AB
27242014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2725
8e745a17 2726 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 2727 the duplicate code.
8e745a17 2728 (c_parser_statement): Call the new function.
74d98c1e 2729
84937de2
MP
27302014-10-09 Marek Polacek <polacek@redhat.com>
2731
2732 PR c/63480
2733 * c-typeck.c (pop_init_level): Don't warn about initializing
2734 with { }.
2735
0382aaa0
MP
27362014-10-07 Marek Polacek <polacek@redhat.com>
2737
2738 PR c/59717
2739 * c-decl.c (header_for_builtin_fn): New function.
2740 (implicitly_declare): Suggest which header to include.
2741
7a0ca710
MP
27422014-10-07 Marek Polacek <polacek@redhat.com>
2743
2744 * c-convert.c (convert): Use error_operand_p.
2745 * c-typeck.c (require_complete_type): Likewise.
2746 (really_atomic_lvalue): Likewise.
2747 (digest_init): Likewise.
2748 (handle_omp_array_sections_1): Likewise.
2749
6bc8a126
MP
27502014-10-03 Marek Polacek <polacek@redhat.com>
2751
2752 PR c/63453
2753 * c-decl.c (pop_scope): Don't warn about "inline function declared
2754 but never defined" for functions marked with gnu_inline attribute.
2755
d90c0a59
JJ
27562014-09-25 Jakub Jelinek <jakub@redhat.com>
2757
2758 PR c++/63249
2759 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2760 on low_bound and length.
2761
083e891e
MP
27622014-09-24 Marek Polacek <polacek@redhat.com>
2763
2764 PR c/61405
2765 PR c/53874
2766 * c-parser.c: Don't define CPP_KEYWORD.
2767 (c_parser_switch_statement): Pass original type to c_finish_case.
2768 * c-tree.h (c_finish_case): Update declaration.
2769 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2770 conditionally to c_do_switch_warnings.
2771
8d95fe25
MP
27722014-09-03 Marek Polacek <polacek@redhat.com>
2773
2774 PR c/62024
2775 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2776 conversions.
2777
9a771876
JJ
27782014-09-02 Jakub Jelinek <jakub@redhat.com>
2779 Balaji V. Iyer <balaji.v.iyer@intel.com>
2780 Igor Zamyatin <igor.zamyatin@intel.com>
2781
2782 * c-parser.c (c_parser_cilk_for): New function.
2783 (c_parser_cilk_grainsize): Likewise.
2784 (c_get_temp_regvar): Likewise.
2785 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2786 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2787 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2788 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2789 case.
2790
b7679d96
CG
27912014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2792
2793 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2794 with using HOST_WIDE_INT without truncation to 'int'
2795
59ea0364
MP
27962014-08-22 Marek Polacek <polacek@redhat.com>
2797
2798 PR c++/62199
2799 * c-typeck.c (parser_build_binary_op): Adjust call to
2800 warn_logical_not_parentheses.
2801
671a475e
IZ
28022014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2803
2804 PR other/62008
2805 * c-parser.c (c_parser_array_notation): Check for correct
2806 type of an array added.
2807
04159acf
MP
28082014-08-19 Marek Polacek <polacek@redhat.com>
2809
2810 PR c++/62153
2811 * c-typeck.c (build_binary_op): If either operand of a comparison
2812 is a boolean expression, call maybe_warn_bool_compare.
2813
c77935ee
PP
28142014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2815
2816 PR c/45584
2817 * c-typeck.c (build_c_cast): Do a conversion even when the
2818 TYPE_MAIN_VARIANTs are the same.
2819
35aff4fb
MP
28202014-08-19 Marek Polacek <polacek@redhat.com>
2821
2822 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2823 pedwarn_c99 instead of pedwarn.
2824 (grokfield): Likewise.
2825 (warn_defaults_to): New function.
2826 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2827 Unconditionally call pedwarn_c99 instead of pedwarn.
2828 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2829 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2830 check flag_isoc11 before.
2831 * c-errors.c (pedwarn_c99): Change the return type to bool.
2832 Handle -Wc99-c11-compat.
2833 * c-parser.c (disable_extension_diagnostics): Handle
2834 warn_c99_c11_compat.
2835 (restore_extension_diagnostics): Likewise.
2836 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2837 instead of pedwarn, don't check flag_isoc11 before.
2838 (c_parser_declspecs): Likewise.
2839 (c_parser_alignas_specifier): Likewise.
2840 (c_parser_alignof_expression): Likewise.
2841 (c_parser_generic_selection): Likewise.
2842 * c-tree.h (pedwarn_c99): Update declaration.
2843 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2844 of pedwarn_c99.
2845
177cce46
MP
28462014-08-19 Marek Polacek <polacek@redhat.com>
2847
2848 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2849 to pedwarn_c90.
2850 * c-errors.c: Include "opts.h".
2851 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2852 * c-parser.c (disable_extension_diagnostics): Handle negative value
2853 of warn_c90_c99_compat, too.
2854 (restore_extension_diagnostics): Likewise.
2855 (c_parser_compound_statement_nostart): Pass
2856 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2857
6dc99c33
MP
28582014-08-12 Marek Polacek <polacek@redhat.com>
2859
2860 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2861 Add pedwarn.
2862 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2863 Likewise.
2864 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2865
3f8257db 28662014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
2867
2868 PR c/51849
2869 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2870 Call pedwarn_c90 instead of pedwarn.
2871 (check_bitfield_type_and_width): Likewise.
2872 (declspecs_add_qual): Likewise.
2873 (declspecs_add_type): Likewise.
2874 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2875 Adjust to only call pedwarn_c90.
2876 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2877 pedwarn_c90 instead of pedwarn.
2878 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2879 * c-parser.c (disable_extension_diagnostics): Handle
2880 warn_c90_c99_compat.
2881 (restore_extension_diagnostics): Likewise.
2882 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2883 pedwarn_c90 instead of pedwarn.
2884 (c_parser_initelt): Likewise.
2885 (c_parser_postfix_expression): Likewise.
2886 (c_parser_postfix_expression_after_paren_type): Likewise.
2887 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2888 * c-tree.h: Fix formatting.
2889 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2890 pedwarn_c90 instead of pedwarn.
2891
9f25a338
TS
28922014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2893
2894 * c-typeck.c: Remove include of pointer-set.h.
2895
044331a8
MP
28962014-08-07 Marek Polacek <polacek@redhat.com>
2897
2898 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2899
b787e7a2
TS
29002014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2901
2902 * c-typeck.c: Use hash_map instead of pointer_map.
2903
6e2830c3
TS
29042014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2905
2906 * c-decl.c: Use hash_set instead of pointer_set.
2907
a7ee52fb
IZ
29082014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2909
2910 PR middle-end/61455
2911 * c-array-notation.c (expand_array_notations): Handling
2912 of DECL_EXPR added.
2913
b4dfdc11
MG
29142014-07-31 Marc Glisse <marc.glisse@inria.fr>
2915
2916 PR c++/60517
2917 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2918 a local variable.
2919
976d5a22
TT
29202014-07-30 Tom Tromey <tromey@redhat.com>
2921
2922 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2923 field.
2924 (really_start_incremental_init, push_init_level): Initialize
2925 designator_depth.
2926 (pop_init_level): Set global designator_depth.
2927 (process_init_element): Check for designated_init attribute.
2928
30281de2
MP
29292014-07-20 Marek Polacek <polacek@redhat.com>
2930
2931 PR c/61852
2932 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2933 (implicitly_declare): Pass location to implicit_decl_warning.
2934
b108f48f
JJ
29352014-07-14 Jakub Jelinek <jakub@redhat.com>
2936
2937 PR middle-end/61294
2938 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2939 If non-NULL, call c_parser_check_literal_zero.
2940 (c_parser_check_literal_zero): New function.
2941 (c_parser_postfix_expression_after_primary): Adjust
2942 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2943
773ec47f
MP
29442014-07-06 Marek Polacek <polacek@redhat.com>
2945
2946 PR c/6940
2947 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2948 * c-tree.h (C_ARRAY_PARAMETER): Define.
2949 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2950 function parameter.
2951
22e1cf1c 29522014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 2953 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
2954
2955 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2956 releasing symbol.
2957
52ec0ea3
MP
29582014-07-01 Marek Polacek <polacek@redhat.com>
2959
2960 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2961 instead of 0 to WARN_FOR_ASSIGNMENT.
2962
d5c3d343
MP
29632014-07-01 Marek Polacek <polacek@redhat.com>
2964
2965 PR c/58286
2966 * c-typeck.c (convert_for_assignment): Pass
2967 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2968
6a7253a4
MP
29692014-06-30 Marek Polacek <polacek@redhat.com>
2970
2971 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2972 has no_sanitize_undefined attribute.
2973
5e88a8f4
IZ
29742014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2975
2976 PR middle-end/57541
2977 * c-array-notation.c (fix_builtin_array_notation_fn):
2978 Check for 0 arguments in builtin call. Check that bultin argument is
2979 correct.
2980 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2981 index.
2982
9698b078
SH
29832014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2984
2985 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2986 qualifiers in __auto_type for atomic types.
2987 (c_parser_typeof_specifier): Discard all type qualifiers in
2988 __typeof__ for atomic types.
2989
6e07c515
MP
29902014-06-25 Marek Polacek <polacek@redhat.com>
2991
2992 PR c/61162
2993 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2994 the return expression to c_finish_return.
2995
da6f124d
JJ
29962014-06-25 Jakub Jelinek <jakub@redhat.com>
2997
2998 * c-typeck.c (c_finish_omp_clauses): Make sure
2999 OMP_CLAUSE_LINEAR_STEP has correct type.
3000
c203e8a7
TS
30012014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3002
3003 * c-decl.c: Adjust.
3004
56ad0e38
JJ
30052014-06-24 Jakub Jelinek <jakub@redhat.com>
3006
3007 * c-parser.c (c_parser_omp_for_loop): For
3008 #pragma omp parallel for simd move lastprivate clause from parallel
3009 to for rather than simd.
3010
47c2554f
MP
30112014-06-23 Marek Polacek <polacek@redhat.com>
3012
3013 * c-typeck.c (parser_build_binary_op): Don't call
3014 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3015
56363ffd
JH
30162014-06-15 Jan Hubicka <hubicka@ucw.cz>
3017
3018 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3019 * c-decl.c (merge_decls): Likewise.
3020
d7ff7ae5
MP
30212014-06-09 Marek Polacek <polacek@redhat.com>
3022
3023 PR c/36446
3024 * c-typeck.c (error_init): Call inform instead of error_at.
3025 (pedwarn_init): Call inform instead of pedwarn.
3026 (warning_init): Call inform instead of warning_at.
3027
24d047a3
JH
30282014-06-07 Jan Hubicka <hubicka@ucw.cz>
3029
3030 * c-decl.c (merge_decls): Use set_decl_section_name.
3031 (duplicate_decls): Remove node if it exists.
3032
9bac5cbb
G
30332014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3034
3035 PR c/53119
3036 * c-typeck.c (push_init_level, process_init_element,
3037 pop_init_level): Correct check for zero initialization, move
3038 missing brace warning to respect zero initialization.
3039
8ffcdea8
MP
30402014-06-05 Marek Polacek <polacek@redhat.com>
3041
3042 PR c/56724
3043 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3044
742938c9
MP
30452014-06-05 Marek Polacek <polacek@redhat.com>
3046
3047 PR c/49706
3048 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3049 on the left hand side operand of a comparison.
3050
6447c55d
MP
30512014-06-05 Marek Polacek <polacek@redhat.com>
3052
3053 PR c/48062
3054 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3055 Print note only if the warning was printed.
3056
9dc7743c
IZ
30572014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3058
3059 PR c/58942
3060 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3061 with a pointer.
3062
fedfecef
MP
30632014-06-03 Marek Polacek <polacek@redhat.com>
3064
3065 PR c/60439
3066 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3067 c_start_case.
3068 * c-tree.h (c_start_case): Update.
3069 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3070 switch condition has boolean value.
3071
9b2b7279
AM
30722014-06-02 Andrew MacLeod <amacleod@redhat.com>
3073
3074 * c-decl.c: Include builtins.h.
3075 * c-parser.c: Likewise.
3076
5c1bc275
MP
30772014-05-27 Marek Polacek <polacek@redhat.com>
3078
3079 PR c/56724
3080 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3081 error and warning calls to error_at and warning_at. Pass location of
3082 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3083 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3084 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3085
97563bc8
IZ
30862014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3087
3088 PR c/61191
3089 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3090 function parameters.
3091
aede2c10
JH
30922014-05-23 Jan Hubicka <hubicka@ucw.cz>
3093
3094 * c-decl.c (merge_decls): Preserve symtab node pointers.
3095 (duplicate_decls): Free new decl.
3096
edbba2ce
TS
30972014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3098
f3316c6d
TS
3099 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3100 initialization.
3101
edbba2ce
TS
3102 * c-parser.c (c_parser_omp_target): Return bool values.
3103
68c81f24
TS
31042014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3105
3106 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3107 num_teams_loc variable to num_thread_limit_loc.
3108
632f2871
RS
31092014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3110
3111 * c-array-notation.c (expand_array_notations): Use void_node
3112 instead of void_zero_node.
3113
766090c2
TS
31142014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3115
3116 * c-decl.c (finish_struct): Adjust.
3117 (finish_enum): Likewise.
3118 (bind): Adjust.
3119 (record_inline_static): Likewise.
3120 (push_scope): Likewise.
3121 (make_label): Likewise.
3122 (lookup_label_for_goto): Likewise.
3123 (finish_struct): Likewise.
3124 (finish_enum): Likewise.
3125 (store_parm_decls): Likewise.
3126 (c_push_function_context): Likewise.
3127 * c-lang.h: Remove usage of variable_size gty attribute.
3128 * c-parser.c (c_parse_init): Adjust.
3129 (c_parse_file): Likewise.
3130
2b107f6b
MP
31312014-05-13 Marek Polacek <polacek@redhat.com>
3132
3133 PR c/61162
3134 * c-typeck.c (convert_for_assignment): Pass location to
3135 WARN_FOR_ASSIGNMENT instead of input_location.
3136
d033409e
MP
31372014-05-10 Marek Polacek <polacek@redhat.com>
3138
3139 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3140 maybe_warn_string_init.
3141 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3142 maybe_warn_string_init.
3143 * c-tree.h (maybe_warn_string_init): Update declaration.
3144 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3145 Call pedwarn_init with loc instead of with input_location.
3146 (digest_init): Pass init_loc to maybe_warn_string_init.
3147 (pop_init_level): Call pedwarn_init with loc instead of with
3148 input_location.
3149 (set_init_index): Likewise.
3150 (process_init_element): Likewise.
3151
ea58ef42
MP
31522014-05-09 Marek Polacek <polacek@redhat.com>
3153
3154 PR c/61096
3155 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3156 (c_parser_initelt): Pass location to set_init_label. Pass array index
3157 location to set_init_index.
3158 * c-tree.h (push_init_level): Update declaration.
3159 (pop_init_level): Likewise.
3160 (set_init_index): Likewise.
3161 (set_init_label): Likewise.
3162 * c-typeck.c (error_init): Add location parameter. Call error_at
3163 instead of error.
3164 (digest_init): Pass init_loc to error_init.
3165 (really_start_incremental_init):
3166 (push_init_level): Add location parameter. Pass loc to pop_init_level
3167 and error_init.
3168 (pop_init_level): Likewise.
3169 (set_designator): Add location parameter. Pass loc to pop_init_level,
3170 push_init_level, and error_init.
3171 (set_init_index): Add location parameter. Pass loc to error_init and
3172 set_designator.
3173 (set_init_label): Likewise.
3174 (output_init_element): Pass loc to error_init.
3175 (process_init_element): Pass loc to error_init, pop_init_level,
3176 pedwarn_init, and push_init_level.
3177
661a0813
MP
31782014-05-09 Marek Polacek <polacek@redhat.com>
3179
3180 PR c/50459
3181 * c-parser.c (c_parser_attributes): Parse the arguments as an
3182 expression-list if the attribute takes identifier.
3183
2793eeab
MP
31842014-05-08 Marek Polacek <polacek@redhat.com>
3185
3186 PR c/61053
3187 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3188 TYPE_ALIGN_UNIT.
3189
f827930a
MP
31902014-05-08 Marek Polacek <polacek@redhat.com>
3191
3192 PR c/61077
3193 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3194 of main.
3195
1d60af08
KZ
31962014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3197 Mike Stump <mikestump@comcast.net>
3198 Richard Sandiford <rdsandiford@googlemail.com>
3199
3200 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3201 (finish_enum): Use wide-int interfaces.
3202 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3203 * c-typeck.c (build_c_cast): Likewise.
3204 (set_nonincremental_init_from_string): Likewise.
3205 (c_tree_equal): Likewise.
3206
a0e24419
MP
32072014-05-02 Marek Polacek <polacek@redhat.com>
3208
3209 PR c/25801
3210 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3211 Return size_one_node when the type is not complete.
3212 (pointer_diff): Remove comment.
3213 (build_unary_op): Improve error messages.
3214
19fc9faa
MP
32152014-05-02 Marek Polacek <polacek@redhat.com>
3216
3217 * c-typeck.c (c_finish_return): Separate warning_at calls.
3218
63bc4e87
MP
32192014-05-02 Marek Polacek <polacek@redhat.com>
3220
3221 * c-tree.h (error_init): Remove declaration.
3222 (pedwarn_init): Likewise.
3223 * c-typeck.c (error_init): Make static and move above.
3224 (pedwarn_init): Likewise.
3225 (warning_init): Move above.
3226 (maybe_warn_string_init): Likewise.
3227
4bd2511b
JL
32282014-05-01 Jeff Law <law@redhat.com>
3229
3230 Revert:
3231
3232 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3233 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3234 avoid goto.
3235
6a358dcb
MP
32362014-05-02 Marek Polacek <polacek@redhat.com>
3237
3238 PR c/60784
3239 * c-typeck.c (push_init_level): Set constructor_designated to
3240 p->designated for structures.
3241
ae5ebda4
MP
32422014-05-01 Marek Polacek <polacek@redhat.com>
3243
3244 PR c/60915
3245 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3246 function-definition has an attribute after the declarator.
3247
96b40f8d
MP
32482014-05-01 Marek Polacek <polacek@redhat.com>
3249
3250 PR c/60257
3251 * c-typeck.c (warning_init): Add location_t parameter. Call
3252 warning_at instead of warning.
3253 (push_init_level): Pass input_location to warning_init.
3254 (add_pending_init): Add location_t parameter. Pass loc to
3255 warning_init.
3256 (set_nonincremental_init): Pass input_location to add_pending_init.
3257 (set_nonincremental_init_from_string): Likewise.
3258 (output_init_element): Pass loc to warning_init and to
3259 add_pending_init.
3260
32e00768
MP
32612014-05-01 Marek Polacek <polacek@redhat.com>
3262
3263 PR c/43395
3264 * c-typeck.c (c_finish_return): Distinguish between label and variable
3265 when warning about returning local address.
3266
c9379ce2
MP
32672014-05-01 Marek Polacek <polacek@redhat.com>
3268
3269 PR c/29467
3270 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3271 in C89 mode.
3272
d00887e8
MP
32732014-05-01 Marek Polacek <polacek@redhat.com>
3274
3275 PR c/43245
3276 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3277 instead of 0 to WARN_FOR_QUALIFIERS.
3278
5436fa2e
MP
32792014-05-01 Marek Polacek <polacek@redhat.com>
3280
3281 PR c/56989
3282 * c-typeck.c (default_conversion): Use better location for
3283 error call.
3284
f8ed5150
MP
32852014-04-30 Marek Polacek <polacek@redhat.com>
3286
3287 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3288 also when SANITIZE_FLOAT_DIVIDE is on.
3289
8337d1db
MP
32902014-04-30 Marek Polacek <polacek@redhat.com>
3291
3292 PR c/60139
3293 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3294 and pedwarn_init. Use loc insted of input_location.
3295
c4bdc42f
MP
32962014-04-30 Marek Polacek <polacek@redhat.com>
3297
3298 PR c/60351
3299 * c-typeck.c (build_binary_op): Use location when warning about
3300 shift count.
3301
45484dcf
MP
33022014-04-25 Marek Polacek <polacek@redhat.com>
3303
3304 PR c/18079
3305 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3306 always_inline/noinline and hot/cold attributes.
3307
34cf811f
MP
33082014-04-25 Marek Polacek <polacek@redhat.com>
3309
3310 PR c/60114
3311 * c-parser.c (c_parser_initelt): Pass input_location to
3312 process_init_element.
3313 (c_parser_initval): Pass loc to process_init_element.
3314 * c-tree.h (process_init_element): Adjust declaration.
3315 * c-typeck.c (push_init_level): Pass input_location to
3316 process_init_element.
3317 (pop_init_level): Likewise.
3318 (set_designator): Likewise.
3319 (output_init_element): Add location_t parameter. Pass loc to
3320 digest_init.
3321 (output_pending_init_elements): Pass input_location to
3322 output_init_element.
3323 (process_init_element): Add location_t parameter. Pass loc to
3324 output_init_element.
3325
42056eac
JJ
33262014-04-24 Jakub Jelinek <jakub@redhat.com>
3327
3328 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3329 atomic-clause, allow comma in between atomic-clause and
3330 seq_cst.
3331
e162a134
JJ
33322014-04-22 Jakub Jelinek <jakub@redhat.com>
3333
3334 PR c/59073
3335 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3336 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3337
2f6babac
IZ
33382014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3339
3340 PR middle-end/60469
3341 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3342 create_tmp_var instead build_decl for creating temps.
3343 (build_array_notation_expr): Likewise.
3344 (fix_conditional_array_notations_1): Likewise.
3345 (fix_array_notation_expr): Likewise.
3346 (fix_array_notation_call_expr): Likewise.
3347
8edbfaa6
JJ
33482014-03-28 Jakub Jelinek <jakub@redhat.com>
3349
3350 PR c++/60689
3351 * c-tree.h (c_build_function_call_vec): New prototype.
3352 * c-typeck.c (build_function_call_vec): Don't call
3353 resolve_overloaded_builtin here.
3354 (c_build_function_call_vec): New wrapper function around
3355 build_function_call_vec. Call resolve_overloaded_builtin here.
3356 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3357 Call c_build_function_call_vec instead of build_function_call_vec.
3358 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3359 * c-decl.c (finish_decl): Likewise.
3360
7485aeea
MLI
33612014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3362
3363 PR c/55383
3364 * c-typeck.c: Use correct format string in cast-qual warning
3365
b17a8b07
TS
33662014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3367
3368 * c-decl.c (c_decl_attributes): Use
3369 lang_hooks.types.omp_mappable_type.
3370 * c-typeck.c (c_finish_omp_clauses): Likewise.
3371
3af9c5e9
MP
33722014-03-06 Marek Polacek <polacek@redhat.com>
3373
3374 PR c/60197
3375 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3376 of checking tree code.
3377
1c9f5f33
PK
33782014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3379
3380 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3381 (c_parser_parameter_declaration): Likewise.
3382
cc28fc7f
MP
33832014-02-19 Marek Polacek <polacek@redhat.com>
3384
3385 PR c/60195
3386 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3387 Call mark_exp_read on exp.value.
3388 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3389 TREE_ADDRESSABLE on old instead of val.
3390 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3391
b581c05c
PK
33922014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3393
3394 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3395 C_EXPR_APPEND by vec_safe_push.
3396 * c-tree.h (C_EXPR_APPEND): Remove.
3397
81e5eca8
MP
33982014-01-31 Marek Polacek <polacek@redhat.com>
3399
3400 PR c/59963
3401 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3402 build_function_call_vec.
3403 (build_function_call): Likewise.
3404 (build_atomic_assign): Likewise.
3405 (build_function_call_vec): Add arg_loc parameter. Use it.
3406 (convert_arguments): Likewise.
3407 (convert_for_assignment): Rename rhs_loc to expr_loc.
3408 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3409 (c_parser_objc_keywordexpr): Likewise.
3410 (c_parser_postfix_expression_after_primary): Call
3411 build_function_call_vec with expr_loc rather than op_loc.
3412 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3413 build_function_call_vec.
3414 (c_parser_expr_list): Add locations parameter. Fill it with locations
3415 of function arguments.
3416 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3417
68fca595
MP
34182014-01-30 Marek Polacek <polacek@redhat.com>
3419
3420 PR c/59940
3421 * c-typeck.c (build_function_call_vec): Use loc parameter.
3422 (convert_arguments): Add location parameter. Use it.
3423 (ep_convert_and_check): Likewise.
3424 (build_atomic_assign): Adjust convert_for_assignment call.
3425 (build_modify_expr): Likewise.
3426 (digest_init): Likewise.
3427 (c_finish_return): Likewise.
3428 (build_conditional_expr): Adjust ep_convert_and_check calls.
3429 (convert_for_assignment): Add rhs_loc parameter. Use it.
3430 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3431 calls.
3432
fa337f3a
RB
34332014-01-30 Richard Biener <rguenther@suse.de>
3434
3435 PR c/59905
3436 * c-typeck.c (build_function_call_vec): Do not replace calls
3437 to a function via an incompatible type with a runtime abort.
3438
b72271b9
BI
34392014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3440
3441 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3442 flag_enable_cilkplus with flag_cilkplus.
3443 (c_parser_direct_declarator_inner): Likewise.
3444 (c_parser_attribute_any_word): Likewise.
3445 (c_parser_attributes): Likewise.
3446 (c_parser_compound_statement): Likewise.
3447 (c_parser_statement_after_labels): Likewise.
3448 (c_parser_if_statement): Likewise.
3449 (c_parser_switch_statement): Likewise.
3450 (c_parser_do_statement): Likewise.
3451 (c_parser_for_statement): Likewise.
3452 (c_parser_unary_expression): Likewise.
3453 (c_parser_postfix_expression): Likewise.
3454 (c_parser_postfix_expression_after_primary): Likewise.
3455 (c_parser_postfix_expression_after_primary): Likewise.
3456 (c_parser_omp_clause_name): Likewise.
3457 (c_finish_omp_declare_simd): Likewise.
3458 (c_parser_cilk_verify_simd): Likewise.
3459 * c-typeck.c (build_array_ref): Likewise.
3460 (build_function_call_vec): Likewise.
3461 (convert_arguments): Likewise.
3462 (build_compound_expr): Likewise.
3463 (c_finish_return): Likewise.
3464 (c_finish_if_stmt): Likewise.
3465 (c_finish_loop): Likewise.
3466 (build_binary_op): Likewise.
3467
393e8e8b
MP
34682014-01-23 Marek Polacek <polacek@redhat.com>
3469
3470 PR c/59846
3471 * c-typeck.c (parser_build_binary_op): Use location instead of
3472 input_location.
3473 (build_binary_op): Pass location to shorten_compare.
3474
f04dda30
MP
34752014-01-23 Marek Polacek <polacek@redhat.com>
3476
3477 PR c/58346
3478 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3479 an empty aggregate.
3480
789eadcd
MP
34812014-01-23 Marek Polacek <polacek@redhat.com>
3482
3483 PR c/59871
3484 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3485 of a comma expression.
3486 (emit_side_effect_warnings): Likewise.
3487
40f14e9f
BI
34882014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3489
3490 PR c/59825
3491 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3492 function to use walk_tree and moved a lot of its functionality to
3493 expand_array_notations.
3494 (expand_array_notations): New function.
3495
74558dd9
BI
34962014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3497
3498 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3499 attribute an attribute without value.
3500
652fea39
JJ
35012014-01-23 Jakub Jelinek <jakub@redhat.com>
3502
3503 PR middle-end/58809
3504 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3505 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3506
f34f1c87
MP
35072014-01-22 Marek Polacek <polacek@redhat.com>
3508
3509 PR c/59891
3510 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3511 of remove_c_maybe_const_expr on op1 and op2.
3512
241f845a
JJ
35132014-01-15 Jakub Jelinek <jakub@redhat.com>
3514
3515 PR c/58943
3516 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3517 effects, preevaluate rhs using SAVE_EXPR first.
3518
9a74f20c
BI
35192014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3520
3521 PR c++/59631
3522 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3523 statements with if-elseif statements.
3524
96066ce1
MP
35252014-01-06 Marek Polacek <polacek@redhat.com>
3526
3527 PR c/57773
3528 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3529 defined bit-field types only in ISO C.
3530
23a5b65a
RS
35312014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3532
3533 Update copyright years
3534
f9030485
RS
35352014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3536
3537 * c-array-notation.c: Use the standard form for the copyright notice.
3538
41958c28
BI
35392013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3540
3541 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3542 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3543 field in parser is not empty. If not-empty, call the function
3544 c_parser_finish_omp_declare_simd.
3545 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3546 between SIMD-enabled functions and #pragma simd. Added new parameter.
3547 (c_parser_cilk_all_clauses): Modified the usage of the function
3548 c_parser_cilk_clause_vectorlength as mentioned above.
3549 (c_parser_cilk_simd_fn_vector_attrs): New function.
3550 (c_finish_cilk_simd_fn_tokens): Likewise.
3551 (is_cilkplus_vector_p): Likewise.
3552 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3553 "nomask," and "mask" strings in clause name.
3554 (c_parser_omp_all_clauses): Added 3 new case statements:
3555 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3556 PRAGMA_CILK_CLAUSE_NOMASK.
3557 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3558 check for vector attribute and if so call the function
3559 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3560 called the function c_finish_cilk_simd_fn_tokens.
3561 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3562 parser field is non-empty. If so, parse them as you would parse
3563 the omp declare simd pragma.
3564 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3565 Added a check when step is a parameter and flag it as error.
3566 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3567 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3568 pragma_omp_clause.
3569
cef0fd0e
TS
35702013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3571
3572 * c-parser.c (c_parser_omp_parallel): Fix description.
3573
12893402
BI
35742013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3575
3576 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3577 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3578 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3579 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3580
296674db
JM
35812013-12-04 Joseph Myers <joseph@codesourcery.com>
3582
3583 PR c/52023
3584 * c-parser.c (c_parser_alignas_specifier): Use
3585 c_sizeof_or_alignof_type instead of c_alignof.
3586 (c_parser_alignof_expression): Likewise, with min_alignof
3587 parameter depending on alignof spelling used.
3588
edd28054
MP
35892013-12-04 Marek Polacek <polacek@redhat.com>
3590
3591 PR c/54113
3592 * c-decl.c (start_function): Don't warn for missing prototype for
3593 inline functions.
3594
da0fc454
MP
35952013-12-03 Marek Polacek <polacek@redhat.com>
3596
3597 PR c/59351
3598 * c-decl.c (build_compound_literal): Allow compound literals with
3599 empty initial value.
3600
4c2ecab0
JM
36012013-12-02 Joseph Myers <joseph@codesourcery.com>
3602
3603 PR c/58235
3604 * c-typeck.c (build_modify_expr): Diagnose assignment to
3605 expression with array type.
3606
340baef7
JM
36072013-11-29 Joseph Myers <joseph@codesourcery.com>
3608
3609 PR c/42262
3610 * c-typeck.c (process_init_element): Do not treat a string as
3611 initializing a whole array when used with a designator for an
3612 individual element.
3613
6763b9f7
JM
36142013-11-29 Joseph Myers <joseph@codesourcery.com>
3615
3616 PR c/57574
3617 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3618 an inline function following a static declaration.
3619
e7bd1de1
JJ
36202013-11-28 Jakub Jelinek <jakub@redhat.com>
3621
3622 PR c/59310
3623 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3624 to p_name before calling c_parser_omp_teams instead of after.
3625 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3626 argument. Remove unused p_name variable.
3627
0136f8f0
AH
36282013-11-27 Aldy Hernandez <aldyh@redhat.com>
3629 Jakub Jelinek <jakub@redhat.com>
3630
3631 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3632 external_scope is NULL.
3633
241b71bb
TV
36342013-11-27 Tom de Vries <tom@codesourcery.com>
3635 Marc Glisse <marc.glisse@inria.fr>
3636
3637 PR c++/59032
3638 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3639
2fb9a547
AM
36402013-11-22 Andrew MacLeod <amacleod@redhat.com>
3641
3642 * c-typeck.c: Add required include files from gimple.h.
3643
8400e75e
DM
36442013-11-22 David Malcolm <dmalcolm@redhat.com>
3645
3646 * c-decl.c (define_label, shadow_tag_warned)
3647 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3648 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3649 (declspecs_add_type): Remove use of in_system_header macro.
3650 * c-parser.c (c_parser_unary_expression): Likewise.
3651 * c-typeck.c (store_init_value, process_init_element)
3652 (c_start_case): Likewise.
3653
3654 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3655 macro.
3656
3657 * c-parser.c (c_parser_set_source_position_from_token): Remove
3658 reference to in_system_header from comment.
3659
386b1f1f
RS
36602013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3661
3662 * c-decl.c (grokdeclarator): Update comment to refer to
3663 tree_to_[su]hwi rather than tree_low_cst.
3664
ae7e9ddd
RS
36652013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3666
3667 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3668 tree_to_uhwi throughout.
3669
9439e9a1
RS
36702013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3671
3672 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3673 throughout.
3674
9541ffee
RS
36752013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3676
3677 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3678 throughout.
3679
c02065fc
AH
36802013-11-15 Aldy Hernandez <aldyh@redhat.com>
3681
3682 * c-parser.c (c_parser_cilk_simd): New.
3683 (c_parser_cilk_verify_simd): New.
3684 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3685 (c_parser_omp_for_loop): Add case for NE_EXPR.
3686 Set c_break_label for CILK_SIMD.
3687 (c_parser_cilk_clause_vectorlength): New.
3688 (c_parser_cilk_clause_linear): New.
3689 (c_parser_cilk_clause_name): New.
3690 (c_parser_cilk_all_clauses): New.
3691 * c-typeck.c (build_unary_op): Pass location argument to
3692 readonly_error.
3693 (build_modify_expr): Same.
3694 (build_asm_expr): Same.
3695 (c_finish_bc_stmt): Error on break/continue in loops.
3696
18f429e2
AM
36972013-11-14 Andrew MacLeod <amacleod@redhat.com>
3698
3699 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3700
d8a2d370
DN
37012013-11-14 Diego Novillo <dnovillo@google.com>
3702
3703 * c-decl.c: Include print-tree.h.
3704 Include stor-layout.h.
3705 Include varasm.h.
3706 Include attribs.h.
3707 Include stringpool.h.
3708 * c-lang.c: Include fold-const.h.
3709 * c-parser.c: Include stringpool.h.
3710 Include attribs.h.
3711 Include stor-layout.h.
3712 Include varasm.h.
3713 Include trans-mem.h.
3714 * c-typeck.c: Include stor-layout.h.
3715 Include trans-mem.h.
3716 Include varasm.h.
3717 Include stmt.h.
3718
38b7bc7f
JM
37192013-11-13 Joseph Myers <joseph@codesourcery.com>
3720
3721 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3722 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3723 __auto_type.
3724 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3725 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3726 RID_AUTO_TYPE.
3727 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3728 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3729 (c_parser_declarator, c_parser_direct_declarator_inner)
3730 (c_parser_parameter_declaration, c_parser_type_name): All callers
3731 changed.
3732 (c_parser_declaration_or_fndef): Handle declarations with type
3733 determined from the initializer.
3734
45b0be94
AM
37352013-11-12 Andrew MacLeod <amacleod@redhat.com>
3736
18f429e2 3737 * c-typeck.c: Include gimplify.h.
45b0be94 3738
582d9b50
JM
37392013-11-12 Joseph Myers <joseph@codesourcery.com>
3740
3741 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3742 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3743 comment.
3744 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3745 or _Thread_local as appropriate in diagnostics.
3746 (build_null_declspecs): Initialize ret->thread_gnu_p.
3747 (declspecs_add_scspec): Handle either __thread or _Thread_local
3748 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3749 pedantic. Do not disallow _Thread_local extern and _Thread_local
3750 static.
3751
267bac10
JM
37522013-11-07 Joseph Myers <joseph@codesourcery.com>
3753 Andrew MacLeod <amacleod@redhat.com>
3754
3755 * c-aux-info.c (gen_type): Handle atomic qualifier.
3756 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3757 qualifiers when compating types.
3758 (shadow_tag_warned): Handle atomic_p in declspecs.
3759 (quals_from_declspecs): Likewise.
3760 (start_decl): Use c_type_promotes_to when promoting argument
3761 types.
3762 (grokdeclarator): Handle _Atomic.
3763 (get_parm_info): Diagnose any qualifier on "void" as only
3764 parameter.
3765 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3766 comparing types. Use c_type_promotes_to when promoting argument
3767 types.
3768 (finish_function): Use c_type_promotes_to when promoting argument
3769 types.
3770 (build_null_declspecs): Handle atomic_p in declspecs.
3771 (declspecs_add_qual): Handle RID_ATOMIC.
3772 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3773 (c_token_starts_declspecs): Handle RID_ATOMIC.
3774 (c_parser_declspecs): Handle atomic type specifiers and
3775 qualifiers.
3776 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3777 from types of expressions with atomic type.
3778 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3779 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3780 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3781 (c_parser_statement_after_labels, c_parser_switch_statement)
3782 (c_parser_for_statement, c_parser_expr_no_commas)
3783 (c_parser_conditional_expression, c_parser_binary_expression)
3784 (c_parser_cast_expression, c_parser_unary_expression)
3785 (c_parser_postfix_expression)
3786 (c_parser_postfix_expression_after_primary, c_parser_expression):
3787 Use convert_lvalue_to_rvalue.
3788 (c_parser_expression_conv, c_parser_expr_list): Document
3789 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3790 (c_parser_objc_synchronized_statement): Use
3791 convert_lvalue_to_rvalue.
3792 (c_parser_objc_selector): Handle RID_ATOMIC.
3793 (c_parser_objc_receiver, c_parser_array_notation): Use
3794 convert_lvalue_to_rvalue.
3795 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3796 _Atomic (type-name).
3797 (struct c_declspecs): Add atomic_p field.
3798 (convert_lvalue_to_rvalue): Declare.
3799 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3800 corresponding atomic types.
3801 (qualify_type): Don't add _Atomic qualifiers from second argument.
3802 (comp_target_types): Do not allow _Atomic mismatches.
3803 (type_lists_compatible_p): Do not remove atomic qualifiers when
3804 comparing types.
3805 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3806 (build_atomic_assign): New functions.
3807 (build_unary_op): Use build_atomic_assign for atomic increment and
3808 decrement.
3809 (build_conditional_expr): Do not treat _Atomic void as a qualified
3810 version of void.
3811 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3812 (find_anonymous_field_with_type, convert_to_anonymous_field)
3813 (convert_for_assignment): Do not remove atomic qualifiers when
3814 comparing types.
3815 (digest_init): Do not accept initialization of arrays of atomic
3816 elements by string constants.
3817 (build_asm_expr): Use convert_lvalue_to_rvalue.
3818 (build_binary_op): Do not treat _Atomic void as a qualified
3819 version of void.
3820
0c249d4b
DD
38212013-11-06 DJ Delorie <dj@redhat.com>
3822
3823 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3824 both explicit and builtin, print the location of the explicit one.
3825
6d7f7e0a
TB
38262013-11-05 Tobias Burnus <burnus@net-b.de>
3827
3828 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3829 c_parser_omp_distribute, c_parser_omp_teams,
3830 c_parser_omp_target, c_parser_omp_declare): Handle
3831 -fopenmp-simd.
3832
b906f4ca
MP
38332013-11-03 Marek Polacek <polacek@redhat.com>
3834
3835 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3836
ee1d5a02
JJ
38372013-11-01 Jakub Jelinek <jakub@redhat.com>
3838
3839 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3840 check_dup_generic at the end, unless remove is true.
3841 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3842 remove = true;.
3843 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3844
5a9785fb
JJ
38452013-10-31 Jakub Jelinek <jakub@redhat.com>
3846
3847 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3848 with decl that is not pointer nor array.
3849
939b37da
BI
38502013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3851
3852 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3853 a spawning function is found.
3854 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3855 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3856 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3857 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3858 case.
3859 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3860 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3861 expr.
3862 (c_finish_return): Added a check to reject _Cilk_spawn in return
3863 expression.
3864 (build_cilk_spawn): New function.
3865 (build_cilk_sync): Likewise.
3866 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3867
d4af74d4
TB
38682013-10-27 Tobias Burnus <burnus@net-b.de>
3869
3870 PR other/33426
3871 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3872 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3873 (c_parser_statement_after_labels): Update calls.
3874
d73749df 38752013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3876
3877 PR other/33426
3878 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3879 Handle PRAGMA_IVDEP.
3880 (c_parser_statement_after_labels): Update call.
3881
f28aa681
MP
38822013-10-24 Marek Polacek <polacek@redhat.com>
3883
3884 * c-parser.c (c_parser_struct_declaration): Add a comment.
3885 (c_parser_declarator): Don't allow _Alignas here.
3886
0645c1a2
AM
38872013-10-17 Andrew MacLeod <amacleod@redhat.com>
3888
3889 * c-parser.c: Include omp-low.h.
3890 * c-typeck.c: Likewise.
3891
568a31f2
MP
38922013-10-17 Marek Polacek <polacek@redhat.com>
3893
3894 PR c/58267
3895 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3896 Document syntax of the array-declarator.
3897 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3898 are not permitted.
3899 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3900 (c_parser_struct_declaration): Likewise.
3901 (c_parser_declarator): Likewise.
3902 (c_parser_direct_declarator_inner): Likewise.
3903 (c_parser_parameter_declaration): Likewise.
3904 (c_parser_type_name): Likewise.
3905
acf0174b
JJ
39062013-10-11 Jakub Jelinek <jakub@redhat.com>
3907
3908 * c-lang.h (current_omp_declare_target_attribute): New extern
3909 decl.
3910 * c-parser.c: Include c-lang.h.
3911 (struct c_parser): Change tokens to c_token *.
3912 Add tokens_buf field. Change tokens_avail type to unsigned int.
3913 (c_parser_consume_token): If parser->tokens isn't
3914 &parser->tokens_buf[0], increment parser->tokens.
3915 (c_parser_consume_pragma): Likewise.
3916 (enum pragma_context): Add pragma_struct and pragma_param.
3917 (c_parser_external_declaration): Adjust
3918 c_parser_declaration_or_fndef caller.
3919 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3920 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3921 Adjust recursive call.
3922 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3923 of pragma_external.
3924 (c_parser_parameter_declaration): Use pragma_param instead of
3925 pragma_external.
3926 (c_parser_compound_statement_nostart, c_parser_label,
3927 c_parser_for_statement): Adjust
3928 c_parser_declaration_or_fndef callers.
3929 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3930 it through to c_parser_conditional_expression.
3931 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3932 pass it through to c_parser_binary_expression. Adjust recursive
3933 call.
3934 (c_parser_binary_expression): Remove prec argument, add
3935 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3936 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3937 binop matches it, use build2 instead of parser_build_binary_op.
3938 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3939 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3940 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3941 Handle pragma_struct and pragma_param the same as pragma_external.
3942 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3943 (c_parser_omp_variable_list): Parse array sections for
3944 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3945 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3946 (c_parser_omp_clause_reduction): Handle user defined reductions.
3947 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3948 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3949 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3950 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3951 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3952 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3953 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3954 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3955 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3956 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3957 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3958 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3959 (c_parser_omp_for_loop): Add CODE argument, pass it through
3960 to c_finish_omp_for. Change last argument to cclauses,
3961 and adjust uses to grab parallel clauses from the array of all
3962 the split clauses. Adjust c_parser_binary_expression,
3963 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3964 (omp_split_clauses): New function.
3965 (c_parser_omp_simd): New function.
3966 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3967 Allow the function to be called also when parsing combined constructs,
3968 and call c_parser_omp_simd when parsing for simd.
3969 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3970 #pragma omp section, require exactly one structured-block instead of
3971 sequence of statements.
3972 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3973 Allow the function to be called also when parsing combined constructs.
3974 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3975 Allow the function to be called also when parsing combined
3976 constructs.
3977 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3978 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3979 c_parser_omp_teams, c_parser_omp_target_data,
3980 c_parser_omp_target_update, c_parser_omp_target,
3981 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3982 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3983 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3984 (c_parser_omp_construct): Add p_name and mask vars. Handle
3985 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3986 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3987 and c_parser_omp_sections callers.
3988 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3989 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3990 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3991 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3992 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3993 OMP_CLAUSE_DEPEND.
3994 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3995 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3996 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3997 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3998 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3999 * c-typeck.c: Include tree-inline.h.
4000 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4001 handle_omp_array_sections_1, handle_omp_array_sections,
4002 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4003 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4004 user defined reductions.
4005 (c_tree_equal): New function.
4006 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4007 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4008 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4009 c_check_omp_declare_reduction_r): New prototypes.
4010 * c-decl.c (current_omp_declare_target_attribute): New variable.
4011 (c_decl_attributes): New function.
4012 (start_decl, start_function): Use it instead of decl_attributes.
4013 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4014 c_omp_reduction_decl, c_omp_reduction_lookup,
4015 c_check_omp_declare_reduction_r): New functions.
4016
0a6c2227
TT
40172013-09-25 Tom Tromey <tromey@redhat.com>
4018
4019 * Make-lang.in (c/gccspec.o): Remove.
4020 (CFLAGS-c/gccspec.o): New variable.
4021 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4022 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4023 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4024
f3bc55f0
TT
40252013-09-25 Tom Tromey <tromey@redhat.com>
4026
4027 * Make-lang.in (c/gccspec.o): Don't use subshell.
4028
a24d975c
MP
40292013-09-18 Marek Polacek <polacek@redhat.com>
4030
4031 PR sanitize/58443
4032 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4033 Remove unnecessary check.
4034
ce6923c5
MP
40352013-09-18 Marek Polacek <polacek@redhat.com>
4036
4037 PR sanitizer/58411
4038 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4039 no_sanitize_undefined attribute.
4040
a1e51df9
KT
40412013-09-13 Kai Tietz <ktietz@redhat.com>
4042
4043 PR target/57848
4044 * c-decl.c (c_builtin_function_ext_scope): Remove
4045 wrong assumption that it is never called on prexisting
4046 symbol.
4047
0af94e6f
JR
40482013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4049
4050 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4051
20059c8b
GDR
40522013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4053
4054 * c-objc-common.c (c_tree_printer): Tidy.
4055
de5a5fa1
MP
40562013-08-30 Marek Polacek <polacek@redhat.com>
4057
4058 * c-typeck.c (build_binary_op): Add division by zero and shift
4059 instrumentation.
4060
2531a1d9 40612013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4062 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4063
6e2bcc98 4064 PR c/35649
2531a1d9
JR
4065 * c-typeck.c (c_common_type): Prefer double_type_node over
4066 other REAL_TYPE types with the same precision.
4067 (convert_arguments): Likewise.
4068
025311c4
GDR
40692013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4070
4071 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4072 (c_initialize_diagnostics): Call a destructor for the early printer.
4073
da6ca2b5
GDR
40742013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4075
4076 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4077 printer initialization.
4078
318cda85 40792013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4080
318cda85
BI
4081 PR c/57490
4082 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4083 check for truth values.
4084 (expand_array_notation_exprs): Added truth values case. Removed an
4085 unwanted else. Added for-loop to walk through subtrees in default
4086 case.
4087
b066401f
GDR
40882013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4089
4090 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4091
fb48aadc
JM
40922013-07-23 Joseph Myers <joseph@codesourcery.com>
4093
4094 * c-parser.c (struct c_generic_association): Fix typo.
4095
433cc7b0
TT
40962013-07-23 Tom Tromey <tromey@redhat.com>
4097 Joseph Myers <joseph@codesourcery.com>
4098
4099 * c-parser.c (struct c_generic_association): New.
4100 (c_generic_association_d): New typedef.
4101 (c_parser_generic_selection): New function.
4102 (c_parser_postfix_expression): Handle RID_GENERIC.
4103
26d40c3d
JM
41042013-07-13 Jason Merrill <jason@redhat.com>
4105
4106 PR c++/57793
4107 * c-decl.c (finish_struct): Check for too-large class.
4108
ecdbd01a 41092013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4110
4111 PR c/57821
4112 * c-typeck.c (set_init_index): When folding, check for index overflow.
4113
1141ed3f
BI
41142013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4115
4116 * c-parser.c (c_parser_array_notation): Removed rejection of array
4117 notations in an array of function pointers.
4118
713b46fa
BI
41192013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4120
4121 * c-array-notation.c (make_triplet_val_inv): New function.
4122 (create_cmp_incr): Likewise.
4123 (create_array_refs): Likewise.
4124 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4125 Also modularized common parts between functions and called the function.
4126 (build_array_notation_expr): Likewise.
4127 (fix_conditional_array_notations_1): Likewise.
4128 (fix_array_notation_expr): Likewise.
4129 (fix_array_notation_call_expr): Likewise.
4130
92f20202
MP
41312013-06-18 Marek Polacek <polacek@redhat.com>
4132
4133 PR c/57630
4134 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4135
73a23b06
BI
41362013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4137
4138 * c-array-notation.c (build_array_notation_expr): Reject array notation
4139 mismatch between LHS and RHS even inside a call_expr. Also, removed
4140 a couple while statements that were dead code.
4141
00b8517d
BI
41422013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4143
4144 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4145 excessive precision expressions in function parameters. Also removed
4146 couple unwanted while statements.
4147
1509bdda
BI
41482013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4149
4150 * c-array-notation.c (expand_array_notation_exprs): Added
4151 ARRAY_NOTATION_REF case.
4152
d60f1706
BI
41532013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4154
4155 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4156 function to c-family/array-notation-common.c.
4157 (is_cilkplus_reduce_builtin): Likewise.
4158 (find_rank): Likewise.
4159 (extract_array_notation_exprs): Likewise.
4160 (replace_array_notations): Likewise.
4161 (find_inv_trees): Likewise.
4162 (replace_inv_trees): Likewise.
4163 (contains_array_notation_expr): Likewise.
4164 (find_correct_array_notation_type): Likewise.
4165 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4166 (struct inv_list): Moved this to c-family/array-notation-common.c.
4167 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4168
6d6efbb3
BI
41692013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4170
4171 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4172 reduction functions outside the for-loop. Added a check if the fundecl
4173 is non-NULL. Finally, removed an unwanted if-statement, and made the
4174 body unconditional.
4175
25c22937
BI
41762013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4177
4178 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4179 condition of the if-statement matches the rank of else-block and then-
4180 block when array notations are used.
4181 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4182 expression after the entire function body is parsed.
4183 (c_parser_expr_no_commas): Delayed creating array notation expressions
4184 to the end of function parsing.
4185 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4186 whole if-statement instead of just the condition.
4187 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4188
edd25645
BI
41892013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4190
4191 PR c/57474
4192 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4193 array to NULL_TREE if they are unused. Also added a check for the
4194 field to be NULL before its fields are used in future.
4195
065ce7f1
RO
41962013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4197
4198 PR bootstrap/57450
4199 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4200 (build_array_notation_expr): Likewise.
4201
36536d79
BI
42022013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4203
4204 * c-typeck.c (build_array_ref): Added a check to see if array's
4205 index is greater than one. If true, then emit an error.
4206 (build_function_call_vec): Exclude error reporting and checking
4207 for builtin array-notation functions.
4208 (convert_arguments): Likewise.
4209 (c_finish_return): Added a check for array notations as a return
4210 expression. If true, then emit an error.
4211 (c_finish_loop): Added a check for array notations in a loop
4212 condition. If true then emit an error.
4213 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4214 (build_binary_op): Added a check for array notation expr inside
4215 op1 and op0. If present, we call another function to find correct
4216 type.
4217 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4218 * c-parser.c (c_parser_compound_statement): Check if array
4219 notation code is used in tree, if so, then transform them into
4220 appropriate C code.
4221 (c_parser_expr_no_commas): Check if array notation is used in LHS
4222 or RHS, if so, then build array notation expression instead of
4223 regular modify.
4224 (c_parser_postfix_expression_after_primary): Added a check for
4225 colon(s) after square braces, if so then handle it like an array
4226 notation. Also, break up array notations in unary op if found.
4227 (c_parser_direct_declarator_inner): Added a check for array
4228 notation.
4229 (c_parser_compound_statement): Added a check for array notation in
4230 a stmt. If one is present, then expand array notation expr.
4231 (c_parser_if_statement): Likewise.
4232 (c_parser_switch_statement): Added a check for array notations in
4233 a switch statement's condition. If true, then output an error.
4234 (c_parser_while_statement): Similarly, but for a while.
4235 (c_parser_do_statement): Similarly, but for a do-while.
4236 (c_parser_for_statement): Similarly, but for a for-loop.
4237 (c_parser_unary_expression): Check if array notation is used in a
4238 pre-increment or pre-decrement expression. If true, then expand
4239 them.
4240 (c_parser_array_notation): New function.
4241 * c-array-notation.c: New file.
4242 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4243
cd192ccc
MS
42442013-05-23 Mike Stump <mikestump@comcast.net>
4245
4246 * c-typeck.c (convert_for_assignment): Handle references to memory
4247 spaces better.
4248
427b248d
JM
42492013-05-16 Jason Merrill <jason@redhat.com>
4250
4251 * Make-lang.in (cc1$(exeext)): Use link mutex.
4252
44d90fe1
PC
42532013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4254
4255 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4256 to simply use OPT_Wpointer_arith.
4257 (build_unary_op): Likewise.
4258
4e7d7b3d
JJ
42592013-04-03 Jakub Jelinek <jakub@redhat.com>
4260
4261 PR c/19449
4262 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4263 argument. If set, or it temporarily for parsing of the first
4264 argument into force_folding_builtin_constant_p.
4265 (c_parser_postfix_expression): Adjust callers.
4266
839b422f
RB
42672013-03-21 Richard Biener <rguenther@suse.de>
4268
4269 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4270 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4271
2ee028f1
MP
42722013-02-12 Marek Polacek <polacek@redhat.com>
4273
4274 PR c/44938
4275 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4276 origtypes to NULL.
4277
8824edff
JJ
42782013-01-24 Jakub Jelinek <jakub@redhat.com>
4279
4280 PR c/56078
4281 * c-typeck.c (set_nonincremental_init_from_string): If
4282 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4283 returned false.
4284 (process_init_element): Likewise.
4285
eadd3d0d
JJ
42862012-12-20 Jakub Jelinek <jakub@redhat.com>
4287
4288 PR c++/55619
4289 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4290 argument, don't call default_function_array_conversion
4291 nor c_fully_fold here.
4292 (c_parser_asm_statement): Adjust callers.
4293 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4294 and outputs here, and call default_function_array_conversion
4295 on inputs that don't need to be addressable.
4296
f8a93a2e
JJ
42972012-12-18 Jakub Jelinek <jakub@redhat.com>
4298
4299 PR c/39464
4300 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4301 warning require that both c_common_unsigned_type as well as
4302 c_common_signed_type is the same for both mvl and mvr types.
4303
9771b263
DN
43042012-11-16 Diego Novillo <dnovillo@google.com>
4305
4306 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4307
4308 * c-common.c: Use new vec API in vec.h.
4309 * c-common.h: Likewise.
4310 * c-gimplify.c: Likewise.
4311 * c-pragma.c: Likewise.
4312 * c-pretty-print.c: Likewise.
4313 * c-pretty-print.h: Likewise.
4314 * c-semantics.c: Likewise.
4315 * c-decl.c: Likewise.
4316 * c-parser.c: Likewise.
4317 * c-tree.h: Likewise.
4318 * c-typeck.c: Likewise.
4319
880661a4
JW
43202012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4321
4322 PR c++/54930
4323 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4324
077d1abe
MLI
43252012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4326
4327 PR c/53066
4328 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4329 shadows a function, unless the variable is a function or a
4330 pointer-to-function.
4331
3a785c97
JJ
43322012-10-12 Jakub Jelinek <jakub@redhat.com>
4333
4334 PR c/54381
4335 * c-parser.c (struct c_tree_loc_pair): Removed.
4336 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4337 add location_t * and tree * arguments, fill in array of 3
4338 sizeof_arg trees and corresponding locs.
4339 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4340 c_parser_expr_list callers.
4341 (c_parser_postfix_expression_after_primary): Likewise. Pass
4342 array of 3 sizeof_arg trees and locs (corresponding to first
4343 3 arguments) to sizeof_pointer_memaccess_warning.
4344
703c8606
LC
43452012-10-09 Lawrence Crowl <crowl@google.com>
4346
4347 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4348 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4349 hash table.
4350
5d9de0d0
PC
43512012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4352
4353 PR c++/54194
4354 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4355 call.
4356
a212e43f
MG
43572012-10-09 Marc Glisse <marc.glisse@inria.fr>
4358
4359 PR c++/54427
4360 * c-typeck.c: Include c-common.h.
4361 (enum stv_conv): Moved to c-common.h.
4362 (scalar_to_vector): Moved to c-common.c.
4363 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4364 * Make-lang.in: c-typeck.c depends on c-common.h.
4365
3b78de56
AC
43662012-10-04 Arnaud Charlet <charlet@adacore.com>
4367
4368 * c-decl.c (c_write_global_declarations): Fix handling of
4369 -fdump-ada-spec*.
4370
78c60e3d
SS
43712012-09-30 Sharad Singhai <singhai@google.com>
4372
4373 * c-decl.c (c_write_global_declarations): Use a different method
4374 to determine if the dump has ben initialized.
4375
9f33203d
JM
43762012-09-14 Joseph Myers <joseph@codesourcery.com>
4377
4378 PR c/54552
4379 * c-typeck.c (c_cast_expr): When casting to a type requiring
4380 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4381 c_fully_fold first.
4382
a27d595d
JM
43832012-09-14 Joseph Myers <joseph@codesourcery.com>
4384
4385 PR c/54103
4386 * c-typeck.c (build_unary_op): Pass original argument of
4387 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4388 any C_MAYBE_CONST_EXPR, if it has integer operands.
4389 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4390 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4391 to c_objc_common_truthvalue_conversion, then remove any
4392 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4393 c_objc_common_truthvalue_conversion not
4394 c_common_truthvalue_conversion.
4395 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4396 call note_integer_operands for arguments with integer operands
4397 that are not integer constants.
4398
9feb29df
JJ
43992012-09-13 Jakub Jelinek <jakub@redhat.com>
4400
4401 PR c/54559
4402 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4403 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4404
d409320c
JJ
44052012-08-31 Jakub Jelinek <jakub@redhat.com>
4406
4407 PR c/54428
4408 * c-convert.c (convert): Don't call fold_convert_loc if
4409 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4410 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4411 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4412
6265d07c
JJ
44132012-08-24 Jakub Jelinek <jakub@redhat.com>
4414
4415 PR c/54355
4416 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4417 for nested and empty_ok arguments in the call to
4418 c_parser_declaration_or_fndef.
4419
1a4049e7
JJ
44202012-08-17 Jakub Jelinek <jakub@redhat.com>
4421
4422 * c-tree.h (c_last_sizeof_arg): Declare.
4423 * c-parser.c (struct c_tree_loc_pair): New type.
4424 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4425 non-NULL.
4426 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4427 (c_parser_postfix_expression_after_primary): Likewise. Call
4428 sizeof_pointer_memaccess_warning if needed.
4429 (sizeof_ptr_memacc_comptypes): New function.
4430 * c-typeck.c (c_last_sizeof_arg): New global variable.
4431 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4432
0229aee9
UB
44332012-07-24 Uros Bizjak <ubizjak@gmail.com>
4434
4435 * c-lang.h (lang_decl): Add variable_size GTY option.
4436
7ee2468b
SB
44372012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4438
4439 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4440 * Make-lang.in: Fix dependencies.
4441
d4a10d0a
SB
44422012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4443
4444 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4445 and add language Makefile hooks.
4446 * config-lang.in: New file.
4447 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4448 add the required "normal" config-lang.in rules.
4449 * c-lang.h: Moved from gcc/ to here.
4450 * c-tree.h: Likewise.
4451 * c-objc-common.c: Likewise.
4452 * c-objc-common.h: Likewise.
4453 * c-typeck.c: Likewise.
4454 * c-convert.c: Likewise.
4455 * c-lang.c: Likewise.
4456 * c-aux-info.c: Likewise.
4457 * c-errors.c: Likewise.
4458 * gccspec.c: Likewise.
4459 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4460 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4461\f
cbe34bb5 4462Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4463
4464Copying and distribution of this file, with or without modification,
4465are permitted in any medium without royalty provided the copyright
4466notice and this notice are preserved.
This page took 2.240335 seconds and 5 git commands to generate.