]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Fixes to Doxygen comments in libstdc++ headers
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
142473df
MP
12017-05-17 Marek Polacek <polacek@redhat.com>
2
3 PR sanitizer/80659
4 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
5 DECL_IGNORED_P even for non-static compound literals.
6
1a817418
ML
72017-05-17 Martin Liska <mliska@suse.cz>
8
9 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
10 use it instead of int type.
11
b2fa0a8b
MP
122017-05-17 Marek Polacek <polacek@redhat.com>
13
14 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
15 call c_fully_fold.
16 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
17 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
18 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
19 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
20 save_expr.
21 (c_parser_conditional_expression): Likewise.
22 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
23 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
24 (process_init_element): Likewise.
25 (build_binary_op): Likewise.
26 (handle_omp_array_sections_1): Likewise.
27
1e47f02b
TS
282017-05-12 Thomas Schwinge <thomas@codesourcery.com>
29
30 * c-parser.c (c_parser_omp_clause_num_gangs)
31 (c_parser_omp_clause_num_workers)
32 (c_parser_omp_clause_vector_length): Merge functions into...
33 (c_parser_oacc_single_int_clause): ... this new function. Adjust
34 all users.
35
c24e924f
NS
362017-05-11 Nathan Sidwell <nathan@acm.org>
37
38 * gimple-parser.c: Don't #include tree-dump.h.
39
c587104e
MM
402017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
41
42 PR testsuite/80580
43 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
44
67ac9a9d
MM
452017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
46
47 PR testsuite/80580
48 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
49 incorrect __MEM syntax.
50
ac4eb40f
MM
512017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
52
53 PR testsuite/80580
54 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
55 type of unary '*'.
56
641da50a
NS
572017-05-09 Nathan Sidwell <nathan@acm.org>
58
59 * c-tree.h (pushdecl): Declare.
60
56d35585
DM
612017-05-05 David Malcolm <dmalcolm@redhat.com>
62
63 * c-decl.c (warn_defaults_to): Replace report_diagnostic
64 with diagnostic_report_diagnostic.
65 * c-errors.c (pedwarn_c99): Likewise.
66 (pedwarn_c90): Likewise.
67
815d9cc6
XR
682017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
69
70 PR c++/80038
71 * c-gimplify.c (c_gimplify_expr): Remove calls to
72 cilk_gimplifY_call_params_in_spawned_fn.
73
1c4ea66f
DM
742017-04-25 David Malcolm <dmalcolm@redhat.com>
75
76 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
77 hint for removing extra semicolon.
78
666f7903
JJ
792017-04-21 Jakub Jelinek <jakub@redhat.com>
80
81 PR c/80468
82 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
83 enabled, set specs->type to integer_type_node.
84
5764ee3c
JW
852017-04-03 Jonathan Wakely <jwakely@redhat.com>
86
87 * c-array-notation.c: Fix typo in comment.
88
10fa8dfb
MP
892017-03-29 Marek Polacek <polacek@redhat.com>
90
91 PR c/79730
92 * c-decl.c (finish_decl): Check VAR_P.
93
a9e4a1a5
JJ
942017-03-27 Jakub Jelinek <jakub@redhat.com>
95
96 PR middle-end/80162
97 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
98 * c-typeck.c (c_mark_addressable): Likewise. Look through
99 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
100 to ARRAY_TYPE.
101 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
102
ee3ff394
MP
1032017-03-23 Marek Polacek <polacek@redhat.com>
104
105 * c-tree.h: Remove a C_RID_YYCODE reference.
106
4d1b8e70
JJ
1072017-03-21 Jakub Jelinek <jakub@redhat.com>
108
109 PR c/80097
110 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
111 optional COMPOUND_EXPR with ubsan instrumentation.
112
31dc71a8
MP
1132017-03-17 Marek Polacek <polacek@redhat.com>
114
115 * c-parser.c: Add C11 references.
116
d579c385
MP
1172017-03-15 Marek Polacek <polacek@redhat.com>
118
119 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
120
85059a38
MP
1212017-03-11 Marek Polacek <polacek@redhat.com>
122
123 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
124
2f6f187a
DM
1252017-03-10 David Malcolm <dmalcolm@redhat.com>
126
127 PR translation/79848
128 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
129 "%qs".
130 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
131
36618428
MP
1322017-03-09 Marek Polacek <polacek@redhat.com>
133
134 PR sanitizer/79757
135 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
136 parameter declarations with initializers.
137
01e5af5a
JJ
1382017-03-09 Jakub Jelinek <jakub@redhat.com>
139
140 PR c/79969
141 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
142 TYPE_STUB_DECL.
143
a71dbc63
JJ
1442017-03-07 Jakub Jelinek <jakub@redhat.com>
145
146 PR c/79834
147 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
148 for "may only be used in compound statements" diagnostics, change it
149 such that the same translatable string is used for all pragmas. For
150 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
151 diagnostics.
152 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
153 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
154 "may only be used in compound statements" diagnostics, such that the
155 same translatable string is used for all pragmas.
156
1ff4bae6
MP
1572017-03-04 Marek Polacek <polacek@redhat.com>
158
159 PR c/79847
160 * c-decl.c (implicit_decl_warning): Add missing space.
161
7f5a7d78
MP
1622017-03-03 Marek Polacek <polacek@redhat.com>
163
164 PR c/79758
165 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
166 current_function_prototype_arg_types is error_mark_node. Fix
167 formatting. Use TREE_VALUE instead of TREE_TYPE.
168
883c8f06
JJ
1692017-03-03 Jakub Jelinek <jakub@redhat.com>
170
79c9b7a8
JJ
171 PR c/79837
172 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
173 %<min%> or %<max%> in the diagnostics, instead mention identifier.
174 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
175 diagnostics.
176
883c8f06
JJ
177 PR c/79836
178 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
179 instead of %<_Generic>.
180 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
181 (c_parser_omp_target_exit_data): Use %<release%> instead of
182 %<release>.
183
324ff1a0
JJ
1842017-02-28 Jakub Jelinek <jakub@redhat.com>
185
186 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
187 instead of just cond ? "..." : "...".
188 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
189 for "enter"/"exit" keyword.
190 (c_finish_oacc_routine): Don't use %s to supply portions of the
191 message.
192
4227c9ad
JJ
1932017-02-24 Jakub Jelinek <jakub@redhat.com>
194
195 PR c++/79588
196 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
197 handle -Wrestrict here.
198 * c-typeck.c (build_function_call_vec): Adjust
199 check_function_arguments caller.
200
5d972e66
RB
2012017-02-23 Richard Biener <rguenther@suse.de>
202
203 PR c/79684
204 * gimple-parser.c (c_parser_gimple_statement): Use set_error
205 to initialize c_exprs to return.
206 (c_parser_gimple_binary_expression): Likewise.
207 (c_parser_gimple_unary_expression): Likewise.
208 (c_parser_gimple_postfix_expression): Likewise.
209
61ac5ebe
MP
2102017-02-22 Marek Polacek <polacek@redhat.com>
211
212 PR c/79662
213 * c-typeck.c (convert_arguments): Handle error_mark_node.
214
41d1b0b1
PK
2152017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
216
217 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
218 value of c_parser_parse_ssa_name against error_mark_node and emit
219 error if ssa name is anonymous and written as default definition.
220
eab1f169
PK
2212017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
222
223 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
224 FMA_EXPR.
225
bcac0b4d
JJ
2262017-02-16 Jakub Jelinek <jakub@redhat.com>
227
228 PR c++/79512
229 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
230 ignore #pragma omp target even when not followed by identifier.
231
1be33173
PK
2322017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
233
234 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
235 (c_parser_gimple_unary_expression): Likewise.
236
aa326bfb
JJ
2372017-02-13 Jakub Jelinek <jakub@redhat.com>
238
239 * c-parser.c (c_parser_oacc_declare): Add missing space in
240 diagnostics.
241
8a398bc5
PK
2422017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
243
244 PR c/79478
245 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
246 set_c_expr_source_range when parsing ssa-name.
247
3dcde5ef
PG
2482017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
249 Richard Biener <rguenther@suse.de>
250
251 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
252 building IL when arguments are error_mark_node.
253 (c_parser_gimple_unary_expression): Likewise.
254 (c_parser_gimple_if_stmt): Likewise.
255 (c_parser_gimple_switch_stmt): Likewise.
256 (c_parser_gimple_return_stmt): Likewise.
257 (c_parser_parse_ssa_name): When name lookup fails do not build
258 an SSA name. Use undeclared rather than not declared in error
259 reporting.
260
192b048b
MP
2612017-02-09 Marek Polacek <polacek@redhat.com>
262
263 PR c/79428
264 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
265 instead of c_parser_skip_until_found.
266
56f71478
JJ
2672017-02-09 Jakub Jelinek <jakub@redhat.com>
268
269 PR c/79431
270 * c-parser.c (c_parser_omp_declare_target): Don't invoke
271 symtab_node::get on automatic variables.
272
02889d23
CLT
2732016-02-09 Nathan Sidwell <nathan@codesourcery.com>
274 Chung-Lin Tang <cltang@codesourcery.com>
275
276 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
277 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
278 semantic checking.
279 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
280
7af4b20d
RB
2812017-02-07 Richard Biener <rguenther@suse.de>
282
283 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
284 (c_parser_gimple_postfix_expression_after_primary):
285 Do not use c_build_function_call_vec to avoid folding and promotion.
286 Simplify.
287
e5e391d6
MO
2882017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
289
290 PR lto/79061
291 * c-decl.c (pop_scope): Pass main_input_filename to
292 build_translation_unit_decl.
293
c2e84327
DM
2942017-01-24 David Malcolm <dmalcolm@redhat.com>
295
296 * c-parser.c: Include "read-rtl-function.h" and
297 "run-rtl-passes.h".
298 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
299 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
300 production. Update for renaming of field "gimple_pass" to
301 "gimple_or_rtl_pass". If __RTL was seen, call
302 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
303 to an auto_timevar, to cope with early exit.
304 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
305 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
306 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
307 Handle RID_RTL.
308 (c_parser_parse_rtl_body): New function.
309 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
310 (struct c_declspecs): Rename field "gimple_pass" to
311 "gimple_or_rtl_pass". Add field "rtl_p".
312 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
313 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
314 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
315 (c_parser_gimple_or_rtl_pass_list): ...this.
316
2ebd93e1
MP
3172017-01-20 Marek Polacek <polacek@redhat.com>
318
319 PR c/64279
320 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
321
b1c95bb5
RB
3222017-01-13 Richard Biener <rguenther@suse.de>
323
324 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
325 nops.
326
25329913
RB
3272017-01-13 Richard Biener <rguenther@suse.de>
328
329 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
330 _Literal ( type-name ) number.
331
6bb4ea5c
RB
3322017-01-12 Richard Biener <rguenther@suse.de>
333
334 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
335 __MEM.
336
6b5b4e9c
JJ
3372017-01-11 Jakub Jelinek <jakub@redhat.com>
338
339 PR c++/72813
340 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
341 PCH file.
342
e3252775
RB
3432017-01-11 Richard Biener <rguenther@suse.de>
344
345 PR bootstrap/79052
346 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
347 returns on parse errors.
348
a9342885
MP
3492017-01-04 Marek Polacek <polacek@redhat.com>
350
351 PR c++/64767
352 * c-parser.c (c_parser_postfix_expression): Mark zero character
353 constants by setting original_type in c_expr.
354 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
355 with a zero character constant.
356 (char_type_p): New function.
357
5dd9a9d0
DM
3582017-01-04 David Malcolm <dmalcolm@redhat.com>
359
360 * c-parser.c (c_parser_declaration_or_fndef): Create a
361 rich_location at init_loc and parse it to start_init.
362 (last_init_list_comma): New global.
363 (c_parser_braced_init): Update last_init_list_comma when parsing
364 commas. Pass it to pop_init_level. Pass location of closing
365 brace to pop_init_level.
366 (c_parser_postfix_expression_after_paren_type): Create a
367 rich_location at type_loc and parse it to start_init.
368 (c_parser_omp_declare_reduction): Likewise for loc.
369 * c-tree.h (start_init): Add rich_location * param.
370 (pop_init_level): Add location_t param.
371 * c-typeck.c (struct initializer_stack): Add field
372 "missing_brace_richloc".
373 (start_init): Add richloc param, use it to initialize
374 the stack node's missing_brace_richloc.
375 (last_init_list_comma): New decl.
376 (finish_implicit_inits): Pass last_init_list_comma to
377 pop_init_level.
378 (push_init_level): When finding missing open braces, add fix-it
379 hints to the richloc.
380 (pop_init_level): Add "insert_before" param and pass it
381 when calling pop_init_level. Add fixits about missing
382 close braces to any richloc. Use the richloc for the
383 -Wmissing-braces warning.
384 (set_designator): Pass last_init_list_comma to pop_init_level.
385 (process_init_element): Likewise.
386
cbe34bb5
JJ
3872017-01-01 Jakub Jelinek <jakub@redhat.com>
388
389 Update copyright years.
390
d17680f3
JJ
3912016-12-21 Jakub Jelinek <jakub@redhat.com>
392
0dba7960
JJ
393 PR bootstrap/78817
394 * c-typeck.c (build_function_call_vec): If check_function_arguments
395 returns true, set TREE_NO_WARNING on CALL_EXPR.
396
d17680f3
JJ
397 PR c/77767
398 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
399 to *expr instead of overwriting it.
400
aa90531e
RB
4012016-12-20 Richard Biener <rguenther@suse.de>
402
403 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
404 error recovery.
405 (c_parser_gimple_statement): Only build assigns for non-error
406 stmts.
407 (c_parser_gimple_postfix_expression_after): Improve error recovery.
408
629b3d75
MJ
4092016-12-14 Martin Jambor <mjambor@suse.cz>
410
411 * c-parser.c: Include omp-general.h and omp-offload.h instead of
412 omp-low.h.
413 (c_finish_oacc_routine): Adjusted call to
414 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
415 to use their new names.
416 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
417 use its new name.
418 (c_parser_oacc_update): Likewise.
419 (c_parser_omp_simd): Likewise.
420 (c_parser_omp_target_update): Likewise.
421 * c-typeck.c: Include omp-general.h instead of omp-low.h.
422 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
423 name.
424 (c_finish_omp_cancellation_point): Likewise.
425 * gimple-parser.c: Do not include omp-low.h
426
c5af52eb
CP
4272016-12-02 Cesar Philippidis <cesar@codesourcery.com>
428 James Norris <jnorris@codesourcery.com>
429
430 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
431 EXIT_DATA,WAIT} are not used in compound statements.
432 (c_parser_oacc_enter_exit_data): Update diagnostics.
433
48330c93
BE
4342016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
435
436 PR c++/71973
437 * c-decl.c (diagnose_mismatched_decls): Use
438 OPT_Wbuiltin_declaration_mismatch here too.
439
899ca90e 4402016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
441 Alan Hayward <alan.hayward@arm.com>
442 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
443
444 * c-decl.c (merge_decls): Use SET_DECL_MODE.
445 (make_label, finish_struct): Likewise.
446
1ee62b92 4472016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 448 Richard Biener <rguenther@suse.de>
22b15758 449
8e745a17
JJ
450 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
451 * config-lang.in (gtfiles): Add c/c-parser.h.
452 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
453 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
454 * c-parser.c (enum c_id_kind, struct c_token,
455 c_parser_next_token_is, c_parser_next_token_is_not,
456 c_parser_next_token_is_keyword,
457 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
458 Split out to ...
459 * c-parser.h: ... new header.
460 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 461 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
462 c_token_starts_typename, c_parser_next_token_starts_declspecs,
463 c_parser_next_tokens_start_declaration, c_parser_consume_token,
464 c_parser_error, c_parser_require, c_parser_skip_until_found,
465 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
466 c_parser_type_name): Export.
467 (c_parser_tokens_buf): New function.
468 (c_parser_error): Likewise.
469 (c_parser_set_error): Likewise.
470 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
471 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
472 via c_parser_parse_gimple_body.
8e745a17
JJ
473 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
474 c_token_starts_typename, c_parser_next_token_starts_declspecs,
475 c_parser_next_tokens_start_declaration, c_parser_consume_token,
476 c_parser_error, c_parser_require, c_parser_skip_until_found,
477 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
478 c_parser_type_name): Declare.
1ee62b92
PG
479 (struct c_parser): Declare forward.
480 (c_parser_tokens_buf): Declare.
8e745a17
JJ
481 (c_parser_error): Likewise.
482 (c_parser_set_error): Likewise.
483 * gimple-parser.c: New file.
484 * gimple-parser.h: Likewise.
1ee62b92 485
22b15758
UB
4862016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
487
488 PR c/35503
489 * c-parser.c (c_parser_postfix_expression_after_primary): Call
490 warn_for_restrict.
491
84ff4775
LCW
4922016-09-11 Le-Chun Wu <lcwu@google.com>
493 Mark Wielaard <mjw@redhat.com>
494
495 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
496 to the given -Wshadow= variant.
497
4d0cdd0c
TP
4982016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
499
500 * c-typeck.c: Include memmodel.h.
501
1202f33e
JJ
5022016-10-13 Jakub Jelinek <jakub@redhat.com>
503
504 PR target/77957
505 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
506 instead of lhd_return_null_tree_v.
507
8a14afd0
BS
5082016-10-07 Bernd Schmidt <bschmidt@redhat.com>
509
510 PR c++/69733
511 * c-decl.c (smallest_type_quals_location): New static function.
512 (grokdeclarator): Try to find the correct location for an ignored
513 qualifier.
514
81fea426
MP
5152016-09-26 Marek Polacek <polacek@redhat.com>
516
517 PR c/7652
518 * c-decl.c (pop_scope): Add gcc_fallthrough.
519
5202016-09-26 Marek Polacek <polacek@redhat.com>
521
522 PR c/7652
523 * c-parser.c (struct c_token): Add flags field.
524 (c_lex_one_token): Pass it to c_lex_with_flags.
525 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
526 into IFN_FALLTHROUGH.
527 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
528 attribute fallthrough after a case label or default label.
529 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
530
9a2300e9
MP
5312016-09-24 Marek Polacek <polacek@redhat.com>
532
533 PR c/77490
534 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
535 have boolean value. Warn about ++/-- on booleans.
536
7de76362
JJ
5372016-09-23 Jakub Jelinek <jakub@redhat.com>
538
539 * c-parser.c (incomplete_record_decls): Remove unnecessary
540 = vNULL initialization of file scope vec.
541
5b73d2ab
MP
5422016-09-16 Marek Polacek <polacek@redhat.com>
543
544 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
545
e51fbec3
MP
5462016-09-14 Marek Polacek <polacek@redhat.com>
547
548 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
549 (fix_array_notation_expr): Likewise.
550 * c-decl.c (finish_decl): Likewise.
551 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
552 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
553 (function_to_pointer_conversion): Use false instead of 0.
554 (convert_lvalue_to_rvalue): Likewise.
555 (parser_build_unary_op): Likewise.
556 (build_atomic_assign): Likewise.
557 (build_unary_op): Change nonconvert parameter type to bool, use
558 true/false instead of 1/0.
559 (build_binary_op): Use true instead of 1.
560
254830ba
DM
5612016-09-13 David Malcolm <dmalcolm@redhat.com>
562
563 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
564 of add_fixit_insert to add_fixit_insert_before.
565
4c13ba17
MP
5662016-09-13 Marek Polacek <polacek@redhat.com>
567
568 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
569 it.
570
54dcdb88
BE
5712016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
572
573 PR c++/77496
574 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
575 COMPOUND_EXPR to warn_for_omitted_condop.
576
e5106e27
DM
5772016-09-07 David Malcolm <dmalcolm@redhat.com>
578
579 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
580 c_get_substring_location for this new langhook.
581
9dc5773f
JJ
5822016-09-02 Jakub Jelinek <jakub@redhat.com>
583
584 PR c/65467
585 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
586 flag_openmp.
587 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
588 instead of mark_exp_read on low_bound/length expression.
589 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
590 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
591 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
592 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
593 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
594 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
595 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
596 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
597 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
598 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
599 instead of mark_expr_read.
600 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
601 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
602 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
603 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
604 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
605 array section bases outside of depend clause, for depend clause
606 use convert_lvalue_to_rvalue on the base.
607 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
608 linear, aligned, map, to and from clauses.
609 (c_omp_clause_copy_ctor): New function.
610
295844f6
MP
6112016-09-01 Marek Polacek <polacek@redhat.com>
612
613 PR c/7652
614 * c-typeck.c (composite_type): Add FALLTHRU comment.
615
089af25c
DM
6162016-08-31 David Malcolm <dmalcolm@redhat.com>
617
618 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
619 to the insertion fixits for "struct", "union", and "enum".
620
f9087798
DM
6212016-08-30 David Malcolm <dmalcolm@redhat.com>
622
623 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
624 rather than add_fixit_misspelled_id.
625 (undeclared_variable): Likewise.
626 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
627 now-redundant "here" params from add_fixit_insert method calls.
628 (c_parser_parameter_declaration): Likewise.
629 * c-typeck.c (build_component_ref): Remove now-redundant range
630 param from add_fixit_replace method calls.
631
ebef225f
MP
6322016-08-25 Marek Polacek <polacek@redhat.com>
633
634 * c-typeck.c (parser_build_binary_op): Pass LHS to
635 warn_logical_not_parentheses.
636
fe377a48
MP
6372016-08-25 Marek Polacek <polacek@redhat.com>
638
639 PR c/77323
640 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
641 or _FloatN or _FloatNx is not supported.
642 (finish_declspecs): Set type to integer_type_node when _FloatN or
643 _FloatNx is not supported.
644
c65699ef
JM
6452016-08-19 Joseph Myers <joseph@codesourcery.com>
646
647 PR c/32187
648 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
649 (struct c_declspecs): Add field floatn_nx_idx.
650 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
651 and _FloatNx type specifiers.
652 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
653 (c_parser_declspecs, c_parser_attribute_any_word)
654 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
655 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
656 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
657 narrower than double.
658
2f1364c2
JJ
6592016-08-12 Jakub Jelinek <jakub@redhat.com>
660 Martin Liska <mliska@suse.cz>
661
662 PR c/67410
663 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
664 % to determine val element to change. Assert that
665 wchar_bytes * charwidth fits into val array.
666
191816a3
MP
6672016-08-12 Marek Polacek <polacek@redhat.com>
668
669 PR c/7652
670 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
671 (c_parser_postfix_expression): Likewise.
672 * c-typeck.c (build_unary_op): Adjust fall through comment.
673 (c_mark_addressable): Likewise.
674
b95a64bb
JJ
6752016-08-11 Jakub Jelinek <jakub@redhat.com>
676
677 PR c/72816
678 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
679 array member through typedef, for orig_qual_indirect == 0 clear
680 orig_qual_type.
681
895aa8e1
DM
6822016-08-08 David Malcolm <dmalcolm@redhat.com>
683
684 PR c/64955
685 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
686 this up to selftest::run_c_tests.
687 (selftest::run_c_tests): New function.
688
0b212d8c
TS
6892016-08-04 Thomas Schwinge <thomas@codesourcery.com>
690
ae9281fc
TS
691 * c-parser.c (struct oacc_routine_data): Add error_seen and
692 fndecl_seen members.
693 (c_finish_oacc_routine): Use these.
694 (c_parser_declaration_or_fndef): Adjust.
695 (c_parser_oacc_routine): Likewise. Support more C language
696 constructs, and improve diagnostics. Move pragma context
697 checking...
698 (c_parser_pragma): ... here.
699
0b212d8c
TS
700 * c-parser.c (struct oacc_routine_data): New.
701 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
702 Simplify code.
703 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
704 declare target" attribute.
705
76e2c821
JB
7062016-08-01 Jan Beulich <jbeulich@suse.com>
707
708 * c-fold.c (c_fully_fold_internal): Also emit shift count
709 warnings for vector types.
710 * c-typeck.c (build_binary_op): Likewise.
711
f618a472
MP
7122016-07-29 Marek Polacek <polacek@redhat.com>
713
714 PR c/71742
715 * c-decl.c (finish_struct): Rephrase an error message.
716
efd0786f
MP
717 PR c/71853
718 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
719 to error node for invalid code.
720
e00dceaf
MP
721 PR c/71573
722 * c-decl.c (implicitly_declare): Return decl early not only for
723 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
724
673a107a
JJ
7252016-07-29 Jakub Jelinek <jakub@redhat.com>
726
727 PR c/71969
728 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
729 on GNU extern inline functions.
730
a5b5c8b6
MP
7312016-07-29 Marek Polacek <polacek@redhat.com>
732
733 PR c/71583
734 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
735 check expr.value.
736
e3fe09c1
UB
7372016-07-22 Uros Bizjak <ubizjak@gmail.com>
738
739 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
740
7c8f7eaa
DM
7412016-07-20 David Malcolm <dmalcolm@redhat.com>
742
743 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
744 spellcheck-tree.h
745 (best_macro_match): Likewise, converting from a typedef to a
746 subclass.
747 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
748 (lookup_name_fuzzy): Update for change of best_macro_match to a
749 subclass with a ctor that calls cpp_forall_identifiers.
750
de6a69ee
DM
7512016-07-20 David Malcolm <dmalcolm@redhat.com>
752
753 * c-decl.c (implicit_decl_warning): Update for conversion of
754 return type of lookup_name_fuzzy to const char *.
755 (undeclared_variable): Likewise.
756 (lookup_name_fuzzy): Convert return type from tree to
757 const char *.
758 * c-parser.c (c_parser_declaration_or_fndef): Update for
759 conversion of return type of lookup_name_fuzzy to const char *.
760 (c_parser_parameter_declaration): Likewise.
761
b1c9c068
CP
7622016-07-15 Cesar Philippidis <cesar@codesourcery.com>
763
764 * c-parser.c (c_parser_oacc_declare): Don't scan for
765 GOMP_MAP_POINTER.
766 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
767 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
768 zero-length subarrays.
769
ddbbcb19
JJ
7702016-07-15 Jakub Jelinek <jakub@redhat.com>
771
772 PR c/71858
773 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
774 instead of FUZZY_LOOKUP_NAME.
775 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
776 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
777
dd36b877
JJ
7782016-07-14 Jakub Jelinek <jakub@redhat.com>
779
780 PR c/71858
781 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
782
8c681247
TS
7832016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
784
785 * c-parser.c (c_parser_generic_selection): Make type of variable
786 auto_vec.
787 (c_parser_omp_declare_simd): Likewise.
788
bf4fa671
TS
7892016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
790
791 * c-decl.c (struct c_struct_parse_info): Change member types
792 from vec to auto_vec.
793 (start_struct): Adjust.
794 (finish_struct): Likewise.
795
557e8c49
JJ
7962016-07-02 Jakub Jelinek <jakub@redhat.com>
797
798 PR c/71719
799 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
800
54d19c3b
TS
8012016-06-29 Thomas Schwinge <thomas@codesourcery.com>
802
803 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
804 Move pragma context checking into...
805 (c_parser_omp_cancellation_point): ... here, and improve
806 diagnostic messages.
807 * c-typeck.c (c_finish_omp_cancel)
808 (c_finish_omp_cancellation_point): Improve diagnostic messages.
809
152ef731
JJ
8102016-06-29 Jakub Jelinek <jakub@redhat.com>
811
812 PR c/71685
813 * c-typeck.c (c_build_qualified_type): Don't clear
814 C_TYPE_INCOMPLETE_VARS for the main variant.
815
8162016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
817
818 PR c/71552
819 * c-typeck.c (output_init_element): Diagnose incompatible types
820 before non-constant initializers.
821
e9ac1f86
JJ
8222016-06-28 Jakub Jelinek <jakub@redhat.com>
823
824 * Make-lang.in: Don't cat ../stage_current if it does not exist.
825
277d7ee0
AK
8262016-06-23 Andi Kleen <ak@linux.intel.com>
827
828 * Make-lang.in: Add support for autofdo.
829
1a4f11c8
DM
8302016-06-22 David Malcolm <dmalcolm@redhat.com>
831
832 PR c/70339
833 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
834 (implicit_decl_warning): When issuing warnings for implicit
835 declarations, attempt to provide a suggestion via
836 lookup_name_fuzzy.
837 (undeclared_variable): Likewise when issuing errors.
838 (lookup_name_in_scope): Likewise.
839 (struct edit_distance_traits<cpp_hashnode *>): New struct.
840 (best_macro_match): New typedef.
841 (find_closest_macro_cpp_cb): New function.
842 (lookup_name_fuzzy): New function.
843 * c-parser.c: Include gcc-rich-location.h.
844 (c_token_starts_typename): Split out case CPP_KEYWORD into...
845 (c_keyword_starts_typename): ...this new function.
846 (c_parser_declaration_or_fndef): When issuing errors about
847 missing "struct" etc, add a fixit. For other kinds of errors,
848 attempt to provide a suggestion via lookup_name_fuzzy.
849 (c_parser_parms_declarator): When looking ahead to detect typos in
850 type names, also reject CPP_KEYWORD.
851 (c_parser_parameter_declaration): When issuing errors about
852 unknown type names, attempt to provide a suggestion via
853 lookup_name_fuzzy.
854 * c-tree.h (c_keyword_starts_typename): New prototype.
855
5a578671
JM
8562016-06-20 Joseph Myers <joseph@codesourcery.com>
857
858 PR c/71601
859 * c-typeck.c (build_conditional_expr): Return error_mark_node if
860 c_common_type returns error_mark_node.
861
3f8257db 8622016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
863
864 PR c/69507
865 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
866 __alignof__ (expression).
867
6a3f203c
DM
8682016-06-14 David Malcolm <dmalcolm@redhat.com>
869
870 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
871
264757fb
DM
8722016-06-14 David Malcolm <dmalcolm@redhat.com>
873
874 * c-typeck.c (build_component_ref): Simplify fixit code by
875 using gcc_rich_location::add_fixit_misspelled_id.
876 (set_init_label): Likewise.
877
f7e4f2e3
DM
8782016-06-13 David Malcolm <dmalcolm@redhat.com>
879
880 * c-parser.c (c_parser_initelt): Provide location of name for new
881 location_t param of set_init_label.
882 * c-tree.h (set_init_label): Add location_t param.
883 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
884 param and use it when issuing error messages about unrecognized
885 field names. Attempt to provide a fixit hint if appropriate,
886 otherwise update the error message to provide the type name.
887
4b1ffdb1
TS
8882016-06-10 Thomas Schwinge <thomas@codesourcery.com>
889
890 PR c/71381
891 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
892 Loosen checking.
893
44a845ca
MS
8942016-06-08 Martin Sebor <msebor@redhat.com>
895 Jakub Jelinek <jakub@redhat.com>
896
897 PR c++/70507
898 PR c/68120
899 * c-typeck.c (convert_arguments): Don't promote last argument
900 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
901
92a5f2ba
MP
9022016-06-08 Marek Polacek <polacek@redhat.com>
903
904 PR c/71418
905 * c-decl.c (grokdeclarator): Check TYPE_P.
906
08203f73
MP
907 PR c/71426
908 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
909 code.
910
6ffd47b7
DM
9112016-06-07 David Malcolm <dmalcolm@redhat.com>
912
913 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
914 and structure element reference, capture the location of the
915 element name token and pass it to build_component_ref.
916 (c_parser_postfix_expression_after_primary): Likewise for
917 structure element dereference.
918 (c_parser_omp_variable_list): Likewise for
919 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
920 * c-tree.h (build_component_ref): Add location_t param.
921 * c-typeck.c (build_component_ref): Add location_t param
922 COMPONENT_LOC. Use it, if available, when issuing hints about
923 mispelled member names to provide a fixit replacement hint.
924
1f40cff3
MP
9252016-06-06 Marek Polacek <polacek@redhat.com>
926
927 PR c/71362
928 * c-parser.c (c_parser_direct_declarator): Set location.
929
5545a907
MP
9302016-06-06 Marek Polacek <polacek@redhat.com>
931
932 * c-typeck.c (comptypes_internal): Handle comparisons of
933 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
934 TYPE_REF_CAN_ALIAS_ALL.
935
b605f663
CLT
9362016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
937
938 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
939 arguments as addressable when async clause exists.
940
00631022
JJ
9412016-05-30 Jakub Jelinek <jakub@redhat.com>
942
943 PR c++/71349
944 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
945 when combined with target construct.
946
7211a097
JJ
9472016-05-26 Jakub Jelinek <jakub@redhat.com>
948
949 * c-parser.c (c_parser_omp_clause_schedule): Warn if
950 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
951
95efe6b6
MP
9522016-05-25 Marek Polacek <polacek@redhat.com>
953
954 PR c/71265
955 * c-decl.c (c_make_fname_decl): Don't check seen_error.
956
a23faf7a
MP
957 PR c/71266
958 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
959
e46c7770
CP
9602016-05-24 Cesar Philippidis <cesar@codesourcery.com>
961
962 * c-parser.c (c_parser_oacc_declare): Add support for
963 GOMP_MAP_FIRSTPRIVATE_POINTER.
964 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
965 argument with enum c_omp_region_type ort.
966 (handle_omp_array_sections): Likewise. Update call to
967 handle_omp_array_sections_1.
968 (c_finish_omp_clauses): Add specific errors and warning messages for
969 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
970 call to handle_omp_array_sections.
971
a04e69c0
TS
9722016-05-24 Thomas Schwinge <thomas@codesourcery.com>
973
974 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
975
f17a223d
RB
9762016-05-24 Richard Biener <rguenther@suse.de>
977
978 PR middle-end/70434
979 PR c/69504
980 * c-typeck.c (build_array_ref): Do not complain about indexing
981 non-lvalue vectors. Adjust for function name change.
982
79063edd
MS
9832016-05-20 Martin Sebor <msebor@redhat.com>
984
985 PR c/71115
986 * c-typeck.c (error_init): Use
987 expansion_point_location_if_in_system_header.
988 (warning_init): Same.
989
8a40fef3
DM
9902016-05-19 David Malcolm <dmalcolm@redhat.com>
991
992 PR c/71171
993 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
994 in error-handling.
995 (c_parser_postfix_expression): Likewise.
996 * c-tree.h (c_expr::set_error): New method.
997 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
998 that result's range is initialized.
999
e9892350
JG
10002016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1001
1002 * c-typeck.c (parser_build_unary_op): Fix formatting.
1003
8fad45f5
MW
10042016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1005
1006 * c-decl.c (grokdeclarator): Remove errmsg and use of
1007 targetm.invalid_return_type.
1008 (grokparms): Remove errmsg and use of
1009 targetm.invalid_parameter_type.
1010
aa4b467b
JM
10112016-05-13 Joseph Myers <joseph@codesourcery.com>
1012
1013 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1014 function return type.
1015
4f2e1536
MP
10162016-05-12 Marek Polacek <polacek@redhat.com>
1017
1018 PR c/70756
1019 * c-decl.c (build_compound_literal): Pass LOC down to
1020 c_incomplete_type_error.
1021 * c-tree.h (require_complete_type): Adjust declaration.
1022 (c_incomplete_type_error): Likewise.
1023 * c-typeck.c (require_complete_type): Add location parameter, pass it
1024 down to c_incomplete_type_error.
1025 (c_incomplete_type_error): Add location parameter, pass it down to
1026 error_at.
1027 (build_component_ref): Pass location down to c_incomplete_type_error.
1028 (default_conversion): Pass location down to require_complete_type.
1029 (build_array_ref): Likewise.
1030 (build_function_call_vec): Likewise.
1031 (convert_arguments): Likewise.
1032 (build_unary_op): Likewise.
1033 (build_c_cast): Likewise.
1034 (build_modify_expr): Likewise.
1035 (convert_for_assignment): Likewise.
1036 (c_finish_omp_clauses): Likewise.
1037
d6e83a8d
MM
10382016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1039
1040 PR c/43651
1041 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1042 is enabled.
1043 * c-errors.c (pedwarn_c90): Return true if warned.
1044 * c-tree.h (pedwarn_c90): Change return type to bool.
1045 (enum c_declspec_word): Add new enumerator cdw_atomic.
1046
5c3a10fb
MP
10472016-05-11 Marek Polacek <polacek@redhat.com>
1048
1049 PR c++/71024
1050 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1051 diagnose_mismatched_attributes and call it.
1052
cf68d92c
MP
10532016-05-10 Marek Polacek <polacek@redhat.com>
1054
1055 PR c/70255
1056 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1057 on a declaration following the definition.
1058
351f85c5
JJ
10592016-05-05 Jakub Jelinek <jakub@redhat.com>
1060
1061 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1062 parse it through to c_parser_c99_block_statement.
1063 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1064 caller.
1065
deef7113
MP
10662016-05-04 Marek Polacek <polacek@redhat.com>
1067
1068 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1069 OPT_Wdangling_else.
1070
de55efd5
MP
10712016-05-04 Marek Polacek <polacek@redhat.com>
1072
1073 PR c/48778
1074 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1075 for macro expansions.
1076
79ce98bc
MP
10772016-05-03 Marek Polacek <polacek@redhat.com>
1078
1079 PR c/70859
1080 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1081 check_builtin_function_arguments.
1082
fb2647aa
RB
10832016-05-03 Richard Biener <rguenther@suse.de>
1084
1085 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1086 the checksum from the previous stage.
1087
77886428
CP
10882016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1089
1090 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1091 c_finish_omp_clauses.
1092 (c_parser_omp_all_clauses): Likewise.
1093 (c_parser_oacc_cache): Likewise.
1094 (c_parser_oacc_loop): Likewise.
1095 (omp_split_clauses): Likewise.
1096 (c_parser_omp_declare_target): Likewise.
1097 (c_parser_cilk_all_clauses): Likewise.
1098 (c_parser_cilk_for): Likewise.
1099 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1100 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1101
7176a4a0
MP
11022016-05-02 Marek Polacek <polacek@redhat.com>
1103
1104 PR c/70851
1105 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1106 incomplete type.
1107
e7ff0319
CP
11082016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1109
1110 PR middle-end/70626
1111 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1112 OACC_LOOP_CLAUSE_MASK.
1113 (c_parser_oacc_kernels_parallel): Update call to
1114 c_oacc_split_loop_clauses.
1115
9f405ce1
AM
11162016-04-28 Andrew MacLeod <amacleod@redhat.com>
1117
1118 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1119 argument to build_modify_expr in two cases.
1120
c1e1f433
BS
11212016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1122
1123 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1124 warn_for_memset instead of warning directly here.
1125
2448a956
MP
11262016-04-26 Marek Polacek <polacek@redhat.com>
1127
1128 PR c/67784
1129 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1130 out of ...
1131 (c_parser_for_statement): ... here.
1132 (c_parser_if_statement): Use it.
1133 (c_parser_switch_statement): Use it.
1134 (c_parser_while_statement): Use it.
1135
b02a5e26
MP
1136 PR c/70791
1137 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1138
477d4906
IV
11392016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1140
1141 PR c++/69363
1142 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1143 instead of c_finish_cilk_clauses.
1144 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1145 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1146 floating-point variables in the linear clause for Cilk Plus.
1147
fe37c7af
MM
11482016-04-18 Michael Matz <matz@suse.de>
1149
1150 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1151 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1152
949505a9
MP
11532016-04-15 Marek Polacek <polacek@redhat.com>
1154
1155 PR c/70671
1156 * c-typeck.c (build_unary_op): Pass location down to error and
1157 warning call.
1158
dda1bf61
JJ
11592016-04-15 Jakub Jelinek <jakub@redhat.com>
1160
1161 PR c/70436
1162 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1163 where needed.
1164 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1165 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1166 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1167 Adjust c_parser_pragma callers.
1168 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1169 caller.
1170 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1171 c_parser_statement.
1172 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1173 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1174 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1175 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1176 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1177 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1178 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1179 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1180 down where needed.
1181 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1182 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1183 calls.
1184
99cd9857
MP
11852016-04-13 Marek Polacek <polacek@redhat.com>
1186
1187 PR c/70436
1188 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1189 adjust callers.
1190 (c_parser_statement): Likewise.
1191 (c_parser_c99_block_statement): Likewise.
1192 (c_parser_while_statement): Likewise.
1193 (c_parser_for_statement): Likewise.
1194 (c_parser_if_body): Don't set IF_P here.
1195 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1196 about dangling else here.
1197 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1198 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1199 warn about dangling else here.
1200
f13355da
MP
12012016-04-04 Marek Polacek <polacek@redhat.com>
1202
1203 PR c/70307
1204 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1205
5fde6a45
MP
12062016-03-31 Marek Polacek <polacek@redhat.com>
1207
1208 PR c/70297
1209 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1210
4bbf545b
DM
12112016-03-18 David Malcolm <dmalcolm@redhat.com>
1212
1213 PR c/70281
1214 * c-parser.c (c_parser_postfix_expression): Set the source range
1215 for uses of "__builtin_types_compatible_p".
1216
fcc2b74f
JJ
12172016-03-17 Jakub Jelinek <jakub@redhat.com>
1218
1219 PR c/70280
1220 * c-typeck.c (composite_type): Don't count void_list_node
1221 into len, if the list is terminated by void_list_node, start
1222 with void_list_node instead of NULL for newargs. Stop
1223 at void_list_node.
1224
ab4c578f
MP
12252016-03-16 Marek Polacek <polacek@redhat.com>
1226
1227 PR c/70093
1228 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1229 nested functions returning VM types.
1230
96b3c82d
CP
12312016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1232
1233 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1234 when calling c_finish_omp_clauses.
1235
29b9828f
BS
12362016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1237
1238 PR c/69824
1239 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1240 for later.
1241
7ff6ca38
MP
12422016-03-04 Marek Polacek <polacek@redhat.com>
1243
1244 PR c/69798
1245 * c-parser.c (c_parser_postfix_expression): Call
1246 c_parser_cast_expression rather than c_parser_postfix_expression.
1247
686e2237
JJ
12482016-03-01 Jakub Jelinek <jakub@redhat.com>
1249
1250 PR c/69796
1251 PR c/69974
1252 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1253 of incomplete decls to error_mark_node.
1254
0b05329b
MP
12552016-02-24 Marek Polacek <polacek@redhat.com>
1256
1257 PR c/69819
1258 * c-decl.c (finish_decl): Don't update the copy of the type of a
1259 different decl type.
1260
067fbd8b
JJ
12612016-02-23 Jakub Jelinek <jakub@redhat.com>
1262
1263 PR objc/69844
1264 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1265 in id_kind reclassification.
1266
bf14eba2
JJ
12672016-02-16 Jakub Jelinek <jakub@redhat.com>
1268
1269 PR c/69835
1270 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1271
ba539195
JN
12722016-02-16 James Norris <jnorris@codesourcery.com>
1273
1274 PR c/64748
1275 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1276
16595a1f
BS
12772016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1278
f48dfe98
BS
1279 * c-decl.c (build_null_declspecs): Zero the entire struct.
1280
16595a1f
BS
1281 PR c/69522
1282 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1283 callers changed. If nested_p is true, use it to call
1284 finish_implicit_inits.
1285 * c-tree.h (finish_implicit_inits): Declare.
1286 * c-typeck.c (finish_implicit_inits): New function. Move code
1287 from ...
1288 (push_init_level): ... here.
1289 (set_designator, process_init_element): Call finish_implicit_inits.
1290
66756373
JJ
12912016-02-11 Jakub Jelinek <jakub@redhat.com>
1292
1293 PR c/69768
1294 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1295 arguments for -Waddress warning.
1296
1066e9b5
JJ
12972016-02-04 Jakub Jelinek <jakub@redhat.com>
1298
1299 PR c/69669
1300 * c-decl.c (finish_enum): When honoring mode attribute,
1301 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1302
3a5d2ba4
JJ
13032016-01-29 Jakub Jelinek <jakub@redhat.com>
1304
1305 PR debug/69518
1306 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1307 all type variants, not just TYPE_MAIN_VARIANT.
1308
cbdd8ae0
JJ
13092016-01-27 Jakub Jelinek <jakub@redhat.com>
1310
1311 PR debug/66869
1312 * c-decl.c (c_write_global_declarations_1): Warn with
1313 warn_unused_function if static prototype without definition
1314 is not C_DECL_USED.
1315
fa74a4bc
MP
13162016-01-27 Marek Polacek <polacek@redhat.com>
1317
1318 PR c/68062
1319 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1320 to unsigned, if needed. Add -Wsign-compare warning.
1321
13f92e8d
JJ
13222016-01-26 Jakub Jelinek <jakub@redhat.com>
1323
1324 PR tree-optimization/69483
1325 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1326
cd8e73dc 13272016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1328
1329 PR c/24293
1330 * c-tree.h (incomplete_record_decls): Declare.
1331 * c-parser.c (incomplete_record_decls): Define.
1332 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1333 report error if any decl has zero size.
1334 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1335 or enum type to incomplete_record_decls.
1336
e6d6ec9e
TV
13372016-01-14 Tom de Vries <tom@codesourcery.com>
1338
1339 PR tree-optimization/68773
1340 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1341 set force_output.
1342
00083992
MP
13432016-01-14 Marek Polacek <polacek@redhat.com>
1344
1345 PR c/69262
1346 * c-decl.c (grokdeclarator): Provide more information for invalid
1347 array declarations.
1348
7443cf13
DM
13492016-01-06 David Malcolm <dmalcolm@redhat.com>
1350
1351 * c-parser.c (c_parser_unary_expression): For dereferences, build
1352 a combined location before calling build_indirect_ref, so that
1353 error reports cover the full range, manually updating the c_expr
1354 src_range.
1355
6b131d5b
MP
13562016-01-06 Marek Polacek <polacek@redhat.com>
1357
1358 PR sanitizer/69099
1359 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1360 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1361 NULL.
1362
818ab71a
JJ
13632016-01-04 Jakub Jelinek <jakub@redhat.com>
1364
1365 Update copyright years.
1366
2fe0a208
MP
13672016-01-04 Marek Polacek <polacek@redhat.com>
1368
1369 PR c/68908
1370 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1371 optimization to use __atomic_fetch_* built-in if possible.
1372
c7b48c8a
TS
13732015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1374
1375 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1376 into...
1377 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1378 all users.
1379
fda5652f
MP
13802015-12-22 Marek Polacek <polacek@redhat.com>
1381
1382 PR c/69002
1383 * c-typeck.c (build_component_ref): Warn when acessing elements of
1384 atomic structures or unions.
1385
745e411d
DM
13862015-12-21 David Malcolm <dmalcolm@redhat.com>
1387
1388 * c-typeck.c: Include "gcc-rich-location.h".
1389 (build_binary_op): In the two places that call binary_op_error,
1390 create a gcc_rich_location and populate it with the location of
1391 the binary op and its two operands.
1392
94c40e19
DM
13932015-12-16 David Malcolm <dmalcolm@redhat.com>
1394
1395 * c-parser.c (c_parser_statement_after_labels): When calling
1396 c_finish_return, Use the return expression's location if it has
1397 one, falling back to the location of the first token within it.
1398 * c-typeck.c (c_finish_return): When issuing warnings about
1399 the incorrect presence/absence of a return value, issue a note
1400 showing the declaration of the function.
1401
de67c4c3
DM
14022015-12-16 David Malcolm <dmalcolm@redhat.com>
1403
1404 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1405 to 4.
1406 (c_parser_peek_nth_token): New function.
1407 (c_parser_peek_conflict_marker): New function.
1408 (c_parser_error): Detect conflict markers and report them as such.
1409
a10704e1
DM
14102015-12-16 David Malcolm <dmalcolm@redhat.com>
1411
1412 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1413 to preserve range information for the primary expression
1414 in the call to c_parser_postfix_expression_after_primary.
1415
8062bca6
DM
14162015-12-16 David Malcolm <dmalcolm@redhat.com>
1417
1418 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1419 expression location, falling back on the first token location,
1420 rather than always using the latter.
1421
d06f8b75
MP
14222015-12-16 Marek Polacek <polacek@redhat.com>
1423
1424 PR c/64637
1425 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1426 available.
1427
2994fb91
MP
14282015-12-15 Marek Polacek <polacek@redhat.com>
1429
1430 PR c/68907
1431 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1432 artificial decl.
1433
a1b93f8d
DM
14342015-12-08 David Malcolm <dmalcolm@redhat.com>
1435
1436 * c-parser.c (c_parser_alignof_expression): Capture location of
1437 closing parenthesis (if any), or of end of unary expression, and
1438 use it to build a src_range for the expression.
1439
46c6e1e2
DM
14402015-12-08 David Malcolm <dmalcolm@redhat.com>
1441
1442 PR c/68757
1443 * c-parser.c (c_parser_get_builtin_args): Add
1444 "out_close_paren_loc" param, and write back to it.
1445 (c_parser_postfix_expression): Capture the closing
1446 parenthesis location for RID_CHOOSE_EXPR,
1447 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1448 RID_BUILTIN_SHUFFLE and use it to set the source range
1449 for such expressions; within RID_BUILTIN_COMPLEX set
1450 the underlying location.
1451
66189108
MP
14522015-12-07 Marek Polacek <polacek@redhat.com>
1453
1454 PR c/68668
1455 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1456 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1457
f187980b
EB
14582015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1459
1460 * c-tree.h (c_build_va_arg): Adjust prototype.
1461 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1462 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1463 parameter, adjust throughout and issue an error if EXPR is a component
1464 with reverse storage order.
1465
4250754e
JM
14662015-12-02 Jason Merrill <jason@redhat.com>
1467
1468 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1469 (c_fully_fold_internal, decl_constant_value_for_optimization):
1470 Move from c-common.c.
1471 * c-tree.h: Declare decl_constant_value_for_optimization.
1472 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1473
e9e32ee6
JM
14742015-12-02 Joseph Myers <joseph@codesourcery.com>
1475
1476 PR c/68162
1477 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1478 following link from declarator to next declarator. Track original
1479 qualified type and pass it to c_build_qualified_type.
1480 * c-typeck.c (c_build_qualified_type): Add arguments
1481 orig_qual_type and orig_qual_indirect.
1482
ff7a55bf
TS
14832015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1484
1485 * c-parser.c (c_parser_omp_clause_name)
1486 (c_parser_oacc_all_clauses): Alphabetical sorting.
1487
657e4e47
JJ
14882015-12-02 Jakub Jelinek <jakub@redhat.com>
1489
1490 PR c/68533
1491 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1492 for diagnostics.
1493
37d5ad46
JB
14942015-12-01 Julian Brown <julian@codesourcery.com>
1495 Cesar Philippidis <cesar@codesourcery.com>
1496 James Norris <James_Norris@mentor.com>
1497
1498 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1499 (c_parser_oacc_clause_use_device): New function.
1500 (c_parser_oacc_all_clauses): Add use_device support.
1501 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1502 (c_parser_oacc_host_data): New function.
1503 (c_parser_omp_construct): Add host_data support.
1504 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1505 * c-typeck.c (c_finish_oacc_host_data): New function.
1506 (c_finish_omp_clauses): Add use_device support.
1507
a4850ce9
JH
15082015-11-29 Jan Hubicka <hubicka@ucw.cz>
1509
1510 PR c/67106
1511 * c-decl.c: Set TYPE_PACKED in variants.
1512
b58d3df2
ML
15132015-11-27 Martin Liska <mliska@suse.cz>
1514
1515 PR c++/68312
1516 * c-array-notation.c (fix_builtin_array_notation_fn):
1517 Use release_vec_vec instead of vec::release.
1518 (build_array_notation_expr): Likewise.
1519 (fix_conditional_array_notations_1): Likewise.
1520 (fix_array_notation_expr): Likewise.
1521 (fix_array_notation_call_expr): Likewise.
1522
aec17bfe
JJ
15232015-11-27 Jakub Jelinek <jakub@redhat.com>
1524
1525 PR c/63326
1526 * c-parser.c (c_parser_compound_statement_nostart): If
1527 last_label is true, use pragma_stmt instead of pragma_compound
1528 as second c_parser_pragma argument.
1529 (c_parser_omp_ordered, c_parser_omp_target_update,
1530 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1531 false as second argument to c_parser_skip_to_pragma_eol after
1532 diagnosing standalone directives used in pragma_stmt context.
1533
688c4de0
IV
15342015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1535
1536 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1537 with "if (ENABLE_OFFLOADING)".
1538
cbd03aee
DM
15392015-11-23 David Malcolm <dmalcolm@redhat.com>
1540
1541 PR objc/68438
1542 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1543 for various Objective-C constructs: Class.name syntax,
1544 @selector(), @protocol(), @encode(), and [] message syntax.
1545
a87a86e1
DM
15462015-11-20 David Malcolm <dmalcolm@redhat.com>
1547
1548 PR 62314
1549 * c-typeck.c (should_suggest_deref_p): New function.
1550 (build_component_ref): Special-case POINTER_TYPE when
1551 generating a "not a structure of union" error message, and
1552 suggest a "->" rather than a ".", providing a fix-it hint.
1553
8ece8dfb
DM
15542015-11-19 David Malcolm <dmalcolm@redhat.com>
1555
1556 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1557 candidate into a new function, find_closest_identifier.
1558
433068cc
MP
15592015-11-19 Marek Polacek <polacek@redhat.com>
1560
1561 PR c/68412
1562 * c-typeck.c (parser_build_binary_op): Properly handle
1563 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1564
bef08b71
DM
15652015-11-17 David Malcolm <dmalcolm@redhat.com>
1566
1567 * c-parser.c (set_c_expr_source_range): Bulletproof both
1568 overloaded implementations against NULL expr->value.
1569 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1570 values.
1571 (c_parser_unary_expression): Likewise when handling addresses of
1572 labels.
1573 (c_parser_postfix_expression): Likewise for statement expressions,
1574 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1575 __builtin_va_arg, and for __builtin_offset_of.
1576 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1577 src_range using the range of the braced initializer.
1578 (c_parser_transaction_expression): Set src_range for "ret" to a
1579 sane pair of values.
1580
fff77217
KY
15812015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1582
1583 * c-parser.c (c_finish_omp_declare_simd): Look for
1584 "simd" attribute as well. Update error message.
1585
1d899da2
TS
15862015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1587
1588 * c-parser.c (c_parser_omp_declare_target): Adjust.
1589
e4606348
JJ
15902015-11-14 Jakub Jelinek <jakub@redhat.com>
1591
1592 * c-typeck.c (c_finish_omp_clauses): Don't mark
1593 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1594
3e636daf
MP
15952015-11-14 Marek Polacek <polacek@redhat.com>
1596
1597 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1598 * c-typeck.c: Likewise.
1599
ebedc9a3
DM
16002015-11-13 David Malcolm <dmalcolm@redhat.com>
1601
1602 * c-decl.c (warn_defaults_to): Pass line_table to
1603 rich_location ctor.
1604 * c-errors.c (pedwarn_c99): Likewise.
1605 (pedwarn_c90): Likewise.
1606 * c-parser.c (set_c_expr_source_range): New functions.
1607 (c_token::get_range): New method.
1608 (c_token::get_finish): New method.
1609 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1610 based on the range from the start of the LHS to the end of the
1611 RHS.
1612 (c_parser_conditional_expression): Likewise, based on the range
1613 from the start of the cond.value to the end of exp2.value.
1614 (c_parser_binary_expression): Call set_c_expr_source_range on
1615 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1616 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1617 based on the cast_loc through to the end of the expr.
1618 (c_parser_unary_expression): Likewise, based on the
1619 op_loc through to the end of op.
1620 (c_parser_sizeof_expression) Likewise, based on the start of the
1621 sizeof token through to either the closing paren or the end of
1622 expr.
1623 (c_parser_postfix_expression): Likewise, using the token range,
1624 or from the open paren through to the close paren for
1625 parenthesized expressions.
1626 (c_parser_postfix_expression_after_primary): Likewise, for
1627 various kinds of expression.
1628 * c-tree.h (struct c_expr): Add field "src_range".
1629 (c_expr::get_start): New method.
1630 (c_expr::get_finish): New method.
1631 (set_c_expr_source_range): New decls.
1632 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1633 on ret for prefix unary ops.
1634 (parser_build_binary_op): Likewise, running from the start of
1635 arg1.value through to the end of arg2.value.
1636
ec8b536f
MP
16372015-11-13 Marek Polacek <polacek@redhat.com>
1638
1639 PR c/68320
1640 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1641
277fe616
DM
16422015-11-13 David Malcolm <dmalcolm@redhat.com>
1643
1644 * c-typeck.c: Include spellcheck.h.
1645 (lookup_field_fuzzy_find_candidates): New function.
1646 (lookup_field_fuzzy): New function.
1647 (build_component_ref): If the field was not found, try using
1648 lookup_field_fuzzy and potentially offer a suggestion.
1649
6e232ba4
JN
16502015-11-12 James Norris <jnorris@codesourcery.com>
1651 Joseph Myers <joseph@codesourcery.com>
1652
1653 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1654 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1655 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1656 and PRAGMA_OMP_CLAUSE_LINK.
1657 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1658 and PRAGMA_OACC_CLAUSE_LINK.
1659 (OACC_DECLARE_CLAUSE_MASK): New definition.
1660 (c_parser_oacc_declare): New function.
1661
9be4f715
MP
16622015-11-12 Marek Polacek <polacek@redhat.com>
1663
1664 PR c/67784
1665 * c-parser.c (c_parser_for_statement): Reclassify the token in
1666 a correct scope.
1667
e78bede6
MP
16682015-11-11 Marek Polacek <polacek@redhat.com>
1669
1670 PR c/68107
1671 PR c++/68266
1672 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1673 checking the size of an array.
1674
69f293c9
AM
16752015-11-11 Andrew MacLeod <amacleod@redhat.com>
1676
1677 * c-array-notation.c: Remove unused header files.
1678 * c-aux-info.c: Likewise.
1679 * c-convert.c: Likewise.
1680 * c-decl.c: Likewise.
1681 * c-errors.c: Likewise.
1682 * c-lang.c: Likewise.
1683 * c-objc-common.c: Likewise.
1684 * c-parser.c: Likewise.
1685 * c-typeck.c: Likewise.
1686 * gccspec.c: Likewise.
1687
3a40d81d
NS
16882015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1689 Cesar Philippidis <cesar@codesourcery.com>
1690 James Norris <jnorris@codesourcery.com>
1691 Julian Brown <julian@codesourcery.com>
1692 Nathan Sidwell <nathan@codesourcery.com>
1693
1694 c/
1695 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1696 routine arg.
1697 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1698 (c_parser_pragma): Parse 'acc routine'.
1699 (OACC_ROUTINE_CLAUSE_MARK): Define.
1700 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1701
fc402eec
AA
17022015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1703
1704 PR debug/67192
1705 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1706 location of the backward-goto to the start of the loop body.
1707
f6b0b3db
AA
17082015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1709
1710 PR debug/67192
1711 * c-parser.c (c_parser_while_statement): Finish the loop before
1712 parsing ahead for misleading indentation.
1713 (c_parser_for_statement): Likewise.
1714
ee45a32d
EB
17152015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1716
1717 * c-decl.c (finish_struct): If the structure has reverse storage
1718 order, rewrite the type of array fields with scalar component. Call
1719 maybe_apply_pragma_scalar_storage_order on entry.
1720 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1721 errors on bit-fields and reverse SSO here and not...
1722 (c_mark_addressable): ...here.
1723 (output_init_element): Adjust call to initializer_constant_valid_p.
1724 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1725
8a645150
DM
17262015-11-06 David Malcolm <dmalcolm@redhat.com>
1727
1728 * c-decl.c (warn_defaults_to): Update for change in signature
1729 of diagnostic_set_info.
1730 * c-errors.c (pedwarn_c99): Likewise.
1731 (pedwarn_c90): Likewise.
1732 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1733 for textinfo::set_location.
1734
7a5e4956
CP
17352015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1736 Thomas Schwinge <thomas@codesourcery.com>
1737 James Norris <jnorris@codesourcery.com>
1738
1739 * c-parser.c (c_parser_omp_clause_name): Add support for
1740 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1741 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1742 default(none) in OpenACC.
1743 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1744 arguments.
1745 (c_parser_oacc_clause_tile): New function.
1746 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1747 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1748 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1749 TILE}.
1750 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1751 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1752 FIRSTPRIVATE}.
1753 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1754 (c_parser_oacc_update): Update the error message for missing clauses.
1755 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1756 and OMP_CLAUSE_INDEPENDENT.
1757
bfcfbfa0
MP
17582015-11-05 Marek Polacek <polacek@redhat.com>
1759
1760 PR c/68090
1761 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1762 deal with pre-evaluation on invalid types.
1763
e01d41e5
JJ
17642015-11-05 Jakub Jelinek <jakub@redhat.com>
1765 Ilya Verbin <ilya.verbin@intel.com>
1766
1767 * c-parser.c: Include context.h and gimple-expr.h.
1768 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1769 monotonic together with nonmonotonic.
1770 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1771 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1772 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1773 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1774 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1775 expressions on combined target teams before the target.
1776 (c_parser_omp_declare_target): If decl has "omp declare target" or
1777 "omp declare target link" attribute, and cgraph or varpool node already
1778 exists, then set corresponding flags. Call c_finish_omp_clauses
1779 in the parenthesized extended-list syntax case.
1780 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1781 declare target.
1782 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1783 on OMP_CLAUSE_REDUCTION array sections.
1784 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1785 into the constant offset, or for variable low-bound using
1786 POINTER_PLUS_EXPR. For structure element based array sections use
1787 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1788 (c_finish_omp_clauses): Drop generic_field_head, structure
1789 elements are now always mapped even as array section bases,
1790 diagnose same var in data sharing and mapping clauses. Diagnose if
1791 linear step on declare simd is neither a constant nor a uniform
1792 parameter. Look through POINTER_PLUS_EXPR for array section
1793 reductions. Diagnose the same var or function appearing multiple
1794 times on the same directive. Fix up wording for the to clause if t
1795 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1796 modifier on kinds other than dynamic or guided or nonmonotonic
1797 modifier together with ordered clause.
1798
4bf9e5a8
TS
17992015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1800 Chung-Lin Tang <cltang@codesourcery.com>
1801
1802 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1803
2adfab87
AM
18042015-10-29 Andrew MacLeod <amacleod@redhat.com>
1805
1806 * c-array-notation.c: Reorder #include's and remove duplicates.
1807 * c-aux-info.c: Likewise.
1808 * c-convert.c: Likewise.
1809 * c-decl.c: Likewise.
1810 * c-errors.c: Likewise.
1811 * c-lang.c: Likewise.
1812 * c-objc-common.c: Likewise.
1813 * c-parser.c: Likewise.
1814 * c-typeck.c: Likewise.
1815
e922069e
JW
18162015-10-26 Jim Wilson <jim.wilson@linaro.org>
1817
1818 PR debug/66068
1819 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1820 after calling build_qualified_type.
1821
765dd391
CP
18222015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1823 Thomas Schwinge <thomas@codesourcery.com>
1824 James Norris <jnorris@codesourcery.com>
1825 Joseph Myers <joseph@codesourcery.com>
1826 Julian Brown <julian@codesourcery.com>
1827 Bernd Schmidt <bschmidt@redhat.com>
1828
1829 * c-parser.c (c_parser_oacc_shape_clause): New.
1830 (c_parser_oacc_simple_clause): New.
1831 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1832 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1833
88bae6f4
TS
18342015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1835 James Norris <jnorris@codesourcery.com>
1836 Cesar Philippidis <cesar@codesourcery.com>
1837
1838 PR c/64765
1839 PR c/64880
1840 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1841 parameters, and handle these. Adjust all users.
1842 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1843 into...
1844 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1845 all users.
1846 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1847 declare functions.
1848 (c_finish_omp_construct): Declare function.
1849 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1850 Merge functions into...
1851 (c_finish_omp_construct): ... this new function.
1852
a8fc2579
RB
18532015-10-22 Richard Biener <rguenther@suse.de>
1854
1855 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1856 before folding a MINUS_EXPR.
1857
e9122ef6
MP
18582015-10-21 Marek Polacek <polacek@redhat.com>
1859
1860 PR c/68024
1861 * c-decl.c (start_function): Warn about vararg functions without
1862 a prototype.
1863
9f47c7e5
IE
18642015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1865
1866 * c-typeck.c (build_conditional_expr): Use boolean vector
1867 type for vector comparison.
1868 (build_vec_cmp): New.
1869 (build_binary_op): Use build_vec_cmp for comparison.
1870
fa60eeb9
MP
18712015-10-20 Marek Polacek <polacek@redhat.com>
1872
1873 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1874
2c7020eb
MP
18752015-10-20 Marek Polacek <polacek@redhat.com>
1876
1877 PR c/67964
1878 * c-parser.c (c_parser_attributes): Break out of the loop if the
1879 token after an attribute isn't a comma.
1880
d9a6bd32
JJ
18812015-10-13 Jakub Jelinek <jakub@redhat.com>
1882 Aldy Hernandez <aldyh@redhat.com>
1883
1884 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1885 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1886 (c_parser_omp_variable_list): Handle structure elements for
1887 map, to and from clauses. Handle array sections in reduction
1888 clause. Formatting fixes.
1889 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1890 if clause modifiers.
1891 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1892 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1893 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1894 c_parser_omp_clause_is_device_ptr): New functions.
1895 (c_parser_omp_clause_ordered): Parse optional parameter.
1896 (c_parser_omp_clause_reduction): Handle array reductions.
1897 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1898 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1899 functions.
1900 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1901 (c_parser_omp_clause_depend_sink): New function.
1902 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1903 (c_parser_omp_clause_map): Parse release/delete map kinds and
1904 optional always modifier.
1905 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1906 and c_finish_omp_clauses callers.
1907 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1908 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1909 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1910 (OMP_CRITICAL_CLAUSE_MASK): Define.
1911 (c_parser_omp_critical): Parse critical clauses.
1912 (c_parser_omp_for_loop): Handle doacross loops, adjust
1913 c_finish_omp_for and c_finish_omp_clauses callers.
1914 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1915 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1916 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1917 (c_parser_omp_for): Disallow ordered clause when combined with
1918 distribute. Disallow linear clause when combined with distribute
1919 and not combined with simd.
1920 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1921 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1922 parse clauses and if depend clause is found, don't parse a body.
1923 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1924 Allow target parallel without for after it.
1925 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1926 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1927 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1928 invalid kinds.
1929 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1930 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1931 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1932 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1933 functions.
1934 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1935 defaultmap and is_device_ptr clauses.
1936 (c_parser_omp_target): Parse target parallel and target simd. Set
1937 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1938 and target exit data. Diagnose invalid map kinds.
1939 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1940 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1941 construct.
1942 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1943 &omp_priv.
1944 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1945 (c_parser_omp_taskloop): New function.
1946 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1947 handle PRAGMA_OMP_TASKLOOP.
1948 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1949 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1950 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1951 Add IS_OMP argument, handle structure element bases, diagnose
1952 bitfields, pass IS_OMP recursively, diagnose known zero length
1953 array sections in depend clauses, handle array sections in reduction
1954 clause, diagnose negative length even for pointers.
1955 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1956 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1957 array sections in reduction clause, set
1958 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1959 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1960 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1961 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1962
21ba0cea
MP
19632015-10-06 Marek Polacek <polacek@redhat.com>
1964
1965 * c-parser.c (c_parser_statement_after_labels): Use
1966 protected_set_expr_location.
1967 (c_parser_omp_clause_num_gangs): Likewise.
1968 (c_parser_omp_clause_num_threads): Likewise.
1969 (c_parser_omp_clause_num_workers): Likewise.
1970 (c_parser_omp_clause_vector_length): Likewise.
1971 (c_parser_omp_clause_num_teams): Likewise.
1972 (c_parser_omp_clause_thread_limit): Likewise.
1973 * c-typeck.c (build_c_cast): Likewise.
1974 (c_cast_expr): Likewise.
1975
624d31fe
RS
19762015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1977
1978 * c-typeck.c (c_tree_equal): Use real_equal instead of
1979 REAL_VALUES_EQUAL.
1980
b8fd7909
JM
19812015-10-04 Jason Merrill <jason@redhat.com>
1982
1983 * c-parser.c (c_lex_one_token): Handle @synchronized.
1984 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1985 can change whether the function is transaction_safe.
1986
1c7485af
MP
19872015-10-02 Marek Polacek <polacek@redhat.com>
1988
1989 PR c/67730
1990 * c-typeck.c (convert_for_assignment): Use the expansion point
1991 location throughout.
1992
3e3b8d63
MP
19932015-10-02 Marek Polacek <polacek@redhat.com>
1994
1995 PR c/64249
1996 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1997 and pass it down to c_parser_if_statement.
1998 (c_parser_else_body): Add CHAIN parameter and pass it down to
1999 c_parser_statement_after_labels.
2000 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2001 duplicated if-else-if conditions.
2002
aabef2de
MP
20032015-10-01 Marek Polacek <polacek@redhat.com>
2004
2005 * c-typeck.c (convert_for_assignment): Improve commentary.
2006
de8ddd5f
MP
20072015-09-30 Marek Polacek <polacek@redhat.com>
2008
2009 PR c/67730
2010 * c-typeck.c (c_finish_return): Use the expansion point location for
2011 certain "return with value" warnings.
2012
c4914de6
MLI
20132015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2014
2015 * c-parser.c (pragma_lex): Add loc argument.
2016
0e36f5c7
MP
20172015-09-15 Marek Polacek <polacek@redhat.com>
2018
2019 PR c/67580
2020 * c-decl.c (tag_exists_p): New function.
2021 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2022 struct/union/enum keywords are missing.
2023 * c-tree.h (tag_exists_p): Declare.
2024
2f3bb934
MP
20252015-09-15 Marek Polacek <polacek@redhat.com>
2026
2027 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2028 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2029 Return NULL_TREE instead of 0.
2030 (lookup_name): Return NULL_TREE instead of 0.
2031 (lookup_name_in_scope): Likewise.
2032 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2033 (parser_xref_tag): Use false instead of 0.
2034 (start_struct): Use true instead of 1.
2035 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2036
aa256c4a
MP
20372015-09-14 Marek Polacek <polacek@redhat.com>
2038
2039 * c-typeck.c (set_nonincremental_init_from_string): Use
2040 HOST_WIDE_INT_M1U when shifting a negative value.
2041
dbb68221
MW
20422015-09-09 Mark Wielaard <mjw@redhat.com>
2043
2044 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2045 parm against NULL.
2046
a8a098ac
JJ
20472015-09-10 Jakub Jelinek <jakub@redhat.com>
2048
2049 PR c/67502
2050 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2051 into OMP_FOR_PRE_BODY rather than before the loop.
2052
f4b189d5
JJ
20532015-09-09 Jakub Jelinek <jakub@redhat.com>
2054
0bb99c11
JJ
2055 PR c/67501
2056 * c-parser.c (c_parser_oacc_all_clauses,
2057 c_parser_omp_all_clauses): Remove invalid clause from
2058 list of clauses even if parser->error is set.
2059
fce5e5e3
JJ
2060 PR c/67500
2061 * c-parser.c (c_parser_omp_clause_aligned,
2062 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2063 test for errors.
2064 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2065 error_mark_node.
2066
f4b189d5
JJ
2067 PR c/67495
2068 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2069 instead of c_parser_unary_expression. If the result is !lvalue_p,
2070 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2071
b2aaf235
MP
20722015-09-04 Marek Polacek <polacek@redhat.com>
2073
2074 PR sanitizer/67279
2075 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2076
1807ffc1
MS
20772015-09-03 Martin Sebor <msebor@redhat.com>
2078
2079 PR c/66516
8b652e65
JJ
2080 * c-typeck.c (convert_arguments, parser_build_unary_op,
2081 build_conditional_expr, c_cast_expr, convert_for_assignment,
2082 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2083 reject_gcc_builtin.
2084 (c_decl_implicit): Define.
2085
d04ff417
MP
20862015-09-02 Marek Polacek <polacek@redhat.com>
2087
2088 PR c/67432
2089 * c-parser.c (c_parser_enum_specifier): Give a better error for
2090 an empty enum.
2091
a79683d5
TS
20922015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2093
2094 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2095
191a6b94
MP
20962015-08-12 Marek Polacek <polacek@redhat.com>
2097
2098 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2099 LOC to it.
2100
420a9d9b
MP
21012015-08-03 Marek Polacek <polacek@redhat.com>
2102
2103 PR c/67088
2104 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2105 Use it.
2106 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2107
992118a1
PP
21082015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2109
2110 * c-parser.c (c_parser_if_body): Take token_indent_info
2111 argument. Call warn_for_misleading_indentation even when the
2112 body is a semicolon. Extract token_indent_infos corresponding
2113 to the guard, body and next tokens. Adjust call to
2114 warn_for_misleading_indentation accordingly.
2115 (c_parser_else_body): Likewise.
2116 (c_parser_if_statement): Likewise.
2117 (c_parser_while_statement): Likewise.
2118 (c_parser_for_statement): Likewise.
2119
46308474
LFSM
21202015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2121 Manuel López-Ibáñez <manu@gcc.gnu.org>
2122
2123 * c-decl.c (get_parm_info): Remove static var. Update warning
2124 message.
2125
05b28fd6
MP
21262015-07-27 Marek Polacek <polacek@redhat.com>
2127
2128 PR c++/66555
2129 PR c/54979
2130 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2131
451b5e48
MP
21322015-07-20 Marek Polacek <polacek@redhat.com>
2133
2134 PR c++/55095
2135 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2136 (build_binary_op): Warn about left shift overflows.
2137
1916bcb5
AM
21382015-07-09 Andrew MacLeod <amacleod@redhat.com>
2139
2140 * c-array-notation.c: Adjust includes for flags.h changes.
2141 * c-objc-common.c: Likewise.
2142
c7131fb2
AM
21432015-07-07 Andrew MacLeod <amacleod@redhat.com>
2144
2145 * c-array-notation.c: Adjust includes.
2146 * c-aux-info.c: Likewise.
2147 * c-convert.c: Likewise.
2148 * c-decl.c: Likewise.
2149 * c-errors.c: Likewise.
2150 * c-lang.c: Likewise.
2151 * c-objc-common.c: Likewise.
2152 * c-parser.c: Likewise.
2153 * c-typeck.c: Likewise.
2154
da2e71c9
MLI
21552015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2156
2157 PR fortran/66605
2158 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2159
b155cfd9
MP
21602015-06-29 Marek Polacek <polacek@redhat.com>
2161
2162 PR c/66322
2163 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2164 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2165 about -Wswitch-bool here.
2166 (do_case): Update c_add_case_label call.
2167 (c_finish_case): Update c_do_switch_warnings call.
2168
31521951
MP
21692015-06-27 Marek Polacek <polacek@redhat.com>
2170
2171 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2172
22d03525
MP
21732015-06-26 Marek Polacek <polacek@redhat.com>
2174
2175 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2176 INDIRECT_REF_P.
2177 * c-typeck.c (array_to_pointer_conversion): Likewise.
2178 (build_unary_op): Likewise.
2179 (c_finish_return): Likewise.
2180
f0889939
AM
21812015-06-25 Andrew MacLeod <amacleod@redhat.com>
2182
2183 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2184 * c-parser.c: Likewise.
2185
8d67ee55
RS
21862015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2187
2188 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2189 instead of pointer_hash.
2190 (detect_field_duplicates): Likewise.
2191
0ae9bd27
MP
21922015-06-25 Marek Polacek <polacek@redhat.com>
2193
2194 * c-array-notation.c: Use VAR_P throughout.
2195 * c-decl.c: Likewise.
2196 * c-objc-common.c: Likewise.
2197 * c-parser.c: Likewise.
2198 * c-typeck.c: Likewise.
2199
62f9079a
MP
22002015-06-25 Marek Polacek <polacek@redhat.com>
2201
2202 * c-decl.c: Use is_global_var throughout.
2203 * c-parser.c: Likewise.
2204 * c-typeck.c: Likewise.
2205
abb226c9
AM
22062015-06-17 Andrew MacLeod <amacleod@redhat.com>
2207
2208 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2209 * c-aux-info.c: Likewise.
2210 * c-convert.c: Likewise.
2211 * c-decl.c: Likewise.
2212 * c-errors.c: Likewise.
2213 * c-lang.c: Likewise.
2214 * c-objc-common.c: Likewise.
2215 * c-parser.c: Likewise.
2216 * c-typeck.c: Likewise.
2217
8cbababc
JH
22182015-06-11 Jan Hubicka <hubicka@ucw.cz>
2219
2220 PR middle-end/66325
2221 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2222 variants.
2223
a0349665
PMR
22242015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2225
2226 * c-decl.c (pop_scope): Register the main translation unit
2227 through the new debug hook.
2228
13fdf2e2
AM
22292015-06-08 Andrew MacLeod <amacleod@redhat.com>
2230
2231 * c-array-notation.c : Adjust include files.
2232 * c-aux-info.c : Likewise.
2233 * c-convert.c : Likewise.
2234 * c-decl.c : Likewise.
2235 * c-errors.c : Likewise.
2236 * c-lang.c : Likewise.
2237 * c-lang.h : Likewise.
2238 * c-objc-common.c : Likewise.
2239 * c-parser.c : Likewise.
2240 * c-typeck.c : Likewise.
2241
d7438551
AH
22422015-06-05 Aldy Hernandez <aldyh@redhat.com>
2243
2244 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2245 immediately clobber it.
2246 (c_write_global_declarations_1): Remove call to
2247 check_global_declaration_1.
2248 (c_write_global_declarations_2): Remove.
2249 (c_write_final_cleanups): Rename from c_write_global_declarations.
2250 Remove call to finalize_compilation_unit.
2251 Remove calls to debugging hooks.
2252 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2253 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2254 * c-tree.h: Remove c_write_global_declarations.
2255
ecb9f223
AM
22562015-06-04 Andrew MacLeod <amacleod@redhat.com>
2257
2258 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2259 * c-aux-info.c: Likewise.
2260 * c-convert.c: Likewise.
2261 * c-decl.c: Likewise.
2262 * c-errors.c: Likewise.
2263 * c-lang.c: Likewise.
2264 * c-objc-common.c: Likewise.
2265 * c-parser.c: Likewise.
2266 * c-typeck.c: Likewise.
2267
9482b620
MP
22682015-06-04 Marek Polacek <polacek@redhat.com>
2269
2270 PR c/66341
2271 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2272 it is a lvalue.
2273
bc51ace3
PK
22742015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2275
2276 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2277 Warn for empty struct.
2278 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2279
ea5b45b6
AT
22802015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2281
2282 * c-decl.c (start_function): Call plugin before parsing.
2283 (finish_function): Call plugin after parsing.
2284
c2d47482
PK
22852015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2286
2287 PR c/49551
2288 * c-decl.c (merge_decls): Merge DECL_COMMON.
2289
a95492ab
JW
22902015-05-22 Jim Wilson <jim.wilson@linaro.org>
2291
2292 * Make-lang.in (check_gcc_pallelize): Define.
2293
fd5c817a
MP
22942015-05-22 Marek Polacek <polacek@redhat.com>
2295
2296 PR c/47043
2297 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2298 attributes.
2299
c7b70a3c
MP
23002015-05-21 Marek Polacek <polacek@redhat.com>
2301
2302 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2303 DECL_BUILT_IN.
2304
21b634ae
MP
23052015-05-20 Marek Polacek <polacek@redhat.com>
2306
2307 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2308 * c-typeck.c: Likewise.
2309
296a8c2f
MP
23102015-05-19 Marek Polacek <polacek@redhat.com>
2311
2312 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2313
41b37d5e
JJ
23142015-05-19 Jakub Jelinek <jakub@redhat.com>
2315
2316 PR middle-end/66199
2317 * c-parser.c (c_parser_omp_for_loop): Don't add
2318 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2319 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2320 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2321 constructs.
2322
fab27f52
MM
23232015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2324
2325 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2326 swaps.
fab27f52 2327
40de31cf
MLI
23282015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2329
2330 PR fortran/44054
2331 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2332 accessor function.
2333
3aa3c9fc
MP
23342015-05-14 Marek Polacek <polacek@redhat.com>
2335
2336 PR c/66066
2337 PR c/66127
2338 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2339 rather than with 0.
2340
c3388e62
DM
23412015-05-12 David Malcolm <dmalcolm@redhat.com>
2342
2343 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2344 to add a call to warn_for_misleading_indentation.
2345 (c_parser_else_body): Likewise, adding param "else_loc".
2346 (c_parser_if_statement): Check for misleading indentation.
2347 (c_parser_while_statement): Likewise.
2348 (c_parser_for_statement): Likewise.
2349
755e528f
MP
23502015-05-08 Marek Polacek <polacek@redhat.com>
2351
2352 PR c/64918
2353 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2354 (output_init_element): Likewise.
2355
0173bd2a
MP
23562015-05-07 Marek Polacek <polacek@redhat.com>
2357
2358 PR c/65179
2359 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2360 value.
2361
9babc352
MP
23622015-04-30 Marek Polacek <polacek@redhat.com>
2363
2364 * c-typeck.c (set_init_label): Call error_at instead of error and
2365 pass LOC to it.
2366
ac9f18db
MP
2367 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2368 the type of a decl.
2369
ec3fba51
MP
2370 * c-typeck.c (c_build_va_arg): Clarify the error message.
2371
b811915d
TS
23722015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2373
2374 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2375 OMP_STANDALONE_CLAUSES.
2376
f3075008
MP
23772015-04-28 Marek Polacek <polacek@redhat.com>
2378
2379 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2380
4e81b788
MP
23812015-04-28 Marek Polacek <polacek@redhat.com>
2382
2383 PR c/65901
2384 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2385
6c1db78e
MP
23862015-04-25 Marek Polacek <polacek@redhat.com>
2387
2388 PR c/52085
2389 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2390 attribute.
2391
5c4abbb8
MP
23922015-04-23 Marek Polacek <polacek@redhat.com>
2393
2394 PR c/65345
2395 * c-decl.c (set_labels_context_r): New function.
2396 (store_parm_decls): Call it via walk_tree_without_duplicates.
2397 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2398 instead of create_tmp_var. Build TARGET_EXPR instead of
2399 COMPOUND_EXPR.
2400 (build_atomic_assign): Use create_tmp_var_raw instead of
2401 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2402
06aca1d5
IV
24032015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2404
2405 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2406 (c_parser_omp_target_update): Add missed %> to error_at ().
2407
8fba1830
BRF
24082015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2409
2410 PR target/55143
2411 * c-decl.c (c_default_pointer_mode): Remove definition.
2412 * c-tree.h (c_default_pointer_mode): Remove declaration.
2413
62021f64
TB
24142015-03-27 Tobias Burnus <burnus@net-b.de>
2415
2416 PR c/65586
2417 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2418 error out.
2419 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2420 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2421 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2422
9b65e171
JJ
24232015-03-19 Jakub Jelinek <jakub@redhat.com>
2424
2425 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2426 attribute for DECL_EXTERNAL VAR_DECLs.
2427
17958621
JJ
24282015-03-11 Jakub Jelinek <jakub@redhat.com>
2429
2430 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2431 argument.
2432
7ccb1a11
JJ
24332015-03-10 Jakub Jelinek <jakub@redhat.com>
2434
2435 PR c/65120
2436 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2437 before preparing arguments to warn_logical_not_parentheses.
2438
01177669
JJ
24392015-03-09 Jakub Jelinek <jakub@redhat.com>
2440
2441 PR c/65120
2442 * c-typeck.c (parser_build_binary_op): Don't warn for
2443 !!x == y or !b == y where b is _Bool.
2444
802ac282
MP
24452015-03-09 Marek Polacek <polacek@redhat.com>
2446
2447 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2448 * c-decl.c (grokdeclarator): Likewise.
2449 * c-typeck.c (build_binary_op): Likewise.
2450
e5165b60
MP
24512015-02-27 Marek Polacek <polacek@redhat.com>
2452
2453 PR c/65228
2454 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2455
065d214c
MP
24562015-02-14 Marek Polacek <polacek@redhat.com>
2457
2458 PR c/64768
2459 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2460 declared through a typedef name.
2461
e5d9235b
MP
24622015-02-13 Marek Polacek <polacek@redhat.com>
2463
2464 PR c/65050
2465 * c-decl.c (grokdeclarator): Print also the type when giving
2466 the error message about array's incomplete element type.
2467
fa01ffcc
JJ
24682015-02-11 Jakub Jelinek <jakub@redhat.com>
2469
2470 PR c/64824
2471 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2472 check in the POP macro.
2473
c3e38a03
MP
24742015-02-09 Marek Polacek <polacek@redhat.com>
2475
2476 PR c/64856
2477 * c-typeck.c (process_init_element): Don't always wrap
2478 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2479 initializing a range of elements.
2480
4886ec8e
JJ
24812015-02-04 Jakub Jelinek <jakub@redhat.com>
2482
2483 PR c/64824
2484 PR c/64868
2485 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2486
c3e38a03 24872015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2488
2489 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2490 processing enum declaration.
2491
7b33f0c8
MP
24922015-01-29 Marek Polacek <polacek@redhat.com>
2493
2494 PR c/64709
2495 * c-typeck.c (pop_init_level): If constructor_elements has
2496 exactly one element with integer_zerop value, set constructor_zeroinit
2497 to 1. Remove braces around warning_init call.
2498
dea63e49
JJ
24992015-01-27 Jakub Jelinek <jakub@redhat.com>
2500
2501 PR c/64766
2502 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2503 of FUNCTION_DECLs with error_mark_node.
2504
d38f7dce
JJ
25052015-01-26 Jakub Jelinek <jakub@redhat.com>
2506
2507 PR c/64778
2508 * c-typeck.c (convert_arguments): Return -1 if there are
2509 error_args, even if we've diagnosed too many arguments.
2510
cbf5d0e7
RB
25112015-01-21 Richard Biener <rguenther@suse.de>
2512
2513 PR middle-end/64313
2514 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2515 for builtins the user declared correctly.
2516
41dbbb37
TS
25172015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2518 Bernd Schmidt <bernds@codesourcery.com>
2519 Cesar Philippidis <cesar@codesourcery.com>
2520 James Norris <jnorris@codesourcery.com>
2521 Jakub Jelinek <jakub@redhat.com>
2522 Ilmir Usmanov <i.usmanov@samsung.com>
2523
2524 * c-parser.c: Include "gomp-constants.h".
2525 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2526 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2527 Use OMP_CLAUSE_SET_MAP_KIND.
2528 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2529 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2530 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2531 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2532 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2533 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2534 "copyout", "create", "delete", "deviceptr", "gang", "host",
2535 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2536 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2537 "present_or_create", "pcreate", "seq", "self", "vector",
2538 "vector_length", "wait", "worker".
2539 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2540 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2541 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2542 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2543 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2544 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2545 (c_parser_oacc_data_clause_deviceptr)
2546 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2547 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2548 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2549 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2550 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2551 (c_parser_oacc_parallel, c_parser_oacc_update)
2552 (c_parser_oacc_wait): New functions.
2553 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2554 (c_finish_oacc_data): New prototypes.
2555 * c-typeck.c: Include "gomp-constants.h".
2556 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2557 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2558 OMP_CLAUSE_SET_MAP_KIND.
2559 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2560 (c_finish_oacc_data): New functions.
2561 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2562 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2563 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2564 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2565 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2566 GOMP_MAP_FORCE_DEVICEPTR.
2567
adfac8df
JJ
25682015-01-09 Michael Collison <michael.collison@linaro.org>
2569
2570 * c-array-notation.c: Include hash-set.h, machmode.h,
2571 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2572 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2573 * c-aux-info.c: Ditto.
2574 * c-convert.c: Ditto.
2575 * c-decl.c: Ditto.
2576 * c-errors.c: Ditto.
2577 * c-lang.c: Dittoxs.
2578 * c-objc-common.c: Ditto.
2579 * c-parser.c: Ditto.
2580 * c-typeck.c: Include hash-set.h, machmode.h,
2581 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2582 fold-const.h, wide-int.h, inchash.h, real.h and
2583 fixed-value.h due to flattening of tree.h.
2584
2cc901dc
MP
25852015-01-07 Marek Polacek <polacek@redhat.com>
2586
2587 PR c/64417
2588 * c-typeck.c (process_init_element): Disallow initialization of
2589 a flexible array member with a string constant if the structure
2590 is in an array.
2591
5624e564
JJ
25922015-01-05 Jakub Jelinek <jakub@redhat.com>
2593
e5341100
JJ
2594 PR sanitizer/64344
2595 * c-typeck.c (convert_for_assignment, c_finish_return): For
2596 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2597 types also set in_late_binary_op around convert call.
2598 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2599 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2600 result on expr as last argument to ubsan_instrument_float_cast,
2601 if in_late_binary_op, don't use c_save_expr but save_expr.
2602
5624e564
JJ
2603 Update copyright years.
2604
5bd012f8
MP
26052015-01-05 Marek Polacek <polacek@redhat.com>
2606
2607 PR c/64423
2608 * c-typeck.c (build_array_ref): Pass loc down to
2609 warn_array_subscript_with_type_char.
2610
3f8257db 26112014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2612
2613 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2614 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2615 element type.
8e745a17 2616 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2617 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2618 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2619 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2620 to PEDWARN_FOR_QUALIFIERS.
768952be 2621
8f94a8c4
JJ
26222014-12-17 Jakub Jelinek <jakub@redhat.com>
2623
2624 PR sanitizer/64289
2625 * c-convert.c: Include ubsan.h.
2626 (convert): For real -> integral casts and
2627 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2628 instead instrument the float cast directly.
2629
b731b390
JJ
26302014-11-29 Jakub Jelinek <jakub@redhat.com>
2631
2632 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2633 c_finish_stmt_expr): Remove NULL last argument from
2634 create_tmp_var_raw and create_tmp_var calls.
2635 * c-array-notation.c (fix_builtin_array_notation_fn,
2636 build_array_notation_expr, fix_conditional_array_notations_1,
2637 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2638
541e35a6
MP
26392014-11-28 Marek Polacek <polacek@redhat.com>
2640
2641 PR c/63862
2642 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2643 convert the right operand to integer type.
2644
b286be94
MP
26452014-11-25 Marek Polacek <polacek@redhat.com>
2646
2647 PR c/63877
2648 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2649 for inline functions.
2650
aa7da51a
JJ
26512014-11-21 Jakub Jelinek <jakub@redhat.com>
2652
2653 PR target/63764
2654 * c-typeck.c (build_array_ref): Adjust
2655 convert_vector_to_pointer_for_subscript caller. If it returns true,
2656 call non_lvalue_loc on the result.
2657
d876207f
RB
26582014-11-11 Richard Biener <rguenther@suse.de>
2659
2660 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2661 to true.
2662
e5e44252
AK
26632014-11-10 Andi Kleen <ak@linux.intel.com>
2664
2665 PR c/60804
2666 * c-parser.c (c_parser_statement_after_labels): Call
2667 check_no_cilk.
2668 (c_parser_if_statement): Dito.
2669 (c_parser_switch_statement): Dito.
2670 (c_parser_while_statement): Dito.
2671 (c_parser_do_statement): Dito.
2672 (c_parser_for_statement): Dito.
2673 * c-typeck.c (c_finish_loop): Dito.
2674
13c21655
PC
26752014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2676
2677 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2678 OPT_Wshift_count_overflow in the warnings.
2679
2d51fcef
MP
26802014-10-30 Marek Polacek <polacek@redhat.com>
2681
2682 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2683 print the stripped version as well, if they're not the same.
2684
ef4bddc2
RS
26852014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2686
2687 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2688 machine_mode.
2689
c582198b
AM
26902014-10-28 Andrew MacLeod <amacleod@redhat.com>
2691
2692 * c-decl.c: Adjust include files.
2693 * c-parser.c: Ditto.
2694
ddc8de03
PM
26952014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2696 Tom Tromey <tromey@redhat.com>
2697
2698 * c-tree.h (enum c_oracle_request): New.
2699 (c_binding_oracle_function): New typedef.
2700 (c_binding_oracle, c_pushtag, c_bind): Declare.
2701 * c-decl.c (c_binding_oracle): New global.
2702 (I_SYMBOL_CHECKED): New macro.
2703 (i_symbol_binding): New function.
2704 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2705 (I_TAG_CHECKED): New macro.
2706 (i_tag_binding): New function.
2707 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2708 (I_LABEL_CHECKED): New macro.
2709 (i_label_binding): New function.
2710 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2711 (c_print_identifier): Save and restore c_binding_oracle.
2712 (c_pushtag, c_bind): New functions.
2713
60393bbc
AM
27142014-10-27 Andrew MacLeod <amacleod@redhat.com>
2715
2716 * c-typeck.c: Adjust include files.
2717
d723bb7c
MLI
27182014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2719
2720 PR c++/53061
2721 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2722 initialization here...
2723 (c_initialize_diagnostics): ... but here. Set defaults after
2724 building pretty-printer.
2725
1bc5a451
MP
27262014-10-23 Marek Polacek <polacek@redhat.com>
2727
2728 PR c/63626
2729 * c-decl.c (pop_scope): Don't print warning in external_scope.
2730
4435bb92
MP
27312014-10-19 Marek Polacek <polacek@redhat.com>
2732
2733 PR c/63567
2734 * c-typeck.c (output_init_element): Allow initializing objects with
2735 static storage duration with compound literals even in C99 and add
2736 pedwarn for it.
2737
7278465e
MP
27382014-10-17 Marek Polacek <polacek@redhat.com>
2739
2740 PR c/63567
2741 * c-typeck.c (digest_init): Allow initializing objects with static
2742 storage duration with compound literals even in C99 and add pedwarn
2743 for it.
2744
d9b7be2e
MP
27452014-10-17 Marek Polacek <polacek@redhat.com>
2746
2747 PR c/63543
2748 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2749 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2750 error multiple times. Print the type.
2751
f406ae1f
MP
27522014-10-17 Marek Polacek <polacek@redhat.com>
2753
2754 PR c/63549
2755 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2756 type.
2757
92574c7c
MP
27582014-10-17 Marek Polacek <polacek@redhat.com>
2759
2760 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2761 (start_function): Use OPT_Wimplicit_int instead of 0.
2762 (store_parm_decls_oldstyle): Likewise.
2763
1bc4a978
MT
27642014-10-17 Alan Modra <amodra@gmail.com>
2765
2766 PR middle-end/61848
2767 * c-decl.c (merge_decls): Don't merge section name or tls model
2768 to newdecl symtab node, instead merge to olddecl. Override
2769 existing olddecl section name. Set tls_model for all thread-local
2770 vars, not just OMP thread-private ones. Remove incorrect comment.
2771
83685514
AM
27722014-10-16 Andrew MacLeod <amacleod@redhat.com>
2773
2774 * c-decl.c: Adjust include files.
2775
78a7c317
DD
27762014-10-14 DJ Delorie <dj@redhat.com>
2777
2778 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2779 (c_token_starts_typename): Check all __intN, not just __int128.
2780 (c_token_starts_declspecs): Likewise.
2781 (c_parser_declspecs): Likewise.
2782 (c_parser_attribute_any_word): Likewise.
2783 (c_parser_objc_selector): Likewise.
2784 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2785 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2786 is specified.
2787 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2788 __int128.
2789 (finish_declspecs): Likewise.
2790
74d98c1e
AB
27912014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2792
8e745a17 2793 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 2794 the duplicate code.
8e745a17 2795 (c_parser_statement): Call the new function.
74d98c1e 2796
84937de2
MP
27972014-10-09 Marek Polacek <polacek@redhat.com>
2798
2799 PR c/63480
2800 * c-typeck.c (pop_init_level): Don't warn about initializing
2801 with { }.
2802
0382aaa0
MP
28032014-10-07 Marek Polacek <polacek@redhat.com>
2804
2805 PR c/59717
2806 * c-decl.c (header_for_builtin_fn): New function.
2807 (implicitly_declare): Suggest which header to include.
2808
7a0ca710
MP
28092014-10-07 Marek Polacek <polacek@redhat.com>
2810
2811 * c-convert.c (convert): Use error_operand_p.
2812 * c-typeck.c (require_complete_type): Likewise.
2813 (really_atomic_lvalue): Likewise.
2814 (digest_init): Likewise.
2815 (handle_omp_array_sections_1): Likewise.
2816
6bc8a126
MP
28172014-10-03 Marek Polacek <polacek@redhat.com>
2818
2819 PR c/63453
2820 * c-decl.c (pop_scope): Don't warn about "inline function declared
2821 but never defined" for functions marked with gnu_inline attribute.
2822
d90c0a59
JJ
28232014-09-25 Jakub Jelinek <jakub@redhat.com>
2824
2825 PR c++/63249
2826 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2827 on low_bound and length.
2828
083e891e
MP
28292014-09-24 Marek Polacek <polacek@redhat.com>
2830
2831 PR c/61405
2832 PR c/53874
2833 * c-parser.c: Don't define CPP_KEYWORD.
2834 (c_parser_switch_statement): Pass original type to c_finish_case.
2835 * c-tree.h (c_finish_case): Update declaration.
2836 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2837 conditionally to c_do_switch_warnings.
2838
8d95fe25
MP
28392014-09-03 Marek Polacek <polacek@redhat.com>
2840
2841 PR c/62024
2842 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2843 conversions.
2844
9a771876
JJ
28452014-09-02 Jakub Jelinek <jakub@redhat.com>
2846 Balaji V. Iyer <balaji.v.iyer@intel.com>
2847 Igor Zamyatin <igor.zamyatin@intel.com>
2848
2849 * c-parser.c (c_parser_cilk_for): New function.
2850 (c_parser_cilk_grainsize): Likewise.
2851 (c_get_temp_regvar): Likewise.
2852 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2853 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2854 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2855 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2856 case.
2857
b7679d96
CG
28582014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2859
2860 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2861 with using HOST_WIDE_INT without truncation to 'int'
2862
59ea0364
MP
28632014-08-22 Marek Polacek <polacek@redhat.com>
2864
2865 PR c++/62199
2866 * c-typeck.c (parser_build_binary_op): Adjust call to
2867 warn_logical_not_parentheses.
2868
671a475e
IZ
28692014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2870
2871 PR other/62008
2872 * c-parser.c (c_parser_array_notation): Check for correct
2873 type of an array added.
2874
04159acf
MP
28752014-08-19 Marek Polacek <polacek@redhat.com>
2876
2877 PR c++/62153
2878 * c-typeck.c (build_binary_op): If either operand of a comparison
2879 is a boolean expression, call maybe_warn_bool_compare.
2880
c77935ee
PP
28812014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2882
2883 PR c/45584
2884 * c-typeck.c (build_c_cast): Do a conversion even when the
2885 TYPE_MAIN_VARIANTs are the same.
2886
35aff4fb
MP
28872014-08-19 Marek Polacek <polacek@redhat.com>
2888
2889 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2890 pedwarn_c99 instead of pedwarn.
2891 (grokfield): Likewise.
2892 (warn_defaults_to): New function.
2893 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2894 Unconditionally call pedwarn_c99 instead of pedwarn.
2895 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2896 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2897 check flag_isoc11 before.
2898 * c-errors.c (pedwarn_c99): Change the return type to bool.
2899 Handle -Wc99-c11-compat.
2900 * c-parser.c (disable_extension_diagnostics): Handle
2901 warn_c99_c11_compat.
2902 (restore_extension_diagnostics): Likewise.
2903 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2904 instead of pedwarn, don't check flag_isoc11 before.
2905 (c_parser_declspecs): Likewise.
2906 (c_parser_alignas_specifier): Likewise.
2907 (c_parser_alignof_expression): Likewise.
2908 (c_parser_generic_selection): Likewise.
2909 * c-tree.h (pedwarn_c99): Update declaration.
2910 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2911 of pedwarn_c99.
2912
177cce46
MP
29132014-08-19 Marek Polacek <polacek@redhat.com>
2914
2915 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2916 to pedwarn_c90.
2917 * c-errors.c: Include "opts.h".
2918 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2919 * c-parser.c (disable_extension_diagnostics): Handle negative value
2920 of warn_c90_c99_compat, too.
2921 (restore_extension_diagnostics): Likewise.
2922 (c_parser_compound_statement_nostart): Pass
2923 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2924
6dc99c33
MP
29252014-08-12 Marek Polacek <polacek@redhat.com>
2926
2927 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2928 Add pedwarn.
2929 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2930 Likewise.
2931 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2932
3f8257db 29332014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
2934
2935 PR c/51849
2936 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2937 Call pedwarn_c90 instead of pedwarn.
2938 (check_bitfield_type_and_width): Likewise.
2939 (declspecs_add_qual): Likewise.
2940 (declspecs_add_type): Likewise.
2941 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2942 Adjust to only call pedwarn_c90.
2943 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2944 pedwarn_c90 instead of pedwarn.
2945 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2946 * c-parser.c (disable_extension_diagnostics): Handle
2947 warn_c90_c99_compat.
2948 (restore_extension_diagnostics): Likewise.
2949 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2950 pedwarn_c90 instead of pedwarn.
2951 (c_parser_initelt): Likewise.
2952 (c_parser_postfix_expression): Likewise.
2953 (c_parser_postfix_expression_after_paren_type): Likewise.
2954 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2955 * c-tree.h: Fix formatting.
2956 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2957 pedwarn_c90 instead of pedwarn.
2958
9f25a338
TS
29592014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2960
2961 * c-typeck.c: Remove include of pointer-set.h.
2962
044331a8
MP
29632014-08-07 Marek Polacek <polacek@redhat.com>
2964
2965 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2966
b787e7a2
TS
29672014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2968
2969 * c-typeck.c: Use hash_map instead of pointer_map.
2970
6e2830c3
TS
29712014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2972
2973 * c-decl.c: Use hash_set instead of pointer_set.
2974
a7ee52fb
IZ
29752014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2976
2977 PR middle-end/61455
2978 * c-array-notation.c (expand_array_notations): Handling
2979 of DECL_EXPR added.
2980
b4dfdc11
MG
29812014-07-31 Marc Glisse <marc.glisse@inria.fr>
2982
2983 PR c++/60517
2984 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2985 a local variable.
2986
976d5a22
TT
29872014-07-30 Tom Tromey <tromey@redhat.com>
2988
2989 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2990 field.
2991 (really_start_incremental_init, push_init_level): Initialize
2992 designator_depth.
2993 (pop_init_level): Set global designator_depth.
2994 (process_init_element): Check for designated_init attribute.
2995
30281de2
MP
29962014-07-20 Marek Polacek <polacek@redhat.com>
2997
2998 PR c/61852
2999 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3000 (implicitly_declare): Pass location to implicit_decl_warning.
3001
b108f48f
JJ
30022014-07-14 Jakub Jelinek <jakub@redhat.com>
3003
3004 PR middle-end/61294
3005 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3006 If non-NULL, call c_parser_check_literal_zero.
3007 (c_parser_check_literal_zero): New function.
3008 (c_parser_postfix_expression_after_primary): Adjust
3009 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3010
773ec47f
MP
30112014-07-06 Marek Polacek <polacek@redhat.com>
3012
3013 PR c/6940
3014 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3015 * c-tree.h (C_ARRAY_PARAMETER): Define.
3016 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3017 function parameter.
3018
22e1cf1c 30192014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3020 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3021
3022 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3023 releasing symbol.
3024
52ec0ea3
MP
30252014-07-01 Marek Polacek <polacek@redhat.com>
3026
3027 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3028 instead of 0 to WARN_FOR_ASSIGNMENT.
3029
d5c3d343
MP
30302014-07-01 Marek Polacek <polacek@redhat.com>
3031
3032 PR c/58286
3033 * c-typeck.c (convert_for_assignment): Pass
3034 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3035
6a7253a4
MP
30362014-06-30 Marek Polacek <polacek@redhat.com>
3037
3038 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3039 has no_sanitize_undefined attribute.
3040
5e88a8f4
IZ
30412014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3042
3043 PR middle-end/57541
3044 * c-array-notation.c (fix_builtin_array_notation_fn):
3045 Check for 0 arguments in builtin call. Check that bultin argument is
3046 correct.
3047 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3048 index.
3049
9698b078
SH
30502014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3051
3052 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3053 qualifiers in __auto_type for atomic types.
3054 (c_parser_typeof_specifier): Discard all type qualifiers in
3055 __typeof__ for atomic types.
3056
6e07c515
MP
30572014-06-25 Marek Polacek <polacek@redhat.com>
3058
3059 PR c/61162
3060 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3061 the return expression to c_finish_return.
3062
da6f124d
JJ
30632014-06-25 Jakub Jelinek <jakub@redhat.com>
3064
3065 * c-typeck.c (c_finish_omp_clauses): Make sure
3066 OMP_CLAUSE_LINEAR_STEP has correct type.
3067
c203e8a7
TS
30682014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3069
3070 * c-decl.c: Adjust.
3071
56ad0e38
JJ
30722014-06-24 Jakub Jelinek <jakub@redhat.com>
3073
3074 * c-parser.c (c_parser_omp_for_loop): For
3075 #pragma omp parallel for simd move lastprivate clause from parallel
3076 to for rather than simd.
3077
47c2554f
MP
30782014-06-23 Marek Polacek <polacek@redhat.com>
3079
3080 * c-typeck.c (parser_build_binary_op): Don't call
3081 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3082
56363ffd
JH
30832014-06-15 Jan Hubicka <hubicka@ucw.cz>
3084
3085 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3086 * c-decl.c (merge_decls): Likewise.
3087
d7ff7ae5
MP
30882014-06-09 Marek Polacek <polacek@redhat.com>
3089
3090 PR c/36446
3091 * c-typeck.c (error_init): Call inform instead of error_at.
3092 (pedwarn_init): Call inform instead of pedwarn.
3093 (warning_init): Call inform instead of warning_at.
3094
24d047a3
JH
30952014-06-07 Jan Hubicka <hubicka@ucw.cz>
3096
3097 * c-decl.c (merge_decls): Use set_decl_section_name.
3098 (duplicate_decls): Remove node if it exists.
3099
9bac5cbb
G
31002014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3101
3102 PR c/53119
3103 * c-typeck.c (push_init_level, process_init_element,
3104 pop_init_level): Correct check for zero initialization, move
3105 missing brace warning to respect zero initialization.
3106
8ffcdea8
MP
31072014-06-05 Marek Polacek <polacek@redhat.com>
3108
3109 PR c/56724
3110 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3111
742938c9
MP
31122014-06-05 Marek Polacek <polacek@redhat.com>
3113
3114 PR c/49706
3115 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3116 on the left hand side operand of a comparison.
3117
6447c55d
MP
31182014-06-05 Marek Polacek <polacek@redhat.com>
3119
3120 PR c/48062
3121 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3122 Print note only if the warning was printed.
3123
9dc7743c
IZ
31242014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3125
3126 PR c/58942
3127 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3128 with a pointer.
3129
fedfecef
MP
31302014-06-03 Marek Polacek <polacek@redhat.com>
3131
3132 PR c/60439
3133 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3134 c_start_case.
3135 * c-tree.h (c_start_case): Update.
3136 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3137 switch condition has boolean value.
3138
9b2b7279
AM
31392014-06-02 Andrew MacLeod <amacleod@redhat.com>
3140
3141 * c-decl.c: Include builtins.h.
3142 * c-parser.c: Likewise.
3143
5c1bc275
MP
31442014-05-27 Marek Polacek <polacek@redhat.com>
3145
3146 PR c/56724
3147 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3148 error and warning calls to error_at and warning_at. Pass location of
3149 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3150 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3151 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3152
97563bc8
IZ
31532014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3154
3155 PR c/61191
3156 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3157 function parameters.
3158
aede2c10
JH
31592014-05-23 Jan Hubicka <hubicka@ucw.cz>
3160
3161 * c-decl.c (merge_decls): Preserve symtab node pointers.
3162 (duplicate_decls): Free new decl.
3163
edbba2ce
TS
31642014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3165
f3316c6d
TS
3166 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3167 initialization.
3168
edbba2ce
TS
3169 * c-parser.c (c_parser_omp_target): Return bool values.
3170
68c81f24
TS
31712014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3172
3173 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3174 num_teams_loc variable to num_thread_limit_loc.
3175
632f2871
RS
31762014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3177
3178 * c-array-notation.c (expand_array_notations): Use void_node
3179 instead of void_zero_node.
3180
766090c2
TS
31812014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3182
3183 * c-decl.c (finish_struct): Adjust.
3184 (finish_enum): Likewise.
3185 (bind): Adjust.
3186 (record_inline_static): Likewise.
3187 (push_scope): Likewise.
3188 (make_label): Likewise.
3189 (lookup_label_for_goto): Likewise.
3190 (finish_struct): Likewise.
3191 (finish_enum): Likewise.
3192 (store_parm_decls): Likewise.
3193 (c_push_function_context): Likewise.
3194 * c-lang.h: Remove usage of variable_size gty attribute.
3195 * c-parser.c (c_parse_init): Adjust.
3196 (c_parse_file): Likewise.
3197
2b107f6b
MP
31982014-05-13 Marek Polacek <polacek@redhat.com>
3199
3200 PR c/61162
3201 * c-typeck.c (convert_for_assignment): Pass location to
3202 WARN_FOR_ASSIGNMENT instead of input_location.
3203
d033409e
MP
32042014-05-10 Marek Polacek <polacek@redhat.com>
3205
3206 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3207 maybe_warn_string_init.
3208 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3209 maybe_warn_string_init.
3210 * c-tree.h (maybe_warn_string_init): Update declaration.
3211 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3212 Call pedwarn_init with loc instead of with input_location.
3213 (digest_init): Pass init_loc to maybe_warn_string_init.
3214 (pop_init_level): Call pedwarn_init with loc instead of with
3215 input_location.
3216 (set_init_index): Likewise.
3217 (process_init_element): Likewise.
3218
ea58ef42
MP
32192014-05-09 Marek Polacek <polacek@redhat.com>
3220
3221 PR c/61096
3222 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3223 (c_parser_initelt): Pass location to set_init_label. Pass array index
3224 location to set_init_index.
3225 * c-tree.h (push_init_level): Update declaration.
3226 (pop_init_level): Likewise.
3227 (set_init_index): Likewise.
3228 (set_init_label): Likewise.
3229 * c-typeck.c (error_init): Add location parameter. Call error_at
3230 instead of error.
3231 (digest_init): Pass init_loc to error_init.
3232 (really_start_incremental_init):
3233 (push_init_level): Add location parameter. Pass loc to pop_init_level
3234 and error_init.
3235 (pop_init_level): Likewise.
3236 (set_designator): Add location parameter. Pass loc to pop_init_level,
3237 push_init_level, and error_init.
3238 (set_init_index): Add location parameter. Pass loc to error_init and
3239 set_designator.
3240 (set_init_label): Likewise.
3241 (output_init_element): Pass loc to error_init.
3242 (process_init_element): Pass loc to error_init, pop_init_level,
3243 pedwarn_init, and push_init_level.
3244
661a0813
MP
32452014-05-09 Marek Polacek <polacek@redhat.com>
3246
3247 PR c/50459
3248 * c-parser.c (c_parser_attributes): Parse the arguments as an
3249 expression-list if the attribute takes identifier.
3250
2793eeab
MP
32512014-05-08 Marek Polacek <polacek@redhat.com>
3252
3253 PR c/61053
3254 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3255 TYPE_ALIGN_UNIT.
3256
f827930a
MP
32572014-05-08 Marek Polacek <polacek@redhat.com>
3258
3259 PR c/61077
3260 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3261 of main.
3262
1d60af08
KZ
32632014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3264 Mike Stump <mikestump@comcast.net>
3265 Richard Sandiford <rdsandiford@googlemail.com>
3266
3267 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3268 (finish_enum): Use wide-int interfaces.
3269 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3270 * c-typeck.c (build_c_cast): Likewise.
3271 (set_nonincremental_init_from_string): Likewise.
3272 (c_tree_equal): Likewise.
3273
a0e24419
MP
32742014-05-02 Marek Polacek <polacek@redhat.com>
3275
3276 PR c/25801
3277 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3278 Return size_one_node when the type is not complete.
3279 (pointer_diff): Remove comment.
3280 (build_unary_op): Improve error messages.
3281
19fc9faa
MP
32822014-05-02 Marek Polacek <polacek@redhat.com>
3283
3284 * c-typeck.c (c_finish_return): Separate warning_at calls.
3285
63bc4e87
MP
32862014-05-02 Marek Polacek <polacek@redhat.com>
3287
3288 * c-tree.h (error_init): Remove declaration.
3289 (pedwarn_init): Likewise.
3290 * c-typeck.c (error_init): Make static and move above.
3291 (pedwarn_init): Likewise.
3292 (warning_init): Move above.
3293 (maybe_warn_string_init): Likewise.
3294
4bd2511b
JL
32952014-05-01 Jeff Law <law@redhat.com>
3296
3297 Revert:
3298
3299 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3300 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3301 avoid goto.
3302
6a358dcb
MP
33032014-05-02 Marek Polacek <polacek@redhat.com>
3304
3305 PR c/60784
3306 * c-typeck.c (push_init_level): Set constructor_designated to
3307 p->designated for structures.
3308
ae5ebda4
MP
33092014-05-01 Marek Polacek <polacek@redhat.com>
3310
3311 PR c/60915
3312 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3313 function-definition has an attribute after the declarator.
3314
96b40f8d
MP
33152014-05-01 Marek Polacek <polacek@redhat.com>
3316
3317 PR c/60257
3318 * c-typeck.c (warning_init): Add location_t parameter. Call
3319 warning_at instead of warning.
3320 (push_init_level): Pass input_location to warning_init.
3321 (add_pending_init): Add location_t parameter. Pass loc to
3322 warning_init.
3323 (set_nonincremental_init): Pass input_location to add_pending_init.
3324 (set_nonincremental_init_from_string): Likewise.
3325 (output_init_element): Pass loc to warning_init and to
3326 add_pending_init.
3327
32e00768
MP
33282014-05-01 Marek Polacek <polacek@redhat.com>
3329
3330 PR c/43395
3331 * c-typeck.c (c_finish_return): Distinguish between label and variable
3332 when warning about returning local address.
3333
c9379ce2
MP
33342014-05-01 Marek Polacek <polacek@redhat.com>
3335
3336 PR c/29467
3337 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3338 in C89 mode.
3339
d00887e8
MP
33402014-05-01 Marek Polacek <polacek@redhat.com>
3341
3342 PR c/43245
3343 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3344 instead of 0 to WARN_FOR_QUALIFIERS.
3345
5436fa2e
MP
33462014-05-01 Marek Polacek <polacek@redhat.com>
3347
3348 PR c/56989
3349 * c-typeck.c (default_conversion): Use better location for
3350 error call.
3351
f8ed5150
MP
33522014-04-30 Marek Polacek <polacek@redhat.com>
3353
3354 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3355 also when SANITIZE_FLOAT_DIVIDE is on.
3356
8337d1db
MP
33572014-04-30 Marek Polacek <polacek@redhat.com>
3358
3359 PR c/60139
3360 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3361 and pedwarn_init. Use loc insted of input_location.
3362
c4bdc42f
MP
33632014-04-30 Marek Polacek <polacek@redhat.com>
3364
3365 PR c/60351
3366 * c-typeck.c (build_binary_op): Use location when warning about
3367 shift count.
3368
45484dcf
MP
33692014-04-25 Marek Polacek <polacek@redhat.com>
3370
3371 PR c/18079
3372 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3373 always_inline/noinline and hot/cold attributes.
3374
34cf811f
MP
33752014-04-25 Marek Polacek <polacek@redhat.com>
3376
3377 PR c/60114
3378 * c-parser.c (c_parser_initelt): Pass input_location to
3379 process_init_element.
3380 (c_parser_initval): Pass loc to process_init_element.
3381 * c-tree.h (process_init_element): Adjust declaration.
3382 * c-typeck.c (push_init_level): Pass input_location to
3383 process_init_element.
3384 (pop_init_level): Likewise.
3385 (set_designator): Likewise.
3386 (output_init_element): Add location_t parameter. Pass loc to
3387 digest_init.
3388 (output_pending_init_elements): Pass input_location to
3389 output_init_element.
3390 (process_init_element): Add location_t parameter. Pass loc to
3391 output_init_element.
3392
42056eac
JJ
33932014-04-24 Jakub Jelinek <jakub@redhat.com>
3394
3395 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3396 atomic-clause, allow comma in between atomic-clause and
3397 seq_cst.
3398
e162a134
JJ
33992014-04-22 Jakub Jelinek <jakub@redhat.com>
3400
3401 PR c/59073
3402 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3403 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3404
2f6babac
IZ
34052014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3406
3407 PR middle-end/60469
3408 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3409 create_tmp_var instead build_decl for creating temps.
3410 (build_array_notation_expr): Likewise.
3411 (fix_conditional_array_notations_1): Likewise.
3412 (fix_array_notation_expr): Likewise.
3413 (fix_array_notation_call_expr): Likewise.
3414
8edbfaa6
JJ
34152014-03-28 Jakub Jelinek <jakub@redhat.com>
3416
3417 PR c++/60689
3418 * c-tree.h (c_build_function_call_vec): New prototype.
3419 * c-typeck.c (build_function_call_vec): Don't call
3420 resolve_overloaded_builtin here.
3421 (c_build_function_call_vec): New wrapper function around
3422 build_function_call_vec. Call resolve_overloaded_builtin here.
3423 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3424 Call c_build_function_call_vec instead of build_function_call_vec.
3425 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3426 * c-decl.c (finish_decl): Likewise.
3427
7485aeea
MLI
34282014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3429
3430 PR c/55383
3431 * c-typeck.c: Use correct format string in cast-qual warning
3432
b17a8b07
TS
34332014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3434
3435 * c-decl.c (c_decl_attributes): Use
3436 lang_hooks.types.omp_mappable_type.
3437 * c-typeck.c (c_finish_omp_clauses): Likewise.
3438
3af9c5e9
MP
34392014-03-06 Marek Polacek <polacek@redhat.com>
3440
3441 PR c/60197
3442 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3443 of checking tree code.
3444
1c9f5f33
PK
34452014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3446
3447 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3448 (c_parser_parameter_declaration): Likewise.
3449
cc28fc7f
MP
34502014-02-19 Marek Polacek <polacek@redhat.com>
3451
3452 PR c/60195
3453 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3454 Call mark_exp_read on exp.value.
3455 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3456 TREE_ADDRESSABLE on old instead of val.
3457 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3458
b581c05c
PK
34592014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3460
3461 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3462 C_EXPR_APPEND by vec_safe_push.
3463 * c-tree.h (C_EXPR_APPEND): Remove.
3464
81e5eca8
MP
34652014-01-31 Marek Polacek <polacek@redhat.com>
3466
3467 PR c/59963
3468 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3469 build_function_call_vec.
3470 (build_function_call): Likewise.
3471 (build_atomic_assign): Likewise.
3472 (build_function_call_vec): Add arg_loc parameter. Use it.
3473 (convert_arguments): Likewise.
3474 (convert_for_assignment): Rename rhs_loc to expr_loc.
3475 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3476 (c_parser_objc_keywordexpr): Likewise.
3477 (c_parser_postfix_expression_after_primary): Call
3478 build_function_call_vec with expr_loc rather than op_loc.
3479 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3480 build_function_call_vec.
3481 (c_parser_expr_list): Add locations parameter. Fill it with locations
3482 of function arguments.
3483 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3484
68fca595
MP
34852014-01-30 Marek Polacek <polacek@redhat.com>
3486
3487 PR c/59940
3488 * c-typeck.c (build_function_call_vec): Use loc parameter.
3489 (convert_arguments): Add location parameter. Use it.
3490 (ep_convert_and_check): Likewise.
3491 (build_atomic_assign): Adjust convert_for_assignment call.
3492 (build_modify_expr): Likewise.
3493 (digest_init): Likewise.
3494 (c_finish_return): Likewise.
3495 (build_conditional_expr): Adjust ep_convert_and_check calls.
3496 (convert_for_assignment): Add rhs_loc parameter. Use it.
3497 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3498 calls.
3499
fa337f3a
RB
35002014-01-30 Richard Biener <rguenther@suse.de>
3501
3502 PR c/59905
3503 * c-typeck.c (build_function_call_vec): Do not replace calls
3504 to a function via an incompatible type with a runtime abort.
3505
b72271b9
BI
35062014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3507
3508 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3509 flag_enable_cilkplus with flag_cilkplus.
3510 (c_parser_direct_declarator_inner): Likewise.
3511 (c_parser_attribute_any_word): Likewise.
3512 (c_parser_attributes): Likewise.
3513 (c_parser_compound_statement): Likewise.
3514 (c_parser_statement_after_labels): Likewise.
3515 (c_parser_if_statement): Likewise.
3516 (c_parser_switch_statement): Likewise.
3517 (c_parser_do_statement): Likewise.
3518 (c_parser_for_statement): Likewise.
3519 (c_parser_unary_expression): Likewise.
3520 (c_parser_postfix_expression): Likewise.
3521 (c_parser_postfix_expression_after_primary): Likewise.
3522 (c_parser_postfix_expression_after_primary): Likewise.
3523 (c_parser_omp_clause_name): Likewise.
3524 (c_finish_omp_declare_simd): Likewise.
3525 (c_parser_cilk_verify_simd): Likewise.
3526 * c-typeck.c (build_array_ref): Likewise.
3527 (build_function_call_vec): Likewise.
3528 (convert_arguments): Likewise.
3529 (build_compound_expr): Likewise.
3530 (c_finish_return): Likewise.
3531 (c_finish_if_stmt): Likewise.
3532 (c_finish_loop): Likewise.
3533 (build_binary_op): Likewise.
3534
393e8e8b
MP
35352014-01-23 Marek Polacek <polacek@redhat.com>
3536
3537 PR c/59846
3538 * c-typeck.c (parser_build_binary_op): Use location instead of
3539 input_location.
3540 (build_binary_op): Pass location to shorten_compare.
3541
f04dda30
MP
35422014-01-23 Marek Polacek <polacek@redhat.com>
3543
3544 PR c/58346
3545 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3546 an empty aggregate.
3547
789eadcd
MP
35482014-01-23 Marek Polacek <polacek@redhat.com>
3549
3550 PR c/59871
3551 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3552 of a comma expression.
3553 (emit_side_effect_warnings): Likewise.
3554
40f14e9f
BI
35552014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3556
3557 PR c/59825
3558 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3559 function to use walk_tree and moved a lot of its functionality to
3560 expand_array_notations.
3561 (expand_array_notations): New function.
3562
74558dd9
BI
35632014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3564
3565 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3566 attribute an attribute without value.
3567
652fea39
JJ
35682014-01-23 Jakub Jelinek <jakub@redhat.com>
3569
3570 PR middle-end/58809
3571 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3572 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3573
f34f1c87
MP
35742014-01-22 Marek Polacek <polacek@redhat.com>
3575
3576 PR c/59891
3577 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3578 of remove_c_maybe_const_expr on op1 and op2.
3579
241f845a
JJ
35802014-01-15 Jakub Jelinek <jakub@redhat.com>
3581
3582 PR c/58943
3583 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3584 effects, preevaluate rhs using SAVE_EXPR first.
3585
9a74f20c
BI
35862014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3587
3588 PR c++/59631
3589 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3590 statements with if-elseif statements.
3591
96066ce1
MP
35922014-01-06 Marek Polacek <polacek@redhat.com>
3593
3594 PR c/57773
3595 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3596 defined bit-field types only in ISO C.
3597
23a5b65a
RS
35982014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3599
3600 Update copyright years
3601
f9030485
RS
36022014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3603
3604 * c-array-notation.c: Use the standard form for the copyright notice.
3605
41958c28
BI
36062013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3607
3608 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3609 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3610 field in parser is not empty. If not-empty, call the function
3611 c_parser_finish_omp_declare_simd.
3612 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3613 between SIMD-enabled functions and #pragma simd. Added new parameter.
3614 (c_parser_cilk_all_clauses): Modified the usage of the function
3615 c_parser_cilk_clause_vectorlength as mentioned above.
3616 (c_parser_cilk_simd_fn_vector_attrs): New function.
3617 (c_finish_cilk_simd_fn_tokens): Likewise.
3618 (is_cilkplus_vector_p): Likewise.
3619 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3620 "nomask," and "mask" strings in clause name.
3621 (c_parser_omp_all_clauses): Added 3 new case statements:
3622 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3623 PRAGMA_CILK_CLAUSE_NOMASK.
3624 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3625 check for vector attribute and if so call the function
3626 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3627 called the function c_finish_cilk_simd_fn_tokens.
3628 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3629 parser field is non-empty. If so, parse them as you would parse
3630 the omp declare simd pragma.
3631 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3632 Added a check when step is a parameter and flag it as error.
3633 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3634 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3635 pragma_omp_clause.
3636
cef0fd0e
TS
36372013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3638
3639 * c-parser.c (c_parser_omp_parallel): Fix description.
3640
12893402
BI
36412013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3642
3643 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3644 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3645 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3646 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3647
296674db
JM
36482013-12-04 Joseph Myers <joseph@codesourcery.com>
3649
3650 PR c/52023
3651 * c-parser.c (c_parser_alignas_specifier): Use
3652 c_sizeof_or_alignof_type instead of c_alignof.
3653 (c_parser_alignof_expression): Likewise, with min_alignof
3654 parameter depending on alignof spelling used.
3655
edd28054
MP
36562013-12-04 Marek Polacek <polacek@redhat.com>
3657
3658 PR c/54113
3659 * c-decl.c (start_function): Don't warn for missing prototype for
3660 inline functions.
3661
da0fc454
MP
36622013-12-03 Marek Polacek <polacek@redhat.com>
3663
3664 PR c/59351
3665 * c-decl.c (build_compound_literal): Allow compound literals with
3666 empty initial value.
3667
4c2ecab0
JM
36682013-12-02 Joseph Myers <joseph@codesourcery.com>
3669
3670 PR c/58235
3671 * c-typeck.c (build_modify_expr): Diagnose assignment to
3672 expression with array type.
3673
340baef7
JM
36742013-11-29 Joseph Myers <joseph@codesourcery.com>
3675
3676 PR c/42262
3677 * c-typeck.c (process_init_element): Do not treat a string as
3678 initializing a whole array when used with a designator for an
3679 individual element.
3680
6763b9f7
JM
36812013-11-29 Joseph Myers <joseph@codesourcery.com>
3682
3683 PR c/57574
3684 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3685 an inline function following a static declaration.
3686
e7bd1de1
JJ
36872013-11-28 Jakub Jelinek <jakub@redhat.com>
3688
3689 PR c/59310
3690 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3691 to p_name before calling c_parser_omp_teams instead of after.
3692 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3693 argument. Remove unused p_name variable.
3694
0136f8f0
AH
36952013-11-27 Aldy Hernandez <aldyh@redhat.com>
3696 Jakub Jelinek <jakub@redhat.com>
3697
3698 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3699 external_scope is NULL.
3700
241b71bb
TV
37012013-11-27 Tom de Vries <tom@codesourcery.com>
3702 Marc Glisse <marc.glisse@inria.fr>
3703
3704 PR c++/59032
3705 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3706
2fb9a547
AM
37072013-11-22 Andrew MacLeod <amacleod@redhat.com>
3708
3709 * c-typeck.c: Add required include files from gimple.h.
3710
8400e75e
DM
37112013-11-22 David Malcolm <dmalcolm@redhat.com>
3712
3713 * c-decl.c (define_label, shadow_tag_warned)
3714 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3715 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3716 (declspecs_add_type): Remove use of in_system_header macro.
3717 * c-parser.c (c_parser_unary_expression): Likewise.
3718 * c-typeck.c (store_init_value, process_init_element)
3719 (c_start_case): Likewise.
3720
3721 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3722 macro.
3723
3724 * c-parser.c (c_parser_set_source_position_from_token): Remove
3725 reference to in_system_header from comment.
3726
386b1f1f
RS
37272013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3728
3729 * c-decl.c (grokdeclarator): Update comment to refer to
3730 tree_to_[su]hwi rather than tree_low_cst.
3731
ae7e9ddd
RS
37322013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3733
3734 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3735 tree_to_uhwi throughout.
3736
9439e9a1
RS
37372013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3738
3739 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3740 throughout.
3741
9541ffee
RS
37422013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3743
3744 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3745 throughout.
3746
c02065fc
AH
37472013-11-15 Aldy Hernandez <aldyh@redhat.com>
3748
3749 * c-parser.c (c_parser_cilk_simd): New.
3750 (c_parser_cilk_verify_simd): New.
3751 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3752 (c_parser_omp_for_loop): Add case for NE_EXPR.
3753 Set c_break_label for CILK_SIMD.
3754 (c_parser_cilk_clause_vectorlength): New.
3755 (c_parser_cilk_clause_linear): New.
3756 (c_parser_cilk_clause_name): New.
3757 (c_parser_cilk_all_clauses): New.
3758 * c-typeck.c (build_unary_op): Pass location argument to
3759 readonly_error.
3760 (build_modify_expr): Same.
3761 (build_asm_expr): Same.
3762 (c_finish_bc_stmt): Error on break/continue in loops.
3763
18f429e2
AM
37642013-11-14 Andrew MacLeod <amacleod@redhat.com>
3765
3766 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3767
d8a2d370
DN
37682013-11-14 Diego Novillo <dnovillo@google.com>
3769
3770 * c-decl.c: Include print-tree.h.
3771 Include stor-layout.h.
3772 Include varasm.h.
3773 Include attribs.h.
3774 Include stringpool.h.
3775 * c-lang.c: Include fold-const.h.
3776 * c-parser.c: Include stringpool.h.
3777 Include attribs.h.
3778 Include stor-layout.h.
3779 Include varasm.h.
3780 Include trans-mem.h.
3781 * c-typeck.c: Include stor-layout.h.
3782 Include trans-mem.h.
3783 Include varasm.h.
3784 Include stmt.h.
3785
38b7bc7f
JM
37862013-11-13 Joseph Myers <joseph@codesourcery.com>
3787
3788 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3789 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3790 __auto_type.
3791 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3792 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3793 RID_AUTO_TYPE.
3794 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3795 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3796 (c_parser_declarator, c_parser_direct_declarator_inner)
3797 (c_parser_parameter_declaration, c_parser_type_name): All callers
3798 changed.
3799 (c_parser_declaration_or_fndef): Handle declarations with type
3800 determined from the initializer.
3801
45b0be94
AM
38022013-11-12 Andrew MacLeod <amacleod@redhat.com>
3803
18f429e2 3804 * c-typeck.c: Include gimplify.h.
45b0be94 3805
582d9b50
JM
38062013-11-12 Joseph Myers <joseph@codesourcery.com>
3807
3808 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3809 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3810 comment.
3811 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3812 or _Thread_local as appropriate in diagnostics.
3813 (build_null_declspecs): Initialize ret->thread_gnu_p.
3814 (declspecs_add_scspec): Handle either __thread or _Thread_local
3815 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3816 pedantic. Do not disallow _Thread_local extern and _Thread_local
3817 static.
3818
267bac10
JM
38192013-11-07 Joseph Myers <joseph@codesourcery.com>
3820 Andrew MacLeod <amacleod@redhat.com>
3821
3822 * c-aux-info.c (gen_type): Handle atomic qualifier.
3823 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3824 qualifiers when compating types.
3825 (shadow_tag_warned): Handle atomic_p in declspecs.
3826 (quals_from_declspecs): Likewise.
3827 (start_decl): Use c_type_promotes_to when promoting argument
3828 types.
3829 (grokdeclarator): Handle _Atomic.
3830 (get_parm_info): Diagnose any qualifier on "void" as only
3831 parameter.
3832 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3833 comparing types. Use c_type_promotes_to when promoting argument
3834 types.
3835 (finish_function): Use c_type_promotes_to when promoting argument
3836 types.
3837 (build_null_declspecs): Handle atomic_p in declspecs.
3838 (declspecs_add_qual): Handle RID_ATOMIC.
3839 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3840 (c_token_starts_declspecs): Handle RID_ATOMIC.
3841 (c_parser_declspecs): Handle atomic type specifiers and
3842 qualifiers.
3843 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3844 from types of expressions with atomic type.
3845 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3846 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3847 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3848 (c_parser_statement_after_labels, c_parser_switch_statement)
3849 (c_parser_for_statement, c_parser_expr_no_commas)
3850 (c_parser_conditional_expression, c_parser_binary_expression)
3851 (c_parser_cast_expression, c_parser_unary_expression)
3852 (c_parser_postfix_expression)
3853 (c_parser_postfix_expression_after_primary, c_parser_expression):
3854 Use convert_lvalue_to_rvalue.
3855 (c_parser_expression_conv, c_parser_expr_list): Document
3856 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3857 (c_parser_objc_synchronized_statement): Use
3858 convert_lvalue_to_rvalue.
3859 (c_parser_objc_selector): Handle RID_ATOMIC.
3860 (c_parser_objc_receiver, c_parser_array_notation): Use
3861 convert_lvalue_to_rvalue.
3862 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3863 _Atomic (type-name).
3864 (struct c_declspecs): Add atomic_p field.
3865 (convert_lvalue_to_rvalue): Declare.
3866 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3867 corresponding atomic types.
3868 (qualify_type): Don't add _Atomic qualifiers from second argument.
3869 (comp_target_types): Do not allow _Atomic mismatches.
3870 (type_lists_compatible_p): Do not remove atomic qualifiers when
3871 comparing types.
3872 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3873 (build_atomic_assign): New functions.
3874 (build_unary_op): Use build_atomic_assign for atomic increment and
3875 decrement.
3876 (build_conditional_expr): Do not treat _Atomic void as a qualified
3877 version of void.
3878 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3879 (find_anonymous_field_with_type, convert_to_anonymous_field)
3880 (convert_for_assignment): Do not remove atomic qualifiers when
3881 comparing types.
3882 (digest_init): Do not accept initialization of arrays of atomic
3883 elements by string constants.
3884 (build_asm_expr): Use convert_lvalue_to_rvalue.
3885 (build_binary_op): Do not treat _Atomic void as a qualified
3886 version of void.
3887
0c249d4b
DD
38882013-11-06 DJ Delorie <dj@redhat.com>
3889
3890 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3891 both explicit and builtin, print the location of the explicit one.
3892
6d7f7e0a
TB
38932013-11-05 Tobias Burnus <burnus@net-b.de>
3894
3895 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3896 c_parser_omp_distribute, c_parser_omp_teams,
3897 c_parser_omp_target, c_parser_omp_declare): Handle
3898 -fopenmp-simd.
3899
b906f4ca
MP
39002013-11-03 Marek Polacek <polacek@redhat.com>
3901
3902 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3903
ee1d5a02
JJ
39042013-11-01 Jakub Jelinek <jakub@redhat.com>
3905
3906 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3907 check_dup_generic at the end, unless remove is true.
3908 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3909 remove = true;.
3910 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3911
5a9785fb
JJ
39122013-10-31 Jakub Jelinek <jakub@redhat.com>
3913
3914 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3915 with decl that is not pointer nor array.
3916
939b37da
BI
39172013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3918
3919 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3920 a spawning function is found.
3921 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3922 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3923 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3924 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3925 case.
3926 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3927 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3928 expr.
3929 (c_finish_return): Added a check to reject _Cilk_spawn in return
3930 expression.
3931 (build_cilk_spawn): New function.
3932 (build_cilk_sync): Likewise.
3933 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3934
d4af74d4
TB
39352013-10-27 Tobias Burnus <burnus@net-b.de>
3936
3937 PR other/33426
3938 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3939 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3940 (c_parser_statement_after_labels): Update calls.
3941
d73749df 39422013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3943
3944 PR other/33426
3945 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3946 Handle PRAGMA_IVDEP.
3947 (c_parser_statement_after_labels): Update call.
3948
f28aa681
MP
39492013-10-24 Marek Polacek <polacek@redhat.com>
3950
3951 * c-parser.c (c_parser_struct_declaration): Add a comment.
3952 (c_parser_declarator): Don't allow _Alignas here.
3953
0645c1a2
AM
39542013-10-17 Andrew MacLeod <amacleod@redhat.com>
3955
3956 * c-parser.c: Include omp-low.h.
3957 * c-typeck.c: Likewise.
3958
568a31f2
MP
39592013-10-17 Marek Polacek <polacek@redhat.com>
3960
3961 PR c/58267
3962 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3963 Document syntax of the array-declarator.
3964 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3965 are not permitted.
3966 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3967 (c_parser_struct_declaration): Likewise.
3968 (c_parser_declarator): Likewise.
3969 (c_parser_direct_declarator_inner): Likewise.
3970 (c_parser_parameter_declaration): Likewise.
3971 (c_parser_type_name): Likewise.
3972
acf0174b
JJ
39732013-10-11 Jakub Jelinek <jakub@redhat.com>
3974
3975 * c-lang.h (current_omp_declare_target_attribute): New extern
3976 decl.
3977 * c-parser.c: Include c-lang.h.
3978 (struct c_parser): Change tokens to c_token *.
3979 Add tokens_buf field. Change tokens_avail type to unsigned int.
3980 (c_parser_consume_token): If parser->tokens isn't
3981 &parser->tokens_buf[0], increment parser->tokens.
3982 (c_parser_consume_pragma): Likewise.
3983 (enum pragma_context): Add pragma_struct and pragma_param.
3984 (c_parser_external_declaration): Adjust
3985 c_parser_declaration_or_fndef caller.
3986 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3987 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3988 Adjust recursive call.
3989 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3990 of pragma_external.
3991 (c_parser_parameter_declaration): Use pragma_param instead of
3992 pragma_external.
3993 (c_parser_compound_statement_nostart, c_parser_label,
3994 c_parser_for_statement): Adjust
3995 c_parser_declaration_or_fndef callers.
3996 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3997 it through to c_parser_conditional_expression.
3998 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3999 pass it through to c_parser_binary_expression. Adjust recursive
4000 call.
4001 (c_parser_binary_expression): Remove prec argument, add
4002 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4003 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4004 binop matches it, use build2 instead of parser_build_binary_op.
4005 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4006 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4007 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4008 Handle pragma_struct and pragma_param the same as pragma_external.
4009 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4010 (c_parser_omp_variable_list): Parse array sections for
4011 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4012 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4013 (c_parser_omp_clause_reduction): Handle user defined reductions.
4014 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4015 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4016 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4017 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4018 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4019 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4020 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4021 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4022 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4023 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4024 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4025 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4026 (c_parser_omp_for_loop): Add CODE argument, pass it through
4027 to c_finish_omp_for. Change last argument to cclauses,
4028 and adjust uses to grab parallel clauses from the array of all
4029 the split clauses. Adjust c_parser_binary_expression,
4030 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4031 (omp_split_clauses): New function.
4032 (c_parser_omp_simd): New function.
4033 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4034 Allow the function to be called also when parsing combined constructs,
4035 and call c_parser_omp_simd when parsing for simd.
4036 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4037 #pragma omp section, require exactly one structured-block instead of
4038 sequence of statements.
4039 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4040 Allow the function to be called also when parsing combined constructs.
4041 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4042 Allow the function to be called also when parsing combined
4043 constructs.
4044 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4045 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4046 c_parser_omp_teams, c_parser_omp_target_data,
4047 c_parser_omp_target_update, c_parser_omp_target,
4048 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4049 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4050 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4051 (c_parser_omp_construct): Add p_name and mask vars. Handle
4052 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4053 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4054 and c_parser_omp_sections callers.
4055 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4056 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4057 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4058 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4059 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4060 OMP_CLAUSE_DEPEND.
4061 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4062 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4063 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4064 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4065 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4066 * c-typeck.c: Include tree-inline.h.
4067 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4068 handle_omp_array_sections_1, handle_omp_array_sections,
4069 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4070 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4071 user defined reductions.
4072 (c_tree_equal): New function.
4073 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4074 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4075 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4076 c_check_omp_declare_reduction_r): New prototypes.
4077 * c-decl.c (current_omp_declare_target_attribute): New variable.
4078 (c_decl_attributes): New function.
4079 (start_decl, start_function): Use it instead of decl_attributes.
4080 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4081 c_omp_reduction_decl, c_omp_reduction_lookup,
4082 c_check_omp_declare_reduction_r): New functions.
4083
0a6c2227
TT
40842013-09-25 Tom Tromey <tromey@redhat.com>
4085
4086 * Make-lang.in (c/gccspec.o): Remove.
4087 (CFLAGS-c/gccspec.o): New variable.
4088 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4089 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4090 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4091
f3bc55f0
TT
40922013-09-25 Tom Tromey <tromey@redhat.com>
4093
4094 * Make-lang.in (c/gccspec.o): Don't use subshell.
4095
a24d975c
MP
40962013-09-18 Marek Polacek <polacek@redhat.com>
4097
4098 PR sanitize/58443
4099 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4100 Remove unnecessary check.
4101
ce6923c5
MP
41022013-09-18 Marek Polacek <polacek@redhat.com>
4103
4104 PR sanitizer/58411
4105 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4106 no_sanitize_undefined attribute.
4107
a1e51df9
KT
41082013-09-13 Kai Tietz <ktietz@redhat.com>
4109
4110 PR target/57848
4111 * c-decl.c (c_builtin_function_ext_scope): Remove
4112 wrong assumption that it is never called on prexisting
4113 symbol.
4114
0af94e6f
JR
41152013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4116
4117 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4118
20059c8b
GDR
41192013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4120
4121 * c-objc-common.c (c_tree_printer): Tidy.
4122
de5a5fa1
MP
41232013-08-30 Marek Polacek <polacek@redhat.com>
4124
4125 * c-typeck.c (build_binary_op): Add division by zero and shift
4126 instrumentation.
4127
2531a1d9 41282013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4129 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4130
6e2bcc98 4131 PR c/35649
2531a1d9
JR
4132 * c-typeck.c (c_common_type): Prefer double_type_node over
4133 other REAL_TYPE types with the same precision.
4134 (convert_arguments): Likewise.
4135
025311c4
GDR
41362013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4137
4138 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4139 (c_initialize_diagnostics): Call a destructor for the early printer.
4140
da6ca2b5
GDR
41412013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4142
4143 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4144 printer initialization.
4145
318cda85 41462013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4147
318cda85
BI
4148 PR c/57490
4149 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4150 check for truth values.
4151 (expand_array_notation_exprs): Added truth values case. Removed an
4152 unwanted else. Added for-loop to walk through subtrees in default
4153 case.
4154
b066401f
GDR
41552013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4156
4157 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4158
fb48aadc
JM
41592013-07-23 Joseph Myers <joseph@codesourcery.com>
4160
4161 * c-parser.c (struct c_generic_association): Fix typo.
4162
433cc7b0
TT
41632013-07-23 Tom Tromey <tromey@redhat.com>
4164 Joseph Myers <joseph@codesourcery.com>
4165
4166 * c-parser.c (struct c_generic_association): New.
4167 (c_generic_association_d): New typedef.
4168 (c_parser_generic_selection): New function.
4169 (c_parser_postfix_expression): Handle RID_GENERIC.
4170
26d40c3d
JM
41712013-07-13 Jason Merrill <jason@redhat.com>
4172
4173 PR c++/57793
4174 * c-decl.c (finish_struct): Check for too-large class.
4175
ecdbd01a 41762013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4177
4178 PR c/57821
4179 * c-typeck.c (set_init_index): When folding, check for index overflow.
4180
1141ed3f
BI
41812013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4182
4183 * c-parser.c (c_parser_array_notation): Removed rejection of array
4184 notations in an array of function pointers.
4185
713b46fa
BI
41862013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4187
4188 * c-array-notation.c (make_triplet_val_inv): New function.
4189 (create_cmp_incr): Likewise.
4190 (create_array_refs): Likewise.
4191 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4192 Also modularized common parts between functions and called the function.
4193 (build_array_notation_expr): Likewise.
4194 (fix_conditional_array_notations_1): Likewise.
4195 (fix_array_notation_expr): Likewise.
4196 (fix_array_notation_call_expr): Likewise.
4197
92f20202
MP
41982013-06-18 Marek Polacek <polacek@redhat.com>
4199
4200 PR c/57630
4201 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4202
73a23b06
BI
42032013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4204
4205 * c-array-notation.c (build_array_notation_expr): Reject array notation
4206 mismatch between LHS and RHS even inside a call_expr. Also, removed
4207 a couple while statements that were dead code.
4208
00b8517d
BI
42092013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4210
4211 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4212 excessive precision expressions in function parameters. Also removed
4213 couple unwanted while statements.
4214
1509bdda
BI
42152013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4216
4217 * c-array-notation.c (expand_array_notation_exprs): Added
4218 ARRAY_NOTATION_REF case.
4219
d60f1706
BI
42202013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4221
4222 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4223 function to c-family/array-notation-common.c.
4224 (is_cilkplus_reduce_builtin): Likewise.
4225 (find_rank): Likewise.
4226 (extract_array_notation_exprs): Likewise.
4227 (replace_array_notations): Likewise.
4228 (find_inv_trees): Likewise.
4229 (replace_inv_trees): Likewise.
4230 (contains_array_notation_expr): Likewise.
4231 (find_correct_array_notation_type): Likewise.
4232 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4233 (struct inv_list): Moved this to c-family/array-notation-common.c.
4234 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4235
6d6efbb3
BI
42362013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4237
4238 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4239 reduction functions outside the for-loop. Added a check if the fundecl
4240 is non-NULL. Finally, removed an unwanted if-statement, and made the
4241 body unconditional.
4242
25c22937
BI
42432013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4244
4245 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4246 condition of the if-statement matches the rank of else-block and then-
4247 block when array notations are used.
4248 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4249 expression after the entire function body is parsed.
4250 (c_parser_expr_no_commas): Delayed creating array notation expressions
4251 to the end of function parsing.
4252 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4253 whole if-statement instead of just the condition.
4254 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4255
edd25645
BI
42562013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4257
4258 PR c/57474
4259 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4260 array to NULL_TREE if they are unused. Also added a check for the
4261 field to be NULL before its fields are used in future.
4262
065ce7f1
RO
42632013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4264
4265 PR bootstrap/57450
4266 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4267 (build_array_notation_expr): Likewise.
4268
36536d79
BI
42692013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4270
4271 * c-typeck.c (build_array_ref): Added a check to see if array's
4272 index is greater than one. If true, then emit an error.
4273 (build_function_call_vec): Exclude error reporting and checking
4274 for builtin array-notation functions.
4275 (convert_arguments): Likewise.
4276 (c_finish_return): Added a check for array notations as a return
4277 expression. If true, then emit an error.
4278 (c_finish_loop): Added a check for array notations in a loop
4279 condition. If true then emit an error.
4280 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4281 (build_binary_op): Added a check for array notation expr inside
4282 op1 and op0. If present, we call another function to find correct
4283 type.
4284 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4285 * c-parser.c (c_parser_compound_statement): Check if array
4286 notation code is used in tree, if so, then transform them into
4287 appropriate C code.
4288 (c_parser_expr_no_commas): Check if array notation is used in LHS
4289 or RHS, if so, then build array notation expression instead of
4290 regular modify.
4291 (c_parser_postfix_expression_after_primary): Added a check for
4292 colon(s) after square braces, if so then handle it like an array
4293 notation. Also, break up array notations in unary op if found.
4294 (c_parser_direct_declarator_inner): Added a check for array
4295 notation.
4296 (c_parser_compound_statement): Added a check for array notation in
4297 a stmt. If one is present, then expand array notation expr.
4298 (c_parser_if_statement): Likewise.
4299 (c_parser_switch_statement): Added a check for array notations in
4300 a switch statement's condition. If true, then output an error.
4301 (c_parser_while_statement): Similarly, but for a while.
4302 (c_parser_do_statement): Similarly, but for a do-while.
4303 (c_parser_for_statement): Similarly, but for a for-loop.
4304 (c_parser_unary_expression): Check if array notation is used in a
4305 pre-increment or pre-decrement expression. If true, then expand
4306 them.
4307 (c_parser_array_notation): New function.
4308 * c-array-notation.c: New file.
4309 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4310
cd192ccc
MS
43112013-05-23 Mike Stump <mikestump@comcast.net>
4312
4313 * c-typeck.c (convert_for_assignment): Handle references to memory
4314 spaces better.
4315
427b248d
JM
43162013-05-16 Jason Merrill <jason@redhat.com>
4317
4318 * Make-lang.in (cc1$(exeext)): Use link mutex.
4319
44d90fe1
PC
43202013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4321
4322 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4323 to simply use OPT_Wpointer_arith.
4324 (build_unary_op): Likewise.
4325
4e7d7b3d
JJ
43262013-04-03 Jakub Jelinek <jakub@redhat.com>
4327
4328 PR c/19449
4329 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4330 argument. If set, or it temporarily for parsing of the first
4331 argument into force_folding_builtin_constant_p.
4332 (c_parser_postfix_expression): Adjust callers.
4333
839b422f
RB
43342013-03-21 Richard Biener <rguenther@suse.de>
4335
4336 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4337 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4338
2ee028f1
MP
43392013-02-12 Marek Polacek <polacek@redhat.com>
4340
4341 PR c/44938
4342 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4343 origtypes to NULL.
4344
8824edff
JJ
43452013-01-24 Jakub Jelinek <jakub@redhat.com>
4346
4347 PR c/56078
4348 * c-typeck.c (set_nonincremental_init_from_string): If
4349 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4350 returned false.
4351 (process_init_element): Likewise.
4352
eadd3d0d
JJ
43532012-12-20 Jakub Jelinek <jakub@redhat.com>
4354
4355 PR c++/55619
4356 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4357 argument, don't call default_function_array_conversion
4358 nor c_fully_fold here.
4359 (c_parser_asm_statement): Adjust callers.
4360 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4361 and outputs here, and call default_function_array_conversion
4362 on inputs that don't need to be addressable.
4363
f8a93a2e
JJ
43642012-12-18 Jakub Jelinek <jakub@redhat.com>
4365
4366 PR c/39464
4367 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4368 warning require that both c_common_unsigned_type as well as
4369 c_common_signed_type is the same for both mvl and mvr types.
4370
9771b263
DN
43712012-11-16 Diego Novillo <dnovillo@google.com>
4372
4373 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4374
4375 * c-common.c: Use new vec API in vec.h.
4376 * c-common.h: Likewise.
4377 * c-gimplify.c: Likewise.
4378 * c-pragma.c: Likewise.
4379 * c-pretty-print.c: Likewise.
4380 * c-pretty-print.h: Likewise.
4381 * c-semantics.c: Likewise.
4382 * c-decl.c: Likewise.
4383 * c-parser.c: Likewise.
4384 * c-tree.h: Likewise.
4385 * c-typeck.c: Likewise.
4386
880661a4
JW
43872012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4388
4389 PR c++/54930
4390 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4391
077d1abe
MLI
43922012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4393
4394 PR c/53066
4395 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4396 shadows a function, unless the variable is a function or a
4397 pointer-to-function.
4398
3a785c97
JJ
43992012-10-12 Jakub Jelinek <jakub@redhat.com>
4400
4401 PR c/54381
4402 * c-parser.c (struct c_tree_loc_pair): Removed.
4403 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4404 add location_t * and tree * arguments, fill in array of 3
4405 sizeof_arg trees and corresponding locs.
4406 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4407 c_parser_expr_list callers.
4408 (c_parser_postfix_expression_after_primary): Likewise. Pass
4409 array of 3 sizeof_arg trees and locs (corresponding to first
4410 3 arguments) to sizeof_pointer_memaccess_warning.
4411
703c8606
LC
44122012-10-09 Lawrence Crowl <crowl@google.com>
4413
4414 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4415 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4416 hash table.
4417
5d9de0d0
PC
44182012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4419
4420 PR c++/54194
4421 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4422 call.
4423
a212e43f
MG
44242012-10-09 Marc Glisse <marc.glisse@inria.fr>
4425
4426 PR c++/54427
4427 * c-typeck.c: Include c-common.h.
4428 (enum stv_conv): Moved to c-common.h.
4429 (scalar_to_vector): Moved to c-common.c.
4430 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4431 * Make-lang.in: c-typeck.c depends on c-common.h.
4432
3b78de56
AC
44332012-10-04 Arnaud Charlet <charlet@adacore.com>
4434
4435 * c-decl.c (c_write_global_declarations): Fix handling of
4436 -fdump-ada-spec*.
4437
78c60e3d
SS
44382012-09-30 Sharad Singhai <singhai@google.com>
4439
4440 * c-decl.c (c_write_global_declarations): Use a different method
4441 to determine if the dump has ben initialized.
4442
9f33203d
JM
44432012-09-14 Joseph Myers <joseph@codesourcery.com>
4444
4445 PR c/54552
4446 * c-typeck.c (c_cast_expr): When casting to a type requiring
4447 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4448 c_fully_fold first.
4449
a27d595d
JM
44502012-09-14 Joseph Myers <joseph@codesourcery.com>
4451
4452 PR c/54103
4453 * c-typeck.c (build_unary_op): Pass original argument of
4454 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4455 any C_MAYBE_CONST_EXPR, if it has integer operands.
4456 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4457 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4458 to c_objc_common_truthvalue_conversion, then remove any
4459 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4460 c_objc_common_truthvalue_conversion not
4461 c_common_truthvalue_conversion.
4462 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4463 call note_integer_operands for arguments with integer operands
4464 that are not integer constants.
4465
9feb29df
JJ
44662012-09-13 Jakub Jelinek <jakub@redhat.com>
4467
4468 PR c/54559
4469 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4470 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4471
d409320c
JJ
44722012-08-31 Jakub Jelinek <jakub@redhat.com>
4473
4474 PR c/54428
4475 * c-convert.c (convert): Don't call fold_convert_loc if
4476 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4477 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4478 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4479
6265d07c
JJ
44802012-08-24 Jakub Jelinek <jakub@redhat.com>
4481
4482 PR c/54355
4483 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4484 for nested and empty_ok arguments in the call to
4485 c_parser_declaration_or_fndef.
4486
1a4049e7
JJ
44872012-08-17 Jakub Jelinek <jakub@redhat.com>
4488
4489 * c-tree.h (c_last_sizeof_arg): Declare.
4490 * c-parser.c (struct c_tree_loc_pair): New type.
4491 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4492 non-NULL.
4493 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4494 (c_parser_postfix_expression_after_primary): Likewise. Call
4495 sizeof_pointer_memaccess_warning if needed.
4496 (sizeof_ptr_memacc_comptypes): New function.
4497 * c-typeck.c (c_last_sizeof_arg): New global variable.
4498 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4499
0229aee9
UB
45002012-07-24 Uros Bizjak <ubizjak@gmail.com>
4501
4502 * c-lang.h (lang_decl): Add variable_size GTY option.
4503
7ee2468b
SB
45042012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4505
4506 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4507 * Make-lang.in: Fix dependencies.
4508
d4a10d0a
SB
45092012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4510
4511 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4512 and add language Makefile hooks.
4513 * config-lang.in: New file.
4514 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4515 add the required "normal" config-lang.in rules.
4516 * c-lang.h: Moved from gcc/ to here.
4517 * c-tree.h: Likewise.
4518 * c-objc-common.c: Likewise.
4519 * c-objc-common.h: Likewise.
4520 * c-typeck.c: Likewise.
4521 * c-convert.c: Likewise.
4522 * c-lang.c: Likewise.
4523 * c-aux-info.c: Likewise.
4524 * c-errors.c: Likewise.
4525 * gccspec.c: Likewise.
4526 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4527 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4528\f
cbe34bb5 4529Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4530
4531Copying and distribution of this file, with or without modification,
4532are permitted in any medium without royalty provided the copyright
4533notice and this notice are preserved.