]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
options.c (set_dec_flags): Only set legacy standards when value is not zero.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
30af3a2b
MP
12017-08-09 Marek Polacek <polacek@redhat.com>
2
3 * c-decl.c (build_enumerator): Use true/false instead of 1/0.
4 * c-tree.h (build_external_ref): Update declaration.
5 * c-typeck.c (build_array_ref): Use true/false instead of 1/0.
6 (build_external_ref): Change the type of a parameter to bool.
7 (parser_build_binary_op): Use true/false instead of 1/0.
8 (pointer_diff): Likewise.
9 (build_modify_expr): Likewise.
10 (set_designator): Change the type of a parameter to bool.
11 (set_init_index): Use true/false instead of 1/0.
12 (set_init_label): Likewise.
13 (output_init_element): Change the type of a parameter to bool.
14 (output_pending_init_elements): Use true/false instead of 1/0.
15 (process_init_element): Likewise.
16 (build_binary_op): Change the type of a parameter to bool.
17
296c53ac
MP
182017-08-09 Marek Polacek <polacek@redhat.com>
19
20 PR c/81233
21 * c-typeck.c (pedwarn_init): Make the function take a variable list.
22 Call emit_diagnostic_valist instead of pedwarn.
23 (convert_for_assignment): Unroll the PEDWARN_FOR_ASSIGNMENT macro.
24 Print the relevant types in diagnostics.
25
a32c8316
MP
262017-08-09 Marek Polacek <polacek@redhat.com>
27
28 PR c/81417
29 * c-array-notation.c (fix_builtin_array_notation_fn): Update calls to
30 build_conditional_expr.
31 * c-parser.c (c_parser_conditional_expression): Create locations for
32 EXP1 and EXP2 from their source ranges. Pass the locations down to
33 build_conditional_expr.
34 * c-tree.h (build_conditional_expr): Update declaration.
35 * c-typeck.c (build_conditional_expr): Add location_t parameters.
36 For -Wsign-compare, also print the types.
37
314e6352
ML
382017-08-08 Martin Liska <mliska@suse.cz>
39
40 * c-convert.c: Include header files.
41 * c-typeck.c: Likewise.
42
577eec56
ML
432017-08-07 Martin Liska <mliska@suse.cz>
44
45 * c-parser.c (c_parser_attributes): Canonicalize name of an
46 attribute.
47
f7b6353a
MP
482017-08-02 Marek Polacek <polacek@redhat.com>
49
50 PR c/81289
51 * c-parser.c (c_parser_unary_expression): Use set_error.
52
8a6eab34
MP
53 PR c/81448
54 PR c/81306
55 * c-warn.c (warn_for_multistatement_macros): Prevent bogus
56 warnings. Avoid walking MACRO_MAP_LOCATIONS.
57
7fef86d3
JH
582017-07-31 Jan Hubicka <hubicka@ucw.cz>
59 Martin Liska <mliska@suse.cz>
60
61 * c-typeck.c (c_finish_goto_label): Build gimple predict
f7b6353a 62 statement.
7fef86d3 63
f34ebeb2
ML
642017-07-31 Martin Liska <mliska@suse.cz>
65
66 PR sanitize/81530
67 * c-convert.c (convert): Guard condition with flag_sanitize_p
68 also with current_function_decl non-null equality.
69 * c-decl.c (grokdeclarator): Likewise.
70 * c-typeck.c (build_binary_op): Likewise.
71
8595f67b
MP
722017-07-25 Marek Polacek <polacek@redhat.com>
73
74 * c-decl.c (grokfield): Remove local variable.
75
d49718d6
MP
762017-07-25 Marek Polacek <polacek@redhat.com>
77
78 PR c/81364
79 * c-parser.c (c_parser_else_body): Don't warn about multistatement
80 macro expansion if the body is in { }.
81 (c_parser_while_statement): Likewise.
82 (c_parser_for_statement): Likewise.
83
ff22eb12
NS
842017-07-18 Nathan Sidwell <nathan@acm.org>
85
86 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
87
eea77d1f
DM
882017-07-14 David Malcolm <dmalcolm@redhat.com>
89
90 * c-decl.c (implicitly_declare): When suggesting a missing
91 #include, provide a fix-it hint.
92
b6f43128
DM
932017-07-06 David Malcolm <dmalcolm@redhat.com>
94
95 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
96 and call that instead.
97 * c-tree.h (selftest::run_c_tests): New decl.
98
3e2becc4
MP
992017-06-26 Marek Polacek <polacek@redhat.com>
100
101 PR c/80116
102 * c-parser.c (c_parser_if_body): Set the location of the
103 body of the conditional after parsing all the labels. Call
104 warn_for_multistatement_macros.
105 (c_parser_else_body): Likewise.
106 (c_parser_switch_statement): Likewise.
107 (c_parser_while_statement): Likewise.
108 (c_parser_for_statement): Likewise.
109 (c_parser_statement): Add a default argument. Save the location
110 after labels have been parsed.
111 (c_parser_c99_block_statement): Likewise.
112
343ae898
RB
1132017-06-19 Richard Biener <rguenther@suse.de>
114
115 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
116 negated _Literals to parse _Literal (int) -1.
117
45b2222a
ML
1182017-06-13 Martin Liska <mliska@suse.cz>
119
120 PR sanitize/78204
121 * c-convert.c (convert): Use sanitize_flags_p.
122 * c-decl.c (grokdeclarator): Likewise.
123 * c-typeck.c (convert_for_assignment): Likewise.
124 (c_finish_return): Likewise.
125 (build_binary_op): Likewise.
126
8ab7005b
JJ
1272017-06-08 Jakub Jelinek <jakub@redhat.com>
128
129 PR c/81006
130 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
131 to sizetype before size_binop.
132
363dc72c
JJ
1332017-06-07 Jakub Jelinek <jakub@redhat.com>
134
135 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
136 of TDI_generic.
137
dc949728
MP
1382017-06-06 Marek Polacek <polacek@redhat.com>
139
140 PR c/79983
141 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
142 ref.
143 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
144
40ffd95f
BE
1452017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
146
147 * c-parser.c (c_parser_binary_expression): Implement the
148 -Wsizeof_pointer_div warning.
149 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
150 from a parenthesized expression.
151 (c_parser_expr_list): Use c_last_sizeof_loc.
152 * c-tree.h (c_last_sizeof_loc): New external.
153 * c-typeck.c (c_last_sizeof_loc): New variable.
154 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
155
9fc5e7a4
MM
1562017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
157
158 PR testsuite/80580
159 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
160
f012c8ef
DM
1612017-05-30 David Malcolm <dmalcolm@redhat.com>
162
163 * c-objc-common.c (c_tree_printer): Gain bool and const char **
164 parameters.
165
3cd211af
MS
1662017-05-24 Martin Sebor <msebor@redhat.com>
167
168 PR c/80731
169 * c-fold.c (c_fully_fold_internal): Adjust.
170 * c-typeck.c (parser_build_unary_op): Adjust.
171
fd71a9a2
TS
1722017-05-23 Thomas Schwinge <thomas@codesourcery.com>
173
174 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
175 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
176 "VECTOR_LENGTH".
177
92fa0f9e
MP
1782017-05-23 Marek Polacek <polacek@redhat.com>
179
180 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
181 quotes.
182
d11c168a
JJ
1832017-05-22 Jakub Jelinek <jakub@redhat.com>
184
185 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
186 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
187 it returned invariant. Call tree_invariant_p unconditionally
188 afterwards to decide whether to return expr or op0.
189
58aca9d9
NS
1902017-05-22 Nathan Sidwell <nathan@acm.org>
191
192 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
193
7fd549d2
TS
1942017-05-19 Thomas Schwinge <thomas@codesourcery.com>
195
196 * c-parser.c (c_parser_omp_clause_default): Handle
197 "OMP_CLAUSE_DEFAULT_PRESENT".
198
6ecd2339
BE
1992017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
200
201 * config-lang.in (gtfiles): Add c-family/c-format.c.
202
8a57ecff
NS
2032017-05-18 Nathan Sidwell <nathan@acm.org>
204
205 * c-decl.c (pushdecl_top_level): Delete unused function.
206
6574d78e
MP
2072017-05-18 Marek Polacek <polacek@redhat.com>
208
209 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
210 (check_earlier_gotos): Likewise.
211 (define_label): Likewise.
212 (pending_xref_error): Likewise.
213 (smallest_type_quals_location): Likewise.
214 (grokdeclarator): Likewise.
215 (grokparms): Likewise.
216 (identifier_global_value): Likewise.
217 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
218 (find_init_member): Likewise.
219
e3455240
MP
2202017-05-18 Marek Polacek <polacek@redhat.com>
221
222 * c-decl.c (start_decl): Use false/true instead of 0/1.
223 (grokdeclarator): Likewise.
224 (finish_struct): Likewise.
225 (start_function): Change the return type to bool. Use false/true
226 instead of 0/1.
227 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
228 * c-tree.h (start_function): Update.
229 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
230 (set_designator): Change the return type to bool. Use false/true
231 instead of 0/1.
232
3fa8871b
MP
2332017-05-17 Marek Polacek <polacek@redhat.com>
234
235 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
236 * c-typeck.c: Likewise.
237
142473df
MP
2382017-05-17 Marek Polacek <polacek@redhat.com>
239
240 PR sanitizer/80659
241 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
242 DECL_IGNORED_P even for non-static compound literals.
243
1a817418
ML
2442017-05-17 Martin Liska <mliska@suse.cz>
245
246 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
247 use it instead of int type.
248
b2fa0a8b
MP
2492017-05-17 Marek Polacek <polacek@redhat.com>
250
251 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
252 call c_fully_fold.
253 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
254 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
255 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
256 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
257 save_expr.
258 (c_parser_conditional_expression): Likewise.
259 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
260 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
261 (process_init_element): Likewise.
262 (build_binary_op): Likewise.
263 (handle_omp_array_sections_1): Likewise.
264
1e47f02b
TS
2652017-05-12 Thomas Schwinge <thomas@codesourcery.com>
266
267 * c-parser.c (c_parser_omp_clause_num_gangs)
268 (c_parser_omp_clause_num_workers)
269 (c_parser_omp_clause_vector_length): Merge functions into...
270 (c_parser_oacc_single_int_clause): ... this new function. Adjust
271 all users.
272
c24e924f
NS
2732017-05-11 Nathan Sidwell <nathan@acm.org>
274
275 * gimple-parser.c: Don't #include tree-dump.h.
276
c587104e
MM
2772017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
278
279 PR testsuite/80580
280 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
281
67ac9a9d
MM
2822017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
283
284 PR testsuite/80580
285 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
286 incorrect __MEM syntax.
287
ac4eb40f
MM
2882017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
289
290 PR testsuite/80580
291 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
292 type of unary '*'.
293
641da50a
NS
2942017-05-09 Nathan Sidwell <nathan@acm.org>
295
296 * c-tree.h (pushdecl): Declare.
297
56d35585
DM
2982017-05-05 David Malcolm <dmalcolm@redhat.com>
299
300 * c-decl.c (warn_defaults_to): Replace report_diagnostic
301 with diagnostic_report_diagnostic.
302 * c-errors.c (pedwarn_c99): Likewise.
303 (pedwarn_c90): Likewise.
304
815d9cc6
XR
3052017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
306
307 PR c++/80038
308 * c-gimplify.c (c_gimplify_expr): Remove calls to
309 cilk_gimplifY_call_params_in_spawned_fn.
310
1c4ea66f
DM
3112017-04-25 David Malcolm <dmalcolm@redhat.com>
312
313 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
314 hint for removing extra semicolon.
315
666f7903
JJ
3162017-04-21 Jakub Jelinek <jakub@redhat.com>
317
318 PR c/80468
319 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
320 enabled, set specs->type to integer_type_node.
321
5764ee3c
JW
3222017-04-03 Jonathan Wakely <jwakely@redhat.com>
323
324 * c-array-notation.c: Fix typo in comment.
325
10fa8dfb
MP
3262017-03-29 Marek Polacek <polacek@redhat.com>
327
328 PR c/79730
329 * c-decl.c (finish_decl): Check VAR_P.
330
a9e4a1a5
JJ
3312017-03-27 Jakub Jelinek <jakub@redhat.com>
332
333 PR middle-end/80162
334 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
335 * c-typeck.c (c_mark_addressable): Likewise. Look through
336 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
337 to ARRAY_TYPE.
338 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
339
ee3ff394
MP
3402017-03-23 Marek Polacek <polacek@redhat.com>
341
342 * c-tree.h: Remove a C_RID_YYCODE reference.
343
4d1b8e70
JJ
3442017-03-21 Jakub Jelinek <jakub@redhat.com>
345
346 PR c/80097
347 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
348 optional COMPOUND_EXPR with ubsan instrumentation.
349
31dc71a8
MP
3502017-03-17 Marek Polacek <polacek@redhat.com>
351
352 * c-parser.c: Add C11 references.
353
d579c385
MP
3542017-03-15 Marek Polacek <polacek@redhat.com>
355
356 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
357
85059a38
MP
3582017-03-11 Marek Polacek <polacek@redhat.com>
359
360 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
361
2f6f187a
DM
3622017-03-10 David Malcolm <dmalcolm@redhat.com>
363
364 PR translation/79848
365 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
366 "%qs".
367 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
368
36618428
MP
3692017-03-09 Marek Polacek <polacek@redhat.com>
370
371 PR sanitizer/79757
372 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
373 parameter declarations with initializers.
374
01e5af5a
JJ
3752017-03-09 Jakub Jelinek <jakub@redhat.com>
376
377 PR c/79969
378 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
379 TYPE_STUB_DECL.
380
a71dbc63
JJ
3812017-03-07 Jakub Jelinek <jakub@redhat.com>
382
383 PR c/79834
384 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
385 for "may only be used in compound statements" diagnostics, change it
386 such that the same translatable string is used for all pragmas. For
387 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
388 diagnostics.
389 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
390 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
391 "may only be used in compound statements" diagnostics, such that the
392 same translatable string is used for all pragmas.
393
1ff4bae6
MP
3942017-03-04 Marek Polacek <polacek@redhat.com>
395
396 PR c/79847
397 * c-decl.c (implicit_decl_warning): Add missing space.
398
7f5a7d78
MP
3992017-03-03 Marek Polacek <polacek@redhat.com>
400
401 PR c/79758
402 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
403 current_function_prototype_arg_types is error_mark_node. Fix
404 formatting. Use TREE_VALUE instead of TREE_TYPE.
405
883c8f06
JJ
4062017-03-03 Jakub Jelinek <jakub@redhat.com>
407
79c9b7a8
JJ
408 PR c/79837
409 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
410 %<min%> or %<max%> in the diagnostics, instead mention identifier.
411 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
412 diagnostics.
413
883c8f06
JJ
414 PR c/79836
415 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
416 instead of %<_Generic>.
417 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
418 (c_parser_omp_target_exit_data): Use %<release%> instead of
419 %<release>.
420
324ff1a0
JJ
4212017-02-28 Jakub Jelinek <jakub@redhat.com>
422
423 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
424 instead of just cond ? "..." : "...".
425 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
426 for "enter"/"exit" keyword.
427 (c_finish_oacc_routine): Don't use %s to supply portions of the
428 message.
429
4227c9ad
JJ
4302017-02-24 Jakub Jelinek <jakub@redhat.com>
431
432 PR c++/79588
433 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
434 handle -Wrestrict here.
435 * c-typeck.c (build_function_call_vec): Adjust
436 check_function_arguments caller.
437
5d972e66
RB
4382017-02-23 Richard Biener <rguenther@suse.de>
439
440 PR c/79684
441 * gimple-parser.c (c_parser_gimple_statement): Use set_error
442 to initialize c_exprs to return.
443 (c_parser_gimple_binary_expression): Likewise.
444 (c_parser_gimple_unary_expression): Likewise.
445 (c_parser_gimple_postfix_expression): Likewise.
446
61ac5ebe
MP
4472017-02-22 Marek Polacek <polacek@redhat.com>
448
449 PR c/79662
450 * c-typeck.c (convert_arguments): Handle error_mark_node.
451
41d1b0b1
PK
4522017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
453
454 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
455 value of c_parser_parse_ssa_name against error_mark_node and emit
456 error if ssa name is anonymous and written as default definition.
457
eab1f169
PK
4582017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
459
460 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
461 FMA_EXPR.
462
bcac0b4d
JJ
4632017-02-16 Jakub Jelinek <jakub@redhat.com>
464
465 PR c++/79512
466 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
467 ignore #pragma omp target even when not followed by identifier.
468
1be33173
PK
4692017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
470
471 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
472 (c_parser_gimple_unary_expression): Likewise.
473
aa326bfb
JJ
4742017-02-13 Jakub Jelinek <jakub@redhat.com>
475
476 * c-parser.c (c_parser_oacc_declare): Add missing space in
477 diagnostics.
478
8a398bc5
PK
4792017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
480
481 PR c/79478
482 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
483 set_c_expr_source_range when parsing ssa-name.
484
3dcde5ef
PG
4852017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
486 Richard Biener <rguenther@suse.de>
487
488 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
489 building IL when arguments are error_mark_node.
490 (c_parser_gimple_unary_expression): Likewise.
491 (c_parser_gimple_if_stmt): Likewise.
492 (c_parser_gimple_switch_stmt): Likewise.
493 (c_parser_gimple_return_stmt): Likewise.
494 (c_parser_parse_ssa_name): When name lookup fails do not build
495 an SSA name. Use undeclared rather than not declared in error
496 reporting.
497
192b048b
MP
4982017-02-09 Marek Polacek <polacek@redhat.com>
499
500 PR c/79428
501 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
502 instead of c_parser_skip_until_found.
503
56f71478
JJ
5042017-02-09 Jakub Jelinek <jakub@redhat.com>
505
506 PR c/79431
507 * c-parser.c (c_parser_omp_declare_target): Don't invoke
508 symtab_node::get on automatic variables.
509
02889d23
CLT
5102016-02-09 Nathan Sidwell <nathan@codesourcery.com>
511 Chung-Lin Tang <cltang@codesourcery.com>
512
513 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
514 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
515 semantic checking.
516 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
517
7af4b20d
RB
5182017-02-07 Richard Biener <rguenther@suse.de>
519
520 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
521 (c_parser_gimple_postfix_expression_after_primary):
522 Do not use c_build_function_call_vec to avoid folding and promotion.
523 Simplify.
524
e5e391d6
MO
5252017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
526
527 PR lto/79061
528 * c-decl.c (pop_scope): Pass main_input_filename to
529 build_translation_unit_decl.
530
c2e84327
DM
5312017-01-24 David Malcolm <dmalcolm@redhat.com>
532
533 * c-parser.c: Include "read-rtl-function.h" and
534 "run-rtl-passes.h".
535 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
536 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
537 production. Update for renaming of field "gimple_pass" to
538 "gimple_or_rtl_pass". If __RTL was seen, call
539 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
540 to an auto_timevar, to cope with early exit.
541 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
542 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
543 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
544 Handle RID_RTL.
545 (c_parser_parse_rtl_body): New function.
546 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
547 (struct c_declspecs): Rename field "gimple_pass" to
548 "gimple_or_rtl_pass". Add field "rtl_p".
549 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
550 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
551 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
552 (c_parser_gimple_or_rtl_pass_list): ...this.
553
2ebd93e1
MP
5542017-01-20 Marek Polacek <polacek@redhat.com>
555
556 PR c/64279
557 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
558
b1c95bb5
RB
5592017-01-13 Richard Biener <rguenther@suse.de>
560
561 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
562 nops.
563
25329913
RB
5642017-01-13 Richard Biener <rguenther@suse.de>
565
566 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
567 _Literal ( type-name ) number.
568
6bb4ea5c
RB
5692017-01-12 Richard Biener <rguenther@suse.de>
570
571 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
572 __MEM.
573
6b5b4e9c
JJ
5742017-01-11 Jakub Jelinek <jakub@redhat.com>
575
576 PR c++/72813
577 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
578 PCH file.
579
e3252775
RB
5802017-01-11 Richard Biener <rguenther@suse.de>
581
582 PR bootstrap/79052
583 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
584 returns on parse errors.
585
a9342885
MP
5862017-01-04 Marek Polacek <polacek@redhat.com>
587
588 PR c++/64767
589 * c-parser.c (c_parser_postfix_expression): Mark zero character
590 constants by setting original_type in c_expr.
591 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
592 with a zero character constant.
593 (char_type_p): New function.
594
5dd9a9d0
DM
5952017-01-04 David Malcolm <dmalcolm@redhat.com>
596
597 * c-parser.c (c_parser_declaration_or_fndef): Create a
598 rich_location at init_loc and parse it to start_init.
599 (last_init_list_comma): New global.
600 (c_parser_braced_init): Update last_init_list_comma when parsing
601 commas. Pass it to pop_init_level. Pass location of closing
602 brace to pop_init_level.
603 (c_parser_postfix_expression_after_paren_type): Create a
604 rich_location at type_loc and parse it to start_init.
605 (c_parser_omp_declare_reduction): Likewise for loc.
606 * c-tree.h (start_init): Add rich_location * param.
607 (pop_init_level): Add location_t param.
608 * c-typeck.c (struct initializer_stack): Add field
609 "missing_brace_richloc".
610 (start_init): Add richloc param, use it to initialize
611 the stack node's missing_brace_richloc.
612 (last_init_list_comma): New decl.
613 (finish_implicit_inits): Pass last_init_list_comma to
614 pop_init_level.
615 (push_init_level): When finding missing open braces, add fix-it
616 hints to the richloc.
617 (pop_init_level): Add "insert_before" param and pass it
618 when calling pop_init_level. Add fixits about missing
619 close braces to any richloc. Use the richloc for the
620 -Wmissing-braces warning.
621 (set_designator): Pass last_init_list_comma to pop_init_level.
622 (process_init_element): Likewise.
623
cbe34bb5
JJ
6242017-01-01 Jakub Jelinek <jakub@redhat.com>
625
626 Update copyright years.
627
d17680f3
JJ
6282016-12-21 Jakub Jelinek <jakub@redhat.com>
629
0dba7960
JJ
630 PR bootstrap/78817
631 * c-typeck.c (build_function_call_vec): If check_function_arguments
632 returns true, set TREE_NO_WARNING on CALL_EXPR.
633
d17680f3
JJ
634 PR c/77767
635 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
636 to *expr instead of overwriting it.
637
aa90531e
RB
6382016-12-20 Richard Biener <rguenther@suse.de>
639
640 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
641 error recovery.
642 (c_parser_gimple_statement): Only build assigns for non-error
643 stmts.
644 (c_parser_gimple_postfix_expression_after): Improve error recovery.
645
629b3d75
MJ
6462016-12-14 Martin Jambor <mjambor@suse.cz>
647
648 * c-parser.c: Include omp-general.h and omp-offload.h instead of
649 omp-low.h.
650 (c_finish_oacc_routine): Adjusted call to
651 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
652 to use their new names.
653 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
654 use its new name.
655 (c_parser_oacc_update): Likewise.
656 (c_parser_omp_simd): Likewise.
657 (c_parser_omp_target_update): Likewise.
658 * c-typeck.c: Include omp-general.h instead of omp-low.h.
659 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
660 name.
661 (c_finish_omp_cancellation_point): Likewise.
662 * gimple-parser.c: Do not include omp-low.h
663
c5af52eb
CP
6642016-12-02 Cesar Philippidis <cesar@codesourcery.com>
665 James Norris <jnorris@codesourcery.com>
666
667 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
668 EXIT_DATA,WAIT} are not used in compound statements.
669 (c_parser_oacc_enter_exit_data): Update diagnostics.
670
48330c93
BE
6712016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
672
673 PR c++/71973
674 * c-decl.c (diagnose_mismatched_decls): Use
675 OPT_Wbuiltin_declaration_mismatch here too.
676
899ca90e 6772016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
678 Alan Hayward <alan.hayward@arm.com>
679 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
680
681 * c-decl.c (merge_decls): Use SET_DECL_MODE.
682 (make_label, finish_struct): Likewise.
683
1ee62b92 6842016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 685 Richard Biener <rguenther@suse.de>
22b15758 686
8e745a17
JJ
687 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
688 * config-lang.in (gtfiles): Add c/c-parser.h.
689 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
690 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
691 * c-parser.c (enum c_id_kind, struct c_token,
692 c_parser_next_token_is, c_parser_next_token_is_not,
693 c_parser_next_token_is_keyword,
694 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
695 Split out to ...
696 * c-parser.h: ... new header.
697 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 698 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
699 c_token_starts_typename, c_parser_next_token_starts_declspecs,
700 c_parser_next_tokens_start_declaration, c_parser_consume_token,
701 c_parser_error, c_parser_require, c_parser_skip_until_found,
702 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
703 c_parser_type_name): Export.
704 (c_parser_tokens_buf): New function.
705 (c_parser_error): Likewise.
706 (c_parser_set_error): Likewise.
707 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
708 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
709 via c_parser_parse_gimple_body.
8e745a17
JJ
710 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
711 c_token_starts_typename, c_parser_next_token_starts_declspecs,
712 c_parser_next_tokens_start_declaration, c_parser_consume_token,
713 c_parser_error, c_parser_require, c_parser_skip_until_found,
714 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
715 c_parser_type_name): Declare.
1ee62b92
PG
716 (struct c_parser): Declare forward.
717 (c_parser_tokens_buf): Declare.
8e745a17
JJ
718 (c_parser_error): Likewise.
719 (c_parser_set_error): Likewise.
720 * gimple-parser.c: New file.
721 * gimple-parser.h: Likewise.
1ee62b92 722
22b15758
UB
7232016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
724
725 PR c/35503
726 * c-parser.c (c_parser_postfix_expression_after_primary): Call
727 warn_for_restrict.
728
84ff4775
LCW
7292016-09-11 Le-Chun Wu <lcwu@google.com>
730 Mark Wielaard <mjw@redhat.com>
731
732 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
733 to the given -Wshadow= variant.
734
4d0cdd0c
TP
7352016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
736
737 * c-typeck.c: Include memmodel.h.
738
1202f33e
JJ
7392016-10-13 Jakub Jelinek <jakub@redhat.com>
740
741 PR target/77957
742 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
743 instead of lhd_return_null_tree_v.
744
8a14afd0
BS
7452016-10-07 Bernd Schmidt <bschmidt@redhat.com>
746
747 PR c++/69733
748 * c-decl.c (smallest_type_quals_location): New static function.
749 (grokdeclarator): Try to find the correct location for an ignored
750 qualifier.
751
81fea426
MP
7522016-09-26 Marek Polacek <polacek@redhat.com>
753
754 PR c/7652
755 * c-decl.c (pop_scope): Add gcc_fallthrough.
756
7572016-09-26 Marek Polacek <polacek@redhat.com>
758
759 PR c/7652
760 * c-parser.c (struct c_token): Add flags field.
761 (c_lex_one_token): Pass it to c_lex_with_flags.
762 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
763 into IFN_FALLTHROUGH.
764 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
765 attribute fallthrough after a case label or default label.
766 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
767
9a2300e9
MP
7682016-09-24 Marek Polacek <polacek@redhat.com>
769
770 PR c/77490
771 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
772 have boolean value. Warn about ++/-- on booleans.
773
7de76362
JJ
7742016-09-23 Jakub Jelinek <jakub@redhat.com>
775
776 * c-parser.c (incomplete_record_decls): Remove unnecessary
777 = vNULL initialization of file scope vec.
778
5b73d2ab
MP
7792016-09-16 Marek Polacek <polacek@redhat.com>
780
781 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
782
e51fbec3
MP
7832016-09-14 Marek Polacek <polacek@redhat.com>
784
785 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
786 (fix_array_notation_expr): Likewise.
787 * c-decl.c (finish_decl): Likewise.
788 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
789 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
790 (function_to_pointer_conversion): Use false instead of 0.
791 (convert_lvalue_to_rvalue): Likewise.
792 (parser_build_unary_op): Likewise.
793 (build_atomic_assign): Likewise.
794 (build_unary_op): Change nonconvert parameter type to bool, use
795 true/false instead of 1/0.
796 (build_binary_op): Use true instead of 1.
797
254830ba
DM
7982016-09-13 David Malcolm <dmalcolm@redhat.com>
799
800 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
801 of add_fixit_insert to add_fixit_insert_before.
802
4c13ba17
MP
8032016-09-13 Marek Polacek <polacek@redhat.com>
804
805 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
806 it.
807
54dcdb88
BE
8082016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
809
810 PR c++/77496
811 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
812 COMPOUND_EXPR to warn_for_omitted_condop.
813
e5106e27
DM
8142016-09-07 David Malcolm <dmalcolm@redhat.com>
815
816 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
817 c_get_substring_location for this new langhook.
818
9dc5773f
JJ
8192016-09-02 Jakub Jelinek <jakub@redhat.com>
820
821 PR c/65467
822 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
823 flag_openmp.
824 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
825 instead of mark_exp_read on low_bound/length expression.
826 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
827 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
828 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
829 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
830 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
831 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
832 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
833 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
834 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
835 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
836 instead of mark_expr_read.
837 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
838 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
839 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
840 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
841 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
842 array section bases outside of depend clause, for depend clause
843 use convert_lvalue_to_rvalue on the base.
844 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
845 linear, aligned, map, to and from clauses.
846 (c_omp_clause_copy_ctor): New function.
847
295844f6
MP
8482016-09-01 Marek Polacek <polacek@redhat.com>
849
850 PR c/7652
851 * c-typeck.c (composite_type): Add FALLTHRU comment.
852
089af25c
DM
8532016-08-31 David Malcolm <dmalcolm@redhat.com>
854
855 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
856 to the insertion fixits for "struct", "union", and "enum".
857
f9087798
DM
8582016-08-30 David Malcolm <dmalcolm@redhat.com>
859
860 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
861 rather than add_fixit_misspelled_id.
862 (undeclared_variable): Likewise.
863 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
864 now-redundant "here" params from add_fixit_insert method calls.
865 (c_parser_parameter_declaration): Likewise.
866 * c-typeck.c (build_component_ref): Remove now-redundant range
867 param from add_fixit_replace method calls.
868
ebef225f
MP
8692016-08-25 Marek Polacek <polacek@redhat.com>
870
871 * c-typeck.c (parser_build_binary_op): Pass LHS to
872 warn_logical_not_parentheses.
873
fe377a48
MP
8742016-08-25 Marek Polacek <polacek@redhat.com>
875
876 PR c/77323
877 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
878 or _FloatN or _FloatNx is not supported.
879 (finish_declspecs): Set type to integer_type_node when _FloatN or
880 _FloatNx is not supported.
881
c65699ef
JM
8822016-08-19 Joseph Myers <joseph@codesourcery.com>
883
884 PR c/32187
885 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
886 (struct c_declspecs): Add field floatn_nx_idx.
887 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
888 and _FloatNx type specifiers.
889 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
890 (c_parser_declspecs, c_parser_attribute_any_word)
891 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
892 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
893 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
894 narrower than double.
895
2f1364c2
JJ
8962016-08-12 Jakub Jelinek <jakub@redhat.com>
897 Martin Liska <mliska@suse.cz>
898
899 PR c/67410
900 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
901 % to determine val element to change. Assert that
902 wchar_bytes * charwidth fits into val array.
903
191816a3
MP
9042016-08-12 Marek Polacek <polacek@redhat.com>
905
906 PR c/7652
907 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
908 (c_parser_postfix_expression): Likewise.
909 * c-typeck.c (build_unary_op): Adjust fall through comment.
910 (c_mark_addressable): Likewise.
911
b95a64bb
JJ
9122016-08-11 Jakub Jelinek <jakub@redhat.com>
913
914 PR c/72816
915 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
916 array member through typedef, for orig_qual_indirect == 0 clear
917 orig_qual_type.
918
895aa8e1
DM
9192016-08-08 David Malcolm <dmalcolm@redhat.com>
920
921 PR c/64955
922 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
923 this up to selftest::run_c_tests.
924 (selftest::run_c_tests): New function.
925
0b212d8c
TS
9262016-08-04 Thomas Schwinge <thomas@codesourcery.com>
927
ae9281fc
TS
928 * c-parser.c (struct oacc_routine_data): Add error_seen and
929 fndecl_seen members.
930 (c_finish_oacc_routine): Use these.
931 (c_parser_declaration_or_fndef): Adjust.
932 (c_parser_oacc_routine): Likewise. Support more C language
933 constructs, and improve diagnostics. Move pragma context
934 checking...
935 (c_parser_pragma): ... here.
936
0b212d8c
TS
937 * c-parser.c (struct oacc_routine_data): New.
938 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
939 Simplify code.
940 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
941 declare target" attribute.
942
76e2c821
JB
9432016-08-01 Jan Beulich <jbeulich@suse.com>
944
945 * c-fold.c (c_fully_fold_internal): Also emit shift count
946 warnings for vector types.
947 * c-typeck.c (build_binary_op): Likewise.
948
f618a472
MP
9492016-07-29 Marek Polacek <polacek@redhat.com>
950
951 PR c/71742
952 * c-decl.c (finish_struct): Rephrase an error message.
953
efd0786f
MP
954 PR c/71853
955 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
956 to error node for invalid code.
957
e00dceaf
MP
958 PR c/71573
959 * c-decl.c (implicitly_declare): Return decl early not only for
960 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
961
673a107a
JJ
9622016-07-29 Jakub Jelinek <jakub@redhat.com>
963
964 PR c/71969
965 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
966 on GNU extern inline functions.
967
a5b5c8b6
MP
9682016-07-29 Marek Polacek <polacek@redhat.com>
969
970 PR c/71583
971 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
972 check expr.value.
973
e3fe09c1
UB
9742016-07-22 Uros Bizjak <ubizjak@gmail.com>
975
976 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
977
7c8f7eaa
DM
9782016-07-20 David Malcolm <dmalcolm@redhat.com>
979
980 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
981 spellcheck-tree.h
982 (best_macro_match): Likewise, converting from a typedef to a
983 subclass.
984 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
985 (lookup_name_fuzzy): Update for change of best_macro_match to a
986 subclass with a ctor that calls cpp_forall_identifiers.
987
de6a69ee
DM
9882016-07-20 David Malcolm <dmalcolm@redhat.com>
989
990 * c-decl.c (implicit_decl_warning): Update for conversion of
991 return type of lookup_name_fuzzy to const char *.
992 (undeclared_variable): Likewise.
993 (lookup_name_fuzzy): Convert return type from tree to
994 const char *.
995 * c-parser.c (c_parser_declaration_or_fndef): Update for
996 conversion of return type of lookup_name_fuzzy to const char *.
997 (c_parser_parameter_declaration): Likewise.
998
b1c9c068
CP
9992016-07-15 Cesar Philippidis <cesar@codesourcery.com>
1000
1001 * c-parser.c (c_parser_oacc_declare): Don't scan for
1002 GOMP_MAP_POINTER.
1003 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
1004 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
1005 zero-length subarrays.
1006
ddbbcb19
JJ
10072016-07-15 Jakub Jelinek <jakub@redhat.com>
1008
1009 PR c/71858
1010 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
1011 instead of FUZZY_LOOKUP_NAME.
1012 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
1013 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
1014
dd36b877
JJ
10152016-07-14 Jakub Jelinek <jakub@redhat.com>
1016
1017 PR c/71858
1018 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
1019
8c681247
TS
10202016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1021
1022 * c-parser.c (c_parser_generic_selection): Make type of variable
1023 auto_vec.
1024 (c_parser_omp_declare_simd): Likewise.
1025
bf4fa671
TS
10262016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1027
1028 * c-decl.c (struct c_struct_parse_info): Change member types
1029 from vec to auto_vec.
1030 (start_struct): Adjust.
1031 (finish_struct): Likewise.
1032
557e8c49
JJ
10332016-07-02 Jakub Jelinek <jakub@redhat.com>
1034
1035 PR c/71719
1036 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
1037
54d19c3b
TS
10382016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1039
1040 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
1041 Move pragma context checking into...
1042 (c_parser_omp_cancellation_point): ... here, and improve
1043 diagnostic messages.
1044 * c-typeck.c (c_finish_omp_cancel)
1045 (c_finish_omp_cancellation_point): Improve diagnostic messages.
1046
152ef731
JJ
10472016-06-29 Jakub Jelinek <jakub@redhat.com>
1048
1049 PR c/71685
1050 * c-typeck.c (c_build_qualified_type): Don't clear
1051 C_TYPE_INCOMPLETE_VARS for the main variant.
1052
10532016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
1054
1055 PR c/71552
1056 * c-typeck.c (output_init_element): Diagnose incompatible types
1057 before non-constant initializers.
1058
e9ac1f86
JJ
10592016-06-28 Jakub Jelinek <jakub@redhat.com>
1060
1061 * Make-lang.in: Don't cat ../stage_current if it does not exist.
1062
277d7ee0
AK
10632016-06-23 Andi Kleen <ak@linux.intel.com>
1064
1065 * Make-lang.in: Add support for autofdo.
1066
1a4f11c8
DM
10672016-06-22 David Malcolm <dmalcolm@redhat.com>
1068
1069 PR c/70339
1070 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
1071 (implicit_decl_warning): When issuing warnings for implicit
1072 declarations, attempt to provide a suggestion via
1073 lookup_name_fuzzy.
1074 (undeclared_variable): Likewise when issuing errors.
1075 (lookup_name_in_scope): Likewise.
1076 (struct edit_distance_traits<cpp_hashnode *>): New struct.
1077 (best_macro_match): New typedef.
1078 (find_closest_macro_cpp_cb): New function.
1079 (lookup_name_fuzzy): New function.
1080 * c-parser.c: Include gcc-rich-location.h.
1081 (c_token_starts_typename): Split out case CPP_KEYWORD into...
1082 (c_keyword_starts_typename): ...this new function.
1083 (c_parser_declaration_or_fndef): When issuing errors about
1084 missing "struct" etc, add a fixit. For other kinds of errors,
1085 attempt to provide a suggestion via lookup_name_fuzzy.
1086 (c_parser_parms_declarator): When looking ahead to detect typos in
1087 type names, also reject CPP_KEYWORD.
1088 (c_parser_parameter_declaration): When issuing errors about
1089 unknown type names, attempt to provide a suggestion via
1090 lookup_name_fuzzy.
1091 * c-tree.h (c_keyword_starts_typename): New prototype.
1092
5a578671
JM
10932016-06-20 Joseph Myers <joseph@codesourcery.com>
1094
1095 PR c/71601
1096 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1097 c_common_type returns error_mark_node.
1098
3f8257db 10992016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1100
1101 PR c/69507
1102 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1103 __alignof__ (expression).
1104
6a3f203c
DM
11052016-06-14 David Malcolm <dmalcolm@redhat.com>
1106
1107 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1108
264757fb
DM
11092016-06-14 David Malcolm <dmalcolm@redhat.com>
1110
1111 * c-typeck.c (build_component_ref): Simplify fixit code by
1112 using gcc_rich_location::add_fixit_misspelled_id.
1113 (set_init_label): Likewise.
1114
f7e4f2e3
DM
11152016-06-13 David Malcolm <dmalcolm@redhat.com>
1116
1117 * c-parser.c (c_parser_initelt): Provide location of name for new
1118 location_t param of set_init_label.
1119 * c-tree.h (set_init_label): Add location_t param.
1120 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1121 param and use it when issuing error messages about unrecognized
1122 field names. Attempt to provide a fixit hint if appropriate,
1123 otherwise update the error message to provide the type name.
1124
4b1ffdb1
TS
11252016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1126
1127 PR c/71381
1128 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1129 Loosen checking.
1130
44a845ca
MS
11312016-06-08 Martin Sebor <msebor@redhat.com>
1132 Jakub Jelinek <jakub@redhat.com>
1133
1134 PR c++/70507
1135 PR c/68120
1136 * c-typeck.c (convert_arguments): Don't promote last argument
1137 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1138
92a5f2ba
MP
11392016-06-08 Marek Polacek <polacek@redhat.com>
1140
1141 PR c/71418
1142 * c-decl.c (grokdeclarator): Check TYPE_P.
1143
08203f73
MP
1144 PR c/71426
1145 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1146 code.
1147
6ffd47b7
DM
11482016-06-07 David Malcolm <dmalcolm@redhat.com>
1149
1150 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1151 and structure element reference, capture the location of the
1152 element name token and pass it to build_component_ref.
1153 (c_parser_postfix_expression_after_primary): Likewise for
1154 structure element dereference.
1155 (c_parser_omp_variable_list): Likewise for
1156 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1157 * c-tree.h (build_component_ref): Add location_t param.
1158 * c-typeck.c (build_component_ref): Add location_t param
1159 COMPONENT_LOC. Use it, if available, when issuing hints about
1160 mispelled member names to provide a fixit replacement hint.
1161
1f40cff3
MP
11622016-06-06 Marek Polacek <polacek@redhat.com>
1163
1164 PR c/71362
1165 * c-parser.c (c_parser_direct_declarator): Set location.
1166
5545a907
MP
11672016-06-06 Marek Polacek <polacek@redhat.com>
1168
1169 * c-typeck.c (comptypes_internal): Handle comparisons of
1170 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1171 TYPE_REF_CAN_ALIAS_ALL.
1172
b605f663
CLT
11732016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1174
1175 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1176 arguments as addressable when async clause exists.
1177
00631022
JJ
11782016-05-30 Jakub Jelinek <jakub@redhat.com>
1179
1180 PR c++/71349
1181 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1182 when combined with target construct.
1183
7211a097
JJ
11842016-05-26 Jakub Jelinek <jakub@redhat.com>
1185
1186 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1187 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1188
95efe6b6
MP
11892016-05-25 Marek Polacek <polacek@redhat.com>
1190
1191 PR c/71265
1192 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1193
a23faf7a
MP
1194 PR c/71266
1195 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1196
e46c7770
CP
11972016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1198
1199 * c-parser.c (c_parser_oacc_declare): Add support for
1200 GOMP_MAP_FIRSTPRIVATE_POINTER.
1201 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1202 argument with enum c_omp_region_type ort.
1203 (handle_omp_array_sections): Likewise. Update call to
1204 handle_omp_array_sections_1.
1205 (c_finish_omp_clauses): Add specific errors and warning messages for
1206 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1207 call to handle_omp_array_sections.
1208
a04e69c0
TS
12092016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1210
1211 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1212
f17a223d
RB
12132016-05-24 Richard Biener <rguenther@suse.de>
1214
1215 PR middle-end/70434
1216 PR c/69504
1217 * c-typeck.c (build_array_ref): Do not complain about indexing
1218 non-lvalue vectors. Adjust for function name change.
1219
79063edd
MS
12202016-05-20 Martin Sebor <msebor@redhat.com>
1221
1222 PR c/71115
1223 * c-typeck.c (error_init): Use
1224 expansion_point_location_if_in_system_header.
1225 (warning_init): Same.
1226
8a40fef3
DM
12272016-05-19 David Malcolm <dmalcolm@redhat.com>
1228
1229 PR c/71171
1230 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1231 in error-handling.
1232 (c_parser_postfix_expression): Likewise.
1233 * c-tree.h (c_expr::set_error): New method.
1234 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1235 that result's range is initialized.
1236
e9892350
JG
12372016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1238
1239 * c-typeck.c (parser_build_unary_op): Fix formatting.
1240
8fad45f5
MW
12412016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1242
1243 * c-decl.c (grokdeclarator): Remove errmsg and use of
1244 targetm.invalid_return_type.
1245 (grokparms): Remove errmsg and use of
1246 targetm.invalid_parameter_type.
1247
aa4b467b
JM
12482016-05-13 Joseph Myers <joseph@codesourcery.com>
1249
1250 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1251 function return type.
1252
4f2e1536
MP
12532016-05-12 Marek Polacek <polacek@redhat.com>
1254
1255 PR c/70756
1256 * c-decl.c (build_compound_literal): Pass LOC down to
1257 c_incomplete_type_error.
1258 * c-tree.h (require_complete_type): Adjust declaration.
1259 (c_incomplete_type_error): Likewise.
1260 * c-typeck.c (require_complete_type): Add location parameter, pass it
1261 down to c_incomplete_type_error.
1262 (c_incomplete_type_error): Add location parameter, pass it down to
1263 error_at.
1264 (build_component_ref): Pass location down to c_incomplete_type_error.
1265 (default_conversion): Pass location down to require_complete_type.
1266 (build_array_ref): Likewise.
1267 (build_function_call_vec): Likewise.
1268 (convert_arguments): Likewise.
1269 (build_unary_op): Likewise.
1270 (build_c_cast): Likewise.
1271 (build_modify_expr): Likewise.
1272 (convert_for_assignment): Likewise.
1273 (c_finish_omp_clauses): Likewise.
1274
d6e83a8d
MM
12752016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1276
1277 PR c/43651
1278 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1279 is enabled.
1280 * c-errors.c (pedwarn_c90): Return true if warned.
1281 * c-tree.h (pedwarn_c90): Change return type to bool.
1282 (enum c_declspec_word): Add new enumerator cdw_atomic.
1283
5c3a10fb
MP
12842016-05-11 Marek Polacek <polacek@redhat.com>
1285
1286 PR c++/71024
1287 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1288 diagnose_mismatched_attributes and call it.
1289
cf68d92c
MP
12902016-05-10 Marek Polacek <polacek@redhat.com>
1291
1292 PR c/70255
1293 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1294 on a declaration following the definition.
1295
351f85c5
JJ
12962016-05-05 Jakub Jelinek <jakub@redhat.com>
1297
1298 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1299 parse it through to c_parser_c99_block_statement.
1300 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1301 caller.
1302
deef7113
MP
13032016-05-04 Marek Polacek <polacek@redhat.com>
1304
1305 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1306 OPT_Wdangling_else.
1307
de55efd5
MP
13082016-05-04 Marek Polacek <polacek@redhat.com>
1309
1310 PR c/48778
1311 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1312 for macro expansions.
1313
79ce98bc
MP
13142016-05-03 Marek Polacek <polacek@redhat.com>
1315
1316 PR c/70859
1317 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1318 check_builtin_function_arguments.
1319
fb2647aa
RB
13202016-05-03 Richard Biener <rguenther@suse.de>
1321
1322 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1323 the checksum from the previous stage.
1324
77886428
CP
13252016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1326
1327 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1328 c_finish_omp_clauses.
1329 (c_parser_omp_all_clauses): Likewise.
1330 (c_parser_oacc_cache): Likewise.
1331 (c_parser_oacc_loop): Likewise.
1332 (omp_split_clauses): Likewise.
1333 (c_parser_omp_declare_target): Likewise.
1334 (c_parser_cilk_all_clauses): Likewise.
1335 (c_parser_cilk_for): Likewise.
1336 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1337 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1338
7176a4a0
MP
13392016-05-02 Marek Polacek <polacek@redhat.com>
1340
1341 PR c/70851
1342 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1343 incomplete type.
1344
e7ff0319
CP
13452016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1346
1347 PR middle-end/70626
1348 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1349 OACC_LOOP_CLAUSE_MASK.
1350 (c_parser_oacc_kernels_parallel): Update call to
1351 c_oacc_split_loop_clauses.
1352
9f405ce1
AM
13532016-04-28 Andrew MacLeod <amacleod@redhat.com>
1354
1355 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1356 argument to build_modify_expr in two cases.
1357
c1e1f433
BS
13582016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1359
1360 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1361 warn_for_memset instead of warning directly here.
1362
2448a956
MP
13632016-04-26 Marek Polacek <polacek@redhat.com>
1364
1365 PR c/67784
1366 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1367 out of ...
1368 (c_parser_for_statement): ... here.
1369 (c_parser_if_statement): Use it.
1370 (c_parser_switch_statement): Use it.
1371 (c_parser_while_statement): Use it.
1372
b02a5e26
MP
1373 PR c/70791
1374 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1375
477d4906
IV
13762016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1377
1378 PR c++/69363
1379 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1380 instead of c_finish_cilk_clauses.
1381 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1382 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1383 floating-point variables in the linear clause for Cilk Plus.
1384
fe37c7af
MM
13852016-04-18 Michael Matz <matz@suse.de>
1386
1387 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1388 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1389
949505a9
MP
13902016-04-15 Marek Polacek <polacek@redhat.com>
1391
1392 PR c/70671
1393 * c-typeck.c (build_unary_op): Pass location down to error and
1394 warning call.
1395
dda1bf61
JJ
13962016-04-15 Jakub Jelinek <jakub@redhat.com>
1397
1398 PR c/70436
1399 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1400 where needed.
1401 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1402 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1403 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1404 Adjust c_parser_pragma callers.
1405 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1406 caller.
1407 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1408 c_parser_statement.
1409 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1410 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1411 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1412 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1413 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1414 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1415 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1416 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1417 down where needed.
1418 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1419 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1420 calls.
1421
99cd9857
MP
14222016-04-13 Marek Polacek <polacek@redhat.com>
1423
1424 PR c/70436
1425 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1426 adjust callers.
1427 (c_parser_statement): Likewise.
1428 (c_parser_c99_block_statement): Likewise.
1429 (c_parser_while_statement): Likewise.
1430 (c_parser_for_statement): Likewise.
1431 (c_parser_if_body): Don't set IF_P here.
1432 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1433 about dangling else here.
1434 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1435 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1436 warn about dangling else here.
1437
f13355da
MP
14382016-04-04 Marek Polacek <polacek@redhat.com>
1439
1440 PR c/70307
1441 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1442
5fde6a45
MP
14432016-03-31 Marek Polacek <polacek@redhat.com>
1444
1445 PR c/70297
1446 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1447
4bbf545b
DM
14482016-03-18 David Malcolm <dmalcolm@redhat.com>
1449
1450 PR c/70281
1451 * c-parser.c (c_parser_postfix_expression): Set the source range
1452 for uses of "__builtin_types_compatible_p".
1453
fcc2b74f
JJ
14542016-03-17 Jakub Jelinek <jakub@redhat.com>
1455
1456 PR c/70280
1457 * c-typeck.c (composite_type): Don't count void_list_node
1458 into len, if the list is terminated by void_list_node, start
1459 with void_list_node instead of NULL for newargs. Stop
1460 at void_list_node.
1461
ab4c578f
MP
14622016-03-16 Marek Polacek <polacek@redhat.com>
1463
1464 PR c/70093
1465 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1466 nested functions returning VM types.
1467
96b3c82d
CP
14682016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1469
1470 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1471 when calling c_finish_omp_clauses.
1472
29b9828f
BS
14732016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1474
1475 PR c/69824
1476 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1477 for later.
1478
7ff6ca38
MP
14792016-03-04 Marek Polacek <polacek@redhat.com>
1480
1481 PR c/69798
1482 * c-parser.c (c_parser_postfix_expression): Call
1483 c_parser_cast_expression rather than c_parser_postfix_expression.
1484
686e2237
JJ
14852016-03-01 Jakub Jelinek <jakub@redhat.com>
1486
1487 PR c/69796
1488 PR c/69974
1489 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1490 of incomplete decls to error_mark_node.
1491
0b05329b
MP
14922016-02-24 Marek Polacek <polacek@redhat.com>
1493
1494 PR c/69819
1495 * c-decl.c (finish_decl): Don't update the copy of the type of a
1496 different decl type.
1497
067fbd8b
JJ
14982016-02-23 Jakub Jelinek <jakub@redhat.com>
1499
1500 PR objc/69844
1501 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1502 in id_kind reclassification.
1503
bf14eba2
JJ
15042016-02-16 Jakub Jelinek <jakub@redhat.com>
1505
1506 PR c/69835
1507 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1508
ba539195
JN
15092016-02-16 James Norris <jnorris@codesourcery.com>
1510
1511 PR c/64748
1512 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1513
16595a1f
BS
15142016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1515
f48dfe98
BS
1516 * c-decl.c (build_null_declspecs): Zero the entire struct.
1517
16595a1f
BS
1518 PR c/69522
1519 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1520 callers changed. If nested_p is true, use it to call
1521 finish_implicit_inits.
1522 * c-tree.h (finish_implicit_inits): Declare.
1523 * c-typeck.c (finish_implicit_inits): New function. Move code
1524 from ...
1525 (push_init_level): ... here.
1526 (set_designator, process_init_element): Call finish_implicit_inits.
1527
66756373
JJ
15282016-02-11 Jakub Jelinek <jakub@redhat.com>
1529
1530 PR c/69768
1531 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1532 arguments for -Waddress warning.
1533
1066e9b5
JJ
15342016-02-04 Jakub Jelinek <jakub@redhat.com>
1535
1536 PR c/69669
1537 * c-decl.c (finish_enum): When honoring mode attribute,
1538 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1539
3a5d2ba4
JJ
15402016-01-29 Jakub Jelinek <jakub@redhat.com>
1541
1542 PR debug/69518
1543 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1544 all type variants, not just TYPE_MAIN_VARIANT.
1545
cbdd8ae0
JJ
15462016-01-27 Jakub Jelinek <jakub@redhat.com>
1547
1548 PR debug/66869
1549 * c-decl.c (c_write_global_declarations_1): Warn with
1550 warn_unused_function if static prototype without definition
1551 is not C_DECL_USED.
1552
fa74a4bc
MP
15532016-01-27 Marek Polacek <polacek@redhat.com>
1554
1555 PR c/68062
1556 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1557 to unsigned, if needed. Add -Wsign-compare warning.
1558
13f92e8d
JJ
15592016-01-26 Jakub Jelinek <jakub@redhat.com>
1560
1561 PR tree-optimization/69483
1562 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1563
cd8e73dc 15642016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1565
1566 PR c/24293
1567 * c-tree.h (incomplete_record_decls): Declare.
1568 * c-parser.c (incomplete_record_decls): Define.
1569 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1570 report error if any decl has zero size.
1571 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1572 or enum type to incomplete_record_decls.
1573
e6d6ec9e
TV
15742016-01-14 Tom de Vries <tom@codesourcery.com>
1575
1576 PR tree-optimization/68773
1577 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1578 set force_output.
1579
00083992
MP
15802016-01-14 Marek Polacek <polacek@redhat.com>
1581
1582 PR c/69262
1583 * c-decl.c (grokdeclarator): Provide more information for invalid
1584 array declarations.
1585
7443cf13
DM
15862016-01-06 David Malcolm <dmalcolm@redhat.com>
1587
1588 * c-parser.c (c_parser_unary_expression): For dereferences, build
1589 a combined location before calling build_indirect_ref, so that
1590 error reports cover the full range, manually updating the c_expr
1591 src_range.
1592
6b131d5b
MP
15932016-01-06 Marek Polacek <polacek@redhat.com>
1594
1595 PR sanitizer/69099
1596 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1597 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1598 NULL.
1599
818ab71a
JJ
16002016-01-04 Jakub Jelinek <jakub@redhat.com>
1601
1602 Update copyright years.
1603
2fe0a208
MP
16042016-01-04 Marek Polacek <polacek@redhat.com>
1605
1606 PR c/68908
1607 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1608 optimization to use __atomic_fetch_* built-in if possible.
1609
c7b48c8a
TS
16102015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1611
1612 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1613 into...
1614 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1615 all users.
1616
fda5652f
MP
16172015-12-22 Marek Polacek <polacek@redhat.com>
1618
1619 PR c/69002
1620 * c-typeck.c (build_component_ref): Warn when acessing elements of
1621 atomic structures or unions.
1622
745e411d
DM
16232015-12-21 David Malcolm <dmalcolm@redhat.com>
1624
1625 * c-typeck.c: Include "gcc-rich-location.h".
1626 (build_binary_op): In the two places that call binary_op_error,
1627 create a gcc_rich_location and populate it with the location of
1628 the binary op and its two operands.
1629
94c40e19
DM
16302015-12-16 David Malcolm <dmalcolm@redhat.com>
1631
1632 * c-parser.c (c_parser_statement_after_labels): When calling
1633 c_finish_return, Use the return expression's location if it has
1634 one, falling back to the location of the first token within it.
1635 * c-typeck.c (c_finish_return): When issuing warnings about
1636 the incorrect presence/absence of a return value, issue a note
1637 showing the declaration of the function.
1638
de67c4c3
DM
16392015-12-16 David Malcolm <dmalcolm@redhat.com>
1640
1641 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1642 to 4.
1643 (c_parser_peek_nth_token): New function.
1644 (c_parser_peek_conflict_marker): New function.
1645 (c_parser_error): Detect conflict markers and report them as such.
1646
a10704e1
DM
16472015-12-16 David Malcolm <dmalcolm@redhat.com>
1648
1649 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1650 to preserve range information for the primary expression
1651 in the call to c_parser_postfix_expression_after_primary.
1652
8062bca6
DM
16532015-12-16 David Malcolm <dmalcolm@redhat.com>
1654
1655 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1656 expression location, falling back on the first token location,
1657 rather than always using the latter.
1658
d06f8b75
MP
16592015-12-16 Marek Polacek <polacek@redhat.com>
1660
1661 PR c/64637
1662 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1663 available.
1664
2994fb91
MP
16652015-12-15 Marek Polacek <polacek@redhat.com>
1666
1667 PR c/68907
1668 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1669 artificial decl.
1670
a1b93f8d
DM
16712015-12-08 David Malcolm <dmalcolm@redhat.com>
1672
1673 * c-parser.c (c_parser_alignof_expression): Capture location of
1674 closing parenthesis (if any), or of end of unary expression, and
1675 use it to build a src_range for the expression.
1676
46c6e1e2
DM
16772015-12-08 David Malcolm <dmalcolm@redhat.com>
1678
1679 PR c/68757
1680 * c-parser.c (c_parser_get_builtin_args): Add
1681 "out_close_paren_loc" param, and write back to it.
1682 (c_parser_postfix_expression): Capture the closing
1683 parenthesis location for RID_CHOOSE_EXPR,
1684 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1685 RID_BUILTIN_SHUFFLE and use it to set the source range
1686 for such expressions; within RID_BUILTIN_COMPLEX set
1687 the underlying location.
1688
66189108
MP
16892015-12-07 Marek Polacek <polacek@redhat.com>
1690
1691 PR c/68668
1692 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1693 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1694
f187980b
EB
16952015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1696
1697 * c-tree.h (c_build_va_arg): Adjust prototype.
1698 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1699 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1700 parameter, adjust throughout and issue an error if EXPR is a component
1701 with reverse storage order.
1702
4250754e
JM
17032015-12-02 Jason Merrill <jason@redhat.com>
1704
1705 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1706 (c_fully_fold_internal, decl_constant_value_for_optimization):
1707 Move from c-common.c.
1708 * c-tree.h: Declare decl_constant_value_for_optimization.
1709 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1710
e9e32ee6
JM
17112015-12-02 Joseph Myers <joseph@codesourcery.com>
1712
1713 PR c/68162
1714 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1715 following link from declarator to next declarator. Track original
1716 qualified type and pass it to c_build_qualified_type.
1717 * c-typeck.c (c_build_qualified_type): Add arguments
1718 orig_qual_type and orig_qual_indirect.
1719
ff7a55bf
TS
17202015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1721
1722 * c-parser.c (c_parser_omp_clause_name)
1723 (c_parser_oacc_all_clauses): Alphabetical sorting.
1724
657e4e47
JJ
17252015-12-02 Jakub Jelinek <jakub@redhat.com>
1726
1727 PR c/68533
1728 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1729 for diagnostics.
1730
37d5ad46
JB
17312015-12-01 Julian Brown <julian@codesourcery.com>
1732 Cesar Philippidis <cesar@codesourcery.com>
1733 James Norris <James_Norris@mentor.com>
1734
1735 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1736 (c_parser_oacc_clause_use_device): New function.
1737 (c_parser_oacc_all_clauses): Add use_device support.
1738 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1739 (c_parser_oacc_host_data): New function.
1740 (c_parser_omp_construct): Add host_data support.
1741 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1742 * c-typeck.c (c_finish_oacc_host_data): New function.
1743 (c_finish_omp_clauses): Add use_device support.
1744
a4850ce9
JH
17452015-11-29 Jan Hubicka <hubicka@ucw.cz>
1746
1747 PR c/67106
1748 * c-decl.c: Set TYPE_PACKED in variants.
1749
b58d3df2
ML
17502015-11-27 Martin Liska <mliska@suse.cz>
1751
1752 PR c++/68312
1753 * c-array-notation.c (fix_builtin_array_notation_fn):
1754 Use release_vec_vec instead of vec::release.
1755 (build_array_notation_expr): Likewise.
1756 (fix_conditional_array_notations_1): Likewise.
1757 (fix_array_notation_expr): Likewise.
1758 (fix_array_notation_call_expr): Likewise.
1759
aec17bfe
JJ
17602015-11-27 Jakub Jelinek <jakub@redhat.com>
1761
1762 PR c/63326
1763 * c-parser.c (c_parser_compound_statement_nostart): If
1764 last_label is true, use pragma_stmt instead of pragma_compound
1765 as second c_parser_pragma argument.
1766 (c_parser_omp_ordered, c_parser_omp_target_update,
1767 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1768 false as second argument to c_parser_skip_to_pragma_eol after
1769 diagnosing standalone directives used in pragma_stmt context.
1770
688c4de0
IV
17712015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1772
1773 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1774 with "if (ENABLE_OFFLOADING)".
1775
cbd03aee
DM
17762015-11-23 David Malcolm <dmalcolm@redhat.com>
1777
1778 PR objc/68438
1779 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1780 for various Objective-C constructs: Class.name syntax,
1781 @selector(), @protocol(), @encode(), and [] message syntax.
1782
a87a86e1
DM
17832015-11-20 David Malcolm <dmalcolm@redhat.com>
1784
1785 PR 62314
1786 * c-typeck.c (should_suggest_deref_p): New function.
1787 (build_component_ref): Special-case POINTER_TYPE when
1788 generating a "not a structure of union" error message, and
1789 suggest a "->" rather than a ".", providing a fix-it hint.
1790
8ece8dfb
DM
17912015-11-19 David Malcolm <dmalcolm@redhat.com>
1792
1793 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1794 candidate into a new function, find_closest_identifier.
1795
433068cc
MP
17962015-11-19 Marek Polacek <polacek@redhat.com>
1797
1798 PR c/68412
1799 * c-typeck.c (parser_build_binary_op): Properly handle
1800 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1801
bef08b71
DM
18022015-11-17 David Malcolm <dmalcolm@redhat.com>
1803
1804 * c-parser.c (set_c_expr_source_range): Bulletproof both
1805 overloaded implementations against NULL expr->value.
1806 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1807 values.
1808 (c_parser_unary_expression): Likewise when handling addresses of
1809 labels.
1810 (c_parser_postfix_expression): Likewise for statement expressions,
1811 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1812 __builtin_va_arg, and for __builtin_offset_of.
1813 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1814 src_range using the range of the braced initializer.
1815 (c_parser_transaction_expression): Set src_range for "ret" to a
1816 sane pair of values.
1817
fff77217
KY
18182015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1819
1820 * c-parser.c (c_finish_omp_declare_simd): Look for
1821 "simd" attribute as well. Update error message.
1822
1d899da2
TS
18232015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1824
1825 * c-parser.c (c_parser_omp_declare_target): Adjust.
1826
e4606348
JJ
18272015-11-14 Jakub Jelinek <jakub@redhat.com>
1828
1829 * c-typeck.c (c_finish_omp_clauses): Don't mark
1830 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1831
3e636daf
MP
18322015-11-14 Marek Polacek <polacek@redhat.com>
1833
1834 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1835 * c-typeck.c: Likewise.
1836
ebedc9a3
DM
18372015-11-13 David Malcolm <dmalcolm@redhat.com>
1838
1839 * c-decl.c (warn_defaults_to): Pass line_table to
1840 rich_location ctor.
1841 * c-errors.c (pedwarn_c99): Likewise.
1842 (pedwarn_c90): Likewise.
1843 * c-parser.c (set_c_expr_source_range): New functions.
1844 (c_token::get_range): New method.
1845 (c_token::get_finish): New method.
1846 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1847 based on the range from the start of the LHS to the end of the
1848 RHS.
1849 (c_parser_conditional_expression): Likewise, based on the range
1850 from the start of the cond.value to the end of exp2.value.
1851 (c_parser_binary_expression): Call set_c_expr_source_range on
1852 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1853 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1854 based on the cast_loc through to the end of the expr.
1855 (c_parser_unary_expression): Likewise, based on the
1856 op_loc through to the end of op.
1857 (c_parser_sizeof_expression) Likewise, based on the start of the
1858 sizeof token through to either the closing paren or the end of
1859 expr.
1860 (c_parser_postfix_expression): Likewise, using the token range,
1861 or from the open paren through to the close paren for
1862 parenthesized expressions.
1863 (c_parser_postfix_expression_after_primary): Likewise, for
1864 various kinds of expression.
1865 * c-tree.h (struct c_expr): Add field "src_range".
1866 (c_expr::get_start): New method.
1867 (c_expr::get_finish): New method.
1868 (set_c_expr_source_range): New decls.
1869 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1870 on ret for prefix unary ops.
1871 (parser_build_binary_op): Likewise, running from the start of
1872 arg1.value through to the end of arg2.value.
1873
ec8b536f
MP
18742015-11-13 Marek Polacek <polacek@redhat.com>
1875
1876 PR c/68320
1877 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1878
277fe616
DM
18792015-11-13 David Malcolm <dmalcolm@redhat.com>
1880
1881 * c-typeck.c: Include spellcheck.h.
1882 (lookup_field_fuzzy_find_candidates): New function.
1883 (lookup_field_fuzzy): New function.
1884 (build_component_ref): If the field was not found, try using
1885 lookup_field_fuzzy and potentially offer a suggestion.
1886
6e232ba4
JN
18872015-11-12 James Norris <jnorris@codesourcery.com>
1888 Joseph Myers <joseph@codesourcery.com>
1889
1890 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1891 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1892 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1893 and PRAGMA_OMP_CLAUSE_LINK.
1894 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1895 and PRAGMA_OACC_CLAUSE_LINK.
1896 (OACC_DECLARE_CLAUSE_MASK): New definition.
1897 (c_parser_oacc_declare): New function.
1898
9be4f715
MP
18992015-11-12 Marek Polacek <polacek@redhat.com>
1900
1901 PR c/67784
1902 * c-parser.c (c_parser_for_statement): Reclassify the token in
1903 a correct scope.
1904
e78bede6
MP
19052015-11-11 Marek Polacek <polacek@redhat.com>
1906
1907 PR c/68107
1908 PR c++/68266
1909 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1910 checking the size of an array.
1911
69f293c9
AM
19122015-11-11 Andrew MacLeod <amacleod@redhat.com>
1913
1914 * c-array-notation.c: Remove unused header files.
1915 * c-aux-info.c: Likewise.
1916 * c-convert.c: Likewise.
1917 * c-decl.c: Likewise.
1918 * c-errors.c: Likewise.
1919 * c-lang.c: Likewise.
1920 * c-objc-common.c: Likewise.
1921 * c-parser.c: Likewise.
1922 * c-typeck.c: Likewise.
1923 * gccspec.c: Likewise.
1924
3a40d81d
NS
19252015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1926 Cesar Philippidis <cesar@codesourcery.com>
1927 James Norris <jnorris@codesourcery.com>
1928 Julian Brown <julian@codesourcery.com>
1929 Nathan Sidwell <nathan@codesourcery.com>
1930
1931 c/
1932 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1933 routine arg.
1934 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1935 (c_parser_pragma): Parse 'acc routine'.
1936 (OACC_ROUTINE_CLAUSE_MARK): Define.
1937 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1938
fc402eec
AA
19392015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1940
1941 PR debug/67192
1942 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1943 location of the backward-goto to the start of the loop body.
1944
f6b0b3db
AA
19452015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1946
1947 PR debug/67192
1948 * c-parser.c (c_parser_while_statement): Finish the loop before
1949 parsing ahead for misleading indentation.
1950 (c_parser_for_statement): Likewise.
1951
ee45a32d
EB
19522015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1953
1954 * c-decl.c (finish_struct): If the structure has reverse storage
1955 order, rewrite the type of array fields with scalar component. Call
1956 maybe_apply_pragma_scalar_storage_order on entry.
1957 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1958 errors on bit-fields and reverse SSO here and not...
1959 (c_mark_addressable): ...here.
1960 (output_init_element): Adjust call to initializer_constant_valid_p.
1961 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1962
8a645150
DM
19632015-11-06 David Malcolm <dmalcolm@redhat.com>
1964
1965 * c-decl.c (warn_defaults_to): Update for change in signature
1966 of diagnostic_set_info.
1967 * c-errors.c (pedwarn_c99): Likewise.
1968 (pedwarn_c90): Likewise.
1969 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1970 for textinfo::set_location.
1971
7a5e4956
CP
19722015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1973 Thomas Schwinge <thomas@codesourcery.com>
1974 James Norris <jnorris@codesourcery.com>
1975
1976 * c-parser.c (c_parser_omp_clause_name): Add support for
1977 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1978 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1979 default(none) in OpenACC.
1980 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1981 arguments.
1982 (c_parser_oacc_clause_tile): New function.
1983 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1984 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1985 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1986 TILE}.
1987 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1988 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1989 FIRSTPRIVATE}.
1990 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1991 (c_parser_oacc_update): Update the error message for missing clauses.
1992 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1993 and OMP_CLAUSE_INDEPENDENT.
1994
bfcfbfa0
MP
19952015-11-05 Marek Polacek <polacek@redhat.com>
1996
1997 PR c/68090
1998 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1999 deal with pre-evaluation on invalid types.
2000
e01d41e5
JJ
20012015-11-05 Jakub Jelinek <jakub@redhat.com>
2002 Ilya Verbin <ilya.verbin@intel.com>
2003
2004 * c-parser.c: Include context.h and gimple-expr.h.
2005 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
2006 monotonic together with nonmonotonic.
2007 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
2008 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
2009 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
2010 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
2011 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
2012 expressions on combined target teams before the target.
2013 (c_parser_omp_declare_target): If decl has "omp declare target" or
2014 "omp declare target link" attribute, and cgraph or varpool node already
2015 exists, then set corresponding flags. Call c_finish_omp_clauses
2016 in the parenthesized extended-list syntax case.
2017 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
2018 declare target.
2019 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
2020 on OMP_CLAUSE_REDUCTION array sections.
2021 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
2022 into the constant offset, or for variable low-bound using
2023 POINTER_PLUS_EXPR. For structure element based array sections use
2024 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
2025 (c_finish_omp_clauses): Drop generic_field_head, structure
2026 elements are now always mapped even as array section bases,
2027 diagnose same var in data sharing and mapping clauses. Diagnose if
2028 linear step on declare simd is neither a constant nor a uniform
2029 parameter. Look through POINTER_PLUS_EXPR for array section
2030 reductions. Diagnose the same var or function appearing multiple
2031 times on the same directive. Fix up wording for the to clause if t
2032 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
2033 modifier on kinds other than dynamic or guided or nonmonotonic
2034 modifier together with ordered clause.
2035
4bf9e5a8
TS
20362015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2037 Chung-Lin Tang <cltang@codesourcery.com>
2038
2039 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
2040
2adfab87
AM
20412015-10-29 Andrew MacLeod <amacleod@redhat.com>
2042
2043 * c-array-notation.c: Reorder #include's and remove duplicates.
2044 * c-aux-info.c: Likewise.
2045 * c-convert.c: Likewise.
2046 * c-decl.c: Likewise.
2047 * c-errors.c: Likewise.
2048 * c-lang.c: Likewise.
2049 * c-objc-common.c: Likewise.
2050 * c-parser.c: Likewise.
2051 * c-typeck.c: Likewise.
2052
e922069e
JW
20532015-10-26 Jim Wilson <jim.wilson@linaro.org>
2054
2055 PR debug/66068
2056 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
2057 after calling build_qualified_type.
2058
765dd391
CP
20592015-10-27 Cesar Philippidis <cesar@codesourcery.com>
2060 Thomas Schwinge <thomas@codesourcery.com>
2061 James Norris <jnorris@codesourcery.com>
2062 Joseph Myers <joseph@codesourcery.com>
2063 Julian Brown <julian@codesourcery.com>
2064 Bernd Schmidt <bschmidt@redhat.com>
2065
2066 * c-parser.c (c_parser_oacc_shape_clause): New.
2067 (c_parser_oacc_simple_clause): New.
2068 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
2069 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
2070
88bae6f4
TS
20712015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2072 James Norris <jnorris@codesourcery.com>
2073 Cesar Philippidis <cesar@codesourcery.com>
2074
2075 PR c/64765
2076 PR c/64880
2077 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
2078 parameters, and handle these. Adjust all users.
2079 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
2080 into...
2081 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
2082 all users.
2083 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2084 declare functions.
2085 (c_finish_omp_construct): Declare function.
2086 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2087 Merge functions into...
2088 (c_finish_omp_construct): ... this new function.
2089
a8fc2579
RB
20902015-10-22 Richard Biener <rguenther@suse.de>
2091
2092 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2093 before folding a MINUS_EXPR.
2094
e9122ef6
MP
20952015-10-21 Marek Polacek <polacek@redhat.com>
2096
2097 PR c/68024
2098 * c-decl.c (start_function): Warn about vararg functions without
2099 a prototype.
2100
9f47c7e5
IE
21012015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2102
2103 * c-typeck.c (build_conditional_expr): Use boolean vector
2104 type for vector comparison.
2105 (build_vec_cmp): New.
2106 (build_binary_op): Use build_vec_cmp for comparison.
2107
fa60eeb9
MP
21082015-10-20 Marek Polacek <polacek@redhat.com>
2109
2110 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2111
2c7020eb
MP
21122015-10-20 Marek Polacek <polacek@redhat.com>
2113
2114 PR c/67964
2115 * c-parser.c (c_parser_attributes): Break out of the loop if the
2116 token after an attribute isn't a comma.
2117
d9a6bd32
JJ
21182015-10-13 Jakub Jelinek <jakub@redhat.com>
2119 Aldy Hernandez <aldyh@redhat.com>
2120
2121 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2122 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2123 (c_parser_omp_variable_list): Handle structure elements for
2124 map, to and from clauses. Handle array sections in reduction
2125 clause. Formatting fixes.
2126 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2127 if clause modifiers.
2128 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2129 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2130 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2131 c_parser_omp_clause_is_device_ptr): New functions.
2132 (c_parser_omp_clause_ordered): Parse optional parameter.
2133 (c_parser_omp_clause_reduction): Handle array reductions.
2134 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2135 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2136 functions.
2137 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2138 (c_parser_omp_clause_depend_sink): New function.
2139 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2140 (c_parser_omp_clause_map): Parse release/delete map kinds and
2141 optional always modifier.
2142 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2143 and c_finish_omp_clauses callers.
2144 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2145 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2146 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2147 (OMP_CRITICAL_CLAUSE_MASK): Define.
2148 (c_parser_omp_critical): Parse critical clauses.
2149 (c_parser_omp_for_loop): Handle doacross loops, adjust
2150 c_finish_omp_for and c_finish_omp_clauses callers.
2151 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2152 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2153 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2154 (c_parser_omp_for): Disallow ordered clause when combined with
2155 distribute. Disallow linear clause when combined with distribute
2156 and not combined with simd.
2157 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2158 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2159 parse clauses and if depend clause is found, don't parse a body.
2160 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2161 Allow target parallel without for after it.
2162 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2163 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2164 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2165 invalid kinds.
2166 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2167 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2168 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2169 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2170 functions.
2171 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2172 defaultmap and is_device_ptr clauses.
2173 (c_parser_omp_target): Parse target parallel and target simd. Set
2174 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2175 and target exit data. Diagnose invalid map kinds.
2176 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2177 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2178 construct.
2179 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2180 &omp_priv.
2181 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2182 (c_parser_omp_taskloop): New function.
2183 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2184 handle PRAGMA_OMP_TASKLOOP.
2185 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2186 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2187 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2188 Add IS_OMP argument, handle structure element bases, diagnose
2189 bitfields, pass IS_OMP recursively, diagnose known zero length
2190 array sections in depend clauses, handle array sections in reduction
2191 clause, diagnose negative length even for pointers.
2192 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2193 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2194 array sections in reduction clause, set
2195 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2196 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2197 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2198 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2199
21ba0cea
MP
22002015-10-06 Marek Polacek <polacek@redhat.com>
2201
2202 * c-parser.c (c_parser_statement_after_labels): Use
2203 protected_set_expr_location.
2204 (c_parser_omp_clause_num_gangs): Likewise.
2205 (c_parser_omp_clause_num_threads): Likewise.
2206 (c_parser_omp_clause_num_workers): Likewise.
2207 (c_parser_omp_clause_vector_length): Likewise.
2208 (c_parser_omp_clause_num_teams): Likewise.
2209 (c_parser_omp_clause_thread_limit): Likewise.
2210 * c-typeck.c (build_c_cast): Likewise.
2211 (c_cast_expr): Likewise.
2212
624d31fe
RS
22132015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2214
2215 * c-typeck.c (c_tree_equal): Use real_equal instead of
2216 REAL_VALUES_EQUAL.
2217
b8fd7909
JM
22182015-10-04 Jason Merrill <jason@redhat.com>
2219
2220 * c-parser.c (c_lex_one_token): Handle @synchronized.
2221 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2222 can change whether the function is transaction_safe.
2223
1c7485af
MP
22242015-10-02 Marek Polacek <polacek@redhat.com>
2225
2226 PR c/67730
2227 * c-typeck.c (convert_for_assignment): Use the expansion point
2228 location throughout.
2229
3e3b8d63
MP
22302015-10-02 Marek Polacek <polacek@redhat.com>
2231
2232 PR c/64249
2233 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2234 and pass it down to c_parser_if_statement.
2235 (c_parser_else_body): Add CHAIN parameter and pass it down to
2236 c_parser_statement_after_labels.
2237 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2238 duplicated if-else-if conditions.
2239
aabef2de
MP
22402015-10-01 Marek Polacek <polacek@redhat.com>
2241
2242 * c-typeck.c (convert_for_assignment): Improve commentary.
2243
de8ddd5f
MP
22442015-09-30 Marek Polacek <polacek@redhat.com>
2245
2246 PR c/67730
2247 * c-typeck.c (c_finish_return): Use the expansion point location for
2248 certain "return with value" warnings.
2249
c4914de6
MLI
22502015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2251
2252 * c-parser.c (pragma_lex): Add loc argument.
2253
0e36f5c7
MP
22542015-09-15 Marek Polacek <polacek@redhat.com>
2255
2256 PR c/67580
2257 * c-decl.c (tag_exists_p): New function.
2258 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2259 struct/union/enum keywords are missing.
2260 * c-tree.h (tag_exists_p): Declare.
2261
2f3bb934
MP
22622015-09-15 Marek Polacek <polacek@redhat.com>
2263
2264 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2265 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2266 Return NULL_TREE instead of 0.
2267 (lookup_name): Return NULL_TREE instead of 0.
2268 (lookup_name_in_scope): Likewise.
2269 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2270 (parser_xref_tag): Use false instead of 0.
2271 (start_struct): Use true instead of 1.
2272 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2273
aa256c4a
MP
22742015-09-14 Marek Polacek <polacek@redhat.com>
2275
2276 * c-typeck.c (set_nonincremental_init_from_string): Use
2277 HOST_WIDE_INT_M1U when shifting a negative value.
2278
dbb68221
MW
22792015-09-09 Mark Wielaard <mjw@redhat.com>
2280
2281 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2282 parm against NULL.
2283
a8a098ac
JJ
22842015-09-10 Jakub Jelinek <jakub@redhat.com>
2285
2286 PR c/67502
2287 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2288 into OMP_FOR_PRE_BODY rather than before the loop.
2289
f4b189d5
JJ
22902015-09-09 Jakub Jelinek <jakub@redhat.com>
2291
0bb99c11
JJ
2292 PR c/67501
2293 * c-parser.c (c_parser_oacc_all_clauses,
2294 c_parser_omp_all_clauses): Remove invalid clause from
2295 list of clauses even if parser->error is set.
2296
fce5e5e3
JJ
2297 PR c/67500
2298 * c-parser.c (c_parser_omp_clause_aligned,
2299 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2300 test for errors.
2301 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2302 error_mark_node.
2303
f4b189d5
JJ
2304 PR c/67495
2305 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2306 instead of c_parser_unary_expression. If the result is !lvalue_p,
2307 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2308
b2aaf235
MP
23092015-09-04 Marek Polacek <polacek@redhat.com>
2310
2311 PR sanitizer/67279
2312 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2313
1807ffc1
MS
23142015-09-03 Martin Sebor <msebor@redhat.com>
2315
2316 PR c/66516
8b652e65
JJ
2317 * c-typeck.c (convert_arguments, parser_build_unary_op,
2318 build_conditional_expr, c_cast_expr, convert_for_assignment,
2319 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2320 reject_gcc_builtin.
2321 (c_decl_implicit): Define.
2322
d04ff417
MP
23232015-09-02 Marek Polacek <polacek@redhat.com>
2324
2325 PR c/67432
2326 * c-parser.c (c_parser_enum_specifier): Give a better error for
2327 an empty enum.
2328
a79683d5
TS
23292015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2330
2331 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2332
191a6b94
MP
23332015-08-12 Marek Polacek <polacek@redhat.com>
2334
2335 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2336 LOC to it.
2337
420a9d9b
MP
23382015-08-03 Marek Polacek <polacek@redhat.com>
2339
2340 PR c/67088
2341 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2342 Use it.
2343 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2344
992118a1
PP
23452015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2346
2347 * c-parser.c (c_parser_if_body): Take token_indent_info
2348 argument. Call warn_for_misleading_indentation even when the
2349 body is a semicolon. Extract token_indent_infos corresponding
2350 to the guard, body and next tokens. Adjust call to
2351 warn_for_misleading_indentation accordingly.
2352 (c_parser_else_body): Likewise.
2353 (c_parser_if_statement): Likewise.
2354 (c_parser_while_statement): Likewise.
2355 (c_parser_for_statement): Likewise.
2356
46308474
LFSM
23572015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2358 Manuel López-Ibáñez <manu@gcc.gnu.org>
2359
2360 * c-decl.c (get_parm_info): Remove static var. Update warning
2361 message.
2362
05b28fd6
MP
23632015-07-27 Marek Polacek <polacek@redhat.com>
2364
2365 PR c++/66555
2366 PR c/54979
2367 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2368
451b5e48
MP
23692015-07-20 Marek Polacek <polacek@redhat.com>
2370
2371 PR c++/55095
2372 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2373 (build_binary_op): Warn about left shift overflows.
2374
1916bcb5
AM
23752015-07-09 Andrew MacLeod <amacleod@redhat.com>
2376
2377 * c-array-notation.c: Adjust includes for flags.h changes.
2378 * c-objc-common.c: Likewise.
2379
c7131fb2
AM
23802015-07-07 Andrew MacLeod <amacleod@redhat.com>
2381
2382 * c-array-notation.c: Adjust includes.
2383 * c-aux-info.c: Likewise.
2384 * c-convert.c: Likewise.
2385 * c-decl.c: Likewise.
2386 * c-errors.c: Likewise.
2387 * c-lang.c: Likewise.
2388 * c-objc-common.c: Likewise.
2389 * c-parser.c: Likewise.
2390 * c-typeck.c: Likewise.
2391
da2e71c9
MLI
23922015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2393
2394 PR fortran/66605
2395 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2396
b155cfd9
MP
23972015-06-29 Marek Polacek <polacek@redhat.com>
2398
2399 PR c/66322
2400 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2401 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2402 about -Wswitch-bool here.
2403 (do_case): Update c_add_case_label call.
2404 (c_finish_case): Update c_do_switch_warnings call.
2405
31521951
MP
24062015-06-27 Marek Polacek <polacek@redhat.com>
2407
2408 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2409
22d03525
MP
24102015-06-26 Marek Polacek <polacek@redhat.com>
2411
2412 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2413 INDIRECT_REF_P.
2414 * c-typeck.c (array_to_pointer_conversion): Likewise.
2415 (build_unary_op): Likewise.
2416 (c_finish_return): Likewise.
2417
f0889939
AM
24182015-06-25 Andrew MacLeod <amacleod@redhat.com>
2419
2420 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2421 * c-parser.c: Likewise.
2422
8d67ee55
RS
24232015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2424
2425 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2426 instead of pointer_hash.
2427 (detect_field_duplicates): Likewise.
2428
0ae9bd27
MP
24292015-06-25 Marek Polacek <polacek@redhat.com>
2430
2431 * c-array-notation.c: Use VAR_P throughout.
2432 * c-decl.c: Likewise.
2433 * c-objc-common.c: Likewise.
2434 * c-parser.c: Likewise.
2435 * c-typeck.c: Likewise.
2436
62f9079a
MP
24372015-06-25 Marek Polacek <polacek@redhat.com>
2438
2439 * c-decl.c: Use is_global_var throughout.
2440 * c-parser.c: Likewise.
2441 * c-typeck.c: Likewise.
2442
abb226c9
AM
24432015-06-17 Andrew MacLeod <amacleod@redhat.com>
2444
2445 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2446 * c-aux-info.c: Likewise.
2447 * c-convert.c: Likewise.
2448 * c-decl.c: Likewise.
2449 * c-errors.c: Likewise.
2450 * c-lang.c: Likewise.
2451 * c-objc-common.c: Likewise.
2452 * c-parser.c: Likewise.
2453 * c-typeck.c: Likewise.
2454
8cbababc
JH
24552015-06-11 Jan Hubicka <hubicka@ucw.cz>
2456
2457 PR middle-end/66325
2458 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2459 variants.
2460
a0349665
PMR
24612015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2462
2463 * c-decl.c (pop_scope): Register the main translation unit
2464 through the new debug hook.
2465
13fdf2e2
AM
24662015-06-08 Andrew MacLeod <amacleod@redhat.com>
2467
2468 * c-array-notation.c : Adjust include files.
2469 * c-aux-info.c : Likewise.
2470 * c-convert.c : Likewise.
2471 * c-decl.c : Likewise.
2472 * c-errors.c : Likewise.
2473 * c-lang.c : Likewise.
2474 * c-lang.h : Likewise.
2475 * c-objc-common.c : Likewise.
2476 * c-parser.c : Likewise.
2477 * c-typeck.c : Likewise.
2478
d7438551
AH
24792015-06-05 Aldy Hernandez <aldyh@redhat.com>
2480
2481 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2482 immediately clobber it.
2483 (c_write_global_declarations_1): Remove call to
2484 check_global_declaration_1.
2485 (c_write_global_declarations_2): Remove.
2486 (c_write_final_cleanups): Rename from c_write_global_declarations.
2487 Remove call to finalize_compilation_unit.
2488 Remove calls to debugging hooks.
2489 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2490 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2491 * c-tree.h: Remove c_write_global_declarations.
2492
ecb9f223
AM
24932015-06-04 Andrew MacLeod <amacleod@redhat.com>
2494
2495 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2496 * c-aux-info.c: Likewise.
2497 * c-convert.c: Likewise.
2498 * c-decl.c: Likewise.
2499 * c-errors.c: Likewise.
2500 * c-lang.c: Likewise.
2501 * c-objc-common.c: Likewise.
2502 * c-parser.c: Likewise.
2503 * c-typeck.c: Likewise.
2504
9482b620
MP
25052015-06-04 Marek Polacek <polacek@redhat.com>
2506
2507 PR c/66341
2508 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2509 it is a lvalue.
2510
bc51ace3
PK
25112015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2512
2513 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2514 Warn for empty struct.
2515 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2516
ea5b45b6
AT
25172015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2518
2519 * c-decl.c (start_function): Call plugin before parsing.
2520 (finish_function): Call plugin after parsing.
2521
c2d47482
PK
25222015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2523
2524 PR c/49551
2525 * c-decl.c (merge_decls): Merge DECL_COMMON.
2526
a95492ab
JW
25272015-05-22 Jim Wilson <jim.wilson@linaro.org>
2528
2529 * Make-lang.in (check_gcc_pallelize): Define.
2530
fd5c817a
MP
25312015-05-22 Marek Polacek <polacek@redhat.com>
2532
2533 PR c/47043
2534 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2535 attributes.
2536
c7b70a3c
MP
25372015-05-21 Marek Polacek <polacek@redhat.com>
2538
2539 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2540 DECL_BUILT_IN.
2541
21b634ae
MP
25422015-05-20 Marek Polacek <polacek@redhat.com>
2543
2544 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2545 * c-typeck.c: Likewise.
2546
296a8c2f
MP
25472015-05-19 Marek Polacek <polacek@redhat.com>
2548
2549 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2550
41b37d5e
JJ
25512015-05-19 Jakub Jelinek <jakub@redhat.com>
2552
2553 PR middle-end/66199
2554 * c-parser.c (c_parser_omp_for_loop): Don't add
2555 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2556 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2557 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2558 constructs.
2559
fab27f52
MM
25602015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2561
2562 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2563 swaps.
fab27f52 2564
40de31cf
MLI
25652015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2566
2567 PR fortran/44054
2568 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2569 accessor function.
2570
3aa3c9fc
MP
25712015-05-14 Marek Polacek <polacek@redhat.com>
2572
2573 PR c/66066
2574 PR c/66127
2575 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2576 rather than with 0.
2577
c3388e62
DM
25782015-05-12 David Malcolm <dmalcolm@redhat.com>
2579
2580 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2581 to add a call to warn_for_misleading_indentation.
2582 (c_parser_else_body): Likewise, adding param "else_loc".
2583 (c_parser_if_statement): Check for misleading indentation.
2584 (c_parser_while_statement): Likewise.
2585 (c_parser_for_statement): Likewise.
2586
755e528f
MP
25872015-05-08 Marek Polacek <polacek@redhat.com>
2588
2589 PR c/64918
2590 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2591 (output_init_element): Likewise.
2592
0173bd2a
MP
25932015-05-07 Marek Polacek <polacek@redhat.com>
2594
2595 PR c/65179
2596 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2597 value.
2598
9babc352
MP
25992015-04-30 Marek Polacek <polacek@redhat.com>
2600
2601 * c-typeck.c (set_init_label): Call error_at instead of error and
2602 pass LOC to it.
2603
ac9f18db
MP
2604 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2605 the type of a decl.
2606
ec3fba51
MP
2607 * c-typeck.c (c_build_va_arg): Clarify the error message.
2608
b811915d
TS
26092015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2610
2611 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2612 OMP_STANDALONE_CLAUSES.
2613
f3075008
MP
26142015-04-28 Marek Polacek <polacek@redhat.com>
2615
2616 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2617
4e81b788
MP
26182015-04-28 Marek Polacek <polacek@redhat.com>
2619
2620 PR c/65901
2621 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2622
6c1db78e
MP
26232015-04-25 Marek Polacek <polacek@redhat.com>
2624
2625 PR c/52085
2626 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2627 attribute.
2628
5c4abbb8
MP
26292015-04-23 Marek Polacek <polacek@redhat.com>
2630
2631 PR c/65345
2632 * c-decl.c (set_labels_context_r): New function.
2633 (store_parm_decls): Call it via walk_tree_without_duplicates.
2634 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2635 instead of create_tmp_var. Build TARGET_EXPR instead of
2636 COMPOUND_EXPR.
2637 (build_atomic_assign): Use create_tmp_var_raw instead of
2638 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2639
06aca1d5
IV
26402015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2641
2642 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2643 (c_parser_omp_target_update): Add missed %> to error_at ().
2644
8fba1830
BRF
26452015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2646
2647 PR target/55143
2648 * c-decl.c (c_default_pointer_mode): Remove definition.
2649 * c-tree.h (c_default_pointer_mode): Remove declaration.
2650
62021f64
TB
26512015-03-27 Tobias Burnus <burnus@net-b.de>
2652
2653 PR c/65586
2654 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2655 error out.
2656 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2657 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2658 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2659
9b65e171
JJ
26602015-03-19 Jakub Jelinek <jakub@redhat.com>
2661
2662 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2663 attribute for DECL_EXTERNAL VAR_DECLs.
2664
17958621
JJ
26652015-03-11 Jakub Jelinek <jakub@redhat.com>
2666
2667 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2668 argument.
2669
7ccb1a11
JJ
26702015-03-10 Jakub Jelinek <jakub@redhat.com>
2671
2672 PR c/65120
2673 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2674 before preparing arguments to warn_logical_not_parentheses.
2675
01177669
JJ
26762015-03-09 Jakub Jelinek <jakub@redhat.com>
2677
2678 PR c/65120
2679 * c-typeck.c (parser_build_binary_op): Don't warn for
2680 !!x == y or !b == y where b is _Bool.
2681
802ac282
MP
26822015-03-09 Marek Polacek <polacek@redhat.com>
2683
2684 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2685 * c-decl.c (grokdeclarator): Likewise.
2686 * c-typeck.c (build_binary_op): Likewise.
2687
e5165b60
MP
26882015-02-27 Marek Polacek <polacek@redhat.com>
2689
2690 PR c/65228
2691 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2692
065d214c
MP
26932015-02-14 Marek Polacek <polacek@redhat.com>
2694
2695 PR c/64768
2696 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2697 declared through a typedef name.
2698
e5d9235b
MP
26992015-02-13 Marek Polacek <polacek@redhat.com>
2700
2701 PR c/65050
2702 * c-decl.c (grokdeclarator): Print also the type when giving
2703 the error message about array's incomplete element type.
2704
fa01ffcc
JJ
27052015-02-11 Jakub Jelinek <jakub@redhat.com>
2706
2707 PR c/64824
2708 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2709 check in the POP macro.
2710
c3e38a03
MP
27112015-02-09 Marek Polacek <polacek@redhat.com>
2712
2713 PR c/64856
2714 * c-typeck.c (process_init_element): Don't always wrap
2715 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2716 initializing a range of elements.
2717
4886ec8e
JJ
27182015-02-04 Jakub Jelinek <jakub@redhat.com>
2719
2720 PR c/64824
2721 PR c/64868
2722 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2723
c3e38a03 27242015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2725
2726 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2727 processing enum declaration.
2728
7b33f0c8
MP
27292015-01-29 Marek Polacek <polacek@redhat.com>
2730
2731 PR c/64709
2732 * c-typeck.c (pop_init_level): If constructor_elements has
2733 exactly one element with integer_zerop value, set constructor_zeroinit
2734 to 1. Remove braces around warning_init call.
2735
dea63e49
JJ
27362015-01-27 Jakub Jelinek <jakub@redhat.com>
2737
2738 PR c/64766
2739 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2740 of FUNCTION_DECLs with error_mark_node.
2741
d38f7dce
JJ
27422015-01-26 Jakub Jelinek <jakub@redhat.com>
2743
2744 PR c/64778
2745 * c-typeck.c (convert_arguments): Return -1 if there are
2746 error_args, even if we've diagnosed too many arguments.
2747
cbf5d0e7
RB
27482015-01-21 Richard Biener <rguenther@suse.de>
2749
2750 PR middle-end/64313
2751 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2752 for builtins the user declared correctly.
2753
41dbbb37
TS
27542015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2755 Bernd Schmidt <bernds@codesourcery.com>
2756 Cesar Philippidis <cesar@codesourcery.com>
2757 James Norris <jnorris@codesourcery.com>
2758 Jakub Jelinek <jakub@redhat.com>
2759 Ilmir Usmanov <i.usmanov@samsung.com>
2760
2761 * c-parser.c: Include "gomp-constants.h".
2762 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2763 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2764 Use OMP_CLAUSE_SET_MAP_KIND.
2765 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2766 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2767 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2768 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2769 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2770 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2771 "copyout", "create", "delete", "deviceptr", "gang", "host",
2772 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2773 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2774 "present_or_create", "pcreate", "seq", "self", "vector",
2775 "vector_length", "wait", "worker".
2776 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2777 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2778 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2779 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2780 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2781 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2782 (c_parser_oacc_data_clause_deviceptr)
2783 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2784 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2785 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2786 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2787 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2788 (c_parser_oacc_parallel, c_parser_oacc_update)
2789 (c_parser_oacc_wait): New functions.
2790 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2791 (c_finish_oacc_data): New prototypes.
2792 * c-typeck.c: Include "gomp-constants.h".
2793 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2794 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2795 OMP_CLAUSE_SET_MAP_KIND.
2796 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2797 (c_finish_oacc_data): New functions.
2798 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2799 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2800 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2801 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2802 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2803 GOMP_MAP_FORCE_DEVICEPTR.
2804
adfac8df
JJ
28052015-01-09 Michael Collison <michael.collison@linaro.org>
2806
2807 * c-array-notation.c: Include hash-set.h, machmode.h,
2808 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2809 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2810 * c-aux-info.c: Ditto.
2811 * c-convert.c: Ditto.
2812 * c-decl.c: Ditto.
2813 * c-errors.c: Ditto.
2814 * c-lang.c: Dittoxs.
2815 * c-objc-common.c: Ditto.
2816 * c-parser.c: Ditto.
2817 * c-typeck.c: Include hash-set.h, machmode.h,
2818 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2819 fold-const.h, wide-int.h, inchash.h, real.h and
2820 fixed-value.h due to flattening of tree.h.
2821
2cc901dc
MP
28222015-01-07 Marek Polacek <polacek@redhat.com>
2823
2824 PR c/64417
2825 * c-typeck.c (process_init_element): Disallow initialization of
2826 a flexible array member with a string constant if the structure
2827 is in an array.
2828
5624e564
JJ
28292015-01-05 Jakub Jelinek <jakub@redhat.com>
2830
e5341100
JJ
2831 PR sanitizer/64344
2832 * c-typeck.c (convert_for_assignment, c_finish_return): For
2833 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2834 types also set in_late_binary_op around convert call.
2835 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2836 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2837 result on expr as last argument to ubsan_instrument_float_cast,
2838 if in_late_binary_op, don't use c_save_expr but save_expr.
2839
5624e564
JJ
2840 Update copyright years.
2841
5bd012f8
MP
28422015-01-05 Marek Polacek <polacek@redhat.com>
2843
2844 PR c/64423
2845 * c-typeck.c (build_array_ref): Pass loc down to
2846 warn_array_subscript_with_type_char.
2847
3f8257db 28482014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2849
2850 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2851 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2852 element type.
8e745a17 2853 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2854 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2855 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2856 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2857 to PEDWARN_FOR_QUALIFIERS.
768952be 2858
8f94a8c4
JJ
28592014-12-17 Jakub Jelinek <jakub@redhat.com>
2860
2861 PR sanitizer/64289
2862 * c-convert.c: Include ubsan.h.
2863 (convert): For real -> integral casts and
2864 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2865 instead instrument the float cast directly.
2866
b731b390
JJ
28672014-11-29 Jakub Jelinek <jakub@redhat.com>
2868
2869 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2870 c_finish_stmt_expr): Remove NULL last argument from
2871 create_tmp_var_raw and create_tmp_var calls.
2872 * c-array-notation.c (fix_builtin_array_notation_fn,
2873 build_array_notation_expr, fix_conditional_array_notations_1,
2874 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2875
541e35a6
MP
28762014-11-28 Marek Polacek <polacek@redhat.com>
2877
2878 PR c/63862
2879 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2880 convert the right operand to integer type.
2881
b286be94
MP
28822014-11-25 Marek Polacek <polacek@redhat.com>
2883
2884 PR c/63877
2885 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2886 for inline functions.
2887
aa7da51a
JJ
28882014-11-21 Jakub Jelinek <jakub@redhat.com>
2889
2890 PR target/63764
2891 * c-typeck.c (build_array_ref): Adjust
2892 convert_vector_to_pointer_for_subscript caller. If it returns true,
2893 call non_lvalue_loc on the result.
2894
d876207f
RB
28952014-11-11 Richard Biener <rguenther@suse.de>
2896
2897 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2898 to true.
2899
e5e44252
AK
29002014-11-10 Andi Kleen <ak@linux.intel.com>
2901
2902 PR c/60804
2903 * c-parser.c (c_parser_statement_after_labels): Call
2904 check_no_cilk.
2905 (c_parser_if_statement): Dito.
2906 (c_parser_switch_statement): Dito.
2907 (c_parser_while_statement): Dito.
2908 (c_parser_do_statement): Dito.
2909 (c_parser_for_statement): Dito.
2910 * c-typeck.c (c_finish_loop): Dito.
2911
13c21655
PC
29122014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2913
2914 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2915 OPT_Wshift_count_overflow in the warnings.
2916
2d51fcef
MP
29172014-10-30 Marek Polacek <polacek@redhat.com>
2918
2919 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2920 print the stripped version as well, if they're not the same.
2921
ef4bddc2
RS
29222014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2923
2924 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2925 machine_mode.
2926
c582198b
AM
29272014-10-28 Andrew MacLeod <amacleod@redhat.com>
2928
2929 * c-decl.c: Adjust include files.
2930 * c-parser.c: Ditto.
2931
ddc8de03
PM
29322014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2933 Tom Tromey <tromey@redhat.com>
2934
2935 * c-tree.h (enum c_oracle_request): New.
2936 (c_binding_oracle_function): New typedef.
2937 (c_binding_oracle, c_pushtag, c_bind): Declare.
2938 * c-decl.c (c_binding_oracle): New global.
2939 (I_SYMBOL_CHECKED): New macro.
2940 (i_symbol_binding): New function.
2941 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2942 (I_TAG_CHECKED): New macro.
2943 (i_tag_binding): New function.
2944 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2945 (I_LABEL_CHECKED): New macro.
2946 (i_label_binding): New function.
2947 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2948 (c_print_identifier): Save and restore c_binding_oracle.
2949 (c_pushtag, c_bind): New functions.
2950
60393bbc
AM
29512014-10-27 Andrew MacLeod <amacleod@redhat.com>
2952
2953 * c-typeck.c: Adjust include files.
2954
d723bb7c
MLI
29552014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2956
2957 PR c++/53061
2958 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2959 initialization here...
2960 (c_initialize_diagnostics): ... but here. Set defaults after
2961 building pretty-printer.
2962
1bc5a451
MP
29632014-10-23 Marek Polacek <polacek@redhat.com>
2964
2965 PR c/63626
2966 * c-decl.c (pop_scope): Don't print warning in external_scope.
2967
4435bb92
MP
29682014-10-19 Marek Polacek <polacek@redhat.com>
2969
2970 PR c/63567
2971 * c-typeck.c (output_init_element): Allow initializing objects with
2972 static storage duration with compound literals even in C99 and add
2973 pedwarn for it.
2974
7278465e
MP
29752014-10-17 Marek Polacek <polacek@redhat.com>
2976
2977 PR c/63567
2978 * c-typeck.c (digest_init): Allow initializing objects with static
2979 storage duration with compound literals even in C99 and add pedwarn
2980 for it.
2981
d9b7be2e
MP
29822014-10-17 Marek Polacek <polacek@redhat.com>
2983
2984 PR c/63543
2985 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2986 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2987 error multiple times. Print the type.
2988
f406ae1f
MP
29892014-10-17 Marek Polacek <polacek@redhat.com>
2990
2991 PR c/63549
2992 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2993 type.
2994
92574c7c
MP
29952014-10-17 Marek Polacek <polacek@redhat.com>
2996
2997 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2998 (start_function): Use OPT_Wimplicit_int instead of 0.
2999 (store_parm_decls_oldstyle): Likewise.
3000
1bc4a978
MT
30012014-10-17 Alan Modra <amodra@gmail.com>
3002
3003 PR middle-end/61848
3004 * c-decl.c (merge_decls): Don't merge section name or tls model
3005 to newdecl symtab node, instead merge to olddecl. Override
3006 existing olddecl section name. Set tls_model for all thread-local
3007 vars, not just OMP thread-private ones. Remove incorrect comment.
3008
83685514
AM
30092014-10-16 Andrew MacLeod <amacleod@redhat.com>
3010
3011 * c-decl.c: Adjust include files.
3012
78a7c317
DD
30132014-10-14 DJ Delorie <dj@redhat.com>
3014
3015 * c-parser.c (c_parse_init): Add RID entries for each __intN.
3016 (c_token_starts_typename): Check all __intN, not just __int128.
3017 (c_token_starts_declspecs): Likewise.
3018 (c_parser_declspecs): Likewise.
3019 (c_parser_attribute_any_word): Likewise.
3020 (c_parser_objc_selector): Likewise.
3021 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
3022 (struct c_declspecs): Add int_n_idx field to record *which* __intN
3023 is specified.
3024 * c-decl.c (declspecs_add_type): Check for all __intN, not just
3025 __int128.
3026 (finish_declspecs): Likewise.
3027
74d98c1e
AB
30282014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
3029
8e745a17 3030 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 3031 the duplicate code.
8e745a17 3032 (c_parser_statement): Call the new function.
74d98c1e 3033
84937de2
MP
30342014-10-09 Marek Polacek <polacek@redhat.com>
3035
3036 PR c/63480
3037 * c-typeck.c (pop_init_level): Don't warn about initializing
3038 with { }.
3039
0382aaa0
MP
30402014-10-07 Marek Polacek <polacek@redhat.com>
3041
3042 PR c/59717
3043 * c-decl.c (header_for_builtin_fn): New function.
3044 (implicitly_declare): Suggest which header to include.
3045
7a0ca710
MP
30462014-10-07 Marek Polacek <polacek@redhat.com>
3047
3048 * c-convert.c (convert): Use error_operand_p.
3049 * c-typeck.c (require_complete_type): Likewise.
3050 (really_atomic_lvalue): Likewise.
3051 (digest_init): Likewise.
3052 (handle_omp_array_sections_1): Likewise.
3053
6bc8a126
MP
30542014-10-03 Marek Polacek <polacek@redhat.com>
3055
3056 PR c/63453
3057 * c-decl.c (pop_scope): Don't warn about "inline function declared
3058 but never defined" for functions marked with gnu_inline attribute.
3059
d90c0a59
JJ
30602014-09-25 Jakub Jelinek <jakub@redhat.com>
3061
3062 PR c++/63249
3063 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
3064 on low_bound and length.
3065
083e891e
MP
30662014-09-24 Marek Polacek <polacek@redhat.com>
3067
3068 PR c/61405
3069 PR c/53874
3070 * c-parser.c: Don't define CPP_KEYWORD.
3071 (c_parser_switch_statement): Pass original type to c_finish_case.
3072 * c-tree.h (c_finish_case): Update declaration.
3073 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
3074 conditionally to c_do_switch_warnings.
3075
8d95fe25
MP
30762014-09-03 Marek Polacek <polacek@redhat.com>
3077
3078 PR c/62024
3079 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
3080 conversions.
3081
9a771876
JJ
30822014-09-02 Jakub Jelinek <jakub@redhat.com>
3083 Balaji V. Iyer <balaji.v.iyer@intel.com>
3084 Igor Zamyatin <igor.zamyatin@intel.com>
3085
3086 * c-parser.c (c_parser_cilk_for): New function.
3087 (c_parser_cilk_grainsize): Likewise.
3088 (c_get_temp_regvar): Likewise.
3089 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3090 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3091 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3092 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3093 case.
3094
b7679d96
CG
30952014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3096
3097 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3098 with using HOST_WIDE_INT without truncation to 'int'
3099
59ea0364
MP
31002014-08-22 Marek Polacek <polacek@redhat.com>
3101
3102 PR c++/62199
3103 * c-typeck.c (parser_build_binary_op): Adjust call to
3104 warn_logical_not_parentheses.
3105
671a475e
IZ
31062014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3107
3108 PR other/62008
3109 * c-parser.c (c_parser_array_notation): Check for correct
3110 type of an array added.
3111
04159acf
MP
31122014-08-19 Marek Polacek <polacek@redhat.com>
3113
3114 PR c++/62153
3115 * c-typeck.c (build_binary_op): If either operand of a comparison
3116 is a boolean expression, call maybe_warn_bool_compare.
3117
c77935ee
PP
31182014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3119
3120 PR c/45584
3121 * c-typeck.c (build_c_cast): Do a conversion even when the
3122 TYPE_MAIN_VARIANTs are the same.
3123
35aff4fb
MP
31242014-08-19 Marek Polacek <polacek@redhat.com>
3125
3126 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3127 pedwarn_c99 instead of pedwarn.
3128 (grokfield): Likewise.
3129 (warn_defaults_to): New function.
3130 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3131 Unconditionally call pedwarn_c99 instead of pedwarn.
3132 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3133 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3134 check flag_isoc11 before.
3135 * c-errors.c (pedwarn_c99): Change the return type to bool.
3136 Handle -Wc99-c11-compat.
3137 * c-parser.c (disable_extension_diagnostics): Handle
3138 warn_c99_c11_compat.
3139 (restore_extension_diagnostics): Likewise.
3140 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3141 instead of pedwarn, don't check flag_isoc11 before.
3142 (c_parser_declspecs): Likewise.
3143 (c_parser_alignas_specifier): Likewise.
3144 (c_parser_alignof_expression): Likewise.
3145 (c_parser_generic_selection): Likewise.
3146 * c-tree.h (pedwarn_c99): Update declaration.
3147 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3148 of pedwarn_c99.
3149
177cce46
MP
31502014-08-19 Marek Polacek <polacek@redhat.com>
3151
3152 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3153 to pedwarn_c90.
3154 * c-errors.c: Include "opts.h".
3155 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3156 * c-parser.c (disable_extension_diagnostics): Handle negative value
3157 of warn_c90_c99_compat, too.
3158 (restore_extension_diagnostics): Likewise.
3159 (c_parser_compound_statement_nostart): Pass
3160 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3161
6dc99c33
MP
31622014-08-12 Marek Polacek <polacek@redhat.com>
3163
3164 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3165 Add pedwarn.
3166 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3167 Likewise.
3168 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3169
3f8257db 31702014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3171
3172 PR c/51849
3173 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3174 Call pedwarn_c90 instead of pedwarn.
3175 (check_bitfield_type_and_width): Likewise.
3176 (declspecs_add_qual): Likewise.
3177 (declspecs_add_type): Likewise.
3178 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3179 Adjust to only call pedwarn_c90.
3180 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3181 pedwarn_c90 instead of pedwarn.
3182 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3183 * c-parser.c (disable_extension_diagnostics): Handle
3184 warn_c90_c99_compat.
3185 (restore_extension_diagnostics): Likewise.
3186 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3187 pedwarn_c90 instead of pedwarn.
3188 (c_parser_initelt): Likewise.
3189 (c_parser_postfix_expression): Likewise.
3190 (c_parser_postfix_expression_after_paren_type): Likewise.
3191 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3192 * c-tree.h: Fix formatting.
3193 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3194 pedwarn_c90 instead of pedwarn.
3195
9f25a338
TS
31962014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3197
3198 * c-typeck.c: Remove include of pointer-set.h.
3199
044331a8
MP
32002014-08-07 Marek Polacek <polacek@redhat.com>
3201
3202 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3203
b787e7a2
TS
32042014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3205
3206 * c-typeck.c: Use hash_map instead of pointer_map.
3207
6e2830c3
TS
32082014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3209
3210 * c-decl.c: Use hash_set instead of pointer_set.
3211
a7ee52fb
IZ
32122014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3213
3214 PR middle-end/61455
3215 * c-array-notation.c (expand_array_notations): Handling
3216 of DECL_EXPR added.
3217
b4dfdc11
MG
32182014-07-31 Marc Glisse <marc.glisse@inria.fr>
3219
3220 PR c++/60517
3221 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3222 a local variable.
3223
976d5a22
TT
32242014-07-30 Tom Tromey <tromey@redhat.com>
3225
3226 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3227 field.
3228 (really_start_incremental_init, push_init_level): Initialize
3229 designator_depth.
3230 (pop_init_level): Set global designator_depth.
3231 (process_init_element): Check for designated_init attribute.
3232
30281de2
MP
32332014-07-20 Marek Polacek <polacek@redhat.com>
3234
3235 PR c/61852
3236 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3237 (implicitly_declare): Pass location to implicit_decl_warning.
3238
b108f48f
JJ
32392014-07-14 Jakub Jelinek <jakub@redhat.com>
3240
3241 PR middle-end/61294
3242 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3243 If non-NULL, call c_parser_check_literal_zero.
3244 (c_parser_check_literal_zero): New function.
3245 (c_parser_postfix_expression_after_primary): Adjust
3246 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3247
773ec47f
MP
32482014-07-06 Marek Polacek <polacek@redhat.com>
3249
3250 PR c/6940
3251 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3252 * c-tree.h (C_ARRAY_PARAMETER): Define.
3253 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3254 function parameter.
3255
22e1cf1c 32562014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3257 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3258
3259 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3260 releasing symbol.
3261
52ec0ea3
MP
32622014-07-01 Marek Polacek <polacek@redhat.com>
3263
3264 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3265 instead of 0 to WARN_FOR_ASSIGNMENT.
3266
d5c3d343
MP
32672014-07-01 Marek Polacek <polacek@redhat.com>
3268
3269 PR c/58286
3270 * c-typeck.c (convert_for_assignment): Pass
3271 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3272
6a7253a4
MP
32732014-06-30 Marek Polacek <polacek@redhat.com>
3274
3275 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3276 has no_sanitize_undefined attribute.
3277
5e88a8f4
IZ
32782014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3279
3280 PR middle-end/57541
3281 * c-array-notation.c (fix_builtin_array_notation_fn):
3282 Check for 0 arguments in builtin call. Check that bultin argument is
3283 correct.
3284 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3285 index.
3286
9698b078
SH
32872014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3288
3289 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3290 qualifiers in __auto_type for atomic types.
3291 (c_parser_typeof_specifier): Discard all type qualifiers in
3292 __typeof__ for atomic types.
3293
6e07c515
MP
32942014-06-25 Marek Polacek <polacek@redhat.com>
3295
3296 PR c/61162
3297 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3298 the return expression to c_finish_return.
3299
da6f124d
JJ
33002014-06-25 Jakub Jelinek <jakub@redhat.com>
3301
3302 * c-typeck.c (c_finish_omp_clauses): Make sure
3303 OMP_CLAUSE_LINEAR_STEP has correct type.
3304
c203e8a7
TS
33052014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3306
3307 * c-decl.c: Adjust.
3308
56ad0e38
JJ
33092014-06-24 Jakub Jelinek <jakub@redhat.com>
3310
3311 * c-parser.c (c_parser_omp_for_loop): For
3312 #pragma omp parallel for simd move lastprivate clause from parallel
3313 to for rather than simd.
3314
47c2554f
MP
33152014-06-23 Marek Polacek <polacek@redhat.com>
3316
3317 * c-typeck.c (parser_build_binary_op): Don't call
3318 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3319
56363ffd
JH
33202014-06-15 Jan Hubicka <hubicka@ucw.cz>
3321
3322 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3323 * c-decl.c (merge_decls): Likewise.
3324
d7ff7ae5
MP
33252014-06-09 Marek Polacek <polacek@redhat.com>
3326
3327 PR c/36446
3328 * c-typeck.c (error_init): Call inform instead of error_at.
3329 (pedwarn_init): Call inform instead of pedwarn.
3330 (warning_init): Call inform instead of warning_at.
3331
24d047a3
JH
33322014-06-07 Jan Hubicka <hubicka@ucw.cz>
3333
3334 * c-decl.c (merge_decls): Use set_decl_section_name.
3335 (duplicate_decls): Remove node if it exists.
3336
9bac5cbb
G
33372014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3338
3339 PR c/53119
3340 * c-typeck.c (push_init_level, process_init_element,
3341 pop_init_level): Correct check for zero initialization, move
3342 missing brace warning to respect zero initialization.
3343
8ffcdea8
MP
33442014-06-05 Marek Polacek <polacek@redhat.com>
3345
3346 PR c/56724
3347 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3348
742938c9
MP
33492014-06-05 Marek Polacek <polacek@redhat.com>
3350
3351 PR c/49706
3352 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3353 on the left hand side operand of a comparison.
3354
6447c55d
MP
33552014-06-05 Marek Polacek <polacek@redhat.com>
3356
3357 PR c/48062
3358 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3359 Print note only if the warning was printed.
3360
9dc7743c
IZ
33612014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3362
3363 PR c/58942
3364 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3365 with a pointer.
3366
fedfecef
MP
33672014-06-03 Marek Polacek <polacek@redhat.com>
3368
3369 PR c/60439
3370 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3371 c_start_case.
3372 * c-tree.h (c_start_case): Update.
3373 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3374 switch condition has boolean value.
3375
9b2b7279
AM
33762014-06-02 Andrew MacLeod <amacleod@redhat.com>
3377
3378 * c-decl.c: Include builtins.h.
3379 * c-parser.c: Likewise.
3380
5c1bc275
MP
33812014-05-27 Marek Polacek <polacek@redhat.com>
3382
3383 PR c/56724
3384 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3385 error and warning calls to error_at and warning_at. Pass location of
3386 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3387 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3388 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3389
97563bc8
IZ
33902014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3391
3392 PR c/61191
3393 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3394 function parameters.
3395
aede2c10
JH
33962014-05-23 Jan Hubicka <hubicka@ucw.cz>
3397
3398 * c-decl.c (merge_decls): Preserve symtab node pointers.
3399 (duplicate_decls): Free new decl.
3400
edbba2ce
TS
34012014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3402
f3316c6d
TS
3403 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3404 initialization.
3405
edbba2ce
TS
3406 * c-parser.c (c_parser_omp_target): Return bool values.
3407
68c81f24
TS
34082014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3409
3410 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3411 num_teams_loc variable to num_thread_limit_loc.
3412
632f2871
RS
34132014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3414
3415 * c-array-notation.c (expand_array_notations): Use void_node
3416 instead of void_zero_node.
3417
766090c2
TS
34182014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3419
3420 * c-decl.c (finish_struct): Adjust.
3421 (finish_enum): Likewise.
3422 (bind): Adjust.
3423 (record_inline_static): Likewise.
3424 (push_scope): Likewise.
3425 (make_label): Likewise.
3426 (lookup_label_for_goto): Likewise.
3427 (finish_struct): Likewise.
3428 (finish_enum): Likewise.
3429 (store_parm_decls): Likewise.
3430 (c_push_function_context): Likewise.
3431 * c-lang.h: Remove usage of variable_size gty attribute.
3432 * c-parser.c (c_parse_init): Adjust.
3433 (c_parse_file): Likewise.
3434
2b107f6b
MP
34352014-05-13 Marek Polacek <polacek@redhat.com>
3436
3437 PR c/61162
3438 * c-typeck.c (convert_for_assignment): Pass location to
3439 WARN_FOR_ASSIGNMENT instead of input_location.
3440
d033409e
MP
34412014-05-10 Marek Polacek <polacek@redhat.com>
3442
3443 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3444 maybe_warn_string_init.
3445 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3446 maybe_warn_string_init.
3447 * c-tree.h (maybe_warn_string_init): Update declaration.
3448 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3449 Call pedwarn_init with loc instead of with input_location.
3450 (digest_init): Pass init_loc to maybe_warn_string_init.
3451 (pop_init_level): Call pedwarn_init with loc instead of with
3452 input_location.
3453 (set_init_index): Likewise.
3454 (process_init_element): Likewise.
3455
ea58ef42
MP
34562014-05-09 Marek Polacek <polacek@redhat.com>
3457
3458 PR c/61096
3459 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3460 (c_parser_initelt): Pass location to set_init_label. Pass array index
3461 location to set_init_index.
3462 * c-tree.h (push_init_level): Update declaration.
3463 (pop_init_level): Likewise.
3464 (set_init_index): Likewise.
3465 (set_init_label): Likewise.
3466 * c-typeck.c (error_init): Add location parameter. Call error_at
3467 instead of error.
3468 (digest_init): Pass init_loc to error_init.
3469 (really_start_incremental_init):
3470 (push_init_level): Add location parameter. Pass loc to pop_init_level
3471 and error_init.
3472 (pop_init_level): Likewise.
3473 (set_designator): Add location parameter. Pass loc to pop_init_level,
3474 push_init_level, and error_init.
3475 (set_init_index): Add location parameter. Pass loc to error_init and
3476 set_designator.
3477 (set_init_label): Likewise.
3478 (output_init_element): Pass loc to error_init.
3479 (process_init_element): Pass loc to error_init, pop_init_level,
3480 pedwarn_init, and push_init_level.
3481
661a0813
MP
34822014-05-09 Marek Polacek <polacek@redhat.com>
3483
3484 PR c/50459
3485 * c-parser.c (c_parser_attributes): Parse the arguments as an
3486 expression-list if the attribute takes identifier.
3487
2793eeab
MP
34882014-05-08 Marek Polacek <polacek@redhat.com>
3489
3490 PR c/61053
3491 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3492 TYPE_ALIGN_UNIT.
3493
f827930a
MP
34942014-05-08 Marek Polacek <polacek@redhat.com>
3495
3496 PR c/61077
3497 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3498 of main.
3499
1d60af08
KZ
35002014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3501 Mike Stump <mikestump@comcast.net>
3502 Richard Sandiford <rdsandiford@googlemail.com>
3503
3504 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3505 (finish_enum): Use wide-int interfaces.
3506 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3507 * c-typeck.c (build_c_cast): Likewise.
3508 (set_nonincremental_init_from_string): Likewise.
3509 (c_tree_equal): Likewise.
3510
a0e24419
MP
35112014-05-02 Marek Polacek <polacek@redhat.com>
3512
3513 PR c/25801
3514 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3515 Return size_one_node when the type is not complete.
3516 (pointer_diff): Remove comment.
3517 (build_unary_op): Improve error messages.
3518
19fc9faa
MP
35192014-05-02 Marek Polacek <polacek@redhat.com>
3520
3521 * c-typeck.c (c_finish_return): Separate warning_at calls.
3522
63bc4e87
MP
35232014-05-02 Marek Polacek <polacek@redhat.com>
3524
3525 * c-tree.h (error_init): Remove declaration.
3526 (pedwarn_init): Likewise.
3527 * c-typeck.c (error_init): Make static and move above.
3528 (pedwarn_init): Likewise.
3529 (warning_init): Move above.
3530 (maybe_warn_string_init): Likewise.
3531
4bd2511b
JL
35322014-05-01 Jeff Law <law@redhat.com>
3533
3534 Revert:
3535
3536 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3537 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3538 avoid goto.
3539
6a358dcb
MP
35402014-05-02 Marek Polacek <polacek@redhat.com>
3541
3542 PR c/60784
3543 * c-typeck.c (push_init_level): Set constructor_designated to
3544 p->designated for structures.
3545
ae5ebda4
MP
35462014-05-01 Marek Polacek <polacek@redhat.com>
3547
3548 PR c/60915
3549 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3550 function-definition has an attribute after the declarator.
3551
96b40f8d
MP
35522014-05-01 Marek Polacek <polacek@redhat.com>
3553
3554 PR c/60257
3555 * c-typeck.c (warning_init): Add location_t parameter. Call
3556 warning_at instead of warning.
3557 (push_init_level): Pass input_location to warning_init.
3558 (add_pending_init): Add location_t parameter. Pass loc to
3559 warning_init.
3560 (set_nonincremental_init): Pass input_location to add_pending_init.
3561 (set_nonincremental_init_from_string): Likewise.
3562 (output_init_element): Pass loc to warning_init and to
3563 add_pending_init.
3564
32e00768
MP
35652014-05-01 Marek Polacek <polacek@redhat.com>
3566
3567 PR c/43395
3568 * c-typeck.c (c_finish_return): Distinguish between label and variable
3569 when warning about returning local address.
3570
c9379ce2
MP
35712014-05-01 Marek Polacek <polacek@redhat.com>
3572
3573 PR c/29467
3574 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3575 in C89 mode.
3576
d00887e8
MP
35772014-05-01 Marek Polacek <polacek@redhat.com>
3578
3579 PR c/43245
3580 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3581 instead of 0 to WARN_FOR_QUALIFIERS.
3582
5436fa2e
MP
35832014-05-01 Marek Polacek <polacek@redhat.com>
3584
3585 PR c/56989
3586 * c-typeck.c (default_conversion): Use better location for
3587 error call.
3588
f8ed5150
MP
35892014-04-30 Marek Polacek <polacek@redhat.com>
3590
3591 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3592 also when SANITIZE_FLOAT_DIVIDE is on.
3593
8337d1db
MP
35942014-04-30 Marek Polacek <polacek@redhat.com>
3595
3596 PR c/60139
3597 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3598 and pedwarn_init. Use loc insted of input_location.
3599
c4bdc42f
MP
36002014-04-30 Marek Polacek <polacek@redhat.com>
3601
3602 PR c/60351
3603 * c-typeck.c (build_binary_op): Use location when warning about
3604 shift count.
3605
45484dcf
MP
36062014-04-25 Marek Polacek <polacek@redhat.com>
3607
3608 PR c/18079
3609 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3610 always_inline/noinline and hot/cold attributes.
3611
34cf811f
MP
36122014-04-25 Marek Polacek <polacek@redhat.com>
3613
3614 PR c/60114
3615 * c-parser.c (c_parser_initelt): Pass input_location to
3616 process_init_element.
3617 (c_parser_initval): Pass loc to process_init_element.
3618 * c-tree.h (process_init_element): Adjust declaration.
3619 * c-typeck.c (push_init_level): Pass input_location to
3620 process_init_element.
3621 (pop_init_level): Likewise.
3622 (set_designator): Likewise.
3623 (output_init_element): Add location_t parameter. Pass loc to
3624 digest_init.
3625 (output_pending_init_elements): Pass input_location to
3626 output_init_element.
3627 (process_init_element): Add location_t parameter. Pass loc to
3628 output_init_element.
3629
42056eac
JJ
36302014-04-24 Jakub Jelinek <jakub@redhat.com>
3631
3632 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3633 atomic-clause, allow comma in between atomic-clause and
3634 seq_cst.
3635
e162a134
JJ
36362014-04-22 Jakub Jelinek <jakub@redhat.com>
3637
3638 PR c/59073
3639 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3640 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3641
2f6babac
IZ
36422014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3643
3644 PR middle-end/60469
3645 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3646 create_tmp_var instead build_decl for creating temps.
3647 (build_array_notation_expr): Likewise.
3648 (fix_conditional_array_notations_1): Likewise.
3649 (fix_array_notation_expr): Likewise.
3650 (fix_array_notation_call_expr): Likewise.
3651
8edbfaa6
JJ
36522014-03-28 Jakub Jelinek <jakub@redhat.com>
3653
3654 PR c++/60689
3655 * c-tree.h (c_build_function_call_vec): New prototype.
3656 * c-typeck.c (build_function_call_vec): Don't call
3657 resolve_overloaded_builtin here.
3658 (c_build_function_call_vec): New wrapper function around
3659 build_function_call_vec. Call resolve_overloaded_builtin here.
3660 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3661 Call c_build_function_call_vec instead of build_function_call_vec.
3662 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3663 * c-decl.c (finish_decl): Likewise.
3664
7485aeea
MLI
36652014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3666
3667 PR c/55383
3668 * c-typeck.c: Use correct format string in cast-qual warning
3669
b17a8b07
TS
36702014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3671
3672 * c-decl.c (c_decl_attributes): Use
3673 lang_hooks.types.omp_mappable_type.
3674 * c-typeck.c (c_finish_omp_clauses): Likewise.
3675
3af9c5e9
MP
36762014-03-06 Marek Polacek <polacek@redhat.com>
3677
3678 PR c/60197
3679 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3680 of checking tree code.
3681
1c9f5f33
PK
36822014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3683
3684 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3685 (c_parser_parameter_declaration): Likewise.
3686
cc28fc7f
MP
36872014-02-19 Marek Polacek <polacek@redhat.com>
3688
3689 PR c/60195
3690 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3691 Call mark_exp_read on exp.value.
3692 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3693 TREE_ADDRESSABLE on old instead of val.
3694 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3695
b581c05c
PK
36962014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3697
3698 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3699 C_EXPR_APPEND by vec_safe_push.
3700 * c-tree.h (C_EXPR_APPEND): Remove.
3701
81e5eca8
MP
37022014-01-31 Marek Polacek <polacek@redhat.com>
3703
3704 PR c/59963
3705 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3706 build_function_call_vec.
3707 (build_function_call): Likewise.
3708 (build_atomic_assign): Likewise.
3709 (build_function_call_vec): Add arg_loc parameter. Use it.
3710 (convert_arguments): Likewise.
3711 (convert_for_assignment): Rename rhs_loc to expr_loc.
3712 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3713 (c_parser_objc_keywordexpr): Likewise.
3714 (c_parser_postfix_expression_after_primary): Call
3715 build_function_call_vec with expr_loc rather than op_loc.
3716 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3717 build_function_call_vec.
3718 (c_parser_expr_list): Add locations parameter. Fill it with locations
3719 of function arguments.
3720 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3721
68fca595
MP
37222014-01-30 Marek Polacek <polacek@redhat.com>
3723
3724 PR c/59940
3725 * c-typeck.c (build_function_call_vec): Use loc parameter.
3726 (convert_arguments): Add location parameter. Use it.
3727 (ep_convert_and_check): Likewise.
3728 (build_atomic_assign): Adjust convert_for_assignment call.
3729 (build_modify_expr): Likewise.
3730 (digest_init): Likewise.
3731 (c_finish_return): Likewise.
3732 (build_conditional_expr): Adjust ep_convert_and_check calls.
3733 (convert_for_assignment): Add rhs_loc parameter. Use it.
3734 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3735 calls.
3736
fa337f3a
RB
37372014-01-30 Richard Biener <rguenther@suse.de>
3738
3739 PR c/59905
3740 * c-typeck.c (build_function_call_vec): Do not replace calls
3741 to a function via an incompatible type with a runtime abort.
3742
b72271b9
BI
37432014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3744
3745 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3746 flag_enable_cilkplus with flag_cilkplus.
3747 (c_parser_direct_declarator_inner): Likewise.
3748 (c_parser_attribute_any_word): Likewise.
3749 (c_parser_attributes): Likewise.
3750 (c_parser_compound_statement): Likewise.
3751 (c_parser_statement_after_labels): Likewise.
3752 (c_parser_if_statement): Likewise.
3753 (c_parser_switch_statement): Likewise.
3754 (c_parser_do_statement): Likewise.
3755 (c_parser_for_statement): Likewise.
3756 (c_parser_unary_expression): Likewise.
3757 (c_parser_postfix_expression): Likewise.
3758 (c_parser_postfix_expression_after_primary): Likewise.
3759 (c_parser_postfix_expression_after_primary): Likewise.
3760 (c_parser_omp_clause_name): Likewise.
3761 (c_finish_omp_declare_simd): Likewise.
3762 (c_parser_cilk_verify_simd): Likewise.
3763 * c-typeck.c (build_array_ref): Likewise.
3764 (build_function_call_vec): Likewise.
3765 (convert_arguments): Likewise.
3766 (build_compound_expr): Likewise.
3767 (c_finish_return): Likewise.
3768 (c_finish_if_stmt): Likewise.
3769 (c_finish_loop): Likewise.
3770 (build_binary_op): Likewise.
3771
393e8e8b
MP
37722014-01-23 Marek Polacek <polacek@redhat.com>
3773
3774 PR c/59846
3775 * c-typeck.c (parser_build_binary_op): Use location instead of
3776 input_location.
3777 (build_binary_op): Pass location to shorten_compare.
3778
f04dda30
MP
37792014-01-23 Marek Polacek <polacek@redhat.com>
3780
3781 PR c/58346
3782 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3783 an empty aggregate.
3784
789eadcd
MP
37852014-01-23 Marek Polacek <polacek@redhat.com>
3786
3787 PR c/59871
3788 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3789 of a comma expression.
3790 (emit_side_effect_warnings): Likewise.
3791
40f14e9f
BI
37922014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3793
3794 PR c/59825
3795 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3796 function to use walk_tree and moved a lot of its functionality to
3797 expand_array_notations.
3798 (expand_array_notations): New function.
3799
74558dd9
BI
38002014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3801
3802 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3803 attribute an attribute without value.
3804
652fea39
JJ
38052014-01-23 Jakub Jelinek <jakub@redhat.com>
3806
3807 PR middle-end/58809
3808 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3809 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3810
f34f1c87
MP
38112014-01-22 Marek Polacek <polacek@redhat.com>
3812
3813 PR c/59891
3814 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3815 of remove_c_maybe_const_expr on op1 and op2.
3816
241f845a
JJ
38172014-01-15 Jakub Jelinek <jakub@redhat.com>
3818
3819 PR c/58943
3820 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3821 effects, preevaluate rhs using SAVE_EXPR first.
3822
9a74f20c
BI
38232014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3824
3825 PR c++/59631
3826 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3827 statements with if-elseif statements.
3828
96066ce1
MP
38292014-01-06 Marek Polacek <polacek@redhat.com>
3830
3831 PR c/57773
3832 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3833 defined bit-field types only in ISO C.
3834
23a5b65a
RS
38352014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3836
3837 Update copyright years
3838
f9030485
RS
38392014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3840
3841 * c-array-notation.c: Use the standard form for the copyright notice.
3842
41958c28
BI
38432013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3844
3845 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3846 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3847 field in parser is not empty. If not-empty, call the function
3848 c_parser_finish_omp_declare_simd.
3849 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3850 between SIMD-enabled functions and #pragma simd. Added new parameter.
3851 (c_parser_cilk_all_clauses): Modified the usage of the function
3852 c_parser_cilk_clause_vectorlength as mentioned above.
3853 (c_parser_cilk_simd_fn_vector_attrs): New function.
3854 (c_finish_cilk_simd_fn_tokens): Likewise.
3855 (is_cilkplus_vector_p): Likewise.
3856 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3857 "nomask," and "mask" strings in clause name.
3858 (c_parser_omp_all_clauses): Added 3 new case statements:
3859 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3860 PRAGMA_CILK_CLAUSE_NOMASK.
3861 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3862 check for vector attribute and if so call the function
3863 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3864 called the function c_finish_cilk_simd_fn_tokens.
3865 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3866 parser field is non-empty. If so, parse them as you would parse
3867 the omp declare simd pragma.
3868 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3869 Added a check when step is a parameter and flag it as error.
3870 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3871 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3872 pragma_omp_clause.
3873
cef0fd0e
TS
38742013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3875
3876 * c-parser.c (c_parser_omp_parallel): Fix description.
3877
12893402
BI
38782013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3879
3880 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3881 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3882 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3883 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3884
296674db
JM
38852013-12-04 Joseph Myers <joseph@codesourcery.com>
3886
3887 PR c/52023
3888 * c-parser.c (c_parser_alignas_specifier): Use
3889 c_sizeof_or_alignof_type instead of c_alignof.
3890 (c_parser_alignof_expression): Likewise, with min_alignof
3891 parameter depending on alignof spelling used.
3892
edd28054
MP
38932013-12-04 Marek Polacek <polacek@redhat.com>
3894
3895 PR c/54113
3896 * c-decl.c (start_function): Don't warn for missing prototype for
3897 inline functions.
3898
da0fc454
MP
38992013-12-03 Marek Polacek <polacek@redhat.com>
3900
3901 PR c/59351
3902 * c-decl.c (build_compound_literal): Allow compound literals with
3903 empty initial value.
3904
4c2ecab0
JM
39052013-12-02 Joseph Myers <joseph@codesourcery.com>
3906
3907 PR c/58235
3908 * c-typeck.c (build_modify_expr): Diagnose assignment to
3909 expression with array type.
3910
340baef7
JM
39112013-11-29 Joseph Myers <joseph@codesourcery.com>
3912
3913 PR c/42262
3914 * c-typeck.c (process_init_element): Do not treat a string as
3915 initializing a whole array when used with a designator for an
3916 individual element.
3917
6763b9f7
JM
39182013-11-29 Joseph Myers <joseph@codesourcery.com>
3919
3920 PR c/57574
3921 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3922 an inline function following a static declaration.
3923
e7bd1de1
JJ
39242013-11-28 Jakub Jelinek <jakub@redhat.com>
3925
3926 PR c/59310
3927 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3928 to p_name before calling c_parser_omp_teams instead of after.
3929 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3930 argument. Remove unused p_name variable.
3931
0136f8f0
AH
39322013-11-27 Aldy Hernandez <aldyh@redhat.com>
3933 Jakub Jelinek <jakub@redhat.com>
3934
3935 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3936 external_scope is NULL.
3937
241b71bb
TV
39382013-11-27 Tom de Vries <tom@codesourcery.com>
3939 Marc Glisse <marc.glisse@inria.fr>
3940
3941 PR c++/59032
3942 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3943
2fb9a547
AM
39442013-11-22 Andrew MacLeod <amacleod@redhat.com>
3945
3946 * c-typeck.c: Add required include files from gimple.h.
3947
8400e75e
DM
39482013-11-22 David Malcolm <dmalcolm@redhat.com>
3949
3950 * c-decl.c (define_label, shadow_tag_warned)
3951 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3952 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3953 (declspecs_add_type): Remove use of in_system_header macro.
3954 * c-parser.c (c_parser_unary_expression): Likewise.
3955 * c-typeck.c (store_init_value, process_init_element)
3956 (c_start_case): Likewise.
3957
3958 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3959 macro.
3960
3961 * c-parser.c (c_parser_set_source_position_from_token): Remove
3962 reference to in_system_header from comment.
3963
386b1f1f
RS
39642013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3965
3966 * c-decl.c (grokdeclarator): Update comment to refer to
3967 tree_to_[su]hwi rather than tree_low_cst.
3968
ae7e9ddd
RS
39692013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3970
3971 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3972 tree_to_uhwi throughout.
3973
9439e9a1
RS
39742013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3975
3976 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3977 throughout.
3978
9541ffee
RS
39792013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3980
3981 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3982 throughout.
3983
c02065fc
AH
39842013-11-15 Aldy Hernandez <aldyh@redhat.com>
3985
3986 * c-parser.c (c_parser_cilk_simd): New.
3987 (c_parser_cilk_verify_simd): New.
3988 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3989 (c_parser_omp_for_loop): Add case for NE_EXPR.
3990 Set c_break_label for CILK_SIMD.
3991 (c_parser_cilk_clause_vectorlength): New.
3992 (c_parser_cilk_clause_linear): New.
3993 (c_parser_cilk_clause_name): New.
3994 (c_parser_cilk_all_clauses): New.
3995 * c-typeck.c (build_unary_op): Pass location argument to
3996 readonly_error.
3997 (build_modify_expr): Same.
3998 (build_asm_expr): Same.
3999 (c_finish_bc_stmt): Error on break/continue in loops.
4000
18f429e2
AM
40012013-11-14 Andrew MacLeod <amacleod@redhat.com>
4002
4003 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
4004
d8a2d370
DN
40052013-11-14 Diego Novillo <dnovillo@google.com>
4006
4007 * c-decl.c: Include print-tree.h.
4008 Include stor-layout.h.
4009 Include varasm.h.
4010 Include attribs.h.
4011 Include stringpool.h.
4012 * c-lang.c: Include fold-const.h.
4013 * c-parser.c: Include stringpool.h.
4014 Include attribs.h.
4015 Include stor-layout.h.
4016 Include varasm.h.
4017 Include trans-mem.h.
4018 * c-typeck.c: Include stor-layout.h.
4019 Include trans-mem.h.
4020 Include varasm.h.
4021 Include stmt.h.
4022
38b7bc7f
JM
40232013-11-13 Joseph Myers <joseph@codesourcery.com>
4024
4025 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
4026 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
4027 __auto_type.
4028 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
4029 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
4030 RID_AUTO_TYPE.
4031 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
4032 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
4033 (c_parser_declarator, c_parser_direct_declarator_inner)
4034 (c_parser_parameter_declaration, c_parser_type_name): All callers
4035 changed.
4036 (c_parser_declaration_or_fndef): Handle declarations with type
4037 determined from the initializer.
4038
45b0be94
AM
40392013-11-12 Andrew MacLeod <amacleod@redhat.com>
4040
18f429e2 4041 * c-typeck.c: Include gimplify.h.
45b0be94 4042
582d9b50
JM
40432013-11-12 Joseph Myers <joseph@codesourcery.com>
4044
4045 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
4046 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
4047 comment.
4048 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
4049 or _Thread_local as appropriate in diagnostics.
4050 (build_null_declspecs): Initialize ret->thread_gnu_p.
4051 (declspecs_add_scspec): Handle either __thread or _Thread_local
4052 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
4053 pedantic. Do not disallow _Thread_local extern and _Thread_local
4054 static.
4055
267bac10
JM
40562013-11-07 Joseph Myers <joseph@codesourcery.com>
4057 Andrew MacLeod <amacleod@redhat.com>
4058
4059 * c-aux-info.c (gen_type): Handle atomic qualifier.
4060 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
4061 qualifiers when compating types.
4062 (shadow_tag_warned): Handle atomic_p in declspecs.
4063 (quals_from_declspecs): Likewise.
4064 (start_decl): Use c_type_promotes_to when promoting argument
4065 types.
4066 (grokdeclarator): Handle _Atomic.
4067 (get_parm_info): Diagnose any qualifier on "void" as only
4068 parameter.
4069 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
4070 comparing types. Use c_type_promotes_to when promoting argument
4071 types.
4072 (finish_function): Use c_type_promotes_to when promoting argument
4073 types.
4074 (build_null_declspecs): Handle atomic_p in declspecs.
4075 (declspecs_add_qual): Handle RID_ATOMIC.
4076 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
4077 (c_token_starts_declspecs): Handle RID_ATOMIC.
4078 (c_parser_declspecs): Handle atomic type specifiers and
4079 qualifiers.
4080 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
4081 from types of expressions with atomic type.
4082 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4083 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4084 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4085 (c_parser_statement_after_labels, c_parser_switch_statement)
4086 (c_parser_for_statement, c_parser_expr_no_commas)
4087 (c_parser_conditional_expression, c_parser_binary_expression)
4088 (c_parser_cast_expression, c_parser_unary_expression)
4089 (c_parser_postfix_expression)
4090 (c_parser_postfix_expression_after_primary, c_parser_expression):
4091 Use convert_lvalue_to_rvalue.
4092 (c_parser_expression_conv, c_parser_expr_list): Document
4093 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4094 (c_parser_objc_synchronized_statement): Use
4095 convert_lvalue_to_rvalue.
4096 (c_parser_objc_selector): Handle RID_ATOMIC.
4097 (c_parser_objc_receiver, c_parser_array_notation): Use
4098 convert_lvalue_to_rvalue.
4099 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4100 _Atomic (type-name).
4101 (struct c_declspecs): Add atomic_p field.
4102 (convert_lvalue_to_rvalue): Declare.
4103 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4104 corresponding atomic types.
4105 (qualify_type): Don't add _Atomic qualifiers from second argument.
4106 (comp_target_types): Do not allow _Atomic mismatches.
4107 (type_lists_compatible_p): Do not remove atomic qualifiers when
4108 comparing types.
4109 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4110 (build_atomic_assign): New functions.
4111 (build_unary_op): Use build_atomic_assign for atomic increment and
4112 decrement.
4113 (build_conditional_expr): Do not treat _Atomic void as a qualified
4114 version of void.
4115 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4116 (find_anonymous_field_with_type, convert_to_anonymous_field)
4117 (convert_for_assignment): Do not remove atomic qualifiers when
4118 comparing types.
4119 (digest_init): Do not accept initialization of arrays of atomic
4120 elements by string constants.
4121 (build_asm_expr): Use convert_lvalue_to_rvalue.
4122 (build_binary_op): Do not treat _Atomic void as a qualified
4123 version of void.
4124
0c249d4b
DD
41252013-11-06 DJ Delorie <dj@redhat.com>
4126
4127 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4128 both explicit and builtin, print the location of the explicit one.
4129
6d7f7e0a
TB
41302013-11-05 Tobias Burnus <burnus@net-b.de>
4131
4132 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4133 c_parser_omp_distribute, c_parser_omp_teams,
4134 c_parser_omp_target, c_parser_omp_declare): Handle
4135 -fopenmp-simd.
4136
b906f4ca
MP
41372013-11-03 Marek Polacek <polacek@redhat.com>
4138
4139 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4140
ee1d5a02
JJ
41412013-11-01 Jakub Jelinek <jakub@redhat.com>
4142
4143 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4144 check_dup_generic at the end, unless remove is true.
4145 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4146 remove = true;.
4147 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4148
5a9785fb
JJ
41492013-10-31 Jakub Jelinek <jakub@redhat.com>
4150
4151 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4152 with decl that is not pointer nor array.
4153
939b37da
BI
41542013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4155
4156 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4157 a spawning function is found.
4158 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4159 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4160 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4161 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4162 case.
4163 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4164 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4165 expr.
4166 (c_finish_return): Added a check to reject _Cilk_spawn in return
4167 expression.
4168 (build_cilk_spawn): New function.
4169 (build_cilk_sync): Likewise.
4170 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4171
d4af74d4
TB
41722013-10-27 Tobias Burnus <burnus@net-b.de>
4173
4174 PR other/33426
4175 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4176 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4177 (c_parser_statement_after_labels): Update calls.
4178
d73749df 41792013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4180
4181 PR other/33426
4182 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4183 Handle PRAGMA_IVDEP.
4184 (c_parser_statement_after_labels): Update call.
4185
f28aa681
MP
41862013-10-24 Marek Polacek <polacek@redhat.com>
4187
4188 * c-parser.c (c_parser_struct_declaration): Add a comment.
4189 (c_parser_declarator): Don't allow _Alignas here.
4190
0645c1a2
AM
41912013-10-17 Andrew MacLeod <amacleod@redhat.com>
4192
4193 * c-parser.c: Include omp-low.h.
4194 * c-typeck.c: Likewise.
4195
568a31f2
MP
41962013-10-17 Marek Polacek <polacek@redhat.com>
4197
4198 PR c/58267
4199 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4200 Document syntax of the array-declarator.
4201 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4202 are not permitted.
4203 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4204 (c_parser_struct_declaration): Likewise.
4205 (c_parser_declarator): Likewise.
4206 (c_parser_direct_declarator_inner): Likewise.
4207 (c_parser_parameter_declaration): Likewise.
4208 (c_parser_type_name): Likewise.
4209
acf0174b
JJ
42102013-10-11 Jakub Jelinek <jakub@redhat.com>
4211
4212 * c-lang.h (current_omp_declare_target_attribute): New extern
4213 decl.
4214 * c-parser.c: Include c-lang.h.
4215 (struct c_parser): Change tokens to c_token *.
4216 Add tokens_buf field. Change tokens_avail type to unsigned int.
4217 (c_parser_consume_token): If parser->tokens isn't
4218 &parser->tokens_buf[0], increment parser->tokens.
4219 (c_parser_consume_pragma): Likewise.
4220 (enum pragma_context): Add pragma_struct and pragma_param.
4221 (c_parser_external_declaration): Adjust
4222 c_parser_declaration_or_fndef caller.
4223 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4224 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4225 Adjust recursive call.
4226 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4227 of pragma_external.
4228 (c_parser_parameter_declaration): Use pragma_param instead of
4229 pragma_external.
4230 (c_parser_compound_statement_nostart, c_parser_label,
4231 c_parser_for_statement): Adjust
4232 c_parser_declaration_or_fndef callers.
4233 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4234 it through to c_parser_conditional_expression.
4235 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4236 pass it through to c_parser_binary_expression. Adjust recursive
4237 call.
4238 (c_parser_binary_expression): Remove prec argument, add
4239 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4240 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4241 binop matches it, use build2 instead of parser_build_binary_op.
4242 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4243 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4244 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4245 Handle pragma_struct and pragma_param the same as pragma_external.
4246 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4247 (c_parser_omp_variable_list): Parse array sections for
4248 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4249 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4250 (c_parser_omp_clause_reduction): Handle user defined reductions.
4251 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4252 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4253 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4254 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4255 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4256 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4257 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4258 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4259 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4260 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4261 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4262 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4263 (c_parser_omp_for_loop): Add CODE argument, pass it through
4264 to c_finish_omp_for. Change last argument to cclauses,
4265 and adjust uses to grab parallel clauses from the array of all
4266 the split clauses. Adjust c_parser_binary_expression,
4267 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4268 (omp_split_clauses): New function.
4269 (c_parser_omp_simd): New function.
4270 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4271 Allow the function to be called also when parsing combined constructs,
4272 and call c_parser_omp_simd when parsing for simd.
4273 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4274 #pragma omp section, require exactly one structured-block instead of
4275 sequence of statements.
4276 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4277 Allow the function to be called also when parsing combined constructs.
4278 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4279 Allow the function to be called also when parsing combined
4280 constructs.
4281 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4282 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4283 c_parser_omp_teams, c_parser_omp_target_data,
4284 c_parser_omp_target_update, c_parser_omp_target,
4285 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4286 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4287 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4288 (c_parser_omp_construct): Add p_name and mask vars. Handle
4289 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4290 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4291 and c_parser_omp_sections callers.
4292 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4293 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4294 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4295 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4296 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4297 OMP_CLAUSE_DEPEND.
4298 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4299 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4300 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4301 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4302 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4303 * c-typeck.c: Include tree-inline.h.
4304 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4305 handle_omp_array_sections_1, handle_omp_array_sections,
4306 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4307 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4308 user defined reductions.
4309 (c_tree_equal): New function.
4310 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4311 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4312 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4313 c_check_omp_declare_reduction_r): New prototypes.
4314 * c-decl.c (current_omp_declare_target_attribute): New variable.
4315 (c_decl_attributes): New function.
4316 (start_decl, start_function): Use it instead of decl_attributes.
4317 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4318 c_omp_reduction_decl, c_omp_reduction_lookup,
4319 c_check_omp_declare_reduction_r): New functions.
4320
0a6c2227
TT
43212013-09-25 Tom Tromey <tromey@redhat.com>
4322
4323 * Make-lang.in (c/gccspec.o): Remove.
4324 (CFLAGS-c/gccspec.o): New variable.
4325 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4326 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4327 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4328
f3bc55f0
TT
43292013-09-25 Tom Tromey <tromey@redhat.com>
4330
4331 * Make-lang.in (c/gccspec.o): Don't use subshell.
4332
a24d975c
MP
43332013-09-18 Marek Polacek <polacek@redhat.com>
4334
4335 PR sanitize/58443
4336 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4337 Remove unnecessary check.
4338
ce6923c5
MP
43392013-09-18 Marek Polacek <polacek@redhat.com>
4340
4341 PR sanitizer/58411
4342 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4343 no_sanitize_undefined attribute.
4344
a1e51df9
KT
43452013-09-13 Kai Tietz <ktietz@redhat.com>
4346
4347 PR target/57848
4348 * c-decl.c (c_builtin_function_ext_scope): Remove
4349 wrong assumption that it is never called on prexisting
4350 symbol.
4351
0af94e6f
JR
43522013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4353
4354 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4355
20059c8b
GDR
43562013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4357
4358 * c-objc-common.c (c_tree_printer): Tidy.
4359
de5a5fa1
MP
43602013-08-30 Marek Polacek <polacek@redhat.com>
4361
4362 * c-typeck.c (build_binary_op): Add division by zero and shift
4363 instrumentation.
4364
2531a1d9 43652013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4366 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4367
6e2bcc98 4368 PR c/35649
2531a1d9
JR
4369 * c-typeck.c (c_common_type): Prefer double_type_node over
4370 other REAL_TYPE types with the same precision.
4371 (convert_arguments): Likewise.
4372
025311c4
GDR
43732013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4374
4375 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4376 (c_initialize_diagnostics): Call a destructor for the early printer.
4377
da6ca2b5
GDR
43782013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4379
4380 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4381 printer initialization.
4382
318cda85 43832013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4384
318cda85
BI
4385 PR c/57490
4386 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4387 check for truth values.
4388 (expand_array_notation_exprs): Added truth values case. Removed an
4389 unwanted else. Added for-loop to walk through subtrees in default
4390 case.
4391
b066401f
GDR
43922013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4393
4394 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4395
fb48aadc
JM
43962013-07-23 Joseph Myers <joseph@codesourcery.com>
4397
4398 * c-parser.c (struct c_generic_association): Fix typo.
4399
433cc7b0
TT
44002013-07-23 Tom Tromey <tromey@redhat.com>
4401 Joseph Myers <joseph@codesourcery.com>
4402
4403 * c-parser.c (struct c_generic_association): New.
4404 (c_generic_association_d): New typedef.
4405 (c_parser_generic_selection): New function.
4406 (c_parser_postfix_expression): Handle RID_GENERIC.
4407
26d40c3d
JM
44082013-07-13 Jason Merrill <jason@redhat.com>
4409
4410 PR c++/57793
4411 * c-decl.c (finish_struct): Check for too-large class.
4412
ecdbd01a 44132013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4414
4415 PR c/57821
4416 * c-typeck.c (set_init_index): When folding, check for index overflow.
4417
1141ed3f
BI
44182013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4419
4420 * c-parser.c (c_parser_array_notation): Removed rejection of array
4421 notations in an array of function pointers.
4422
713b46fa
BI
44232013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4424
4425 * c-array-notation.c (make_triplet_val_inv): New function.
4426 (create_cmp_incr): Likewise.
4427 (create_array_refs): Likewise.
4428 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4429 Also modularized common parts between functions and called the function.
4430 (build_array_notation_expr): Likewise.
4431 (fix_conditional_array_notations_1): Likewise.
4432 (fix_array_notation_expr): Likewise.
4433 (fix_array_notation_call_expr): Likewise.
4434
92f20202
MP
44352013-06-18 Marek Polacek <polacek@redhat.com>
4436
4437 PR c/57630
4438 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4439
73a23b06
BI
44402013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4441
4442 * c-array-notation.c (build_array_notation_expr): Reject array notation
4443 mismatch between LHS and RHS even inside a call_expr. Also, removed
4444 a couple while statements that were dead code.
4445
00b8517d
BI
44462013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4447
4448 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4449 excessive precision expressions in function parameters. Also removed
4450 couple unwanted while statements.
4451
1509bdda
BI
44522013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4453
4454 * c-array-notation.c (expand_array_notation_exprs): Added
4455 ARRAY_NOTATION_REF case.
4456
d60f1706
BI
44572013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4458
4459 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4460 function to c-family/array-notation-common.c.
4461 (is_cilkplus_reduce_builtin): Likewise.
4462 (find_rank): Likewise.
4463 (extract_array_notation_exprs): Likewise.
4464 (replace_array_notations): Likewise.
4465 (find_inv_trees): Likewise.
4466 (replace_inv_trees): Likewise.
4467 (contains_array_notation_expr): Likewise.
4468 (find_correct_array_notation_type): Likewise.
4469 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4470 (struct inv_list): Moved this to c-family/array-notation-common.c.
4471 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4472
6d6efbb3
BI
44732013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4474
4475 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4476 reduction functions outside the for-loop. Added a check if the fundecl
4477 is non-NULL. Finally, removed an unwanted if-statement, and made the
4478 body unconditional.
4479
25c22937
BI
44802013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4481
4482 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4483 condition of the if-statement matches the rank of else-block and then-
4484 block when array notations are used.
4485 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4486 expression after the entire function body is parsed.
4487 (c_parser_expr_no_commas): Delayed creating array notation expressions
4488 to the end of function parsing.
4489 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4490 whole if-statement instead of just the condition.
4491 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4492
edd25645
BI
44932013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4494
4495 PR c/57474
4496 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4497 array to NULL_TREE if they are unused. Also added a check for the
4498 field to be NULL before its fields are used in future.
4499
065ce7f1
RO
45002013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4501
4502 PR bootstrap/57450
4503 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4504 (build_array_notation_expr): Likewise.
4505
36536d79
BI
45062013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4507
4508 * c-typeck.c (build_array_ref): Added a check to see if array's
4509 index is greater than one. If true, then emit an error.
4510 (build_function_call_vec): Exclude error reporting and checking
4511 for builtin array-notation functions.
4512 (convert_arguments): Likewise.
4513 (c_finish_return): Added a check for array notations as a return
4514 expression. If true, then emit an error.
4515 (c_finish_loop): Added a check for array notations in a loop
4516 condition. If true then emit an error.
4517 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4518 (build_binary_op): Added a check for array notation expr inside
4519 op1 and op0. If present, we call another function to find correct
4520 type.
4521 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4522 * c-parser.c (c_parser_compound_statement): Check if array
4523 notation code is used in tree, if so, then transform them into
4524 appropriate C code.
4525 (c_parser_expr_no_commas): Check if array notation is used in LHS
4526 or RHS, if so, then build array notation expression instead of
4527 regular modify.
4528 (c_parser_postfix_expression_after_primary): Added a check for
4529 colon(s) after square braces, if so then handle it like an array
4530 notation. Also, break up array notations in unary op if found.
4531 (c_parser_direct_declarator_inner): Added a check for array
4532 notation.
4533 (c_parser_compound_statement): Added a check for array notation in
4534 a stmt. If one is present, then expand array notation expr.
4535 (c_parser_if_statement): Likewise.
4536 (c_parser_switch_statement): Added a check for array notations in
4537 a switch statement's condition. If true, then output an error.
4538 (c_parser_while_statement): Similarly, but for a while.
4539 (c_parser_do_statement): Similarly, but for a do-while.
4540 (c_parser_for_statement): Similarly, but for a for-loop.
4541 (c_parser_unary_expression): Check if array notation is used in a
4542 pre-increment or pre-decrement expression. If true, then expand
4543 them.
4544 (c_parser_array_notation): New function.
4545 * c-array-notation.c: New file.
4546 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4547
cd192ccc
MS
45482013-05-23 Mike Stump <mikestump@comcast.net>
4549
4550 * c-typeck.c (convert_for_assignment): Handle references to memory
4551 spaces better.
4552
427b248d
JM
45532013-05-16 Jason Merrill <jason@redhat.com>
4554
4555 * Make-lang.in (cc1$(exeext)): Use link mutex.
4556
44d90fe1
PC
45572013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4558
4559 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4560 to simply use OPT_Wpointer_arith.
4561 (build_unary_op): Likewise.
4562
4e7d7b3d
JJ
45632013-04-03 Jakub Jelinek <jakub@redhat.com>
4564
4565 PR c/19449
4566 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4567 argument. If set, or it temporarily for parsing of the first
4568 argument into force_folding_builtin_constant_p.
4569 (c_parser_postfix_expression): Adjust callers.
4570
839b422f
RB
45712013-03-21 Richard Biener <rguenther@suse.de>
4572
4573 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4574 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4575
2ee028f1
MP
45762013-02-12 Marek Polacek <polacek@redhat.com>
4577
4578 PR c/44938
4579 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4580 origtypes to NULL.
4581
8824edff
JJ
45822013-01-24 Jakub Jelinek <jakub@redhat.com>
4583
4584 PR c/56078
4585 * c-typeck.c (set_nonincremental_init_from_string): If
4586 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4587 returned false.
4588 (process_init_element): Likewise.
4589
eadd3d0d
JJ
45902012-12-20 Jakub Jelinek <jakub@redhat.com>
4591
4592 PR c++/55619
4593 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4594 argument, don't call default_function_array_conversion
4595 nor c_fully_fold here.
4596 (c_parser_asm_statement): Adjust callers.
4597 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4598 and outputs here, and call default_function_array_conversion
4599 on inputs that don't need to be addressable.
4600
f8a93a2e
JJ
46012012-12-18 Jakub Jelinek <jakub@redhat.com>
4602
4603 PR c/39464
4604 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4605 warning require that both c_common_unsigned_type as well as
4606 c_common_signed_type is the same for both mvl and mvr types.
4607
9771b263
DN
46082012-11-16 Diego Novillo <dnovillo@google.com>
4609
4610 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4611
4612 * c-common.c: Use new vec API in vec.h.
4613 * c-common.h: Likewise.
4614 * c-gimplify.c: Likewise.
4615 * c-pragma.c: Likewise.
4616 * c-pretty-print.c: Likewise.
4617 * c-pretty-print.h: Likewise.
4618 * c-semantics.c: Likewise.
4619 * c-decl.c: Likewise.
4620 * c-parser.c: Likewise.
4621 * c-tree.h: Likewise.
4622 * c-typeck.c: Likewise.
4623
880661a4
JW
46242012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4625
4626 PR c++/54930
4627 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4628
077d1abe
MLI
46292012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4630
4631 PR c/53066
4632 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4633 shadows a function, unless the variable is a function or a
4634 pointer-to-function.
4635
3a785c97
JJ
46362012-10-12 Jakub Jelinek <jakub@redhat.com>
4637
4638 PR c/54381
4639 * c-parser.c (struct c_tree_loc_pair): Removed.
4640 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4641 add location_t * and tree * arguments, fill in array of 3
4642 sizeof_arg trees and corresponding locs.
4643 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4644 c_parser_expr_list callers.
4645 (c_parser_postfix_expression_after_primary): Likewise. Pass
4646 array of 3 sizeof_arg trees and locs (corresponding to first
4647 3 arguments) to sizeof_pointer_memaccess_warning.
4648
703c8606
LC
46492012-10-09 Lawrence Crowl <crowl@google.com>
4650
4651 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4652 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4653 hash table.
4654
5d9de0d0
PC
46552012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4656
4657 PR c++/54194
4658 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4659 call.
4660
a212e43f
MG
46612012-10-09 Marc Glisse <marc.glisse@inria.fr>
4662
4663 PR c++/54427
4664 * c-typeck.c: Include c-common.h.
4665 (enum stv_conv): Moved to c-common.h.
4666 (scalar_to_vector): Moved to c-common.c.
4667 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4668 * Make-lang.in: c-typeck.c depends on c-common.h.
4669
3b78de56
AC
46702012-10-04 Arnaud Charlet <charlet@adacore.com>
4671
4672 * c-decl.c (c_write_global_declarations): Fix handling of
4673 -fdump-ada-spec*.
4674
78c60e3d
SS
46752012-09-30 Sharad Singhai <singhai@google.com>
4676
4677 * c-decl.c (c_write_global_declarations): Use a different method
4678 to determine if the dump has ben initialized.
4679
9f33203d
JM
46802012-09-14 Joseph Myers <joseph@codesourcery.com>
4681
4682 PR c/54552
4683 * c-typeck.c (c_cast_expr): When casting to a type requiring
4684 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4685 c_fully_fold first.
4686
a27d595d
JM
46872012-09-14 Joseph Myers <joseph@codesourcery.com>
4688
4689 PR c/54103
4690 * c-typeck.c (build_unary_op): Pass original argument of
4691 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4692 any C_MAYBE_CONST_EXPR, if it has integer operands.
4693 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4694 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4695 to c_objc_common_truthvalue_conversion, then remove any
4696 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4697 c_objc_common_truthvalue_conversion not
4698 c_common_truthvalue_conversion.
4699 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4700 call note_integer_operands for arguments with integer operands
4701 that are not integer constants.
4702
9feb29df
JJ
47032012-09-13 Jakub Jelinek <jakub@redhat.com>
4704
4705 PR c/54559
4706 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4707 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4708
d409320c
JJ
47092012-08-31 Jakub Jelinek <jakub@redhat.com>
4710
4711 PR c/54428
4712 * c-convert.c (convert): Don't call fold_convert_loc if
4713 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4714 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4715 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4716
6265d07c
JJ
47172012-08-24 Jakub Jelinek <jakub@redhat.com>
4718
4719 PR c/54355
4720 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4721 for nested and empty_ok arguments in the call to
4722 c_parser_declaration_or_fndef.
4723
1a4049e7
JJ
47242012-08-17 Jakub Jelinek <jakub@redhat.com>
4725
4726 * c-tree.h (c_last_sizeof_arg): Declare.
4727 * c-parser.c (struct c_tree_loc_pair): New type.
4728 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4729 non-NULL.
4730 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4731 (c_parser_postfix_expression_after_primary): Likewise. Call
4732 sizeof_pointer_memaccess_warning if needed.
4733 (sizeof_ptr_memacc_comptypes): New function.
4734 * c-typeck.c (c_last_sizeof_arg): New global variable.
4735 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4736
0229aee9
UB
47372012-07-24 Uros Bizjak <ubizjak@gmail.com>
4738
4739 * c-lang.h (lang_decl): Add variable_size GTY option.
4740
7ee2468b
SB
47412012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4742
4743 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4744 * Make-lang.in: Fix dependencies.
4745
d4a10d0a
SB
47462012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4747
4748 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4749 and add language Makefile hooks.
4750 * config-lang.in: New file.
4751 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4752 add the required "normal" config-lang.in rules.
4753 * c-lang.h: Moved from gcc/ to here.
4754 * c-tree.h: Likewise.
4755 * c-objc-common.c: Likewise.
4756 * c-objc-common.h: Likewise.
4757 * c-typeck.c: Likewise.
4758 * c-convert.c: Likewise.
4759 * c-lang.c: Likewise.
4760 * c-aux-info.c: Likewise.
4761 * c-errors.c: Likewise.
4762 * gccspec.c: Likewise.
4763 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4764 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4765\f
cbe34bb5 4766Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4767
4768Copying and distribution of this file, with or without modification,
4769are permitted in any medium without royalty provided the copyright
4770notice and this notice are preserved.