]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Recover GOTO predictor.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
7fef86d3
JH
12017-07-31 Jan Hubicka <hubicka@ucw.cz>
2 Martin Liska <mliska@suse.cz>
3
4 * c-typeck.c (c_finish_goto_label): Build gimple predict
5 stament.
6
f34ebeb2
ML
72017-07-31 Martin Liska <mliska@suse.cz>
8
9 PR sanitize/81530
10 * c-convert.c (convert): Guard condition with flag_sanitize_p
11 also with current_function_decl non-null equality.
12 * c-decl.c (grokdeclarator): Likewise.
13 * c-typeck.c (build_binary_op): Likewise.
14
8595f67b
MP
152017-07-25 Marek Polacek <polacek@redhat.com>
16
17 * c-decl.c (grokfield): Remove local variable.
18
d49718d6
MP
192017-07-25 Marek Polacek <polacek@redhat.com>
20
21 PR c/81364
22 * c-parser.c (c_parser_else_body): Don't warn about multistatement
23 macro expansion if the body is in { }.
24 (c_parser_while_statement): Likewise.
25 (c_parser_for_statement): Likewise.
26
ff22eb12
NS
272017-07-18 Nathan Sidwell <nathan@acm.org>
28
29 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
30
eea77d1f
DM
312017-07-14 David Malcolm <dmalcolm@redhat.com>
32
33 * c-decl.c (implicitly_declare): When suggesting a missing
34 #include, provide a fix-it hint.
35
b6f43128
DM
362017-07-06 David Malcolm <dmalcolm@redhat.com>
37
38 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
39 and call that instead.
40 * c-tree.h (selftest::run_c_tests): New decl.
41
3e2becc4
MP
422017-06-26 Marek Polacek <polacek@redhat.com>
43
44 PR c/80116
45 * c-parser.c (c_parser_if_body): Set the location of the
46 body of the conditional after parsing all the labels. Call
47 warn_for_multistatement_macros.
48 (c_parser_else_body): Likewise.
49 (c_parser_switch_statement): Likewise.
50 (c_parser_while_statement): Likewise.
51 (c_parser_for_statement): Likewise.
52 (c_parser_statement): Add a default argument. Save the location
53 after labels have been parsed.
54 (c_parser_c99_block_statement): Likewise.
55
343ae898
RB
562017-06-19 Richard Biener <rguenther@suse.de>
57
58 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
59 negated _Literals to parse _Literal (int) -1.
60
45b2222a
ML
612017-06-13 Martin Liska <mliska@suse.cz>
62
63 PR sanitize/78204
64 * c-convert.c (convert): Use sanitize_flags_p.
65 * c-decl.c (grokdeclarator): Likewise.
66 * c-typeck.c (convert_for_assignment): Likewise.
67 (c_finish_return): Likewise.
68 (build_binary_op): Likewise.
69
8ab7005b
JJ
702017-06-08 Jakub Jelinek <jakub@redhat.com>
71
72 PR c/81006
73 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
74 to sizetype before size_binop.
75
363dc72c
JJ
762017-06-07 Jakub Jelinek <jakub@redhat.com>
77
78 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
79 of TDI_generic.
80
dc949728
MP
812017-06-06 Marek Polacek <polacek@redhat.com>
82
83 PR c/79983
84 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
85 ref.
86 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
87
40ffd95f
BE
882017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
89
90 * c-parser.c (c_parser_binary_expression): Implement the
91 -Wsizeof_pointer_div warning.
92 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
93 from a parenthesized expression.
94 (c_parser_expr_list): Use c_last_sizeof_loc.
95 * c-tree.h (c_last_sizeof_loc): New external.
96 * c-typeck.c (c_last_sizeof_loc): New variable.
97 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
98
9fc5e7a4
MM
992017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
100
101 PR testsuite/80580
102 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
103
f012c8ef
DM
1042017-05-30 David Malcolm <dmalcolm@redhat.com>
105
106 * c-objc-common.c (c_tree_printer): Gain bool and const char **
107 parameters.
108
3cd211af
MS
1092017-05-24 Martin Sebor <msebor@redhat.com>
110
111 PR c/80731
112 * c-fold.c (c_fully_fold_internal): Adjust.
113 * c-typeck.c (parser_build_unary_op): Adjust.
114
fd71a9a2
TS
1152017-05-23 Thomas Schwinge <thomas@codesourcery.com>
116
117 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
118 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
119 "VECTOR_LENGTH".
120
92fa0f9e
MP
1212017-05-23 Marek Polacek <polacek@redhat.com>
122
123 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
124 quotes.
125
d11c168a
JJ
1262017-05-22 Jakub Jelinek <jakub@redhat.com>
127
128 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
129 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
130 it returned invariant. Call tree_invariant_p unconditionally
131 afterwards to decide whether to return expr or op0.
132
58aca9d9
NS
1332017-05-22 Nathan Sidwell <nathan@acm.org>
134
135 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
136
7fd549d2
TS
1372017-05-19 Thomas Schwinge <thomas@codesourcery.com>
138
139 * c-parser.c (c_parser_omp_clause_default): Handle
140 "OMP_CLAUSE_DEFAULT_PRESENT".
141
6ecd2339
BE
1422017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
143
144 * config-lang.in (gtfiles): Add c-family/c-format.c.
145
8a57ecff
NS
1462017-05-18 Nathan Sidwell <nathan@acm.org>
147
148 * c-decl.c (pushdecl_top_level): Delete unused function.
149
6574d78e
MP
1502017-05-18 Marek Polacek <polacek@redhat.com>
151
152 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
153 (check_earlier_gotos): Likewise.
154 (define_label): Likewise.
155 (pending_xref_error): Likewise.
156 (smallest_type_quals_location): Likewise.
157 (grokdeclarator): Likewise.
158 (grokparms): Likewise.
159 (identifier_global_value): Likewise.
160 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
161 (find_init_member): Likewise.
162
e3455240
MP
1632017-05-18 Marek Polacek <polacek@redhat.com>
164
165 * c-decl.c (start_decl): Use false/true instead of 0/1.
166 (grokdeclarator): Likewise.
167 (finish_struct): Likewise.
168 (start_function): Change the return type to bool. Use false/true
169 instead of 0/1.
170 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
171 * c-tree.h (start_function): Update.
172 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
173 (set_designator): Change the return type to bool. Use false/true
174 instead of 0/1.
175
3fa8871b
MP
1762017-05-17 Marek Polacek <polacek@redhat.com>
177
178 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
179 * c-typeck.c: Likewise.
180
142473df
MP
1812017-05-17 Marek Polacek <polacek@redhat.com>
182
183 PR sanitizer/80659
184 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
185 DECL_IGNORED_P even for non-static compound literals.
186
1a817418
ML
1872017-05-17 Martin Liska <mliska@suse.cz>
188
189 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
190 use it instead of int type.
191
b2fa0a8b
MP
1922017-05-17 Marek Polacek <polacek@redhat.com>
193
194 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
195 call c_fully_fold.
196 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
197 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
198 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
199 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
200 save_expr.
201 (c_parser_conditional_expression): Likewise.
202 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
203 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
204 (process_init_element): Likewise.
205 (build_binary_op): Likewise.
206 (handle_omp_array_sections_1): Likewise.
207
1e47f02b
TS
2082017-05-12 Thomas Schwinge <thomas@codesourcery.com>
209
210 * c-parser.c (c_parser_omp_clause_num_gangs)
211 (c_parser_omp_clause_num_workers)
212 (c_parser_omp_clause_vector_length): Merge functions into...
213 (c_parser_oacc_single_int_clause): ... this new function. Adjust
214 all users.
215
c24e924f
NS
2162017-05-11 Nathan Sidwell <nathan@acm.org>
217
218 * gimple-parser.c: Don't #include tree-dump.h.
219
c587104e
MM
2202017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
221
222 PR testsuite/80580
223 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
224
67ac9a9d
MM
2252017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
226
227 PR testsuite/80580
228 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
229 incorrect __MEM syntax.
230
ac4eb40f
MM
2312017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
232
233 PR testsuite/80580
234 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
235 type of unary '*'.
236
641da50a
NS
2372017-05-09 Nathan Sidwell <nathan@acm.org>
238
239 * c-tree.h (pushdecl): Declare.
240
56d35585
DM
2412017-05-05 David Malcolm <dmalcolm@redhat.com>
242
243 * c-decl.c (warn_defaults_to): Replace report_diagnostic
244 with diagnostic_report_diagnostic.
245 * c-errors.c (pedwarn_c99): Likewise.
246 (pedwarn_c90): Likewise.
247
815d9cc6
XR
2482017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
249
250 PR c++/80038
251 * c-gimplify.c (c_gimplify_expr): Remove calls to
252 cilk_gimplifY_call_params_in_spawned_fn.
253
1c4ea66f
DM
2542017-04-25 David Malcolm <dmalcolm@redhat.com>
255
256 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
257 hint for removing extra semicolon.
258
666f7903
JJ
2592017-04-21 Jakub Jelinek <jakub@redhat.com>
260
261 PR c/80468
262 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
263 enabled, set specs->type to integer_type_node.
264
5764ee3c
JW
2652017-04-03 Jonathan Wakely <jwakely@redhat.com>
266
267 * c-array-notation.c: Fix typo in comment.
268
10fa8dfb
MP
2692017-03-29 Marek Polacek <polacek@redhat.com>
270
271 PR c/79730
272 * c-decl.c (finish_decl): Check VAR_P.
273
a9e4a1a5
JJ
2742017-03-27 Jakub Jelinek <jakub@redhat.com>
275
276 PR middle-end/80162
277 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
278 * c-typeck.c (c_mark_addressable): Likewise. Look through
279 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
280 to ARRAY_TYPE.
281 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
282
ee3ff394
MP
2832017-03-23 Marek Polacek <polacek@redhat.com>
284
285 * c-tree.h: Remove a C_RID_YYCODE reference.
286
4d1b8e70
JJ
2872017-03-21 Jakub Jelinek <jakub@redhat.com>
288
289 PR c/80097
290 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
291 optional COMPOUND_EXPR with ubsan instrumentation.
292
31dc71a8
MP
2932017-03-17 Marek Polacek <polacek@redhat.com>
294
295 * c-parser.c: Add C11 references.
296
d579c385
MP
2972017-03-15 Marek Polacek <polacek@redhat.com>
298
299 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
300
85059a38
MP
3012017-03-11 Marek Polacek <polacek@redhat.com>
302
303 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
304
2f6f187a
DM
3052017-03-10 David Malcolm <dmalcolm@redhat.com>
306
307 PR translation/79848
308 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
309 "%qs".
310 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
311
36618428
MP
3122017-03-09 Marek Polacek <polacek@redhat.com>
313
314 PR sanitizer/79757
315 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
316 parameter declarations with initializers.
317
01e5af5a
JJ
3182017-03-09 Jakub Jelinek <jakub@redhat.com>
319
320 PR c/79969
321 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
322 TYPE_STUB_DECL.
323
a71dbc63
JJ
3242017-03-07 Jakub Jelinek <jakub@redhat.com>
325
326 PR c/79834
327 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
328 for "may only be used in compound statements" diagnostics, change it
329 such that the same translatable string is used for all pragmas. For
330 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
331 diagnostics.
332 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
333 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
334 "may only be used in compound statements" diagnostics, such that the
335 same translatable string is used for all pragmas.
336
1ff4bae6
MP
3372017-03-04 Marek Polacek <polacek@redhat.com>
338
339 PR c/79847
340 * c-decl.c (implicit_decl_warning): Add missing space.
341
7f5a7d78
MP
3422017-03-03 Marek Polacek <polacek@redhat.com>
343
344 PR c/79758
345 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
346 current_function_prototype_arg_types is error_mark_node. Fix
347 formatting. Use TREE_VALUE instead of TREE_TYPE.
348
883c8f06
JJ
3492017-03-03 Jakub Jelinek <jakub@redhat.com>
350
79c9b7a8
JJ
351 PR c/79837
352 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
353 %<min%> or %<max%> in the diagnostics, instead mention identifier.
354 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
355 diagnostics.
356
883c8f06
JJ
357 PR c/79836
358 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
359 instead of %<_Generic>.
360 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
361 (c_parser_omp_target_exit_data): Use %<release%> instead of
362 %<release>.
363
324ff1a0
JJ
3642017-02-28 Jakub Jelinek <jakub@redhat.com>
365
366 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
367 instead of just cond ? "..." : "...".
368 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
369 for "enter"/"exit" keyword.
370 (c_finish_oacc_routine): Don't use %s to supply portions of the
371 message.
372
4227c9ad
JJ
3732017-02-24 Jakub Jelinek <jakub@redhat.com>
374
375 PR c++/79588
376 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
377 handle -Wrestrict here.
378 * c-typeck.c (build_function_call_vec): Adjust
379 check_function_arguments caller.
380
5d972e66
RB
3812017-02-23 Richard Biener <rguenther@suse.de>
382
383 PR c/79684
384 * gimple-parser.c (c_parser_gimple_statement): Use set_error
385 to initialize c_exprs to return.
386 (c_parser_gimple_binary_expression): Likewise.
387 (c_parser_gimple_unary_expression): Likewise.
388 (c_parser_gimple_postfix_expression): Likewise.
389
61ac5ebe
MP
3902017-02-22 Marek Polacek <polacek@redhat.com>
391
392 PR c/79662
393 * c-typeck.c (convert_arguments): Handle error_mark_node.
394
41d1b0b1
PK
3952017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
396
397 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
398 value of c_parser_parse_ssa_name against error_mark_node and emit
399 error if ssa name is anonymous and written as default definition.
400
eab1f169
PK
4012017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
402
403 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
404 FMA_EXPR.
405
bcac0b4d
JJ
4062017-02-16 Jakub Jelinek <jakub@redhat.com>
407
408 PR c++/79512
409 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
410 ignore #pragma omp target even when not followed by identifier.
411
1be33173
PK
4122017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
413
414 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
415 (c_parser_gimple_unary_expression): Likewise.
416
aa326bfb
JJ
4172017-02-13 Jakub Jelinek <jakub@redhat.com>
418
419 * c-parser.c (c_parser_oacc_declare): Add missing space in
420 diagnostics.
421
8a398bc5
PK
4222017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
423
424 PR c/79478
425 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
426 set_c_expr_source_range when parsing ssa-name.
427
3dcde5ef
PG
4282017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
429 Richard Biener <rguenther@suse.de>
430
431 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
432 building IL when arguments are error_mark_node.
433 (c_parser_gimple_unary_expression): Likewise.
434 (c_parser_gimple_if_stmt): Likewise.
435 (c_parser_gimple_switch_stmt): Likewise.
436 (c_parser_gimple_return_stmt): Likewise.
437 (c_parser_parse_ssa_name): When name lookup fails do not build
438 an SSA name. Use undeclared rather than not declared in error
439 reporting.
440
192b048b
MP
4412017-02-09 Marek Polacek <polacek@redhat.com>
442
443 PR c/79428
444 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
445 instead of c_parser_skip_until_found.
446
56f71478
JJ
4472017-02-09 Jakub Jelinek <jakub@redhat.com>
448
449 PR c/79431
450 * c-parser.c (c_parser_omp_declare_target): Don't invoke
451 symtab_node::get on automatic variables.
452
02889d23
CLT
4532016-02-09 Nathan Sidwell <nathan@codesourcery.com>
454 Chung-Lin Tang <cltang@codesourcery.com>
455
456 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
457 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
458 semantic checking.
459 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
460
7af4b20d
RB
4612017-02-07 Richard Biener <rguenther@suse.de>
462
463 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
464 (c_parser_gimple_postfix_expression_after_primary):
465 Do not use c_build_function_call_vec to avoid folding and promotion.
466 Simplify.
467
e5e391d6
MO
4682017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
469
470 PR lto/79061
471 * c-decl.c (pop_scope): Pass main_input_filename to
472 build_translation_unit_decl.
473
c2e84327
DM
4742017-01-24 David Malcolm <dmalcolm@redhat.com>
475
476 * c-parser.c: Include "read-rtl-function.h" and
477 "run-rtl-passes.h".
478 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
479 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
480 production. Update for renaming of field "gimple_pass" to
481 "gimple_or_rtl_pass". If __RTL was seen, call
482 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
483 to an auto_timevar, to cope with early exit.
484 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
485 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
486 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
487 Handle RID_RTL.
488 (c_parser_parse_rtl_body): New function.
489 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
490 (struct c_declspecs): Rename field "gimple_pass" to
491 "gimple_or_rtl_pass". Add field "rtl_p".
492 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
493 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
494 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
495 (c_parser_gimple_or_rtl_pass_list): ...this.
496
2ebd93e1
MP
4972017-01-20 Marek Polacek <polacek@redhat.com>
498
499 PR c/64279
500 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
501
b1c95bb5
RB
5022017-01-13 Richard Biener <rguenther@suse.de>
503
504 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
505 nops.
506
25329913
RB
5072017-01-13 Richard Biener <rguenther@suse.de>
508
509 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
510 _Literal ( type-name ) number.
511
6bb4ea5c
RB
5122017-01-12 Richard Biener <rguenther@suse.de>
513
514 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
515 __MEM.
516
6b5b4e9c
JJ
5172017-01-11 Jakub Jelinek <jakub@redhat.com>
518
519 PR c++/72813
520 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
521 PCH file.
522
e3252775
RB
5232017-01-11 Richard Biener <rguenther@suse.de>
524
525 PR bootstrap/79052
526 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
527 returns on parse errors.
528
a9342885
MP
5292017-01-04 Marek Polacek <polacek@redhat.com>
530
531 PR c++/64767
532 * c-parser.c (c_parser_postfix_expression): Mark zero character
533 constants by setting original_type in c_expr.
534 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
535 with a zero character constant.
536 (char_type_p): New function.
537
5dd9a9d0
DM
5382017-01-04 David Malcolm <dmalcolm@redhat.com>
539
540 * c-parser.c (c_parser_declaration_or_fndef): Create a
541 rich_location at init_loc and parse it to start_init.
542 (last_init_list_comma): New global.
543 (c_parser_braced_init): Update last_init_list_comma when parsing
544 commas. Pass it to pop_init_level. Pass location of closing
545 brace to pop_init_level.
546 (c_parser_postfix_expression_after_paren_type): Create a
547 rich_location at type_loc and parse it to start_init.
548 (c_parser_omp_declare_reduction): Likewise for loc.
549 * c-tree.h (start_init): Add rich_location * param.
550 (pop_init_level): Add location_t param.
551 * c-typeck.c (struct initializer_stack): Add field
552 "missing_brace_richloc".
553 (start_init): Add richloc param, use it to initialize
554 the stack node's missing_brace_richloc.
555 (last_init_list_comma): New decl.
556 (finish_implicit_inits): Pass last_init_list_comma to
557 pop_init_level.
558 (push_init_level): When finding missing open braces, add fix-it
559 hints to the richloc.
560 (pop_init_level): Add "insert_before" param and pass it
561 when calling pop_init_level. Add fixits about missing
562 close braces to any richloc. Use the richloc for the
563 -Wmissing-braces warning.
564 (set_designator): Pass last_init_list_comma to pop_init_level.
565 (process_init_element): Likewise.
566
cbe34bb5
JJ
5672017-01-01 Jakub Jelinek <jakub@redhat.com>
568
569 Update copyright years.
570
d17680f3
JJ
5712016-12-21 Jakub Jelinek <jakub@redhat.com>
572
0dba7960
JJ
573 PR bootstrap/78817
574 * c-typeck.c (build_function_call_vec): If check_function_arguments
575 returns true, set TREE_NO_WARNING on CALL_EXPR.
576
d17680f3
JJ
577 PR c/77767
578 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
579 to *expr instead of overwriting it.
580
aa90531e
RB
5812016-12-20 Richard Biener <rguenther@suse.de>
582
583 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
584 error recovery.
585 (c_parser_gimple_statement): Only build assigns for non-error
586 stmts.
587 (c_parser_gimple_postfix_expression_after): Improve error recovery.
588
629b3d75
MJ
5892016-12-14 Martin Jambor <mjambor@suse.cz>
590
591 * c-parser.c: Include omp-general.h and omp-offload.h instead of
592 omp-low.h.
593 (c_finish_oacc_routine): Adjusted call to
594 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
595 to use their new names.
596 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
597 use its new name.
598 (c_parser_oacc_update): Likewise.
599 (c_parser_omp_simd): Likewise.
600 (c_parser_omp_target_update): Likewise.
601 * c-typeck.c: Include omp-general.h instead of omp-low.h.
602 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
603 name.
604 (c_finish_omp_cancellation_point): Likewise.
605 * gimple-parser.c: Do not include omp-low.h
606
c5af52eb
CP
6072016-12-02 Cesar Philippidis <cesar@codesourcery.com>
608 James Norris <jnorris@codesourcery.com>
609
610 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
611 EXIT_DATA,WAIT} are not used in compound statements.
612 (c_parser_oacc_enter_exit_data): Update diagnostics.
613
48330c93
BE
6142016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
615
616 PR c++/71973
617 * c-decl.c (diagnose_mismatched_decls): Use
618 OPT_Wbuiltin_declaration_mismatch here too.
619
899ca90e 6202016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
621 Alan Hayward <alan.hayward@arm.com>
622 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
623
624 * c-decl.c (merge_decls): Use SET_DECL_MODE.
625 (make_label, finish_struct): Likewise.
626
1ee62b92 6272016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 628 Richard Biener <rguenther@suse.de>
22b15758 629
8e745a17
JJ
630 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
631 * config-lang.in (gtfiles): Add c/c-parser.h.
632 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
633 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
634 * c-parser.c (enum c_id_kind, struct c_token,
635 c_parser_next_token_is, c_parser_next_token_is_not,
636 c_parser_next_token_is_keyword,
637 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
638 Split out to ...
639 * c-parser.h: ... new header.
640 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 641 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
642 c_token_starts_typename, c_parser_next_token_starts_declspecs,
643 c_parser_next_tokens_start_declaration, c_parser_consume_token,
644 c_parser_error, c_parser_require, c_parser_skip_until_found,
645 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
646 c_parser_type_name): Export.
647 (c_parser_tokens_buf): New function.
648 (c_parser_error): Likewise.
649 (c_parser_set_error): Likewise.
650 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
651 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
652 via c_parser_parse_gimple_body.
8e745a17
JJ
653 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
654 c_token_starts_typename, c_parser_next_token_starts_declspecs,
655 c_parser_next_tokens_start_declaration, c_parser_consume_token,
656 c_parser_error, c_parser_require, c_parser_skip_until_found,
657 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
658 c_parser_type_name): Declare.
1ee62b92
PG
659 (struct c_parser): Declare forward.
660 (c_parser_tokens_buf): Declare.
8e745a17
JJ
661 (c_parser_error): Likewise.
662 (c_parser_set_error): Likewise.
663 * gimple-parser.c: New file.
664 * gimple-parser.h: Likewise.
1ee62b92 665
22b15758
UB
6662016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
667
668 PR c/35503
669 * c-parser.c (c_parser_postfix_expression_after_primary): Call
670 warn_for_restrict.
671
84ff4775
LCW
6722016-09-11 Le-Chun Wu <lcwu@google.com>
673 Mark Wielaard <mjw@redhat.com>
674
675 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
676 to the given -Wshadow= variant.
677
4d0cdd0c
TP
6782016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
679
680 * c-typeck.c: Include memmodel.h.
681
1202f33e
JJ
6822016-10-13 Jakub Jelinek <jakub@redhat.com>
683
684 PR target/77957
685 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
686 instead of lhd_return_null_tree_v.
687
8a14afd0
BS
6882016-10-07 Bernd Schmidt <bschmidt@redhat.com>
689
690 PR c++/69733
691 * c-decl.c (smallest_type_quals_location): New static function.
692 (grokdeclarator): Try to find the correct location for an ignored
693 qualifier.
694
81fea426
MP
6952016-09-26 Marek Polacek <polacek@redhat.com>
696
697 PR c/7652
698 * c-decl.c (pop_scope): Add gcc_fallthrough.
699
7002016-09-26 Marek Polacek <polacek@redhat.com>
701
702 PR c/7652
703 * c-parser.c (struct c_token): Add flags field.
704 (c_lex_one_token): Pass it to c_lex_with_flags.
705 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
706 into IFN_FALLTHROUGH.
707 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
708 attribute fallthrough after a case label or default label.
709 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
710
9a2300e9
MP
7112016-09-24 Marek Polacek <polacek@redhat.com>
712
713 PR c/77490
714 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
715 have boolean value. Warn about ++/-- on booleans.
716
7de76362
JJ
7172016-09-23 Jakub Jelinek <jakub@redhat.com>
718
719 * c-parser.c (incomplete_record_decls): Remove unnecessary
720 = vNULL initialization of file scope vec.
721
5b73d2ab
MP
7222016-09-16 Marek Polacek <polacek@redhat.com>
723
724 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
725
e51fbec3
MP
7262016-09-14 Marek Polacek <polacek@redhat.com>
727
728 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
729 (fix_array_notation_expr): Likewise.
730 * c-decl.c (finish_decl): Likewise.
731 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
732 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
733 (function_to_pointer_conversion): Use false instead of 0.
734 (convert_lvalue_to_rvalue): Likewise.
735 (parser_build_unary_op): Likewise.
736 (build_atomic_assign): Likewise.
737 (build_unary_op): Change nonconvert parameter type to bool, use
738 true/false instead of 1/0.
739 (build_binary_op): Use true instead of 1.
740
254830ba
DM
7412016-09-13 David Malcolm <dmalcolm@redhat.com>
742
743 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
744 of add_fixit_insert to add_fixit_insert_before.
745
4c13ba17
MP
7462016-09-13 Marek Polacek <polacek@redhat.com>
747
748 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
749 it.
750
54dcdb88
BE
7512016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
752
753 PR c++/77496
754 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
755 COMPOUND_EXPR to warn_for_omitted_condop.
756
e5106e27
DM
7572016-09-07 David Malcolm <dmalcolm@redhat.com>
758
759 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
760 c_get_substring_location for this new langhook.
761
9dc5773f
JJ
7622016-09-02 Jakub Jelinek <jakub@redhat.com>
763
764 PR c/65467
765 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
766 flag_openmp.
767 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
768 instead of mark_exp_read on low_bound/length expression.
769 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
770 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
771 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
772 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
773 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
774 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
775 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
776 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
777 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
778 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
779 instead of mark_expr_read.
780 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
781 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
782 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
783 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
784 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
785 array section bases outside of depend clause, for depend clause
786 use convert_lvalue_to_rvalue on the base.
787 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
788 linear, aligned, map, to and from clauses.
789 (c_omp_clause_copy_ctor): New function.
790
295844f6
MP
7912016-09-01 Marek Polacek <polacek@redhat.com>
792
793 PR c/7652
794 * c-typeck.c (composite_type): Add FALLTHRU comment.
795
089af25c
DM
7962016-08-31 David Malcolm <dmalcolm@redhat.com>
797
798 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
799 to the insertion fixits for "struct", "union", and "enum".
800
f9087798
DM
8012016-08-30 David Malcolm <dmalcolm@redhat.com>
802
803 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
804 rather than add_fixit_misspelled_id.
805 (undeclared_variable): Likewise.
806 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
807 now-redundant "here" params from add_fixit_insert method calls.
808 (c_parser_parameter_declaration): Likewise.
809 * c-typeck.c (build_component_ref): Remove now-redundant range
810 param from add_fixit_replace method calls.
811
ebef225f
MP
8122016-08-25 Marek Polacek <polacek@redhat.com>
813
814 * c-typeck.c (parser_build_binary_op): Pass LHS to
815 warn_logical_not_parentheses.
816
fe377a48
MP
8172016-08-25 Marek Polacek <polacek@redhat.com>
818
819 PR c/77323
820 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
821 or _FloatN or _FloatNx is not supported.
822 (finish_declspecs): Set type to integer_type_node when _FloatN or
823 _FloatNx is not supported.
824
c65699ef
JM
8252016-08-19 Joseph Myers <joseph@codesourcery.com>
826
827 PR c/32187
828 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
829 (struct c_declspecs): Add field floatn_nx_idx.
830 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
831 and _FloatNx type specifiers.
832 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
833 (c_parser_declspecs, c_parser_attribute_any_word)
834 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
835 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
836 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
837 narrower than double.
838
2f1364c2
JJ
8392016-08-12 Jakub Jelinek <jakub@redhat.com>
840 Martin Liska <mliska@suse.cz>
841
842 PR c/67410
843 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
844 % to determine val element to change. Assert that
845 wchar_bytes * charwidth fits into val array.
846
191816a3
MP
8472016-08-12 Marek Polacek <polacek@redhat.com>
848
849 PR c/7652
850 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
851 (c_parser_postfix_expression): Likewise.
852 * c-typeck.c (build_unary_op): Adjust fall through comment.
853 (c_mark_addressable): Likewise.
854
b95a64bb
JJ
8552016-08-11 Jakub Jelinek <jakub@redhat.com>
856
857 PR c/72816
858 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
859 array member through typedef, for orig_qual_indirect == 0 clear
860 orig_qual_type.
861
895aa8e1
DM
8622016-08-08 David Malcolm <dmalcolm@redhat.com>
863
864 PR c/64955
865 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
866 this up to selftest::run_c_tests.
867 (selftest::run_c_tests): New function.
868
0b212d8c
TS
8692016-08-04 Thomas Schwinge <thomas@codesourcery.com>
870
ae9281fc
TS
871 * c-parser.c (struct oacc_routine_data): Add error_seen and
872 fndecl_seen members.
873 (c_finish_oacc_routine): Use these.
874 (c_parser_declaration_or_fndef): Adjust.
875 (c_parser_oacc_routine): Likewise. Support more C language
876 constructs, and improve diagnostics. Move pragma context
877 checking...
878 (c_parser_pragma): ... here.
879
0b212d8c
TS
880 * c-parser.c (struct oacc_routine_data): New.
881 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
882 Simplify code.
883 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
884 declare target" attribute.
885
76e2c821
JB
8862016-08-01 Jan Beulich <jbeulich@suse.com>
887
888 * c-fold.c (c_fully_fold_internal): Also emit shift count
889 warnings for vector types.
890 * c-typeck.c (build_binary_op): Likewise.
891
f618a472
MP
8922016-07-29 Marek Polacek <polacek@redhat.com>
893
894 PR c/71742
895 * c-decl.c (finish_struct): Rephrase an error message.
896
efd0786f
MP
897 PR c/71853
898 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
899 to error node for invalid code.
900
e00dceaf
MP
901 PR c/71573
902 * c-decl.c (implicitly_declare): Return decl early not only for
903 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
904
673a107a
JJ
9052016-07-29 Jakub Jelinek <jakub@redhat.com>
906
907 PR c/71969
908 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
909 on GNU extern inline functions.
910
a5b5c8b6
MP
9112016-07-29 Marek Polacek <polacek@redhat.com>
912
913 PR c/71583
914 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
915 check expr.value.
916
e3fe09c1
UB
9172016-07-22 Uros Bizjak <ubizjak@gmail.com>
918
919 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
920
7c8f7eaa
DM
9212016-07-20 David Malcolm <dmalcolm@redhat.com>
922
923 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
924 spellcheck-tree.h
925 (best_macro_match): Likewise, converting from a typedef to a
926 subclass.
927 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
928 (lookup_name_fuzzy): Update for change of best_macro_match to a
929 subclass with a ctor that calls cpp_forall_identifiers.
930
de6a69ee
DM
9312016-07-20 David Malcolm <dmalcolm@redhat.com>
932
933 * c-decl.c (implicit_decl_warning): Update for conversion of
934 return type of lookup_name_fuzzy to const char *.
935 (undeclared_variable): Likewise.
936 (lookup_name_fuzzy): Convert return type from tree to
937 const char *.
938 * c-parser.c (c_parser_declaration_or_fndef): Update for
939 conversion of return type of lookup_name_fuzzy to const char *.
940 (c_parser_parameter_declaration): Likewise.
941
b1c9c068
CP
9422016-07-15 Cesar Philippidis <cesar@codesourcery.com>
943
944 * c-parser.c (c_parser_oacc_declare): Don't scan for
945 GOMP_MAP_POINTER.
946 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
947 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
948 zero-length subarrays.
949
ddbbcb19
JJ
9502016-07-15 Jakub Jelinek <jakub@redhat.com>
951
952 PR c/71858
953 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
954 instead of FUZZY_LOOKUP_NAME.
955 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
956 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
957
dd36b877
JJ
9582016-07-14 Jakub Jelinek <jakub@redhat.com>
959
960 PR c/71858
961 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
962
8c681247
TS
9632016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
964
965 * c-parser.c (c_parser_generic_selection): Make type of variable
966 auto_vec.
967 (c_parser_omp_declare_simd): Likewise.
968
bf4fa671
TS
9692016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
970
971 * c-decl.c (struct c_struct_parse_info): Change member types
972 from vec to auto_vec.
973 (start_struct): Adjust.
974 (finish_struct): Likewise.
975
557e8c49
JJ
9762016-07-02 Jakub Jelinek <jakub@redhat.com>
977
978 PR c/71719
979 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
980
54d19c3b
TS
9812016-06-29 Thomas Schwinge <thomas@codesourcery.com>
982
983 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
984 Move pragma context checking into...
985 (c_parser_omp_cancellation_point): ... here, and improve
986 diagnostic messages.
987 * c-typeck.c (c_finish_omp_cancel)
988 (c_finish_omp_cancellation_point): Improve diagnostic messages.
989
152ef731
JJ
9902016-06-29 Jakub Jelinek <jakub@redhat.com>
991
992 PR c/71685
993 * c-typeck.c (c_build_qualified_type): Don't clear
994 C_TYPE_INCOMPLETE_VARS for the main variant.
995
9962016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
997
998 PR c/71552
999 * c-typeck.c (output_init_element): Diagnose incompatible types
1000 before non-constant initializers.
1001
e9ac1f86
JJ
10022016-06-28 Jakub Jelinek <jakub@redhat.com>
1003
1004 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1005
277d7ee0
AK
10062016-06-23 Andi Kleen <ak@linux.intel.com>
1007
1008 * Make-lang.in: Add support for autofdo.
1009
1a4f11c8
DM
10102016-06-22 David Malcolm <dmalcolm@redhat.com>
1011
1012 PR c/70339
1013 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1014 (implicit_decl_warning): When issuing warnings for implicit
1015 declarations, attempt to provide a suggestion via
1016 lookup_name_fuzzy.
1017 (undeclared_variable): Likewise when issuing errors.
1018 (lookup_name_in_scope): Likewise.
1019 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1020 (best_macro_match): New typedef.
1021 (find_closest_macro_cpp_cb): New function.
1022 (lookup_name_fuzzy): New function.
1023 * c-parser.c: Include gcc-rich-location.h.
1024 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1025 (c_keyword_starts_typename): ...this new function.
1026 (c_parser_declaration_or_fndef): When issuing errors about
1027 missing "struct" etc, add a fixit. For other kinds of errors,
1028 attempt to provide a suggestion via lookup_name_fuzzy.
1029 (c_parser_parms_declarator): When looking ahead to detect typos in
1030 type names, also reject CPP_KEYWORD.
1031 (c_parser_parameter_declaration): When issuing errors about
1032 unknown type names, attempt to provide a suggestion via
1033 lookup_name_fuzzy.
1034 * c-tree.h (c_keyword_starts_typename): New prototype.
1035
5a578671
JM
10362016-06-20 Joseph Myers <joseph@codesourcery.com>
1037
1038 PR c/71601
1039 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1040 c_common_type returns error_mark_node.
1041
3f8257db 10422016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1043
1044 PR c/69507
1045 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1046 __alignof__ (expression).
1047
6a3f203c
DM
10482016-06-14 David Malcolm <dmalcolm@redhat.com>
1049
1050 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1051
264757fb
DM
10522016-06-14 David Malcolm <dmalcolm@redhat.com>
1053
1054 * c-typeck.c (build_component_ref): Simplify fixit code by
1055 using gcc_rich_location::add_fixit_misspelled_id.
1056 (set_init_label): Likewise.
1057
f7e4f2e3
DM
10582016-06-13 David Malcolm <dmalcolm@redhat.com>
1059
1060 * c-parser.c (c_parser_initelt): Provide location of name for new
1061 location_t param of set_init_label.
1062 * c-tree.h (set_init_label): Add location_t param.
1063 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1064 param and use it when issuing error messages about unrecognized
1065 field names. Attempt to provide a fixit hint if appropriate,
1066 otherwise update the error message to provide the type name.
1067
4b1ffdb1
TS
10682016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1069
1070 PR c/71381
1071 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1072 Loosen checking.
1073
44a845ca
MS
10742016-06-08 Martin Sebor <msebor@redhat.com>
1075 Jakub Jelinek <jakub@redhat.com>
1076
1077 PR c++/70507
1078 PR c/68120
1079 * c-typeck.c (convert_arguments): Don't promote last argument
1080 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1081
92a5f2ba
MP
10822016-06-08 Marek Polacek <polacek@redhat.com>
1083
1084 PR c/71418
1085 * c-decl.c (grokdeclarator): Check TYPE_P.
1086
08203f73
MP
1087 PR c/71426
1088 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1089 code.
1090
6ffd47b7
DM
10912016-06-07 David Malcolm <dmalcolm@redhat.com>
1092
1093 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1094 and structure element reference, capture the location of the
1095 element name token and pass it to build_component_ref.
1096 (c_parser_postfix_expression_after_primary): Likewise for
1097 structure element dereference.
1098 (c_parser_omp_variable_list): Likewise for
1099 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1100 * c-tree.h (build_component_ref): Add location_t param.
1101 * c-typeck.c (build_component_ref): Add location_t param
1102 COMPONENT_LOC. Use it, if available, when issuing hints about
1103 mispelled member names to provide a fixit replacement hint.
1104
1f40cff3
MP
11052016-06-06 Marek Polacek <polacek@redhat.com>
1106
1107 PR c/71362
1108 * c-parser.c (c_parser_direct_declarator): Set location.
1109
5545a907
MP
11102016-06-06 Marek Polacek <polacek@redhat.com>
1111
1112 * c-typeck.c (comptypes_internal): Handle comparisons of
1113 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1114 TYPE_REF_CAN_ALIAS_ALL.
1115
b605f663
CLT
11162016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1117
1118 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1119 arguments as addressable when async clause exists.
1120
00631022
JJ
11212016-05-30 Jakub Jelinek <jakub@redhat.com>
1122
1123 PR c++/71349
1124 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1125 when combined with target construct.
1126
7211a097
JJ
11272016-05-26 Jakub Jelinek <jakub@redhat.com>
1128
1129 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1130 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1131
95efe6b6
MP
11322016-05-25 Marek Polacek <polacek@redhat.com>
1133
1134 PR c/71265
1135 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1136
a23faf7a
MP
1137 PR c/71266
1138 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1139
e46c7770
CP
11402016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1141
1142 * c-parser.c (c_parser_oacc_declare): Add support for
1143 GOMP_MAP_FIRSTPRIVATE_POINTER.
1144 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1145 argument with enum c_omp_region_type ort.
1146 (handle_omp_array_sections): Likewise. Update call to
1147 handle_omp_array_sections_1.
1148 (c_finish_omp_clauses): Add specific errors and warning messages for
1149 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1150 call to handle_omp_array_sections.
1151
a04e69c0
TS
11522016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1153
1154 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1155
f17a223d
RB
11562016-05-24 Richard Biener <rguenther@suse.de>
1157
1158 PR middle-end/70434
1159 PR c/69504
1160 * c-typeck.c (build_array_ref): Do not complain about indexing
1161 non-lvalue vectors. Adjust for function name change.
1162
79063edd
MS
11632016-05-20 Martin Sebor <msebor@redhat.com>
1164
1165 PR c/71115
1166 * c-typeck.c (error_init): Use
1167 expansion_point_location_if_in_system_header.
1168 (warning_init): Same.
1169
8a40fef3
DM
11702016-05-19 David Malcolm <dmalcolm@redhat.com>
1171
1172 PR c/71171
1173 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1174 in error-handling.
1175 (c_parser_postfix_expression): Likewise.
1176 * c-tree.h (c_expr::set_error): New method.
1177 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1178 that result's range is initialized.
1179
e9892350
JG
11802016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1181
1182 * c-typeck.c (parser_build_unary_op): Fix formatting.
1183
8fad45f5
MW
11842016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1185
1186 * c-decl.c (grokdeclarator): Remove errmsg and use of
1187 targetm.invalid_return_type.
1188 (grokparms): Remove errmsg and use of
1189 targetm.invalid_parameter_type.
1190
aa4b467b
JM
11912016-05-13 Joseph Myers <joseph@codesourcery.com>
1192
1193 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1194 function return type.
1195
4f2e1536
MP
11962016-05-12 Marek Polacek <polacek@redhat.com>
1197
1198 PR c/70756
1199 * c-decl.c (build_compound_literal): Pass LOC down to
1200 c_incomplete_type_error.
1201 * c-tree.h (require_complete_type): Adjust declaration.
1202 (c_incomplete_type_error): Likewise.
1203 * c-typeck.c (require_complete_type): Add location parameter, pass it
1204 down to c_incomplete_type_error.
1205 (c_incomplete_type_error): Add location parameter, pass it down to
1206 error_at.
1207 (build_component_ref): Pass location down to c_incomplete_type_error.
1208 (default_conversion): Pass location down to require_complete_type.
1209 (build_array_ref): Likewise.
1210 (build_function_call_vec): Likewise.
1211 (convert_arguments): Likewise.
1212 (build_unary_op): Likewise.
1213 (build_c_cast): Likewise.
1214 (build_modify_expr): Likewise.
1215 (convert_for_assignment): Likewise.
1216 (c_finish_omp_clauses): Likewise.
1217
d6e83a8d
MM
12182016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1219
1220 PR c/43651
1221 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1222 is enabled.
1223 * c-errors.c (pedwarn_c90): Return true if warned.
1224 * c-tree.h (pedwarn_c90): Change return type to bool.
1225 (enum c_declspec_word): Add new enumerator cdw_atomic.
1226
5c3a10fb
MP
12272016-05-11 Marek Polacek <polacek@redhat.com>
1228
1229 PR c++/71024
1230 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1231 diagnose_mismatched_attributes and call it.
1232
cf68d92c
MP
12332016-05-10 Marek Polacek <polacek@redhat.com>
1234
1235 PR c/70255
1236 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1237 on a declaration following the definition.
1238
351f85c5
JJ
12392016-05-05 Jakub Jelinek <jakub@redhat.com>
1240
1241 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1242 parse it through to c_parser_c99_block_statement.
1243 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1244 caller.
1245
deef7113
MP
12462016-05-04 Marek Polacek <polacek@redhat.com>
1247
1248 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1249 OPT_Wdangling_else.
1250
de55efd5
MP
12512016-05-04 Marek Polacek <polacek@redhat.com>
1252
1253 PR c/48778
1254 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1255 for macro expansions.
1256
79ce98bc
MP
12572016-05-03 Marek Polacek <polacek@redhat.com>
1258
1259 PR c/70859
1260 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1261 check_builtin_function_arguments.
1262
fb2647aa
RB
12632016-05-03 Richard Biener <rguenther@suse.de>
1264
1265 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1266 the checksum from the previous stage.
1267
77886428
CP
12682016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1269
1270 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1271 c_finish_omp_clauses.
1272 (c_parser_omp_all_clauses): Likewise.
1273 (c_parser_oacc_cache): Likewise.
1274 (c_parser_oacc_loop): Likewise.
1275 (omp_split_clauses): Likewise.
1276 (c_parser_omp_declare_target): Likewise.
1277 (c_parser_cilk_all_clauses): Likewise.
1278 (c_parser_cilk_for): Likewise.
1279 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1280 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1281
7176a4a0
MP
12822016-05-02 Marek Polacek <polacek@redhat.com>
1283
1284 PR c/70851
1285 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1286 incomplete type.
1287
e7ff0319
CP
12882016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1289
1290 PR middle-end/70626
1291 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1292 OACC_LOOP_CLAUSE_MASK.
1293 (c_parser_oacc_kernels_parallel): Update call to
1294 c_oacc_split_loop_clauses.
1295
9f405ce1
AM
12962016-04-28 Andrew MacLeod <amacleod@redhat.com>
1297
1298 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1299 argument to build_modify_expr in two cases.
1300
c1e1f433
BS
13012016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1302
1303 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1304 warn_for_memset instead of warning directly here.
1305
2448a956
MP
13062016-04-26 Marek Polacek <polacek@redhat.com>
1307
1308 PR c/67784
1309 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1310 out of ...
1311 (c_parser_for_statement): ... here.
1312 (c_parser_if_statement): Use it.
1313 (c_parser_switch_statement): Use it.
1314 (c_parser_while_statement): Use it.
1315
b02a5e26
MP
1316 PR c/70791
1317 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1318
477d4906
IV
13192016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1320
1321 PR c++/69363
1322 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1323 instead of c_finish_cilk_clauses.
1324 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1325 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1326 floating-point variables in the linear clause for Cilk Plus.
1327
fe37c7af
MM
13282016-04-18 Michael Matz <matz@suse.de>
1329
1330 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1331 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1332
949505a9
MP
13332016-04-15 Marek Polacek <polacek@redhat.com>
1334
1335 PR c/70671
1336 * c-typeck.c (build_unary_op): Pass location down to error and
1337 warning call.
1338
dda1bf61
JJ
13392016-04-15 Jakub Jelinek <jakub@redhat.com>
1340
1341 PR c/70436
1342 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1343 where needed.
1344 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1345 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1346 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1347 Adjust c_parser_pragma callers.
1348 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1349 caller.
1350 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1351 c_parser_statement.
1352 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1353 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1354 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1355 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1356 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1357 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1358 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1359 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1360 down where needed.
1361 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1362 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1363 calls.
1364
99cd9857
MP
13652016-04-13 Marek Polacek <polacek@redhat.com>
1366
1367 PR c/70436
1368 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1369 adjust callers.
1370 (c_parser_statement): Likewise.
1371 (c_parser_c99_block_statement): Likewise.
1372 (c_parser_while_statement): Likewise.
1373 (c_parser_for_statement): Likewise.
1374 (c_parser_if_body): Don't set IF_P here.
1375 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1376 about dangling else here.
1377 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1378 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1379 warn about dangling else here.
1380
f13355da
MP
13812016-04-04 Marek Polacek <polacek@redhat.com>
1382
1383 PR c/70307
1384 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1385
5fde6a45
MP
13862016-03-31 Marek Polacek <polacek@redhat.com>
1387
1388 PR c/70297
1389 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1390
4bbf545b
DM
13912016-03-18 David Malcolm <dmalcolm@redhat.com>
1392
1393 PR c/70281
1394 * c-parser.c (c_parser_postfix_expression): Set the source range
1395 for uses of "__builtin_types_compatible_p".
1396
fcc2b74f
JJ
13972016-03-17 Jakub Jelinek <jakub@redhat.com>
1398
1399 PR c/70280
1400 * c-typeck.c (composite_type): Don't count void_list_node
1401 into len, if the list is terminated by void_list_node, start
1402 with void_list_node instead of NULL for newargs. Stop
1403 at void_list_node.
1404
ab4c578f
MP
14052016-03-16 Marek Polacek <polacek@redhat.com>
1406
1407 PR c/70093
1408 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1409 nested functions returning VM types.
1410
96b3c82d
CP
14112016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1412
1413 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1414 when calling c_finish_omp_clauses.
1415
29b9828f
BS
14162016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1417
1418 PR c/69824
1419 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1420 for later.
1421
7ff6ca38
MP
14222016-03-04 Marek Polacek <polacek@redhat.com>
1423
1424 PR c/69798
1425 * c-parser.c (c_parser_postfix_expression): Call
1426 c_parser_cast_expression rather than c_parser_postfix_expression.
1427
686e2237
JJ
14282016-03-01 Jakub Jelinek <jakub@redhat.com>
1429
1430 PR c/69796
1431 PR c/69974
1432 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1433 of incomplete decls to error_mark_node.
1434
0b05329b
MP
14352016-02-24 Marek Polacek <polacek@redhat.com>
1436
1437 PR c/69819
1438 * c-decl.c (finish_decl): Don't update the copy of the type of a
1439 different decl type.
1440
067fbd8b
JJ
14412016-02-23 Jakub Jelinek <jakub@redhat.com>
1442
1443 PR objc/69844
1444 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1445 in id_kind reclassification.
1446
bf14eba2
JJ
14472016-02-16 Jakub Jelinek <jakub@redhat.com>
1448
1449 PR c/69835
1450 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1451
ba539195
JN
14522016-02-16 James Norris <jnorris@codesourcery.com>
1453
1454 PR c/64748
1455 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1456
16595a1f
BS
14572016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1458
f48dfe98
BS
1459 * c-decl.c (build_null_declspecs): Zero the entire struct.
1460
16595a1f
BS
1461 PR c/69522
1462 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1463 callers changed. If nested_p is true, use it to call
1464 finish_implicit_inits.
1465 * c-tree.h (finish_implicit_inits): Declare.
1466 * c-typeck.c (finish_implicit_inits): New function. Move code
1467 from ...
1468 (push_init_level): ... here.
1469 (set_designator, process_init_element): Call finish_implicit_inits.
1470
66756373
JJ
14712016-02-11 Jakub Jelinek <jakub@redhat.com>
1472
1473 PR c/69768
1474 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1475 arguments for -Waddress warning.
1476
1066e9b5
JJ
14772016-02-04 Jakub Jelinek <jakub@redhat.com>
1478
1479 PR c/69669
1480 * c-decl.c (finish_enum): When honoring mode attribute,
1481 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1482
3a5d2ba4
JJ
14832016-01-29 Jakub Jelinek <jakub@redhat.com>
1484
1485 PR debug/69518
1486 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1487 all type variants, not just TYPE_MAIN_VARIANT.
1488
cbdd8ae0
JJ
14892016-01-27 Jakub Jelinek <jakub@redhat.com>
1490
1491 PR debug/66869
1492 * c-decl.c (c_write_global_declarations_1): Warn with
1493 warn_unused_function if static prototype without definition
1494 is not C_DECL_USED.
1495
fa74a4bc
MP
14962016-01-27 Marek Polacek <polacek@redhat.com>
1497
1498 PR c/68062
1499 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1500 to unsigned, if needed. Add -Wsign-compare warning.
1501
13f92e8d
JJ
15022016-01-26 Jakub Jelinek <jakub@redhat.com>
1503
1504 PR tree-optimization/69483
1505 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1506
cd8e73dc 15072016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1508
1509 PR c/24293
1510 * c-tree.h (incomplete_record_decls): Declare.
1511 * c-parser.c (incomplete_record_decls): Define.
1512 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1513 report error if any decl has zero size.
1514 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1515 or enum type to incomplete_record_decls.
1516
e6d6ec9e
TV
15172016-01-14 Tom de Vries <tom@codesourcery.com>
1518
1519 PR tree-optimization/68773
1520 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1521 set force_output.
1522
00083992
MP
15232016-01-14 Marek Polacek <polacek@redhat.com>
1524
1525 PR c/69262
1526 * c-decl.c (grokdeclarator): Provide more information for invalid
1527 array declarations.
1528
7443cf13
DM
15292016-01-06 David Malcolm <dmalcolm@redhat.com>
1530
1531 * c-parser.c (c_parser_unary_expression): For dereferences, build
1532 a combined location before calling build_indirect_ref, so that
1533 error reports cover the full range, manually updating the c_expr
1534 src_range.
1535
6b131d5b
MP
15362016-01-06 Marek Polacek <polacek@redhat.com>
1537
1538 PR sanitizer/69099
1539 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1540 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1541 NULL.
1542
818ab71a
JJ
15432016-01-04 Jakub Jelinek <jakub@redhat.com>
1544
1545 Update copyright years.
1546
2fe0a208
MP
15472016-01-04 Marek Polacek <polacek@redhat.com>
1548
1549 PR c/68908
1550 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1551 optimization to use __atomic_fetch_* built-in if possible.
1552
c7b48c8a
TS
15532015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1554
1555 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1556 into...
1557 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1558 all users.
1559
fda5652f
MP
15602015-12-22 Marek Polacek <polacek@redhat.com>
1561
1562 PR c/69002
1563 * c-typeck.c (build_component_ref): Warn when acessing elements of
1564 atomic structures or unions.
1565
745e411d
DM
15662015-12-21 David Malcolm <dmalcolm@redhat.com>
1567
1568 * c-typeck.c: Include "gcc-rich-location.h".
1569 (build_binary_op): In the two places that call binary_op_error,
1570 create a gcc_rich_location and populate it with the location of
1571 the binary op and its two operands.
1572
94c40e19
DM
15732015-12-16 David Malcolm <dmalcolm@redhat.com>
1574
1575 * c-parser.c (c_parser_statement_after_labels): When calling
1576 c_finish_return, Use the return expression's location if it has
1577 one, falling back to the location of the first token within it.
1578 * c-typeck.c (c_finish_return): When issuing warnings about
1579 the incorrect presence/absence of a return value, issue a note
1580 showing the declaration of the function.
1581
de67c4c3
DM
15822015-12-16 David Malcolm <dmalcolm@redhat.com>
1583
1584 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1585 to 4.
1586 (c_parser_peek_nth_token): New function.
1587 (c_parser_peek_conflict_marker): New function.
1588 (c_parser_error): Detect conflict markers and report them as such.
1589
a10704e1
DM
15902015-12-16 David Malcolm <dmalcolm@redhat.com>
1591
1592 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1593 to preserve range information for the primary expression
1594 in the call to c_parser_postfix_expression_after_primary.
1595
8062bca6
DM
15962015-12-16 David Malcolm <dmalcolm@redhat.com>
1597
1598 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1599 expression location, falling back on the first token location,
1600 rather than always using the latter.
1601
d06f8b75
MP
16022015-12-16 Marek Polacek <polacek@redhat.com>
1603
1604 PR c/64637
1605 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1606 available.
1607
2994fb91
MP
16082015-12-15 Marek Polacek <polacek@redhat.com>
1609
1610 PR c/68907
1611 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1612 artificial decl.
1613
a1b93f8d
DM
16142015-12-08 David Malcolm <dmalcolm@redhat.com>
1615
1616 * c-parser.c (c_parser_alignof_expression): Capture location of
1617 closing parenthesis (if any), or of end of unary expression, and
1618 use it to build a src_range for the expression.
1619
46c6e1e2
DM
16202015-12-08 David Malcolm <dmalcolm@redhat.com>
1621
1622 PR c/68757
1623 * c-parser.c (c_parser_get_builtin_args): Add
1624 "out_close_paren_loc" param, and write back to it.
1625 (c_parser_postfix_expression): Capture the closing
1626 parenthesis location for RID_CHOOSE_EXPR,
1627 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1628 RID_BUILTIN_SHUFFLE and use it to set the source range
1629 for such expressions; within RID_BUILTIN_COMPLEX set
1630 the underlying location.
1631
66189108
MP
16322015-12-07 Marek Polacek <polacek@redhat.com>
1633
1634 PR c/68668
1635 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1636 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1637
f187980b
EB
16382015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1639
1640 * c-tree.h (c_build_va_arg): Adjust prototype.
1641 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1642 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1643 parameter, adjust throughout and issue an error if EXPR is a component
1644 with reverse storage order.
1645
4250754e
JM
16462015-12-02 Jason Merrill <jason@redhat.com>
1647
1648 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1649 (c_fully_fold_internal, decl_constant_value_for_optimization):
1650 Move from c-common.c.
1651 * c-tree.h: Declare decl_constant_value_for_optimization.
1652 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1653
e9e32ee6
JM
16542015-12-02 Joseph Myers <joseph@codesourcery.com>
1655
1656 PR c/68162
1657 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1658 following link from declarator to next declarator. Track original
1659 qualified type and pass it to c_build_qualified_type.
1660 * c-typeck.c (c_build_qualified_type): Add arguments
1661 orig_qual_type and orig_qual_indirect.
1662
ff7a55bf
TS
16632015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1664
1665 * c-parser.c (c_parser_omp_clause_name)
1666 (c_parser_oacc_all_clauses): Alphabetical sorting.
1667
657e4e47
JJ
16682015-12-02 Jakub Jelinek <jakub@redhat.com>
1669
1670 PR c/68533
1671 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1672 for diagnostics.
1673
37d5ad46
JB
16742015-12-01 Julian Brown <julian@codesourcery.com>
1675 Cesar Philippidis <cesar@codesourcery.com>
1676 James Norris <James_Norris@mentor.com>
1677
1678 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1679 (c_parser_oacc_clause_use_device): New function.
1680 (c_parser_oacc_all_clauses): Add use_device support.
1681 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1682 (c_parser_oacc_host_data): New function.
1683 (c_parser_omp_construct): Add host_data support.
1684 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1685 * c-typeck.c (c_finish_oacc_host_data): New function.
1686 (c_finish_omp_clauses): Add use_device support.
1687
a4850ce9
JH
16882015-11-29 Jan Hubicka <hubicka@ucw.cz>
1689
1690 PR c/67106
1691 * c-decl.c: Set TYPE_PACKED in variants.
1692
b58d3df2
ML
16932015-11-27 Martin Liska <mliska@suse.cz>
1694
1695 PR c++/68312
1696 * c-array-notation.c (fix_builtin_array_notation_fn):
1697 Use release_vec_vec instead of vec::release.
1698 (build_array_notation_expr): Likewise.
1699 (fix_conditional_array_notations_1): Likewise.
1700 (fix_array_notation_expr): Likewise.
1701 (fix_array_notation_call_expr): Likewise.
1702
aec17bfe
JJ
17032015-11-27 Jakub Jelinek <jakub@redhat.com>
1704
1705 PR c/63326
1706 * c-parser.c (c_parser_compound_statement_nostart): If
1707 last_label is true, use pragma_stmt instead of pragma_compound
1708 as second c_parser_pragma argument.
1709 (c_parser_omp_ordered, c_parser_omp_target_update,
1710 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1711 false as second argument to c_parser_skip_to_pragma_eol after
1712 diagnosing standalone directives used in pragma_stmt context.
1713
688c4de0
IV
17142015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1715
1716 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1717 with "if (ENABLE_OFFLOADING)".
1718
cbd03aee
DM
17192015-11-23 David Malcolm <dmalcolm@redhat.com>
1720
1721 PR objc/68438
1722 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1723 for various Objective-C constructs: Class.name syntax,
1724 @selector(), @protocol(), @encode(), and [] message syntax.
1725
a87a86e1
DM
17262015-11-20 David Malcolm <dmalcolm@redhat.com>
1727
1728 PR 62314
1729 * c-typeck.c (should_suggest_deref_p): New function.
1730 (build_component_ref): Special-case POINTER_TYPE when
1731 generating a "not a structure of union" error message, and
1732 suggest a "->" rather than a ".", providing a fix-it hint.
1733
8ece8dfb
DM
17342015-11-19 David Malcolm <dmalcolm@redhat.com>
1735
1736 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1737 candidate into a new function, find_closest_identifier.
1738
433068cc
MP
17392015-11-19 Marek Polacek <polacek@redhat.com>
1740
1741 PR c/68412
1742 * c-typeck.c (parser_build_binary_op): Properly handle
1743 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1744
bef08b71
DM
17452015-11-17 David Malcolm <dmalcolm@redhat.com>
1746
1747 * c-parser.c (set_c_expr_source_range): Bulletproof both
1748 overloaded implementations against NULL expr->value.
1749 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1750 values.
1751 (c_parser_unary_expression): Likewise when handling addresses of
1752 labels.
1753 (c_parser_postfix_expression): Likewise for statement expressions,
1754 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1755 __builtin_va_arg, and for __builtin_offset_of.
1756 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1757 src_range using the range of the braced initializer.
1758 (c_parser_transaction_expression): Set src_range for "ret" to a
1759 sane pair of values.
1760
fff77217
KY
17612015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1762
1763 * c-parser.c (c_finish_omp_declare_simd): Look for
1764 "simd" attribute as well. Update error message.
1765
1d899da2
TS
17662015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1767
1768 * c-parser.c (c_parser_omp_declare_target): Adjust.
1769
e4606348
JJ
17702015-11-14 Jakub Jelinek <jakub@redhat.com>
1771
1772 * c-typeck.c (c_finish_omp_clauses): Don't mark
1773 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1774
3e636daf
MP
17752015-11-14 Marek Polacek <polacek@redhat.com>
1776
1777 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1778 * c-typeck.c: Likewise.
1779
ebedc9a3
DM
17802015-11-13 David Malcolm <dmalcolm@redhat.com>
1781
1782 * c-decl.c (warn_defaults_to): Pass line_table to
1783 rich_location ctor.
1784 * c-errors.c (pedwarn_c99): Likewise.
1785 (pedwarn_c90): Likewise.
1786 * c-parser.c (set_c_expr_source_range): New functions.
1787 (c_token::get_range): New method.
1788 (c_token::get_finish): New method.
1789 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1790 based on the range from the start of the LHS to the end of the
1791 RHS.
1792 (c_parser_conditional_expression): Likewise, based on the range
1793 from the start of the cond.value to the end of exp2.value.
1794 (c_parser_binary_expression): Call set_c_expr_source_range on
1795 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1796 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1797 based on the cast_loc through to the end of the expr.
1798 (c_parser_unary_expression): Likewise, based on the
1799 op_loc through to the end of op.
1800 (c_parser_sizeof_expression) Likewise, based on the start of the
1801 sizeof token through to either the closing paren or the end of
1802 expr.
1803 (c_parser_postfix_expression): Likewise, using the token range,
1804 or from the open paren through to the close paren for
1805 parenthesized expressions.
1806 (c_parser_postfix_expression_after_primary): Likewise, for
1807 various kinds of expression.
1808 * c-tree.h (struct c_expr): Add field "src_range".
1809 (c_expr::get_start): New method.
1810 (c_expr::get_finish): New method.
1811 (set_c_expr_source_range): New decls.
1812 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1813 on ret for prefix unary ops.
1814 (parser_build_binary_op): Likewise, running from the start of
1815 arg1.value through to the end of arg2.value.
1816
ec8b536f
MP
18172015-11-13 Marek Polacek <polacek@redhat.com>
1818
1819 PR c/68320
1820 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1821
277fe616
DM
18222015-11-13 David Malcolm <dmalcolm@redhat.com>
1823
1824 * c-typeck.c: Include spellcheck.h.
1825 (lookup_field_fuzzy_find_candidates): New function.
1826 (lookup_field_fuzzy): New function.
1827 (build_component_ref): If the field was not found, try using
1828 lookup_field_fuzzy and potentially offer a suggestion.
1829
6e232ba4
JN
18302015-11-12 James Norris <jnorris@codesourcery.com>
1831 Joseph Myers <joseph@codesourcery.com>
1832
1833 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1834 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1835 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1836 and PRAGMA_OMP_CLAUSE_LINK.
1837 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1838 and PRAGMA_OACC_CLAUSE_LINK.
1839 (OACC_DECLARE_CLAUSE_MASK): New definition.
1840 (c_parser_oacc_declare): New function.
1841
9be4f715
MP
18422015-11-12 Marek Polacek <polacek@redhat.com>
1843
1844 PR c/67784
1845 * c-parser.c (c_parser_for_statement): Reclassify the token in
1846 a correct scope.
1847
e78bede6
MP
18482015-11-11 Marek Polacek <polacek@redhat.com>
1849
1850 PR c/68107
1851 PR c++/68266
1852 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1853 checking the size of an array.
1854
69f293c9
AM
18552015-11-11 Andrew MacLeod <amacleod@redhat.com>
1856
1857 * c-array-notation.c: Remove unused header files.
1858 * c-aux-info.c: Likewise.
1859 * c-convert.c: Likewise.
1860 * c-decl.c: Likewise.
1861 * c-errors.c: Likewise.
1862 * c-lang.c: Likewise.
1863 * c-objc-common.c: Likewise.
1864 * c-parser.c: Likewise.
1865 * c-typeck.c: Likewise.
1866 * gccspec.c: Likewise.
1867
3a40d81d
NS
18682015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1869 Cesar Philippidis <cesar@codesourcery.com>
1870 James Norris <jnorris@codesourcery.com>
1871 Julian Brown <julian@codesourcery.com>
1872 Nathan Sidwell <nathan@codesourcery.com>
1873
1874 c/
1875 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1876 routine arg.
1877 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1878 (c_parser_pragma): Parse 'acc routine'.
1879 (OACC_ROUTINE_CLAUSE_MARK): Define.
1880 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1881
fc402eec
AA
18822015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1883
1884 PR debug/67192
1885 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1886 location of the backward-goto to the start of the loop body.
1887
f6b0b3db
AA
18882015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1889
1890 PR debug/67192
1891 * c-parser.c (c_parser_while_statement): Finish the loop before
1892 parsing ahead for misleading indentation.
1893 (c_parser_for_statement): Likewise.
1894
ee45a32d
EB
18952015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1896
1897 * c-decl.c (finish_struct): If the structure has reverse storage
1898 order, rewrite the type of array fields with scalar component. Call
1899 maybe_apply_pragma_scalar_storage_order on entry.
1900 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1901 errors on bit-fields and reverse SSO here and not...
1902 (c_mark_addressable): ...here.
1903 (output_init_element): Adjust call to initializer_constant_valid_p.
1904 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1905
8a645150
DM
19062015-11-06 David Malcolm <dmalcolm@redhat.com>
1907
1908 * c-decl.c (warn_defaults_to): Update for change in signature
1909 of diagnostic_set_info.
1910 * c-errors.c (pedwarn_c99): Likewise.
1911 (pedwarn_c90): Likewise.
1912 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1913 for textinfo::set_location.
1914
7a5e4956
CP
19152015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1916 Thomas Schwinge <thomas@codesourcery.com>
1917 James Norris <jnorris@codesourcery.com>
1918
1919 * c-parser.c (c_parser_omp_clause_name): Add support for
1920 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1921 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1922 default(none) in OpenACC.
1923 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1924 arguments.
1925 (c_parser_oacc_clause_tile): New function.
1926 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1927 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1928 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1929 TILE}.
1930 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1931 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1932 FIRSTPRIVATE}.
1933 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1934 (c_parser_oacc_update): Update the error message for missing clauses.
1935 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1936 and OMP_CLAUSE_INDEPENDENT.
1937
bfcfbfa0
MP
19382015-11-05 Marek Polacek <polacek@redhat.com>
1939
1940 PR c/68090
1941 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1942 deal with pre-evaluation on invalid types.
1943
e01d41e5
JJ
19442015-11-05 Jakub Jelinek <jakub@redhat.com>
1945 Ilya Verbin <ilya.verbin@intel.com>
1946
1947 * c-parser.c: Include context.h and gimple-expr.h.
1948 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1949 monotonic together with nonmonotonic.
1950 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1951 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1952 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1953 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1954 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1955 expressions on combined target teams before the target.
1956 (c_parser_omp_declare_target): If decl has "omp declare target" or
1957 "omp declare target link" attribute, and cgraph or varpool node already
1958 exists, then set corresponding flags. Call c_finish_omp_clauses
1959 in the parenthesized extended-list syntax case.
1960 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1961 declare target.
1962 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1963 on OMP_CLAUSE_REDUCTION array sections.
1964 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1965 into the constant offset, or for variable low-bound using
1966 POINTER_PLUS_EXPR. For structure element based array sections use
1967 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1968 (c_finish_omp_clauses): Drop generic_field_head, structure
1969 elements are now always mapped even as array section bases,
1970 diagnose same var in data sharing and mapping clauses. Diagnose if
1971 linear step on declare simd is neither a constant nor a uniform
1972 parameter. Look through POINTER_PLUS_EXPR for array section
1973 reductions. Diagnose the same var or function appearing multiple
1974 times on the same directive. Fix up wording for the to clause if t
1975 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1976 modifier on kinds other than dynamic or guided or nonmonotonic
1977 modifier together with ordered clause.
1978
4bf9e5a8
TS
19792015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1980 Chung-Lin Tang <cltang@codesourcery.com>
1981
1982 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1983
2adfab87
AM
19842015-10-29 Andrew MacLeod <amacleod@redhat.com>
1985
1986 * c-array-notation.c: Reorder #include's and remove duplicates.
1987 * c-aux-info.c: Likewise.
1988 * c-convert.c: Likewise.
1989 * c-decl.c: Likewise.
1990 * c-errors.c: Likewise.
1991 * c-lang.c: Likewise.
1992 * c-objc-common.c: Likewise.
1993 * c-parser.c: Likewise.
1994 * c-typeck.c: Likewise.
1995
e922069e
JW
19962015-10-26 Jim Wilson <jim.wilson@linaro.org>
1997
1998 PR debug/66068
1999 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2000 after calling build_qualified_type.
2001
765dd391
CP
20022015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2003 Thomas Schwinge <thomas@codesourcery.com>
2004 James Norris <jnorris@codesourcery.com>
2005 Joseph Myers <joseph@codesourcery.com>
2006 Julian Brown <julian@codesourcery.com>
2007 Bernd Schmidt <bschmidt@redhat.com>
2008
2009 * c-parser.c (c_parser_oacc_shape_clause): New.
2010 (c_parser_oacc_simple_clause): New.
2011 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2012 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2013
88bae6f4
TS
20142015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2015 James Norris <jnorris@codesourcery.com>
2016 Cesar Philippidis <cesar@codesourcery.com>
2017
2018 PR c/64765
2019 PR c/64880
2020 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2021 parameters, and handle these. Adjust all users.
2022 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2023 into...
2024 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2025 all users.
2026 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2027 declare functions.
2028 (c_finish_omp_construct): Declare function.
2029 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2030 Merge functions into...
2031 (c_finish_omp_construct): ... this new function.
2032
a8fc2579
RB
20332015-10-22 Richard Biener <rguenther@suse.de>
2034
2035 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2036 before folding a MINUS_EXPR.
2037
e9122ef6
MP
20382015-10-21 Marek Polacek <polacek@redhat.com>
2039
2040 PR c/68024
2041 * c-decl.c (start_function): Warn about vararg functions without
2042 a prototype.
2043
9f47c7e5
IE
20442015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2045
2046 * c-typeck.c (build_conditional_expr): Use boolean vector
2047 type for vector comparison.
2048 (build_vec_cmp): New.
2049 (build_binary_op): Use build_vec_cmp for comparison.
2050
fa60eeb9
MP
20512015-10-20 Marek Polacek <polacek@redhat.com>
2052
2053 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2054
2c7020eb
MP
20552015-10-20 Marek Polacek <polacek@redhat.com>
2056
2057 PR c/67964
2058 * c-parser.c (c_parser_attributes): Break out of the loop if the
2059 token after an attribute isn't a comma.
2060
d9a6bd32
JJ
20612015-10-13 Jakub Jelinek <jakub@redhat.com>
2062 Aldy Hernandez <aldyh@redhat.com>
2063
2064 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2065 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2066 (c_parser_omp_variable_list): Handle structure elements for
2067 map, to and from clauses. Handle array sections in reduction
2068 clause. Formatting fixes.
2069 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2070 if clause modifiers.
2071 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2072 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2073 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2074 c_parser_omp_clause_is_device_ptr): New functions.
2075 (c_parser_omp_clause_ordered): Parse optional parameter.
2076 (c_parser_omp_clause_reduction): Handle array reductions.
2077 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2078 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2079 functions.
2080 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2081 (c_parser_omp_clause_depend_sink): New function.
2082 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2083 (c_parser_omp_clause_map): Parse release/delete map kinds and
2084 optional always modifier.
2085 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2086 and c_finish_omp_clauses callers.
2087 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2088 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2089 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2090 (OMP_CRITICAL_CLAUSE_MASK): Define.
2091 (c_parser_omp_critical): Parse critical clauses.
2092 (c_parser_omp_for_loop): Handle doacross loops, adjust
2093 c_finish_omp_for and c_finish_omp_clauses callers.
2094 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2095 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2096 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2097 (c_parser_omp_for): Disallow ordered clause when combined with
2098 distribute. Disallow linear clause when combined with distribute
2099 and not combined with simd.
2100 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2101 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2102 parse clauses and if depend clause is found, don't parse a body.
2103 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2104 Allow target parallel without for after it.
2105 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2106 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2107 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2108 invalid kinds.
2109 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2110 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2111 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2112 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2113 functions.
2114 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2115 defaultmap and is_device_ptr clauses.
2116 (c_parser_omp_target): Parse target parallel and target simd. Set
2117 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2118 and target exit data. Diagnose invalid map kinds.
2119 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2120 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2121 construct.
2122 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2123 &omp_priv.
2124 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2125 (c_parser_omp_taskloop): New function.
2126 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2127 handle PRAGMA_OMP_TASKLOOP.
2128 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2129 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2130 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2131 Add IS_OMP argument, handle structure element bases, diagnose
2132 bitfields, pass IS_OMP recursively, diagnose known zero length
2133 array sections in depend clauses, handle array sections in reduction
2134 clause, diagnose negative length even for pointers.
2135 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2136 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2137 array sections in reduction clause, set
2138 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2139 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2140 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2141 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2142
21ba0cea
MP
21432015-10-06 Marek Polacek <polacek@redhat.com>
2144
2145 * c-parser.c (c_parser_statement_after_labels): Use
2146 protected_set_expr_location.
2147 (c_parser_omp_clause_num_gangs): Likewise.
2148 (c_parser_omp_clause_num_threads): Likewise.
2149 (c_parser_omp_clause_num_workers): Likewise.
2150 (c_parser_omp_clause_vector_length): Likewise.
2151 (c_parser_omp_clause_num_teams): Likewise.
2152 (c_parser_omp_clause_thread_limit): Likewise.
2153 * c-typeck.c (build_c_cast): Likewise.
2154 (c_cast_expr): Likewise.
2155
624d31fe
RS
21562015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2157
2158 * c-typeck.c (c_tree_equal): Use real_equal instead of
2159 REAL_VALUES_EQUAL.
2160
b8fd7909
JM
21612015-10-04 Jason Merrill <jason@redhat.com>
2162
2163 * c-parser.c (c_lex_one_token): Handle @synchronized.
2164 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2165 can change whether the function is transaction_safe.
2166
1c7485af
MP
21672015-10-02 Marek Polacek <polacek@redhat.com>
2168
2169 PR c/67730
2170 * c-typeck.c (convert_for_assignment): Use the expansion point
2171 location throughout.
2172
3e3b8d63
MP
21732015-10-02 Marek Polacek <polacek@redhat.com>
2174
2175 PR c/64249
2176 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2177 and pass it down to c_parser_if_statement.
2178 (c_parser_else_body): Add CHAIN parameter and pass it down to
2179 c_parser_statement_after_labels.
2180 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2181 duplicated if-else-if conditions.
2182
aabef2de
MP
21832015-10-01 Marek Polacek <polacek@redhat.com>
2184
2185 * c-typeck.c (convert_for_assignment): Improve commentary.
2186
de8ddd5f
MP
21872015-09-30 Marek Polacek <polacek@redhat.com>
2188
2189 PR c/67730
2190 * c-typeck.c (c_finish_return): Use the expansion point location for
2191 certain "return with value" warnings.
2192
c4914de6
MLI
21932015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2194
2195 * c-parser.c (pragma_lex): Add loc argument.
2196
0e36f5c7
MP
21972015-09-15 Marek Polacek <polacek@redhat.com>
2198
2199 PR c/67580
2200 * c-decl.c (tag_exists_p): New function.
2201 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2202 struct/union/enum keywords are missing.
2203 * c-tree.h (tag_exists_p): Declare.
2204
2f3bb934
MP
22052015-09-15 Marek Polacek <polacek@redhat.com>
2206
2207 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2208 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2209 Return NULL_TREE instead of 0.
2210 (lookup_name): Return NULL_TREE instead of 0.
2211 (lookup_name_in_scope): Likewise.
2212 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2213 (parser_xref_tag): Use false instead of 0.
2214 (start_struct): Use true instead of 1.
2215 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2216
aa256c4a
MP
22172015-09-14 Marek Polacek <polacek@redhat.com>
2218
2219 * c-typeck.c (set_nonincremental_init_from_string): Use
2220 HOST_WIDE_INT_M1U when shifting a negative value.
2221
dbb68221
MW
22222015-09-09 Mark Wielaard <mjw@redhat.com>
2223
2224 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2225 parm against NULL.
2226
a8a098ac
JJ
22272015-09-10 Jakub Jelinek <jakub@redhat.com>
2228
2229 PR c/67502
2230 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2231 into OMP_FOR_PRE_BODY rather than before the loop.
2232
f4b189d5
JJ
22332015-09-09 Jakub Jelinek <jakub@redhat.com>
2234
0bb99c11
JJ
2235 PR c/67501
2236 * c-parser.c (c_parser_oacc_all_clauses,
2237 c_parser_omp_all_clauses): Remove invalid clause from
2238 list of clauses even if parser->error is set.
2239
fce5e5e3
JJ
2240 PR c/67500
2241 * c-parser.c (c_parser_omp_clause_aligned,
2242 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2243 test for errors.
2244 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2245 error_mark_node.
2246
f4b189d5
JJ
2247 PR c/67495
2248 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2249 instead of c_parser_unary_expression. If the result is !lvalue_p,
2250 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2251
b2aaf235
MP
22522015-09-04 Marek Polacek <polacek@redhat.com>
2253
2254 PR sanitizer/67279
2255 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2256
1807ffc1
MS
22572015-09-03 Martin Sebor <msebor@redhat.com>
2258
2259 PR c/66516
8b652e65
JJ
2260 * c-typeck.c (convert_arguments, parser_build_unary_op,
2261 build_conditional_expr, c_cast_expr, convert_for_assignment,
2262 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2263 reject_gcc_builtin.
2264 (c_decl_implicit): Define.
2265
d04ff417
MP
22662015-09-02 Marek Polacek <polacek@redhat.com>
2267
2268 PR c/67432
2269 * c-parser.c (c_parser_enum_specifier): Give a better error for
2270 an empty enum.
2271
a79683d5
TS
22722015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2273
2274 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2275
191a6b94
MP
22762015-08-12 Marek Polacek <polacek@redhat.com>
2277
2278 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2279 LOC to it.
2280
420a9d9b
MP
22812015-08-03 Marek Polacek <polacek@redhat.com>
2282
2283 PR c/67088
2284 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2285 Use it.
2286 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2287
992118a1
PP
22882015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2289
2290 * c-parser.c (c_parser_if_body): Take token_indent_info
2291 argument. Call warn_for_misleading_indentation even when the
2292 body is a semicolon. Extract token_indent_infos corresponding
2293 to the guard, body and next tokens. Adjust call to
2294 warn_for_misleading_indentation accordingly.
2295 (c_parser_else_body): Likewise.
2296 (c_parser_if_statement): Likewise.
2297 (c_parser_while_statement): Likewise.
2298 (c_parser_for_statement): Likewise.
2299
46308474
LFSM
23002015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2301 Manuel López-Ibáñez <manu@gcc.gnu.org>
2302
2303 * c-decl.c (get_parm_info): Remove static var. Update warning
2304 message.
2305
05b28fd6
MP
23062015-07-27 Marek Polacek <polacek@redhat.com>
2307
2308 PR c++/66555
2309 PR c/54979
2310 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2311
451b5e48
MP
23122015-07-20 Marek Polacek <polacek@redhat.com>
2313
2314 PR c++/55095
2315 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2316 (build_binary_op): Warn about left shift overflows.
2317
1916bcb5
AM
23182015-07-09 Andrew MacLeod <amacleod@redhat.com>
2319
2320 * c-array-notation.c: Adjust includes for flags.h changes.
2321 * c-objc-common.c: Likewise.
2322
c7131fb2
AM
23232015-07-07 Andrew MacLeod <amacleod@redhat.com>
2324
2325 * c-array-notation.c: Adjust includes.
2326 * c-aux-info.c: Likewise.
2327 * c-convert.c: Likewise.
2328 * c-decl.c: Likewise.
2329 * c-errors.c: Likewise.
2330 * c-lang.c: Likewise.
2331 * c-objc-common.c: Likewise.
2332 * c-parser.c: Likewise.
2333 * c-typeck.c: Likewise.
2334
da2e71c9
MLI
23352015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2336
2337 PR fortran/66605
2338 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2339
b155cfd9
MP
23402015-06-29 Marek Polacek <polacek@redhat.com>
2341
2342 PR c/66322
2343 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2344 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2345 about -Wswitch-bool here.
2346 (do_case): Update c_add_case_label call.
2347 (c_finish_case): Update c_do_switch_warnings call.
2348
31521951
MP
23492015-06-27 Marek Polacek <polacek@redhat.com>
2350
2351 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2352
22d03525
MP
23532015-06-26 Marek Polacek <polacek@redhat.com>
2354
2355 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2356 INDIRECT_REF_P.
2357 * c-typeck.c (array_to_pointer_conversion): Likewise.
2358 (build_unary_op): Likewise.
2359 (c_finish_return): Likewise.
2360
f0889939
AM
23612015-06-25 Andrew MacLeod <amacleod@redhat.com>
2362
2363 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2364 * c-parser.c: Likewise.
2365
8d67ee55
RS
23662015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2367
2368 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2369 instead of pointer_hash.
2370 (detect_field_duplicates): Likewise.
2371
0ae9bd27
MP
23722015-06-25 Marek Polacek <polacek@redhat.com>
2373
2374 * c-array-notation.c: Use VAR_P throughout.
2375 * c-decl.c: Likewise.
2376 * c-objc-common.c: Likewise.
2377 * c-parser.c: Likewise.
2378 * c-typeck.c: Likewise.
2379
62f9079a
MP
23802015-06-25 Marek Polacek <polacek@redhat.com>
2381
2382 * c-decl.c: Use is_global_var throughout.
2383 * c-parser.c: Likewise.
2384 * c-typeck.c: Likewise.
2385
abb226c9
AM
23862015-06-17 Andrew MacLeod <amacleod@redhat.com>
2387
2388 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2389 * c-aux-info.c: Likewise.
2390 * c-convert.c: Likewise.
2391 * c-decl.c: Likewise.
2392 * c-errors.c: Likewise.
2393 * c-lang.c: Likewise.
2394 * c-objc-common.c: Likewise.
2395 * c-parser.c: Likewise.
2396 * c-typeck.c: Likewise.
2397
8cbababc
JH
23982015-06-11 Jan Hubicka <hubicka@ucw.cz>
2399
2400 PR middle-end/66325
2401 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2402 variants.
2403
a0349665
PMR
24042015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2405
2406 * c-decl.c (pop_scope): Register the main translation unit
2407 through the new debug hook.
2408
13fdf2e2
AM
24092015-06-08 Andrew MacLeod <amacleod@redhat.com>
2410
2411 * c-array-notation.c : Adjust include files.
2412 * c-aux-info.c : Likewise.
2413 * c-convert.c : Likewise.
2414 * c-decl.c : Likewise.
2415 * c-errors.c : Likewise.
2416 * c-lang.c : Likewise.
2417 * c-lang.h : Likewise.
2418 * c-objc-common.c : Likewise.
2419 * c-parser.c : Likewise.
2420 * c-typeck.c : Likewise.
2421
d7438551
AH
24222015-06-05 Aldy Hernandez <aldyh@redhat.com>
2423
2424 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2425 immediately clobber it.
2426 (c_write_global_declarations_1): Remove call to
2427 check_global_declaration_1.
2428 (c_write_global_declarations_2): Remove.
2429 (c_write_final_cleanups): Rename from c_write_global_declarations.
2430 Remove call to finalize_compilation_unit.
2431 Remove calls to debugging hooks.
2432 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2433 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2434 * c-tree.h: Remove c_write_global_declarations.
2435
ecb9f223
AM
24362015-06-04 Andrew MacLeod <amacleod@redhat.com>
2437
2438 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2439 * c-aux-info.c: Likewise.
2440 * c-convert.c: Likewise.
2441 * c-decl.c: Likewise.
2442 * c-errors.c: Likewise.
2443 * c-lang.c: Likewise.
2444 * c-objc-common.c: Likewise.
2445 * c-parser.c: Likewise.
2446 * c-typeck.c: Likewise.
2447
9482b620
MP
24482015-06-04 Marek Polacek <polacek@redhat.com>
2449
2450 PR c/66341
2451 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2452 it is a lvalue.
2453
bc51ace3
PK
24542015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2455
2456 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2457 Warn for empty struct.
2458 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2459
ea5b45b6
AT
24602015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2461
2462 * c-decl.c (start_function): Call plugin before parsing.
2463 (finish_function): Call plugin after parsing.
2464
c2d47482
PK
24652015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2466
2467 PR c/49551
2468 * c-decl.c (merge_decls): Merge DECL_COMMON.
2469
a95492ab
JW
24702015-05-22 Jim Wilson <jim.wilson@linaro.org>
2471
2472 * Make-lang.in (check_gcc_pallelize): Define.
2473
fd5c817a
MP
24742015-05-22 Marek Polacek <polacek@redhat.com>
2475
2476 PR c/47043
2477 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2478 attributes.
2479
c7b70a3c
MP
24802015-05-21 Marek Polacek <polacek@redhat.com>
2481
2482 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2483 DECL_BUILT_IN.
2484
21b634ae
MP
24852015-05-20 Marek Polacek <polacek@redhat.com>
2486
2487 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2488 * c-typeck.c: Likewise.
2489
296a8c2f
MP
24902015-05-19 Marek Polacek <polacek@redhat.com>
2491
2492 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2493
41b37d5e
JJ
24942015-05-19 Jakub Jelinek <jakub@redhat.com>
2495
2496 PR middle-end/66199
2497 * c-parser.c (c_parser_omp_for_loop): Don't add
2498 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2499 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2500 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2501 constructs.
2502
fab27f52
MM
25032015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2504
2505 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2506 swaps.
fab27f52 2507
40de31cf
MLI
25082015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2509
2510 PR fortran/44054
2511 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2512 accessor function.
2513
3aa3c9fc
MP
25142015-05-14 Marek Polacek <polacek@redhat.com>
2515
2516 PR c/66066
2517 PR c/66127
2518 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2519 rather than with 0.
2520
c3388e62
DM
25212015-05-12 David Malcolm <dmalcolm@redhat.com>
2522
2523 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2524 to add a call to warn_for_misleading_indentation.
2525 (c_parser_else_body): Likewise, adding param "else_loc".
2526 (c_parser_if_statement): Check for misleading indentation.
2527 (c_parser_while_statement): Likewise.
2528 (c_parser_for_statement): Likewise.
2529
755e528f
MP
25302015-05-08 Marek Polacek <polacek@redhat.com>
2531
2532 PR c/64918
2533 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2534 (output_init_element): Likewise.
2535
0173bd2a
MP
25362015-05-07 Marek Polacek <polacek@redhat.com>
2537
2538 PR c/65179
2539 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2540 value.
2541
9babc352
MP
25422015-04-30 Marek Polacek <polacek@redhat.com>
2543
2544 * c-typeck.c (set_init_label): Call error_at instead of error and
2545 pass LOC to it.
2546
ac9f18db
MP
2547 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2548 the type of a decl.
2549
ec3fba51
MP
2550 * c-typeck.c (c_build_va_arg): Clarify the error message.
2551
b811915d
TS
25522015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2553
2554 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2555 OMP_STANDALONE_CLAUSES.
2556
f3075008
MP
25572015-04-28 Marek Polacek <polacek@redhat.com>
2558
2559 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2560
4e81b788
MP
25612015-04-28 Marek Polacek <polacek@redhat.com>
2562
2563 PR c/65901
2564 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2565
6c1db78e
MP
25662015-04-25 Marek Polacek <polacek@redhat.com>
2567
2568 PR c/52085
2569 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2570 attribute.
2571
5c4abbb8
MP
25722015-04-23 Marek Polacek <polacek@redhat.com>
2573
2574 PR c/65345
2575 * c-decl.c (set_labels_context_r): New function.
2576 (store_parm_decls): Call it via walk_tree_without_duplicates.
2577 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2578 instead of create_tmp_var. Build TARGET_EXPR instead of
2579 COMPOUND_EXPR.
2580 (build_atomic_assign): Use create_tmp_var_raw instead of
2581 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2582
06aca1d5
IV
25832015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2584
2585 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2586 (c_parser_omp_target_update): Add missed %> to error_at ().
2587
8fba1830
BRF
25882015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2589
2590 PR target/55143
2591 * c-decl.c (c_default_pointer_mode): Remove definition.
2592 * c-tree.h (c_default_pointer_mode): Remove declaration.
2593
62021f64
TB
25942015-03-27 Tobias Burnus <burnus@net-b.de>
2595
2596 PR c/65586
2597 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2598 error out.
2599 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2600 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2601 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2602
9b65e171
JJ
26032015-03-19 Jakub Jelinek <jakub@redhat.com>
2604
2605 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2606 attribute for DECL_EXTERNAL VAR_DECLs.
2607
17958621
JJ
26082015-03-11 Jakub Jelinek <jakub@redhat.com>
2609
2610 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2611 argument.
2612
7ccb1a11
JJ
26132015-03-10 Jakub Jelinek <jakub@redhat.com>
2614
2615 PR c/65120
2616 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2617 before preparing arguments to warn_logical_not_parentheses.
2618
01177669
JJ
26192015-03-09 Jakub Jelinek <jakub@redhat.com>
2620
2621 PR c/65120
2622 * c-typeck.c (parser_build_binary_op): Don't warn for
2623 !!x == y or !b == y where b is _Bool.
2624
802ac282
MP
26252015-03-09 Marek Polacek <polacek@redhat.com>
2626
2627 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2628 * c-decl.c (grokdeclarator): Likewise.
2629 * c-typeck.c (build_binary_op): Likewise.
2630
e5165b60
MP
26312015-02-27 Marek Polacek <polacek@redhat.com>
2632
2633 PR c/65228
2634 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2635
065d214c
MP
26362015-02-14 Marek Polacek <polacek@redhat.com>
2637
2638 PR c/64768
2639 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2640 declared through a typedef name.
2641
e5d9235b
MP
26422015-02-13 Marek Polacek <polacek@redhat.com>
2643
2644 PR c/65050
2645 * c-decl.c (grokdeclarator): Print also the type when giving
2646 the error message about array's incomplete element type.
2647
fa01ffcc
JJ
26482015-02-11 Jakub Jelinek <jakub@redhat.com>
2649
2650 PR c/64824
2651 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2652 check in the POP macro.
2653
c3e38a03
MP
26542015-02-09 Marek Polacek <polacek@redhat.com>
2655
2656 PR c/64856
2657 * c-typeck.c (process_init_element): Don't always wrap
2658 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2659 initializing a range of elements.
2660
4886ec8e
JJ
26612015-02-04 Jakub Jelinek <jakub@redhat.com>
2662
2663 PR c/64824
2664 PR c/64868
2665 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2666
c3e38a03 26672015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2668
2669 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2670 processing enum declaration.
2671
7b33f0c8
MP
26722015-01-29 Marek Polacek <polacek@redhat.com>
2673
2674 PR c/64709
2675 * c-typeck.c (pop_init_level): If constructor_elements has
2676 exactly one element with integer_zerop value, set constructor_zeroinit
2677 to 1. Remove braces around warning_init call.
2678
dea63e49
JJ
26792015-01-27 Jakub Jelinek <jakub@redhat.com>
2680
2681 PR c/64766
2682 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2683 of FUNCTION_DECLs with error_mark_node.
2684
d38f7dce
JJ
26852015-01-26 Jakub Jelinek <jakub@redhat.com>
2686
2687 PR c/64778
2688 * c-typeck.c (convert_arguments): Return -1 if there are
2689 error_args, even if we've diagnosed too many arguments.
2690
cbf5d0e7
RB
26912015-01-21 Richard Biener <rguenther@suse.de>
2692
2693 PR middle-end/64313
2694 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2695 for builtins the user declared correctly.
2696
41dbbb37
TS
26972015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2698 Bernd Schmidt <bernds@codesourcery.com>
2699 Cesar Philippidis <cesar@codesourcery.com>
2700 James Norris <jnorris@codesourcery.com>
2701 Jakub Jelinek <jakub@redhat.com>
2702 Ilmir Usmanov <i.usmanov@samsung.com>
2703
2704 * c-parser.c: Include "gomp-constants.h".
2705 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2706 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2707 Use OMP_CLAUSE_SET_MAP_KIND.
2708 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2709 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2710 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2711 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2712 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2713 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2714 "copyout", "create", "delete", "deviceptr", "gang", "host",
2715 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2716 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2717 "present_or_create", "pcreate", "seq", "self", "vector",
2718 "vector_length", "wait", "worker".
2719 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2720 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2721 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2722 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2723 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2724 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2725 (c_parser_oacc_data_clause_deviceptr)
2726 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2727 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2728 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2729 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2730 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2731 (c_parser_oacc_parallel, c_parser_oacc_update)
2732 (c_parser_oacc_wait): New functions.
2733 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2734 (c_finish_oacc_data): New prototypes.
2735 * c-typeck.c: Include "gomp-constants.h".
2736 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2737 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2738 OMP_CLAUSE_SET_MAP_KIND.
2739 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2740 (c_finish_oacc_data): New functions.
2741 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2742 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2743 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2744 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2745 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2746 GOMP_MAP_FORCE_DEVICEPTR.
2747
adfac8df
JJ
27482015-01-09 Michael Collison <michael.collison@linaro.org>
2749
2750 * c-array-notation.c: Include hash-set.h, machmode.h,
2751 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2752 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2753 * c-aux-info.c: Ditto.
2754 * c-convert.c: Ditto.
2755 * c-decl.c: Ditto.
2756 * c-errors.c: Ditto.
2757 * c-lang.c: Dittoxs.
2758 * c-objc-common.c: Ditto.
2759 * c-parser.c: Ditto.
2760 * c-typeck.c: Include hash-set.h, machmode.h,
2761 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2762 fold-const.h, wide-int.h, inchash.h, real.h and
2763 fixed-value.h due to flattening of tree.h.
2764
2cc901dc
MP
27652015-01-07 Marek Polacek <polacek@redhat.com>
2766
2767 PR c/64417
2768 * c-typeck.c (process_init_element): Disallow initialization of
2769 a flexible array member with a string constant if the structure
2770 is in an array.
2771
5624e564
JJ
27722015-01-05 Jakub Jelinek <jakub@redhat.com>
2773
e5341100
JJ
2774 PR sanitizer/64344
2775 * c-typeck.c (convert_for_assignment, c_finish_return): For
2776 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2777 types also set in_late_binary_op around convert call.
2778 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2779 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2780 result on expr as last argument to ubsan_instrument_float_cast,
2781 if in_late_binary_op, don't use c_save_expr but save_expr.
2782
5624e564
JJ
2783 Update copyright years.
2784
5bd012f8
MP
27852015-01-05 Marek Polacek <polacek@redhat.com>
2786
2787 PR c/64423
2788 * c-typeck.c (build_array_ref): Pass loc down to
2789 warn_array_subscript_with_type_char.
2790
3f8257db 27912014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2792
2793 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2794 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2795 element type.
8e745a17 2796 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2797 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2798 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2799 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2800 to PEDWARN_FOR_QUALIFIERS.
768952be 2801
8f94a8c4
JJ
28022014-12-17 Jakub Jelinek <jakub@redhat.com>
2803
2804 PR sanitizer/64289
2805 * c-convert.c: Include ubsan.h.
2806 (convert): For real -> integral casts and
2807 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2808 instead instrument the float cast directly.
2809
b731b390
JJ
28102014-11-29 Jakub Jelinek <jakub@redhat.com>
2811
2812 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2813 c_finish_stmt_expr): Remove NULL last argument from
2814 create_tmp_var_raw and create_tmp_var calls.
2815 * c-array-notation.c (fix_builtin_array_notation_fn,
2816 build_array_notation_expr, fix_conditional_array_notations_1,
2817 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2818
541e35a6
MP
28192014-11-28 Marek Polacek <polacek@redhat.com>
2820
2821 PR c/63862
2822 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2823 convert the right operand to integer type.
2824
b286be94
MP
28252014-11-25 Marek Polacek <polacek@redhat.com>
2826
2827 PR c/63877
2828 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2829 for inline functions.
2830
aa7da51a
JJ
28312014-11-21 Jakub Jelinek <jakub@redhat.com>
2832
2833 PR target/63764
2834 * c-typeck.c (build_array_ref): Adjust
2835 convert_vector_to_pointer_for_subscript caller. If it returns true,
2836 call non_lvalue_loc on the result.
2837
d876207f
RB
28382014-11-11 Richard Biener <rguenther@suse.de>
2839
2840 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2841 to true.
2842
e5e44252
AK
28432014-11-10 Andi Kleen <ak@linux.intel.com>
2844
2845 PR c/60804
2846 * c-parser.c (c_parser_statement_after_labels): Call
2847 check_no_cilk.
2848 (c_parser_if_statement): Dito.
2849 (c_parser_switch_statement): Dito.
2850 (c_parser_while_statement): Dito.
2851 (c_parser_do_statement): Dito.
2852 (c_parser_for_statement): Dito.
2853 * c-typeck.c (c_finish_loop): Dito.
2854
13c21655
PC
28552014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2856
2857 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2858 OPT_Wshift_count_overflow in the warnings.
2859
2d51fcef
MP
28602014-10-30 Marek Polacek <polacek@redhat.com>
2861
2862 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2863 print the stripped version as well, if they're not the same.
2864
ef4bddc2
RS
28652014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2866
2867 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2868 machine_mode.
2869
c582198b
AM
28702014-10-28 Andrew MacLeod <amacleod@redhat.com>
2871
2872 * c-decl.c: Adjust include files.
2873 * c-parser.c: Ditto.
2874
ddc8de03
PM
28752014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2876 Tom Tromey <tromey@redhat.com>
2877
2878 * c-tree.h (enum c_oracle_request): New.
2879 (c_binding_oracle_function): New typedef.
2880 (c_binding_oracle, c_pushtag, c_bind): Declare.
2881 * c-decl.c (c_binding_oracle): New global.
2882 (I_SYMBOL_CHECKED): New macro.
2883 (i_symbol_binding): New function.
2884 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2885 (I_TAG_CHECKED): New macro.
2886 (i_tag_binding): New function.
2887 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2888 (I_LABEL_CHECKED): New macro.
2889 (i_label_binding): New function.
2890 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2891 (c_print_identifier): Save and restore c_binding_oracle.
2892 (c_pushtag, c_bind): New functions.
2893
60393bbc
AM
28942014-10-27 Andrew MacLeod <amacleod@redhat.com>
2895
2896 * c-typeck.c: Adjust include files.
2897
d723bb7c
MLI
28982014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2899
2900 PR c++/53061
2901 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2902 initialization here...
2903 (c_initialize_diagnostics): ... but here. Set defaults after
2904 building pretty-printer.
2905
1bc5a451
MP
29062014-10-23 Marek Polacek <polacek@redhat.com>
2907
2908 PR c/63626
2909 * c-decl.c (pop_scope): Don't print warning in external_scope.
2910
4435bb92
MP
29112014-10-19 Marek Polacek <polacek@redhat.com>
2912
2913 PR c/63567
2914 * c-typeck.c (output_init_element): Allow initializing objects with
2915 static storage duration with compound literals even in C99 and add
2916 pedwarn for it.
2917
7278465e
MP
29182014-10-17 Marek Polacek <polacek@redhat.com>
2919
2920 PR c/63567
2921 * c-typeck.c (digest_init): Allow initializing objects with static
2922 storage duration with compound literals even in C99 and add pedwarn
2923 for it.
2924
d9b7be2e
MP
29252014-10-17 Marek Polacek <polacek@redhat.com>
2926
2927 PR c/63543
2928 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2929 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2930 error multiple times. Print the type.
2931
f406ae1f
MP
29322014-10-17 Marek Polacek <polacek@redhat.com>
2933
2934 PR c/63549
2935 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2936 type.
2937
92574c7c
MP
29382014-10-17 Marek Polacek <polacek@redhat.com>
2939
2940 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2941 (start_function): Use OPT_Wimplicit_int instead of 0.
2942 (store_parm_decls_oldstyle): Likewise.
2943
1bc4a978
MT
29442014-10-17 Alan Modra <amodra@gmail.com>
2945
2946 PR middle-end/61848
2947 * c-decl.c (merge_decls): Don't merge section name or tls model
2948 to newdecl symtab node, instead merge to olddecl. Override
2949 existing olddecl section name. Set tls_model for all thread-local
2950 vars, not just OMP thread-private ones. Remove incorrect comment.
2951
83685514
AM
29522014-10-16 Andrew MacLeod <amacleod@redhat.com>
2953
2954 * c-decl.c: Adjust include files.
2955
78a7c317
DD
29562014-10-14 DJ Delorie <dj@redhat.com>
2957
2958 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2959 (c_token_starts_typename): Check all __intN, not just __int128.
2960 (c_token_starts_declspecs): Likewise.
2961 (c_parser_declspecs): Likewise.
2962 (c_parser_attribute_any_word): Likewise.
2963 (c_parser_objc_selector): Likewise.
2964 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2965 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2966 is specified.
2967 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2968 __int128.
2969 (finish_declspecs): Likewise.
2970
74d98c1e
AB
29712014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2972
8e745a17 2973 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 2974 the duplicate code.
8e745a17 2975 (c_parser_statement): Call the new function.
74d98c1e 2976
84937de2
MP
29772014-10-09 Marek Polacek <polacek@redhat.com>
2978
2979 PR c/63480
2980 * c-typeck.c (pop_init_level): Don't warn about initializing
2981 with { }.
2982
0382aaa0
MP
29832014-10-07 Marek Polacek <polacek@redhat.com>
2984
2985 PR c/59717
2986 * c-decl.c (header_for_builtin_fn): New function.
2987 (implicitly_declare): Suggest which header to include.
2988
7a0ca710
MP
29892014-10-07 Marek Polacek <polacek@redhat.com>
2990
2991 * c-convert.c (convert): Use error_operand_p.
2992 * c-typeck.c (require_complete_type): Likewise.
2993 (really_atomic_lvalue): Likewise.
2994 (digest_init): Likewise.
2995 (handle_omp_array_sections_1): Likewise.
2996
6bc8a126
MP
29972014-10-03 Marek Polacek <polacek@redhat.com>
2998
2999 PR c/63453
3000 * c-decl.c (pop_scope): Don't warn about "inline function declared
3001 but never defined" for functions marked with gnu_inline attribute.
3002
d90c0a59
JJ
30032014-09-25 Jakub Jelinek <jakub@redhat.com>
3004
3005 PR c++/63249
3006 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3007 on low_bound and length.
3008
083e891e
MP
30092014-09-24 Marek Polacek <polacek@redhat.com>
3010
3011 PR c/61405
3012 PR c/53874
3013 * c-parser.c: Don't define CPP_KEYWORD.
3014 (c_parser_switch_statement): Pass original type to c_finish_case.
3015 * c-tree.h (c_finish_case): Update declaration.
3016 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3017 conditionally to c_do_switch_warnings.
3018
8d95fe25
MP
30192014-09-03 Marek Polacek <polacek@redhat.com>
3020
3021 PR c/62024
3022 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3023 conversions.
3024
9a771876
JJ
30252014-09-02 Jakub Jelinek <jakub@redhat.com>
3026 Balaji V. Iyer <balaji.v.iyer@intel.com>
3027 Igor Zamyatin <igor.zamyatin@intel.com>
3028
3029 * c-parser.c (c_parser_cilk_for): New function.
3030 (c_parser_cilk_grainsize): Likewise.
3031 (c_get_temp_regvar): Likewise.
3032 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3033 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3034 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3035 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3036 case.
3037
b7679d96
CG
30382014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3039
3040 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3041 with using HOST_WIDE_INT without truncation to 'int'
3042
59ea0364
MP
30432014-08-22 Marek Polacek <polacek@redhat.com>
3044
3045 PR c++/62199
3046 * c-typeck.c (parser_build_binary_op): Adjust call to
3047 warn_logical_not_parentheses.
3048
671a475e
IZ
30492014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3050
3051 PR other/62008
3052 * c-parser.c (c_parser_array_notation): Check for correct
3053 type of an array added.
3054
04159acf
MP
30552014-08-19 Marek Polacek <polacek@redhat.com>
3056
3057 PR c++/62153
3058 * c-typeck.c (build_binary_op): If either operand of a comparison
3059 is a boolean expression, call maybe_warn_bool_compare.
3060
c77935ee
PP
30612014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3062
3063 PR c/45584
3064 * c-typeck.c (build_c_cast): Do a conversion even when the
3065 TYPE_MAIN_VARIANTs are the same.
3066
35aff4fb
MP
30672014-08-19 Marek Polacek <polacek@redhat.com>
3068
3069 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3070 pedwarn_c99 instead of pedwarn.
3071 (grokfield): Likewise.
3072 (warn_defaults_to): New function.
3073 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3074 Unconditionally call pedwarn_c99 instead of pedwarn.
3075 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3076 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3077 check flag_isoc11 before.
3078 * c-errors.c (pedwarn_c99): Change the return type to bool.
3079 Handle -Wc99-c11-compat.
3080 * c-parser.c (disable_extension_diagnostics): Handle
3081 warn_c99_c11_compat.
3082 (restore_extension_diagnostics): Likewise.
3083 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3084 instead of pedwarn, don't check flag_isoc11 before.
3085 (c_parser_declspecs): Likewise.
3086 (c_parser_alignas_specifier): Likewise.
3087 (c_parser_alignof_expression): Likewise.
3088 (c_parser_generic_selection): Likewise.
3089 * c-tree.h (pedwarn_c99): Update declaration.
3090 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3091 of pedwarn_c99.
3092
177cce46
MP
30932014-08-19 Marek Polacek <polacek@redhat.com>
3094
3095 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3096 to pedwarn_c90.
3097 * c-errors.c: Include "opts.h".
3098 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3099 * c-parser.c (disable_extension_diagnostics): Handle negative value
3100 of warn_c90_c99_compat, too.
3101 (restore_extension_diagnostics): Likewise.
3102 (c_parser_compound_statement_nostart): Pass
3103 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3104
6dc99c33
MP
31052014-08-12 Marek Polacek <polacek@redhat.com>
3106
3107 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3108 Add pedwarn.
3109 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3110 Likewise.
3111 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3112
3f8257db 31132014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3114
3115 PR c/51849
3116 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3117 Call pedwarn_c90 instead of pedwarn.
3118 (check_bitfield_type_and_width): Likewise.
3119 (declspecs_add_qual): Likewise.
3120 (declspecs_add_type): Likewise.
3121 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3122 Adjust to only call pedwarn_c90.
3123 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3124 pedwarn_c90 instead of pedwarn.
3125 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3126 * c-parser.c (disable_extension_diagnostics): Handle
3127 warn_c90_c99_compat.
3128 (restore_extension_diagnostics): Likewise.
3129 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3130 pedwarn_c90 instead of pedwarn.
3131 (c_parser_initelt): Likewise.
3132 (c_parser_postfix_expression): Likewise.
3133 (c_parser_postfix_expression_after_paren_type): Likewise.
3134 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3135 * c-tree.h: Fix formatting.
3136 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3137 pedwarn_c90 instead of pedwarn.
3138
9f25a338
TS
31392014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3140
3141 * c-typeck.c: Remove include of pointer-set.h.
3142
044331a8
MP
31432014-08-07 Marek Polacek <polacek@redhat.com>
3144
3145 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3146
b787e7a2
TS
31472014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3148
3149 * c-typeck.c: Use hash_map instead of pointer_map.
3150
6e2830c3
TS
31512014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3152
3153 * c-decl.c: Use hash_set instead of pointer_set.
3154
a7ee52fb
IZ
31552014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3156
3157 PR middle-end/61455
3158 * c-array-notation.c (expand_array_notations): Handling
3159 of DECL_EXPR added.
3160
b4dfdc11
MG
31612014-07-31 Marc Glisse <marc.glisse@inria.fr>
3162
3163 PR c++/60517
3164 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3165 a local variable.
3166
976d5a22
TT
31672014-07-30 Tom Tromey <tromey@redhat.com>
3168
3169 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3170 field.
3171 (really_start_incremental_init, push_init_level): Initialize
3172 designator_depth.
3173 (pop_init_level): Set global designator_depth.
3174 (process_init_element): Check for designated_init attribute.
3175
30281de2
MP
31762014-07-20 Marek Polacek <polacek@redhat.com>
3177
3178 PR c/61852
3179 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3180 (implicitly_declare): Pass location to implicit_decl_warning.
3181
b108f48f
JJ
31822014-07-14 Jakub Jelinek <jakub@redhat.com>
3183
3184 PR middle-end/61294
3185 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3186 If non-NULL, call c_parser_check_literal_zero.
3187 (c_parser_check_literal_zero): New function.
3188 (c_parser_postfix_expression_after_primary): Adjust
3189 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3190
773ec47f
MP
31912014-07-06 Marek Polacek <polacek@redhat.com>
3192
3193 PR c/6940
3194 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3195 * c-tree.h (C_ARRAY_PARAMETER): Define.
3196 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3197 function parameter.
3198
22e1cf1c 31992014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3200 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3201
3202 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3203 releasing symbol.
3204
52ec0ea3
MP
32052014-07-01 Marek Polacek <polacek@redhat.com>
3206
3207 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3208 instead of 0 to WARN_FOR_ASSIGNMENT.
3209
d5c3d343
MP
32102014-07-01 Marek Polacek <polacek@redhat.com>
3211
3212 PR c/58286
3213 * c-typeck.c (convert_for_assignment): Pass
3214 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3215
6a7253a4
MP
32162014-06-30 Marek Polacek <polacek@redhat.com>
3217
3218 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3219 has no_sanitize_undefined attribute.
3220
5e88a8f4
IZ
32212014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3222
3223 PR middle-end/57541
3224 * c-array-notation.c (fix_builtin_array_notation_fn):
3225 Check for 0 arguments in builtin call. Check that bultin argument is
3226 correct.
3227 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3228 index.
3229
9698b078
SH
32302014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3231
3232 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3233 qualifiers in __auto_type for atomic types.
3234 (c_parser_typeof_specifier): Discard all type qualifiers in
3235 __typeof__ for atomic types.
3236
6e07c515
MP
32372014-06-25 Marek Polacek <polacek@redhat.com>
3238
3239 PR c/61162
3240 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3241 the return expression to c_finish_return.
3242
da6f124d
JJ
32432014-06-25 Jakub Jelinek <jakub@redhat.com>
3244
3245 * c-typeck.c (c_finish_omp_clauses): Make sure
3246 OMP_CLAUSE_LINEAR_STEP has correct type.
3247
c203e8a7
TS
32482014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3249
3250 * c-decl.c: Adjust.
3251
56ad0e38
JJ
32522014-06-24 Jakub Jelinek <jakub@redhat.com>
3253
3254 * c-parser.c (c_parser_omp_for_loop): For
3255 #pragma omp parallel for simd move lastprivate clause from parallel
3256 to for rather than simd.
3257
47c2554f
MP
32582014-06-23 Marek Polacek <polacek@redhat.com>
3259
3260 * c-typeck.c (parser_build_binary_op): Don't call
3261 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3262
56363ffd
JH
32632014-06-15 Jan Hubicka <hubicka@ucw.cz>
3264
3265 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3266 * c-decl.c (merge_decls): Likewise.
3267
d7ff7ae5
MP
32682014-06-09 Marek Polacek <polacek@redhat.com>
3269
3270 PR c/36446
3271 * c-typeck.c (error_init): Call inform instead of error_at.
3272 (pedwarn_init): Call inform instead of pedwarn.
3273 (warning_init): Call inform instead of warning_at.
3274
24d047a3
JH
32752014-06-07 Jan Hubicka <hubicka@ucw.cz>
3276
3277 * c-decl.c (merge_decls): Use set_decl_section_name.
3278 (duplicate_decls): Remove node if it exists.
3279
9bac5cbb
G
32802014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3281
3282 PR c/53119
3283 * c-typeck.c (push_init_level, process_init_element,
3284 pop_init_level): Correct check for zero initialization, move
3285 missing brace warning to respect zero initialization.
3286
8ffcdea8
MP
32872014-06-05 Marek Polacek <polacek@redhat.com>
3288
3289 PR c/56724
3290 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3291
742938c9
MP
32922014-06-05 Marek Polacek <polacek@redhat.com>
3293
3294 PR c/49706
3295 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3296 on the left hand side operand of a comparison.
3297
6447c55d
MP
32982014-06-05 Marek Polacek <polacek@redhat.com>
3299
3300 PR c/48062
3301 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3302 Print note only if the warning was printed.
3303
9dc7743c
IZ
33042014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3305
3306 PR c/58942
3307 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3308 with a pointer.
3309
fedfecef
MP
33102014-06-03 Marek Polacek <polacek@redhat.com>
3311
3312 PR c/60439
3313 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3314 c_start_case.
3315 * c-tree.h (c_start_case): Update.
3316 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3317 switch condition has boolean value.
3318
9b2b7279
AM
33192014-06-02 Andrew MacLeod <amacleod@redhat.com>
3320
3321 * c-decl.c: Include builtins.h.
3322 * c-parser.c: Likewise.
3323
5c1bc275
MP
33242014-05-27 Marek Polacek <polacek@redhat.com>
3325
3326 PR c/56724
3327 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3328 error and warning calls to error_at and warning_at. Pass location of
3329 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3330 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3331 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3332
97563bc8
IZ
33332014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3334
3335 PR c/61191
3336 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3337 function parameters.
3338
aede2c10
JH
33392014-05-23 Jan Hubicka <hubicka@ucw.cz>
3340
3341 * c-decl.c (merge_decls): Preserve symtab node pointers.
3342 (duplicate_decls): Free new decl.
3343
edbba2ce
TS
33442014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3345
f3316c6d
TS
3346 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3347 initialization.
3348
edbba2ce
TS
3349 * c-parser.c (c_parser_omp_target): Return bool values.
3350
68c81f24
TS
33512014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3352
3353 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3354 num_teams_loc variable to num_thread_limit_loc.
3355
632f2871
RS
33562014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3357
3358 * c-array-notation.c (expand_array_notations): Use void_node
3359 instead of void_zero_node.
3360
766090c2
TS
33612014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3362
3363 * c-decl.c (finish_struct): Adjust.
3364 (finish_enum): Likewise.
3365 (bind): Adjust.
3366 (record_inline_static): Likewise.
3367 (push_scope): Likewise.
3368 (make_label): Likewise.
3369 (lookup_label_for_goto): Likewise.
3370 (finish_struct): Likewise.
3371 (finish_enum): Likewise.
3372 (store_parm_decls): Likewise.
3373 (c_push_function_context): Likewise.
3374 * c-lang.h: Remove usage of variable_size gty attribute.
3375 * c-parser.c (c_parse_init): Adjust.
3376 (c_parse_file): Likewise.
3377
2b107f6b
MP
33782014-05-13 Marek Polacek <polacek@redhat.com>
3379
3380 PR c/61162
3381 * c-typeck.c (convert_for_assignment): Pass location to
3382 WARN_FOR_ASSIGNMENT instead of input_location.
3383
d033409e
MP
33842014-05-10 Marek Polacek <polacek@redhat.com>
3385
3386 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3387 maybe_warn_string_init.
3388 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3389 maybe_warn_string_init.
3390 * c-tree.h (maybe_warn_string_init): Update declaration.
3391 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3392 Call pedwarn_init with loc instead of with input_location.
3393 (digest_init): Pass init_loc to maybe_warn_string_init.
3394 (pop_init_level): Call pedwarn_init with loc instead of with
3395 input_location.
3396 (set_init_index): Likewise.
3397 (process_init_element): Likewise.
3398
ea58ef42
MP
33992014-05-09 Marek Polacek <polacek@redhat.com>
3400
3401 PR c/61096
3402 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3403 (c_parser_initelt): Pass location to set_init_label. Pass array index
3404 location to set_init_index.
3405 * c-tree.h (push_init_level): Update declaration.
3406 (pop_init_level): Likewise.
3407 (set_init_index): Likewise.
3408 (set_init_label): Likewise.
3409 * c-typeck.c (error_init): Add location parameter. Call error_at
3410 instead of error.
3411 (digest_init): Pass init_loc to error_init.
3412 (really_start_incremental_init):
3413 (push_init_level): Add location parameter. Pass loc to pop_init_level
3414 and error_init.
3415 (pop_init_level): Likewise.
3416 (set_designator): Add location parameter. Pass loc to pop_init_level,
3417 push_init_level, and error_init.
3418 (set_init_index): Add location parameter. Pass loc to error_init and
3419 set_designator.
3420 (set_init_label): Likewise.
3421 (output_init_element): Pass loc to error_init.
3422 (process_init_element): Pass loc to error_init, pop_init_level,
3423 pedwarn_init, and push_init_level.
3424
661a0813
MP
34252014-05-09 Marek Polacek <polacek@redhat.com>
3426
3427 PR c/50459
3428 * c-parser.c (c_parser_attributes): Parse the arguments as an
3429 expression-list if the attribute takes identifier.
3430
2793eeab
MP
34312014-05-08 Marek Polacek <polacek@redhat.com>
3432
3433 PR c/61053
3434 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3435 TYPE_ALIGN_UNIT.
3436
f827930a
MP
34372014-05-08 Marek Polacek <polacek@redhat.com>
3438
3439 PR c/61077
3440 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3441 of main.
3442
1d60af08
KZ
34432014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3444 Mike Stump <mikestump@comcast.net>
3445 Richard Sandiford <rdsandiford@googlemail.com>
3446
3447 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3448 (finish_enum): Use wide-int interfaces.
3449 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3450 * c-typeck.c (build_c_cast): Likewise.
3451 (set_nonincremental_init_from_string): Likewise.
3452 (c_tree_equal): Likewise.
3453
a0e24419
MP
34542014-05-02 Marek Polacek <polacek@redhat.com>
3455
3456 PR c/25801
3457 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3458 Return size_one_node when the type is not complete.
3459 (pointer_diff): Remove comment.
3460 (build_unary_op): Improve error messages.
3461
19fc9faa
MP
34622014-05-02 Marek Polacek <polacek@redhat.com>
3463
3464 * c-typeck.c (c_finish_return): Separate warning_at calls.
3465
63bc4e87
MP
34662014-05-02 Marek Polacek <polacek@redhat.com>
3467
3468 * c-tree.h (error_init): Remove declaration.
3469 (pedwarn_init): Likewise.
3470 * c-typeck.c (error_init): Make static and move above.
3471 (pedwarn_init): Likewise.
3472 (warning_init): Move above.
3473 (maybe_warn_string_init): Likewise.
3474
4bd2511b
JL
34752014-05-01 Jeff Law <law@redhat.com>
3476
3477 Revert:
3478
3479 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3480 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3481 avoid goto.
3482
6a358dcb
MP
34832014-05-02 Marek Polacek <polacek@redhat.com>
3484
3485 PR c/60784
3486 * c-typeck.c (push_init_level): Set constructor_designated to
3487 p->designated for structures.
3488
ae5ebda4
MP
34892014-05-01 Marek Polacek <polacek@redhat.com>
3490
3491 PR c/60915
3492 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3493 function-definition has an attribute after the declarator.
3494
96b40f8d
MP
34952014-05-01 Marek Polacek <polacek@redhat.com>
3496
3497 PR c/60257
3498 * c-typeck.c (warning_init): Add location_t parameter. Call
3499 warning_at instead of warning.
3500 (push_init_level): Pass input_location to warning_init.
3501 (add_pending_init): Add location_t parameter. Pass loc to
3502 warning_init.
3503 (set_nonincremental_init): Pass input_location to add_pending_init.
3504 (set_nonincremental_init_from_string): Likewise.
3505 (output_init_element): Pass loc to warning_init and to
3506 add_pending_init.
3507
32e00768
MP
35082014-05-01 Marek Polacek <polacek@redhat.com>
3509
3510 PR c/43395
3511 * c-typeck.c (c_finish_return): Distinguish between label and variable
3512 when warning about returning local address.
3513
c9379ce2
MP
35142014-05-01 Marek Polacek <polacek@redhat.com>
3515
3516 PR c/29467
3517 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3518 in C89 mode.
3519
d00887e8
MP
35202014-05-01 Marek Polacek <polacek@redhat.com>
3521
3522 PR c/43245
3523 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3524 instead of 0 to WARN_FOR_QUALIFIERS.
3525
5436fa2e
MP
35262014-05-01 Marek Polacek <polacek@redhat.com>
3527
3528 PR c/56989
3529 * c-typeck.c (default_conversion): Use better location for
3530 error call.
3531
f8ed5150
MP
35322014-04-30 Marek Polacek <polacek@redhat.com>
3533
3534 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3535 also when SANITIZE_FLOAT_DIVIDE is on.
3536
8337d1db
MP
35372014-04-30 Marek Polacek <polacek@redhat.com>
3538
3539 PR c/60139
3540 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3541 and pedwarn_init. Use loc insted of input_location.
3542
c4bdc42f
MP
35432014-04-30 Marek Polacek <polacek@redhat.com>
3544
3545 PR c/60351
3546 * c-typeck.c (build_binary_op): Use location when warning about
3547 shift count.
3548
45484dcf
MP
35492014-04-25 Marek Polacek <polacek@redhat.com>
3550
3551 PR c/18079
3552 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3553 always_inline/noinline and hot/cold attributes.
3554
34cf811f
MP
35552014-04-25 Marek Polacek <polacek@redhat.com>
3556
3557 PR c/60114
3558 * c-parser.c (c_parser_initelt): Pass input_location to
3559 process_init_element.
3560 (c_parser_initval): Pass loc to process_init_element.
3561 * c-tree.h (process_init_element): Adjust declaration.
3562 * c-typeck.c (push_init_level): Pass input_location to
3563 process_init_element.
3564 (pop_init_level): Likewise.
3565 (set_designator): Likewise.
3566 (output_init_element): Add location_t parameter. Pass loc to
3567 digest_init.
3568 (output_pending_init_elements): Pass input_location to
3569 output_init_element.
3570 (process_init_element): Add location_t parameter. Pass loc to
3571 output_init_element.
3572
42056eac
JJ
35732014-04-24 Jakub Jelinek <jakub@redhat.com>
3574
3575 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3576 atomic-clause, allow comma in between atomic-clause and
3577 seq_cst.
3578
e162a134
JJ
35792014-04-22 Jakub Jelinek <jakub@redhat.com>
3580
3581 PR c/59073
3582 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3583 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3584
2f6babac
IZ
35852014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3586
3587 PR middle-end/60469
3588 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3589 create_tmp_var instead build_decl for creating temps.
3590 (build_array_notation_expr): Likewise.
3591 (fix_conditional_array_notations_1): Likewise.
3592 (fix_array_notation_expr): Likewise.
3593 (fix_array_notation_call_expr): Likewise.
3594
8edbfaa6
JJ
35952014-03-28 Jakub Jelinek <jakub@redhat.com>
3596
3597 PR c++/60689
3598 * c-tree.h (c_build_function_call_vec): New prototype.
3599 * c-typeck.c (build_function_call_vec): Don't call
3600 resolve_overloaded_builtin here.
3601 (c_build_function_call_vec): New wrapper function around
3602 build_function_call_vec. Call resolve_overloaded_builtin here.
3603 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3604 Call c_build_function_call_vec instead of build_function_call_vec.
3605 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3606 * c-decl.c (finish_decl): Likewise.
3607
7485aeea
MLI
36082014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3609
3610 PR c/55383
3611 * c-typeck.c: Use correct format string in cast-qual warning
3612
b17a8b07
TS
36132014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3614
3615 * c-decl.c (c_decl_attributes): Use
3616 lang_hooks.types.omp_mappable_type.
3617 * c-typeck.c (c_finish_omp_clauses): Likewise.
3618
3af9c5e9
MP
36192014-03-06 Marek Polacek <polacek@redhat.com>
3620
3621 PR c/60197
3622 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3623 of checking tree code.
3624
1c9f5f33
PK
36252014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3626
3627 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3628 (c_parser_parameter_declaration): Likewise.
3629
cc28fc7f
MP
36302014-02-19 Marek Polacek <polacek@redhat.com>
3631
3632 PR c/60195
3633 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3634 Call mark_exp_read on exp.value.
3635 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3636 TREE_ADDRESSABLE on old instead of val.
3637 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3638
b581c05c
PK
36392014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3640
3641 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3642 C_EXPR_APPEND by vec_safe_push.
3643 * c-tree.h (C_EXPR_APPEND): Remove.
3644
81e5eca8
MP
36452014-01-31 Marek Polacek <polacek@redhat.com>
3646
3647 PR c/59963
3648 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3649 build_function_call_vec.
3650 (build_function_call): Likewise.
3651 (build_atomic_assign): Likewise.
3652 (build_function_call_vec): Add arg_loc parameter. Use it.
3653 (convert_arguments): Likewise.
3654 (convert_for_assignment): Rename rhs_loc to expr_loc.
3655 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3656 (c_parser_objc_keywordexpr): Likewise.
3657 (c_parser_postfix_expression_after_primary): Call
3658 build_function_call_vec with expr_loc rather than op_loc.
3659 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3660 build_function_call_vec.
3661 (c_parser_expr_list): Add locations parameter. Fill it with locations
3662 of function arguments.
3663 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3664
68fca595
MP
36652014-01-30 Marek Polacek <polacek@redhat.com>
3666
3667 PR c/59940
3668 * c-typeck.c (build_function_call_vec): Use loc parameter.
3669 (convert_arguments): Add location parameter. Use it.
3670 (ep_convert_and_check): Likewise.
3671 (build_atomic_assign): Adjust convert_for_assignment call.
3672 (build_modify_expr): Likewise.
3673 (digest_init): Likewise.
3674 (c_finish_return): Likewise.
3675 (build_conditional_expr): Adjust ep_convert_and_check calls.
3676 (convert_for_assignment): Add rhs_loc parameter. Use it.
3677 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3678 calls.
3679
fa337f3a
RB
36802014-01-30 Richard Biener <rguenther@suse.de>
3681
3682 PR c/59905
3683 * c-typeck.c (build_function_call_vec): Do not replace calls
3684 to a function via an incompatible type with a runtime abort.
3685
b72271b9
BI
36862014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3687
3688 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3689 flag_enable_cilkplus with flag_cilkplus.
3690 (c_parser_direct_declarator_inner): Likewise.
3691 (c_parser_attribute_any_word): Likewise.
3692 (c_parser_attributes): Likewise.
3693 (c_parser_compound_statement): Likewise.
3694 (c_parser_statement_after_labels): Likewise.
3695 (c_parser_if_statement): Likewise.
3696 (c_parser_switch_statement): Likewise.
3697 (c_parser_do_statement): Likewise.
3698 (c_parser_for_statement): Likewise.
3699 (c_parser_unary_expression): Likewise.
3700 (c_parser_postfix_expression): Likewise.
3701 (c_parser_postfix_expression_after_primary): Likewise.
3702 (c_parser_postfix_expression_after_primary): Likewise.
3703 (c_parser_omp_clause_name): Likewise.
3704 (c_finish_omp_declare_simd): Likewise.
3705 (c_parser_cilk_verify_simd): Likewise.
3706 * c-typeck.c (build_array_ref): Likewise.
3707 (build_function_call_vec): Likewise.
3708 (convert_arguments): Likewise.
3709 (build_compound_expr): Likewise.
3710 (c_finish_return): Likewise.
3711 (c_finish_if_stmt): Likewise.
3712 (c_finish_loop): Likewise.
3713 (build_binary_op): Likewise.
3714
393e8e8b
MP
37152014-01-23 Marek Polacek <polacek@redhat.com>
3716
3717 PR c/59846
3718 * c-typeck.c (parser_build_binary_op): Use location instead of
3719 input_location.
3720 (build_binary_op): Pass location to shorten_compare.
3721
f04dda30
MP
37222014-01-23 Marek Polacek <polacek@redhat.com>
3723
3724 PR c/58346
3725 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3726 an empty aggregate.
3727
789eadcd
MP
37282014-01-23 Marek Polacek <polacek@redhat.com>
3729
3730 PR c/59871
3731 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3732 of a comma expression.
3733 (emit_side_effect_warnings): Likewise.
3734
40f14e9f
BI
37352014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3736
3737 PR c/59825
3738 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3739 function to use walk_tree and moved a lot of its functionality to
3740 expand_array_notations.
3741 (expand_array_notations): New function.
3742
74558dd9
BI
37432014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3744
3745 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3746 attribute an attribute without value.
3747
652fea39
JJ
37482014-01-23 Jakub Jelinek <jakub@redhat.com>
3749
3750 PR middle-end/58809
3751 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3752 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3753
f34f1c87
MP
37542014-01-22 Marek Polacek <polacek@redhat.com>
3755
3756 PR c/59891
3757 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3758 of remove_c_maybe_const_expr on op1 and op2.
3759
241f845a
JJ
37602014-01-15 Jakub Jelinek <jakub@redhat.com>
3761
3762 PR c/58943
3763 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3764 effects, preevaluate rhs using SAVE_EXPR first.
3765
9a74f20c
BI
37662014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3767
3768 PR c++/59631
3769 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3770 statements with if-elseif statements.
3771
96066ce1
MP
37722014-01-06 Marek Polacek <polacek@redhat.com>
3773
3774 PR c/57773
3775 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3776 defined bit-field types only in ISO C.
3777
23a5b65a
RS
37782014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3779
3780 Update copyright years
3781
f9030485
RS
37822014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3783
3784 * c-array-notation.c: Use the standard form for the copyright notice.
3785
41958c28
BI
37862013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3787
3788 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3789 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3790 field in parser is not empty. If not-empty, call the function
3791 c_parser_finish_omp_declare_simd.
3792 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3793 between SIMD-enabled functions and #pragma simd. Added new parameter.
3794 (c_parser_cilk_all_clauses): Modified the usage of the function
3795 c_parser_cilk_clause_vectorlength as mentioned above.
3796 (c_parser_cilk_simd_fn_vector_attrs): New function.
3797 (c_finish_cilk_simd_fn_tokens): Likewise.
3798 (is_cilkplus_vector_p): Likewise.
3799 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3800 "nomask," and "mask" strings in clause name.
3801 (c_parser_omp_all_clauses): Added 3 new case statements:
3802 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3803 PRAGMA_CILK_CLAUSE_NOMASK.
3804 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3805 check for vector attribute and if so call the function
3806 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3807 called the function c_finish_cilk_simd_fn_tokens.
3808 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3809 parser field is non-empty. If so, parse them as you would parse
3810 the omp declare simd pragma.
3811 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3812 Added a check when step is a parameter and flag it as error.
3813 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3814 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3815 pragma_omp_clause.
3816
cef0fd0e
TS
38172013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3818
3819 * c-parser.c (c_parser_omp_parallel): Fix description.
3820
12893402
BI
38212013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3822
3823 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3824 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3825 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3826 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3827
296674db
JM
38282013-12-04 Joseph Myers <joseph@codesourcery.com>
3829
3830 PR c/52023
3831 * c-parser.c (c_parser_alignas_specifier): Use
3832 c_sizeof_or_alignof_type instead of c_alignof.
3833 (c_parser_alignof_expression): Likewise, with min_alignof
3834 parameter depending on alignof spelling used.
3835
edd28054
MP
38362013-12-04 Marek Polacek <polacek@redhat.com>
3837
3838 PR c/54113
3839 * c-decl.c (start_function): Don't warn for missing prototype for
3840 inline functions.
3841
da0fc454
MP
38422013-12-03 Marek Polacek <polacek@redhat.com>
3843
3844 PR c/59351
3845 * c-decl.c (build_compound_literal): Allow compound literals with
3846 empty initial value.
3847
4c2ecab0
JM
38482013-12-02 Joseph Myers <joseph@codesourcery.com>
3849
3850 PR c/58235
3851 * c-typeck.c (build_modify_expr): Diagnose assignment to
3852 expression with array type.
3853
340baef7
JM
38542013-11-29 Joseph Myers <joseph@codesourcery.com>
3855
3856 PR c/42262
3857 * c-typeck.c (process_init_element): Do not treat a string as
3858 initializing a whole array when used with a designator for an
3859 individual element.
3860
6763b9f7
JM
38612013-11-29 Joseph Myers <joseph@codesourcery.com>
3862
3863 PR c/57574
3864 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3865 an inline function following a static declaration.
3866
e7bd1de1
JJ
38672013-11-28 Jakub Jelinek <jakub@redhat.com>
3868
3869 PR c/59310
3870 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3871 to p_name before calling c_parser_omp_teams instead of after.
3872 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3873 argument. Remove unused p_name variable.
3874
0136f8f0
AH
38752013-11-27 Aldy Hernandez <aldyh@redhat.com>
3876 Jakub Jelinek <jakub@redhat.com>
3877
3878 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3879 external_scope is NULL.
3880
241b71bb
TV
38812013-11-27 Tom de Vries <tom@codesourcery.com>
3882 Marc Glisse <marc.glisse@inria.fr>
3883
3884 PR c++/59032
3885 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3886
2fb9a547
AM
38872013-11-22 Andrew MacLeod <amacleod@redhat.com>
3888
3889 * c-typeck.c: Add required include files from gimple.h.
3890
8400e75e
DM
38912013-11-22 David Malcolm <dmalcolm@redhat.com>
3892
3893 * c-decl.c (define_label, shadow_tag_warned)
3894 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3895 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3896 (declspecs_add_type): Remove use of in_system_header macro.
3897 * c-parser.c (c_parser_unary_expression): Likewise.
3898 * c-typeck.c (store_init_value, process_init_element)
3899 (c_start_case): Likewise.
3900
3901 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3902 macro.
3903
3904 * c-parser.c (c_parser_set_source_position_from_token): Remove
3905 reference to in_system_header from comment.
3906
386b1f1f
RS
39072013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3908
3909 * c-decl.c (grokdeclarator): Update comment to refer to
3910 tree_to_[su]hwi rather than tree_low_cst.
3911
ae7e9ddd
RS
39122013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3913
3914 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3915 tree_to_uhwi throughout.
3916
9439e9a1
RS
39172013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3918
3919 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3920 throughout.
3921
9541ffee
RS
39222013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3923
3924 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3925 throughout.
3926
c02065fc
AH
39272013-11-15 Aldy Hernandez <aldyh@redhat.com>
3928
3929 * c-parser.c (c_parser_cilk_simd): New.
3930 (c_parser_cilk_verify_simd): New.
3931 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3932 (c_parser_omp_for_loop): Add case for NE_EXPR.
3933 Set c_break_label for CILK_SIMD.
3934 (c_parser_cilk_clause_vectorlength): New.
3935 (c_parser_cilk_clause_linear): New.
3936 (c_parser_cilk_clause_name): New.
3937 (c_parser_cilk_all_clauses): New.
3938 * c-typeck.c (build_unary_op): Pass location argument to
3939 readonly_error.
3940 (build_modify_expr): Same.
3941 (build_asm_expr): Same.
3942 (c_finish_bc_stmt): Error on break/continue in loops.
3943
18f429e2
AM
39442013-11-14 Andrew MacLeod <amacleod@redhat.com>
3945
3946 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3947
d8a2d370
DN
39482013-11-14 Diego Novillo <dnovillo@google.com>
3949
3950 * c-decl.c: Include print-tree.h.
3951 Include stor-layout.h.
3952 Include varasm.h.
3953 Include attribs.h.
3954 Include stringpool.h.
3955 * c-lang.c: Include fold-const.h.
3956 * c-parser.c: Include stringpool.h.
3957 Include attribs.h.
3958 Include stor-layout.h.
3959 Include varasm.h.
3960 Include trans-mem.h.
3961 * c-typeck.c: Include stor-layout.h.
3962 Include trans-mem.h.
3963 Include varasm.h.
3964 Include stmt.h.
3965
38b7bc7f
JM
39662013-11-13 Joseph Myers <joseph@codesourcery.com>
3967
3968 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3969 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3970 __auto_type.
3971 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3972 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3973 RID_AUTO_TYPE.
3974 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3975 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3976 (c_parser_declarator, c_parser_direct_declarator_inner)
3977 (c_parser_parameter_declaration, c_parser_type_name): All callers
3978 changed.
3979 (c_parser_declaration_or_fndef): Handle declarations with type
3980 determined from the initializer.
3981
45b0be94
AM
39822013-11-12 Andrew MacLeod <amacleod@redhat.com>
3983
18f429e2 3984 * c-typeck.c: Include gimplify.h.
45b0be94 3985
582d9b50
JM
39862013-11-12 Joseph Myers <joseph@codesourcery.com>
3987
3988 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3989 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3990 comment.
3991 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3992 or _Thread_local as appropriate in diagnostics.
3993 (build_null_declspecs): Initialize ret->thread_gnu_p.
3994 (declspecs_add_scspec): Handle either __thread or _Thread_local
3995 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3996 pedantic. Do not disallow _Thread_local extern and _Thread_local
3997 static.
3998
267bac10
JM
39992013-11-07 Joseph Myers <joseph@codesourcery.com>
4000 Andrew MacLeod <amacleod@redhat.com>
4001
4002 * c-aux-info.c (gen_type): Handle atomic qualifier.
4003 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4004 qualifiers when compating types.
4005 (shadow_tag_warned): Handle atomic_p in declspecs.
4006 (quals_from_declspecs): Likewise.
4007 (start_decl): Use c_type_promotes_to when promoting argument
4008 types.
4009 (grokdeclarator): Handle _Atomic.
4010 (get_parm_info): Diagnose any qualifier on "void" as only
4011 parameter.
4012 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4013 comparing types. Use c_type_promotes_to when promoting argument
4014 types.
4015 (finish_function): Use c_type_promotes_to when promoting argument
4016 types.
4017 (build_null_declspecs): Handle atomic_p in declspecs.
4018 (declspecs_add_qual): Handle RID_ATOMIC.
4019 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4020 (c_token_starts_declspecs): Handle RID_ATOMIC.
4021 (c_parser_declspecs): Handle atomic type specifiers and
4022 qualifiers.
4023 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4024 from types of expressions with atomic type.
4025 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4026 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4027 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4028 (c_parser_statement_after_labels, c_parser_switch_statement)
4029 (c_parser_for_statement, c_parser_expr_no_commas)
4030 (c_parser_conditional_expression, c_parser_binary_expression)
4031 (c_parser_cast_expression, c_parser_unary_expression)
4032 (c_parser_postfix_expression)
4033 (c_parser_postfix_expression_after_primary, c_parser_expression):
4034 Use convert_lvalue_to_rvalue.
4035 (c_parser_expression_conv, c_parser_expr_list): Document
4036 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4037 (c_parser_objc_synchronized_statement): Use
4038 convert_lvalue_to_rvalue.
4039 (c_parser_objc_selector): Handle RID_ATOMIC.
4040 (c_parser_objc_receiver, c_parser_array_notation): Use
4041 convert_lvalue_to_rvalue.
4042 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4043 _Atomic (type-name).
4044 (struct c_declspecs): Add atomic_p field.
4045 (convert_lvalue_to_rvalue): Declare.
4046 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4047 corresponding atomic types.
4048 (qualify_type): Don't add _Atomic qualifiers from second argument.
4049 (comp_target_types): Do not allow _Atomic mismatches.
4050 (type_lists_compatible_p): Do not remove atomic qualifiers when
4051 comparing types.
4052 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4053 (build_atomic_assign): New functions.
4054 (build_unary_op): Use build_atomic_assign for atomic increment and
4055 decrement.
4056 (build_conditional_expr): Do not treat _Atomic void as a qualified
4057 version of void.
4058 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4059 (find_anonymous_field_with_type, convert_to_anonymous_field)
4060 (convert_for_assignment): Do not remove atomic qualifiers when
4061 comparing types.
4062 (digest_init): Do not accept initialization of arrays of atomic
4063 elements by string constants.
4064 (build_asm_expr): Use convert_lvalue_to_rvalue.
4065 (build_binary_op): Do not treat _Atomic void as a qualified
4066 version of void.
4067
0c249d4b
DD
40682013-11-06 DJ Delorie <dj@redhat.com>
4069
4070 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4071 both explicit and builtin, print the location of the explicit one.
4072
6d7f7e0a
TB
40732013-11-05 Tobias Burnus <burnus@net-b.de>
4074
4075 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4076 c_parser_omp_distribute, c_parser_omp_teams,
4077 c_parser_omp_target, c_parser_omp_declare): Handle
4078 -fopenmp-simd.
4079
b906f4ca
MP
40802013-11-03 Marek Polacek <polacek@redhat.com>
4081
4082 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4083
ee1d5a02
JJ
40842013-11-01 Jakub Jelinek <jakub@redhat.com>
4085
4086 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4087 check_dup_generic at the end, unless remove is true.
4088 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4089 remove = true;.
4090 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4091
5a9785fb
JJ
40922013-10-31 Jakub Jelinek <jakub@redhat.com>
4093
4094 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4095 with decl that is not pointer nor array.
4096
939b37da
BI
40972013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4098
4099 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4100 a spawning function is found.
4101 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4102 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4103 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4104 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4105 case.
4106 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4107 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4108 expr.
4109 (c_finish_return): Added a check to reject _Cilk_spawn in return
4110 expression.
4111 (build_cilk_spawn): New function.
4112 (build_cilk_sync): Likewise.
4113 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4114
d4af74d4
TB
41152013-10-27 Tobias Burnus <burnus@net-b.de>
4116
4117 PR other/33426
4118 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4119 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4120 (c_parser_statement_after_labels): Update calls.
4121
d73749df 41222013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4123
4124 PR other/33426
4125 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4126 Handle PRAGMA_IVDEP.
4127 (c_parser_statement_after_labels): Update call.
4128
f28aa681
MP
41292013-10-24 Marek Polacek <polacek@redhat.com>
4130
4131 * c-parser.c (c_parser_struct_declaration): Add a comment.
4132 (c_parser_declarator): Don't allow _Alignas here.
4133
0645c1a2
AM
41342013-10-17 Andrew MacLeod <amacleod@redhat.com>
4135
4136 * c-parser.c: Include omp-low.h.
4137 * c-typeck.c: Likewise.
4138
568a31f2
MP
41392013-10-17 Marek Polacek <polacek@redhat.com>
4140
4141 PR c/58267
4142 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4143 Document syntax of the array-declarator.
4144 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4145 are not permitted.
4146 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4147 (c_parser_struct_declaration): Likewise.
4148 (c_parser_declarator): Likewise.
4149 (c_parser_direct_declarator_inner): Likewise.
4150 (c_parser_parameter_declaration): Likewise.
4151 (c_parser_type_name): Likewise.
4152
acf0174b
JJ
41532013-10-11 Jakub Jelinek <jakub@redhat.com>
4154
4155 * c-lang.h (current_omp_declare_target_attribute): New extern
4156 decl.
4157 * c-parser.c: Include c-lang.h.
4158 (struct c_parser): Change tokens to c_token *.
4159 Add tokens_buf field. Change tokens_avail type to unsigned int.
4160 (c_parser_consume_token): If parser->tokens isn't
4161 &parser->tokens_buf[0], increment parser->tokens.
4162 (c_parser_consume_pragma): Likewise.
4163 (enum pragma_context): Add pragma_struct and pragma_param.
4164 (c_parser_external_declaration): Adjust
4165 c_parser_declaration_or_fndef caller.
4166 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4167 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4168 Adjust recursive call.
4169 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4170 of pragma_external.
4171 (c_parser_parameter_declaration): Use pragma_param instead of
4172 pragma_external.
4173 (c_parser_compound_statement_nostart, c_parser_label,
4174 c_parser_for_statement): Adjust
4175 c_parser_declaration_or_fndef callers.
4176 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4177 it through to c_parser_conditional_expression.
4178 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4179 pass it through to c_parser_binary_expression. Adjust recursive
4180 call.
4181 (c_parser_binary_expression): Remove prec argument, add
4182 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4183 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4184 binop matches it, use build2 instead of parser_build_binary_op.
4185 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4186 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4187 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4188 Handle pragma_struct and pragma_param the same as pragma_external.
4189 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4190 (c_parser_omp_variable_list): Parse array sections for
4191 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4192 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4193 (c_parser_omp_clause_reduction): Handle user defined reductions.
4194 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4195 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4196 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4197 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4198 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4199 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4200 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4201 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4202 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4203 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4204 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4205 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4206 (c_parser_omp_for_loop): Add CODE argument, pass it through
4207 to c_finish_omp_for. Change last argument to cclauses,
4208 and adjust uses to grab parallel clauses from the array of all
4209 the split clauses. Adjust c_parser_binary_expression,
4210 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4211 (omp_split_clauses): New function.
4212 (c_parser_omp_simd): New function.
4213 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4214 Allow the function to be called also when parsing combined constructs,
4215 and call c_parser_omp_simd when parsing for simd.
4216 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4217 #pragma omp section, require exactly one structured-block instead of
4218 sequence of statements.
4219 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4220 Allow the function to be called also when parsing combined constructs.
4221 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4222 Allow the function to be called also when parsing combined
4223 constructs.
4224 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4225 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4226 c_parser_omp_teams, c_parser_omp_target_data,
4227 c_parser_omp_target_update, c_parser_omp_target,
4228 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4229 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4230 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4231 (c_parser_omp_construct): Add p_name and mask vars. Handle
4232 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4233 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4234 and c_parser_omp_sections callers.
4235 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4236 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4237 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4238 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4239 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4240 OMP_CLAUSE_DEPEND.
4241 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4242 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4243 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4244 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4245 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4246 * c-typeck.c: Include tree-inline.h.
4247 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4248 handle_omp_array_sections_1, handle_omp_array_sections,
4249 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4250 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4251 user defined reductions.
4252 (c_tree_equal): New function.
4253 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4254 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4255 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4256 c_check_omp_declare_reduction_r): New prototypes.
4257 * c-decl.c (current_omp_declare_target_attribute): New variable.
4258 (c_decl_attributes): New function.
4259 (start_decl, start_function): Use it instead of decl_attributes.
4260 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4261 c_omp_reduction_decl, c_omp_reduction_lookup,
4262 c_check_omp_declare_reduction_r): New functions.
4263
0a6c2227
TT
42642013-09-25 Tom Tromey <tromey@redhat.com>
4265
4266 * Make-lang.in (c/gccspec.o): Remove.
4267 (CFLAGS-c/gccspec.o): New variable.
4268 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4269 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4270 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4271
f3bc55f0
TT
42722013-09-25 Tom Tromey <tromey@redhat.com>
4273
4274 * Make-lang.in (c/gccspec.o): Don't use subshell.
4275
a24d975c
MP
42762013-09-18 Marek Polacek <polacek@redhat.com>
4277
4278 PR sanitize/58443
4279 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4280 Remove unnecessary check.
4281
ce6923c5
MP
42822013-09-18 Marek Polacek <polacek@redhat.com>
4283
4284 PR sanitizer/58411
4285 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4286 no_sanitize_undefined attribute.
4287
a1e51df9
KT
42882013-09-13 Kai Tietz <ktietz@redhat.com>
4289
4290 PR target/57848
4291 * c-decl.c (c_builtin_function_ext_scope): Remove
4292 wrong assumption that it is never called on prexisting
4293 symbol.
4294
0af94e6f
JR
42952013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4296
4297 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4298
20059c8b
GDR
42992013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4300
4301 * c-objc-common.c (c_tree_printer): Tidy.
4302
de5a5fa1
MP
43032013-08-30 Marek Polacek <polacek@redhat.com>
4304
4305 * c-typeck.c (build_binary_op): Add division by zero and shift
4306 instrumentation.
4307
2531a1d9 43082013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4309 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4310
6e2bcc98 4311 PR c/35649
2531a1d9
JR
4312 * c-typeck.c (c_common_type): Prefer double_type_node over
4313 other REAL_TYPE types with the same precision.
4314 (convert_arguments): Likewise.
4315
025311c4
GDR
43162013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4317
4318 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4319 (c_initialize_diagnostics): Call a destructor for the early printer.
4320
da6ca2b5
GDR
43212013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4322
4323 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4324 printer initialization.
4325
318cda85 43262013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4327
318cda85
BI
4328 PR c/57490
4329 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4330 check for truth values.
4331 (expand_array_notation_exprs): Added truth values case. Removed an
4332 unwanted else. Added for-loop to walk through subtrees in default
4333 case.
4334
b066401f
GDR
43352013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4336
4337 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4338
fb48aadc
JM
43392013-07-23 Joseph Myers <joseph@codesourcery.com>
4340
4341 * c-parser.c (struct c_generic_association): Fix typo.
4342
433cc7b0
TT
43432013-07-23 Tom Tromey <tromey@redhat.com>
4344 Joseph Myers <joseph@codesourcery.com>
4345
4346 * c-parser.c (struct c_generic_association): New.
4347 (c_generic_association_d): New typedef.
4348 (c_parser_generic_selection): New function.
4349 (c_parser_postfix_expression): Handle RID_GENERIC.
4350
26d40c3d
JM
43512013-07-13 Jason Merrill <jason@redhat.com>
4352
4353 PR c++/57793
4354 * c-decl.c (finish_struct): Check for too-large class.
4355
ecdbd01a 43562013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4357
4358 PR c/57821
4359 * c-typeck.c (set_init_index): When folding, check for index overflow.
4360
1141ed3f
BI
43612013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4362
4363 * c-parser.c (c_parser_array_notation): Removed rejection of array
4364 notations in an array of function pointers.
4365
713b46fa
BI
43662013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4367
4368 * c-array-notation.c (make_triplet_val_inv): New function.
4369 (create_cmp_incr): Likewise.
4370 (create_array_refs): Likewise.
4371 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4372 Also modularized common parts between functions and called the function.
4373 (build_array_notation_expr): Likewise.
4374 (fix_conditional_array_notations_1): Likewise.
4375 (fix_array_notation_expr): Likewise.
4376 (fix_array_notation_call_expr): Likewise.
4377
92f20202
MP
43782013-06-18 Marek Polacek <polacek@redhat.com>
4379
4380 PR c/57630
4381 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4382
73a23b06
BI
43832013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4384
4385 * c-array-notation.c (build_array_notation_expr): Reject array notation
4386 mismatch between LHS and RHS even inside a call_expr. Also, removed
4387 a couple while statements that were dead code.
4388
00b8517d
BI
43892013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4390
4391 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4392 excessive precision expressions in function parameters. Also removed
4393 couple unwanted while statements.
4394
1509bdda
BI
43952013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4396
4397 * c-array-notation.c (expand_array_notation_exprs): Added
4398 ARRAY_NOTATION_REF case.
4399
d60f1706
BI
44002013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4401
4402 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4403 function to c-family/array-notation-common.c.
4404 (is_cilkplus_reduce_builtin): Likewise.
4405 (find_rank): Likewise.
4406 (extract_array_notation_exprs): Likewise.
4407 (replace_array_notations): Likewise.
4408 (find_inv_trees): Likewise.
4409 (replace_inv_trees): Likewise.
4410 (contains_array_notation_expr): Likewise.
4411 (find_correct_array_notation_type): Likewise.
4412 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4413 (struct inv_list): Moved this to c-family/array-notation-common.c.
4414 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4415
6d6efbb3
BI
44162013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4417
4418 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4419 reduction functions outside the for-loop. Added a check if the fundecl
4420 is non-NULL. Finally, removed an unwanted if-statement, and made the
4421 body unconditional.
4422
25c22937
BI
44232013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4424
4425 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4426 condition of the if-statement matches the rank of else-block and then-
4427 block when array notations are used.
4428 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4429 expression after the entire function body is parsed.
4430 (c_parser_expr_no_commas): Delayed creating array notation expressions
4431 to the end of function parsing.
4432 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4433 whole if-statement instead of just the condition.
4434 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4435
edd25645
BI
44362013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4437
4438 PR c/57474
4439 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4440 array to NULL_TREE if they are unused. Also added a check for the
4441 field to be NULL before its fields are used in future.
4442
065ce7f1
RO
44432013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4444
4445 PR bootstrap/57450
4446 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4447 (build_array_notation_expr): Likewise.
4448
36536d79
BI
44492013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4450
4451 * c-typeck.c (build_array_ref): Added a check to see if array's
4452 index is greater than one. If true, then emit an error.
4453 (build_function_call_vec): Exclude error reporting and checking
4454 for builtin array-notation functions.
4455 (convert_arguments): Likewise.
4456 (c_finish_return): Added a check for array notations as a return
4457 expression. If true, then emit an error.
4458 (c_finish_loop): Added a check for array notations in a loop
4459 condition. If true then emit an error.
4460 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4461 (build_binary_op): Added a check for array notation expr inside
4462 op1 and op0. If present, we call another function to find correct
4463 type.
4464 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4465 * c-parser.c (c_parser_compound_statement): Check if array
4466 notation code is used in tree, if so, then transform them into
4467 appropriate C code.
4468 (c_parser_expr_no_commas): Check if array notation is used in LHS
4469 or RHS, if so, then build array notation expression instead of
4470 regular modify.
4471 (c_parser_postfix_expression_after_primary): Added a check for
4472 colon(s) after square braces, if so then handle it like an array
4473 notation. Also, break up array notations in unary op if found.
4474 (c_parser_direct_declarator_inner): Added a check for array
4475 notation.
4476 (c_parser_compound_statement): Added a check for array notation in
4477 a stmt. If one is present, then expand array notation expr.
4478 (c_parser_if_statement): Likewise.
4479 (c_parser_switch_statement): Added a check for array notations in
4480 a switch statement's condition. If true, then output an error.
4481 (c_parser_while_statement): Similarly, but for a while.
4482 (c_parser_do_statement): Similarly, but for a do-while.
4483 (c_parser_for_statement): Similarly, but for a for-loop.
4484 (c_parser_unary_expression): Check if array notation is used in a
4485 pre-increment or pre-decrement expression. If true, then expand
4486 them.
4487 (c_parser_array_notation): New function.
4488 * c-array-notation.c: New file.
4489 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4490
cd192ccc
MS
44912013-05-23 Mike Stump <mikestump@comcast.net>
4492
4493 * c-typeck.c (convert_for_assignment): Handle references to memory
4494 spaces better.
4495
427b248d
JM
44962013-05-16 Jason Merrill <jason@redhat.com>
4497
4498 * Make-lang.in (cc1$(exeext)): Use link mutex.
4499
44d90fe1
PC
45002013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4501
4502 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4503 to simply use OPT_Wpointer_arith.
4504 (build_unary_op): Likewise.
4505
4e7d7b3d
JJ
45062013-04-03 Jakub Jelinek <jakub@redhat.com>
4507
4508 PR c/19449
4509 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4510 argument. If set, or it temporarily for parsing of the first
4511 argument into force_folding_builtin_constant_p.
4512 (c_parser_postfix_expression): Adjust callers.
4513
839b422f
RB
45142013-03-21 Richard Biener <rguenther@suse.de>
4515
4516 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4517 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4518
2ee028f1
MP
45192013-02-12 Marek Polacek <polacek@redhat.com>
4520
4521 PR c/44938
4522 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4523 origtypes to NULL.
4524
8824edff
JJ
45252013-01-24 Jakub Jelinek <jakub@redhat.com>
4526
4527 PR c/56078
4528 * c-typeck.c (set_nonincremental_init_from_string): If
4529 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4530 returned false.
4531 (process_init_element): Likewise.
4532
eadd3d0d
JJ
45332012-12-20 Jakub Jelinek <jakub@redhat.com>
4534
4535 PR c++/55619
4536 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4537 argument, don't call default_function_array_conversion
4538 nor c_fully_fold here.
4539 (c_parser_asm_statement): Adjust callers.
4540 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4541 and outputs here, and call default_function_array_conversion
4542 on inputs that don't need to be addressable.
4543
f8a93a2e
JJ
45442012-12-18 Jakub Jelinek <jakub@redhat.com>
4545
4546 PR c/39464
4547 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4548 warning require that both c_common_unsigned_type as well as
4549 c_common_signed_type is the same for both mvl and mvr types.
4550
9771b263
DN
45512012-11-16 Diego Novillo <dnovillo@google.com>
4552
4553 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4554
4555 * c-common.c: Use new vec API in vec.h.
4556 * c-common.h: Likewise.
4557 * c-gimplify.c: Likewise.
4558 * c-pragma.c: Likewise.
4559 * c-pretty-print.c: Likewise.
4560 * c-pretty-print.h: Likewise.
4561 * c-semantics.c: Likewise.
4562 * c-decl.c: Likewise.
4563 * c-parser.c: Likewise.
4564 * c-tree.h: Likewise.
4565 * c-typeck.c: Likewise.
4566
880661a4
JW
45672012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4568
4569 PR c++/54930
4570 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4571
077d1abe
MLI
45722012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4573
4574 PR c/53066
4575 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4576 shadows a function, unless the variable is a function or a
4577 pointer-to-function.
4578
3a785c97
JJ
45792012-10-12 Jakub Jelinek <jakub@redhat.com>
4580
4581 PR c/54381
4582 * c-parser.c (struct c_tree_loc_pair): Removed.
4583 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4584 add location_t * and tree * arguments, fill in array of 3
4585 sizeof_arg trees and corresponding locs.
4586 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4587 c_parser_expr_list callers.
4588 (c_parser_postfix_expression_after_primary): Likewise. Pass
4589 array of 3 sizeof_arg trees and locs (corresponding to first
4590 3 arguments) to sizeof_pointer_memaccess_warning.
4591
703c8606
LC
45922012-10-09 Lawrence Crowl <crowl@google.com>
4593
4594 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4595 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4596 hash table.
4597
5d9de0d0
PC
45982012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4599
4600 PR c++/54194
4601 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4602 call.
4603
a212e43f
MG
46042012-10-09 Marc Glisse <marc.glisse@inria.fr>
4605
4606 PR c++/54427
4607 * c-typeck.c: Include c-common.h.
4608 (enum stv_conv): Moved to c-common.h.
4609 (scalar_to_vector): Moved to c-common.c.
4610 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4611 * Make-lang.in: c-typeck.c depends on c-common.h.
4612
3b78de56
AC
46132012-10-04 Arnaud Charlet <charlet@adacore.com>
4614
4615 * c-decl.c (c_write_global_declarations): Fix handling of
4616 -fdump-ada-spec*.
4617
78c60e3d
SS
46182012-09-30 Sharad Singhai <singhai@google.com>
4619
4620 * c-decl.c (c_write_global_declarations): Use a different method
4621 to determine if the dump has ben initialized.
4622
9f33203d
JM
46232012-09-14 Joseph Myers <joseph@codesourcery.com>
4624
4625 PR c/54552
4626 * c-typeck.c (c_cast_expr): When casting to a type requiring
4627 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4628 c_fully_fold first.
4629
a27d595d
JM
46302012-09-14 Joseph Myers <joseph@codesourcery.com>
4631
4632 PR c/54103
4633 * c-typeck.c (build_unary_op): Pass original argument of
4634 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4635 any C_MAYBE_CONST_EXPR, if it has integer operands.
4636 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4637 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4638 to c_objc_common_truthvalue_conversion, then remove any
4639 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4640 c_objc_common_truthvalue_conversion not
4641 c_common_truthvalue_conversion.
4642 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4643 call note_integer_operands for arguments with integer operands
4644 that are not integer constants.
4645
9feb29df
JJ
46462012-09-13 Jakub Jelinek <jakub@redhat.com>
4647
4648 PR c/54559
4649 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4650 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4651
d409320c
JJ
46522012-08-31 Jakub Jelinek <jakub@redhat.com>
4653
4654 PR c/54428
4655 * c-convert.c (convert): Don't call fold_convert_loc if
4656 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4657 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4658 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4659
6265d07c
JJ
46602012-08-24 Jakub Jelinek <jakub@redhat.com>
4661
4662 PR c/54355
4663 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4664 for nested and empty_ok arguments in the call to
4665 c_parser_declaration_or_fndef.
4666
1a4049e7
JJ
46672012-08-17 Jakub Jelinek <jakub@redhat.com>
4668
4669 * c-tree.h (c_last_sizeof_arg): Declare.
4670 * c-parser.c (struct c_tree_loc_pair): New type.
4671 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4672 non-NULL.
4673 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4674 (c_parser_postfix_expression_after_primary): Likewise. Call
4675 sizeof_pointer_memaccess_warning if needed.
4676 (sizeof_ptr_memacc_comptypes): New function.
4677 * c-typeck.c (c_last_sizeof_arg): New global variable.
4678 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4679
0229aee9
UB
46802012-07-24 Uros Bizjak <ubizjak@gmail.com>
4681
4682 * c-lang.h (lang_decl): Add variable_size GTY option.
4683
7ee2468b
SB
46842012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4685
4686 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4687 * Make-lang.in: Fix dependencies.
4688
d4a10d0a
SB
46892012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4690
4691 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4692 and add language Makefile hooks.
4693 * config-lang.in: New file.
4694 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4695 add the required "normal" config-lang.in rules.
4696 * c-lang.h: Moved from gcc/ to here.
4697 * c-tree.h: Likewise.
4698 * c-objc-common.c: Likewise.
4699 * c-objc-common.h: Likewise.
4700 * c-typeck.c: Likewise.
4701 * c-convert.c: Likewise.
4702 * c-lang.c: Likewise.
4703 * c-aux-info.c: Likewise.
4704 * c-errors.c: Likewise.
4705 * gccspec.c: Likewise.
4706 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4707 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4708\f
cbe34bb5 4709Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4710
4711Copying and distribution of this file, with or without modification,
4712are permitted in any medium without royalty provided the copyright
4713notice and this notice are preserved.