]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR c/81233 (--Wdiscarded-qualifiers and Wincompatible-pointer-types missing import...
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
296c53ac
MP
12017-08-09 Marek Polacek <polacek@redhat.com>
2
3 PR c/81233
4 * c-typeck.c (pedwarn_init): Make the function take a variable list.
5 Call emit_diagnostic_valist instead of pedwarn.
6 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
7 Print the relevant types in diagnostics.
8
a32c8316
MP
92017-08-09 Marek Polacek <polacek@redhat.com>
10
11 PR c/81417
12 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
13 build_conditional_expr.
14 * c-parser.c (c_parser_conditional_expression): Create locations for
15 EXP1 and EXP2 from their source ranges. Pass the locations down to
16 build_conditional_expr.
17 * c-tree.h (build_conditional_expr): Update declaration.
18 * c-typeck.c (build_conditional_expr): Add location_t parameters.
19 For -Wsign-compare, also print the types.
20
314e6352
ML
212017-08-08 Martin Liska <mliska@suse.cz>
22
23 * c-convert.c: Include header files.
24 * c-typeck.c: Likewise.
25
577eec56
ML
262017-08-07 Martin Liska <mliska@suse.cz>
27
28 * c-parser.c (c_parser_attributes): Canonicalize name of an
29 attribute.
30
f7b6353a
MP
312017-08-02 Marek Polacek <polacek@redhat.com>
32
33 PR c/81289
34 * c-parser.c (c_parser_unary_expression): Use set_error.
35
8a6eab34
MP
36 PR c/81448
37 PR c/81306
38 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
39 warnings. Avoid walking MACRO_MAP_LOCATIONS.
40
7fef86d3
JH
412017-07-31 Jan Hubicka <hubicka@ucw.cz>
42 Martin Liska <mliska@suse.cz>
43
44 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 45 statement.
7fef86d3 46
f34ebeb2
ML
472017-07-31 Martin Liska <mliska@suse.cz>
48
49 PR sanitize/81530
50 * c-convert.c (convert): Guard condition with flag_sanitize_p
51 also with current_function_decl non-null equality.
52 * c-decl.c (grokdeclarator): Likewise.
53 * c-typeck.c (build_binary_op): Likewise.
54
8595f67b
MP
552017-07-25 Marek Polacek <polacek@redhat.com>
56
57 * c-decl.c (grokfield): Remove local variable.
58
d49718d6
MP
592017-07-25 Marek Polacek <polacek@redhat.com>
60
61 PR c/81364
62 * c-parser.c (c_parser_else_body): Don't warn about multistatement
63 macro expansion if the body is in { }.
64 (c_parser_while_statement): Likewise.
65 (c_parser_for_statement): Likewise.
66
ff22eb12
NS
672017-07-18 Nathan Sidwell <nathan@acm.org>
68
69 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
70
eea77d1f
DM
712017-07-14 David Malcolm <dmalcolm@redhat.com>
72
73 * c-decl.c (implicitly_declare): When suggesting a missing
74 #include, provide a fix-it hint.
75
b6f43128
DM
762017-07-06 David Malcolm <dmalcolm@redhat.com>
77
78 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
79 and call that instead.
80 * c-tree.h (selftest::run_c_tests): New decl.
81
3e2becc4
MP
822017-06-26 Marek Polacek <polacek@redhat.com>
83
84 PR c/80116
85 * c-parser.c (c_parser_if_body): Set the location of the
86 body of the conditional after parsing all the labels. Call
87 warn_for_multistatement_macros.
88 (c_parser_else_body): Likewise.
89 (c_parser_switch_statement): Likewise.
90 (c_parser_while_statement): Likewise.
91 (c_parser_for_statement): Likewise.
92 (c_parser_statement): Add a default argument. Save the location
93 after labels have been parsed.
94 (c_parser_c99_block_statement): Likewise.
95
343ae898
RB
962017-06-19 Richard Biener <rguenther@suse.de>
97
98 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
99 negated _Literals to parse _Literal (int) -1.
100
45b2222a
ML
1012017-06-13 Martin Liska <mliska@suse.cz>
102
103 PR sanitize/78204
104 * c-convert.c (convert): Use sanitize_flags_p.
105 * c-decl.c (grokdeclarator): Likewise.
106 * c-typeck.c (convert_for_assignment): Likewise.
107 (c_finish_return): Likewise.
108 (build_binary_op): Likewise.
109
8ab7005b
JJ
1102017-06-08 Jakub Jelinek <jakub@redhat.com>
111
112 PR c/81006
113 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
114 to sizetype before size_binop.
115
363dc72c
JJ
1162017-06-07 Jakub Jelinek <jakub@redhat.com>
117
118 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
119 of TDI_generic.
120
dc949728
MP
1212017-06-06 Marek Polacek <polacek@redhat.com>
122
123 PR c/79983
124 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
125 ref.
126 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
127
40ffd95f
BE
1282017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
129
130 * c-parser.c (c_parser_binary_expression): Implement the
131 -Wsizeof_pointer_div warning.
132 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
133 from a parenthesized expression.
134 (c_parser_expr_list): Use c_last_sizeof_loc.
135 * c-tree.h (c_last_sizeof_loc): New external.
136 * c-typeck.c (c_last_sizeof_loc): New variable.
137 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
138
9fc5e7a4
MM
1392017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
140
141 PR testsuite/80580
142 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
143
f012c8ef
DM
1442017-05-30 David Malcolm <dmalcolm@redhat.com>
145
146 * c-objc-common.c (c_tree_printer): Gain bool and const char **
147 parameters.
148
3cd211af
MS
1492017-05-24 Martin Sebor <msebor@redhat.com>
150
151 PR c/80731
152 * c-fold.c (c_fully_fold_internal): Adjust.
153 * c-typeck.c (parser_build_unary_op): Adjust.
154
fd71a9a2
TS
1552017-05-23 Thomas Schwinge <thomas@codesourcery.com>
156
157 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
158 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
159 "VECTOR_LENGTH".
160
92fa0f9e
MP
1612017-05-23 Marek Polacek <polacek@redhat.com>
162
163 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
164 quotes.
165
d11c168a
JJ
1662017-05-22 Jakub Jelinek <jakub@redhat.com>
167
168 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
169 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
170 it returned invariant. Call tree_invariant_p unconditionally
171 afterwards to decide whether to return expr or op0.
172
58aca9d9
NS
1732017-05-22 Nathan Sidwell <nathan@acm.org>
174
175 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
176
7fd549d2
TS
1772017-05-19 Thomas Schwinge <thomas@codesourcery.com>
178
179 * c-parser.c (c_parser_omp_clause_default): Handle
180 "OMP_CLAUSE_DEFAULT_PRESENT".
181
6ecd2339
BE
1822017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
183
184 * config-lang.in (gtfiles): Add c-family/c-format.c.
185
8a57ecff
NS
1862017-05-18 Nathan Sidwell <nathan@acm.org>
187
188 * c-decl.c (pushdecl_top_level): Delete unused function.
189
6574d78e
MP
1902017-05-18 Marek Polacek <polacek@redhat.com>
191
192 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
193 (check_earlier_gotos): Likewise.
194 (define_label): Likewise.
195 (pending_xref_error): Likewise.
196 (smallest_type_quals_location): Likewise.
197 (grokdeclarator): Likewise.
198 (grokparms): Likewise.
199 (identifier_global_value): Likewise.
200 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
201 (find_init_member): Likewise.
202
e3455240
MP
2032017-05-18 Marek Polacek <polacek@redhat.com>
204
205 * c-decl.c (start_decl): Use false/true instead of 0/1.
206 (grokdeclarator): Likewise.
207 (finish_struct): Likewise.
208 (start_function): Change the return type to bool. Use false/true
209 instead of 0/1.
210 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
211 * c-tree.h (start_function): Update.
212 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
213 (set_designator): Change the return type to bool. Use false/true
214 instead of 0/1.
215
3fa8871b
MP
2162017-05-17 Marek Polacek <polacek@redhat.com>
217
218 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
219 * c-typeck.c: Likewise.
220
142473df
MP
2212017-05-17 Marek Polacek <polacek@redhat.com>
222
223 PR sanitizer/80659
224 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
225 DECL_IGNORED_P even for non-static compound literals.
226
1a817418
ML
2272017-05-17 Martin Liska <mliska@suse.cz>
228
229 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
230 use it instead of int type.
231
b2fa0a8b
MP
2322017-05-17 Marek Polacek <polacek@redhat.com>
233
234 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
235 call c_fully_fold.
236 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
237 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
238 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
239 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
240 save_expr.
241 (c_parser_conditional_expression): Likewise.
242 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
243 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
244 (process_init_element): Likewise.
245 (build_binary_op): Likewise.
246 (handle_omp_array_sections_1): Likewise.
247
1e47f02b
TS
2482017-05-12 Thomas Schwinge <thomas@codesourcery.com>
249
250 * c-parser.c (c_parser_omp_clause_num_gangs)
251 (c_parser_omp_clause_num_workers)
252 (c_parser_omp_clause_vector_length): Merge functions into...
253 (c_parser_oacc_single_int_clause): ... this new function. Adjust
254 all users.
255
c24e924f
NS
2562017-05-11 Nathan Sidwell <nathan@acm.org>
257
258 * gimple-parser.c: Don't #include tree-dump.h.
259
c587104e
MM
2602017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
261
262 PR testsuite/80580
263 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
264
67ac9a9d
MM
2652017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
266
267 PR testsuite/80580
268 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
269 incorrect __MEM syntax.
270
ac4eb40f
MM
2712017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
272
273 PR testsuite/80580
274 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
275 type of unary '*'.
276
641da50a
NS
2772017-05-09 Nathan Sidwell <nathan@acm.org>
278
279 * c-tree.h (pushdecl): Declare.
280
56d35585
DM
2812017-05-05 David Malcolm <dmalcolm@redhat.com>
282
283 * c-decl.c (warn_defaults_to): Replace report_diagnostic
284 with diagnostic_report_diagnostic.
285 * c-errors.c (pedwarn_c99): Likewise.
286 (pedwarn_c90): Likewise.
287
815d9cc6
XR
2882017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
289
290 PR c++/80038
291 * c-gimplify.c (c_gimplify_expr): Remove calls to
292 cilk_gimplifY_call_params_in_spawned_fn.
293
1c4ea66f
DM
2942017-04-25 David Malcolm <dmalcolm@redhat.com>
295
296 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
297 hint for removing extra semicolon.
298
666f7903
JJ
2992017-04-21 Jakub Jelinek <jakub@redhat.com>
300
301 PR c/80468
302 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
303 enabled, set specs->type to integer_type_node.
304
5764ee3c
JW
3052017-04-03 Jonathan Wakely <jwakely@redhat.com>
306
307 * c-array-notation.c: Fix typo in comment.
308
10fa8dfb
MP
3092017-03-29 Marek Polacek <polacek@redhat.com>
310
311 PR c/79730
312 * c-decl.c (finish_decl): Check VAR_P.
313
a9e4a1a5
JJ
3142017-03-27 Jakub Jelinek <jakub@redhat.com>
315
316 PR middle-end/80162
317 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
318 * c-typeck.c (c_mark_addressable): Likewise. Look through
319 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
320 to ARRAY_TYPE.
321 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
322
ee3ff394
MP
3232017-03-23 Marek Polacek <polacek@redhat.com>
324
325 * c-tree.h: Remove a C_RID_YYCODE reference.
326
4d1b8e70
JJ
3272017-03-21 Jakub Jelinek <jakub@redhat.com>
328
329 PR c/80097
330 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
331 optional COMPOUND_EXPR with ubsan instrumentation.
332
31dc71a8
MP
3332017-03-17 Marek Polacek <polacek@redhat.com>
334
335 * c-parser.c: Add C11 references.
336
d579c385
MP
3372017-03-15 Marek Polacek <polacek@redhat.com>
338
339 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
340
85059a38
MP
3412017-03-11 Marek Polacek <polacek@redhat.com>
342
343 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
344
2f6f187a
DM
3452017-03-10 David Malcolm <dmalcolm@redhat.com>
346
347 PR translation/79848
348 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
349 "%qs".
350 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
351
36618428
MP
3522017-03-09 Marek Polacek <polacek@redhat.com>
353
354 PR sanitizer/79757
355 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
356 parameter declarations with initializers.
357
01e5af5a
JJ
3582017-03-09 Jakub Jelinek <jakub@redhat.com>
359
360 PR c/79969
361 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
362 TYPE_STUB_DECL.
363
a71dbc63
JJ
3642017-03-07 Jakub Jelinek <jakub@redhat.com>
365
366 PR c/79834
367 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
368 for "may only be used in compound statements" diagnostics, change it
369 such that the same translatable string is used for all pragmas. For
370 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
371 diagnostics.
372 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
373 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
374 "may only be used in compound statements" diagnostics, such that the
375 same translatable string is used for all pragmas.
376
1ff4bae6
MP
3772017-03-04 Marek Polacek <polacek@redhat.com>
378
379 PR c/79847
380 * c-decl.c (implicit_decl_warning): Add missing space.
381
7f5a7d78
MP
3822017-03-03 Marek Polacek <polacek@redhat.com>
383
384 PR c/79758
385 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
386 current_function_prototype_arg_types is error_mark_node. Fix
387 formatting. Use TREE_VALUE instead of TREE_TYPE.
388
883c8f06
JJ
3892017-03-03 Jakub Jelinek <jakub@redhat.com>
390
79c9b7a8
JJ
391 PR c/79837
392 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
393 %<min%> or %<max%> in the diagnostics, instead mention identifier.
394 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
395 diagnostics.
396
883c8f06
JJ
397 PR c/79836
398 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
399 instead of %<_Generic>.
400 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
401 (c_parser_omp_target_exit_data): Use %<release%> instead of
402 %<release>.
403
324ff1a0
JJ
4042017-02-28 Jakub Jelinek <jakub@redhat.com>
405
406 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
407 instead of just cond ? "..." : "...".
408 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
409 for "enter"/"exit" keyword.
410 (c_finish_oacc_routine): Don't use %s to supply portions of the
411 message.
412
4227c9ad
JJ
4132017-02-24 Jakub Jelinek <jakub@redhat.com>
414
415 PR c++/79588
416 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
417 handle -Wrestrict here.
418 * c-typeck.c (build_function_call_vec): Adjust
419 check_function_arguments caller.
420
5d972e66
RB
4212017-02-23 Richard Biener <rguenther@suse.de>
422
423 PR c/79684
424 * gimple-parser.c (c_parser_gimple_statement): Use set_error
425 to initialize c_exprs to return.
426 (c_parser_gimple_binary_expression): Likewise.
427 (c_parser_gimple_unary_expression): Likewise.
428 (c_parser_gimple_postfix_expression): Likewise.
429
61ac5ebe
MP
4302017-02-22 Marek Polacek <polacek@redhat.com>
431
432 PR c/79662
433 * c-typeck.c (convert_arguments): Handle error_mark_node.
434
41d1b0b1
PK
4352017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
436
437 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
438 value of c_parser_parse_ssa_name against error_mark_node and emit
439 error if ssa name is anonymous and written as default definition.
440
eab1f169
PK
4412017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
442
443 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
444 FMA_EXPR.
445
bcac0b4d
JJ
4462017-02-16 Jakub Jelinek <jakub@redhat.com>
447
448 PR c++/79512
449 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
450 ignore #pragma omp target even when not followed by identifier.
451
1be33173
PK
4522017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
453
454 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
455 (c_parser_gimple_unary_expression): Likewise.
456
aa326bfb
JJ
4572017-02-13 Jakub Jelinek <jakub@redhat.com>
458
459 * c-parser.c (c_parser_oacc_declare): Add missing space in
460 diagnostics.
461
8a398bc5
PK
4622017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
463
464 PR c/79478
465 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
466 set_c_expr_source_range when parsing ssa-name.
467
3dcde5ef
PG
4682017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
469 Richard Biener <rguenther@suse.de>
470
471 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
472 building IL when arguments are error_mark_node.
473 (c_parser_gimple_unary_expression): Likewise.
474 (c_parser_gimple_if_stmt): Likewise.
475 (c_parser_gimple_switch_stmt): Likewise.
476 (c_parser_gimple_return_stmt): Likewise.
477 (c_parser_parse_ssa_name): When name lookup fails do not build
478 an SSA name. Use undeclared rather than not declared in error
479 reporting.
480
192b048b
MP
4812017-02-09 Marek Polacek <polacek@redhat.com>
482
483 PR c/79428
484 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
485 instead of c_parser_skip_until_found.
486
56f71478
JJ
4872017-02-09 Jakub Jelinek <jakub@redhat.com>
488
489 PR c/79431
490 * c-parser.c (c_parser_omp_declare_target): Don't invoke
491 symtab_node::get on automatic variables.
492
02889d23
CLT
4932016-02-09 Nathan Sidwell <nathan@codesourcery.com>
494 Chung-Lin Tang <cltang@codesourcery.com>
495
496 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
497 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
498 semantic checking.
499 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
500
7af4b20d
RB
5012017-02-07 Richard Biener <rguenther@suse.de>
502
503 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
504 (c_parser_gimple_postfix_expression_after_primary):
505 Do not use c_build_function_call_vec to avoid folding and promotion.
506 Simplify.
507
e5e391d6
MO
5082017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
509
510 PR lto/79061
511 * c-decl.c (pop_scope): Pass main_input_filename to
512 build_translation_unit_decl.
513
c2e84327
DM
5142017-01-24 David Malcolm <dmalcolm@redhat.com>
515
516 * c-parser.c: Include "read-rtl-function.h" and
517 "run-rtl-passes.h".
518 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
519 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
520 production. Update for renaming of field "gimple_pass" to
521 "gimple_or_rtl_pass". If __RTL was seen, call
522 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
523 to an auto_timevar, to cope with early exit.
524 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
525 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
526 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
527 Handle RID_RTL.
528 (c_parser_parse_rtl_body): New function.
529 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
530 (struct c_declspecs): Rename field "gimple_pass" to
531 "gimple_or_rtl_pass". Add field "rtl_p".
532 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
533 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
534 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
535 (c_parser_gimple_or_rtl_pass_list): ...this.
536
2ebd93e1
MP
5372017-01-20 Marek Polacek <polacek@redhat.com>
538
539 PR c/64279
540 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
541
b1c95bb5
RB
5422017-01-13 Richard Biener <rguenther@suse.de>
543
544 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
545 nops.
546
25329913
RB
5472017-01-13 Richard Biener <rguenther@suse.de>
548
549 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
550 _Literal ( type-name ) number.
551
6bb4ea5c
RB
5522017-01-12 Richard Biener <rguenther@suse.de>
553
554 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
555 __MEM.
556
6b5b4e9c
JJ
5572017-01-11 Jakub Jelinek <jakub@redhat.com>
558
559 PR c++/72813
560 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
561 PCH file.
562
e3252775
RB
5632017-01-11 Richard Biener <rguenther@suse.de>
564
565 PR bootstrap/79052
566 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
567 returns on parse errors.
568
a9342885
MP
5692017-01-04 Marek Polacek <polacek@redhat.com>
570
571 PR c++/64767
572 * c-parser.c (c_parser_postfix_expression): Mark zero character
573 constants by setting original_type in c_expr.
574 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
575 with a zero character constant.
576 (char_type_p): New function.
577
5dd9a9d0
DM
5782017-01-04 David Malcolm <dmalcolm@redhat.com>
579
580 * c-parser.c (c_parser_declaration_or_fndef): Create a
581 rich_location at init_loc and parse it to start_init.
582 (last_init_list_comma): New global.
583 (c_parser_braced_init): Update last_init_list_comma when parsing
584 commas. Pass it to pop_init_level. Pass location of closing
585 brace to pop_init_level.
586 (c_parser_postfix_expression_after_paren_type): Create a
587 rich_location at type_loc and parse it to start_init.
588 (c_parser_omp_declare_reduction): Likewise for loc.
589 * c-tree.h (start_init): Add rich_location * param.
590 (pop_init_level): Add location_t param.
591 * c-typeck.c (struct initializer_stack): Add field
592 "missing_brace_richloc".
593 (start_init): Add richloc param, use it to initialize
594 the stack node's missing_brace_richloc.
595 (last_init_list_comma): New decl.
596 (finish_implicit_inits): Pass last_init_list_comma to
597 pop_init_level.
598 (push_init_level): When finding missing open braces, add fix-it
599 hints to the richloc.
600 (pop_init_level): Add "insert_before" param and pass it
601 when calling pop_init_level. Add fixits about missing
602 close braces to any richloc. Use the richloc for the
603 -Wmissing-braces warning.
604 (set_designator): Pass last_init_list_comma to pop_init_level.
605 (process_init_element): Likewise.
606
cbe34bb5
JJ
6072017-01-01 Jakub Jelinek <jakub@redhat.com>
608
609 Update copyright years.
610
d17680f3
JJ
6112016-12-21 Jakub Jelinek <jakub@redhat.com>
612
0dba7960
JJ
613 PR bootstrap/78817
614 * c-typeck.c (build_function_call_vec): If check_function_arguments
615 returns true, set TREE_NO_WARNING on CALL_EXPR.
616
d17680f3
JJ
617 PR c/77767
618 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
619 to *expr instead of overwriting it.
620
aa90531e
RB
6212016-12-20 Richard Biener <rguenther@suse.de>
622
623 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
624 error recovery.
625 (c_parser_gimple_statement): Only build assigns for non-error
626 stmts.
627 (c_parser_gimple_postfix_expression_after): Improve error recovery.
628
629b3d75
MJ
6292016-12-14 Martin Jambor <mjambor@suse.cz>
630
631 * c-parser.c: Include omp-general.h and omp-offload.h instead of
632 omp-low.h.
633 (c_finish_oacc_routine): Adjusted call to
634 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
635 to use their new names.
636 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
637 use its new name.
638 (c_parser_oacc_update): Likewise.
639 (c_parser_omp_simd): Likewise.
640 (c_parser_omp_target_update): Likewise.
641 * c-typeck.c: Include omp-general.h instead of omp-low.h.
642 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
643 name.
644 (c_finish_omp_cancellation_point): Likewise.
645 * gimple-parser.c: Do not include omp-low.h
646
c5af52eb
CP
6472016-12-02 Cesar Philippidis <cesar@codesourcery.com>
648 James Norris <jnorris@codesourcery.com>
649
650 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
651 EXIT_DATA,WAIT} are not used in compound statements.
652 (c_parser_oacc_enter_exit_data): Update diagnostics.
653
48330c93
BE
6542016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
655
656 PR c++/71973
657 * c-decl.c (diagnose_mismatched_decls): Use
658 OPT_Wbuiltin_declaration_mismatch here too.
659
899ca90e 6602016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
661 Alan Hayward <alan.hayward@arm.com>
662 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
663
664 * c-decl.c (merge_decls): Use SET_DECL_MODE.
665 (make_label, finish_struct): Likewise.
666
1ee62b92 6672016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 668 Richard Biener <rguenther@suse.de>
22b15758 669
8e745a17
JJ
670 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
671 * config-lang.in (gtfiles): Add c/c-parser.h.
672 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
673 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
674 * c-parser.c (enum c_id_kind, struct c_token,
675 c_parser_next_token_is, c_parser_next_token_is_not,
676 c_parser_next_token_is_keyword,
677 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
678 Split out to ...
679 * c-parser.h: ... new header.
680 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 681 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
682 c_token_starts_typename, c_parser_next_token_starts_declspecs,
683 c_parser_next_tokens_start_declaration, c_parser_consume_token,
684 c_parser_error, c_parser_require, c_parser_skip_until_found,
685 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
686 c_parser_type_name): Export.
687 (c_parser_tokens_buf): New function.
688 (c_parser_error): Likewise.
689 (c_parser_set_error): Likewise.
690 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
691 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
692 via c_parser_parse_gimple_body.
8e745a17
JJ
693 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
694 c_token_starts_typename, c_parser_next_token_starts_declspecs,
695 c_parser_next_tokens_start_declaration, c_parser_consume_token,
696 c_parser_error, c_parser_require, c_parser_skip_until_found,
697 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
698 c_parser_type_name): Declare.
1ee62b92
PG
699 (struct c_parser): Declare forward.
700 (c_parser_tokens_buf): Declare.
8e745a17
JJ
701 (c_parser_error): Likewise.
702 (c_parser_set_error): Likewise.
703 * gimple-parser.c: New file.
704 * gimple-parser.h: Likewise.
1ee62b92 705
22b15758
UB
7062016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
707
708 PR c/35503
709 * c-parser.c (c_parser_postfix_expression_after_primary): Call
710 warn_for_restrict.
711
84ff4775
LCW
7122016-09-11 Le-Chun Wu <lcwu@google.com>
713 Mark Wielaard <mjw@redhat.com>
714
715 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
716 to the given -Wshadow= variant.
717
4d0cdd0c
TP
7182016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
719
720 * c-typeck.c: Include memmodel.h.
721
1202f33e
JJ
7222016-10-13 Jakub Jelinek <jakub@redhat.com>
723
724 PR target/77957
725 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
726 instead of lhd_return_null_tree_v.
727
8a14afd0
BS
7282016-10-07 Bernd Schmidt <bschmidt@redhat.com>
729
730 PR c++/69733
731 * c-decl.c (smallest_type_quals_location): New static function.
732 (grokdeclarator): Try to find the correct location for an ignored
733 qualifier.
734
81fea426
MP
7352016-09-26 Marek Polacek <polacek@redhat.com>
736
737 PR c/7652
738 * c-decl.c (pop_scope): Add gcc_fallthrough.
739
7402016-09-26 Marek Polacek <polacek@redhat.com>
741
742 PR c/7652
743 * c-parser.c (struct c_token): Add flags field.
744 (c_lex_one_token): Pass it to c_lex_with_flags.
745 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
746 into IFN_FALLTHROUGH.
747 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
748 attribute fallthrough after a case label or default label.
749 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
750
9a2300e9
MP
7512016-09-24 Marek Polacek <polacek@redhat.com>
752
753 PR c/77490
754 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
755 have boolean value. Warn about ++/-- on booleans.
756
7de76362
JJ
7572016-09-23 Jakub Jelinek <jakub@redhat.com>
758
759 * c-parser.c (incomplete_record_decls): Remove unnecessary
760 = vNULL initialization of file scope vec.
761
5b73d2ab
MP
7622016-09-16 Marek Polacek <polacek@redhat.com>
763
764 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
765
e51fbec3
MP
7662016-09-14 Marek Polacek <polacek@redhat.com>
767
768 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
769 (fix_array_notation_expr): Likewise.
770 * c-decl.c (finish_decl): Likewise.
771 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
772 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
773 (function_to_pointer_conversion): Use false instead of 0.
774 (convert_lvalue_to_rvalue): Likewise.
775 (parser_build_unary_op): Likewise.
776 (build_atomic_assign): Likewise.
777 (build_unary_op): Change nonconvert parameter type to bool, use
778 true/false instead of 1/0.
779 (build_binary_op): Use true instead of 1.
780
254830ba
DM
7812016-09-13 David Malcolm <dmalcolm@redhat.com>
782
783 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
784 of add_fixit_insert to add_fixit_insert_before.
785
4c13ba17
MP
7862016-09-13 Marek Polacek <polacek@redhat.com>
787
788 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
789 it.
790
54dcdb88
BE
7912016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
792
793 PR c++/77496
794 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
795 COMPOUND_EXPR to warn_for_omitted_condop.
796
e5106e27
DM
7972016-09-07 David Malcolm <dmalcolm@redhat.com>
798
799 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
800 c_get_substring_location for this new langhook.
801
9dc5773f
JJ
8022016-09-02 Jakub Jelinek <jakub@redhat.com>
803
804 PR c/65467
805 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
806 flag_openmp.
807 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
808 instead of mark_exp_read on low_bound/length expression.
809 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
810 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
811 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
812 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
813 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
814 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
815 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
816 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
817 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
818 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
819 instead of mark_expr_read.
820 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
821 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
822 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
823 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
824 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
825 array section bases outside of depend clause, for depend clause
826 use convert_lvalue_to_rvalue on the base.
827 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
828 linear, aligned, map, to and from clauses.
829 (c_omp_clause_copy_ctor): New function.
830
295844f6
MP
8312016-09-01 Marek Polacek <polacek@redhat.com>
832
833 PR c/7652
834 * c-typeck.c (composite_type): Add FALLTHRU comment.
835
089af25c
DM
8362016-08-31 David Malcolm <dmalcolm@redhat.com>
837
838 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
839 to the insertion fixits for "struct", "union", and "enum".
840
f9087798
DM
8412016-08-30 David Malcolm <dmalcolm@redhat.com>
842
843 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
844 rather than add_fixit_misspelled_id.
845 (undeclared_variable): Likewise.
846 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
847 now-redundant "here" params from add_fixit_insert method calls.
848 (c_parser_parameter_declaration): Likewise.
849 * c-typeck.c (build_component_ref): Remove now-redundant range
850 param from add_fixit_replace method calls.
851
ebef225f
MP
8522016-08-25 Marek Polacek <polacek@redhat.com>
853
854 * c-typeck.c (parser_build_binary_op): Pass LHS to
855 warn_logical_not_parentheses.
856
fe377a48
MP
8572016-08-25 Marek Polacek <polacek@redhat.com>
858
859 PR c/77323
860 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
861 or _FloatN or _FloatNx is not supported.
862 (finish_declspecs): Set type to integer_type_node when _FloatN or
863 _FloatNx is not supported.
864
c65699ef
JM
8652016-08-19 Joseph Myers <joseph@codesourcery.com>
866
867 PR c/32187
868 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
869 (struct c_declspecs): Add field floatn_nx_idx.
870 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
871 and _FloatNx type specifiers.
872 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
873 (c_parser_declspecs, c_parser_attribute_any_word)
874 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
875 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
876 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
877 narrower than double.
878
2f1364c2
JJ
8792016-08-12 Jakub Jelinek <jakub@redhat.com>
880 Martin Liska <mliska@suse.cz>
881
882 PR c/67410
883 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
884 % to determine val element to change. Assert that
885 wchar_bytes * charwidth fits into val array.
886
191816a3
MP
8872016-08-12 Marek Polacek <polacek@redhat.com>
888
889 PR c/7652
890 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
891 (c_parser_postfix_expression): Likewise.
892 * c-typeck.c (build_unary_op): Adjust fall through comment.
893 (c_mark_addressable): Likewise.
894
b95a64bb
JJ
8952016-08-11 Jakub Jelinek <jakub@redhat.com>
896
897 PR c/72816
898 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
899 array member through typedef, for orig_qual_indirect == 0 clear
900 orig_qual_type.
901
895aa8e1
DM
9022016-08-08 David Malcolm <dmalcolm@redhat.com>
903
904 PR c/64955
905 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
906 this up to selftest::run_c_tests.
907 (selftest::run_c_tests): New function.
908
0b212d8c
TS
9092016-08-04 Thomas Schwinge <thomas@codesourcery.com>
910
ae9281fc
TS
911 * c-parser.c (struct oacc_routine_data): Add error_seen and
912 fndecl_seen members.
913 (c_finish_oacc_routine): Use these.
914 (c_parser_declaration_or_fndef): Adjust.
915 (c_parser_oacc_routine): Likewise. Support more C language
916 constructs, and improve diagnostics. Move pragma context
917 checking...
918 (c_parser_pragma): ... here.
919
0b212d8c
TS
920 * c-parser.c (struct oacc_routine_data): New.
921 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
922 Simplify code.
923 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
924 declare target" attribute.
925
76e2c821
JB
9262016-08-01 Jan Beulich <jbeulich@suse.com>
927
928 * c-fold.c (c_fully_fold_internal): Also emit shift count
929 warnings for vector types.
930 * c-typeck.c (build_binary_op): Likewise.
931
f618a472
MP
9322016-07-29 Marek Polacek <polacek@redhat.com>
933
934 PR c/71742
935 * c-decl.c (finish_struct): Rephrase an error message.
936
efd0786f
MP
937 PR c/71853
938 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
939 to error node for invalid code.
940
e00dceaf
MP
941 PR c/71573
942 * c-decl.c (implicitly_declare): Return decl early not only for
943 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
944
673a107a
JJ
9452016-07-29 Jakub Jelinek <jakub@redhat.com>
946
947 PR c/71969
948 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
949 on GNU extern inline functions.
950
a5b5c8b6
MP
9512016-07-29 Marek Polacek <polacek@redhat.com>
952
953 PR c/71583
954 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
955 check expr.value.
956
e3fe09c1
UB
9572016-07-22 Uros Bizjak <ubizjak@gmail.com>
958
959 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
960
7c8f7eaa
DM
9612016-07-20 David Malcolm <dmalcolm@redhat.com>
962
963 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
964 spellcheck-tree.h
965 (best_macro_match): Likewise, converting from a typedef to a
966 subclass.
967 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
968 (lookup_name_fuzzy): Update for change of best_macro_match to a
969 subclass with a ctor that calls cpp_forall_identifiers.
970
de6a69ee
DM
9712016-07-20 David Malcolm <dmalcolm@redhat.com>
972
973 * c-decl.c (implicit_decl_warning): Update for conversion of
974 return type of lookup_name_fuzzy to const char *.
975 (undeclared_variable): Likewise.
976 (lookup_name_fuzzy): Convert return type from tree to
977 const char *.
978 * c-parser.c (c_parser_declaration_or_fndef): Update for
979 conversion of return type of lookup_name_fuzzy to const char *.
980 (c_parser_parameter_declaration): Likewise.
981
b1c9c068
CP
9822016-07-15 Cesar Philippidis <cesar@codesourcery.com>
983
984 * c-parser.c (c_parser_oacc_declare): Don't scan for
985 GOMP_MAP_POINTER.
986 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
987 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
988 zero-length subarrays.
989
ddbbcb19
JJ
9902016-07-15 Jakub Jelinek <jakub@redhat.com>
991
992 PR c/71858
993 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
994 instead of FUZZY_LOOKUP_NAME.
995 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
996 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
997
dd36b877
JJ
9982016-07-14 Jakub Jelinek <jakub@redhat.com>
999
1000 PR c/71858
1001 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1002
8c681247
TS
10032016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1004
1005 * c-parser.c (c_parser_generic_selection): Make type of variable
1006 auto_vec.
1007 (c_parser_omp_declare_simd): Likewise.
1008
bf4fa671
TS
10092016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1010
1011 * c-decl.c (struct c_struct_parse_info): Change member types
1012 from vec to auto_vec.
1013 (start_struct): Adjust.
1014 (finish_struct): Likewise.
1015
557e8c49
JJ
10162016-07-02 Jakub Jelinek <jakub@redhat.com>
1017
1018 PR c/71719
1019 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1020
54d19c3b
TS
10212016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1022
1023 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1024 Move pragma context checking into...
1025 (c_parser_omp_cancellation_point): ... here, and improve
1026 diagnostic messages.
1027 * c-typeck.c (c_finish_omp_cancel)
1028 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1029
152ef731
JJ
10302016-06-29 Jakub Jelinek <jakub@redhat.com>
1031
1032 PR c/71685
1033 * c-typeck.c (c_build_qualified_type): Don't clear
1034 C_TYPE_INCOMPLETE_VARS for the main variant.
1035
10362016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1037
1038 PR c/71552
1039 * c-typeck.c (output_init_element): Diagnose incompatible types
1040 before non-constant initializers.
1041
e9ac1f86
JJ
10422016-06-28 Jakub Jelinek <jakub@redhat.com>
1043
1044 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1045
277d7ee0
AK
10462016-06-23 Andi Kleen <ak@linux.intel.com>
1047
1048 * Make-lang.in: Add support for autofdo.
1049
1a4f11c8
DM
10502016-06-22 David Malcolm <dmalcolm@redhat.com>
1051
1052 PR c/70339
1053 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1054 (implicit_decl_warning): When issuing warnings for implicit
1055 declarations, attempt to provide a suggestion via
1056 lookup_name_fuzzy.
1057 (undeclared_variable): Likewise when issuing errors.
1058 (lookup_name_in_scope): Likewise.
1059 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1060 (best_macro_match): New typedef.
1061 (find_closest_macro_cpp_cb): New function.
1062 (lookup_name_fuzzy): New function.
1063 * c-parser.c: Include gcc-rich-location.h.
1064 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1065 (c_keyword_starts_typename): ...this new function.
1066 (c_parser_declaration_or_fndef): When issuing errors about
1067 missing "struct" etc, add a fixit. For other kinds of errors,
1068 attempt to provide a suggestion via lookup_name_fuzzy.
1069 (c_parser_parms_declarator): When looking ahead to detect typos in
1070 type names, also reject CPP_KEYWORD.
1071 (c_parser_parameter_declaration): When issuing errors about
1072 unknown type names, attempt to provide a suggestion via
1073 lookup_name_fuzzy.
1074 * c-tree.h (c_keyword_starts_typename): New prototype.
1075
5a578671
JM
10762016-06-20 Joseph Myers <joseph@codesourcery.com>
1077
1078 PR c/71601
1079 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1080 c_common_type returns error_mark_node.
1081
3f8257db 10822016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1083
1084 PR c/69507
1085 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1086 __alignof__ (expression).
1087
6a3f203c
DM
10882016-06-14 David Malcolm <dmalcolm@redhat.com>
1089
1090 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1091
264757fb
DM
10922016-06-14 David Malcolm <dmalcolm@redhat.com>
1093
1094 * c-typeck.c (build_component_ref): Simplify fixit code by
1095 using gcc_rich_location::add_fixit_misspelled_id.
1096 (set_init_label): Likewise.
1097
f7e4f2e3
DM
10982016-06-13 David Malcolm <dmalcolm@redhat.com>
1099
1100 * c-parser.c (c_parser_initelt): Provide location of name for new
1101 location_t param of set_init_label.
1102 * c-tree.h (set_init_label): Add location_t param.
1103 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1104 param and use it when issuing error messages about unrecognized
1105 field names. Attempt to provide a fixit hint if appropriate,
1106 otherwise update the error message to provide the type name.
1107
4b1ffdb1
TS
11082016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1109
1110 PR c/71381
1111 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1112 Loosen checking.
1113
44a845ca
MS
11142016-06-08 Martin Sebor <msebor@redhat.com>
1115 Jakub Jelinek <jakub@redhat.com>
1116
1117 PR c++/70507
1118 PR c/68120
1119 * c-typeck.c (convert_arguments): Don't promote last argument
1120 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1121
92a5f2ba
MP
11222016-06-08 Marek Polacek <polacek@redhat.com>
1123
1124 PR c/71418
1125 * c-decl.c (grokdeclarator): Check TYPE_P.
1126
08203f73
MP
1127 PR c/71426
1128 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1129 code.
1130
6ffd47b7
DM
11312016-06-07 David Malcolm <dmalcolm@redhat.com>
1132
1133 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1134 and structure element reference, capture the location of the
1135 element name token and pass it to build_component_ref.
1136 (c_parser_postfix_expression_after_primary): Likewise for
1137 structure element dereference.
1138 (c_parser_omp_variable_list): Likewise for
1139 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1140 * c-tree.h (build_component_ref): Add location_t param.
1141 * c-typeck.c (build_component_ref): Add location_t param
1142 COMPONENT_LOC. Use it, if available, when issuing hints about
1143 mispelled member names to provide a fixit replacement hint.
1144
1f40cff3
MP
11452016-06-06 Marek Polacek <polacek@redhat.com>
1146
1147 PR c/71362
1148 * c-parser.c (c_parser_direct_declarator): Set location.
1149
5545a907
MP
11502016-06-06 Marek Polacek <polacek@redhat.com>
1151
1152 * c-typeck.c (comptypes_internal): Handle comparisons of
1153 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1154 TYPE_REF_CAN_ALIAS_ALL.
1155
b605f663
CLT
11562016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1157
1158 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1159 arguments as addressable when async clause exists.
1160
00631022
JJ
11612016-05-30 Jakub Jelinek <jakub@redhat.com>
1162
1163 PR c++/71349
1164 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1165 when combined with target construct.
1166
7211a097
JJ
11672016-05-26 Jakub Jelinek <jakub@redhat.com>
1168
1169 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1170 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1171
95efe6b6
MP
11722016-05-25 Marek Polacek <polacek@redhat.com>
1173
1174 PR c/71265
1175 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1176
a23faf7a
MP
1177 PR c/71266
1178 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1179
e46c7770
CP
11802016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1181
1182 * c-parser.c (c_parser_oacc_declare): Add support for
1183 GOMP_MAP_FIRSTPRIVATE_POINTER.
1184 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1185 argument with enum c_omp_region_type ort.
1186 (handle_omp_array_sections): Likewise. Update call to
1187 handle_omp_array_sections_1.
1188 (c_finish_omp_clauses): Add specific errors and warning messages for
1189 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1190 call to handle_omp_array_sections.
1191
a04e69c0
TS
11922016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1193
1194 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1195
f17a223d
RB
11962016-05-24 Richard Biener <rguenther@suse.de>
1197
1198 PR middle-end/70434
1199 PR c/69504
1200 * c-typeck.c (build_array_ref): Do not complain about indexing
1201 non-lvalue vectors. Adjust for function name change.
1202
79063edd
MS
12032016-05-20 Martin Sebor <msebor@redhat.com>
1204
1205 PR c/71115
1206 * c-typeck.c (error_init): Use
1207 expansion_point_location_if_in_system_header.
1208 (warning_init): Same.
1209
8a40fef3
DM
12102016-05-19 David Malcolm <dmalcolm@redhat.com>
1211
1212 PR c/71171
1213 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1214 in error-handling.
1215 (c_parser_postfix_expression): Likewise.
1216 * c-tree.h (c_expr::set_error): New method.
1217 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1218 that result's range is initialized.
1219
e9892350
JG
12202016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1221
1222 * c-typeck.c (parser_build_unary_op): Fix formatting.
1223
8fad45f5
MW
12242016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1225
1226 * c-decl.c (grokdeclarator): Remove errmsg and use of
1227 targetm.invalid_return_type.
1228 (grokparms): Remove errmsg and use of
1229 targetm.invalid_parameter_type.
1230
aa4b467b
JM
12312016-05-13 Joseph Myers <joseph@codesourcery.com>
1232
1233 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1234 function return type.
1235
4f2e1536
MP
12362016-05-12 Marek Polacek <polacek@redhat.com>
1237
1238 PR c/70756
1239 * c-decl.c (build_compound_literal): Pass LOC down to
1240 c_incomplete_type_error.
1241 * c-tree.h (require_complete_type): Adjust declaration.
1242 (c_incomplete_type_error): Likewise.
1243 * c-typeck.c (require_complete_type): Add location parameter, pass it
1244 down to c_incomplete_type_error.
1245 (c_incomplete_type_error): Add location parameter, pass it down to
1246 error_at.
1247 (build_component_ref): Pass location down to c_incomplete_type_error.
1248 (default_conversion): Pass location down to require_complete_type.
1249 (build_array_ref): Likewise.
1250 (build_function_call_vec): Likewise.
1251 (convert_arguments): Likewise.
1252 (build_unary_op): Likewise.
1253 (build_c_cast): Likewise.
1254 (build_modify_expr): Likewise.
1255 (convert_for_assignment): Likewise.
1256 (c_finish_omp_clauses): Likewise.
1257
d6e83a8d
MM
12582016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1259
1260 PR c/43651
1261 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1262 is enabled.
1263 * c-errors.c (pedwarn_c90): Return true if warned.
1264 * c-tree.h (pedwarn_c90): Change return type to bool.
1265 (enum c_declspec_word): Add new enumerator cdw_atomic.
1266
5c3a10fb
MP
12672016-05-11 Marek Polacek <polacek@redhat.com>
1268
1269 PR c++/71024
1270 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1271 diagnose_mismatched_attributes and call it.
1272
cf68d92c
MP
12732016-05-10 Marek Polacek <polacek@redhat.com>
1274
1275 PR c/70255
1276 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1277 on a declaration following the definition.
1278
351f85c5
JJ
12792016-05-05 Jakub Jelinek <jakub@redhat.com>
1280
1281 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1282 parse it through to c_parser_c99_block_statement.
1283 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1284 caller.
1285
deef7113
MP
12862016-05-04 Marek Polacek <polacek@redhat.com>
1287
1288 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1289 OPT_Wdangling_else.
1290
de55efd5
MP
12912016-05-04 Marek Polacek <polacek@redhat.com>
1292
1293 PR c/48778
1294 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1295 for macro expansions.
1296
79ce98bc
MP
12972016-05-03 Marek Polacek <polacek@redhat.com>
1298
1299 PR c/70859
1300 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1301 check_builtin_function_arguments.
1302
fb2647aa
RB
13032016-05-03 Richard Biener <rguenther@suse.de>
1304
1305 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1306 the checksum from the previous stage.
1307
77886428
CP
13082016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1309
1310 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1311 c_finish_omp_clauses.
1312 (c_parser_omp_all_clauses): Likewise.
1313 (c_parser_oacc_cache): Likewise.
1314 (c_parser_oacc_loop): Likewise.
1315 (omp_split_clauses): Likewise.
1316 (c_parser_omp_declare_target): Likewise.
1317 (c_parser_cilk_all_clauses): Likewise.
1318 (c_parser_cilk_for): Likewise.
1319 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1320 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1321
7176a4a0
MP
13222016-05-02 Marek Polacek <polacek@redhat.com>
1323
1324 PR c/70851
1325 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1326 incomplete type.
1327
e7ff0319
CP
13282016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1329
1330 PR middle-end/70626
1331 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1332 OACC_LOOP_CLAUSE_MASK.
1333 (c_parser_oacc_kernels_parallel): Update call to
1334 c_oacc_split_loop_clauses.
1335
9f405ce1
AM
13362016-04-28 Andrew MacLeod <amacleod@redhat.com>
1337
1338 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1339 argument to build_modify_expr in two cases.
1340
c1e1f433
BS
13412016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1342
1343 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1344 warn_for_memset instead of warning directly here.
1345
2448a956
MP
13462016-04-26 Marek Polacek <polacek@redhat.com>
1347
1348 PR c/67784
1349 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1350 out of ...
1351 (c_parser_for_statement): ... here.
1352 (c_parser_if_statement): Use it.
1353 (c_parser_switch_statement): Use it.
1354 (c_parser_while_statement): Use it.
1355
b02a5e26
MP
1356 PR c/70791
1357 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1358
477d4906
IV
13592016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1360
1361 PR c++/69363
1362 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1363 instead of c_finish_cilk_clauses.
1364 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1365 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1366 floating-point variables in the linear clause for Cilk Plus.
1367
fe37c7af
MM
13682016-04-18 Michael Matz <matz@suse.de>
1369
1370 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1371 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1372
949505a9
MP
13732016-04-15 Marek Polacek <polacek@redhat.com>
1374
1375 PR c/70671
1376 * c-typeck.c (build_unary_op): Pass location down to error and
1377 warning call.
1378
dda1bf61
JJ
13792016-04-15 Jakub Jelinek <jakub@redhat.com>
1380
1381 PR c/70436
1382 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1383 where needed.
1384 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1385 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1386 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1387 Adjust c_parser_pragma callers.
1388 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1389 caller.
1390 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1391 c_parser_statement.
1392 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1393 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1394 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1395 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1396 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1397 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1398 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1399 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1400 down where needed.
1401 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1402 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1403 calls.
1404
99cd9857
MP
14052016-04-13 Marek Polacek <polacek@redhat.com>
1406
1407 PR c/70436
1408 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1409 adjust callers.
1410 (c_parser_statement): Likewise.
1411 (c_parser_c99_block_statement): Likewise.
1412 (c_parser_while_statement): Likewise.
1413 (c_parser_for_statement): Likewise.
1414 (c_parser_if_body): Don't set IF_P here.
1415 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1416 about dangling else here.
1417 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1418 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1419 warn about dangling else here.
1420
f13355da
MP
14212016-04-04 Marek Polacek <polacek@redhat.com>
1422
1423 PR c/70307
1424 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1425
5fde6a45
MP
14262016-03-31 Marek Polacek <polacek@redhat.com>
1427
1428 PR c/70297
1429 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1430
4bbf545b
DM
14312016-03-18 David Malcolm <dmalcolm@redhat.com>
1432
1433 PR c/70281
1434 * c-parser.c (c_parser_postfix_expression): Set the source range
1435 for uses of "__builtin_types_compatible_p".
1436
fcc2b74f
JJ
14372016-03-17 Jakub Jelinek <jakub@redhat.com>
1438
1439 PR c/70280
1440 * c-typeck.c (composite_type): Don't count void_list_node
1441 into len, if the list is terminated by void_list_node, start
1442 with void_list_node instead of NULL for newargs. Stop
1443 at void_list_node.
1444
ab4c578f
MP
14452016-03-16 Marek Polacek <polacek@redhat.com>
1446
1447 PR c/70093
1448 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1449 nested functions returning VM types.
1450
96b3c82d
CP
14512016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1452
1453 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1454 when calling c_finish_omp_clauses.
1455
29b9828f
BS
14562016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1457
1458 PR c/69824
1459 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1460 for later.
1461
7ff6ca38
MP
14622016-03-04 Marek Polacek <polacek@redhat.com>
1463
1464 PR c/69798
1465 * c-parser.c (c_parser_postfix_expression): Call
1466 c_parser_cast_expression rather than c_parser_postfix_expression.
1467
686e2237
JJ
14682016-03-01 Jakub Jelinek <jakub@redhat.com>
1469
1470 PR c/69796
1471 PR c/69974
1472 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1473 of incomplete decls to error_mark_node.
1474
0b05329b
MP
14752016-02-24 Marek Polacek <polacek@redhat.com>
1476
1477 PR c/69819
1478 * c-decl.c (finish_decl): Don't update the copy of the type of a
1479 different decl type.
1480
067fbd8b
JJ
14812016-02-23 Jakub Jelinek <jakub@redhat.com>
1482
1483 PR objc/69844
1484 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1485 in id_kind reclassification.
1486
bf14eba2
JJ
14872016-02-16 Jakub Jelinek <jakub@redhat.com>
1488
1489 PR c/69835
1490 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1491
ba539195
JN
14922016-02-16 James Norris <jnorris@codesourcery.com>
1493
1494 PR c/64748
1495 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1496
16595a1f
BS
14972016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1498
f48dfe98
BS
1499 * c-decl.c (build_null_declspecs): Zero the entire struct.
1500
16595a1f
BS
1501 PR c/69522
1502 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1503 callers changed. If nested_p is true, use it to call
1504 finish_implicit_inits.
1505 * c-tree.h (finish_implicit_inits): Declare.
1506 * c-typeck.c (finish_implicit_inits): New function. Move code
1507 from ...
1508 (push_init_level): ... here.
1509 (set_designator, process_init_element): Call finish_implicit_inits.
1510
66756373
JJ
15112016-02-11 Jakub Jelinek <jakub@redhat.com>
1512
1513 PR c/69768
1514 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1515 arguments for -Waddress warning.
1516
1066e9b5
JJ
15172016-02-04 Jakub Jelinek <jakub@redhat.com>
1518
1519 PR c/69669
1520 * c-decl.c (finish_enum): When honoring mode attribute,
1521 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1522
3a5d2ba4
JJ
15232016-01-29 Jakub Jelinek <jakub@redhat.com>
1524
1525 PR debug/69518
1526 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1527 all type variants, not just TYPE_MAIN_VARIANT.
1528
cbdd8ae0
JJ
15292016-01-27 Jakub Jelinek <jakub@redhat.com>
1530
1531 PR debug/66869
1532 * c-decl.c (c_write_global_declarations_1): Warn with
1533 warn_unused_function if static prototype without definition
1534 is not C_DECL_USED.
1535
fa74a4bc
MP
15362016-01-27 Marek Polacek <polacek@redhat.com>
1537
1538 PR c/68062
1539 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1540 to unsigned, if needed. Add -Wsign-compare warning.
1541
13f92e8d
JJ
15422016-01-26 Jakub Jelinek <jakub@redhat.com>
1543
1544 PR tree-optimization/69483
1545 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1546
cd8e73dc 15472016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1548
1549 PR c/24293
1550 * c-tree.h (incomplete_record_decls): Declare.
1551 * c-parser.c (incomplete_record_decls): Define.
1552 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1553 report error if any decl has zero size.
1554 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1555 or enum type to incomplete_record_decls.
1556
e6d6ec9e
TV
15572016-01-14 Tom de Vries <tom@codesourcery.com>
1558
1559 PR tree-optimization/68773
1560 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1561 set force_output.
1562
00083992
MP
15632016-01-14 Marek Polacek <polacek@redhat.com>
1564
1565 PR c/69262
1566 * c-decl.c (grokdeclarator): Provide more information for invalid
1567 array declarations.
1568
7443cf13
DM
15692016-01-06 David Malcolm <dmalcolm@redhat.com>
1570
1571 * c-parser.c (c_parser_unary_expression): For dereferences, build
1572 a combined location before calling build_indirect_ref, so that
1573 error reports cover the full range, manually updating the c_expr
1574 src_range.
1575
6b131d5b
MP
15762016-01-06 Marek Polacek <polacek@redhat.com>
1577
1578 PR sanitizer/69099
1579 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1580 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1581 NULL.
1582
818ab71a
JJ
15832016-01-04 Jakub Jelinek <jakub@redhat.com>
1584
1585 Update copyright years.
1586
2fe0a208
MP
15872016-01-04 Marek Polacek <polacek@redhat.com>
1588
1589 PR c/68908
1590 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1591 optimization to use __atomic_fetch_* built-in if possible.
1592
c7b48c8a
TS
15932015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1594
1595 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1596 into...
1597 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1598 all users.
1599
fda5652f
MP
16002015-12-22 Marek Polacek <polacek@redhat.com>
1601
1602 PR c/69002
1603 * c-typeck.c (build_component_ref): Warn when acessing elements of
1604 atomic structures or unions.
1605
745e411d
DM
16062015-12-21 David Malcolm <dmalcolm@redhat.com>
1607
1608 * c-typeck.c: Include "gcc-rich-location.h".
1609 (build_binary_op): In the two places that call binary_op_error,
1610 create a gcc_rich_location and populate it with the location of
1611 the binary op and its two operands.
1612
94c40e19
DM
16132015-12-16 David Malcolm <dmalcolm@redhat.com>
1614
1615 * c-parser.c (c_parser_statement_after_labels): When calling
1616 c_finish_return, Use the return expression's location if it has
1617 one, falling back to the location of the first token within it.
1618 * c-typeck.c (c_finish_return): When issuing warnings about
1619 the incorrect presence/absence of a return value, issue a note
1620 showing the declaration of the function.
1621
de67c4c3
DM
16222015-12-16 David Malcolm <dmalcolm@redhat.com>
1623
1624 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1625 to 4.
1626 (c_parser_peek_nth_token): New function.
1627 (c_parser_peek_conflict_marker): New function.
1628 (c_parser_error): Detect conflict markers and report them as such.
1629
a10704e1
DM
16302015-12-16 David Malcolm <dmalcolm@redhat.com>
1631
1632 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1633 to preserve range information for the primary expression
1634 in the call to c_parser_postfix_expression_after_primary.
1635
8062bca6
DM
16362015-12-16 David Malcolm <dmalcolm@redhat.com>
1637
1638 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1639 expression location, falling back on the first token location,
1640 rather than always using the latter.
1641
d06f8b75
MP
16422015-12-16 Marek Polacek <polacek@redhat.com>
1643
1644 PR c/64637
1645 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1646 available.
1647
2994fb91
MP
16482015-12-15 Marek Polacek <polacek@redhat.com>
1649
1650 PR c/68907
1651 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1652 artificial decl.
1653
a1b93f8d
DM
16542015-12-08 David Malcolm <dmalcolm@redhat.com>
1655
1656 * c-parser.c (c_parser_alignof_expression): Capture location of
1657 closing parenthesis (if any), or of end of unary expression, and
1658 use it to build a src_range for the expression.
1659
46c6e1e2
DM
16602015-12-08 David Malcolm <dmalcolm@redhat.com>
1661
1662 PR c/68757
1663 * c-parser.c (c_parser_get_builtin_args): Add
1664 "out_close_paren_loc" param, and write back to it.
1665 (c_parser_postfix_expression): Capture the closing
1666 parenthesis location for RID_CHOOSE_EXPR,
1667 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1668 RID_BUILTIN_SHUFFLE and use it to set the source range
1669 for such expressions; within RID_BUILTIN_COMPLEX set
1670 the underlying location.
1671
66189108
MP
16722015-12-07 Marek Polacek <polacek@redhat.com>
1673
1674 PR c/68668
1675 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1676 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1677
f187980b
EB
16782015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1679
1680 * c-tree.h (c_build_va_arg): Adjust prototype.
1681 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1682 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1683 parameter, adjust throughout and issue an error if EXPR is a component
1684 with reverse storage order.
1685
4250754e
JM
16862015-12-02 Jason Merrill <jason@redhat.com>
1687
1688 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1689 (c_fully_fold_internal, decl_constant_value_for_optimization):
1690 Move from c-common.c.
1691 * c-tree.h: Declare decl_constant_value_for_optimization.
1692 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1693
e9e32ee6
JM
16942015-12-02 Joseph Myers <joseph@codesourcery.com>
1695
1696 PR c/68162
1697 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1698 following link from declarator to next declarator. Track original
1699 qualified type and pass it to c_build_qualified_type.
1700 * c-typeck.c (c_build_qualified_type): Add arguments
1701 orig_qual_type and orig_qual_indirect.
1702
ff7a55bf
TS
17032015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1704
1705 * c-parser.c (c_parser_omp_clause_name)
1706 (c_parser_oacc_all_clauses): Alphabetical sorting.
1707
657e4e47
JJ
17082015-12-02 Jakub Jelinek <jakub@redhat.com>
1709
1710 PR c/68533
1711 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1712 for diagnostics.
1713
37d5ad46
JB
17142015-12-01 Julian Brown <julian@codesourcery.com>
1715 Cesar Philippidis <cesar@codesourcery.com>
1716 James Norris <James_Norris@mentor.com>
1717
1718 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1719 (c_parser_oacc_clause_use_device): New function.
1720 (c_parser_oacc_all_clauses): Add use_device support.
1721 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1722 (c_parser_oacc_host_data): New function.
1723 (c_parser_omp_construct): Add host_data support.
1724 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1725 * c-typeck.c (c_finish_oacc_host_data): New function.
1726 (c_finish_omp_clauses): Add use_device support.
1727
a4850ce9
JH
17282015-11-29 Jan Hubicka <hubicka@ucw.cz>
1729
1730 PR c/67106
1731 * c-decl.c: Set TYPE_PACKED in variants.
1732
b58d3df2
ML
17332015-11-27 Martin Liska <mliska@suse.cz>
1734
1735 PR c++/68312
1736 * c-array-notation.c (fix_builtin_array_notation_fn):
1737 Use release_vec_vec instead of vec::release.
1738 (build_array_notation_expr): Likewise.
1739 (fix_conditional_array_notations_1): Likewise.
1740 (fix_array_notation_expr): Likewise.
1741 (fix_array_notation_call_expr): Likewise.
1742
aec17bfe
JJ
17432015-11-27 Jakub Jelinek <jakub@redhat.com>
1744
1745 PR c/63326
1746 * c-parser.c (c_parser_compound_statement_nostart): If
1747 last_label is true, use pragma_stmt instead of pragma_compound
1748 as second c_parser_pragma argument.
1749 (c_parser_omp_ordered, c_parser_omp_target_update,
1750 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1751 false as second argument to c_parser_skip_to_pragma_eol after
1752 diagnosing standalone directives used in pragma_stmt context.
1753
688c4de0
IV
17542015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1755
1756 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1757 with "if (ENABLE_OFFLOADING)".
1758
cbd03aee
DM
17592015-11-23 David Malcolm <dmalcolm@redhat.com>
1760
1761 PR objc/68438
1762 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1763 for various Objective-C constructs: Class.name syntax,
1764 @selector(), @protocol(), @encode(), and [] message syntax.
1765
a87a86e1
DM
17662015-11-20 David Malcolm <dmalcolm@redhat.com>
1767
1768 PR 62314
1769 * c-typeck.c (should_suggest_deref_p): New function.
1770 (build_component_ref): Special-case POINTER_TYPE when
1771 generating a "not a structure of union" error message, and
1772 suggest a "->" rather than a ".", providing a fix-it hint.
1773
8ece8dfb
DM
17742015-11-19 David Malcolm <dmalcolm@redhat.com>
1775
1776 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1777 candidate into a new function, find_closest_identifier.
1778
433068cc
MP
17792015-11-19 Marek Polacek <polacek@redhat.com>
1780
1781 PR c/68412
1782 * c-typeck.c (parser_build_binary_op): Properly handle
1783 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1784
bef08b71
DM
17852015-11-17 David Malcolm <dmalcolm@redhat.com>
1786
1787 * c-parser.c (set_c_expr_source_range): Bulletproof both
1788 overloaded implementations against NULL expr->value.
1789 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1790 values.
1791 (c_parser_unary_expression): Likewise when handling addresses of
1792 labels.
1793 (c_parser_postfix_expression): Likewise for statement expressions,
1794 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1795 __builtin_va_arg, and for __builtin_offset_of.
1796 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1797 src_range using the range of the braced initializer.
1798 (c_parser_transaction_expression): Set src_range for "ret" to a
1799 sane pair of values.
1800
fff77217
KY
18012015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1802
1803 * c-parser.c (c_finish_omp_declare_simd): Look for
1804 "simd" attribute as well. Update error message.
1805
1d899da2
TS
18062015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1807
1808 * c-parser.c (c_parser_omp_declare_target): Adjust.
1809
e4606348
JJ
18102015-11-14 Jakub Jelinek <jakub@redhat.com>
1811
1812 * c-typeck.c (c_finish_omp_clauses): Don't mark
1813 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1814
3e636daf
MP
18152015-11-14 Marek Polacek <polacek@redhat.com>
1816
1817 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1818 * c-typeck.c: Likewise.
1819
ebedc9a3
DM
18202015-11-13 David Malcolm <dmalcolm@redhat.com>
1821
1822 * c-decl.c (warn_defaults_to): Pass line_table to
1823 rich_location ctor.
1824 * c-errors.c (pedwarn_c99): Likewise.
1825 (pedwarn_c90): Likewise.
1826 * c-parser.c (set_c_expr_source_range): New functions.
1827 (c_token::get_range): New method.
1828 (c_token::get_finish): New method.
1829 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1830 based on the range from the start of the LHS to the end of the
1831 RHS.
1832 (c_parser_conditional_expression): Likewise, based on the range
1833 from the start of the cond.value to the end of exp2.value.
1834 (c_parser_binary_expression): Call set_c_expr_source_range on
1835 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1836 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1837 based on the cast_loc through to the end of the expr.
1838 (c_parser_unary_expression): Likewise, based on the
1839 op_loc through to the end of op.
1840 (c_parser_sizeof_expression) Likewise, based on the start of the
1841 sizeof token through to either the closing paren or the end of
1842 expr.
1843 (c_parser_postfix_expression): Likewise, using the token range,
1844 or from the open paren through to the close paren for
1845 parenthesized expressions.
1846 (c_parser_postfix_expression_after_primary): Likewise, for
1847 various kinds of expression.
1848 * c-tree.h (struct c_expr): Add field "src_range".
1849 (c_expr::get_start): New method.
1850 (c_expr::get_finish): New method.
1851 (set_c_expr_source_range): New decls.
1852 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1853 on ret for prefix unary ops.
1854 (parser_build_binary_op): Likewise, running from the start of
1855 arg1.value through to the end of arg2.value.
1856
ec8b536f
MP
18572015-11-13 Marek Polacek <polacek@redhat.com>
1858
1859 PR c/68320
1860 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1861
277fe616
DM
18622015-11-13 David Malcolm <dmalcolm@redhat.com>
1863
1864 * c-typeck.c: Include spellcheck.h.
1865 (lookup_field_fuzzy_find_candidates): New function.
1866 (lookup_field_fuzzy): New function.
1867 (build_component_ref): If the field was not found, try using
1868 lookup_field_fuzzy and potentially offer a suggestion.
1869
6e232ba4
JN
18702015-11-12 James Norris <jnorris@codesourcery.com>
1871 Joseph Myers <joseph@codesourcery.com>
1872
1873 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1874 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1875 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1876 and PRAGMA_OMP_CLAUSE_LINK.
1877 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1878 and PRAGMA_OACC_CLAUSE_LINK.
1879 (OACC_DECLARE_CLAUSE_MASK): New definition.
1880 (c_parser_oacc_declare): New function.
1881
9be4f715
MP
18822015-11-12 Marek Polacek <polacek@redhat.com>
1883
1884 PR c/67784
1885 * c-parser.c (c_parser_for_statement): Reclassify the token in
1886 a correct scope.
1887
e78bede6
MP
18882015-11-11 Marek Polacek <polacek@redhat.com>
1889
1890 PR c/68107
1891 PR c++/68266
1892 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1893 checking the size of an array.
1894
69f293c9
AM
18952015-11-11 Andrew MacLeod <amacleod@redhat.com>
1896
1897 * c-array-notation.c: Remove unused header files.
1898 * c-aux-info.c: Likewise.
1899 * c-convert.c: Likewise.
1900 * c-decl.c: Likewise.
1901 * c-errors.c: Likewise.
1902 * c-lang.c: Likewise.
1903 * c-objc-common.c: Likewise.
1904 * c-parser.c: Likewise.
1905 * c-typeck.c: Likewise.
1906 * gccspec.c: Likewise.
1907
3a40d81d
NS
19082015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1909 Cesar Philippidis <cesar@codesourcery.com>
1910 James Norris <jnorris@codesourcery.com>
1911 Julian Brown <julian@codesourcery.com>
1912 Nathan Sidwell <nathan@codesourcery.com>
1913
1914 c/
1915 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1916 routine arg.
1917 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1918 (c_parser_pragma): Parse 'acc routine'.
1919 (OACC_ROUTINE_CLAUSE_MARK): Define.
1920 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1921
fc402eec
AA
19222015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1923
1924 PR debug/67192
1925 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1926 location of the backward-goto to the start of the loop body.
1927
f6b0b3db
AA
19282015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1929
1930 PR debug/67192
1931 * c-parser.c (c_parser_while_statement): Finish the loop before
1932 parsing ahead for misleading indentation.
1933 (c_parser_for_statement): Likewise.
1934
ee45a32d
EB
19352015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1936
1937 * c-decl.c (finish_struct): If the structure has reverse storage
1938 order, rewrite the type of array fields with scalar component. Call
1939 maybe_apply_pragma_scalar_storage_order on entry.
1940 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1941 errors on bit-fields and reverse SSO here and not...
1942 (c_mark_addressable): ...here.
1943 (output_init_element): Adjust call to initializer_constant_valid_p.
1944 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1945
8a645150
DM
19462015-11-06 David Malcolm <dmalcolm@redhat.com>
1947
1948 * c-decl.c (warn_defaults_to): Update for change in signature
1949 of diagnostic_set_info.
1950 * c-errors.c (pedwarn_c99): Likewise.
1951 (pedwarn_c90): Likewise.
1952 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1953 for textinfo::set_location.
1954
7a5e4956
CP
19552015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1956 Thomas Schwinge <thomas@codesourcery.com>
1957 James Norris <jnorris@codesourcery.com>
1958
1959 * c-parser.c (c_parser_omp_clause_name): Add support for
1960 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1961 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1962 default(none) in OpenACC.
1963 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1964 arguments.
1965 (c_parser_oacc_clause_tile): New function.
1966 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1967 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1968 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1969 TILE}.
1970 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1971 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1972 FIRSTPRIVATE}.
1973 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1974 (c_parser_oacc_update): Update the error message for missing clauses.
1975 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1976 and OMP_CLAUSE_INDEPENDENT.
1977
bfcfbfa0
MP
19782015-11-05 Marek Polacek <polacek@redhat.com>
1979
1980 PR c/68090
1981 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1982 deal with pre-evaluation on invalid types.
1983
e01d41e5
JJ
19842015-11-05 Jakub Jelinek <jakub@redhat.com>
1985 Ilya Verbin <ilya.verbin@intel.com>
1986
1987 * c-parser.c: Include context.h and gimple-expr.h.
1988 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1989 monotonic together with nonmonotonic.
1990 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1991 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1992 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1993 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1994 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1995 expressions on combined target teams before the target.
1996 (c_parser_omp_declare_target): If decl has "omp declare target" or
1997 "omp declare target link" attribute, and cgraph or varpool node already
1998 exists, then set corresponding flags. Call c_finish_omp_clauses
1999 in the parenthesized extended-list syntax case.
2000 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2001 declare target.
2002 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2003 on OMP_CLAUSE_REDUCTION array sections.
2004 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2005 into the constant offset, or for variable low-bound using
2006 POINTER_PLUS_EXPR. For structure element based array sections use
2007 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2008 (c_finish_omp_clauses): Drop generic_field_head, structure
2009 elements are now always mapped even as array section bases,
2010 diagnose same var in data sharing and mapping clauses. Diagnose if
2011 linear step on declare simd is neither a constant nor a uniform
2012 parameter. Look through POINTER_PLUS_EXPR for array section
2013 reductions. Diagnose the same var or function appearing multiple
2014 times on the same directive. Fix up wording for the to clause if t
2015 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2016 modifier on kinds other than dynamic or guided or nonmonotonic
2017 modifier together with ordered clause.
2018
4bf9e5a8
TS
20192015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2020 Chung-Lin Tang <cltang@codesourcery.com>
2021
2022 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2023
2adfab87
AM
20242015-10-29 Andrew MacLeod <amacleod@redhat.com>
2025
2026 * c-array-notation.c: Reorder #include's and remove duplicates.
2027 * c-aux-info.c: Likewise.
2028 * c-convert.c: Likewise.
2029 * c-decl.c: Likewise.
2030 * c-errors.c: Likewise.
2031 * c-lang.c: Likewise.
2032 * c-objc-common.c: Likewise.
2033 * c-parser.c: Likewise.
2034 * c-typeck.c: Likewise.
2035
e922069e
JW
20362015-10-26 Jim Wilson <jim.wilson@linaro.org>
2037
2038 PR debug/66068
2039 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2040 after calling build_qualified_type.
2041
765dd391
CP
20422015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2043 Thomas Schwinge <thomas@codesourcery.com>
2044 James Norris <jnorris@codesourcery.com>
2045 Joseph Myers <joseph@codesourcery.com>
2046 Julian Brown <julian@codesourcery.com>
2047 Bernd Schmidt <bschmidt@redhat.com>
2048
2049 * c-parser.c (c_parser_oacc_shape_clause): New.
2050 (c_parser_oacc_simple_clause): New.
2051 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2052 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2053
88bae6f4
TS
20542015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2055 James Norris <jnorris@codesourcery.com>
2056 Cesar Philippidis <cesar@codesourcery.com>
2057
2058 PR c/64765
2059 PR c/64880
2060 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2061 parameters, and handle these. Adjust all users.
2062 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2063 into...
2064 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2065 all users.
2066 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2067 declare functions.
2068 (c_finish_omp_construct): Declare function.
2069 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2070 Merge functions into...
2071 (c_finish_omp_construct): ... this new function.
2072
a8fc2579
RB
20732015-10-22 Richard Biener <rguenther@suse.de>
2074
2075 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2076 before folding a MINUS_EXPR.
2077
e9122ef6
MP
20782015-10-21 Marek Polacek <polacek@redhat.com>
2079
2080 PR c/68024
2081 * c-decl.c (start_function): Warn about vararg functions without
2082 a prototype.
2083
9f47c7e5
IE
20842015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2085
2086 * c-typeck.c (build_conditional_expr): Use boolean vector
2087 type for vector comparison.
2088 (build_vec_cmp): New.
2089 (build_binary_op): Use build_vec_cmp for comparison.
2090
fa60eeb9
MP
20912015-10-20 Marek Polacek <polacek@redhat.com>
2092
2093 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2094
2c7020eb
MP
20952015-10-20 Marek Polacek <polacek@redhat.com>
2096
2097 PR c/67964
2098 * c-parser.c (c_parser_attributes): Break out of the loop if the
2099 token after an attribute isn't a comma.
2100
d9a6bd32
JJ
21012015-10-13 Jakub Jelinek <jakub@redhat.com>
2102 Aldy Hernandez <aldyh@redhat.com>
2103
2104 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2105 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2106 (c_parser_omp_variable_list): Handle structure elements for
2107 map, to and from clauses. Handle array sections in reduction
2108 clause. Formatting fixes.
2109 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2110 if clause modifiers.
2111 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2112 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2113 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2114 c_parser_omp_clause_is_device_ptr): New functions.
2115 (c_parser_omp_clause_ordered): Parse optional parameter.
2116 (c_parser_omp_clause_reduction): Handle array reductions.
2117 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2118 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2119 functions.
2120 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2121 (c_parser_omp_clause_depend_sink): New function.
2122 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2123 (c_parser_omp_clause_map): Parse release/delete map kinds and
2124 optional always modifier.
2125 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2126 and c_finish_omp_clauses callers.
2127 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2128 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2129 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2130 (OMP_CRITICAL_CLAUSE_MASK): Define.
2131 (c_parser_omp_critical): Parse critical clauses.
2132 (c_parser_omp_for_loop): Handle doacross loops, adjust
2133 c_finish_omp_for and c_finish_omp_clauses callers.
2134 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2135 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2136 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2137 (c_parser_omp_for): Disallow ordered clause when combined with
2138 distribute. Disallow linear clause when combined with distribute
2139 and not combined with simd.
2140 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2141 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2142 parse clauses and if depend clause is found, don't parse a body.
2143 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2144 Allow target parallel without for after it.
2145 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2146 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2147 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2148 invalid kinds.
2149 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2150 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2151 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2152 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2153 functions.
2154 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2155 defaultmap and is_device_ptr clauses.
2156 (c_parser_omp_target): Parse target parallel and target simd. Set
2157 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2158 and target exit data. Diagnose invalid map kinds.
2159 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2160 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2161 construct.
2162 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2163 &omp_priv.
2164 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2165 (c_parser_omp_taskloop): New function.
2166 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2167 handle PRAGMA_OMP_TASKLOOP.
2168 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2169 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2170 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2171 Add IS_OMP argument, handle structure element bases, diagnose
2172 bitfields, pass IS_OMP recursively, diagnose known zero length
2173 array sections in depend clauses, handle array sections in reduction
2174 clause, diagnose negative length even for pointers.
2175 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2176 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2177 array sections in reduction clause, set
2178 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2179 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2180 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2181 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2182
21ba0cea
MP
21832015-10-06 Marek Polacek <polacek@redhat.com>
2184
2185 * c-parser.c (c_parser_statement_after_labels): Use
2186 protected_set_expr_location.
2187 (c_parser_omp_clause_num_gangs): Likewise.
2188 (c_parser_omp_clause_num_threads): Likewise.
2189 (c_parser_omp_clause_num_workers): Likewise.
2190 (c_parser_omp_clause_vector_length): Likewise.
2191 (c_parser_omp_clause_num_teams): Likewise.
2192 (c_parser_omp_clause_thread_limit): Likewise.
2193 * c-typeck.c (build_c_cast): Likewise.
2194 (c_cast_expr): Likewise.
2195
624d31fe
RS
21962015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2197
2198 * c-typeck.c (c_tree_equal): Use real_equal instead of
2199 REAL_VALUES_EQUAL.
2200
b8fd7909
JM
22012015-10-04 Jason Merrill <jason@redhat.com>
2202
2203 * c-parser.c (c_lex_one_token): Handle @synchronized.
2204 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2205 can change whether the function is transaction_safe.
2206
1c7485af
MP
22072015-10-02 Marek Polacek <polacek@redhat.com>
2208
2209 PR c/67730
2210 * c-typeck.c (convert_for_assignment): Use the expansion point
2211 location throughout.
2212
3e3b8d63
MP
22132015-10-02 Marek Polacek <polacek@redhat.com>
2214
2215 PR c/64249
2216 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2217 and pass it down to c_parser_if_statement.
2218 (c_parser_else_body): Add CHAIN parameter and pass it down to
2219 c_parser_statement_after_labels.
2220 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2221 duplicated if-else-if conditions.
2222
aabef2de
MP
22232015-10-01 Marek Polacek <polacek@redhat.com>
2224
2225 * c-typeck.c (convert_for_assignment): Improve commentary.
2226
de8ddd5f
MP
22272015-09-30 Marek Polacek <polacek@redhat.com>
2228
2229 PR c/67730
2230 * c-typeck.c (c_finish_return): Use the expansion point location for
2231 certain "return with value" warnings.
2232
c4914de6
MLI
22332015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2234
2235 * c-parser.c (pragma_lex): Add loc argument.
2236
0e36f5c7
MP
22372015-09-15 Marek Polacek <polacek@redhat.com>
2238
2239 PR c/67580
2240 * c-decl.c (tag_exists_p): New function.
2241 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2242 struct/union/enum keywords are missing.
2243 * c-tree.h (tag_exists_p): Declare.
2244
2f3bb934
MP
22452015-09-15 Marek Polacek <polacek@redhat.com>
2246
2247 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2248 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2249 Return NULL_TREE instead of 0.
2250 (lookup_name): Return NULL_TREE instead of 0.
2251 (lookup_name_in_scope): Likewise.
2252 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2253 (parser_xref_tag): Use false instead of 0.
2254 (start_struct): Use true instead of 1.
2255 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2256
aa256c4a
MP
22572015-09-14 Marek Polacek <polacek@redhat.com>
2258
2259 * c-typeck.c (set_nonincremental_init_from_string): Use
2260 HOST_WIDE_INT_M1U when shifting a negative value.
2261
dbb68221
MW
22622015-09-09 Mark Wielaard <mjw@redhat.com>
2263
2264 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2265 parm against NULL.
2266
a8a098ac
JJ
22672015-09-10 Jakub Jelinek <jakub@redhat.com>
2268
2269 PR c/67502
2270 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2271 into OMP_FOR_PRE_BODY rather than before the loop.
2272
f4b189d5
JJ
22732015-09-09 Jakub Jelinek <jakub@redhat.com>
2274
0bb99c11
JJ
2275 PR c/67501
2276 * c-parser.c (c_parser_oacc_all_clauses,
2277 c_parser_omp_all_clauses): Remove invalid clause from
2278 list of clauses even if parser->error is set.
2279
fce5e5e3
JJ
2280 PR c/67500
2281 * c-parser.c (c_parser_omp_clause_aligned,
2282 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2283 test for errors.
2284 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2285 error_mark_node.
2286
f4b189d5
JJ
2287 PR c/67495
2288 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2289 instead of c_parser_unary_expression. If the result is !lvalue_p,
2290 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2291
b2aaf235
MP
22922015-09-04 Marek Polacek <polacek@redhat.com>
2293
2294 PR sanitizer/67279
2295 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2296
1807ffc1
MS
22972015-09-03 Martin Sebor <msebor@redhat.com>
2298
2299 PR c/66516
8b652e65
JJ
2300 * c-typeck.c (convert_arguments, parser_build_unary_op,
2301 build_conditional_expr, c_cast_expr, convert_for_assignment,
2302 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2303 reject_gcc_builtin.
2304 (c_decl_implicit): Define.
2305
d04ff417
MP
23062015-09-02 Marek Polacek <polacek@redhat.com>
2307
2308 PR c/67432
2309 * c-parser.c (c_parser_enum_specifier): Give a better error for
2310 an empty enum.
2311
a79683d5
TS
23122015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2313
2314 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2315
191a6b94
MP
23162015-08-12 Marek Polacek <polacek@redhat.com>
2317
2318 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2319 LOC to it.
2320
420a9d9b
MP
23212015-08-03 Marek Polacek <polacek@redhat.com>
2322
2323 PR c/67088
2324 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2325 Use it.
2326 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2327
992118a1
PP
23282015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2329
2330 * c-parser.c (c_parser_if_body): Take token_indent_info
2331 argument. Call warn_for_misleading_indentation even when the
2332 body is a semicolon. Extract token_indent_infos corresponding
2333 to the guard, body and next tokens. Adjust call to
2334 warn_for_misleading_indentation accordingly.
2335 (c_parser_else_body): Likewise.
2336 (c_parser_if_statement): Likewise.
2337 (c_parser_while_statement): Likewise.
2338 (c_parser_for_statement): Likewise.
2339
46308474
LFSM
23402015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2341 Manuel López-Ibáñez <manu@gcc.gnu.org>
2342
2343 * c-decl.c (get_parm_info): Remove static var. Update warning
2344 message.
2345
05b28fd6
MP
23462015-07-27 Marek Polacek <polacek@redhat.com>
2347
2348 PR c++/66555
2349 PR c/54979
2350 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2351
451b5e48
MP
23522015-07-20 Marek Polacek <polacek@redhat.com>
2353
2354 PR c++/55095
2355 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2356 (build_binary_op): Warn about left shift overflows.
2357
1916bcb5
AM
23582015-07-09 Andrew MacLeod <amacleod@redhat.com>
2359
2360 * c-array-notation.c: Adjust includes for flags.h changes.
2361 * c-objc-common.c: Likewise.
2362
c7131fb2
AM
23632015-07-07 Andrew MacLeod <amacleod@redhat.com>
2364
2365 * c-array-notation.c: Adjust includes.
2366 * c-aux-info.c: Likewise.
2367 * c-convert.c: Likewise.
2368 * c-decl.c: Likewise.
2369 * c-errors.c: Likewise.
2370 * c-lang.c: Likewise.
2371 * c-objc-common.c: Likewise.
2372 * c-parser.c: Likewise.
2373 * c-typeck.c: Likewise.
2374
da2e71c9
MLI
23752015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2376
2377 PR fortran/66605
2378 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2379
b155cfd9
MP
23802015-06-29 Marek Polacek <polacek@redhat.com>
2381
2382 PR c/66322
2383 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2384 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2385 about -Wswitch-bool here.
2386 (do_case): Update c_add_case_label call.
2387 (c_finish_case): Update c_do_switch_warnings call.
2388
31521951
MP
23892015-06-27 Marek Polacek <polacek@redhat.com>
2390
2391 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2392
22d03525
MP
23932015-06-26 Marek Polacek <polacek@redhat.com>
2394
2395 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2396 INDIRECT_REF_P.
2397 * c-typeck.c (array_to_pointer_conversion): Likewise.
2398 (build_unary_op): Likewise.
2399 (c_finish_return): Likewise.
2400
f0889939
AM
24012015-06-25 Andrew MacLeod <amacleod@redhat.com>
2402
2403 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2404 * c-parser.c: Likewise.
2405
8d67ee55
RS
24062015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2407
2408 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2409 instead of pointer_hash.
2410 (detect_field_duplicates): Likewise.
2411
0ae9bd27
MP
24122015-06-25 Marek Polacek <polacek@redhat.com>
2413
2414 * c-array-notation.c: Use VAR_P throughout.
2415 * c-decl.c: Likewise.
2416 * c-objc-common.c: Likewise.
2417 * c-parser.c: Likewise.
2418 * c-typeck.c: Likewise.
2419
62f9079a
MP
24202015-06-25 Marek Polacek <polacek@redhat.com>
2421
2422 * c-decl.c: Use is_global_var throughout.
2423 * c-parser.c: Likewise.
2424 * c-typeck.c: Likewise.
2425
abb226c9
AM
24262015-06-17 Andrew MacLeod <amacleod@redhat.com>
2427
2428 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2429 * c-aux-info.c: Likewise.
2430 * c-convert.c: Likewise.
2431 * c-decl.c: Likewise.
2432 * c-errors.c: Likewise.
2433 * c-lang.c: Likewise.
2434 * c-objc-common.c: Likewise.
2435 * c-parser.c: Likewise.
2436 * c-typeck.c: Likewise.
2437
8cbababc
JH
24382015-06-11 Jan Hubicka <hubicka@ucw.cz>
2439
2440 PR middle-end/66325
2441 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2442 variants.
2443
a0349665
PMR
24442015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2445
2446 * c-decl.c (pop_scope): Register the main translation unit
2447 through the new debug hook.
2448
13fdf2e2
AM
24492015-06-08 Andrew MacLeod <amacleod@redhat.com>
2450
2451 * c-array-notation.c : Adjust include files.
2452 * c-aux-info.c : Likewise.
2453 * c-convert.c : Likewise.
2454 * c-decl.c : Likewise.
2455 * c-errors.c : Likewise.
2456 * c-lang.c : Likewise.
2457 * c-lang.h : Likewise.
2458 * c-objc-common.c : Likewise.
2459 * c-parser.c : Likewise.
2460 * c-typeck.c : Likewise.
2461
d7438551
AH
24622015-06-05 Aldy Hernandez <aldyh@redhat.com>
2463
2464 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2465 immediately clobber it.
2466 (c_write_global_declarations_1): Remove call to
2467 check_global_declaration_1.
2468 (c_write_global_declarations_2): Remove.
2469 (c_write_final_cleanups): Rename from c_write_global_declarations.
2470 Remove call to finalize_compilation_unit.
2471 Remove calls to debugging hooks.
2472 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2473 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2474 * c-tree.h: Remove c_write_global_declarations.
2475
ecb9f223
AM
24762015-06-04 Andrew MacLeod <amacleod@redhat.com>
2477
2478 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2479 * c-aux-info.c: Likewise.
2480 * c-convert.c: Likewise.
2481 * c-decl.c: Likewise.
2482 * c-errors.c: Likewise.
2483 * c-lang.c: Likewise.
2484 * c-objc-common.c: Likewise.
2485 * c-parser.c: Likewise.
2486 * c-typeck.c: Likewise.
2487
9482b620
MP
24882015-06-04 Marek Polacek <polacek@redhat.com>
2489
2490 PR c/66341
2491 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2492 it is a lvalue.
2493
bc51ace3
PK
24942015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2495
2496 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2497 Warn for empty struct.
2498 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2499
ea5b45b6
AT
25002015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2501
2502 * c-decl.c (start_function): Call plugin before parsing.
2503 (finish_function): Call plugin after parsing.
2504
c2d47482
PK
25052015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2506
2507 PR c/49551
2508 * c-decl.c (merge_decls): Merge DECL_COMMON.
2509
a95492ab
JW
25102015-05-22 Jim Wilson <jim.wilson@linaro.org>
2511
2512 * Make-lang.in (check_gcc_pallelize): Define.
2513
fd5c817a
MP
25142015-05-22 Marek Polacek <polacek@redhat.com>
2515
2516 PR c/47043
2517 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2518 attributes.
2519
c7b70a3c
MP
25202015-05-21 Marek Polacek <polacek@redhat.com>
2521
2522 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2523 DECL_BUILT_IN.
2524
21b634ae
MP
25252015-05-20 Marek Polacek <polacek@redhat.com>
2526
2527 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2528 * c-typeck.c: Likewise.
2529
296a8c2f
MP
25302015-05-19 Marek Polacek <polacek@redhat.com>
2531
2532 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2533
41b37d5e
JJ
25342015-05-19 Jakub Jelinek <jakub@redhat.com>
2535
2536 PR middle-end/66199
2537 * c-parser.c (c_parser_omp_for_loop): Don't add
2538 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2539 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2540 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2541 constructs.
2542
fab27f52
MM
25432015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2544
2545 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2546 swaps.
fab27f52 2547
40de31cf
MLI
25482015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2549
2550 PR fortran/44054
2551 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2552 accessor function.
2553
3aa3c9fc
MP
25542015-05-14 Marek Polacek <polacek@redhat.com>
2555
2556 PR c/66066
2557 PR c/66127
2558 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2559 rather than with 0.
2560
c3388e62
DM
25612015-05-12 David Malcolm <dmalcolm@redhat.com>
2562
2563 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2564 to add a call to warn_for_misleading_indentation.
2565 (c_parser_else_body): Likewise, adding param "else_loc".
2566 (c_parser_if_statement): Check for misleading indentation.
2567 (c_parser_while_statement): Likewise.
2568 (c_parser_for_statement): Likewise.
2569
755e528f
MP
25702015-05-08 Marek Polacek <polacek@redhat.com>
2571
2572 PR c/64918
2573 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2574 (output_init_element): Likewise.
2575
0173bd2a
MP
25762015-05-07 Marek Polacek <polacek@redhat.com>
2577
2578 PR c/65179
2579 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2580 value.
2581
9babc352
MP
25822015-04-30 Marek Polacek <polacek@redhat.com>
2583
2584 * c-typeck.c (set_init_label): Call error_at instead of error and
2585 pass LOC to it.
2586
ac9f18db
MP
2587 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2588 the type of a decl.
2589
ec3fba51
MP
2590 * c-typeck.c (c_build_va_arg): Clarify the error message.
2591
b811915d
TS
25922015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2593
2594 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2595 OMP_STANDALONE_CLAUSES.
2596
f3075008
MP
25972015-04-28 Marek Polacek <polacek@redhat.com>
2598
2599 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2600
4e81b788
MP
26012015-04-28 Marek Polacek <polacek@redhat.com>
2602
2603 PR c/65901
2604 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2605
6c1db78e
MP
26062015-04-25 Marek Polacek <polacek@redhat.com>
2607
2608 PR c/52085
2609 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2610 attribute.
2611
5c4abbb8
MP
26122015-04-23 Marek Polacek <polacek@redhat.com>
2613
2614 PR c/65345
2615 * c-decl.c (set_labels_context_r): New function.
2616 (store_parm_decls): Call it via walk_tree_without_duplicates.
2617 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2618 instead of create_tmp_var. Build TARGET_EXPR instead of
2619 COMPOUND_EXPR.
2620 (build_atomic_assign): Use create_tmp_var_raw instead of
2621 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2622
06aca1d5
IV
26232015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2624
2625 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2626 (c_parser_omp_target_update): Add missed %> to error_at ().
2627
8fba1830
BRF
26282015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2629
2630 PR target/55143
2631 * c-decl.c (c_default_pointer_mode): Remove definition.
2632 * c-tree.h (c_default_pointer_mode): Remove declaration.
2633
62021f64
TB
26342015-03-27 Tobias Burnus <burnus@net-b.de>
2635
2636 PR c/65586
2637 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2638 error out.
2639 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2640 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2641 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2642
9b65e171
JJ
26432015-03-19 Jakub Jelinek <jakub@redhat.com>
2644
2645 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2646 attribute for DECL_EXTERNAL VAR_DECLs.
2647
17958621
JJ
26482015-03-11 Jakub Jelinek <jakub@redhat.com>
2649
2650 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2651 argument.
2652
7ccb1a11
JJ
26532015-03-10 Jakub Jelinek <jakub@redhat.com>
2654
2655 PR c/65120
2656 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2657 before preparing arguments to warn_logical_not_parentheses.
2658
01177669
JJ
26592015-03-09 Jakub Jelinek <jakub@redhat.com>
2660
2661 PR c/65120
2662 * c-typeck.c (parser_build_binary_op): Don't warn for
2663 !!x == y or !b == y where b is _Bool.
2664
802ac282
MP
26652015-03-09 Marek Polacek <polacek@redhat.com>
2666
2667 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2668 * c-decl.c (grokdeclarator): Likewise.
2669 * c-typeck.c (build_binary_op): Likewise.
2670
e5165b60
MP
26712015-02-27 Marek Polacek <polacek@redhat.com>
2672
2673 PR c/65228
2674 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2675
065d214c
MP
26762015-02-14 Marek Polacek <polacek@redhat.com>
2677
2678 PR c/64768
2679 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2680 declared through a typedef name.
2681
e5d9235b
MP
26822015-02-13 Marek Polacek <polacek@redhat.com>
2683
2684 PR c/65050
2685 * c-decl.c (grokdeclarator): Print also the type when giving
2686 the error message about array's incomplete element type.
2687
fa01ffcc
JJ
26882015-02-11 Jakub Jelinek <jakub@redhat.com>
2689
2690 PR c/64824
2691 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2692 check in the POP macro.
2693
c3e38a03
MP
26942015-02-09 Marek Polacek <polacek@redhat.com>
2695
2696 PR c/64856
2697 * c-typeck.c (process_init_element): Don't always wrap
2698 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2699 initializing a range of elements.
2700
4886ec8e
JJ
27012015-02-04 Jakub Jelinek <jakub@redhat.com>
2702
2703 PR c/64824
2704 PR c/64868
2705 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2706
c3e38a03 27072015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2708
2709 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2710 processing enum declaration.
2711
7b33f0c8
MP
27122015-01-29 Marek Polacek <polacek@redhat.com>
2713
2714 PR c/64709
2715 * c-typeck.c (pop_init_level): If constructor_elements has
2716 exactly one element with integer_zerop value, set constructor_zeroinit
2717 to 1. Remove braces around warning_init call.
2718
dea63e49
JJ
27192015-01-27 Jakub Jelinek <jakub@redhat.com>
2720
2721 PR c/64766
2722 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2723 of FUNCTION_DECLs with error_mark_node.
2724
d38f7dce
JJ
27252015-01-26 Jakub Jelinek <jakub@redhat.com>
2726
2727 PR c/64778
2728 * c-typeck.c (convert_arguments): Return -1 if there are
2729 error_args, even if we've diagnosed too many arguments.
2730
cbf5d0e7
RB
27312015-01-21 Richard Biener <rguenther@suse.de>
2732
2733 PR middle-end/64313
2734 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2735 for builtins the user declared correctly.
2736
41dbbb37
TS
27372015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2738 Bernd Schmidt <bernds@codesourcery.com>
2739 Cesar Philippidis <cesar@codesourcery.com>
2740 James Norris <jnorris@codesourcery.com>
2741 Jakub Jelinek <jakub@redhat.com>
2742 Ilmir Usmanov <i.usmanov@samsung.com>
2743
2744 * c-parser.c: Include "gomp-constants.h".
2745 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2746 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2747 Use OMP_CLAUSE_SET_MAP_KIND.
2748 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2749 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2750 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2751 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2752 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2753 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2754 "copyout", "create", "delete", "deviceptr", "gang", "host",
2755 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2756 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2757 "present_or_create", "pcreate", "seq", "self", "vector",
2758 "vector_length", "wait", "worker".
2759 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2760 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2761 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2762 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2763 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2764 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2765 (c_parser_oacc_data_clause_deviceptr)
2766 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2767 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2768 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2769 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2770 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2771 (c_parser_oacc_parallel, c_parser_oacc_update)
2772 (c_parser_oacc_wait): New functions.
2773 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2774 (c_finish_oacc_data): New prototypes.
2775 * c-typeck.c: Include "gomp-constants.h".
2776 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2777 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2778 OMP_CLAUSE_SET_MAP_KIND.
2779 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2780 (c_finish_oacc_data): New functions.
2781 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2782 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2783 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2784 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2785 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2786 GOMP_MAP_FORCE_DEVICEPTR.
2787
adfac8df
JJ
27882015-01-09 Michael Collison <michael.collison@linaro.org>
2789
2790 * c-array-notation.c: Include hash-set.h, machmode.h,
2791 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2792 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2793 * c-aux-info.c: Ditto.
2794 * c-convert.c: Ditto.
2795 * c-decl.c: Ditto.
2796 * c-errors.c: Ditto.
2797 * c-lang.c: Dittoxs.
2798 * c-objc-common.c: Ditto.
2799 * c-parser.c: Ditto.
2800 * c-typeck.c: Include hash-set.h, machmode.h,
2801 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2802 fold-const.h, wide-int.h, inchash.h, real.h and
2803 fixed-value.h due to flattening of tree.h.
2804
2cc901dc
MP
28052015-01-07 Marek Polacek <polacek@redhat.com>
2806
2807 PR c/64417
2808 * c-typeck.c (process_init_element): Disallow initialization of
2809 a flexible array member with a string constant if the structure
2810 is in an array.
2811
5624e564
JJ
28122015-01-05 Jakub Jelinek <jakub@redhat.com>
2813
e5341100
JJ
2814 PR sanitizer/64344
2815 * c-typeck.c (convert_for_assignment, c_finish_return): For
2816 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2817 types also set in_late_binary_op around convert call.
2818 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2819 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2820 result on expr as last argument to ubsan_instrument_float_cast,
2821 if in_late_binary_op, don't use c_save_expr but save_expr.
2822
5624e564
JJ
2823 Update copyright years.
2824
5bd012f8
MP
28252015-01-05 Marek Polacek <polacek@redhat.com>
2826
2827 PR c/64423
2828 * c-typeck.c (build_array_ref): Pass loc down to
2829 warn_array_subscript_with_type_char.
2830
3f8257db 28312014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2832
2833 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2834 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2835 element type.
8e745a17 2836 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2837 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2838 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2839 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2840 to PEDWARN_FOR_QUALIFIERS.
768952be 2841
8f94a8c4
JJ
28422014-12-17 Jakub Jelinek <jakub@redhat.com>
2843
2844 PR sanitizer/64289
2845 * c-convert.c: Include ubsan.h.
2846 (convert): For real -> integral casts and
2847 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2848 instead instrument the float cast directly.
2849
b731b390
JJ
28502014-11-29 Jakub Jelinek <jakub@redhat.com>
2851
2852 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2853 c_finish_stmt_expr): Remove NULL last argument from
2854 create_tmp_var_raw and create_tmp_var calls.
2855 * c-array-notation.c (fix_builtin_array_notation_fn,
2856 build_array_notation_expr, fix_conditional_array_notations_1,
2857 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2858
541e35a6
MP
28592014-11-28 Marek Polacek <polacek@redhat.com>
2860
2861 PR c/63862
2862 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2863 convert the right operand to integer type.
2864
b286be94
MP
28652014-11-25 Marek Polacek <polacek@redhat.com>
2866
2867 PR c/63877
2868 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2869 for inline functions.
2870
aa7da51a
JJ
28712014-11-21 Jakub Jelinek <jakub@redhat.com>
2872
2873 PR target/63764
2874 * c-typeck.c (build_array_ref): Adjust
2875 convert_vector_to_pointer_for_subscript caller. If it returns true,
2876 call non_lvalue_loc on the result.
2877
d876207f
RB
28782014-11-11 Richard Biener <rguenther@suse.de>
2879
2880 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2881 to true.
2882
e5e44252
AK
28832014-11-10 Andi Kleen <ak@linux.intel.com>
2884
2885 PR c/60804
2886 * c-parser.c (c_parser_statement_after_labels): Call
2887 check_no_cilk.
2888 (c_parser_if_statement): Dito.
2889 (c_parser_switch_statement): Dito.
2890 (c_parser_while_statement): Dito.
2891 (c_parser_do_statement): Dito.
2892 (c_parser_for_statement): Dito.
2893 * c-typeck.c (c_finish_loop): Dito.
2894
13c21655
PC
28952014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2896
2897 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2898 OPT_Wshift_count_overflow in the warnings.
2899
2d51fcef
MP
29002014-10-30 Marek Polacek <polacek@redhat.com>
2901
2902 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2903 print the stripped version as well, if they're not the same.
2904
ef4bddc2
RS
29052014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2906
2907 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2908 machine_mode.
2909
c582198b
AM
29102014-10-28 Andrew MacLeod <amacleod@redhat.com>
2911
2912 * c-decl.c: Adjust include files.
2913 * c-parser.c: Ditto.
2914
ddc8de03
PM
29152014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2916 Tom Tromey <tromey@redhat.com>
2917
2918 * c-tree.h (enum c_oracle_request): New.
2919 (c_binding_oracle_function): New typedef.
2920 (c_binding_oracle, c_pushtag, c_bind): Declare.
2921 * c-decl.c (c_binding_oracle): New global.
2922 (I_SYMBOL_CHECKED): New macro.
2923 (i_symbol_binding): New function.
2924 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2925 (I_TAG_CHECKED): New macro.
2926 (i_tag_binding): New function.
2927 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2928 (I_LABEL_CHECKED): New macro.
2929 (i_label_binding): New function.
2930 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2931 (c_print_identifier): Save and restore c_binding_oracle.
2932 (c_pushtag, c_bind): New functions.
2933
60393bbc
AM
29342014-10-27 Andrew MacLeod <amacleod@redhat.com>
2935
2936 * c-typeck.c: Adjust include files.
2937
d723bb7c
MLI
29382014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2939
2940 PR c++/53061
2941 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2942 initialization here...
2943 (c_initialize_diagnostics): ... but here. Set defaults after
2944 building pretty-printer.
2945
1bc5a451
MP
29462014-10-23 Marek Polacek <polacek@redhat.com>
2947
2948 PR c/63626
2949 * c-decl.c (pop_scope): Don't print warning in external_scope.
2950
4435bb92
MP
29512014-10-19 Marek Polacek <polacek@redhat.com>
2952
2953 PR c/63567
2954 * c-typeck.c (output_init_element): Allow initializing objects with
2955 static storage duration with compound literals even in C99 and add
2956 pedwarn for it.
2957
7278465e
MP
29582014-10-17 Marek Polacek <polacek@redhat.com>
2959
2960 PR c/63567
2961 * c-typeck.c (digest_init): Allow initializing objects with static
2962 storage duration with compound literals even in C99 and add pedwarn
2963 for it.
2964
d9b7be2e
MP
29652014-10-17 Marek Polacek <polacek@redhat.com>
2966
2967 PR c/63543
2968 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2969 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2970 error multiple times. Print the type.
2971
f406ae1f
MP
29722014-10-17 Marek Polacek <polacek@redhat.com>
2973
2974 PR c/63549
2975 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2976 type.
2977
92574c7c
MP
29782014-10-17 Marek Polacek <polacek@redhat.com>
2979
2980 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2981 (start_function): Use OPT_Wimplicit_int instead of 0.
2982 (store_parm_decls_oldstyle): Likewise.
2983
1bc4a978
MT
29842014-10-17 Alan Modra <amodra@gmail.com>
2985
2986 PR middle-end/61848
2987 * c-decl.c (merge_decls): Don't merge section name or tls model
2988 to newdecl symtab node, instead merge to olddecl. Override
2989 existing olddecl section name. Set tls_model for all thread-local
2990 vars, not just OMP thread-private ones. Remove incorrect comment.
2991
83685514
AM
29922014-10-16 Andrew MacLeod <amacleod@redhat.com>
2993
2994 * c-decl.c: Adjust include files.
2995
78a7c317
DD
29962014-10-14 DJ Delorie <dj@redhat.com>
2997
2998 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2999 (c_token_starts_typename): Check all __intN, not just __int128.
3000 (c_token_starts_declspecs): Likewise.
3001 (c_parser_declspecs): Likewise.
3002 (c_parser_attribute_any_word): Likewise.
3003 (c_parser_objc_selector): Likewise.
3004 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3005 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3006 is specified.
3007 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3008 __int128.
3009 (finish_declspecs): Likewise.
3010
74d98c1e
AB
30112014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3012
8e745a17 3013 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3014 the duplicate code.
8e745a17 3015 (c_parser_statement): Call the new function.
74d98c1e 3016
84937de2
MP
30172014-10-09 Marek Polacek <polacek@redhat.com>
3018
3019 PR c/63480
3020 * c-typeck.c (pop_init_level): Don't warn about initializing
3021 with { }.
3022
0382aaa0
MP
30232014-10-07 Marek Polacek <polacek@redhat.com>
3024
3025 PR c/59717
3026 * c-decl.c (header_for_builtin_fn): New function.
3027 (implicitly_declare): Suggest which header to include.
3028
7a0ca710
MP
30292014-10-07 Marek Polacek <polacek@redhat.com>
3030
3031 * c-convert.c (convert): Use error_operand_p.
3032 * c-typeck.c (require_complete_type): Likewise.
3033 (really_atomic_lvalue): Likewise.
3034 (digest_init): Likewise.
3035 (handle_omp_array_sections_1): Likewise.
3036
6bc8a126
MP
30372014-10-03 Marek Polacek <polacek@redhat.com>
3038
3039 PR c/63453
3040 * c-decl.c (pop_scope): Don't warn about "inline function declared
3041 but never defined" for functions marked with gnu_inline attribute.
3042
d90c0a59
JJ
30432014-09-25 Jakub Jelinek <jakub@redhat.com>
3044
3045 PR c++/63249
3046 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3047 on low_bound and length.
3048
083e891e
MP
30492014-09-24 Marek Polacek <polacek@redhat.com>
3050
3051 PR c/61405
3052 PR c/53874
3053 * c-parser.c: Don't define CPP_KEYWORD.
3054 (c_parser_switch_statement): Pass original type to c_finish_case.
3055 * c-tree.h (c_finish_case): Update declaration.
3056 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3057 conditionally to c_do_switch_warnings.
3058
8d95fe25
MP
30592014-09-03 Marek Polacek <polacek@redhat.com>
3060
3061 PR c/62024
3062 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3063 conversions.
3064
9a771876
JJ
30652014-09-02 Jakub Jelinek <jakub@redhat.com>
3066 Balaji V. Iyer <balaji.v.iyer@intel.com>
3067 Igor Zamyatin <igor.zamyatin@intel.com>
3068
3069 * c-parser.c (c_parser_cilk_for): New function.
3070 (c_parser_cilk_grainsize): Likewise.
3071 (c_get_temp_regvar): Likewise.
3072 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3073 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3074 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3075 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3076 case.
3077
b7679d96
CG
30782014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3079
3080 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3081 with using HOST_WIDE_INT without truncation to 'int'
3082
59ea0364
MP
30832014-08-22 Marek Polacek <polacek@redhat.com>
3084
3085 PR c++/62199
3086 * c-typeck.c (parser_build_binary_op): Adjust call to
3087 warn_logical_not_parentheses.
3088
671a475e
IZ
30892014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3090
3091 PR other/62008
3092 * c-parser.c (c_parser_array_notation): Check for correct
3093 type of an array added.
3094
04159acf
MP
30952014-08-19 Marek Polacek <polacek@redhat.com>
3096
3097 PR c++/62153
3098 * c-typeck.c (build_binary_op): If either operand of a comparison
3099 is a boolean expression, call maybe_warn_bool_compare.
3100
c77935ee
PP
31012014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3102
3103 PR c/45584
3104 * c-typeck.c (build_c_cast): Do a conversion even when the
3105 TYPE_MAIN_VARIANTs are the same.
3106
35aff4fb
MP
31072014-08-19 Marek Polacek <polacek@redhat.com>
3108
3109 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3110 pedwarn_c99 instead of pedwarn.
3111 (grokfield): Likewise.
3112 (warn_defaults_to): New function.
3113 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3114 Unconditionally call pedwarn_c99 instead of pedwarn.
3115 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3116 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3117 check flag_isoc11 before.
3118 * c-errors.c (pedwarn_c99): Change the return type to bool.
3119 Handle -Wc99-c11-compat.
3120 * c-parser.c (disable_extension_diagnostics): Handle
3121 warn_c99_c11_compat.
3122 (restore_extension_diagnostics): Likewise.
3123 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3124 instead of pedwarn, don't check flag_isoc11 before.
3125 (c_parser_declspecs): Likewise.
3126 (c_parser_alignas_specifier): Likewise.
3127 (c_parser_alignof_expression): Likewise.
3128 (c_parser_generic_selection): Likewise.
3129 * c-tree.h (pedwarn_c99): Update declaration.
3130 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3131 of pedwarn_c99.
3132
177cce46
MP
31332014-08-19 Marek Polacek <polacek@redhat.com>
3134
3135 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3136 to pedwarn_c90.
3137 * c-errors.c: Include "opts.h".
3138 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3139 * c-parser.c (disable_extension_diagnostics): Handle negative value
3140 of warn_c90_c99_compat, too.
3141 (restore_extension_diagnostics): Likewise.
3142 (c_parser_compound_statement_nostart): Pass
3143 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3144
6dc99c33
MP
31452014-08-12 Marek Polacek <polacek@redhat.com>
3146
3147 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3148 Add pedwarn.
3149 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3150 Likewise.
3151 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3152
3f8257db 31532014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3154
3155 PR c/51849
3156 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3157 Call pedwarn_c90 instead of pedwarn.
3158 (check_bitfield_type_and_width): Likewise.
3159 (declspecs_add_qual): Likewise.
3160 (declspecs_add_type): Likewise.
3161 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3162 Adjust to only call pedwarn_c90.
3163 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3164 pedwarn_c90 instead of pedwarn.
3165 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3166 * c-parser.c (disable_extension_diagnostics): Handle
3167 warn_c90_c99_compat.
3168 (restore_extension_diagnostics): Likewise.
3169 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3170 pedwarn_c90 instead of pedwarn.
3171 (c_parser_initelt): Likewise.
3172 (c_parser_postfix_expression): Likewise.
3173 (c_parser_postfix_expression_after_paren_type): Likewise.
3174 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3175 * c-tree.h: Fix formatting.
3176 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3177 pedwarn_c90 instead of pedwarn.
3178
9f25a338
TS
31792014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3180
3181 * c-typeck.c: Remove include of pointer-set.h.
3182
044331a8
MP
31832014-08-07 Marek Polacek <polacek@redhat.com>
3184
3185 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3186
b787e7a2
TS
31872014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3188
3189 * c-typeck.c: Use hash_map instead of pointer_map.
3190
6e2830c3
TS
31912014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3192
3193 * c-decl.c: Use hash_set instead of pointer_set.
3194
a7ee52fb
IZ
31952014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3196
3197 PR middle-end/61455
3198 * c-array-notation.c (expand_array_notations): Handling
3199 of DECL_EXPR added.
3200
b4dfdc11
MG
32012014-07-31 Marc Glisse <marc.glisse@inria.fr>
3202
3203 PR c++/60517
3204 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3205 a local variable.
3206
976d5a22
TT
32072014-07-30 Tom Tromey <tromey@redhat.com>
3208
3209 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3210 field.
3211 (really_start_incremental_init, push_init_level): Initialize
3212 designator_depth.
3213 (pop_init_level): Set global designator_depth.
3214 (process_init_element): Check for designated_init attribute.
3215
30281de2
MP
32162014-07-20 Marek Polacek <polacek@redhat.com>
3217
3218 PR c/61852
3219 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3220 (implicitly_declare): Pass location to implicit_decl_warning.
3221
b108f48f
JJ
32222014-07-14 Jakub Jelinek <jakub@redhat.com>
3223
3224 PR middle-end/61294
3225 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3226 If non-NULL, call c_parser_check_literal_zero.
3227 (c_parser_check_literal_zero): New function.
3228 (c_parser_postfix_expression_after_primary): Adjust
3229 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3230
773ec47f
MP
32312014-07-06 Marek Polacek <polacek@redhat.com>
3232
3233 PR c/6940
3234 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3235 * c-tree.h (C_ARRAY_PARAMETER): Define.
3236 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3237 function parameter.
3238
22e1cf1c 32392014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3240 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3241
3242 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3243 releasing symbol.
3244
52ec0ea3
MP
32452014-07-01 Marek Polacek <polacek@redhat.com>
3246
3247 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3248 instead of 0 to WARN_FOR_ASSIGNMENT.
3249
d5c3d343
MP
32502014-07-01 Marek Polacek <polacek@redhat.com>
3251
3252 PR c/58286
3253 * c-typeck.c (convert_for_assignment): Pass
3254 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3255
6a7253a4
MP
32562014-06-30 Marek Polacek <polacek@redhat.com>
3257
3258 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3259 has no_sanitize_undefined attribute.
3260
5e88a8f4
IZ
32612014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3262
3263 PR middle-end/57541
3264 * c-array-notation.c (fix_builtin_array_notation_fn):
3265 Check for 0 arguments in builtin call. Check that bultin argument is
3266 correct.
3267 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3268 index.
3269
9698b078
SH
32702014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3271
3272 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3273 qualifiers in __auto_type for atomic types.
3274 (c_parser_typeof_specifier): Discard all type qualifiers in
3275 __typeof__ for atomic types.
3276
6e07c515
MP
32772014-06-25 Marek Polacek <polacek@redhat.com>
3278
3279 PR c/61162
3280 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3281 the return expression to c_finish_return.
3282
da6f124d
JJ
32832014-06-25 Jakub Jelinek <jakub@redhat.com>
3284
3285 * c-typeck.c (c_finish_omp_clauses): Make sure
3286 OMP_CLAUSE_LINEAR_STEP has correct type.
3287
c203e8a7
TS
32882014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3289
3290 * c-decl.c: Adjust.
3291
56ad0e38
JJ
32922014-06-24 Jakub Jelinek <jakub@redhat.com>
3293
3294 * c-parser.c (c_parser_omp_for_loop): For
3295 #pragma omp parallel for simd move lastprivate clause from parallel
3296 to for rather than simd.
3297
47c2554f
MP
32982014-06-23 Marek Polacek <polacek@redhat.com>
3299
3300 * c-typeck.c (parser_build_binary_op): Don't call
3301 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3302
56363ffd
JH
33032014-06-15 Jan Hubicka <hubicka@ucw.cz>
3304
3305 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3306 * c-decl.c (merge_decls): Likewise.
3307
d7ff7ae5
MP
33082014-06-09 Marek Polacek <polacek@redhat.com>
3309
3310 PR c/36446
3311 * c-typeck.c (error_init): Call inform instead of error_at.
3312 (pedwarn_init): Call inform instead of pedwarn.
3313 (warning_init): Call inform instead of warning_at.
3314
24d047a3
JH
33152014-06-07 Jan Hubicka <hubicka@ucw.cz>
3316
3317 * c-decl.c (merge_decls): Use set_decl_section_name.
3318 (duplicate_decls): Remove node if it exists.
3319
9bac5cbb
G
33202014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3321
3322 PR c/53119
3323 * c-typeck.c (push_init_level, process_init_element,
3324 pop_init_level): Correct check for zero initialization, move
3325 missing brace warning to respect zero initialization.
3326
8ffcdea8
MP
33272014-06-05 Marek Polacek <polacek@redhat.com>
3328
3329 PR c/56724
3330 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3331
742938c9
MP
33322014-06-05 Marek Polacek <polacek@redhat.com>
3333
3334 PR c/49706
3335 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3336 on the left hand side operand of a comparison.
3337
6447c55d
MP
33382014-06-05 Marek Polacek <polacek@redhat.com>
3339
3340 PR c/48062
3341 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3342 Print note only if the warning was printed.
3343
9dc7743c
IZ
33442014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3345
3346 PR c/58942
3347 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3348 with a pointer.
3349
fedfecef
MP
33502014-06-03 Marek Polacek <polacek@redhat.com>
3351
3352 PR c/60439
3353 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3354 c_start_case.
3355 * c-tree.h (c_start_case): Update.
3356 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3357 switch condition has boolean value.
3358
9b2b7279
AM
33592014-06-02 Andrew MacLeod <amacleod@redhat.com>
3360
3361 * c-decl.c: Include builtins.h.
3362 * c-parser.c: Likewise.
3363
5c1bc275
MP
33642014-05-27 Marek Polacek <polacek@redhat.com>
3365
3366 PR c/56724
3367 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3368 error and warning calls to error_at and warning_at. Pass location of
3369 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3370 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3371 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3372
97563bc8
IZ
33732014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3374
3375 PR c/61191
3376 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3377 function parameters.
3378
aede2c10
JH
33792014-05-23 Jan Hubicka <hubicka@ucw.cz>
3380
3381 * c-decl.c (merge_decls): Preserve symtab node pointers.
3382 (duplicate_decls): Free new decl.
3383
edbba2ce
TS
33842014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3385
f3316c6d
TS
3386 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3387 initialization.
3388
edbba2ce
TS
3389 * c-parser.c (c_parser_omp_target): Return bool values.
3390
68c81f24
TS
33912014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3392
3393 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3394 num_teams_loc variable to num_thread_limit_loc.
3395
632f2871
RS
33962014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3397
3398 * c-array-notation.c (expand_array_notations): Use void_node
3399 instead of void_zero_node.
3400
766090c2
TS
34012014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3402
3403 * c-decl.c (finish_struct): Adjust.
3404 (finish_enum): Likewise.
3405 (bind): Adjust.
3406 (record_inline_static): Likewise.
3407 (push_scope): Likewise.
3408 (make_label): Likewise.
3409 (lookup_label_for_goto): Likewise.
3410 (finish_struct): Likewise.
3411 (finish_enum): Likewise.
3412 (store_parm_decls): Likewise.
3413 (c_push_function_context): Likewise.
3414 * c-lang.h: Remove usage of variable_size gty attribute.
3415 * c-parser.c (c_parse_init): Adjust.
3416 (c_parse_file): Likewise.
3417
2b107f6b
MP
34182014-05-13 Marek Polacek <polacek@redhat.com>
3419
3420 PR c/61162
3421 * c-typeck.c (convert_for_assignment): Pass location to
3422 WARN_FOR_ASSIGNMENT instead of input_location.
3423
d033409e
MP
34242014-05-10 Marek Polacek <polacek@redhat.com>
3425
3426 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3427 maybe_warn_string_init.
3428 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3429 maybe_warn_string_init.
3430 * c-tree.h (maybe_warn_string_init): Update declaration.
3431 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3432 Call pedwarn_init with loc instead of with input_location.
3433 (digest_init): Pass init_loc to maybe_warn_string_init.
3434 (pop_init_level): Call pedwarn_init with loc instead of with
3435 input_location.
3436 (set_init_index): Likewise.
3437 (process_init_element): Likewise.
3438
ea58ef42
MP
34392014-05-09 Marek Polacek <polacek@redhat.com>
3440
3441 PR c/61096
3442 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3443 (c_parser_initelt): Pass location to set_init_label. Pass array index
3444 location to set_init_index.
3445 * c-tree.h (push_init_level): Update declaration.
3446 (pop_init_level): Likewise.
3447 (set_init_index): Likewise.
3448 (set_init_label): Likewise.
3449 * c-typeck.c (error_init): Add location parameter. Call error_at
3450 instead of error.
3451 (digest_init): Pass init_loc to error_init.
3452 (really_start_incremental_init):
3453 (push_init_level): Add location parameter. Pass loc to pop_init_level
3454 and error_init.
3455 (pop_init_level): Likewise.
3456 (set_designator): Add location parameter. Pass loc to pop_init_level,
3457 push_init_level, and error_init.
3458 (set_init_index): Add location parameter. Pass loc to error_init and
3459 set_designator.
3460 (set_init_label): Likewise.
3461 (output_init_element): Pass loc to error_init.
3462 (process_init_element): Pass loc to error_init, pop_init_level,
3463 pedwarn_init, and push_init_level.
3464
661a0813
MP
34652014-05-09 Marek Polacek <polacek@redhat.com>
3466
3467 PR c/50459
3468 * c-parser.c (c_parser_attributes): Parse the arguments as an
3469 expression-list if the attribute takes identifier.
3470
2793eeab
MP
34712014-05-08 Marek Polacek <polacek@redhat.com>
3472
3473 PR c/61053
3474 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3475 TYPE_ALIGN_UNIT.
3476
f827930a
MP
34772014-05-08 Marek Polacek <polacek@redhat.com>
3478
3479 PR c/61077
3480 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3481 of main.
3482
1d60af08
KZ
34832014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3484 Mike Stump <mikestump@comcast.net>
3485 Richard Sandiford <rdsandiford@googlemail.com>
3486
3487 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3488 (finish_enum): Use wide-int interfaces.
3489 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3490 * c-typeck.c (build_c_cast): Likewise.
3491 (set_nonincremental_init_from_string): Likewise.
3492 (c_tree_equal): Likewise.
3493
a0e24419
MP
34942014-05-02 Marek Polacek <polacek@redhat.com>
3495
3496 PR c/25801
3497 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3498 Return size_one_node when the type is not complete.
3499 (pointer_diff): Remove comment.
3500 (build_unary_op): Improve error messages.
3501
19fc9faa
MP
35022014-05-02 Marek Polacek <polacek@redhat.com>
3503
3504 * c-typeck.c (c_finish_return): Separate warning_at calls.
3505
63bc4e87
MP
35062014-05-02 Marek Polacek <polacek@redhat.com>
3507
3508 * c-tree.h (error_init): Remove declaration.
3509 (pedwarn_init): Likewise.
3510 * c-typeck.c (error_init): Make static and move above.
3511 (pedwarn_init): Likewise.
3512 (warning_init): Move above.
3513 (maybe_warn_string_init): Likewise.
3514
4bd2511b
JL
35152014-05-01 Jeff Law <law@redhat.com>
3516
3517 Revert:
3518
3519 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3520 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3521 avoid goto.
3522
6a358dcb
MP
35232014-05-02 Marek Polacek <polacek@redhat.com>
3524
3525 PR c/60784
3526 * c-typeck.c (push_init_level): Set constructor_designated to
3527 p->designated for structures.
3528
ae5ebda4
MP
35292014-05-01 Marek Polacek <polacek@redhat.com>
3530
3531 PR c/60915
3532 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3533 function-definition has an attribute after the declarator.
3534
96b40f8d
MP
35352014-05-01 Marek Polacek <polacek@redhat.com>
3536
3537 PR c/60257
3538 * c-typeck.c (warning_init): Add location_t parameter. Call
3539 warning_at instead of warning.
3540 (push_init_level): Pass input_location to warning_init.
3541 (add_pending_init): Add location_t parameter. Pass loc to
3542 warning_init.
3543 (set_nonincremental_init): Pass input_location to add_pending_init.
3544 (set_nonincremental_init_from_string): Likewise.
3545 (output_init_element): Pass loc to warning_init and to
3546 add_pending_init.
3547
32e00768
MP
35482014-05-01 Marek Polacek <polacek@redhat.com>
3549
3550 PR c/43395
3551 * c-typeck.c (c_finish_return): Distinguish between label and variable
3552 when warning about returning local address.
3553
c9379ce2
MP
35542014-05-01 Marek Polacek <polacek@redhat.com>
3555
3556 PR c/29467
3557 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3558 in C89 mode.
3559
d00887e8
MP
35602014-05-01 Marek Polacek <polacek@redhat.com>
3561
3562 PR c/43245
3563 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3564 instead of 0 to WARN_FOR_QUALIFIERS.
3565
5436fa2e
MP
35662014-05-01 Marek Polacek <polacek@redhat.com>
3567
3568 PR c/56989
3569 * c-typeck.c (default_conversion): Use better location for
3570 error call.
3571
f8ed5150
MP
35722014-04-30 Marek Polacek <polacek@redhat.com>
3573
3574 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3575 also when SANITIZE_FLOAT_DIVIDE is on.
3576
8337d1db
MP
35772014-04-30 Marek Polacek <polacek@redhat.com>
3578
3579 PR c/60139
3580 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3581 and pedwarn_init. Use loc insted of input_location.
3582
c4bdc42f
MP
35832014-04-30 Marek Polacek <polacek@redhat.com>
3584
3585 PR c/60351
3586 * c-typeck.c (build_binary_op): Use location when warning about
3587 shift count.
3588
45484dcf
MP
35892014-04-25 Marek Polacek <polacek@redhat.com>
3590
3591 PR c/18079
3592 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3593 always_inline/noinline and hot/cold attributes.
3594
34cf811f
MP
35952014-04-25 Marek Polacek <polacek@redhat.com>
3596
3597 PR c/60114
3598 * c-parser.c (c_parser_initelt): Pass input_location to
3599 process_init_element.
3600 (c_parser_initval): Pass loc to process_init_element.
3601 * c-tree.h (process_init_element): Adjust declaration.
3602 * c-typeck.c (push_init_level): Pass input_location to
3603 process_init_element.
3604 (pop_init_level): Likewise.
3605 (set_designator): Likewise.
3606 (output_init_element): Add location_t parameter. Pass loc to
3607 digest_init.
3608 (output_pending_init_elements): Pass input_location to
3609 output_init_element.
3610 (process_init_element): Add location_t parameter. Pass loc to
3611 output_init_element.
3612
42056eac
JJ
36132014-04-24 Jakub Jelinek <jakub@redhat.com>
3614
3615 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3616 atomic-clause, allow comma in between atomic-clause and
3617 seq_cst.
3618
e162a134
JJ
36192014-04-22 Jakub Jelinek <jakub@redhat.com>
3620
3621 PR c/59073
3622 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3623 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3624
2f6babac
IZ
36252014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3626
3627 PR middle-end/60469
3628 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3629 create_tmp_var instead build_decl for creating temps.
3630 (build_array_notation_expr): Likewise.
3631 (fix_conditional_array_notations_1): Likewise.
3632 (fix_array_notation_expr): Likewise.
3633 (fix_array_notation_call_expr): Likewise.
3634
8edbfaa6
JJ
36352014-03-28 Jakub Jelinek <jakub@redhat.com>
3636
3637 PR c++/60689
3638 * c-tree.h (c_build_function_call_vec): New prototype.
3639 * c-typeck.c (build_function_call_vec): Don't call
3640 resolve_overloaded_builtin here.
3641 (c_build_function_call_vec): New wrapper function around
3642 build_function_call_vec. Call resolve_overloaded_builtin here.
3643 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3644 Call c_build_function_call_vec instead of build_function_call_vec.
3645 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3646 * c-decl.c (finish_decl): Likewise.
3647
7485aeea
MLI
36482014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3649
3650 PR c/55383
3651 * c-typeck.c: Use correct format string in cast-qual warning
3652
b17a8b07
TS
36532014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3654
3655 * c-decl.c (c_decl_attributes): Use
3656 lang_hooks.types.omp_mappable_type.
3657 * c-typeck.c (c_finish_omp_clauses): Likewise.
3658
3af9c5e9
MP
36592014-03-06 Marek Polacek <polacek@redhat.com>
3660
3661 PR c/60197
3662 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3663 of checking tree code.
3664
1c9f5f33
PK
36652014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3666
3667 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3668 (c_parser_parameter_declaration): Likewise.
3669
cc28fc7f
MP
36702014-02-19 Marek Polacek <polacek@redhat.com>
3671
3672 PR c/60195
3673 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3674 Call mark_exp_read on exp.value.
3675 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3676 TREE_ADDRESSABLE on old instead of val.
3677 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3678
b581c05c
PK
36792014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3680
3681 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3682 C_EXPR_APPEND by vec_safe_push.
3683 * c-tree.h (C_EXPR_APPEND): Remove.
3684
81e5eca8
MP
36852014-01-31 Marek Polacek <polacek@redhat.com>
3686
3687 PR c/59963
3688 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3689 build_function_call_vec.
3690 (build_function_call): Likewise.
3691 (build_atomic_assign): Likewise.
3692 (build_function_call_vec): Add arg_loc parameter. Use it.
3693 (convert_arguments): Likewise.
3694 (convert_for_assignment): Rename rhs_loc to expr_loc.
3695 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3696 (c_parser_objc_keywordexpr): Likewise.
3697 (c_parser_postfix_expression_after_primary): Call
3698 build_function_call_vec with expr_loc rather than op_loc.
3699 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3700 build_function_call_vec.
3701 (c_parser_expr_list): Add locations parameter. Fill it with locations
3702 of function arguments.
3703 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3704
68fca595
MP
37052014-01-30 Marek Polacek <polacek@redhat.com>
3706
3707 PR c/59940
3708 * c-typeck.c (build_function_call_vec): Use loc parameter.
3709 (convert_arguments): Add location parameter. Use it.
3710 (ep_convert_and_check): Likewise.
3711 (build_atomic_assign): Adjust convert_for_assignment call.
3712 (build_modify_expr): Likewise.
3713 (digest_init): Likewise.
3714 (c_finish_return): Likewise.
3715 (build_conditional_expr): Adjust ep_convert_and_check calls.
3716 (convert_for_assignment): Add rhs_loc parameter. Use it.
3717 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3718 calls.
3719
fa337f3a
RB
37202014-01-30 Richard Biener <rguenther@suse.de>
3721
3722 PR c/59905
3723 * c-typeck.c (build_function_call_vec): Do not replace calls
3724 to a function via an incompatible type with a runtime abort.
3725
b72271b9
BI
37262014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3727
3728 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3729 flag_enable_cilkplus with flag_cilkplus.
3730 (c_parser_direct_declarator_inner): Likewise.
3731 (c_parser_attribute_any_word): Likewise.
3732 (c_parser_attributes): Likewise.
3733 (c_parser_compound_statement): Likewise.
3734 (c_parser_statement_after_labels): Likewise.
3735 (c_parser_if_statement): Likewise.
3736 (c_parser_switch_statement): Likewise.
3737 (c_parser_do_statement): Likewise.
3738 (c_parser_for_statement): Likewise.
3739 (c_parser_unary_expression): Likewise.
3740 (c_parser_postfix_expression): Likewise.
3741 (c_parser_postfix_expression_after_primary): Likewise.
3742 (c_parser_postfix_expression_after_primary): Likewise.
3743 (c_parser_omp_clause_name): Likewise.
3744 (c_finish_omp_declare_simd): Likewise.
3745 (c_parser_cilk_verify_simd): Likewise.
3746 * c-typeck.c (build_array_ref): Likewise.
3747 (build_function_call_vec): Likewise.
3748 (convert_arguments): Likewise.
3749 (build_compound_expr): Likewise.
3750 (c_finish_return): Likewise.
3751 (c_finish_if_stmt): Likewise.
3752 (c_finish_loop): Likewise.
3753 (build_binary_op): Likewise.
3754
393e8e8b
MP
37552014-01-23 Marek Polacek <polacek@redhat.com>
3756
3757 PR c/59846
3758 * c-typeck.c (parser_build_binary_op): Use location instead of
3759 input_location.
3760 (build_binary_op): Pass location to shorten_compare.
3761
f04dda30
MP
37622014-01-23 Marek Polacek <polacek@redhat.com>
3763
3764 PR c/58346
3765 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3766 an empty aggregate.
3767
789eadcd
MP
37682014-01-23 Marek Polacek <polacek@redhat.com>
3769
3770 PR c/59871
3771 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3772 of a comma expression.
3773 (emit_side_effect_warnings): Likewise.
3774
40f14e9f
BI
37752014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3776
3777 PR c/59825
3778 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3779 function to use walk_tree and moved a lot of its functionality to
3780 expand_array_notations.
3781 (expand_array_notations): New function.
3782
74558dd9
BI
37832014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3784
3785 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3786 attribute an attribute without value.
3787
652fea39
JJ
37882014-01-23 Jakub Jelinek <jakub@redhat.com>
3789
3790 PR middle-end/58809
3791 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3792 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3793
f34f1c87
MP
37942014-01-22 Marek Polacek <polacek@redhat.com>
3795
3796 PR c/59891
3797 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3798 of remove_c_maybe_const_expr on op1 and op2.
3799
241f845a
JJ
38002014-01-15 Jakub Jelinek <jakub@redhat.com>
3801
3802 PR c/58943
3803 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3804 effects, preevaluate rhs using SAVE_EXPR first.
3805
9a74f20c
BI
38062014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3807
3808 PR c++/59631
3809 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3810 statements with if-elseif statements.
3811
96066ce1
MP
38122014-01-06 Marek Polacek <polacek@redhat.com>
3813
3814 PR c/57773
3815 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3816 defined bit-field types only in ISO C.
3817
23a5b65a
RS
38182014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3819
3820 Update copyright years
3821
f9030485
RS
38222014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3823
3824 * c-array-notation.c: Use the standard form for the copyright notice.
3825
41958c28
BI
38262013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3827
3828 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3829 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3830 field in parser is not empty. If not-empty, call the function
3831 c_parser_finish_omp_declare_simd.
3832 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3833 between SIMD-enabled functions and #pragma simd. Added new parameter.
3834 (c_parser_cilk_all_clauses): Modified the usage of the function
3835 c_parser_cilk_clause_vectorlength as mentioned above.
3836 (c_parser_cilk_simd_fn_vector_attrs): New function.
3837 (c_finish_cilk_simd_fn_tokens): Likewise.
3838 (is_cilkplus_vector_p): Likewise.
3839 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3840 "nomask," and "mask" strings in clause name.
3841 (c_parser_omp_all_clauses): Added 3 new case statements:
3842 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3843 PRAGMA_CILK_CLAUSE_NOMASK.
3844 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3845 check for vector attribute and if so call the function
3846 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3847 called the function c_finish_cilk_simd_fn_tokens.
3848 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3849 parser field is non-empty. If so, parse them as you would parse
3850 the omp declare simd pragma.
3851 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3852 Added a check when step is a parameter and flag it as error.
3853 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3854 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3855 pragma_omp_clause.
3856
cef0fd0e
TS
38572013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3858
3859 * c-parser.c (c_parser_omp_parallel): Fix description.
3860
12893402
BI
38612013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3862
3863 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3864 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3865 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3866 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3867
296674db
JM
38682013-12-04 Joseph Myers <joseph@codesourcery.com>
3869
3870 PR c/52023
3871 * c-parser.c (c_parser_alignas_specifier): Use
3872 c_sizeof_or_alignof_type instead of c_alignof.
3873 (c_parser_alignof_expression): Likewise, with min_alignof
3874 parameter depending on alignof spelling used.
3875
edd28054
MP
38762013-12-04 Marek Polacek <polacek@redhat.com>
3877
3878 PR c/54113
3879 * c-decl.c (start_function): Don't warn for missing prototype for
3880 inline functions.
3881
da0fc454
MP
38822013-12-03 Marek Polacek <polacek@redhat.com>
3883
3884 PR c/59351
3885 * c-decl.c (build_compound_literal): Allow compound literals with
3886 empty initial value.
3887
4c2ecab0
JM
38882013-12-02 Joseph Myers <joseph@codesourcery.com>
3889
3890 PR c/58235
3891 * c-typeck.c (build_modify_expr): Diagnose assignment to
3892 expression with array type.
3893
340baef7
JM
38942013-11-29 Joseph Myers <joseph@codesourcery.com>
3895
3896 PR c/42262
3897 * c-typeck.c (process_init_element): Do not treat a string as
3898 initializing a whole array when used with a designator for an
3899 individual element.
3900
6763b9f7
JM
39012013-11-29 Joseph Myers <joseph@codesourcery.com>
3902
3903 PR c/57574
3904 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3905 an inline function following a static declaration.
3906
e7bd1de1
JJ
39072013-11-28 Jakub Jelinek <jakub@redhat.com>
3908
3909 PR c/59310
3910 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3911 to p_name before calling c_parser_omp_teams instead of after.
3912 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3913 argument. Remove unused p_name variable.
3914
0136f8f0
AH
39152013-11-27 Aldy Hernandez <aldyh@redhat.com>
3916 Jakub Jelinek <jakub@redhat.com>
3917
3918 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3919 external_scope is NULL.
3920
241b71bb
TV
39212013-11-27 Tom de Vries <tom@codesourcery.com>
3922 Marc Glisse <marc.glisse@inria.fr>
3923
3924 PR c++/59032
3925 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3926
2fb9a547
AM
39272013-11-22 Andrew MacLeod <amacleod@redhat.com>
3928
3929 * c-typeck.c: Add required include files from gimple.h.
3930
8400e75e
DM
39312013-11-22 David Malcolm <dmalcolm@redhat.com>
3932
3933 * c-decl.c (define_label, shadow_tag_warned)
3934 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3935 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3936 (declspecs_add_type): Remove use of in_system_header macro.
3937 * c-parser.c (c_parser_unary_expression): Likewise.
3938 * c-typeck.c (store_init_value, process_init_element)
3939 (c_start_case): Likewise.
3940
3941 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3942 macro.
3943
3944 * c-parser.c (c_parser_set_source_position_from_token): Remove
3945 reference to in_system_header from comment.
3946
386b1f1f
RS
39472013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3948
3949 * c-decl.c (grokdeclarator): Update comment to refer to
3950 tree_to_[su]hwi rather than tree_low_cst.
3951
ae7e9ddd
RS
39522013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3953
3954 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3955 tree_to_uhwi throughout.
3956
9439e9a1
RS
39572013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3958
3959 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3960 throughout.
3961
9541ffee
RS
39622013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3963
3964 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3965 throughout.
3966
c02065fc
AH
39672013-11-15 Aldy Hernandez <aldyh@redhat.com>
3968
3969 * c-parser.c (c_parser_cilk_simd): New.
3970 (c_parser_cilk_verify_simd): New.
3971 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3972 (c_parser_omp_for_loop): Add case for NE_EXPR.
3973 Set c_break_label for CILK_SIMD.
3974 (c_parser_cilk_clause_vectorlength): New.
3975 (c_parser_cilk_clause_linear): New.
3976 (c_parser_cilk_clause_name): New.
3977 (c_parser_cilk_all_clauses): New.
3978 * c-typeck.c (build_unary_op): Pass location argument to
3979 readonly_error.
3980 (build_modify_expr): Same.
3981 (build_asm_expr): Same.
3982 (c_finish_bc_stmt): Error on break/continue in loops.
3983
18f429e2
AM
39842013-11-14 Andrew MacLeod <amacleod@redhat.com>
3985
3986 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3987
d8a2d370
DN
39882013-11-14 Diego Novillo <dnovillo@google.com>
3989
3990 * c-decl.c: Include print-tree.h.
3991 Include stor-layout.h.
3992 Include varasm.h.
3993 Include attribs.h.
3994 Include stringpool.h.
3995 * c-lang.c: Include fold-const.h.
3996 * c-parser.c: Include stringpool.h.
3997 Include attribs.h.
3998 Include stor-layout.h.
3999 Include varasm.h.
4000 Include trans-mem.h.
4001 * c-typeck.c: Include stor-layout.h.
4002 Include trans-mem.h.
4003 Include varasm.h.
4004 Include stmt.h.
4005
38b7bc7f
JM
40062013-11-13 Joseph Myers <joseph@codesourcery.com>
4007
4008 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4009 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4010 __auto_type.
4011 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4012 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4013 RID_AUTO_TYPE.
4014 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4015 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4016 (c_parser_declarator, c_parser_direct_declarator_inner)
4017 (c_parser_parameter_declaration, c_parser_type_name): All callers
4018 changed.
4019 (c_parser_declaration_or_fndef): Handle declarations with type
4020 determined from the initializer.
4021
45b0be94
AM
40222013-11-12 Andrew MacLeod <amacleod@redhat.com>
4023
18f429e2 4024 * c-typeck.c: Include gimplify.h.
45b0be94 4025
582d9b50
JM
40262013-11-12 Joseph Myers <joseph@codesourcery.com>
4027
4028 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4029 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4030 comment.
4031 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4032 or _Thread_local as appropriate in diagnostics.
4033 (build_null_declspecs): Initialize ret->thread_gnu_p.
4034 (declspecs_add_scspec): Handle either __thread or _Thread_local
4035 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4036 pedantic. Do not disallow _Thread_local extern and _Thread_local
4037 static.
4038
267bac10
JM
40392013-11-07 Joseph Myers <joseph@codesourcery.com>
4040 Andrew MacLeod <amacleod@redhat.com>
4041
4042 * c-aux-info.c (gen_type): Handle atomic qualifier.
4043 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4044 qualifiers when compating types.
4045 (shadow_tag_warned): Handle atomic_p in declspecs.
4046 (quals_from_declspecs): Likewise.
4047 (start_decl): Use c_type_promotes_to when promoting argument
4048 types.
4049 (grokdeclarator): Handle _Atomic.
4050 (get_parm_info): Diagnose any qualifier on "void" as only
4051 parameter.
4052 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4053 comparing types. Use c_type_promotes_to when promoting argument
4054 types.
4055 (finish_function): Use c_type_promotes_to when promoting argument
4056 types.
4057 (build_null_declspecs): Handle atomic_p in declspecs.
4058 (declspecs_add_qual): Handle RID_ATOMIC.
4059 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4060 (c_token_starts_declspecs): Handle RID_ATOMIC.
4061 (c_parser_declspecs): Handle atomic type specifiers and
4062 qualifiers.
4063 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4064 from types of expressions with atomic type.
4065 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4066 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4067 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4068 (c_parser_statement_after_labels, c_parser_switch_statement)
4069 (c_parser_for_statement, c_parser_expr_no_commas)
4070 (c_parser_conditional_expression, c_parser_binary_expression)
4071 (c_parser_cast_expression, c_parser_unary_expression)
4072 (c_parser_postfix_expression)
4073 (c_parser_postfix_expression_after_primary, c_parser_expression):
4074 Use convert_lvalue_to_rvalue.
4075 (c_parser_expression_conv, c_parser_expr_list): Document
4076 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4077 (c_parser_objc_synchronized_statement): Use
4078 convert_lvalue_to_rvalue.
4079 (c_parser_objc_selector): Handle RID_ATOMIC.
4080 (c_parser_objc_receiver, c_parser_array_notation): Use
4081 convert_lvalue_to_rvalue.
4082 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4083 _Atomic (type-name).
4084 (struct c_declspecs): Add atomic_p field.
4085 (convert_lvalue_to_rvalue): Declare.
4086 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4087 corresponding atomic types.
4088 (qualify_type): Don't add _Atomic qualifiers from second argument.
4089 (comp_target_types): Do not allow _Atomic mismatches.
4090 (type_lists_compatible_p): Do not remove atomic qualifiers when
4091 comparing types.
4092 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4093 (build_atomic_assign): New functions.
4094 (build_unary_op): Use build_atomic_assign for atomic increment and
4095 decrement.
4096 (build_conditional_expr): Do not treat _Atomic void as a qualified
4097 version of void.
4098 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4099 (find_anonymous_field_with_type, convert_to_anonymous_field)
4100 (convert_for_assignment): Do not remove atomic qualifiers when
4101 comparing types.
4102 (digest_init): Do not accept initialization of arrays of atomic
4103 elements by string constants.
4104 (build_asm_expr): Use convert_lvalue_to_rvalue.
4105 (build_binary_op): Do not treat _Atomic void as a qualified
4106 version of void.
4107
0c249d4b
DD
41082013-11-06 DJ Delorie <dj@redhat.com>
4109
4110 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4111 both explicit and builtin, print the location of the explicit one.
4112
6d7f7e0a
TB
41132013-11-05 Tobias Burnus <burnus@net-b.de>
4114
4115 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4116 c_parser_omp_distribute, c_parser_omp_teams,
4117 c_parser_omp_target, c_parser_omp_declare): Handle
4118 -fopenmp-simd.
4119
b906f4ca
MP
41202013-11-03 Marek Polacek <polacek@redhat.com>
4121
4122 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4123
ee1d5a02
JJ
41242013-11-01 Jakub Jelinek <jakub@redhat.com>
4125
4126 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4127 check_dup_generic at the end, unless remove is true.
4128 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4129 remove = true;.
4130 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4131
5a9785fb
JJ
41322013-10-31 Jakub Jelinek <jakub@redhat.com>
4133
4134 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4135 with decl that is not pointer nor array.
4136
939b37da
BI
41372013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4138
4139 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4140 a spawning function is found.
4141 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4142 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4143 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4144 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4145 case.
4146 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4147 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4148 expr.
4149 (c_finish_return): Added a check to reject _Cilk_spawn in return
4150 expression.
4151 (build_cilk_spawn): New function.
4152 (build_cilk_sync): Likewise.
4153 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4154
d4af74d4
TB
41552013-10-27 Tobias Burnus <burnus@net-b.de>
4156
4157 PR other/33426
4158 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4159 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4160 (c_parser_statement_after_labels): Update calls.
4161
d73749df 41622013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4163
4164 PR other/33426
4165 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4166 Handle PRAGMA_IVDEP.
4167 (c_parser_statement_after_labels): Update call.
4168
f28aa681
MP
41692013-10-24 Marek Polacek <polacek@redhat.com>
4170
4171 * c-parser.c (c_parser_struct_declaration): Add a comment.
4172 (c_parser_declarator): Don't allow _Alignas here.
4173
0645c1a2
AM
41742013-10-17 Andrew MacLeod <amacleod@redhat.com>
4175
4176 * c-parser.c: Include omp-low.h.
4177 * c-typeck.c: Likewise.
4178
568a31f2
MP
41792013-10-17 Marek Polacek <polacek@redhat.com>
4180
4181 PR c/58267
4182 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4183 Document syntax of the array-declarator.
4184 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4185 are not permitted.
4186 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4187 (c_parser_struct_declaration): Likewise.
4188 (c_parser_declarator): Likewise.
4189 (c_parser_direct_declarator_inner): Likewise.
4190 (c_parser_parameter_declaration): Likewise.
4191 (c_parser_type_name): Likewise.
4192
acf0174b
JJ
41932013-10-11 Jakub Jelinek <jakub@redhat.com>
4194
4195 * c-lang.h (current_omp_declare_target_attribute): New extern
4196 decl.
4197 * c-parser.c: Include c-lang.h.
4198 (struct c_parser): Change tokens to c_token *.
4199 Add tokens_buf field. Change tokens_avail type to unsigned int.
4200 (c_parser_consume_token): If parser->tokens isn't
4201 &parser->tokens_buf[0], increment parser->tokens.
4202 (c_parser_consume_pragma): Likewise.
4203 (enum pragma_context): Add pragma_struct and pragma_param.
4204 (c_parser_external_declaration): Adjust
4205 c_parser_declaration_or_fndef caller.
4206 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4207 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4208 Adjust recursive call.
4209 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4210 of pragma_external.
4211 (c_parser_parameter_declaration): Use pragma_param instead of
4212 pragma_external.
4213 (c_parser_compound_statement_nostart, c_parser_label,
4214 c_parser_for_statement): Adjust
4215 c_parser_declaration_or_fndef callers.
4216 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4217 it through to c_parser_conditional_expression.
4218 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4219 pass it through to c_parser_binary_expression. Adjust recursive
4220 call.
4221 (c_parser_binary_expression): Remove prec argument, add
4222 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4223 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4224 binop matches it, use build2 instead of parser_build_binary_op.
4225 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4226 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4227 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4228 Handle pragma_struct and pragma_param the same as pragma_external.
4229 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4230 (c_parser_omp_variable_list): Parse array sections for
4231 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4232 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4233 (c_parser_omp_clause_reduction): Handle user defined reductions.
4234 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4235 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4236 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4237 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4238 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4239 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4240 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4241 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4242 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4243 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4244 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4245 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4246 (c_parser_omp_for_loop): Add CODE argument, pass it through
4247 to c_finish_omp_for. Change last argument to cclauses,
4248 and adjust uses to grab parallel clauses from the array of all
4249 the split clauses. Adjust c_parser_binary_expression,
4250 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4251 (omp_split_clauses): New function.
4252 (c_parser_omp_simd): New function.
4253 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4254 Allow the function to be called also when parsing combined constructs,
4255 and call c_parser_omp_simd when parsing for simd.
4256 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4257 #pragma omp section, require exactly one structured-block instead of
4258 sequence of statements.
4259 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4260 Allow the function to be called also when parsing combined constructs.
4261 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4262 Allow the function to be called also when parsing combined
4263 constructs.
4264 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4265 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4266 c_parser_omp_teams, c_parser_omp_target_data,
4267 c_parser_omp_target_update, c_parser_omp_target,
4268 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4269 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4270 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4271 (c_parser_omp_construct): Add p_name and mask vars. Handle
4272 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4273 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4274 and c_parser_omp_sections callers.
4275 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4276 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4277 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4278 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4279 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4280 OMP_CLAUSE_DEPEND.
4281 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4282 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4283 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4284 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4285 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4286 * c-typeck.c: Include tree-inline.h.
4287 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4288 handle_omp_array_sections_1, handle_omp_array_sections,
4289 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4290 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4291 user defined reductions.
4292 (c_tree_equal): New function.
4293 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4294 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4295 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4296 c_check_omp_declare_reduction_r): New prototypes.
4297 * c-decl.c (current_omp_declare_target_attribute): New variable.
4298 (c_decl_attributes): New function.
4299 (start_decl, start_function): Use it instead of decl_attributes.
4300 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4301 c_omp_reduction_decl, c_omp_reduction_lookup,
4302 c_check_omp_declare_reduction_r): New functions.
4303
0a6c2227
TT
43042013-09-25 Tom Tromey <tromey@redhat.com>
4305
4306 * Make-lang.in (c/gccspec.o): Remove.
4307 (CFLAGS-c/gccspec.o): New variable.
4308 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4309 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4310 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4311
f3bc55f0
TT
43122013-09-25 Tom Tromey <tromey@redhat.com>
4313
4314 * Make-lang.in (c/gccspec.o): Don't use subshell.
4315
a24d975c
MP
43162013-09-18 Marek Polacek <polacek@redhat.com>
4317
4318 PR sanitize/58443
4319 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4320 Remove unnecessary check.
4321
ce6923c5
MP
43222013-09-18 Marek Polacek <polacek@redhat.com>
4323
4324 PR sanitizer/58411
4325 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4326 no_sanitize_undefined attribute.
4327
a1e51df9
KT
43282013-09-13 Kai Tietz <ktietz@redhat.com>
4329
4330 PR target/57848
4331 * c-decl.c (c_builtin_function_ext_scope): Remove
4332 wrong assumption that it is never called on prexisting
4333 symbol.
4334
0af94e6f
JR
43352013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4336
4337 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4338
20059c8b
GDR
43392013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4340
4341 * c-objc-common.c (c_tree_printer): Tidy.
4342
de5a5fa1
MP
43432013-08-30 Marek Polacek <polacek@redhat.com>
4344
4345 * c-typeck.c (build_binary_op): Add division by zero and shift
4346 instrumentation.
4347
2531a1d9 43482013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4349 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4350
6e2bcc98 4351 PR c/35649
2531a1d9
JR
4352 * c-typeck.c (c_common_type): Prefer double_type_node over
4353 other REAL_TYPE types with the same precision.
4354 (convert_arguments): Likewise.
4355
025311c4
GDR
43562013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4357
4358 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4359 (c_initialize_diagnostics): Call a destructor for the early printer.
4360
da6ca2b5
GDR
43612013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4362
4363 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4364 printer initialization.
4365
318cda85 43662013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4367
318cda85
BI
4368 PR c/57490
4369 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4370 check for truth values.
4371 (expand_array_notation_exprs): Added truth values case. Removed an
4372 unwanted else. Added for-loop to walk through subtrees in default
4373 case.
4374
b066401f
GDR
43752013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4376
4377 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4378
fb48aadc
JM
43792013-07-23 Joseph Myers <joseph@codesourcery.com>
4380
4381 * c-parser.c (struct c_generic_association): Fix typo.
4382
433cc7b0
TT
43832013-07-23 Tom Tromey <tromey@redhat.com>
4384 Joseph Myers <joseph@codesourcery.com>
4385
4386 * c-parser.c (struct c_generic_association): New.
4387 (c_generic_association_d): New typedef.
4388 (c_parser_generic_selection): New function.
4389 (c_parser_postfix_expression): Handle RID_GENERIC.
4390
26d40c3d
JM
43912013-07-13 Jason Merrill <jason@redhat.com>
4392
4393 PR c++/57793
4394 * c-decl.c (finish_struct): Check for too-large class.
4395
ecdbd01a 43962013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4397
4398 PR c/57821
4399 * c-typeck.c (set_init_index): When folding, check for index overflow.
4400
1141ed3f
BI
44012013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4402
4403 * c-parser.c (c_parser_array_notation): Removed rejection of array
4404 notations in an array of function pointers.
4405
713b46fa
BI
44062013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4407
4408 * c-array-notation.c (make_triplet_val_inv): New function.
4409 (create_cmp_incr): Likewise.
4410 (create_array_refs): Likewise.
4411 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4412 Also modularized common parts between functions and called the function.
4413 (build_array_notation_expr): Likewise.
4414 (fix_conditional_array_notations_1): Likewise.
4415 (fix_array_notation_expr): Likewise.
4416 (fix_array_notation_call_expr): Likewise.
4417
92f20202
MP
44182013-06-18 Marek Polacek <polacek@redhat.com>
4419
4420 PR c/57630
4421 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4422
73a23b06
BI
44232013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4424
4425 * c-array-notation.c (build_array_notation_expr): Reject array notation
4426 mismatch between LHS and RHS even inside a call_expr. Also, removed
4427 a couple while statements that were dead code.
4428
00b8517d
BI
44292013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4430
4431 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4432 excessive precision expressions in function parameters. Also removed
4433 couple unwanted while statements.
4434
1509bdda
BI
44352013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4436
4437 * c-array-notation.c (expand_array_notation_exprs): Added
4438 ARRAY_NOTATION_REF case.
4439
d60f1706
BI
44402013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4441
4442 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4443 function to c-family/array-notation-common.c.
4444 (is_cilkplus_reduce_builtin): Likewise.
4445 (find_rank): Likewise.
4446 (extract_array_notation_exprs): Likewise.
4447 (replace_array_notations): Likewise.
4448 (find_inv_trees): Likewise.
4449 (replace_inv_trees): Likewise.
4450 (contains_array_notation_expr): Likewise.
4451 (find_correct_array_notation_type): Likewise.
4452 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4453 (struct inv_list): Moved this to c-family/array-notation-common.c.
4454 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4455
6d6efbb3
BI
44562013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4457
4458 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4459 reduction functions outside the for-loop. Added a check if the fundecl
4460 is non-NULL. Finally, removed an unwanted if-statement, and made the
4461 body unconditional.
4462
25c22937
BI
44632013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4464
4465 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4466 condition of the if-statement matches the rank of else-block and then-
4467 block when array notations are used.
4468 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4469 expression after the entire function body is parsed.
4470 (c_parser_expr_no_commas): Delayed creating array notation expressions
4471 to the end of function parsing.
4472 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4473 whole if-statement instead of just the condition.
4474 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4475
edd25645
BI
44762013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4477
4478 PR c/57474
4479 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4480 array to NULL_TREE if they are unused. Also added a check for the
4481 field to be NULL before its fields are used in future.
4482
065ce7f1
RO
44832013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4484
4485 PR bootstrap/57450
4486 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4487 (build_array_notation_expr): Likewise.
4488
36536d79
BI
44892013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4490
4491 * c-typeck.c (build_array_ref): Added a check to see if array's
4492 index is greater than one. If true, then emit an error.
4493 (build_function_call_vec): Exclude error reporting and checking
4494 for builtin array-notation functions.
4495 (convert_arguments): Likewise.
4496 (c_finish_return): Added a check for array notations as a return
4497 expression. If true, then emit an error.
4498 (c_finish_loop): Added a check for array notations in a loop
4499 condition. If true then emit an error.
4500 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4501 (build_binary_op): Added a check for array notation expr inside
4502 op1 and op0. If present, we call another function to find correct
4503 type.
4504 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4505 * c-parser.c (c_parser_compound_statement): Check if array
4506 notation code is used in tree, if so, then transform them into
4507 appropriate C code.
4508 (c_parser_expr_no_commas): Check if array notation is used in LHS
4509 or RHS, if so, then build array notation expression instead of
4510 regular modify.
4511 (c_parser_postfix_expression_after_primary): Added a check for
4512 colon(s) after square braces, if so then handle it like an array
4513 notation. Also, break up array notations in unary op if found.
4514 (c_parser_direct_declarator_inner): Added a check for array
4515 notation.
4516 (c_parser_compound_statement): Added a check for array notation in
4517 a stmt. If one is present, then expand array notation expr.
4518 (c_parser_if_statement): Likewise.
4519 (c_parser_switch_statement): Added a check for array notations in
4520 a switch statement's condition. If true, then output an error.
4521 (c_parser_while_statement): Similarly, but for a while.
4522 (c_parser_do_statement): Similarly, but for a do-while.
4523 (c_parser_for_statement): Similarly, but for a for-loop.
4524 (c_parser_unary_expression): Check if array notation is used in a
4525 pre-increment or pre-decrement expression. If true, then expand
4526 them.
4527 (c_parser_array_notation): New function.
4528 * c-array-notation.c: New file.
4529 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4530
cd192ccc
MS
45312013-05-23 Mike Stump <mikestump@comcast.net>
4532
4533 * c-typeck.c (convert_for_assignment): Handle references to memory
4534 spaces better.
4535
427b248d
JM
45362013-05-16 Jason Merrill <jason@redhat.com>
4537
4538 * Make-lang.in (cc1$(exeext)): Use link mutex.
4539
44d90fe1
PC
45402013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4541
4542 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4543 to simply use OPT_Wpointer_arith.
4544 (build_unary_op): Likewise.
4545
4e7d7b3d
JJ
45462013-04-03 Jakub Jelinek <jakub@redhat.com>
4547
4548 PR c/19449
4549 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4550 argument. If set, or it temporarily for parsing of the first
4551 argument into force_folding_builtin_constant_p.
4552 (c_parser_postfix_expression): Adjust callers.
4553
839b422f
RB
45542013-03-21 Richard Biener <rguenther@suse.de>
4555
4556 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4557 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4558
2ee028f1
MP
45592013-02-12 Marek Polacek <polacek@redhat.com>
4560
4561 PR c/44938
4562 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4563 origtypes to NULL.
4564
8824edff
JJ
45652013-01-24 Jakub Jelinek <jakub@redhat.com>
4566
4567 PR c/56078
4568 * c-typeck.c (set_nonincremental_init_from_string): If
4569 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4570 returned false.
4571 (process_init_element): Likewise.
4572
eadd3d0d
JJ
45732012-12-20 Jakub Jelinek <jakub@redhat.com>
4574
4575 PR c++/55619
4576 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4577 argument, don't call default_function_array_conversion
4578 nor c_fully_fold here.
4579 (c_parser_asm_statement): Adjust callers.
4580 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4581 and outputs here, and call default_function_array_conversion
4582 on inputs that don't need to be addressable.
4583
f8a93a2e
JJ
45842012-12-18 Jakub Jelinek <jakub@redhat.com>
4585
4586 PR c/39464
4587 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4588 warning require that both c_common_unsigned_type as well as
4589 c_common_signed_type is the same for both mvl and mvr types.
4590
9771b263
DN
45912012-11-16 Diego Novillo <dnovillo@google.com>
4592
4593 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4594
4595 * c-common.c: Use new vec API in vec.h.
4596 * c-common.h: Likewise.
4597 * c-gimplify.c: Likewise.
4598 * c-pragma.c: Likewise.
4599 * c-pretty-print.c: Likewise.
4600 * c-pretty-print.h: Likewise.
4601 * c-semantics.c: Likewise.
4602 * c-decl.c: Likewise.
4603 * c-parser.c: Likewise.
4604 * c-tree.h: Likewise.
4605 * c-typeck.c: Likewise.
4606
880661a4
JW
46072012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4608
4609 PR c++/54930
4610 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4611
077d1abe
MLI
46122012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4613
4614 PR c/53066
4615 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4616 shadows a function, unless the variable is a function or a
4617 pointer-to-function.
4618
3a785c97
JJ
46192012-10-12 Jakub Jelinek <jakub@redhat.com>
4620
4621 PR c/54381
4622 * c-parser.c (struct c_tree_loc_pair): Removed.
4623 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4624 add location_t * and tree * arguments, fill in array of 3
4625 sizeof_arg trees and corresponding locs.
4626 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4627 c_parser_expr_list callers.
4628 (c_parser_postfix_expression_after_primary): Likewise. Pass
4629 array of 3 sizeof_arg trees and locs (corresponding to first
4630 3 arguments) to sizeof_pointer_memaccess_warning.
4631
703c8606
LC
46322012-10-09 Lawrence Crowl <crowl@google.com>
4633
4634 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4635 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4636 hash table.
4637
5d9de0d0
PC
46382012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4639
4640 PR c++/54194
4641 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4642 call.
4643
a212e43f
MG
46442012-10-09 Marc Glisse <marc.glisse@inria.fr>
4645
4646 PR c++/54427
4647 * c-typeck.c: Include c-common.h.
4648 (enum stv_conv): Moved to c-common.h.
4649 (scalar_to_vector): Moved to c-common.c.
4650 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4651 * Make-lang.in: c-typeck.c depends on c-common.h.
4652
3b78de56
AC
46532012-10-04 Arnaud Charlet <charlet@adacore.com>
4654
4655 * c-decl.c (c_write_global_declarations): Fix handling of
4656 -fdump-ada-spec*.
4657
78c60e3d
SS
46582012-09-30 Sharad Singhai <singhai@google.com>
4659
4660 * c-decl.c (c_write_global_declarations): Use a different method
4661 to determine if the dump has ben initialized.
4662
9f33203d
JM
46632012-09-14 Joseph Myers <joseph@codesourcery.com>
4664
4665 PR c/54552
4666 * c-typeck.c (c_cast_expr): When casting to a type requiring
4667 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4668 c_fully_fold first.
4669
a27d595d
JM
46702012-09-14 Joseph Myers <joseph@codesourcery.com>
4671
4672 PR c/54103
4673 * c-typeck.c (build_unary_op): Pass original argument of
4674 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4675 any C_MAYBE_CONST_EXPR, if it has integer operands.
4676 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4677 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4678 to c_objc_common_truthvalue_conversion, then remove any
4679 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4680 c_objc_common_truthvalue_conversion not
4681 c_common_truthvalue_conversion.
4682 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4683 call note_integer_operands for arguments with integer operands
4684 that are not integer constants.
4685
9feb29df
JJ
46862012-09-13 Jakub Jelinek <jakub@redhat.com>
4687
4688 PR c/54559
4689 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4690 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4691
d409320c
JJ
46922012-08-31 Jakub Jelinek <jakub@redhat.com>
4693
4694 PR c/54428
4695 * c-convert.c (convert): Don't call fold_convert_loc if
4696 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4697 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4698 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4699
6265d07c
JJ
47002012-08-24 Jakub Jelinek <jakub@redhat.com>
4701
4702 PR c/54355
4703 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4704 for nested and empty_ok arguments in the call to
4705 c_parser_declaration_or_fndef.
4706
1a4049e7
JJ
47072012-08-17 Jakub Jelinek <jakub@redhat.com>
4708
4709 * c-tree.h (c_last_sizeof_arg): Declare.
4710 * c-parser.c (struct c_tree_loc_pair): New type.
4711 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4712 non-NULL.
4713 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4714 (c_parser_postfix_expression_after_primary): Likewise. Call
4715 sizeof_pointer_memaccess_warning if needed.
4716 (sizeof_ptr_memacc_comptypes): New function.
4717 * c-typeck.c (c_last_sizeof_arg): New global variable.
4718 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4719
0229aee9
UB
47202012-07-24 Uros Bizjak <ubizjak@gmail.com>
4721
4722 * c-lang.h (lang_decl): Add variable_size GTY option.
4723
7ee2468b
SB
47242012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4725
4726 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4727 * Make-lang.in: Fix dependencies.
4728
d4a10d0a
SB
47292012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4730
4731 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4732 and add language Makefile hooks.
4733 * config-lang.in: New file.
4734 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4735 add the required "normal" config-lang.in rules.
4736 * c-lang.h: Moved from gcc/ to here.
4737 * c-tree.h: Likewise.
4738 * c-objc-common.c: Likewise.
4739 * c-objc-common.h: Likewise.
4740 * c-typeck.c: Likewise.
4741 * c-convert.c: Likewise.
4742 * c-lang.c: Likewise.
4743 * c-aux-info.c: Likewise.
4744 * c-errors.c: Likewise.
4745 * gccspec.c: Likewise.
4746 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4747 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4748\f
cbe34bb5 4749Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4750
4751Copying and distribution of this file, with or without modification,
4752are permitted in any medium without royalty provided the copyright
4753notice and this notice are preserved.