]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR target/81414 (ICE in fma steering on AArch64/cortex-a57)
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
ff22eb12
NS
12017-07-18 Nathan Sidwell <nathan@acm.org>
2
3 * c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.
4
eea77d1f
DM
52017-07-14 David Malcolm <dmalcolm@redhat.com>
6
7 * c-decl.c (implicitly_declare): When suggesting a missing
8 #include, provide a fix-it hint.
9
b6f43128
DM
102017-07-06 David Malcolm <dmalcolm@redhat.com>
11
12 * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
13 and call that instead.
14 * c-tree.h (selftest::run_c_tests): New decl.
15
3e2becc4
MP
162017-06-26 Marek Polacek <polacek@redhat.com>
17
18 PR c/80116
19 * c-parser.c (c_parser_if_body): Set the location of the
20 body of the conditional after parsing all the labels. Call
21 warn_for_multistatement_macros.
22 (c_parser_else_body): Likewise.
23 (c_parser_switch_statement): Likewise.
24 (c_parser_while_statement): Likewise.
25 (c_parser_for_statement): Likewise.
26 (c_parser_statement): Add a default argument. Save the location
27 after labels have been parsed.
28 (c_parser_c99_block_statement): Likewise.
29
343ae898
RB
302017-06-19 Richard Biener <rguenther@suse.de>
31
32 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
33 negated _Literals to parse _Literal (int) -1.
34
45b2222a
ML
352017-06-13 Martin Liska <mliska@suse.cz>
36
37 PR sanitize/78204
38 * c-convert.c (convert): Use sanitize_flags_p.
39 * c-decl.c (grokdeclarator): Likewise.
40 * c-typeck.c (convert_for_assignment): Likewise.
41 (c_finish_return): Likewise.
42 (build_binary_op): Likewise.
43
8ab7005b
JJ
442017-06-08 Jakub Jelinek <jakub@redhat.com>
45
46 PR c/81006
47 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
48 to sizetype before size_binop.
49
363dc72c
JJ
502017-06-07 Jakub Jelinek <jakub@redhat.com>
51
52 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
53 of TDI_generic.
54
dc949728
MP
552017-06-06 Marek Polacek <polacek@redhat.com>
56
57 PR c/79983
58 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
59 ref.
60 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
61
40ffd95f
BE
622017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
63
64 * c-parser.c (c_parser_binary_expression): Implement the
65 -Wsizeof_pointer_div warning.
66 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
67 from a parenthesized expression.
68 (c_parser_expr_list): Use c_last_sizeof_loc.
69 * c-tree.h (c_last_sizeof_loc): New external.
70 * c-typeck.c (c_last_sizeof_loc): New variable.
71 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
72
9fc5e7a4
MM
732017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
74
75 PR testsuite/80580
76 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
77
f012c8ef
DM
782017-05-30 David Malcolm <dmalcolm@redhat.com>
79
80 * c-objc-common.c (c_tree_printer): Gain bool and const char **
81 parameters.
82
3cd211af
MS
832017-05-24 Martin Sebor <msebor@redhat.com>
84
85 PR c/80731
86 * c-fold.c (c_fully_fold_internal): Adjust.
87 * c-typeck.c (parser_build_unary_op): Adjust.
88
fd71a9a2
TS
892017-05-23 Thomas Schwinge <thomas@codesourcery.com>
90
91 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
92 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
93 "VECTOR_LENGTH".
94
92fa0f9e
MP
952017-05-23 Marek Polacek <polacek@redhat.com>
96
97 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
98 quotes.
99
d11c168a
JJ
1002017-05-22 Jakub Jelinek <jakub@redhat.com>
101
102 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
103 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
104 it returned invariant. Call tree_invariant_p unconditionally
105 afterwards to decide whether to return expr or op0.
106
58aca9d9
NS
1072017-05-22 Nathan Sidwell <nathan@acm.org>
108
109 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
110
7fd549d2
TS
1112017-05-19 Thomas Schwinge <thomas@codesourcery.com>
112
113 * c-parser.c (c_parser_omp_clause_default): Handle
114 "OMP_CLAUSE_DEFAULT_PRESENT".
115
6ecd2339
BE
1162017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
117
118 * config-lang.in (gtfiles): Add c-family/c-format.c.
119
8a57ecff
NS
1202017-05-18 Nathan Sidwell <nathan@acm.org>
121
122 * c-decl.c (pushdecl_top_level): Delete unused function.
123
6574d78e
MP
1242017-05-18 Marek Polacek <polacek@redhat.com>
125
126 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
127 (check_earlier_gotos): Likewise.
128 (define_label): Likewise.
129 (pending_xref_error): Likewise.
130 (smallest_type_quals_location): Likewise.
131 (grokdeclarator): Likewise.
132 (grokparms): Likewise.
133 (identifier_global_value): Likewise.
134 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
135 (find_init_member): Likewise.
136
e3455240
MP
1372017-05-18 Marek Polacek <polacek@redhat.com>
138
139 * c-decl.c (start_decl): Use false/true instead of 0/1.
140 (grokdeclarator): Likewise.
141 (finish_struct): Likewise.
142 (start_function): Change the return type to bool. Use false/true
143 instead of 0/1.
144 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
145 * c-tree.h (start_function): Update.
146 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
147 (set_designator): Change the return type to bool. Use false/true
148 instead of 0/1.
149
3fa8871b
MP
1502017-05-17 Marek Polacek <polacek@redhat.com>
151
152 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
153 * c-typeck.c: Likewise.
154
142473df
MP
1552017-05-17 Marek Polacek <polacek@redhat.com>
156
157 PR sanitizer/80659
158 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
159 DECL_IGNORED_P even for non-static compound literals.
160
1a817418
ML
1612017-05-17 Martin Liska <mliska@suse.cz>
162
163 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
164 use it instead of int type.
165
b2fa0a8b
MP
1662017-05-17 Marek Polacek <polacek@redhat.com>
167
168 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
169 call c_fully_fold.
170 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
171 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
172 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
173 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
174 save_expr.
175 (c_parser_conditional_expression): Likewise.
176 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
177 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
178 (process_init_element): Likewise.
179 (build_binary_op): Likewise.
180 (handle_omp_array_sections_1): Likewise.
181
1e47f02b
TS
1822017-05-12 Thomas Schwinge <thomas@codesourcery.com>
183
184 * c-parser.c (c_parser_omp_clause_num_gangs)
185 (c_parser_omp_clause_num_workers)
186 (c_parser_omp_clause_vector_length): Merge functions into...
187 (c_parser_oacc_single_int_clause): ... this new function. Adjust
188 all users.
189
c24e924f
NS
1902017-05-11 Nathan Sidwell <nathan@acm.org>
191
192 * gimple-parser.c: Don't #include tree-dump.h.
193
c587104e
MM
1942017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
195
196 PR testsuite/80580
197 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
198
67ac9a9d
MM
1992017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
200
201 PR testsuite/80580
202 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
203 incorrect __MEM syntax.
204
ac4eb40f
MM
2052017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
206
207 PR testsuite/80580
208 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
209 type of unary '*'.
210
641da50a
NS
2112017-05-09 Nathan Sidwell <nathan@acm.org>
212
213 * c-tree.h (pushdecl): Declare.
214
56d35585
DM
2152017-05-05 David Malcolm <dmalcolm@redhat.com>
216
217 * c-decl.c (warn_defaults_to): Replace report_diagnostic
218 with diagnostic_report_diagnostic.
219 * c-errors.c (pedwarn_c99): Likewise.
220 (pedwarn_c90): Likewise.
221
815d9cc6
XR
2222017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
223
224 PR c++/80038
225 * c-gimplify.c (c_gimplify_expr): Remove calls to
226 cilk_gimplifY_call_params_in_spawned_fn.
227
1c4ea66f
DM
2282017-04-25 David Malcolm <dmalcolm@redhat.com>
229
230 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
231 hint for removing extra semicolon.
232
666f7903
JJ
2332017-04-21 Jakub Jelinek <jakub@redhat.com>
234
235 PR c/80468
236 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
237 enabled, set specs->type to integer_type_node.
238
5764ee3c
JW
2392017-04-03 Jonathan Wakely <jwakely@redhat.com>
240
241 * c-array-notation.c: Fix typo in comment.
242
10fa8dfb
MP
2432017-03-29 Marek Polacek <polacek@redhat.com>
244
245 PR c/79730
246 * c-decl.c (finish_decl): Check VAR_P.
247
a9e4a1a5
JJ
2482017-03-27 Jakub Jelinek <jakub@redhat.com>
249
250 PR middle-end/80162
251 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
252 * c-typeck.c (c_mark_addressable): Likewise. Look through
253 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
254 to ARRAY_TYPE.
255 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
256
ee3ff394
MP
2572017-03-23 Marek Polacek <polacek@redhat.com>
258
259 * c-tree.h: Remove a C_RID_YYCODE reference.
260
4d1b8e70
JJ
2612017-03-21 Jakub Jelinek <jakub@redhat.com>
262
263 PR c/80097
264 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
265 optional COMPOUND_EXPR with ubsan instrumentation.
266
31dc71a8
MP
2672017-03-17 Marek Polacek <polacek@redhat.com>
268
269 * c-parser.c: Add C11 references.
270
d579c385
MP
2712017-03-15 Marek Polacek <polacek@redhat.com>
272
273 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
274
85059a38
MP
2752017-03-11 Marek Polacek <polacek@redhat.com>
276
277 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
278
2f6f187a
DM
2792017-03-10 David Malcolm <dmalcolm@redhat.com>
280
281 PR translation/79848
282 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
283 "%qs".
284 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
285
36618428
MP
2862017-03-09 Marek Polacek <polacek@redhat.com>
287
288 PR sanitizer/79757
289 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
290 parameter declarations with initializers.
291
01e5af5a
JJ
2922017-03-09 Jakub Jelinek <jakub@redhat.com>
293
294 PR c/79969
295 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
296 TYPE_STUB_DECL.
297
a71dbc63
JJ
2982017-03-07 Jakub Jelinek <jakub@redhat.com>
299
300 PR c/79834
301 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
302 for "may only be used in compound statements" diagnostics, change it
303 such that the same translatable string is used for all pragmas. For
304 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
305 diagnostics.
306 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
307 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
308 "may only be used in compound statements" diagnostics, such that the
309 same translatable string is used for all pragmas.
310
1ff4bae6
MP
3112017-03-04 Marek Polacek <polacek@redhat.com>
312
313 PR c/79847
314 * c-decl.c (implicit_decl_warning): Add missing space.
315
7f5a7d78
MP
3162017-03-03 Marek Polacek <polacek@redhat.com>
317
318 PR c/79758
319 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
320 current_function_prototype_arg_types is error_mark_node. Fix
321 formatting. Use TREE_VALUE instead of TREE_TYPE.
322
883c8f06
JJ
3232017-03-03 Jakub Jelinek <jakub@redhat.com>
324
79c9b7a8
JJ
325 PR c/79837
326 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
327 %<min%> or %<max%> in the diagnostics, instead mention identifier.
328 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
329 diagnostics.
330
883c8f06
JJ
331 PR c/79836
332 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
333 instead of %<_Generic>.
334 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
335 (c_parser_omp_target_exit_data): Use %<release%> instead of
336 %<release>.
337
324ff1a0
JJ
3382017-02-28 Jakub Jelinek <jakub@redhat.com>
339
340 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
341 instead of just cond ? "..." : "...".
342 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
343 for "enter"/"exit" keyword.
344 (c_finish_oacc_routine): Don't use %s to supply portions of the
345 message.
346
4227c9ad
JJ
3472017-02-24 Jakub Jelinek <jakub@redhat.com>
348
349 PR c++/79588
350 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
351 handle -Wrestrict here.
352 * c-typeck.c (build_function_call_vec): Adjust
353 check_function_arguments caller.
354
5d972e66
RB
3552017-02-23 Richard Biener <rguenther@suse.de>
356
357 PR c/79684
358 * gimple-parser.c (c_parser_gimple_statement): Use set_error
359 to initialize c_exprs to return.
360 (c_parser_gimple_binary_expression): Likewise.
361 (c_parser_gimple_unary_expression): Likewise.
362 (c_parser_gimple_postfix_expression): Likewise.
363
61ac5ebe
MP
3642017-02-22 Marek Polacek <polacek@redhat.com>
365
366 PR c/79662
367 * c-typeck.c (convert_arguments): Handle error_mark_node.
368
41d1b0b1
PK
3692017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
370
371 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
372 value of c_parser_parse_ssa_name against error_mark_node and emit
373 error if ssa name is anonymous and written as default definition.
374
eab1f169
PK
3752017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
376
377 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
378 FMA_EXPR.
379
bcac0b4d
JJ
3802017-02-16 Jakub Jelinek <jakub@redhat.com>
381
382 PR c++/79512
383 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
384 ignore #pragma omp target even when not followed by identifier.
385
1be33173
PK
3862017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
387
388 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
389 (c_parser_gimple_unary_expression): Likewise.
390
aa326bfb
JJ
3912017-02-13 Jakub Jelinek <jakub@redhat.com>
392
393 * c-parser.c (c_parser_oacc_declare): Add missing space in
394 diagnostics.
395
8a398bc5
PK
3962017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
397
398 PR c/79478
399 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
400 set_c_expr_source_range when parsing ssa-name.
401
3dcde5ef
PG
4022017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
403 Richard Biener <rguenther@suse.de>
404
405 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
406 building IL when arguments are error_mark_node.
407 (c_parser_gimple_unary_expression): Likewise.
408 (c_parser_gimple_if_stmt): Likewise.
409 (c_parser_gimple_switch_stmt): Likewise.
410 (c_parser_gimple_return_stmt): Likewise.
411 (c_parser_parse_ssa_name): When name lookup fails do not build
412 an SSA name. Use undeclared rather than not declared in error
413 reporting.
414
192b048b
MP
4152017-02-09 Marek Polacek <polacek@redhat.com>
416
417 PR c/79428
418 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
419 instead of c_parser_skip_until_found.
420
56f71478
JJ
4212017-02-09 Jakub Jelinek <jakub@redhat.com>
422
423 PR c/79431
424 * c-parser.c (c_parser_omp_declare_target): Don't invoke
425 symtab_node::get on automatic variables.
426
02889d23
CLT
4272016-02-09 Nathan Sidwell <nathan@codesourcery.com>
428 Chung-Lin Tang <cltang@codesourcery.com>
429
430 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
431 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
432 semantic checking.
433 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
434
7af4b20d
RB
4352017-02-07 Richard Biener <rguenther@suse.de>
436
437 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
438 (c_parser_gimple_postfix_expression_after_primary):
439 Do not use c_build_function_call_vec to avoid folding and promotion.
440 Simplify.
441
e5e391d6
MO
4422017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
443
444 PR lto/79061
445 * c-decl.c (pop_scope): Pass main_input_filename to
446 build_translation_unit_decl.
447
c2e84327
DM
4482017-01-24 David Malcolm <dmalcolm@redhat.com>
449
450 * c-parser.c: Include "read-rtl-function.h" and
451 "run-rtl-passes.h".
452 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
453 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
454 production. Update for renaming of field "gimple_pass" to
455 "gimple_or_rtl_pass". If __RTL was seen, call
456 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
457 to an auto_timevar, to cope with early exit.
458 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
459 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
460 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
461 Handle RID_RTL.
462 (c_parser_parse_rtl_body): New function.
463 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
464 (struct c_declspecs): Rename field "gimple_pass" to
465 "gimple_or_rtl_pass". Add field "rtl_p".
466 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
467 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
468 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
469 (c_parser_gimple_or_rtl_pass_list): ...this.
470
2ebd93e1
MP
4712017-01-20 Marek Polacek <polacek@redhat.com>
472
473 PR c/64279
474 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
475
b1c95bb5
RB
4762017-01-13 Richard Biener <rguenther@suse.de>
477
478 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
479 nops.
480
25329913
RB
4812017-01-13 Richard Biener <rguenther@suse.de>
482
483 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
484 _Literal ( type-name ) number.
485
6bb4ea5c
RB
4862017-01-12 Richard Biener <rguenther@suse.de>
487
488 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
489 __MEM.
490
6b5b4e9c
JJ
4912017-01-11 Jakub Jelinek <jakub@redhat.com>
492
493 PR c++/72813
494 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
495 PCH file.
496
e3252775
RB
4972017-01-11 Richard Biener <rguenther@suse.de>
498
499 PR bootstrap/79052
500 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
501 returns on parse errors.
502
a9342885
MP
5032017-01-04 Marek Polacek <polacek@redhat.com>
504
505 PR c++/64767
506 * c-parser.c (c_parser_postfix_expression): Mark zero character
507 constants by setting original_type in c_expr.
508 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
509 with a zero character constant.
510 (char_type_p): New function.
511
5dd9a9d0
DM
5122017-01-04 David Malcolm <dmalcolm@redhat.com>
513
514 * c-parser.c (c_parser_declaration_or_fndef): Create a
515 rich_location at init_loc and parse it to start_init.
516 (last_init_list_comma): New global.
517 (c_parser_braced_init): Update last_init_list_comma when parsing
518 commas. Pass it to pop_init_level. Pass location of closing
519 brace to pop_init_level.
520 (c_parser_postfix_expression_after_paren_type): Create a
521 rich_location at type_loc and parse it to start_init.
522 (c_parser_omp_declare_reduction): Likewise for loc.
523 * c-tree.h (start_init): Add rich_location * param.
524 (pop_init_level): Add location_t param.
525 * c-typeck.c (struct initializer_stack): Add field
526 "missing_brace_richloc".
527 (start_init): Add richloc param, use it to initialize
528 the stack node's missing_brace_richloc.
529 (last_init_list_comma): New decl.
530 (finish_implicit_inits): Pass last_init_list_comma to
531 pop_init_level.
532 (push_init_level): When finding missing open braces, add fix-it
533 hints to the richloc.
534 (pop_init_level): Add "insert_before" param and pass it
535 when calling pop_init_level. Add fixits about missing
536 close braces to any richloc. Use the richloc for the
537 -Wmissing-braces warning.
538 (set_designator): Pass last_init_list_comma to pop_init_level.
539 (process_init_element): Likewise.
540
cbe34bb5
JJ
5412017-01-01 Jakub Jelinek <jakub@redhat.com>
542
543 Update copyright years.
544
d17680f3
JJ
5452016-12-21 Jakub Jelinek <jakub@redhat.com>
546
0dba7960
JJ
547 PR bootstrap/78817
548 * c-typeck.c (build_function_call_vec): If check_function_arguments
549 returns true, set TREE_NO_WARNING on CALL_EXPR.
550
d17680f3
JJ
551 PR c/77767
552 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
553 to *expr instead of overwriting it.
554
aa90531e
RB
5552016-12-20 Richard Biener <rguenther@suse.de>
556
557 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
558 error recovery.
559 (c_parser_gimple_statement): Only build assigns for non-error
560 stmts.
561 (c_parser_gimple_postfix_expression_after): Improve error recovery.
562
629b3d75
MJ
5632016-12-14 Martin Jambor <mjambor@suse.cz>
564
565 * c-parser.c: Include omp-general.h and omp-offload.h instead of
566 omp-low.h.
567 (c_finish_oacc_routine): Adjusted call to
568 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
569 to use their new names.
570 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
571 use its new name.
572 (c_parser_oacc_update): Likewise.
573 (c_parser_omp_simd): Likewise.
574 (c_parser_omp_target_update): Likewise.
575 * c-typeck.c: Include omp-general.h instead of omp-low.h.
576 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
577 name.
578 (c_finish_omp_cancellation_point): Likewise.
579 * gimple-parser.c: Do not include omp-low.h
580
c5af52eb
CP
5812016-12-02 Cesar Philippidis <cesar@codesourcery.com>
582 James Norris <jnorris@codesourcery.com>
583
584 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
585 EXIT_DATA,WAIT} are not used in compound statements.
586 (c_parser_oacc_enter_exit_data): Update diagnostics.
587
48330c93
BE
5882016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
589
590 PR c++/71973
591 * c-decl.c (diagnose_mismatched_decls): Use
592 OPT_Wbuiltin_declaration_mismatch here too.
593
899ca90e 5942016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
595 Alan Hayward <alan.hayward@arm.com>
596 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
597
598 * c-decl.c (merge_decls): Use SET_DECL_MODE.
599 (make_label, finish_struct): Likewise.
600
1ee62b92 6012016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 602 Richard Biener <rguenther@suse.de>
22b15758 603
8e745a17
JJ
604 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
605 * config-lang.in (gtfiles): Add c/c-parser.h.
606 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
607 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
608 * c-parser.c (enum c_id_kind, struct c_token,
609 c_parser_next_token_is, c_parser_next_token_is_not,
610 c_parser_next_token_is_keyword,
611 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
612 Split out to ...
613 * c-parser.h: ... new header.
614 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 615 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
616 c_token_starts_typename, c_parser_next_token_starts_declspecs,
617 c_parser_next_tokens_start_declaration, c_parser_consume_token,
618 c_parser_error, c_parser_require, c_parser_skip_until_found,
619 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
620 c_parser_type_name): Export.
621 (c_parser_tokens_buf): New function.
622 (c_parser_error): Likewise.
623 (c_parser_set_error): Likewise.
624 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
625 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
626 via c_parser_parse_gimple_body.
8e745a17
JJ
627 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
628 c_token_starts_typename, c_parser_next_token_starts_declspecs,
629 c_parser_next_tokens_start_declaration, c_parser_consume_token,
630 c_parser_error, c_parser_require, c_parser_skip_until_found,
631 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
632 c_parser_type_name): Declare.
1ee62b92
PG
633 (struct c_parser): Declare forward.
634 (c_parser_tokens_buf): Declare.
8e745a17
JJ
635 (c_parser_error): Likewise.
636 (c_parser_set_error): Likewise.
637 * gimple-parser.c: New file.
638 * gimple-parser.h: Likewise.
1ee62b92 639
22b15758
UB
6402016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
641
642 PR c/35503
643 * c-parser.c (c_parser_postfix_expression_after_primary): Call
644 warn_for_restrict.
645
84ff4775
LCW
6462016-09-11 Le-Chun Wu <lcwu@google.com>
647 Mark Wielaard <mjw@redhat.com>
648
649 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
650 to the given -Wshadow= variant.
651
4d0cdd0c
TP
6522016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
653
654 * c-typeck.c: Include memmodel.h.
655
1202f33e
JJ
6562016-10-13 Jakub Jelinek <jakub@redhat.com>
657
658 PR target/77957
659 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
660 instead of lhd_return_null_tree_v.
661
8a14afd0
BS
6622016-10-07 Bernd Schmidt <bschmidt@redhat.com>
663
664 PR c++/69733
665 * c-decl.c (smallest_type_quals_location): New static function.
666 (grokdeclarator): Try to find the correct location for an ignored
667 qualifier.
668
81fea426
MP
6692016-09-26 Marek Polacek <polacek@redhat.com>
670
671 PR c/7652
672 * c-decl.c (pop_scope): Add gcc_fallthrough.
673
6742016-09-26 Marek Polacek <polacek@redhat.com>
675
676 PR c/7652
677 * c-parser.c (struct c_token): Add flags field.
678 (c_lex_one_token): Pass it to c_lex_with_flags.
679 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
680 into IFN_FALLTHROUGH.
681 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
682 attribute fallthrough after a case label or default label.
683 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
684
9a2300e9
MP
6852016-09-24 Marek Polacek <polacek@redhat.com>
686
687 PR c/77490
688 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
689 have boolean value. Warn about ++/-- on booleans.
690
7de76362
JJ
6912016-09-23 Jakub Jelinek <jakub@redhat.com>
692
693 * c-parser.c (incomplete_record_decls): Remove unnecessary
694 = vNULL initialization of file scope vec.
695
5b73d2ab
MP
6962016-09-16 Marek Polacek <polacek@redhat.com>
697
698 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
699
e51fbec3
MP
7002016-09-14 Marek Polacek <polacek@redhat.com>
701
702 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
703 (fix_array_notation_expr): Likewise.
704 * c-decl.c (finish_decl): Likewise.
705 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
706 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
707 (function_to_pointer_conversion): Use false instead of 0.
708 (convert_lvalue_to_rvalue): Likewise.
709 (parser_build_unary_op): Likewise.
710 (build_atomic_assign): Likewise.
711 (build_unary_op): Change nonconvert parameter type to bool, use
712 true/false instead of 1/0.
713 (build_binary_op): Use true instead of 1.
714
254830ba
DM
7152016-09-13 David Malcolm <dmalcolm@redhat.com>
716
717 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
718 of add_fixit_insert to add_fixit_insert_before.
719
4c13ba17
MP
7202016-09-13 Marek Polacek <polacek@redhat.com>
721
722 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
723 it.
724
54dcdb88
BE
7252016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
726
727 PR c++/77496
728 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
729 COMPOUND_EXPR to warn_for_omitted_condop.
730
e5106e27
DM
7312016-09-07 David Malcolm <dmalcolm@redhat.com>
732
733 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
734 c_get_substring_location for this new langhook.
735
9dc5773f
JJ
7362016-09-02 Jakub Jelinek <jakub@redhat.com>
737
738 PR c/65467
739 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
740 flag_openmp.
741 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
742 instead of mark_exp_read on low_bound/length expression.
743 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
744 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
745 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
746 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
747 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
748 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
749 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
750 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
751 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
752 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
753 instead of mark_expr_read.
754 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
755 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
756 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
757 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
758 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
759 array section bases outside of depend clause, for depend clause
760 use convert_lvalue_to_rvalue on the base.
761 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
762 linear, aligned, map, to and from clauses.
763 (c_omp_clause_copy_ctor): New function.
764
295844f6
MP
7652016-09-01 Marek Polacek <polacek@redhat.com>
766
767 PR c/7652
768 * c-typeck.c (composite_type): Add FALLTHRU comment.
769
089af25c
DM
7702016-08-31 David Malcolm <dmalcolm@redhat.com>
771
772 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
773 to the insertion fixits for "struct", "union", and "enum".
774
f9087798
DM
7752016-08-30 David Malcolm <dmalcolm@redhat.com>
776
777 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
778 rather than add_fixit_misspelled_id.
779 (undeclared_variable): Likewise.
780 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
781 now-redundant "here" params from add_fixit_insert method calls.
782 (c_parser_parameter_declaration): Likewise.
783 * c-typeck.c (build_component_ref): Remove now-redundant range
784 param from add_fixit_replace method calls.
785
ebef225f
MP
7862016-08-25 Marek Polacek <polacek@redhat.com>
787
788 * c-typeck.c (parser_build_binary_op): Pass LHS to
789 warn_logical_not_parentheses.
790
fe377a48
MP
7912016-08-25 Marek Polacek <polacek@redhat.com>
792
793 PR c/77323
794 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
795 or _FloatN or _FloatNx is not supported.
796 (finish_declspecs): Set type to integer_type_node when _FloatN or
797 _FloatNx is not supported.
798
c65699ef
JM
7992016-08-19 Joseph Myers <joseph@codesourcery.com>
800
801 PR c/32187
802 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
803 (struct c_declspecs): Add field floatn_nx_idx.
804 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
805 and _FloatNx type specifiers.
806 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
807 (c_parser_declspecs, c_parser_attribute_any_word)
808 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
809 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
810 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
811 narrower than double.
812
2f1364c2
JJ
8132016-08-12 Jakub Jelinek <jakub@redhat.com>
814 Martin Liska <mliska@suse.cz>
815
816 PR c/67410
817 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
818 % to determine val element to change. Assert that
819 wchar_bytes * charwidth fits into val array.
820
191816a3
MP
8212016-08-12 Marek Polacek <polacek@redhat.com>
822
823 PR c/7652
824 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
825 (c_parser_postfix_expression): Likewise.
826 * c-typeck.c (build_unary_op): Adjust fall through comment.
827 (c_mark_addressable): Likewise.
828
b95a64bb
JJ
8292016-08-11 Jakub Jelinek <jakub@redhat.com>
830
831 PR c/72816
832 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
833 array member through typedef, for orig_qual_indirect == 0 clear
834 orig_qual_type.
835
895aa8e1
DM
8362016-08-08 David Malcolm <dmalcolm@redhat.com>
837
838 PR c/64955
839 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
840 this up to selftest::run_c_tests.
841 (selftest::run_c_tests): New function.
842
0b212d8c
TS
8432016-08-04 Thomas Schwinge <thomas@codesourcery.com>
844
ae9281fc
TS
845 * c-parser.c (struct oacc_routine_data): Add error_seen and
846 fndecl_seen members.
847 (c_finish_oacc_routine): Use these.
848 (c_parser_declaration_or_fndef): Adjust.
849 (c_parser_oacc_routine): Likewise. Support more C language
850 constructs, and improve diagnostics. Move pragma context
851 checking...
852 (c_parser_pragma): ... here.
853
0b212d8c
TS
854 * c-parser.c (struct oacc_routine_data): New.
855 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
856 Simplify code.
857 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
858 declare target" attribute.
859
76e2c821
JB
8602016-08-01 Jan Beulich <jbeulich@suse.com>
861
862 * c-fold.c (c_fully_fold_internal): Also emit shift count
863 warnings for vector types.
864 * c-typeck.c (build_binary_op): Likewise.
865
f618a472
MP
8662016-07-29 Marek Polacek <polacek@redhat.com>
867
868 PR c/71742
869 * c-decl.c (finish_struct): Rephrase an error message.
870
efd0786f
MP
871 PR c/71853
872 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
873 to error node for invalid code.
874
e00dceaf
MP
875 PR c/71573
876 * c-decl.c (implicitly_declare): Return decl early not only for
877 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
878
673a107a
JJ
8792016-07-29 Jakub Jelinek <jakub@redhat.com>
880
881 PR c/71969
882 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
883 on GNU extern inline functions.
884
a5b5c8b6
MP
8852016-07-29 Marek Polacek <polacek@redhat.com>
886
887 PR c/71583
888 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
889 check expr.value.
890
e3fe09c1
UB
8912016-07-22 Uros Bizjak <ubizjak@gmail.com>
892
893 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
894
7c8f7eaa
DM
8952016-07-20 David Malcolm <dmalcolm@redhat.com>
896
897 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
898 spellcheck-tree.h
899 (best_macro_match): Likewise, converting from a typedef to a
900 subclass.
901 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
902 (lookup_name_fuzzy): Update for change of best_macro_match to a
903 subclass with a ctor that calls cpp_forall_identifiers.
904
de6a69ee
DM
9052016-07-20 David Malcolm <dmalcolm@redhat.com>
906
907 * c-decl.c (implicit_decl_warning): Update for conversion of
908 return type of lookup_name_fuzzy to const char *.
909 (undeclared_variable): Likewise.
910 (lookup_name_fuzzy): Convert return type from tree to
911 const char *.
912 * c-parser.c (c_parser_declaration_or_fndef): Update for
913 conversion of return type of lookup_name_fuzzy to const char *.
914 (c_parser_parameter_declaration): Likewise.
915
b1c9c068
CP
9162016-07-15 Cesar Philippidis <cesar@codesourcery.com>
917
918 * c-parser.c (c_parser_oacc_declare): Don't scan for
919 GOMP_MAP_POINTER.
920 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
921 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
922 zero-length subarrays.
923
ddbbcb19
JJ
9242016-07-15 Jakub Jelinek <jakub@redhat.com>
925
926 PR c/71858
927 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
928 instead of FUZZY_LOOKUP_NAME.
929 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
930 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
931
dd36b877
JJ
9322016-07-14 Jakub Jelinek <jakub@redhat.com>
933
934 PR c/71858
935 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
936
8c681247
TS
9372016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
938
939 * c-parser.c (c_parser_generic_selection): Make type of variable
940 auto_vec.
941 (c_parser_omp_declare_simd): Likewise.
942
bf4fa671
TS
9432016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
944
945 * c-decl.c (struct c_struct_parse_info): Change member types
946 from vec to auto_vec.
947 (start_struct): Adjust.
948 (finish_struct): Likewise.
949
557e8c49
JJ
9502016-07-02 Jakub Jelinek <jakub@redhat.com>
951
952 PR c/71719
953 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
954
54d19c3b
TS
9552016-06-29 Thomas Schwinge <thomas@codesourcery.com>
956
957 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
958 Move pragma context checking into...
959 (c_parser_omp_cancellation_point): ... here, and improve
960 diagnostic messages.
961 * c-typeck.c (c_finish_omp_cancel)
962 (c_finish_omp_cancellation_point): Improve diagnostic messages.
963
152ef731
JJ
9642016-06-29 Jakub Jelinek <jakub@redhat.com>
965
966 PR c/71685
967 * c-typeck.c (c_build_qualified_type): Don't clear
968 C_TYPE_INCOMPLETE_VARS for the main variant.
969
9702016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
971
972 PR c/71552
973 * c-typeck.c (output_init_element): Diagnose incompatible types
974 before non-constant initializers.
975
e9ac1f86
JJ
9762016-06-28 Jakub Jelinek <jakub@redhat.com>
977
978 * Make-lang.in: Don't cat ../stage_current if it does not exist.
979
277d7ee0
AK
9802016-06-23 Andi Kleen <ak@linux.intel.com>
981
982 * Make-lang.in: Add support for autofdo.
983
1a4f11c8
DM
9842016-06-22 David Malcolm <dmalcolm@redhat.com>
985
986 PR c/70339
987 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
988 (implicit_decl_warning): When issuing warnings for implicit
989 declarations, attempt to provide a suggestion via
990 lookup_name_fuzzy.
991 (undeclared_variable): Likewise when issuing errors.
992 (lookup_name_in_scope): Likewise.
993 (struct edit_distance_traits<cpp_hashnode *>): New struct.
994 (best_macro_match): New typedef.
995 (find_closest_macro_cpp_cb): New function.
996 (lookup_name_fuzzy): New function.
997 * c-parser.c: Include gcc-rich-location.h.
998 (c_token_starts_typename): Split out case CPP_KEYWORD into...
999 (c_keyword_starts_typename): ...this new function.
1000 (c_parser_declaration_or_fndef): When issuing errors about
1001 missing "struct" etc, add a fixit. For other kinds of errors,
1002 attempt to provide a suggestion via lookup_name_fuzzy.
1003 (c_parser_parms_declarator): When looking ahead to detect typos in
1004 type names, also reject CPP_KEYWORD.
1005 (c_parser_parameter_declaration): When issuing errors about
1006 unknown type names, attempt to provide a suggestion via
1007 lookup_name_fuzzy.
1008 * c-tree.h (c_keyword_starts_typename): New prototype.
1009
5a578671
JM
10102016-06-20 Joseph Myers <joseph@codesourcery.com>
1011
1012 PR c/71601
1013 * c-typeck.c (build_conditional_expr): Return error_mark_node if
1014 c_common_type returns error_mark_node.
1015
3f8257db 10162016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
1017
1018 PR c/69507
1019 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1020 __alignof__ (expression).
1021
6a3f203c
DM
10222016-06-14 David Malcolm <dmalcolm@redhat.com>
1023
1024 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1025
264757fb
DM
10262016-06-14 David Malcolm <dmalcolm@redhat.com>
1027
1028 * c-typeck.c (build_component_ref): Simplify fixit code by
1029 using gcc_rich_location::add_fixit_misspelled_id.
1030 (set_init_label): Likewise.
1031
f7e4f2e3
DM
10322016-06-13 David Malcolm <dmalcolm@redhat.com>
1033
1034 * c-parser.c (c_parser_initelt): Provide location of name for new
1035 location_t param of set_init_label.
1036 * c-tree.h (set_init_label): Add location_t param.
1037 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1038 param and use it when issuing error messages about unrecognized
1039 field names. Attempt to provide a fixit hint if appropriate,
1040 otherwise update the error message to provide the type name.
1041
4b1ffdb1
TS
10422016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1043
1044 PR c/71381
1045 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1046 Loosen checking.
1047
44a845ca
MS
10482016-06-08 Martin Sebor <msebor@redhat.com>
1049 Jakub Jelinek <jakub@redhat.com>
1050
1051 PR c++/70507
1052 PR c/68120
1053 * c-typeck.c (convert_arguments): Don't promote last argument
1054 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1055
92a5f2ba
MP
10562016-06-08 Marek Polacek <polacek@redhat.com>
1057
1058 PR c/71418
1059 * c-decl.c (grokdeclarator): Check TYPE_P.
1060
08203f73
MP
1061 PR c/71426
1062 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1063 code.
1064
6ffd47b7
DM
10652016-06-07 David Malcolm <dmalcolm@redhat.com>
1066
1067 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1068 and structure element reference, capture the location of the
1069 element name token and pass it to build_component_ref.
1070 (c_parser_postfix_expression_after_primary): Likewise for
1071 structure element dereference.
1072 (c_parser_omp_variable_list): Likewise for
1073 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1074 * c-tree.h (build_component_ref): Add location_t param.
1075 * c-typeck.c (build_component_ref): Add location_t param
1076 COMPONENT_LOC. Use it, if available, when issuing hints about
1077 mispelled member names to provide a fixit replacement hint.
1078
1f40cff3
MP
10792016-06-06 Marek Polacek <polacek@redhat.com>
1080
1081 PR c/71362
1082 * c-parser.c (c_parser_direct_declarator): Set location.
1083
5545a907
MP
10842016-06-06 Marek Polacek <polacek@redhat.com>
1085
1086 * c-typeck.c (comptypes_internal): Handle comparisons of
1087 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1088 TYPE_REF_CAN_ALIAS_ALL.
1089
b605f663
CLT
10902016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1091
1092 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1093 arguments as addressable when async clause exists.
1094
00631022
JJ
10952016-05-30 Jakub Jelinek <jakub@redhat.com>
1096
1097 PR c++/71349
1098 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1099 when combined with target construct.
1100
7211a097
JJ
11012016-05-26 Jakub Jelinek <jakub@redhat.com>
1102
1103 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1104 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1105
95efe6b6
MP
11062016-05-25 Marek Polacek <polacek@redhat.com>
1107
1108 PR c/71265
1109 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1110
a23faf7a
MP
1111 PR c/71266
1112 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1113
e46c7770
CP
11142016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1115
1116 * c-parser.c (c_parser_oacc_declare): Add support for
1117 GOMP_MAP_FIRSTPRIVATE_POINTER.
1118 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1119 argument with enum c_omp_region_type ort.
1120 (handle_omp_array_sections): Likewise. Update call to
1121 handle_omp_array_sections_1.
1122 (c_finish_omp_clauses): Add specific errors and warning messages for
1123 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1124 call to handle_omp_array_sections.
1125
a04e69c0
TS
11262016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1127
1128 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1129
f17a223d
RB
11302016-05-24 Richard Biener <rguenther@suse.de>
1131
1132 PR middle-end/70434
1133 PR c/69504
1134 * c-typeck.c (build_array_ref): Do not complain about indexing
1135 non-lvalue vectors. Adjust for function name change.
1136
79063edd
MS
11372016-05-20 Martin Sebor <msebor@redhat.com>
1138
1139 PR c/71115
1140 * c-typeck.c (error_init): Use
1141 expansion_point_location_if_in_system_header.
1142 (warning_init): Same.
1143
8a40fef3
DM
11442016-05-19 David Malcolm <dmalcolm@redhat.com>
1145
1146 PR c/71171
1147 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1148 in error-handling.
1149 (c_parser_postfix_expression): Likewise.
1150 * c-tree.h (c_expr::set_error): New method.
1151 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1152 that result's range is initialized.
1153
e9892350
JG
11542016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1155
1156 * c-typeck.c (parser_build_unary_op): Fix formatting.
1157
8fad45f5
MW
11582016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1159
1160 * c-decl.c (grokdeclarator): Remove errmsg and use of
1161 targetm.invalid_return_type.
1162 (grokparms): Remove errmsg and use of
1163 targetm.invalid_parameter_type.
1164
aa4b467b
JM
11652016-05-13 Joseph Myers <joseph@codesourcery.com>
1166
1167 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1168 function return type.
1169
4f2e1536
MP
11702016-05-12 Marek Polacek <polacek@redhat.com>
1171
1172 PR c/70756
1173 * c-decl.c (build_compound_literal): Pass LOC down to
1174 c_incomplete_type_error.
1175 * c-tree.h (require_complete_type): Adjust declaration.
1176 (c_incomplete_type_error): Likewise.
1177 * c-typeck.c (require_complete_type): Add location parameter, pass it
1178 down to c_incomplete_type_error.
1179 (c_incomplete_type_error): Add location parameter, pass it down to
1180 error_at.
1181 (build_component_ref): Pass location down to c_incomplete_type_error.
1182 (default_conversion): Pass location down to require_complete_type.
1183 (build_array_ref): Likewise.
1184 (build_function_call_vec): Likewise.
1185 (convert_arguments): Likewise.
1186 (build_unary_op): Likewise.
1187 (build_c_cast): Likewise.
1188 (build_modify_expr): Likewise.
1189 (convert_for_assignment): Likewise.
1190 (c_finish_omp_clauses): Likewise.
1191
d6e83a8d
MM
11922016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1193
1194 PR c/43651
1195 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1196 is enabled.
1197 * c-errors.c (pedwarn_c90): Return true if warned.
1198 * c-tree.h (pedwarn_c90): Change return type to bool.
1199 (enum c_declspec_word): Add new enumerator cdw_atomic.
1200
5c3a10fb
MP
12012016-05-11 Marek Polacek <polacek@redhat.com>
1202
1203 PR c++/71024
1204 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1205 diagnose_mismatched_attributes and call it.
1206
cf68d92c
MP
12072016-05-10 Marek Polacek <polacek@redhat.com>
1208
1209 PR c/70255
1210 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1211 on a declaration following the definition.
1212
351f85c5
JJ
12132016-05-05 Jakub Jelinek <jakub@redhat.com>
1214
1215 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1216 parse it through to c_parser_c99_block_statement.
1217 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1218 caller.
1219
deef7113
MP
12202016-05-04 Marek Polacek <polacek@redhat.com>
1221
1222 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1223 OPT_Wdangling_else.
1224
de55efd5
MP
12252016-05-04 Marek Polacek <polacek@redhat.com>
1226
1227 PR c/48778
1228 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1229 for macro expansions.
1230
79ce98bc
MP
12312016-05-03 Marek Polacek <polacek@redhat.com>
1232
1233 PR c/70859
1234 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1235 check_builtin_function_arguments.
1236
fb2647aa
RB
12372016-05-03 Richard Biener <rguenther@suse.de>
1238
1239 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1240 the checksum from the previous stage.
1241
77886428
CP
12422016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1243
1244 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1245 c_finish_omp_clauses.
1246 (c_parser_omp_all_clauses): Likewise.
1247 (c_parser_oacc_cache): Likewise.
1248 (c_parser_oacc_loop): Likewise.
1249 (omp_split_clauses): Likewise.
1250 (c_parser_omp_declare_target): Likewise.
1251 (c_parser_cilk_all_clauses): Likewise.
1252 (c_parser_cilk_for): Likewise.
1253 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1254 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1255
7176a4a0
MP
12562016-05-02 Marek Polacek <polacek@redhat.com>
1257
1258 PR c/70851
1259 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1260 incomplete type.
1261
e7ff0319
CP
12622016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1263
1264 PR middle-end/70626
1265 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1266 OACC_LOOP_CLAUSE_MASK.
1267 (c_parser_oacc_kernels_parallel): Update call to
1268 c_oacc_split_loop_clauses.
1269
9f405ce1
AM
12702016-04-28 Andrew MacLeod <amacleod@redhat.com>
1271
1272 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1273 argument to build_modify_expr in two cases.
1274
c1e1f433
BS
12752016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1276
1277 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1278 warn_for_memset instead of warning directly here.
1279
2448a956
MP
12802016-04-26 Marek Polacek <polacek@redhat.com>
1281
1282 PR c/67784
1283 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1284 out of ...
1285 (c_parser_for_statement): ... here.
1286 (c_parser_if_statement): Use it.
1287 (c_parser_switch_statement): Use it.
1288 (c_parser_while_statement): Use it.
1289
b02a5e26
MP
1290 PR c/70791
1291 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1292
477d4906
IV
12932016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1294
1295 PR c++/69363
1296 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1297 instead of c_finish_cilk_clauses.
1298 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1299 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1300 floating-point variables in the linear clause for Cilk Plus.
1301
fe37c7af
MM
13022016-04-18 Michael Matz <matz@suse.de>
1303
1304 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1305 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1306
949505a9
MP
13072016-04-15 Marek Polacek <polacek@redhat.com>
1308
1309 PR c/70671
1310 * c-typeck.c (build_unary_op): Pass location down to error and
1311 warning call.
1312
dda1bf61
JJ
13132016-04-15 Jakub Jelinek <jakub@redhat.com>
1314
1315 PR c/70436
1316 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1317 where needed.
1318 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1319 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1320 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1321 Adjust c_parser_pragma callers.
1322 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1323 caller.
1324 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1325 c_parser_statement.
1326 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1327 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1328 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1329 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1330 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1331 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1332 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1333 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1334 down where needed.
1335 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1336 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1337 calls.
1338
99cd9857
MP
13392016-04-13 Marek Polacek <polacek@redhat.com>
1340
1341 PR c/70436
1342 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1343 adjust callers.
1344 (c_parser_statement): Likewise.
1345 (c_parser_c99_block_statement): Likewise.
1346 (c_parser_while_statement): Likewise.
1347 (c_parser_for_statement): Likewise.
1348 (c_parser_if_body): Don't set IF_P here.
1349 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1350 about dangling else here.
1351 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1352 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1353 warn about dangling else here.
1354
f13355da
MP
13552016-04-04 Marek Polacek <polacek@redhat.com>
1356
1357 PR c/70307
1358 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1359
5fde6a45
MP
13602016-03-31 Marek Polacek <polacek@redhat.com>
1361
1362 PR c/70297
1363 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1364
4bbf545b
DM
13652016-03-18 David Malcolm <dmalcolm@redhat.com>
1366
1367 PR c/70281
1368 * c-parser.c (c_parser_postfix_expression): Set the source range
1369 for uses of "__builtin_types_compatible_p".
1370
fcc2b74f
JJ
13712016-03-17 Jakub Jelinek <jakub@redhat.com>
1372
1373 PR c/70280
1374 * c-typeck.c (composite_type): Don't count void_list_node
1375 into len, if the list is terminated by void_list_node, start
1376 with void_list_node instead of NULL for newargs. Stop
1377 at void_list_node.
1378
ab4c578f
MP
13792016-03-16 Marek Polacek <polacek@redhat.com>
1380
1381 PR c/70093
1382 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1383 nested functions returning VM types.
1384
96b3c82d
CP
13852016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1386
1387 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1388 when calling c_finish_omp_clauses.
1389
29b9828f
BS
13902016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1391
1392 PR c/69824
1393 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1394 for later.
1395
7ff6ca38
MP
13962016-03-04 Marek Polacek <polacek@redhat.com>
1397
1398 PR c/69798
1399 * c-parser.c (c_parser_postfix_expression): Call
1400 c_parser_cast_expression rather than c_parser_postfix_expression.
1401
686e2237
JJ
14022016-03-01 Jakub Jelinek <jakub@redhat.com>
1403
1404 PR c/69796
1405 PR c/69974
1406 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1407 of incomplete decls to error_mark_node.
1408
0b05329b
MP
14092016-02-24 Marek Polacek <polacek@redhat.com>
1410
1411 PR c/69819
1412 * c-decl.c (finish_decl): Don't update the copy of the type of a
1413 different decl type.
1414
067fbd8b
JJ
14152016-02-23 Jakub Jelinek <jakub@redhat.com>
1416
1417 PR objc/69844
1418 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1419 in id_kind reclassification.
1420
bf14eba2
JJ
14212016-02-16 Jakub Jelinek <jakub@redhat.com>
1422
1423 PR c/69835
1424 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1425
ba539195
JN
14262016-02-16 James Norris <jnorris@codesourcery.com>
1427
1428 PR c/64748
1429 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1430
16595a1f
BS
14312016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1432
f48dfe98
BS
1433 * c-decl.c (build_null_declspecs): Zero the entire struct.
1434
16595a1f
BS
1435 PR c/69522
1436 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1437 callers changed. If nested_p is true, use it to call
1438 finish_implicit_inits.
1439 * c-tree.h (finish_implicit_inits): Declare.
1440 * c-typeck.c (finish_implicit_inits): New function. Move code
1441 from ...
1442 (push_init_level): ... here.
1443 (set_designator, process_init_element): Call finish_implicit_inits.
1444
66756373
JJ
14452016-02-11 Jakub Jelinek <jakub@redhat.com>
1446
1447 PR c/69768
1448 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1449 arguments for -Waddress warning.
1450
1066e9b5
JJ
14512016-02-04 Jakub Jelinek <jakub@redhat.com>
1452
1453 PR c/69669
1454 * c-decl.c (finish_enum): When honoring mode attribute,
1455 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1456
3a5d2ba4
JJ
14572016-01-29 Jakub Jelinek <jakub@redhat.com>
1458
1459 PR debug/69518
1460 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1461 all type variants, not just TYPE_MAIN_VARIANT.
1462
cbdd8ae0
JJ
14632016-01-27 Jakub Jelinek <jakub@redhat.com>
1464
1465 PR debug/66869
1466 * c-decl.c (c_write_global_declarations_1): Warn with
1467 warn_unused_function if static prototype without definition
1468 is not C_DECL_USED.
1469
fa74a4bc
MP
14702016-01-27 Marek Polacek <polacek@redhat.com>
1471
1472 PR c/68062
1473 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1474 to unsigned, if needed. Add -Wsign-compare warning.
1475
13f92e8d
JJ
14762016-01-26 Jakub Jelinek <jakub@redhat.com>
1477
1478 PR tree-optimization/69483
1479 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1480
cd8e73dc 14812016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1482
1483 PR c/24293
1484 * c-tree.h (incomplete_record_decls): Declare.
1485 * c-parser.c (incomplete_record_decls): Define.
1486 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1487 report error if any decl has zero size.
1488 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1489 or enum type to incomplete_record_decls.
1490
e6d6ec9e
TV
14912016-01-14 Tom de Vries <tom@codesourcery.com>
1492
1493 PR tree-optimization/68773
1494 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1495 set force_output.
1496
00083992
MP
14972016-01-14 Marek Polacek <polacek@redhat.com>
1498
1499 PR c/69262
1500 * c-decl.c (grokdeclarator): Provide more information for invalid
1501 array declarations.
1502
7443cf13
DM
15032016-01-06 David Malcolm <dmalcolm@redhat.com>
1504
1505 * c-parser.c (c_parser_unary_expression): For dereferences, build
1506 a combined location before calling build_indirect_ref, so that
1507 error reports cover the full range, manually updating the c_expr
1508 src_range.
1509
6b131d5b
MP
15102016-01-06 Marek Polacek <polacek@redhat.com>
1511
1512 PR sanitizer/69099
1513 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1514 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1515 NULL.
1516
818ab71a
JJ
15172016-01-04 Jakub Jelinek <jakub@redhat.com>
1518
1519 Update copyright years.
1520
2fe0a208
MP
15212016-01-04 Marek Polacek <polacek@redhat.com>
1522
1523 PR c/68908
1524 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1525 optimization to use __atomic_fetch_* built-in if possible.
1526
c7b48c8a
TS
15272015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1528
1529 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1530 into...
1531 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1532 all users.
1533
fda5652f
MP
15342015-12-22 Marek Polacek <polacek@redhat.com>
1535
1536 PR c/69002
1537 * c-typeck.c (build_component_ref): Warn when acessing elements of
1538 atomic structures or unions.
1539
745e411d
DM
15402015-12-21 David Malcolm <dmalcolm@redhat.com>
1541
1542 * c-typeck.c: Include "gcc-rich-location.h".
1543 (build_binary_op): In the two places that call binary_op_error,
1544 create a gcc_rich_location and populate it with the location of
1545 the binary op and its two operands.
1546
94c40e19
DM
15472015-12-16 David Malcolm <dmalcolm@redhat.com>
1548
1549 * c-parser.c (c_parser_statement_after_labels): When calling
1550 c_finish_return, Use the return expression's location if it has
1551 one, falling back to the location of the first token within it.
1552 * c-typeck.c (c_finish_return): When issuing warnings about
1553 the incorrect presence/absence of a return value, issue a note
1554 showing the declaration of the function.
1555
de67c4c3
DM
15562015-12-16 David Malcolm <dmalcolm@redhat.com>
1557
1558 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1559 to 4.
1560 (c_parser_peek_nth_token): New function.
1561 (c_parser_peek_conflict_marker): New function.
1562 (c_parser_error): Detect conflict markers and report them as such.
1563
a10704e1
DM
15642015-12-16 David Malcolm <dmalcolm@redhat.com>
1565
1566 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1567 to preserve range information for the primary expression
1568 in the call to c_parser_postfix_expression_after_primary.
1569
8062bca6
DM
15702015-12-16 David Malcolm <dmalcolm@redhat.com>
1571
1572 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1573 expression location, falling back on the first token location,
1574 rather than always using the latter.
1575
d06f8b75
MP
15762015-12-16 Marek Polacek <polacek@redhat.com>
1577
1578 PR c/64637
1579 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1580 available.
1581
2994fb91
MP
15822015-12-15 Marek Polacek <polacek@redhat.com>
1583
1584 PR c/68907
1585 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1586 artificial decl.
1587
a1b93f8d
DM
15882015-12-08 David Malcolm <dmalcolm@redhat.com>
1589
1590 * c-parser.c (c_parser_alignof_expression): Capture location of
1591 closing parenthesis (if any), or of end of unary expression, and
1592 use it to build a src_range for the expression.
1593
46c6e1e2
DM
15942015-12-08 David Malcolm <dmalcolm@redhat.com>
1595
1596 PR c/68757
1597 * c-parser.c (c_parser_get_builtin_args): Add
1598 "out_close_paren_loc" param, and write back to it.
1599 (c_parser_postfix_expression): Capture the closing
1600 parenthesis location for RID_CHOOSE_EXPR,
1601 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1602 RID_BUILTIN_SHUFFLE and use it to set the source range
1603 for such expressions; within RID_BUILTIN_COMPLEX set
1604 the underlying location.
1605
66189108
MP
16062015-12-07 Marek Polacek <polacek@redhat.com>
1607
1608 PR c/68668
1609 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1610 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1611
f187980b
EB
16122015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1613
1614 * c-tree.h (c_build_va_arg): Adjust prototype.
1615 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1616 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1617 parameter, adjust throughout and issue an error if EXPR is a component
1618 with reverse storage order.
1619
4250754e
JM
16202015-12-02 Jason Merrill <jason@redhat.com>
1621
1622 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1623 (c_fully_fold_internal, decl_constant_value_for_optimization):
1624 Move from c-common.c.
1625 * c-tree.h: Declare decl_constant_value_for_optimization.
1626 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1627
e9e32ee6
JM
16282015-12-02 Joseph Myers <joseph@codesourcery.com>
1629
1630 PR c/68162
1631 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1632 following link from declarator to next declarator. Track original
1633 qualified type and pass it to c_build_qualified_type.
1634 * c-typeck.c (c_build_qualified_type): Add arguments
1635 orig_qual_type and orig_qual_indirect.
1636
ff7a55bf
TS
16372015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1638
1639 * c-parser.c (c_parser_omp_clause_name)
1640 (c_parser_oacc_all_clauses): Alphabetical sorting.
1641
657e4e47
JJ
16422015-12-02 Jakub Jelinek <jakub@redhat.com>
1643
1644 PR c/68533
1645 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1646 for diagnostics.
1647
37d5ad46
JB
16482015-12-01 Julian Brown <julian@codesourcery.com>
1649 Cesar Philippidis <cesar@codesourcery.com>
1650 James Norris <James_Norris@mentor.com>
1651
1652 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1653 (c_parser_oacc_clause_use_device): New function.
1654 (c_parser_oacc_all_clauses): Add use_device support.
1655 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1656 (c_parser_oacc_host_data): New function.
1657 (c_parser_omp_construct): Add host_data support.
1658 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1659 * c-typeck.c (c_finish_oacc_host_data): New function.
1660 (c_finish_omp_clauses): Add use_device support.
1661
a4850ce9
JH
16622015-11-29 Jan Hubicka <hubicka@ucw.cz>
1663
1664 PR c/67106
1665 * c-decl.c: Set TYPE_PACKED in variants.
1666
b58d3df2
ML
16672015-11-27 Martin Liska <mliska@suse.cz>
1668
1669 PR c++/68312
1670 * c-array-notation.c (fix_builtin_array_notation_fn):
1671 Use release_vec_vec instead of vec::release.
1672 (build_array_notation_expr): Likewise.
1673 (fix_conditional_array_notations_1): Likewise.
1674 (fix_array_notation_expr): Likewise.
1675 (fix_array_notation_call_expr): Likewise.
1676
aec17bfe
JJ
16772015-11-27 Jakub Jelinek <jakub@redhat.com>
1678
1679 PR c/63326
1680 * c-parser.c (c_parser_compound_statement_nostart): If
1681 last_label is true, use pragma_stmt instead of pragma_compound
1682 as second c_parser_pragma argument.
1683 (c_parser_omp_ordered, c_parser_omp_target_update,
1684 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1685 false as second argument to c_parser_skip_to_pragma_eol after
1686 diagnosing standalone directives used in pragma_stmt context.
1687
688c4de0
IV
16882015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1689
1690 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1691 with "if (ENABLE_OFFLOADING)".
1692
cbd03aee
DM
16932015-11-23 David Malcolm <dmalcolm@redhat.com>
1694
1695 PR objc/68438
1696 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1697 for various Objective-C constructs: Class.name syntax,
1698 @selector(), @protocol(), @encode(), and [] message syntax.
1699
a87a86e1
DM
17002015-11-20 David Malcolm <dmalcolm@redhat.com>
1701
1702 PR 62314
1703 * c-typeck.c (should_suggest_deref_p): New function.
1704 (build_component_ref): Special-case POINTER_TYPE when
1705 generating a "not a structure of union" error message, and
1706 suggest a "->" rather than a ".", providing a fix-it hint.
1707
8ece8dfb
DM
17082015-11-19 David Malcolm <dmalcolm@redhat.com>
1709
1710 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1711 candidate into a new function, find_closest_identifier.
1712
433068cc
MP
17132015-11-19 Marek Polacek <polacek@redhat.com>
1714
1715 PR c/68412
1716 * c-typeck.c (parser_build_binary_op): Properly handle
1717 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1718
bef08b71
DM
17192015-11-17 David Malcolm <dmalcolm@redhat.com>
1720
1721 * c-parser.c (set_c_expr_source_range): Bulletproof both
1722 overloaded implementations against NULL expr->value.
1723 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1724 values.
1725 (c_parser_unary_expression): Likewise when handling addresses of
1726 labels.
1727 (c_parser_postfix_expression): Likewise for statement expressions,
1728 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1729 __builtin_va_arg, and for __builtin_offset_of.
1730 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1731 src_range using the range of the braced initializer.
1732 (c_parser_transaction_expression): Set src_range for "ret" to a
1733 sane pair of values.
1734
fff77217
KY
17352015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1736
1737 * c-parser.c (c_finish_omp_declare_simd): Look for
1738 "simd" attribute as well. Update error message.
1739
1d899da2
TS
17402015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1741
1742 * c-parser.c (c_parser_omp_declare_target): Adjust.
1743
e4606348
JJ
17442015-11-14 Jakub Jelinek <jakub@redhat.com>
1745
1746 * c-typeck.c (c_finish_omp_clauses): Don't mark
1747 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1748
3e636daf
MP
17492015-11-14 Marek Polacek <polacek@redhat.com>
1750
1751 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1752 * c-typeck.c: Likewise.
1753
ebedc9a3
DM
17542015-11-13 David Malcolm <dmalcolm@redhat.com>
1755
1756 * c-decl.c (warn_defaults_to): Pass line_table to
1757 rich_location ctor.
1758 * c-errors.c (pedwarn_c99): Likewise.
1759 (pedwarn_c90): Likewise.
1760 * c-parser.c (set_c_expr_source_range): New functions.
1761 (c_token::get_range): New method.
1762 (c_token::get_finish): New method.
1763 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1764 based on the range from the start of the LHS to the end of the
1765 RHS.
1766 (c_parser_conditional_expression): Likewise, based on the range
1767 from the start of the cond.value to the end of exp2.value.
1768 (c_parser_binary_expression): Call set_c_expr_source_range on
1769 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1770 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1771 based on the cast_loc through to the end of the expr.
1772 (c_parser_unary_expression): Likewise, based on the
1773 op_loc through to the end of op.
1774 (c_parser_sizeof_expression) Likewise, based on the start of the
1775 sizeof token through to either the closing paren or the end of
1776 expr.
1777 (c_parser_postfix_expression): Likewise, using the token range,
1778 or from the open paren through to the close paren for
1779 parenthesized expressions.
1780 (c_parser_postfix_expression_after_primary): Likewise, for
1781 various kinds of expression.
1782 * c-tree.h (struct c_expr): Add field "src_range".
1783 (c_expr::get_start): New method.
1784 (c_expr::get_finish): New method.
1785 (set_c_expr_source_range): New decls.
1786 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1787 on ret for prefix unary ops.
1788 (parser_build_binary_op): Likewise, running from the start of
1789 arg1.value through to the end of arg2.value.
1790
ec8b536f
MP
17912015-11-13 Marek Polacek <polacek@redhat.com>
1792
1793 PR c/68320
1794 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1795
277fe616
DM
17962015-11-13 David Malcolm <dmalcolm@redhat.com>
1797
1798 * c-typeck.c: Include spellcheck.h.
1799 (lookup_field_fuzzy_find_candidates): New function.
1800 (lookup_field_fuzzy): New function.
1801 (build_component_ref): If the field was not found, try using
1802 lookup_field_fuzzy and potentially offer a suggestion.
1803
6e232ba4
JN
18042015-11-12 James Norris <jnorris@codesourcery.com>
1805 Joseph Myers <joseph@codesourcery.com>
1806
1807 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1808 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1809 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1810 and PRAGMA_OMP_CLAUSE_LINK.
1811 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1812 and PRAGMA_OACC_CLAUSE_LINK.
1813 (OACC_DECLARE_CLAUSE_MASK): New definition.
1814 (c_parser_oacc_declare): New function.
1815
9be4f715
MP
18162015-11-12 Marek Polacek <polacek@redhat.com>
1817
1818 PR c/67784
1819 * c-parser.c (c_parser_for_statement): Reclassify the token in
1820 a correct scope.
1821
e78bede6
MP
18222015-11-11 Marek Polacek <polacek@redhat.com>
1823
1824 PR c/68107
1825 PR c++/68266
1826 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1827 checking the size of an array.
1828
69f293c9
AM
18292015-11-11 Andrew MacLeod <amacleod@redhat.com>
1830
1831 * c-array-notation.c: Remove unused header files.
1832 * c-aux-info.c: Likewise.
1833 * c-convert.c: Likewise.
1834 * c-decl.c: Likewise.
1835 * c-errors.c: Likewise.
1836 * c-lang.c: Likewise.
1837 * c-objc-common.c: Likewise.
1838 * c-parser.c: Likewise.
1839 * c-typeck.c: Likewise.
1840 * gccspec.c: Likewise.
1841
3a40d81d
NS
18422015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1843 Cesar Philippidis <cesar@codesourcery.com>
1844 James Norris <jnorris@codesourcery.com>
1845 Julian Brown <julian@codesourcery.com>
1846 Nathan Sidwell <nathan@codesourcery.com>
1847
1848 c/
1849 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1850 routine arg.
1851 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1852 (c_parser_pragma): Parse 'acc routine'.
1853 (OACC_ROUTINE_CLAUSE_MARK): Define.
1854 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1855
fc402eec
AA
18562015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1857
1858 PR debug/67192
1859 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1860 location of the backward-goto to the start of the loop body.
1861
f6b0b3db
AA
18622015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1863
1864 PR debug/67192
1865 * c-parser.c (c_parser_while_statement): Finish the loop before
1866 parsing ahead for misleading indentation.
1867 (c_parser_for_statement): Likewise.
1868
ee45a32d
EB
18692015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1870
1871 * c-decl.c (finish_struct): If the structure has reverse storage
1872 order, rewrite the type of array fields with scalar component. Call
1873 maybe_apply_pragma_scalar_storage_order on entry.
1874 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1875 errors on bit-fields and reverse SSO here and not...
1876 (c_mark_addressable): ...here.
1877 (output_init_element): Adjust call to initializer_constant_valid_p.
1878 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1879
8a645150
DM
18802015-11-06 David Malcolm <dmalcolm@redhat.com>
1881
1882 * c-decl.c (warn_defaults_to): Update for change in signature
1883 of diagnostic_set_info.
1884 * c-errors.c (pedwarn_c99): Likewise.
1885 (pedwarn_c90): Likewise.
1886 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1887 for textinfo::set_location.
1888
7a5e4956
CP
18892015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1890 Thomas Schwinge <thomas@codesourcery.com>
1891 James Norris <jnorris@codesourcery.com>
1892
1893 * c-parser.c (c_parser_omp_clause_name): Add support for
1894 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1895 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1896 default(none) in OpenACC.
1897 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1898 arguments.
1899 (c_parser_oacc_clause_tile): New function.
1900 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1901 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1902 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1903 TILE}.
1904 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1905 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1906 FIRSTPRIVATE}.
1907 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1908 (c_parser_oacc_update): Update the error message for missing clauses.
1909 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1910 and OMP_CLAUSE_INDEPENDENT.
1911
bfcfbfa0
MP
19122015-11-05 Marek Polacek <polacek@redhat.com>
1913
1914 PR c/68090
1915 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1916 deal with pre-evaluation on invalid types.
1917
e01d41e5
JJ
19182015-11-05 Jakub Jelinek <jakub@redhat.com>
1919 Ilya Verbin <ilya.verbin@intel.com>
1920
1921 * c-parser.c: Include context.h and gimple-expr.h.
1922 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1923 monotonic together with nonmonotonic.
1924 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1925 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1926 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1927 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1928 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1929 expressions on combined target teams before the target.
1930 (c_parser_omp_declare_target): If decl has "omp declare target" or
1931 "omp declare target link" attribute, and cgraph or varpool node already
1932 exists, then set corresponding flags. Call c_finish_omp_clauses
1933 in the parenthesized extended-list syntax case.
1934 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1935 declare target.
1936 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1937 on OMP_CLAUSE_REDUCTION array sections.
1938 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1939 into the constant offset, or for variable low-bound using
1940 POINTER_PLUS_EXPR. For structure element based array sections use
1941 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1942 (c_finish_omp_clauses): Drop generic_field_head, structure
1943 elements are now always mapped even as array section bases,
1944 diagnose same var in data sharing and mapping clauses. Diagnose if
1945 linear step on declare simd is neither a constant nor a uniform
1946 parameter. Look through POINTER_PLUS_EXPR for array section
1947 reductions. Diagnose the same var or function appearing multiple
1948 times on the same directive. Fix up wording for the to clause if t
1949 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1950 modifier on kinds other than dynamic or guided or nonmonotonic
1951 modifier together with ordered clause.
1952
4bf9e5a8
TS
19532015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1954 Chung-Lin Tang <cltang@codesourcery.com>
1955
1956 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1957
2adfab87
AM
19582015-10-29 Andrew MacLeod <amacleod@redhat.com>
1959
1960 * c-array-notation.c: Reorder #include's and remove duplicates.
1961 * c-aux-info.c: Likewise.
1962 * c-convert.c: Likewise.
1963 * c-decl.c: Likewise.
1964 * c-errors.c: Likewise.
1965 * c-lang.c: Likewise.
1966 * c-objc-common.c: Likewise.
1967 * c-parser.c: Likewise.
1968 * c-typeck.c: Likewise.
1969
e922069e
JW
19702015-10-26 Jim Wilson <jim.wilson@linaro.org>
1971
1972 PR debug/66068
1973 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1974 after calling build_qualified_type.
1975
765dd391
CP
19762015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1977 Thomas Schwinge <thomas@codesourcery.com>
1978 James Norris <jnorris@codesourcery.com>
1979 Joseph Myers <joseph@codesourcery.com>
1980 Julian Brown <julian@codesourcery.com>
1981 Bernd Schmidt <bschmidt@redhat.com>
1982
1983 * c-parser.c (c_parser_oacc_shape_clause): New.
1984 (c_parser_oacc_simple_clause): New.
1985 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1986 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1987
88bae6f4
TS
19882015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1989 James Norris <jnorris@codesourcery.com>
1990 Cesar Philippidis <cesar@codesourcery.com>
1991
1992 PR c/64765
1993 PR c/64880
1994 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1995 parameters, and handle these. Adjust all users.
1996 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1997 into...
1998 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1999 all users.
2000 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
2001 declare functions.
2002 (c_finish_omp_construct): Declare function.
2003 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
2004 Merge functions into...
2005 (c_finish_omp_construct): ... this new function.
2006
a8fc2579
RB
20072015-10-22 Richard Biener <rguenther@suse.de>
2008
2009 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
2010 before folding a MINUS_EXPR.
2011
e9122ef6
MP
20122015-10-21 Marek Polacek <polacek@redhat.com>
2013
2014 PR c/68024
2015 * c-decl.c (start_function): Warn about vararg functions without
2016 a prototype.
2017
9f47c7e5
IE
20182015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2019
2020 * c-typeck.c (build_conditional_expr): Use boolean vector
2021 type for vector comparison.
2022 (build_vec_cmp): New.
2023 (build_binary_op): Use build_vec_cmp for comparison.
2024
fa60eeb9
MP
20252015-10-20 Marek Polacek <polacek@redhat.com>
2026
2027 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2028
2c7020eb
MP
20292015-10-20 Marek Polacek <polacek@redhat.com>
2030
2031 PR c/67964
2032 * c-parser.c (c_parser_attributes): Break out of the loop if the
2033 token after an attribute isn't a comma.
2034
d9a6bd32
JJ
20352015-10-13 Jakub Jelinek <jakub@redhat.com>
2036 Aldy Hernandez <aldyh@redhat.com>
2037
2038 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2039 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2040 (c_parser_omp_variable_list): Handle structure elements for
2041 map, to and from clauses. Handle array sections in reduction
2042 clause. Formatting fixes.
2043 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2044 if clause modifiers.
2045 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2046 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2047 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2048 c_parser_omp_clause_is_device_ptr): New functions.
2049 (c_parser_omp_clause_ordered): Parse optional parameter.
2050 (c_parser_omp_clause_reduction): Handle array reductions.
2051 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2052 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2053 functions.
2054 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2055 (c_parser_omp_clause_depend_sink): New function.
2056 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2057 (c_parser_omp_clause_map): Parse release/delete map kinds and
2058 optional always modifier.
2059 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2060 and c_finish_omp_clauses callers.
2061 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2062 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2063 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2064 (OMP_CRITICAL_CLAUSE_MASK): Define.
2065 (c_parser_omp_critical): Parse critical clauses.
2066 (c_parser_omp_for_loop): Handle doacross loops, adjust
2067 c_finish_omp_for and c_finish_omp_clauses callers.
2068 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2069 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2070 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2071 (c_parser_omp_for): Disallow ordered clause when combined with
2072 distribute. Disallow linear clause when combined with distribute
2073 and not combined with simd.
2074 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2075 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2076 parse clauses and if depend clause is found, don't parse a body.
2077 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2078 Allow target parallel without for after it.
2079 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2080 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2081 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2082 invalid kinds.
2083 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2084 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2085 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2086 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2087 functions.
2088 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2089 defaultmap and is_device_ptr clauses.
2090 (c_parser_omp_target): Parse target parallel and target simd. Set
2091 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2092 and target exit data. Diagnose invalid map kinds.
2093 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2094 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2095 construct.
2096 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2097 &omp_priv.
2098 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2099 (c_parser_omp_taskloop): New function.
2100 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2101 handle PRAGMA_OMP_TASKLOOP.
2102 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2103 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2104 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2105 Add IS_OMP argument, handle structure element bases, diagnose
2106 bitfields, pass IS_OMP recursively, diagnose known zero length
2107 array sections in depend clauses, handle array sections in reduction
2108 clause, diagnose negative length even for pointers.
2109 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2110 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2111 array sections in reduction clause, set
2112 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2113 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2114 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2115 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2116
21ba0cea
MP
21172015-10-06 Marek Polacek <polacek@redhat.com>
2118
2119 * c-parser.c (c_parser_statement_after_labels): Use
2120 protected_set_expr_location.
2121 (c_parser_omp_clause_num_gangs): Likewise.
2122 (c_parser_omp_clause_num_threads): Likewise.
2123 (c_parser_omp_clause_num_workers): Likewise.
2124 (c_parser_omp_clause_vector_length): Likewise.
2125 (c_parser_omp_clause_num_teams): Likewise.
2126 (c_parser_omp_clause_thread_limit): Likewise.
2127 * c-typeck.c (build_c_cast): Likewise.
2128 (c_cast_expr): Likewise.
2129
624d31fe
RS
21302015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2131
2132 * c-typeck.c (c_tree_equal): Use real_equal instead of
2133 REAL_VALUES_EQUAL.
2134
b8fd7909
JM
21352015-10-04 Jason Merrill <jason@redhat.com>
2136
2137 * c-parser.c (c_lex_one_token): Handle @synchronized.
2138 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2139 can change whether the function is transaction_safe.
2140
1c7485af
MP
21412015-10-02 Marek Polacek <polacek@redhat.com>
2142
2143 PR c/67730
2144 * c-typeck.c (convert_for_assignment): Use the expansion point
2145 location throughout.
2146
3e3b8d63
MP
21472015-10-02 Marek Polacek <polacek@redhat.com>
2148
2149 PR c/64249
2150 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2151 and pass it down to c_parser_if_statement.
2152 (c_parser_else_body): Add CHAIN parameter and pass it down to
2153 c_parser_statement_after_labels.
2154 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2155 duplicated if-else-if conditions.
2156
aabef2de
MP
21572015-10-01 Marek Polacek <polacek@redhat.com>
2158
2159 * c-typeck.c (convert_for_assignment): Improve commentary.
2160
de8ddd5f
MP
21612015-09-30 Marek Polacek <polacek@redhat.com>
2162
2163 PR c/67730
2164 * c-typeck.c (c_finish_return): Use the expansion point location for
2165 certain "return with value" warnings.
2166
c4914de6
MLI
21672015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2168
2169 * c-parser.c (pragma_lex): Add loc argument.
2170
0e36f5c7
MP
21712015-09-15 Marek Polacek <polacek@redhat.com>
2172
2173 PR c/67580
2174 * c-decl.c (tag_exists_p): New function.
2175 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2176 struct/union/enum keywords are missing.
2177 * c-tree.h (tag_exists_p): Declare.
2178
2f3bb934
MP
21792015-09-15 Marek Polacek <polacek@redhat.com>
2180
2181 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2182 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2183 Return NULL_TREE instead of 0.
2184 (lookup_name): Return NULL_TREE instead of 0.
2185 (lookup_name_in_scope): Likewise.
2186 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2187 (parser_xref_tag): Use false instead of 0.
2188 (start_struct): Use true instead of 1.
2189 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2190
aa256c4a
MP
21912015-09-14 Marek Polacek <polacek@redhat.com>
2192
2193 * c-typeck.c (set_nonincremental_init_from_string): Use
2194 HOST_WIDE_INT_M1U when shifting a negative value.
2195
dbb68221
MW
21962015-09-09 Mark Wielaard <mjw@redhat.com>
2197
2198 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2199 parm against NULL.
2200
a8a098ac
JJ
22012015-09-10 Jakub Jelinek <jakub@redhat.com>
2202
2203 PR c/67502
2204 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2205 into OMP_FOR_PRE_BODY rather than before the loop.
2206
f4b189d5
JJ
22072015-09-09 Jakub Jelinek <jakub@redhat.com>
2208
0bb99c11
JJ
2209 PR c/67501
2210 * c-parser.c (c_parser_oacc_all_clauses,
2211 c_parser_omp_all_clauses): Remove invalid clause from
2212 list of clauses even if parser->error is set.
2213
fce5e5e3
JJ
2214 PR c/67500
2215 * c-parser.c (c_parser_omp_clause_aligned,
2216 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2217 test for errors.
2218 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2219 error_mark_node.
2220
f4b189d5
JJ
2221 PR c/67495
2222 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2223 instead of c_parser_unary_expression. If the result is !lvalue_p,
2224 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2225
b2aaf235
MP
22262015-09-04 Marek Polacek <polacek@redhat.com>
2227
2228 PR sanitizer/67279
2229 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2230
1807ffc1
MS
22312015-09-03 Martin Sebor <msebor@redhat.com>
2232
2233 PR c/66516
8b652e65
JJ
2234 * c-typeck.c (convert_arguments, parser_build_unary_op,
2235 build_conditional_expr, c_cast_expr, convert_for_assignment,
2236 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2237 reject_gcc_builtin.
2238 (c_decl_implicit): Define.
2239
d04ff417
MP
22402015-09-02 Marek Polacek <polacek@redhat.com>
2241
2242 PR c/67432
2243 * c-parser.c (c_parser_enum_specifier): Give a better error for
2244 an empty enum.
2245
a79683d5
TS
22462015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2247
2248 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2249
191a6b94
MP
22502015-08-12 Marek Polacek <polacek@redhat.com>
2251
2252 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2253 LOC to it.
2254
420a9d9b
MP
22552015-08-03 Marek Polacek <polacek@redhat.com>
2256
2257 PR c/67088
2258 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2259 Use it.
2260 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2261
992118a1
PP
22622015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2263
2264 * c-parser.c (c_parser_if_body): Take token_indent_info
2265 argument. Call warn_for_misleading_indentation even when the
2266 body is a semicolon. Extract token_indent_infos corresponding
2267 to the guard, body and next tokens. Adjust call to
2268 warn_for_misleading_indentation accordingly.
2269 (c_parser_else_body): Likewise.
2270 (c_parser_if_statement): Likewise.
2271 (c_parser_while_statement): Likewise.
2272 (c_parser_for_statement): Likewise.
2273
46308474
LFSM
22742015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2275 Manuel López-Ibáñez <manu@gcc.gnu.org>
2276
2277 * c-decl.c (get_parm_info): Remove static var. Update warning
2278 message.
2279
05b28fd6
MP
22802015-07-27 Marek Polacek <polacek@redhat.com>
2281
2282 PR c++/66555
2283 PR c/54979
2284 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2285
451b5e48
MP
22862015-07-20 Marek Polacek <polacek@redhat.com>
2287
2288 PR c++/55095
2289 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2290 (build_binary_op): Warn about left shift overflows.
2291
1916bcb5
AM
22922015-07-09 Andrew MacLeod <amacleod@redhat.com>
2293
2294 * c-array-notation.c: Adjust includes for flags.h changes.
2295 * c-objc-common.c: Likewise.
2296
c7131fb2
AM
22972015-07-07 Andrew MacLeod <amacleod@redhat.com>
2298
2299 * c-array-notation.c: Adjust includes.
2300 * c-aux-info.c: Likewise.
2301 * c-convert.c: Likewise.
2302 * c-decl.c: Likewise.
2303 * c-errors.c: Likewise.
2304 * c-lang.c: Likewise.
2305 * c-objc-common.c: Likewise.
2306 * c-parser.c: Likewise.
2307 * c-typeck.c: Likewise.
2308
da2e71c9
MLI
23092015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2310
2311 PR fortran/66605
2312 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2313
b155cfd9
MP
23142015-06-29 Marek Polacek <polacek@redhat.com>
2315
2316 PR c/66322
2317 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2318 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2319 about -Wswitch-bool here.
2320 (do_case): Update c_add_case_label call.
2321 (c_finish_case): Update c_do_switch_warnings call.
2322
31521951
MP
23232015-06-27 Marek Polacek <polacek@redhat.com>
2324
2325 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2326
22d03525
MP
23272015-06-26 Marek Polacek <polacek@redhat.com>
2328
2329 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2330 INDIRECT_REF_P.
2331 * c-typeck.c (array_to_pointer_conversion): Likewise.
2332 (build_unary_op): Likewise.
2333 (c_finish_return): Likewise.
2334
f0889939
AM
23352015-06-25 Andrew MacLeod <amacleod@redhat.com>
2336
2337 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2338 * c-parser.c: Likewise.
2339
8d67ee55
RS
23402015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2341
2342 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2343 instead of pointer_hash.
2344 (detect_field_duplicates): Likewise.
2345
0ae9bd27
MP
23462015-06-25 Marek Polacek <polacek@redhat.com>
2347
2348 * c-array-notation.c: Use VAR_P throughout.
2349 * c-decl.c: Likewise.
2350 * c-objc-common.c: Likewise.
2351 * c-parser.c: Likewise.
2352 * c-typeck.c: Likewise.
2353
62f9079a
MP
23542015-06-25 Marek Polacek <polacek@redhat.com>
2355
2356 * c-decl.c: Use is_global_var throughout.
2357 * c-parser.c: Likewise.
2358 * c-typeck.c: Likewise.
2359
abb226c9
AM
23602015-06-17 Andrew MacLeod <amacleod@redhat.com>
2361
2362 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2363 * c-aux-info.c: Likewise.
2364 * c-convert.c: Likewise.
2365 * c-decl.c: Likewise.
2366 * c-errors.c: Likewise.
2367 * c-lang.c: Likewise.
2368 * c-objc-common.c: Likewise.
2369 * c-parser.c: Likewise.
2370 * c-typeck.c: Likewise.
2371
8cbababc
JH
23722015-06-11 Jan Hubicka <hubicka@ucw.cz>
2373
2374 PR middle-end/66325
2375 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2376 variants.
2377
a0349665
PMR
23782015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2379
2380 * c-decl.c (pop_scope): Register the main translation unit
2381 through the new debug hook.
2382
13fdf2e2
AM
23832015-06-08 Andrew MacLeod <amacleod@redhat.com>
2384
2385 * c-array-notation.c : Adjust include files.
2386 * c-aux-info.c : Likewise.
2387 * c-convert.c : Likewise.
2388 * c-decl.c : Likewise.
2389 * c-errors.c : Likewise.
2390 * c-lang.c : Likewise.
2391 * c-lang.h : Likewise.
2392 * c-objc-common.c : Likewise.
2393 * c-parser.c : Likewise.
2394 * c-typeck.c : Likewise.
2395
d7438551
AH
23962015-06-05 Aldy Hernandez <aldyh@redhat.com>
2397
2398 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2399 immediately clobber it.
2400 (c_write_global_declarations_1): Remove call to
2401 check_global_declaration_1.
2402 (c_write_global_declarations_2): Remove.
2403 (c_write_final_cleanups): Rename from c_write_global_declarations.
2404 Remove call to finalize_compilation_unit.
2405 Remove calls to debugging hooks.
2406 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2407 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2408 * c-tree.h: Remove c_write_global_declarations.
2409
ecb9f223
AM
24102015-06-04 Andrew MacLeod <amacleod@redhat.com>
2411
2412 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2413 * c-aux-info.c: Likewise.
2414 * c-convert.c: Likewise.
2415 * c-decl.c: Likewise.
2416 * c-errors.c: Likewise.
2417 * c-lang.c: Likewise.
2418 * c-objc-common.c: Likewise.
2419 * c-parser.c: Likewise.
2420 * c-typeck.c: Likewise.
2421
9482b620
MP
24222015-06-04 Marek Polacek <polacek@redhat.com>
2423
2424 PR c/66341
2425 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2426 it is a lvalue.
2427
bc51ace3
PK
24282015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2429
2430 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2431 Warn for empty struct.
2432 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2433
ea5b45b6
AT
24342015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2435
2436 * c-decl.c (start_function): Call plugin before parsing.
2437 (finish_function): Call plugin after parsing.
2438
c2d47482
PK
24392015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2440
2441 PR c/49551
2442 * c-decl.c (merge_decls): Merge DECL_COMMON.
2443
a95492ab
JW
24442015-05-22 Jim Wilson <jim.wilson@linaro.org>
2445
2446 * Make-lang.in (check_gcc_pallelize): Define.
2447
fd5c817a
MP
24482015-05-22 Marek Polacek <polacek@redhat.com>
2449
2450 PR c/47043
2451 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2452 attributes.
2453
c7b70a3c
MP
24542015-05-21 Marek Polacek <polacek@redhat.com>
2455
2456 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2457 DECL_BUILT_IN.
2458
21b634ae
MP
24592015-05-20 Marek Polacek <polacek@redhat.com>
2460
2461 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2462 * c-typeck.c: Likewise.
2463
296a8c2f
MP
24642015-05-19 Marek Polacek <polacek@redhat.com>
2465
2466 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2467
41b37d5e
JJ
24682015-05-19 Jakub Jelinek <jakub@redhat.com>
2469
2470 PR middle-end/66199
2471 * c-parser.c (c_parser_omp_for_loop): Don't add
2472 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2473 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2474 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2475 constructs.
2476
fab27f52
MM
24772015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2478
2479 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2480 swaps.
fab27f52 2481
40de31cf
MLI
24822015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2483
2484 PR fortran/44054
2485 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2486 accessor function.
2487
3aa3c9fc
MP
24882015-05-14 Marek Polacek <polacek@redhat.com>
2489
2490 PR c/66066
2491 PR c/66127
2492 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2493 rather than with 0.
2494
c3388e62
DM
24952015-05-12 David Malcolm <dmalcolm@redhat.com>
2496
2497 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2498 to add a call to warn_for_misleading_indentation.
2499 (c_parser_else_body): Likewise, adding param "else_loc".
2500 (c_parser_if_statement): Check for misleading indentation.
2501 (c_parser_while_statement): Likewise.
2502 (c_parser_for_statement): Likewise.
2503
755e528f
MP
25042015-05-08 Marek Polacek <polacek@redhat.com>
2505
2506 PR c/64918
2507 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2508 (output_init_element): Likewise.
2509
0173bd2a
MP
25102015-05-07 Marek Polacek <polacek@redhat.com>
2511
2512 PR c/65179
2513 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2514 value.
2515
9babc352
MP
25162015-04-30 Marek Polacek <polacek@redhat.com>
2517
2518 * c-typeck.c (set_init_label): Call error_at instead of error and
2519 pass LOC to it.
2520
ac9f18db
MP
2521 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2522 the type of a decl.
2523
ec3fba51
MP
2524 * c-typeck.c (c_build_va_arg): Clarify the error message.
2525
b811915d
TS
25262015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2527
2528 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2529 OMP_STANDALONE_CLAUSES.
2530
f3075008
MP
25312015-04-28 Marek Polacek <polacek@redhat.com>
2532
2533 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2534
4e81b788
MP
25352015-04-28 Marek Polacek <polacek@redhat.com>
2536
2537 PR c/65901
2538 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2539
6c1db78e
MP
25402015-04-25 Marek Polacek <polacek@redhat.com>
2541
2542 PR c/52085
2543 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2544 attribute.
2545
5c4abbb8
MP
25462015-04-23 Marek Polacek <polacek@redhat.com>
2547
2548 PR c/65345
2549 * c-decl.c (set_labels_context_r): New function.
2550 (store_parm_decls): Call it via walk_tree_without_duplicates.
2551 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2552 instead of create_tmp_var. Build TARGET_EXPR instead of
2553 COMPOUND_EXPR.
2554 (build_atomic_assign): Use create_tmp_var_raw instead of
2555 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2556
06aca1d5
IV
25572015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2558
2559 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2560 (c_parser_omp_target_update): Add missed %> to error_at ().
2561
8fba1830
BRF
25622015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2563
2564 PR target/55143
2565 * c-decl.c (c_default_pointer_mode): Remove definition.
2566 * c-tree.h (c_default_pointer_mode): Remove declaration.
2567
62021f64
TB
25682015-03-27 Tobias Burnus <burnus@net-b.de>
2569
2570 PR c/65586
2571 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2572 error out.
2573 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2574 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2575 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2576
9b65e171
JJ
25772015-03-19 Jakub Jelinek <jakub@redhat.com>
2578
2579 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2580 attribute for DECL_EXTERNAL VAR_DECLs.
2581
17958621
JJ
25822015-03-11 Jakub Jelinek <jakub@redhat.com>
2583
2584 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2585 argument.
2586
7ccb1a11
JJ
25872015-03-10 Jakub Jelinek <jakub@redhat.com>
2588
2589 PR c/65120
2590 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2591 before preparing arguments to warn_logical_not_parentheses.
2592
01177669
JJ
25932015-03-09 Jakub Jelinek <jakub@redhat.com>
2594
2595 PR c/65120
2596 * c-typeck.c (parser_build_binary_op): Don't warn for
2597 !!x == y or !b == y where b is _Bool.
2598
802ac282
MP
25992015-03-09 Marek Polacek <polacek@redhat.com>
2600
2601 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2602 * c-decl.c (grokdeclarator): Likewise.
2603 * c-typeck.c (build_binary_op): Likewise.
2604
e5165b60
MP
26052015-02-27 Marek Polacek <polacek@redhat.com>
2606
2607 PR c/65228
2608 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2609
065d214c
MP
26102015-02-14 Marek Polacek <polacek@redhat.com>
2611
2612 PR c/64768
2613 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2614 declared through a typedef name.
2615
e5d9235b
MP
26162015-02-13 Marek Polacek <polacek@redhat.com>
2617
2618 PR c/65050
2619 * c-decl.c (grokdeclarator): Print also the type when giving
2620 the error message about array's incomplete element type.
2621
fa01ffcc
JJ
26222015-02-11 Jakub Jelinek <jakub@redhat.com>
2623
2624 PR c/64824
2625 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2626 check in the POP macro.
2627
c3e38a03
MP
26282015-02-09 Marek Polacek <polacek@redhat.com>
2629
2630 PR c/64856
2631 * c-typeck.c (process_init_element): Don't always wrap
2632 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2633 initializing a range of elements.
2634
4886ec8e
JJ
26352015-02-04 Jakub Jelinek <jakub@redhat.com>
2636
2637 PR c/64824
2638 PR c/64868
2639 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2640
c3e38a03 26412015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2642
2643 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2644 processing enum declaration.
2645
7b33f0c8
MP
26462015-01-29 Marek Polacek <polacek@redhat.com>
2647
2648 PR c/64709
2649 * c-typeck.c (pop_init_level): If constructor_elements has
2650 exactly one element with integer_zerop value, set constructor_zeroinit
2651 to 1. Remove braces around warning_init call.
2652
dea63e49
JJ
26532015-01-27 Jakub Jelinek <jakub@redhat.com>
2654
2655 PR c/64766
2656 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2657 of FUNCTION_DECLs with error_mark_node.
2658
d38f7dce
JJ
26592015-01-26 Jakub Jelinek <jakub@redhat.com>
2660
2661 PR c/64778
2662 * c-typeck.c (convert_arguments): Return -1 if there are
2663 error_args, even if we've diagnosed too many arguments.
2664
cbf5d0e7
RB
26652015-01-21 Richard Biener <rguenther@suse.de>
2666
2667 PR middle-end/64313
2668 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2669 for builtins the user declared correctly.
2670
41dbbb37
TS
26712015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2672 Bernd Schmidt <bernds@codesourcery.com>
2673 Cesar Philippidis <cesar@codesourcery.com>
2674 James Norris <jnorris@codesourcery.com>
2675 Jakub Jelinek <jakub@redhat.com>
2676 Ilmir Usmanov <i.usmanov@samsung.com>
2677
2678 * c-parser.c: Include "gomp-constants.h".
2679 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2680 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2681 Use OMP_CLAUSE_SET_MAP_KIND.
2682 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2683 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2684 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2685 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2686 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2687 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2688 "copyout", "create", "delete", "deviceptr", "gang", "host",
2689 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2690 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2691 "present_or_create", "pcreate", "seq", "self", "vector",
2692 "vector_length", "wait", "worker".
2693 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2694 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2695 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2696 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2697 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2698 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2699 (c_parser_oacc_data_clause_deviceptr)
2700 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2701 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2702 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2703 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2704 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2705 (c_parser_oacc_parallel, c_parser_oacc_update)
2706 (c_parser_oacc_wait): New functions.
2707 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2708 (c_finish_oacc_data): New prototypes.
2709 * c-typeck.c: Include "gomp-constants.h".
2710 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2711 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2712 OMP_CLAUSE_SET_MAP_KIND.
2713 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2714 (c_finish_oacc_data): New functions.
2715 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2716 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2717 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2718 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2719 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2720 GOMP_MAP_FORCE_DEVICEPTR.
2721
adfac8df
JJ
27222015-01-09 Michael Collison <michael.collison@linaro.org>
2723
2724 * c-array-notation.c: Include hash-set.h, machmode.h,
2725 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2726 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2727 * c-aux-info.c: Ditto.
2728 * c-convert.c: Ditto.
2729 * c-decl.c: Ditto.
2730 * c-errors.c: Ditto.
2731 * c-lang.c: Dittoxs.
2732 * c-objc-common.c: Ditto.
2733 * c-parser.c: Ditto.
2734 * c-typeck.c: Include hash-set.h, machmode.h,
2735 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2736 fold-const.h, wide-int.h, inchash.h, real.h and
2737 fixed-value.h due to flattening of tree.h.
2738
2cc901dc
MP
27392015-01-07 Marek Polacek <polacek@redhat.com>
2740
2741 PR c/64417
2742 * c-typeck.c (process_init_element): Disallow initialization of
2743 a flexible array member with a string constant if the structure
2744 is in an array.
2745
5624e564
JJ
27462015-01-05 Jakub Jelinek <jakub@redhat.com>
2747
e5341100
JJ
2748 PR sanitizer/64344
2749 * c-typeck.c (convert_for_assignment, c_finish_return): For
2750 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2751 types also set in_late_binary_op around convert call.
2752 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2753 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2754 result on expr as last argument to ubsan_instrument_float_cast,
2755 if in_late_binary_op, don't use c_save_expr but save_expr.
2756
5624e564
JJ
2757 Update copyright years.
2758
5bd012f8
MP
27592015-01-05 Marek Polacek <polacek@redhat.com>
2760
2761 PR c/64423
2762 * c-typeck.c (build_array_ref): Pass loc down to
2763 warn_array_subscript_with_type_char.
2764
3f8257db 27652014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2766
2767 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2768 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2769 element type.
8e745a17 2770 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2771 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2772 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2773 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2774 to PEDWARN_FOR_QUALIFIERS.
768952be 2775
8f94a8c4
JJ
27762014-12-17 Jakub Jelinek <jakub@redhat.com>
2777
2778 PR sanitizer/64289
2779 * c-convert.c: Include ubsan.h.
2780 (convert): For real -> integral casts and
2781 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2782 instead instrument the float cast directly.
2783
b731b390
JJ
27842014-11-29 Jakub Jelinek <jakub@redhat.com>
2785
2786 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2787 c_finish_stmt_expr): Remove NULL last argument from
2788 create_tmp_var_raw and create_tmp_var calls.
2789 * c-array-notation.c (fix_builtin_array_notation_fn,
2790 build_array_notation_expr, fix_conditional_array_notations_1,
2791 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2792
541e35a6
MP
27932014-11-28 Marek Polacek <polacek@redhat.com>
2794
2795 PR c/63862
2796 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2797 convert the right operand to integer type.
2798
b286be94
MP
27992014-11-25 Marek Polacek <polacek@redhat.com>
2800
2801 PR c/63877
2802 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2803 for inline functions.
2804
aa7da51a
JJ
28052014-11-21 Jakub Jelinek <jakub@redhat.com>
2806
2807 PR target/63764
2808 * c-typeck.c (build_array_ref): Adjust
2809 convert_vector_to_pointer_for_subscript caller. If it returns true,
2810 call non_lvalue_loc on the result.
2811
d876207f
RB
28122014-11-11 Richard Biener <rguenther@suse.de>
2813
2814 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2815 to true.
2816
e5e44252
AK
28172014-11-10 Andi Kleen <ak@linux.intel.com>
2818
2819 PR c/60804
2820 * c-parser.c (c_parser_statement_after_labels): Call
2821 check_no_cilk.
2822 (c_parser_if_statement): Dito.
2823 (c_parser_switch_statement): Dito.
2824 (c_parser_while_statement): Dito.
2825 (c_parser_do_statement): Dito.
2826 (c_parser_for_statement): Dito.
2827 * c-typeck.c (c_finish_loop): Dito.
2828
13c21655
PC
28292014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2830
2831 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2832 OPT_Wshift_count_overflow in the warnings.
2833
2d51fcef
MP
28342014-10-30 Marek Polacek <polacek@redhat.com>
2835
2836 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2837 print the stripped version as well, if they're not the same.
2838
ef4bddc2
RS
28392014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2840
2841 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2842 machine_mode.
2843
c582198b
AM
28442014-10-28 Andrew MacLeod <amacleod@redhat.com>
2845
2846 * c-decl.c: Adjust include files.
2847 * c-parser.c: Ditto.
2848
ddc8de03
PM
28492014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2850 Tom Tromey <tromey@redhat.com>
2851
2852 * c-tree.h (enum c_oracle_request): New.
2853 (c_binding_oracle_function): New typedef.
2854 (c_binding_oracle, c_pushtag, c_bind): Declare.
2855 * c-decl.c (c_binding_oracle): New global.
2856 (I_SYMBOL_CHECKED): New macro.
2857 (i_symbol_binding): New function.
2858 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2859 (I_TAG_CHECKED): New macro.
2860 (i_tag_binding): New function.
2861 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2862 (I_LABEL_CHECKED): New macro.
2863 (i_label_binding): New function.
2864 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2865 (c_print_identifier): Save and restore c_binding_oracle.
2866 (c_pushtag, c_bind): New functions.
2867
60393bbc
AM
28682014-10-27 Andrew MacLeod <amacleod@redhat.com>
2869
2870 * c-typeck.c: Adjust include files.
2871
d723bb7c
MLI
28722014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2873
2874 PR c++/53061
2875 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2876 initialization here...
2877 (c_initialize_diagnostics): ... but here. Set defaults after
2878 building pretty-printer.
2879
1bc5a451
MP
28802014-10-23 Marek Polacek <polacek@redhat.com>
2881
2882 PR c/63626
2883 * c-decl.c (pop_scope): Don't print warning in external_scope.
2884
4435bb92
MP
28852014-10-19 Marek Polacek <polacek@redhat.com>
2886
2887 PR c/63567
2888 * c-typeck.c (output_init_element): Allow initializing objects with
2889 static storage duration with compound literals even in C99 and add
2890 pedwarn for it.
2891
7278465e
MP
28922014-10-17 Marek Polacek <polacek@redhat.com>
2893
2894 PR c/63567
2895 * c-typeck.c (digest_init): Allow initializing objects with static
2896 storage duration with compound literals even in C99 and add pedwarn
2897 for it.
2898
d9b7be2e
MP
28992014-10-17 Marek Polacek <polacek@redhat.com>
2900
2901 PR c/63543
2902 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2903 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2904 error multiple times. Print the type.
2905
f406ae1f
MP
29062014-10-17 Marek Polacek <polacek@redhat.com>
2907
2908 PR c/63549
2909 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2910 type.
2911
92574c7c
MP
29122014-10-17 Marek Polacek <polacek@redhat.com>
2913
2914 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2915 (start_function): Use OPT_Wimplicit_int instead of 0.
2916 (store_parm_decls_oldstyle): Likewise.
2917
1bc4a978
MT
29182014-10-17 Alan Modra <amodra@gmail.com>
2919
2920 PR middle-end/61848
2921 * c-decl.c (merge_decls): Don't merge section name or tls model
2922 to newdecl symtab node, instead merge to olddecl. Override
2923 existing olddecl section name. Set tls_model for all thread-local
2924 vars, not just OMP thread-private ones. Remove incorrect comment.
2925
83685514
AM
29262014-10-16 Andrew MacLeod <amacleod@redhat.com>
2927
2928 * c-decl.c: Adjust include files.
2929
78a7c317
DD
29302014-10-14 DJ Delorie <dj@redhat.com>
2931
2932 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2933 (c_token_starts_typename): Check all __intN, not just __int128.
2934 (c_token_starts_declspecs): Likewise.
2935 (c_parser_declspecs): Likewise.
2936 (c_parser_attribute_any_word): Likewise.
2937 (c_parser_objc_selector): Likewise.
2938 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2939 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2940 is specified.
2941 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2942 __int128.
2943 (finish_declspecs): Likewise.
2944
74d98c1e
AB
29452014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2946
8e745a17 2947 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 2948 the duplicate code.
8e745a17 2949 (c_parser_statement): Call the new function.
74d98c1e 2950
84937de2
MP
29512014-10-09 Marek Polacek <polacek@redhat.com>
2952
2953 PR c/63480
2954 * c-typeck.c (pop_init_level): Don't warn about initializing
2955 with { }.
2956
0382aaa0
MP
29572014-10-07 Marek Polacek <polacek@redhat.com>
2958
2959 PR c/59717
2960 * c-decl.c (header_for_builtin_fn): New function.
2961 (implicitly_declare): Suggest which header to include.
2962
7a0ca710
MP
29632014-10-07 Marek Polacek <polacek@redhat.com>
2964
2965 * c-convert.c (convert): Use error_operand_p.
2966 * c-typeck.c (require_complete_type): Likewise.
2967 (really_atomic_lvalue): Likewise.
2968 (digest_init): Likewise.
2969 (handle_omp_array_sections_1): Likewise.
2970
6bc8a126
MP
29712014-10-03 Marek Polacek <polacek@redhat.com>
2972
2973 PR c/63453
2974 * c-decl.c (pop_scope): Don't warn about "inline function declared
2975 but never defined" for functions marked with gnu_inline attribute.
2976
d90c0a59
JJ
29772014-09-25 Jakub Jelinek <jakub@redhat.com>
2978
2979 PR c++/63249
2980 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2981 on low_bound and length.
2982
083e891e
MP
29832014-09-24 Marek Polacek <polacek@redhat.com>
2984
2985 PR c/61405
2986 PR c/53874
2987 * c-parser.c: Don't define CPP_KEYWORD.
2988 (c_parser_switch_statement): Pass original type to c_finish_case.
2989 * c-tree.h (c_finish_case): Update declaration.
2990 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2991 conditionally to c_do_switch_warnings.
2992
8d95fe25
MP
29932014-09-03 Marek Polacek <polacek@redhat.com>
2994
2995 PR c/62024
2996 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2997 conversions.
2998
9a771876
JJ
29992014-09-02 Jakub Jelinek <jakub@redhat.com>
3000 Balaji V. Iyer <balaji.v.iyer@intel.com>
3001 Igor Zamyatin <igor.zamyatin@intel.com>
3002
3003 * c-parser.c (c_parser_cilk_for): New function.
3004 (c_parser_cilk_grainsize): Likewise.
3005 (c_get_temp_regvar): Likewise.
3006 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
3007 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
3008 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
3009 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
3010 case.
3011
b7679d96
CG
30122014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
3013
3014 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3015 with using HOST_WIDE_INT without truncation to 'int'
3016
59ea0364
MP
30172014-08-22 Marek Polacek <polacek@redhat.com>
3018
3019 PR c++/62199
3020 * c-typeck.c (parser_build_binary_op): Adjust call to
3021 warn_logical_not_parentheses.
3022
671a475e
IZ
30232014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3024
3025 PR other/62008
3026 * c-parser.c (c_parser_array_notation): Check for correct
3027 type of an array added.
3028
04159acf
MP
30292014-08-19 Marek Polacek <polacek@redhat.com>
3030
3031 PR c++/62153
3032 * c-typeck.c (build_binary_op): If either operand of a comparison
3033 is a boolean expression, call maybe_warn_bool_compare.
3034
c77935ee
PP
30352014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3036
3037 PR c/45584
3038 * c-typeck.c (build_c_cast): Do a conversion even when the
3039 TYPE_MAIN_VARIANTs are the same.
3040
35aff4fb
MP
30412014-08-19 Marek Polacek <polacek@redhat.com>
3042
3043 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3044 pedwarn_c99 instead of pedwarn.
3045 (grokfield): Likewise.
3046 (warn_defaults_to): New function.
3047 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3048 Unconditionally call pedwarn_c99 instead of pedwarn.
3049 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3050 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3051 check flag_isoc11 before.
3052 * c-errors.c (pedwarn_c99): Change the return type to bool.
3053 Handle -Wc99-c11-compat.
3054 * c-parser.c (disable_extension_diagnostics): Handle
3055 warn_c99_c11_compat.
3056 (restore_extension_diagnostics): Likewise.
3057 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3058 instead of pedwarn, don't check flag_isoc11 before.
3059 (c_parser_declspecs): Likewise.
3060 (c_parser_alignas_specifier): Likewise.
3061 (c_parser_alignof_expression): Likewise.
3062 (c_parser_generic_selection): Likewise.
3063 * c-tree.h (pedwarn_c99): Update declaration.
3064 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3065 of pedwarn_c99.
3066
177cce46
MP
30672014-08-19 Marek Polacek <polacek@redhat.com>
3068
3069 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3070 to pedwarn_c90.
3071 * c-errors.c: Include "opts.h".
3072 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3073 * c-parser.c (disable_extension_diagnostics): Handle negative value
3074 of warn_c90_c99_compat, too.
3075 (restore_extension_diagnostics): Likewise.
3076 (c_parser_compound_statement_nostart): Pass
3077 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3078
6dc99c33
MP
30792014-08-12 Marek Polacek <polacek@redhat.com>
3080
3081 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3082 Add pedwarn.
3083 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3084 Likewise.
3085 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3086
3f8257db 30872014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3088
3089 PR c/51849
3090 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3091 Call pedwarn_c90 instead of pedwarn.
3092 (check_bitfield_type_and_width): Likewise.
3093 (declspecs_add_qual): Likewise.
3094 (declspecs_add_type): Likewise.
3095 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3096 Adjust to only call pedwarn_c90.
3097 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3098 pedwarn_c90 instead of pedwarn.
3099 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3100 * c-parser.c (disable_extension_diagnostics): Handle
3101 warn_c90_c99_compat.
3102 (restore_extension_diagnostics): Likewise.
3103 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3104 pedwarn_c90 instead of pedwarn.
3105 (c_parser_initelt): Likewise.
3106 (c_parser_postfix_expression): Likewise.
3107 (c_parser_postfix_expression_after_paren_type): Likewise.
3108 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3109 * c-tree.h: Fix formatting.
3110 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3111 pedwarn_c90 instead of pedwarn.
3112
9f25a338
TS
31132014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3114
3115 * c-typeck.c: Remove include of pointer-set.h.
3116
044331a8
MP
31172014-08-07 Marek Polacek <polacek@redhat.com>
3118
3119 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3120
b787e7a2
TS
31212014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3122
3123 * c-typeck.c: Use hash_map instead of pointer_map.
3124
6e2830c3
TS
31252014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3126
3127 * c-decl.c: Use hash_set instead of pointer_set.
3128
a7ee52fb
IZ
31292014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3130
3131 PR middle-end/61455
3132 * c-array-notation.c (expand_array_notations): Handling
3133 of DECL_EXPR added.
3134
b4dfdc11
MG
31352014-07-31 Marc Glisse <marc.glisse@inria.fr>
3136
3137 PR c++/60517
3138 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3139 a local variable.
3140
976d5a22
TT
31412014-07-30 Tom Tromey <tromey@redhat.com>
3142
3143 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3144 field.
3145 (really_start_incremental_init, push_init_level): Initialize
3146 designator_depth.
3147 (pop_init_level): Set global designator_depth.
3148 (process_init_element): Check for designated_init attribute.
3149
30281de2
MP
31502014-07-20 Marek Polacek <polacek@redhat.com>
3151
3152 PR c/61852
3153 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3154 (implicitly_declare): Pass location to implicit_decl_warning.
3155
b108f48f
JJ
31562014-07-14 Jakub Jelinek <jakub@redhat.com>
3157
3158 PR middle-end/61294
3159 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3160 If non-NULL, call c_parser_check_literal_zero.
3161 (c_parser_check_literal_zero): New function.
3162 (c_parser_postfix_expression_after_primary): Adjust
3163 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3164
773ec47f
MP
31652014-07-06 Marek Polacek <polacek@redhat.com>
3166
3167 PR c/6940
3168 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3169 * c-tree.h (C_ARRAY_PARAMETER): Define.
3170 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3171 function parameter.
3172
22e1cf1c 31732014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3174 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3175
3176 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3177 releasing symbol.
3178
52ec0ea3
MP
31792014-07-01 Marek Polacek <polacek@redhat.com>
3180
3181 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3182 instead of 0 to WARN_FOR_ASSIGNMENT.
3183
d5c3d343
MP
31842014-07-01 Marek Polacek <polacek@redhat.com>
3185
3186 PR c/58286
3187 * c-typeck.c (convert_for_assignment): Pass
3188 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3189
6a7253a4
MP
31902014-06-30 Marek Polacek <polacek@redhat.com>
3191
3192 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3193 has no_sanitize_undefined attribute.
3194
5e88a8f4
IZ
31952014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3196
3197 PR middle-end/57541
3198 * c-array-notation.c (fix_builtin_array_notation_fn):
3199 Check for 0 arguments in builtin call. Check that bultin argument is
3200 correct.
3201 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3202 index.
3203
9698b078
SH
32042014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3205
3206 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3207 qualifiers in __auto_type for atomic types.
3208 (c_parser_typeof_specifier): Discard all type qualifiers in
3209 __typeof__ for atomic types.
3210
6e07c515
MP
32112014-06-25 Marek Polacek <polacek@redhat.com>
3212
3213 PR c/61162
3214 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3215 the return expression to c_finish_return.
3216
da6f124d
JJ
32172014-06-25 Jakub Jelinek <jakub@redhat.com>
3218
3219 * c-typeck.c (c_finish_omp_clauses): Make sure
3220 OMP_CLAUSE_LINEAR_STEP has correct type.
3221
c203e8a7
TS
32222014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3223
3224 * c-decl.c: Adjust.
3225
56ad0e38
JJ
32262014-06-24 Jakub Jelinek <jakub@redhat.com>
3227
3228 * c-parser.c (c_parser_omp_for_loop): For
3229 #pragma omp parallel for simd move lastprivate clause from parallel
3230 to for rather than simd.
3231
47c2554f
MP
32322014-06-23 Marek Polacek <polacek@redhat.com>
3233
3234 * c-typeck.c (parser_build_binary_op): Don't call
3235 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3236
56363ffd
JH
32372014-06-15 Jan Hubicka <hubicka@ucw.cz>
3238
3239 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3240 * c-decl.c (merge_decls): Likewise.
3241
d7ff7ae5
MP
32422014-06-09 Marek Polacek <polacek@redhat.com>
3243
3244 PR c/36446
3245 * c-typeck.c (error_init): Call inform instead of error_at.
3246 (pedwarn_init): Call inform instead of pedwarn.
3247 (warning_init): Call inform instead of warning_at.
3248
24d047a3
JH
32492014-06-07 Jan Hubicka <hubicka@ucw.cz>
3250
3251 * c-decl.c (merge_decls): Use set_decl_section_name.
3252 (duplicate_decls): Remove node if it exists.
3253
9bac5cbb
G
32542014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3255
3256 PR c/53119
3257 * c-typeck.c (push_init_level, process_init_element,
3258 pop_init_level): Correct check for zero initialization, move
3259 missing brace warning to respect zero initialization.
3260
8ffcdea8
MP
32612014-06-05 Marek Polacek <polacek@redhat.com>
3262
3263 PR c/56724
3264 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3265
742938c9
MP
32662014-06-05 Marek Polacek <polacek@redhat.com>
3267
3268 PR c/49706
3269 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3270 on the left hand side operand of a comparison.
3271
6447c55d
MP
32722014-06-05 Marek Polacek <polacek@redhat.com>
3273
3274 PR c/48062
3275 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3276 Print note only if the warning was printed.
3277
9dc7743c
IZ
32782014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3279
3280 PR c/58942
3281 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3282 with a pointer.
3283
fedfecef
MP
32842014-06-03 Marek Polacek <polacek@redhat.com>
3285
3286 PR c/60439
3287 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3288 c_start_case.
3289 * c-tree.h (c_start_case): Update.
3290 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3291 switch condition has boolean value.
3292
9b2b7279
AM
32932014-06-02 Andrew MacLeod <amacleod@redhat.com>
3294
3295 * c-decl.c: Include builtins.h.
3296 * c-parser.c: Likewise.
3297
5c1bc275
MP
32982014-05-27 Marek Polacek <polacek@redhat.com>
3299
3300 PR c/56724
3301 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3302 error and warning calls to error_at and warning_at. Pass location of
3303 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3304 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3305 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3306
97563bc8
IZ
33072014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3308
3309 PR c/61191
3310 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3311 function parameters.
3312
aede2c10
JH
33132014-05-23 Jan Hubicka <hubicka@ucw.cz>
3314
3315 * c-decl.c (merge_decls): Preserve symtab node pointers.
3316 (duplicate_decls): Free new decl.
3317
edbba2ce
TS
33182014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3319
f3316c6d
TS
3320 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3321 initialization.
3322
edbba2ce
TS
3323 * c-parser.c (c_parser_omp_target): Return bool values.
3324
68c81f24
TS
33252014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3326
3327 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3328 num_teams_loc variable to num_thread_limit_loc.
3329
632f2871
RS
33302014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3331
3332 * c-array-notation.c (expand_array_notations): Use void_node
3333 instead of void_zero_node.
3334
766090c2
TS
33352014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3336
3337 * c-decl.c (finish_struct): Adjust.
3338 (finish_enum): Likewise.
3339 (bind): Adjust.
3340 (record_inline_static): Likewise.
3341 (push_scope): Likewise.
3342 (make_label): Likewise.
3343 (lookup_label_for_goto): Likewise.
3344 (finish_struct): Likewise.
3345 (finish_enum): Likewise.
3346 (store_parm_decls): Likewise.
3347 (c_push_function_context): Likewise.
3348 * c-lang.h: Remove usage of variable_size gty attribute.
3349 * c-parser.c (c_parse_init): Adjust.
3350 (c_parse_file): Likewise.
3351
2b107f6b
MP
33522014-05-13 Marek Polacek <polacek@redhat.com>
3353
3354 PR c/61162
3355 * c-typeck.c (convert_for_assignment): Pass location to
3356 WARN_FOR_ASSIGNMENT instead of input_location.
3357
d033409e
MP
33582014-05-10 Marek Polacek <polacek@redhat.com>
3359
3360 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3361 maybe_warn_string_init.
3362 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3363 maybe_warn_string_init.
3364 * c-tree.h (maybe_warn_string_init): Update declaration.
3365 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3366 Call pedwarn_init with loc instead of with input_location.
3367 (digest_init): Pass init_loc to maybe_warn_string_init.
3368 (pop_init_level): Call pedwarn_init with loc instead of with
3369 input_location.
3370 (set_init_index): Likewise.
3371 (process_init_element): Likewise.
3372
ea58ef42
MP
33732014-05-09 Marek Polacek <polacek@redhat.com>
3374
3375 PR c/61096
3376 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3377 (c_parser_initelt): Pass location to set_init_label. Pass array index
3378 location to set_init_index.
3379 * c-tree.h (push_init_level): Update declaration.
3380 (pop_init_level): Likewise.
3381 (set_init_index): Likewise.
3382 (set_init_label): Likewise.
3383 * c-typeck.c (error_init): Add location parameter. Call error_at
3384 instead of error.
3385 (digest_init): Pass init_loc to error_init.
3386 (really_start_incremental_init):
3387 (push_init_level): Add location parameter. Pass loc to pop_init_level
3388 and error_init.
3389 (pop_init_level): Likewise.
3390 (set_designator): Add location parameter. Pass loc to pop_init_level,
3391 push_init_level, and error_init.
3392 (set_init_index): Add location parameter. Pass loc to error_init and
3393 set_designator.
3394 (set_init_label): Likewise.
3395 (output_init_element): Pass loc to error_init.
3396 (process_init_element): Pass loc to error_init, pop_init_level,
3397 pedwarn_init, and push_init_level.
3398
661a0813
MP
33992014-05-09 Marek Polacek <polacek@redhat.com>
3400
3401 PR c/50459
3402 * c-parser.c (c_parser_attributes): Parse the arguments as an
3403 expression-list if the attribute takes identifier.
3404
2793eeab
MP
34052014-05-08 Marek Polacek <polacek@redhat.com>
3406
3407 PR c/61053
3408 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3409 TYPE_ALIGN_UNIT.
3410
f827930a
MP
34112014-05-08 Marek Polacek <polacek@redhat.com>
3412
3413 PR c/61077
3414 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3415 of main.
3416
1d60af08
KZ
34172014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3418 Mike Stump <mikestump@comcast.net>
3419 Richard Sandiford <rdsandiford@googlemail.com>
3420
3421 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3422 (finish_enum): Use wide-int interfaces.
3423 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3424 * c-typeck.c (build_c_cast): Likewise.
3425 (set_nonincremental_init_from_string): Likewise.
3426 (c_tree_equal): Likewise.
3427
a0e24419
MP
34282014-05-02 Marek Polacek <polacek@redhat.com>
3429
3430 PR c/25801
3431 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3432 Return size_one_node when the type is not complete.
3433 (pointer_diff): Remove comment.
3434 (build_unary_op): Improve error messages.
3435
19fc9faa
MP
34362014-05-02 Marek Polacek <polacek@redhat.com>
3437
3438 * c-typeck.c (c_finish_return): Separate warning_at calls.
3439
63bc4e87
MP
34402014-05-02 Marek Polacek <polacek@redhat.com>
3441
3442 * c-tree.h (error_init): Remove declaration.
3443 (pedwarn_init): Likewise.
3444 * c-typeck.c (error_init): Make static and move above.
3445 (pedwarn_init): Likewise.
3446 (warning_init): Move above.
3447 (maybe_warn_string_init): Likewise.
3448
4bd2511b
JL
34492014-05-01 Jeff Law <law@redhat.com>
3450
3451 Revert:
3452
3453 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3454 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3455 avoid goto.
3456
6a358dcb
MP
34572014-05-02 Marek Polacek <polacek@redhat.com>
3458
3459 PR c/60784
3460 * c-typeck.c (push_init_level): Set constructor_designated to
3461 p->designated for structures.
3462
ae5ebda4
MP
34632014-05-01 Marek Polacek <polacek@redhat.com>
3464
3465 PR c/60915
3466 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3467 function-definition has an attribute after the declarator.
3468
96b40f8d
MP
34692014-05-01 Marek Polacek <polacek@redhat.com>
3470
3471 PR c/60257
3472 * c-typeck.c (warning_init): Add location_t parameter. Call
3473 warning_at instead of warning.
3474 (push_init_level): Pass input_location to warning_init.
3475 (add_pending_init): Add location_t parameter. Pass loc to
3476 warning_init.
3477 (set_nonincremental_init): Pass input_location to add_pending_init.
3478 (set_nonincremental_init_from_string): Likewise.
3479 (output_init_element): Pass loc to warning_init and to
3480 add_pending_init.
3481
32e00768
MP
34822014-05-01 Marek Polacek <polacek@redhat.com>
3483
3484 PR c/43395
3485 * c-typeck.c (c_finish_return): Distinguish between label and variable
3486 when warning about returning local address.
3487
c9379ce2
MP
34882014-05-01 Marek Polacek <polacek@redhat.com>
3489
3490 PR c/29467
3491 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3492 in C89 mode.
3493
d00887e8
MP
34942014-05-01 Marek Polacek <polacek@redhat.com>
3495
3496 PR c/43245
3497 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3498 instead of 0 to WARN_FOR_QUALIFIERS.
3499
5436fa2e
MP
35002014-05-01 Marek Polacek <polacek@redhat.com>
3501
3502 PR c/56989
3503 * c-typeck.c (default_conversion): Use better location for
3504 error call.
3505
f8ed5150
MP
35062014-04-30 Marek Polacek <polacek@redhat.com>
3507
3508 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3509 also when SANITIZE_FLOAT_DIVIDE is on.
3510
8337d1db
MP
35112014-04-30 Marek Polacek <polacek@redhat.com>
3512
3513 PR c/60139
3514 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3515 and pedwarn_init. Use loc insted of input_location.
3516
c4bdc42f
MP
35172014-04-30 Marek Polacek <polacek@redhat.com>
3518
3519 PR c/60351
3520 * c-typeck.c (build_binary_op): Use location when warning about
3521 shift count.
3522
45484dcf
MP
35232014-04-25 Marek Polacek <polacek@redhat.com>
3524
3525 PR c/18079
3526 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3527 always_inline/noinline and hot/cold attributes.
3528
34cf811f
MP
35292014-04-25 Marek Polacek <polacek@redhat.com>
3530
3531 PR c/60114
3532 * c-parser.c (c_parser_initelt): Pass input_location to
3533 process_init_element.
3534 (c_parser_initval): Pass loc to process_init_element.
3535 * c-tree.h (process_init_element): Adjust declaration.
3536 * c-typeck.c (push_init_level): Pass input_location to
3537 process_init_element.
3538 (pop_init_level): Likewise.
3539 (set_designator): Likewise.
3540 (output_init_element): Add location_t parameter. Pass loc to
3541 digest_init.
3542 (output_pending_init_elements): Pass input_location to
3543 output_init_element.
3544 (process_init_element): Add location_t parameter. Pass loc to
3545 output_init_element.
3546
42056eac
JJ
35472014-04-24 Jakub Jelinek <jakub@redhat.com>
3548
3549 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3550 atomic-clause, allow comma in between atomic-clause and
3551 seq_cst.
3552
e162a134
JJ
35532014-04-22 Jakub Jelinek <jakub@redhat.com>
3554
3555 PR c/59073
3556 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3557 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3558
2f6babac
IZ
35592014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3560
3561 PR middle-end/60469
3562 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3563 create_tmp_var instead build_decl for creating temps.
3564 (build_array_notation_expr): Likewise.
3565 (fix_conditional_array_notations_1): Likewise.
3566 (fix_array_notation_expr): Likewise.
3567 (fix_array_notation_call_expr): Likewise.
3568
8edbfaa6
JJ
35692014-03-28 Jakub Jelinek <jakub@redhat.com>
3570
3571 PR c++/60689
3572 * c-tree.h (c_build_function_call_vec): New prototype.
3573 * c-typeck.c (build_function_call_vec): Don't call
3574 resolve_overloaded_builtin here.
3575 (c_build_function_call_vec): New wrapper function around
3576 build_function_call_vec. Call resolve_overloaded_builtin here.
3577 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3578 Call c_build_function_call_vec instead of build_function_call_vec.
3579 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3580 * c-decl.c (finish_decl): Likewise.
3581
7485aeea
MLI
35822014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3583
3584 PR c/55383
3585 * c-typeck.c: Use correct format string in cast-qual warning
3586
b17a8b07
TS
35872014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3588
3589 * c-decl.c (c_decl_attributes): Use
3590 lang_hooks.types.omp_mappable_type.
3591 * c-typeck.c (c_finish_omp_clauses): Likewise.
3592
3af9c5e9
MP
35932014-03-06 Marek Polacek <polacek@redhat.com>
3594
3595 PR c/60197
3596 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3597 of checking tree code.
3598
1c9f5f33
PK
35992014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3600
3601 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3602 (c_parser_parameter_declaration): Likewise.
3603
cc28fc7f
MP
36042014-02-19 Marek Polacek <polacek@redhat.com>
3605
3606 PR c/60195
3607 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3608 Call mark_exp_read on exp.value.
3609 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3610 TREE_ADDRESSABLE on old instead of val.
3611 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3612
b581c05c
PK
36132014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3614
3615 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3616 C_EXPR_APPEND by vec_safe_push.
3617 * c-tree.h (C_EXPR_APPEND): Remove.
3618
81e5eca8
MP
36192014-01-31 Marek Polacek <polacek@redhat.com>
3620
3621 PR c/59963
3622 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3623 build_function_call_vec.
3624 (build_function_call): Likewise.
3625 (build_atomic_assign): Likewise.
3626 (build_function_call_vec): Add arg_loc parameter. Use it.
3627 (convert_arguments): Likewise.
3628 (convert_for_assignment): Rename rhs_loc to expr_loc.
3629 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3630 (c_parser_objc_keywordexpr): Likewise.
3631 (c_parser_postfix_expression_after_primary): Call
3632 build_function_call_vec with expr_loc rather than op_loc.
3633 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3634 build_function_call_vec.
3635 (c_parser_expr_list): Add locations parameter. Fill it with locations
3636 of function arguments.
3637 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3638
68fca595
MP
36392014-01-30 Marek Polacek <polacek@redhat.com>
3640
3641 PR c/59940
3642 * c-typeck.c (build_function_call_vec): Use loc parameter.
3643 (convert_arguments): Add location parameter. Use it.
3644 (ep_convert_and_check): Likewise.
3645 (build_atomic_assign): Adjust convert_for_assignment call.
3646 (build_modify_expr): Likewise.
3647 (digest_init): Likewise.
3648 (c_finish_return): Likewise.
3649 (build_conditional_expr): Adjust ep_convert_and_check calls.
3650 (convert_for_assignment): Add rhs_loc parameter. Use it.
3651 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3652 calls.
3653
fa337f3a
RB
36542014-01-30 Richard Biener <rguenther@suse.de>
3655
3656 PR c/59905
3657 * c-typeck.c (build_function_call_vec): Do not replace calls
3658 to a function via an incompatible type with a runtime abort.
3659
b72271b9
BI
36602014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3661
3662 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3663 flag_enable_cilkplus with flag_cilkplus.
3664 (c_parser_direct_declarator_inner): Likewise.
3665 (c_parser_attribute_any_word): Likewise.
3666 (c_parser_attributes): Likewise.
3667 (c_parser_compound_statement): Likewise.
3668 (c_parser_statement_after_labels): Likewise.
3669 (c_parser_if_statement): Likewise.
3670 (c_parser_switch_statement): Likewise.
3671 (c_parser_do_statement): Likewise.
3672 (c_parser_for_statement): Likewise.
3673 (c_parser_unary_expression): Likewise.
3674 (c_parser_postfix_expression): Likewise.
3675 (c_parser_postfix_expression_after_primary): Likewise.
3676 (c_parser_postfix_expression_after_primary): Likewise.
3677 (c_parser_omp_clause_name): Likewise.
3678 (c_finish_omp_declare_simd): Likewise.
3679 (c_parser_cilk_verify_simd): Likewise.
3680 * c-typeck.c (build_array_ref): Likewise.
3681 (build_function_call_vec): Likewise.
3682 (convert_arguments): Likewise.
3683 (build_compound_expr): Likewise.
3684 (c_finish_return): Likewise.
3685 (c_finish_if_stmt): Likewise.
3686 (c_finish_loop): Likewise.
3687 (build_binary_op): Likewise.
3688
393e8e8b
MP
36892014-01-23 Marek Polacek <polacek@redhat.com>
3690
3691 PR c/59846
3692 * c-typeck.c (parser_build_binary_op): Use location instead of
3693 input_location.
3694 (build_binary_op): Pass location to shorten_compare.
3695
f04dda30
MP
36962014-01-23 Marek Polacek <polacek@redhat.com>
3697
3698 PR c/58346
3699 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3700 an empty aggregate.
3701
789eadcd
MP
37022014-01-23 Marek Polacek <polacek@redhat.com>
3703
3704 PR c/59871
3705 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3706 of a comma expression.
3707 (emit_side_effect_warnings): Likewise.
3708
40f14e9f
BI
37092014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3710
3711 PR c/59825
3712 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3713 function to use walk_tree and moved a lot of its functionality to
3714 expand_array_notations.
3715 (expand_array_notations): New function.
3716
74558dd9
BI
37172014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3718
3719 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3720 attribute an attribute without value.
3721
652fea39
JJ
37222014-01-23 Jakub Jelinek <jakub@redhat.com>
3723
3724 PR middle-end/58809
3725 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3726 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3727
f34f1c87
MP
37282014-01-22 Marek Polacek <polacek@redhat.com>
3729
3730 PR c/59891
3731 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3732 of remove_c_maybe_const_expr on op1 and op2.
3733
241f845a
JJ
37342014-01-15 Jakub Jelinek <jakub@redhat.com>
3735
3736 PR c/58943
3737 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3738 effects, preevaluate rhs using SAVE_EXPR first.
3739
9a74f20c
BI
37402014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3741
3742 PR c++/59631
3743 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3744 statements with if-elseif statements.
3745
96066ce1
MP
37462014-01-06 Marek Polacek <polacek@redhat.com>
3747
3748 PR c/57773
3749 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3750 defined bit-field types only in ISO C.
3751
23a5b65a
RS
37522014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3753
3754 Update copyright years
3755
f9030485
RS
37562014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3757
3758 * c-array-notation.c: Use the standard form for the copyright notice.
3759
41958c28
BI
37602013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3761
3762 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3763 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3764 field in parser is not empty. If not-empty, call the function
3765 c_parser_finish_omp_declare_simd.
3766 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3767 between SIMD-enabled functions and #pragma simd. Added new parameter.
3768 (c_parser_cilk_all_clauses): Modified the usage of the function
3769 c_parser_cilk_clause_vectorlength as mentioned above.
3770 (c_parser_cilk_simd_fn_vector_attrs): New function.
3771 (c_finish_cilk_simd_fn_tokens): Likewise.
3772 (is_cilkplus_vector_p): Likewise.
3773 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3774 "nomask," and "mask" strings in clause name.
3775 (c_parser_omp_all_clauses): Added 3 new case statements:
3776 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3777 PRAGMA_CILK_CLAUSE_NOMASK.
3778 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3779 check for vector attribute and if so call the function
3780 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3781 called the function c_finish_cilk_simd_fn_tokens.
3782 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3783 parser field is non-empty. If so, parse them as you would parse
3784 the omp declare simd pragma.
3785 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3786 Added a check when step is a parameter and flag it as error.
3787 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3788 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3789 pragma_omp_clause.
3790
cef0fd0e
TS
37912013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3792
3793 * c-parser.c (c_parser_omp_parallel): Fix description.
3794
12893402
BI
37952013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3796
3797 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3798 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3799 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3800 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3801
296674db
JM
38022013-12-04 Joseph Myers <joseph@codesourcery.com>
3803
3804 PR c/52023
3805 * c-parser.c (c_parser_alignas_specifier): Use
3806 c_sizeof_or_alignof_type instead of c_alignof.
3807 (c_parser_alignof_expression): Likewise, with min_alignof
3808 parameter depending on alignof spelling used.
3809
edd28054
MP
38102013-12-04 Marek Polacek <polacek@redhat.com>
3811
3812 PR c/54113
3813 * c-decl.c (start_function): Don't warn for missing prototype for
3814 inline functions.
3815
da0fc454
MP
38162013-12-03 Marek Polacek <polacek@redhat.com>
3817
3818 PR c/59351
3819 * c-decl.c (build_compound_literal): Allow compound literals with
3820 empty initial value.
3821
4c2ecab0
JM
38222013-12-02 Joseph Myers <joseph@codesourcery.com>
3823
3824 PR c/58235
3825 * c-typeck.c (build_modify_expr): Diagnose assignment to
3826 expression with array type.
3827
340baef7
JM
38282013-11-29 Joseph Myers <joseph@codesourcery.com>
3829
3830 PR c/42262
3831 * c-typeck.c (process_init_element): Do not treat a string as
3832 initializing a whole array when used with a designator for an
3833 individual element.
3834
6763b9f7
JM
38352013-11-29 Joseph Myers <joseph@codesourcery.com>
3836
3837 PR c/57574
3838 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3839 an inline function following a static declaration.
3840
e7bd1de1
JJ
38412013-11-28 Jakub Jelinek <jakub@redhat.com>
3842
3843 PR c/59310
3844 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3845 to p_name before calling c_parser_omp_teams instead of after.
3846 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3847 argument. Remove unused p_name variable.
3848
0136f8f0
AH
38492013-11-27 Aldy Hernandez <aldyh@redhat.com>
3850 Jakub Jelinek <jakub@redhat.com>
3851
3852 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3853 external_scope is NULL.
3854
241b71bb
TV
38552013-11-27 Tom de Vries <tom@codesourcery.com>
3856 Marc Glisse <marc.glisse@inria.fr>
3857
3858 PR c++/59032
3859 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3860
2fb9a547
AM
38612013-11-22 Andrew MacLeod <amacleod@redhat.com>
3862
3863 * c-typeck.c: Add required include files from gimple.h.
3864
8400e75e
DM
38652013-11-22 David Malcolm <dmalcolm@redhat.com>
3866
3867 * c-decl.c (define_label, shadow_tag_warned)
3868 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3869 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3870 (declspecs_add_type): Remove use of in_system_header macro.
3871 * c-parser.c (c_parser_unary_expression): Likewise.
3872 * c-typeck.c (store_init_value, process_init_element)
3873 (c_start_case): Likewise.
3874
3875 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3876 macro.
3877
3878 * c-parser.c (c_parser_set_source_position_from_token): Remove
3879 reference to in_system_header from comment.
3880
386b1f1f
RS
38812013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3882
3883 * c-decl.c (grokdeclarator): Update comment to refer to
3884 tree_to_[su]hwi rather than tree_low_cst.
3885
ae7e9ddd
RS
38862013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3887
3888 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3889 tree_to_uhwi throughout.
3890
9439e9a1
RS
38912013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3892
3893 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3894 throughout.
3895
9541ffee
RS
38962013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3897
3898 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3899 throughout.
3900
c02065fc
AH
39012013-11-15 Aldy Hernandez <aldyh@redhat.com>
3902
3903 * c-parser.c (c_parser_cilk_simd): New.
3904 (c_parser_cilk_verify_simd): New.
3905 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3906 (c_parser_omp_for_loop): Add case for NE_EXPR.
3907 Set c_break_label for CILK_SIMD.
3908 (c_parser_cilk_clause_vectorlength): New.
3909 (c_parser_cilk_clause_linear): New.
3910 (c_parser_cilk_clause_name): New.
3911 (c_parser_cilk_all_clauses): New.
3912 * c-typeck.c (build_unary_op): Pass location argument to
3913 readonly_error.
3914 (build_modify_expr): Same.
3915 (build_asm_expr): Same.
3916 (c_finish_bc_stmt): Error on break/continue in loops.
3917
18f429e2
AM
39182013-11-14 Andrew MacLeod <amacleod@redhat.com>
3919
3920 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3921
d8a2d370
DN
39222013-11-14 Diego Novillo <dnovillo@google.com>
3923
3924 * c-decl.c: Include print-tree.h.
3925 Include stor-layout.h.
3926 Include varasm.h.
3927 Include attribs.h.
3928 Include stringpool.h.
3929 * c-lang.c: Include fold-const.h.
3930 * c-parser.c: Include stringpool.h.
3931 Include attribs.h.
3932 Include stor-layout.h.
3933 Include varasm.h.
3934 Include trans-mem.h.
3935 * c-typeck.c: Include stor-layout.h.
3936 Include trans-mem.h.
3937 Include varasm.h.
3938 Include stmt.h.
3939
38b7bc7f
JM
39402013-11-13 Joseph Myers <joseph@codesourcery.com>
3941
3942 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3943 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3944 __auto_type.
3945 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3946 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3947 RID_AUTO_TYPE.
3948 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3949 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3950 (c_parser_declarator, c_parser_direct_declarator_inner)
3951 (c_parser_parameter_declaration, c_parser_type_name): All callers
3952 changed.
3953 (c_parser_declaration_or_fndef): Handle declarations with type
3954 determined from the initializer.
3955
45b0be94
AM
39562013-11-12 Andrew MacLeod <amacleod@redhat.com>
3957
18f429e2 3958 * c-typeck.c: Include gimplify.h.
45b0be94 3959
582d9b50
JM
39602013-11-12 Joseph Myers <joseph@codesourcery.com>
3961
3962 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3963 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3964 comment.
3965 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3966 or _Thread_local as appropriate in diagnostics.
3967 (build_null_declspecs): Initialize ret->thread_gnu_p.
3968 (declspecs_add_scspec): Handle either __thread or _Thread_local
3969 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3970 pedantic. Do not disallow _Thread_local extern and _Thread_local
3971 static.
3972
267bac10
JM
39732013-11-07 Joseph Myers <joseph@codesourcery.com>
3974 Andrew MacLeod <amacleod@redhat.com>
3975
3976 * c-aux-info.c (gen_type): Handle atomic qualifier.
3977 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3978 qualifiers when compating types.
3979 (shadow_tag_warned): Handle atomic_p in declspecs.
3980 (quals_from_declspecs): Likewise.
3981 (start_decl): Use c_type_promotes_to when promoting argument
3982 types.
3983 (grokdeclarator): Handle _Atomic.
3984 (get_parm_info): Diagnose any qualifier on "void" as only
3985 parameter.
3986 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3987 comparing types. Use c_type_promotes_to when promoting argument
3988 types.
3989 (finish_function): Use c_type_promotes_to when promoting argument
3990 types.
3991 (build_null_declspecs): Handle atomic_p in declspecs.
3992 (declspecs_add_qual): Handle RID_ATOMIC.
3993 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3994 (c_token_starts_declspecs): Handle RID_ATOMIC.
3995 (c_parser_declspecs): Handle atomic type specifiers and
3996 qualifiers.
3997 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3998 from types of expressions with atomic type.
3999 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
4000 (c_parser_attribute_any_word): Handle RID_ATOMIC.
4001 (c_parser_initializer, c_parser_initelt, c_parser_initval)
4002 (c_parser_statement_after_labels, c_parser_switch_statement)
4003 (c_parser_for_statement, c_parser_expr_no_commas)
4004 (c_parser_conditional_expression, c_parser_binary_expression)
4005 (c_parser_cast_expression, c_parser_unary_expression)
4006 (c_parser_postfix_expression)
4007 (c_parser_postfix_expression_after_primary, c_parser_expression):
4008 Use convert_lvalue_to_rvalue.
4009 (c_parser_expression_conv, c_parser_expr_list): Document
4010 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
4011 (c_parser_objc_synchronized_statement): Use
4012 convert_lvalue_to_rvalue.
4013 (c_parser_objc_selector): Handle RID_ATOMIC.
4014 (c_parser_objc_receiver, c_parser_array_notation): Use
4015 convert_lvalue_to_rvalue.
4016 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4017 _Atomic (type-name).
4018 (struct c_declspecs): Add atomic_p field.
4019 (convert_lvalue_to_rvalue): Declare.
4020 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4021 corresponding atomic types.
4022 (qualify_type): Don't add _Atomic qualifiers from second argument.
4023 (comp_target_types): Do not allow _Atomic mismatches.
4024 (type_lists_compatible_p): Do not remove atomic qualifiers when
4025 comparing types.
4026 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4027 (build_atomic_assign): New functions.
4028 (build_unary_op): Use build_atomic_assign for atomic increment and
4029 decrement.
4030 (build_conditional_expr): Do not treat _Atomic void as a qualified
4031 version of void.
4032 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4033 (find_anonymous_field_with_type, convert_to_anonymous_field)
4034 (convert_for_assignment): Do not remove atomic qualifiers when
4035 comparing types.
4036 (digest_init): Do not accept initialization of arrays of atomic
4037 elements by string constants.
4038 (build_asm_expr): Use convert_lvalue_to_rvalue.
4039 (build_binary_op): Do not treat _Atomic void as a qualified
4040 version of void.
4041
0c249d4b
DD
40422013-11-06 DJ Delorie <dj@redhat.com>
4043
4044 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4045 both explicit and builtin, print the location of the explicit one.
4046
6d7f7e0a
TB
40472013-11-05 Tobias Burnus <burnus@net-b.de>
4048
4049 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4050 c_parser_omp_distribute, c_parser_omp_teams,
4051 c_parser_omp_target, c_parser_omp_declare): Handle
4052 -fopenmp-simd.
4053
b906f4ca
MP
40542013-11-03 Marek Polacek <polacek@redhat.com>
4055
4056 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4057
ee1d5a02
JJ
40582013-11-01 Jakub Jelinek <jakub@redhat.com>
4059
4060 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4061 check_dup_generic at the end, unless remove is true.
4062 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4063 remove = true;.
4064 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4065
5a9785fb
JJ
40662013-10-31 Jakub Jelinek <jakub@redhat.com>
4067
4068 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4069 with decl that is not pointer nor array.
4070
939b37da
BI
40712013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4072
4073 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4074 a spawning function is found.
4075 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4076 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4077 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4078 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4079 case.
4080 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4081 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4082 expr.
4083 (c_finish_return): Added a check to reject _Cilk_spawn in return
4084 expression.
4085 (build_cilk_spawn): New function.
4086 (build_cilk_sync): Likewise.
4087 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4088
d4af74d4
TB
40892013-10-27 Tobias Burnus <burnus@net-b.de>
4090
4091 PR other/33426
4092 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4093 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4094 (c_parser_statement_after_labels): Update calls.
4095
d73749df 40962013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4097
4098 PR other/33426
4099 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4100 Handle PRAGMA_IVDEP.
4101 (c_parser_statement_after_labels): Update call.
4102
f28aa681
MP
41032013-10-24 Marek Polacek <polacek@redhat.com>
4104
4105 * c-parser.c (c_parser_struct_declaration): Add a comment.
4106 (c_parser_declarator): Don't allow _Alignas here.
4107
0645c1a2
AM
41082013-10-17 Andrew MacLeod <amacleod@redhat.com>
4109
4110 * c-parser.c: Include omp-low.h.
4111 * c-typeck.c: Likewise.
4112
568a31f2
MP
41132013-10-17 Marek Polacek <polacek@redhat.com>
4114
4115 PR c/58267
4116 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4117 Document syntax of the array-declarator.
4118 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4119 are not permitted.
4120 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4121 (c_parser_struct_declaration): Likewise.
4122 (c_parser_declarator): Likewise.
4123 (c_parser_direct_declarator_inner): Likewise.
4124 (c_parser_parameter_declaration): Likewise.
4125 (c_parser_type_name): Likewise.
4126
acf0174b
JJ
41272013-10-11 Jakub Jelinek <jakub@redhat.com>
4128
4129 * c-lang.h (current_omp_declare_target_attribute): New extern
4130 decl.
4131 * c-parser.c: Include c-lang.h.
4132 (struct c_parser): Change tokens to c_token *.
4133 Add tokens_buf field. Change tokens_avail type to unsigned int.
4134 (c_parser_consume_token): If parser->tokens isn't
4135 &parser->tokens_buf[0], increment parser->tokens.
4136 (c_parser_consume_pragma): Likewise.
4137 (enum pragma_context): Add pragma_struct and pragma_param.
4138 (c_parser_external_declaration): Adjust
4139 c_parser_declaration_or_fndef caller.
4140 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4141 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4142 Adjust recursive call.
4143 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4144 of pragma_external.
4145 (c_parser_parameter_declaration): Use pragma_param instead of
4146 pragma_external.
4147 (c_parser_compound_statement_nostart, c_parser_label,
4148 c_parser_for_statement): Adjust
4149 c_parser_declaration_or_fndef callers.
4150 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4151 it through to c_parser_conditional_expression.
4152 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4153 pass it through to c_parser_binary_expression. Adjust recursive
4154 call.
4155 (c_parser_binary_expression): Remove prec argument, add
4156 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4157 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4158 binop matches it, use build2 instead of parser_build_binary_op.
4159 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4160 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4161 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4162 Handle pragma_struct and pragma_param the same as pragma_external.
4163 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4164 (c_parser_omp_variable_list): Parse array sections for
4165 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4166 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4167 (c_parser_omp_clause_reduction): Handle user defined reductions.
4168 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4169 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4170 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4171 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4172 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4173 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4174 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4175 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4176 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4177 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4178 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4179 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4180 (c_parser_omp_for_loop): Add CODE argument, pass it through
4181 to c_finish_omp_for. Change last argument to cclauses,
4182 and adjust uses to grab parallel clauses from the array of all
4183 the split clauses. Adjust c_parser_binary_expression,
4184 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4185 (omp_split_clauses): New function.
4186 (c_parser_omp_simd): New function.
4187 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4188 Allow the function to be called also when parsing combined constructs,
4189 and call c_parser_omp_simd when parsing for simd.
4190 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4191 #pragma omp section, require exactly one structured-block instead of
4192 sequence of statements.
4193 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4194 Allow the function to be called also when parsing combined constructs.
4195 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4196 Allow the function to be called also when parsing combined
4197 constructs.
4198 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4199 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4200 c_parser_omp_teams, c_parser_omp_target_data,
4201 c_parser_omp_target_update, c_parser_omp_target,
4202 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4203 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4204 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4205 (c_parser_omp_construct): Add p_name and mask vars. Handle
4206 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4207 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4208 and c_parser_omp_sections callers.
4209 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4210 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4211 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4212 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4213 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4214 OMP_CLAUSE_DEPEND.
4215 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4216 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4217 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4218 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4219 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4220 * c-typeck.c: Include tree-inline.h.
4221 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4222 handle_omp_array_sections_1, handle_omp_array_sections,
4223 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4224 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4225 user defined reductions.
4226 (c_tree_equal): New function.
4227 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4228 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4229 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4230 c_check_omp_declare_reduction_r): New prototypes.
4231 * c-decl.c (current_omp_declare_target_attribute): New variable.
4232 (c_decl_attributes): New function.
4233 (start_decl, start_function): Use it instead of decl_attributes.
4234 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4235 c_omp_reduction_decl, c_omp_reduction_lookup,
4236 c_check_omp_declare_reduction_r): New functions.
4237
0a6c2227
TT
42382013-09-25 Tom Tromey <tromey@redhat.com>
4239
4240 * Make-lang.in (c/gccspec.o): Remove.
4241 (CFLAGS-c/gccspec.o): New variable.
4242 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4243 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4244 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4245
f3bc55f0
TT
42462013-09-25 Tom Tromey <tromey@redhat.com>
4247
4248 * Make-lang.in (c/gccspec.o): Don't use subshell.
4249
a24d975c
MP
42502013-09-18 Marek Polacek <polacek@redhat.com>
4251
4252 PR sanitize/58443
4253 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4254 Remove unnecessary check.
4255
ce6923c5
MP
42562013-09-18 Marek Polacek <polacek@redhat.com>
4257
4258 PR sanitizer/58411
4259 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4260 no_sanitize_undefined attribute.
4261
a1e51df9
KT
42622013-09-13 Kai Tietz <ktietz@redhat.com>
4263
4264 PR target/57848
4265 * c-decl.c (c_builtin_function_ext_scope): Remove
4266 wrong assumption that it is never called on prexisting
4267 symbol.
4268
0af94e6f
JR
42692013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4270
4271 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4272
20059c8b
GDR
42732013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4274
4275 * c-objc-common.c (c_tree_printer): Tidy.
4276
de5a5fa1
MP
42772013-08-30 Marek Polacek <polacek@redhat.com>
4278
4279 * c-typeck.c (build_binary_op): Add division by zero and shift
4280 instrumentation.
4281
2531a1d9 42822013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4283 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4284
6e2bcc98 4285 PR c/35649
2531a1d9
JR
4286 * c-typeck.c (c_common_type): Prefer double_type_node over
4287 other REAL_TYPE types with the same precision.
4288 (convert_arguments): Likewise.
4289
025311c4
GDR
42902013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4291
4292 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4293 (c_initialize_diagnostics): Call a destructor for the early printer.
4294
da6ca2b5
GDR
42952013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4296
4297 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4298 printer initialization.
4299
318cda85 43002013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4301
318cda85
BI
4302 PR c/57490
4303 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4304 check for truth values.
4305 (expand_array_notation_exprs): Added truth values case. Removed an
4306 unwanted else. Added for-loop to walk through subtrees in default
4307 case.
4308
b066401f
GDR
43092013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4310
4311 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4312
fb48aadc
JM
43132013-07-23 Joseph Myers <joseph@codesourcery.com>
4314
4315 * c-parser.c (struct c_generic_association): Fix typo.
4316
433cc7b0
TT
43172013-07-23 Tom Tromey <tromey@redhat.com>
4318 Joseph Myers <joseph@codesourcery.com>
4319
4320 * c-parser.c (struct c_generic_association): New.
4321 (c_generic_association_d): New typedef.
4322 (c_parser_generic_selection): New function.
4323 (c_parser_postfix_expression): Handle RID_GENERIC.
4324
26d40c3d
JM
43252013-07-13 Jason Merrill <jason@redhat.com>
4326
4327 PR c++/57793
4328 * c-decl.c (finish_struct): Check for too-large class.
4329
ecdbd01a 43302013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4331
4332 PR c/57821
4333 * c-typeck.c (set_init_index): When folding, check for index overflow.
4334
1141ed3f
BI
43352013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4336
4337 * c-parser.c (c_parser_array_notation): Removed rejection of array
4338 notations in an array of function pointers.
4339
713b46fa
BI
43402013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4341
4342 * c-array-notation.c (make_triplet_val_inv): New function.
4343 (create_cmp_incr): Likewise.
4344 (create_array_refs): Likewise.
4345 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4346 Also modularized common parts between functions and called the function.
4347 (build_array_notation_expr): Likewise.
4348 (fix_conditional_array_notations_1): Likewise.
4349 (fix_array_notation_expr): Likewise.
4350 (fix_array_notation_call_expr): Likewise.
4351
92f20202
MP
43522013-06-18 Marek Polacek <polacek@redhat.com>
4353
4354 PR c/57630
4355 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4356
73a23b06
BI
43572013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4358
4359 * c-array-notation.c (build_array_notation_expr): Reject array notation
4360 mismatch between LHS and RHS even inside a call_expr. Also, removed
4361 a couple while statements that were dead code.
4362
00b8517d
BI
43632013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4364
4365 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4366 excessive precision expressions in function parameters. Also removed
4367 couple unwanted while statements.
4368
1509bdda
BI
43692013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4370
4371 * c-array-notation.c (expand_array_notation_exprs): Added
4372 ARRAY_NOTATION_REF case.
4373
d60f1706
BI
43742013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4375
4376 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4377 function to c-family/array-notation-common.c.
4378 (is_cilkplus_reduce_builtin): Likewise.
4379 (find_rank): Likewise.
4380 (extract_array_notation_exprs): Likewise.
4381 (replace_array_notations): Likewise.
4382 (find_inv_trees): Likewise.
4383 (replace_inv_trees): Likewise.
4384 (contains_array_notation_expr): Likewise.
4385 (find_correct_array_notation_type): Likewise.
4386 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4387 (struct inv_list): Moved this to c-family/array-notation-common.c.
4388 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4389
6d6efbb3
BI
43902013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4391
4392 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4393 reduction functions outside the for-loop. Added a check if the fundecl
4394 is non-NULL. Finally, removed an unwanted if-statement, and made the
4395 body unconditional.
4396
25c22937
BI
43972013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4398
4399 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4400 condition of the if-statement matches the rank of else-block and then-
4401 block when array notations are used.
4402 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4403 expression after the entire function body is parsed.
4404 (c_parser_expr_no_commas): Delayed creating array notation expressions
4405 to the end of function parsing.
4406 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4407 whole if-statement instead of just the condition.
4408 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4409
edd25645
BI
44102013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4411
4412 PR c/57474
4413 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4414 array to NULL_TREE if they are unused. Also added a check for the
4415 field to be NULL before its fields are used in future.
4416
065ce7f1
RO
44172013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4418
4419 PR bootstrap/57450
4420 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4421 (build_array_notation_expr): Likewise.
4422
36536d79
BI
44232013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4424
4425 * c-typeck.c (build_array_ref): Added a check to see if array's
4426 index is greater than one. If true, then emit an error.
4427 (build_function_call_vec): Exclude error reporting and checking
4428 for builtin array-notation functions.
4429 (convert_arguments): Likewise.
4430 (c_finish_return): Added a check for array notations as a return
4431 expression. If true, then emit an error.
4432 (c_finish_loop): Added a check for array notations in a loop
4433 condition. If true then emit an error.
4434 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4435 (build_binary_op): Added a check for array notation expr inside
4436 op1 and op0. If present, we call another function to find correct
4437 type.
4438 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4439 * c-parser.c (c_parser_compound_statement): Check if array
4440 notation code is used in tree, if so, then transform them into
4441 appropriate C code.
4442 (c_parser_expr_no_commas): Check if array notation is used in LHS
4443 or RHS, if so, then build array notation expression instead of
4444 regular modify.
4445 (c_parser_postfix_expression_after_primary): Added a check for
4446 colon(s) after square braces, if so then handle it like an array
4447 notation. Also, break up array notations in unary op if found.
4448 (c_parser_direct_declarator_inner): Added a check for array
4449 notation.
4450 (c_parser_compound_statement): Added a check for array notation in
4451 a stmt. If one is present, then expand array notation expr.
4452 (c_parser_if_statement): Likewise.
4453 (c_parser_switch_statement): Added a check for array notations in
4454 a switch statement's condition. If true, then output an error.
4455 (c_parser_while_statement): Similarly, but for a while.
4456 (c_parser_do_statement): Similarly, but for a do-while.
4457 (c_parser_for_statement): Similarly, but for a for-loop.
4458 (c_parser_unary_expression): Check if array notation is used in a
4459 pre-increment or pre-decrement expression. If true, then expand
4460 them.
4461 (c_parser_array_notation): New function.
4462 * c-array-notation.c: New file.
4463 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4464
cd192ccc
MS
44652013-05-23 Mike Stump <mikestump@comcast.net>
4466
4467 * c-typeck.c (convert_for_assignment): Handle references to memory
4468 spaces better.
4469
427b248d
JM
44702013-05-16 Jason Merrill <jason@redhat.com>
4471
4472 * Make-lang.in (cc1$(exeext)): Use link mutex.
4473
44d90fe1
PC
44742013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4475
4476 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4477 to simply use OPT_Wpointer_arith.
4478 (build_unary_op): Likewise.
4479
4e7d7b3d
JJ
44802013-04-03 Jakub Jelinek <jakub@redhat.com>
4481
4482 PR c/19449
4483 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4484 argument. If set, or it temporarily for parsing of the first
4485 argument into force_folding_builtin_constant_p.
4486 (c_parser_postfix_expression): Adjust callers.
4487
839b422f
RB
44882013-03-21 Richard Biener <rguenther@suse.de>
4489
4490 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4491 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4492
2ee028f1
MP
44932013-02-12 Marek Polacek <polacek@redhat.com>
4494
4495 PR c/44938
4496 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4497 origtypes to NULL.
4498
8824edff
JJ
44992013-01-24 Jakub Jelinek <jakub@redhat.com>
4500
4501 PR c/56078
4502 * c-typeck.c (set_nonincremental_init_from_string): If
4503 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4504 returned false.
4505 (process_init_element): Likewise.
4506
eadd3d0d
JJ
45072012-12-20 Jakub Jelinek <jakub@redhat.com>
4508
4509 PR c++/55619
4510 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4511 argument, don't call default_function_array_conversion
4512 nor c_fully_fold here.
4513 (c_parser_asm_statement): Adjust callers.
4514 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4515 and outputs here, and call default_function_array_conversion
4516 on inputs that don't need to be addressable.
4517
f8a93a2e
JJ
45182012-12-18 Jakub Jelinek <jakub@redhat.com>
4519
4520 PR c/39464
4521 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4522 warning require that both c_common_unsigned_type as well as
4523 c_common_signed_type is the same for both mvl and mvr types.
4524
9771b263
DN
45252012-11-16 Diego Novillo <dnovillo@google.com>
4526
4527 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4528
4529 * c-common.c: Use new vec API in vec.h.
4530 * c-common.h: Likewise.
4531 * c-gimplify.c: Likewise.
4532 * c-pragma.c: Likewise.
4533 * c-pretty-print.c: Likewise.
4534 * c-pretty-print.h: Likewise.
4535 * c-semantics.c: Likewise.
4536 * c-decl.c: Likewise.
4537 * c-parser.c: Likewise.
4538 * c-tree.h: Likewise.
4539 * c-typeck.c: Likewise.
4540
880661a4
JW
45412012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4542
4543 PR c++/54930
4544 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4545
077d1abe
MLI
45462012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4547
4548 PR c/53066
4549 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4550 shadows a function, unless the variable is a function or a
4551 pointer-to-function.
4552
3a785c97
JJ
45532012-10-12 Jakub Jelinek <jakub@redhat.com>
4554
4555 PR c/54381
4556 * c-parser.c (struct c_tree_loc_pair): Removed.
4557 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4558 add location_t * and tree * arguments, fill in array of 3
4559 sizeof_arg trees and corresponding locs.
4560 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4561 c_parser_expr_list callers.
4562 (c_parser_postfix_expression_after_primary): Likewise. Pass
4563 array of 3 sizeof_arg trees and locs (corresponding to first
4564 3 arguments) to sizeof_pointer_memaccess_warning.
4565
703c8606
LC
45662012-10-09 Lawrence Crowl <crowl@google.com>
4567
4568 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4569 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4570 hash table.
4571
5d9de0d0
PC
45722012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4573
4574 PR c++/54194
4575 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4576 call.
4577
a212e43f
MG
45782012-10-09 Marc Glisse <marc.glisse@inria.fr>
4579
4580 PR c++/54427
4581 * c-typeck.c: Include c-common.h.
4582 (enum stv_conv): Moved to c-common.h.
4583 (scalar_to_vector): Moved to c-common.c.
4584 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4585 * Make-lang.in: c-typeck.c depends on c-common.h.
4586
3b78de56
AC
45872012-10-04 Arnaud Charlet <charlet@adacore.com>
4588
4589 * c-decl.c (c_write_global_declarations): Fix handling of
4590 -fdump-ada-spec*.
4591
78c60e3d
SS
45922012-09-30 Sharad Singhai <singhai@google.com>
4593
4594 * c-decl.c (c_write_global_declarations): Use a different method
4595 to determine if the dump has ben initialized.
4596
9f33203d
JM
45972012-09-14 Joseph Myers <joseph@codesourcery.com>
4598
4599 PR c/54552
4600 * c-typeck.c (c_cast_expr): When casting to a type requiring
4601 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4602 c_fully_fold first.
4603
a27d595d
JM
46042012-09-14 Joseph Myers <joseph@codesourcery.com>
4605
4606 PR c/54103
4607 * c-typeck.c (build_unary_op): Pass original argument of
4608 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4609 any C_MAYBE_CONST_EXPR, if it has integer operands.
4610 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4611 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4612 to c_objc_common_truthvalue_conversion, then remove any
4613 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4614 c_objc_common_truthvalue_conversion not
4615 c_common_truthvalue_conversion.
4616 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4617 call note_integer_operands for arguments with integer operands
4618 that are not integer constants.
4619
9feb29df
JJ
46202012-09-13 Jakub Jelinek <jakub@redhat.com>
4621
4622 PR c/54559
4623 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4624 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4625
d409320c
JJ
46262012-08-31 Jakub Jelinek <jakub@redhat.com>
4627
4628 PR c/54428
4629 * c-convert.c (convert): Don't call fold_convert_loc if
4630 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4631 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4632 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4633
6265d07c
JJ
46342012-08-24 Jakub Jelinek <jakub@redhat.com>
4635
4636 PR c/54355
4637 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4638 for nested and empty_ok arguments in the call to
4639 c_parser_declaration_or_fndef.
4640
1a4049e7
JJ
46412012-08-17 Jakub Jelinek <jakub@redhat.com>
4642
4643 * c-tree.h (c_last_sizeof_arg): Declare.
4644 * c-parser.c (struct c_tree_loc_pair): New type.
4645 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4646 non-NULL.
4647 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4648 (c_parser_postfix_expression_after_primary): Likewise. Call
4649 sizeof_pointer_memaccess_warning if needed.
4650 (sizeof_ptr_memacc_comptypes): New function.
4651 * c-typeck.c (c_last_sizeof_arg): New global variable.
4652 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4653
0229aee9
UB
46542012-07-24 Uros Bizjak <ubizjak@gmail.com>
4655
4656 * c-lang.h (lang_decl): Add variable_size GTY option.
4657
7ee2468b
SB
46582012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4659
4660 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4661 * Make-lang.in: Fix dependencies.
4662
d4a10d0a
SB
46632012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4664
4665 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4666 and add language Makefile hooks.
4667 * config-lang.in: New file.
4668 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4669 add the required "normal" config-lang.in rules.
4670 * c-lang.h: Moved from gcc/ to here.
4671 * c-tree.h: Likewise.
4672 * c-objc-common.c: Likewise.
4673 * c-objc-common.h: Likewise.
4674 * c-typeck.c: Likewise.
4675 * c-convert.c: Likewise.
4676 * c-lang.c: Likewise.
4677 * c-aux-info.c: Likewise.
4678 * c-errors.c: Likewise.
4679 * gccspec.c: Likewise.
4680 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4681 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4682\f
cbe34bb5 4683Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4684
4685Copying and distribution of this file, with or without modification,
4686are permitted in any medium without royalty provided the copyright
4687notice and this notice are preserved.