]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
* c-c++-common/ubsan/sanitize-recover-7.c (dg-options): Add -w.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
343ae898
RB
12017-06-19 Richard Biener <rguenther@suse.de>
2
3 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
4 negated _Literals to parse _Literal (int) -1.
5
45b2222a
ML
62017-06-13 Martin Liska <mliska@suse.cz>
7
8 PR sanitize/78204
9 * c-convert.c (convert): Use sanitize_flags_p.
10 * c-decl.c (grokdeclarator): Likewise.
11 * c-typeck.c (convert_for_assignment): Likewise.
12 (c_finish_return): Likewise.
13 (build_binary_op): Likewise.
14
8ab7005b
JJ
152017-06-08 Jakub Jelinek <jakub@redhat.com>
16
17 PR c/81006
18 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
19 to sizetype before size_binop.
20
363dc72c
JJ
212017-06-07 Jakub Jelinek <jakub@redhat.com>
22
23 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
24 of TDI_generic.
25
dc949728
MP
262017-06-06 Marek Polacek <polacek@redhat.com>
27
28 PR c/79983
29 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
30 ref.
31 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
32
40ffd95f
BE
332017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
34
35 * c-parser.c (c_parser_binary_expression): Implement the
36 -Wsizeof_pointer_div warning.
37 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
38 from a parenthesized expression.
39 (c_parser_expr_list): Use c_last_sizeof_loc.
40 * c-tree.h (c_last_sizeof_loc): New external.
41 * c-typeck.c (c_last_sizeof_loc): New variable.
42 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
43
9fc5e7a4
MM
442017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
45
46 PR testsuite/80580
47 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
48
f012c8ef
DM
492017-05-30 David Malcolm <dmalcolm@redhat.com>
50
51 * c-objc-common.c (c_tree_printer): Gain bool and const char **
52 parameters.
53
3cd211af
MS
542017-05-24 Martin Sebor <msebor@redhat.com>
55
56 PR c/80731
57 * c-fold.c (c_fully_fold_internal): Adjust.
58 * c-typeck.c (parser_build_unary_op): Adjust.
59
fd71a9a2
TS
602017-05-23 Thomas Schwinge <thomas@codesourcery.com>
61
62 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
63 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
64 "VECTOR_LENGTH".
65
92fa0f9e
MP
662017-05-23 Marek Polacek <polacek@redhat.com>
67
68 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
69 quotes.
70
d11c168a
JJ
712017-05-22 Jakub Jelinek <jakub@redhat.com>
72
73 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
74 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
75 it returned invariant. Call tree_invariant_p unconditionally
76 afterwards to decide whether to return expr or op0.
77
58aca9d9
NS
782017-05-22 Nathan Sidwell <nathan@acm.org>
79
80 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
81
7fd549d2
TS
822017-05-19 Thomas Schwinge <thomas@codesourcery.com>
83
84 * c-parser.c (c_parser_omp_clause_default): Handle
85 "OMP_CLAUSE_DEFAULT_PRESENT".
86
6ecd2339
BE
872017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
88
89 * config-lang.in (gtfiles): Add c-family/c-format.c.
90
8a57ecff
NS
912017-05-18 Nathan Sidwell <nathan@acm.org>
92
93 * c-decl.c (pushdecl_top_level): Delete unused function.
94
6574d78e
MP
952017-05-18 Marek Polacek <polacek@redhat.com>
96
97 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
98 (check_earlier_gotos): Likewise.
99 (define_label): Likewise.
100 (pending_xref_error): Likewise.
101 (smallest_type_quals_location): Likewise.
102 (grokdeclarator): Likewise.
103 (grokparms): Likewise.
104 (identifier_global_value): Likewise.
105 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
106 (find_init_member): Likewise.
107
e3455240
MP
1082017-05-18 Marek Polacek <polacek@redhat.com>
109
110 * c-decl.c (start_decl): Use false/true instead of 0/1.
111 (grokdeclarator): Likewise.
112 (finish_struct): Likewise.
113 (start_function): Change the return type to bool. Use false/true
114 instead of 0/1.
115 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
116 * c-tree.h (start_function): Update.
117 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
118 (set_designator): Change the return type to bool. Use false/true
119 instead of 0/1.
120
3fa8871b
MP
1212017-05-17 Marek Polacek <polacek@redhat.com>
122
123 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
124 * c-typeck.c: Likewise.
125
142473df
MP
1262017-05-17 Marek Polacek <polacek@redhat.com>
127
128 PR sanitizer/80659
129 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
130 DECL_IGNORED_P even for non-static compound literals.
131
1a817418
ML
1322017-05-17 Martin Liska <mliska@suse.cz>
133
134 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
135 use it instead of int type.
136
b2fa0a8b
MP
1372017-05-17 Marek Polacek <polacek@redhat.com>
138
139 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
140 call c_fully_fold.
141 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
142 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
143 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
144 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
145 save_expr.
146 (c_parser_conditional_expression): Likewise.
147 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
148 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
149 (process_init_element): Likewise.
150 (build_binary_op): Likewise.
151 (handle_omp_array_sections_1): Likewise.
152
1e47f02b
TS
1532017-05-12 Thomas Schwinge <thomas@codesourcery.com>
154
155 * c-parser.c (c_parser_omp_clause_num_gangs)
156 (c_parser_omp_clause_num_workers)
157 (c_parser_omp_clause_vector_length): Merge functions into...
158 (c_parser_oacc_single_int_clause): ... this new function. Adjust
159 all users.
160
c24e924f
NS
1612017-05-11 Nathan Sidwell <nathan@acm.org>
162
163 * gimple-parser.c: Don't #include tree-dump.h.
164
c587104e
MM
1652017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
166
167 PR testsuite/80580
168 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
169
67ac9a9d
MM
1702017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
171
172 PR testsuite/80580
173 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
174 incorrect __MEM syntax.
175
ac4eb40f
MM
1762017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
177
178 PR testsuite/80580
179 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
180 type of unary '*'.
181
641da50a
NS
1822017-05-09 Nathan Sidwell <nathan@acm.org>
183
184 * c-tree.h (pushdecl): Declare.
185
56d35585
DM
1862017-05-05 David Malcolm <dmalcolm@redhat.com>
187
188 * c-decl.c (warn_defaults_to): Replace report_diagnostic
189 with diagnostic_report_diagnostic.
190 * c-errors.c (pedwarn_c99): Likewise.
191 (pedwarn_c90): Likewise.
192
815d9cc6
XR
1932017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
194
195 PR c++/80038
196 * c-gimplify.c (c_gimplify_expr): Remove calls to
197 cilk_gimplifY_call_params_in_spawned_fn.
198
1c4ea66f
DM
1992017-04-25 David Malcolm <dmalcolm@redhat.com>
200
201 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
202 hint for removing extra semicolon.
203
666f7903
JJ
2042017-04-21 Jakub Jelinek <jakub@redhat.com>
205
206 PR c/80468
207 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
208 enabled, set specs->type to integer_type_node.
209
5764ee3c
JW
2102017-04-03 Jonathan Wakely <jwakely@redhat.com>
211
212 * c-array-notation.c: Fix typo in comment.
213
10fa8dfb
MP
2142017-03-29 Marek Polacek <polacek@redhat.com>
215
216 PR c/79730
217 * c-decl.c (finish_decl): Check VAR_P.
218
a9e4a1a5
JJ
2192017-03-27 Jakub Jelinek <jakub@redhat.com>
220
221 PR middle-end/80162
222 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
223 * c-typeck.c (c_mark_addressable): Likewise. Look through
224 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
225 to ARRAY_TYPE.
226 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
227
ee3ff394
MP
2282017-03-23 Marek Polacek <polacek@redhat.com>
229
230 * c-tree.h: Remove a C_RID_YYCODE reference.
231
4d1b8e70
JJ
2322017-03-21 Jakub Jelinek <jakub@redhat.com>
233
234 PR c/80097
235 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
236 optional COMPOUND_EXPR with ubsan instrumentation.
237
31dc71a8
MP
2382017-03-17 Marek Polacek <polacek@redhat.com>
239
240 * c-parser.c: Add C11 references.
241
d579c385
MP
2422017-03-15 Marek Polacek <polacek@redhat.com>
243
244 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
245
85059a38
MP
2462017-03-11 Marek Polacek <polacek@redhat.com>
247
248 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
249
2f6f187a
DM
2502017-03-10 David Malcolm <dmalcolm@redhat.com>
251
252 PR translation/79848
253 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
254 "%qs".
255 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
256
36618428
MP
2572017-03-09 Marek Polacek <polacek@redhat.com>
258
259 PR sanitizer/79757
260 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
261 parameter declarations with initializers.
262
01e5af5a
JJ
2632017-03-09 Jakub Jelinek <jakub@redhat.com>
264
265 PR c/79969
266 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
267 TYPE_STUB_DECL.
268
a71dbc63
JJ
2692017-03-07 Jakub Jelinek <jakub@redhat.com>
270
271 PR c/79834
272 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
273 for "may only be used in compound statements" diagnostics, change it
274 such that the same translatable string is used for all pragmas. For
275 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
276 diagnostics.
277 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
278 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
279 "may only be used in compound statements" diagnostics, such that the
280 same translatable string is used for all pragmas.
281
1ff4bae6
MP
2822017-03-04 Marek Polacek <polacek@redhat.com>
283
284 PR c/79847
285 * c-decl.c (implicit_decl_warning): Add missing space.
286
7f5a7d78
MP
2872017-03-03 Marek Polacek <polacek@redhat.com>
288
289 PR c/79758
290 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
291 current_function_prototype_arg_types is error_mark_node. Fix
292 formatting. Use TREE_VALUE instead of TREE_TYPE.
293
883c8f06
JJ
2942017-03-03 Jakub Jelinek <jakub@redhat.com>
295
79c9b7a8
JJ
296 PR c/79837
297 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
298 %<min%> or %<max%> in the diagnostics, instead mention identifier.
299 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
300 diagnostics.
301
883c8f06
JJ
302 PR c/79836
303 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
304 instead of %<_Generic>.
305 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
306 (c_parser_omp_target_exit_data): Use %<release%> instead of
307 %<release>.
308
324ff1a0
JJ
3092017-02-28 Jakub Jelinek <jakub@redhat.com>
310
311 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
312 instead of just cond ? "..." : "...".
313 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
314 for "enter"/"exit" keyword.
315 (c_finish_oacc_routine): Don't use %s to supply portions of the
316 message.
317
4227c9ad
JJ
3182017-02-24 Jakub Jelinek <jakub@redhat.com>
319
320 PR c++/79588
321 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
322 handle -Wrestrict here.
323 * c-typeck.c (build_function_call_vec): Adjust
324 check_function_arguments caller.
325
5d972e66
RB
3262017-02-23 Richard Biener <rguenther@suse.de>
327
328 PR c/79684
329 * gimple-parser.c (c_parser_gimple_statement): Use set_error
330 to initialize c_exprs to return.
331 (c_parser_gimple_binary_expression): Likewise.
332 (c_parser_gimple_unary_expression): Likewise.
333 (c_parser_gimple_postfix_expression): Likewise.
334
61ac5ebe
MP
3352017-02-22 Marek Polacek <polacek@redhat.com>
336
337 PR c/79662
338 * c-typeck.c (convert_arguments): Handle error_mark_node.
339
41d1b0b1
PK
3402017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
341
342 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
343 value of c_parser_parse_ssa_name against error_mark_node and emit
344 error if ssa name is anonymous and written as default definition.
345
eab1f169
PK
3462017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
347
348 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
349 FMA_EXPR.
350
bcac0b4d
JJ
3512017-02-16 Jakub Jelinek <jakub@redhat.com>
352
353 PR c++/79512
354 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
355 ignore #pragma omp target even when not followed by identifier.
356
1be33173
PK
3572017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
358
359 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
360 (c_parser_gimple_unary_expression): Likewise.
361
aa326bfb
JJ
3622017-02-13 Jakub Jelinek <jakub@redhat.com>
363
364 * c-parser.c (c_parser_oacc_declare): Add missing space in
365 diagnostics.
366
8a398bc5
PK
3672017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
368
369 PR c/79478
370 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
371 set_c_expr_source_range when parsing ssa-name.
372
3dcde5ef
PG
3732017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
374 Richard Biener <rguenther@suse.de>
375
376 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
377 building IL when arguments are error_mark_node.
378 (c_parser_gimple_unary_expression): Likewise.
379 (c_parser_gimple_if_stmt): Likewise.
380 (c_parser_gimple_switch_stmt): Likewise.
381 (c_parser_gimple_return_stmt): Likewise.
382 (c_parser_parse_ssa_name): When name lookup fails do not build
383 an SSA name. Use undeclared rather than not declared in error
384 reporting.
385
192b048b
MP
3862017-02-09 Marek Polacek <polacek@redhat.com>
387
388 PR c/79428
389 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
390 instead of c_parser_skip_until_found.
391
56f71478
JJ
3922017-02-09 Jakub Jelinek <jakub@redhat.com>
393
394 PR c/79431
395 * c-parser.c (c_parser_omp_declare_target): Don't invoke
396 symtab_node::get on automatic variables.
397
02889d23
CLT
3982016-02-09 Nathan Sidwell <nathan@codesourcery.com>
399 Chung-Lin Tang <cltang@codesourcery.com>
400
401 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
402 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
403 semantic checking.
404 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
405
7af4b20d
RB
4062017-02-07 Richard Biener <rguenther@suse.de>
407
408 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
409 (c_parser_gimple_postfix_expression_after_primary):
410 Do not use c_build_function_call_vec to avoid folding and promotion.
411 Simplify.
412
e5e391d6
MO
4132017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
414
415 PR lto/79061
416 * c-decl.c (pop_scope): Pass main_input_filename to
417 build_translation_unit_decl.
418
c2e84327
DM
4192017-01-24 David Malcolm <dmalcolm@redhat.com>
420
421 * c-parser.c: Include "read-rtl-function.h" and
422 "run-rtl-passes.h".
423 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
424 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
425 production. Update for renaming of field "gimple_pass" to
426 "gimple_or_rtl_pass". If __RTL was seen, call
427 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
428 to an auto_timevar, to cope with early exit.
429 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
430 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
431 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
432 Handle RID_RTL.
433 (c_parser_parse_rtl_body): New function.
434 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
435 (struct c_declspecs): Rename field "gimple_pass" to
436 "gimple_or_rtl_pass". Add field "rtl_p".
437 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
438 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
439 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
440 (c_parser_gimple_or_rtl_pass_list): ...this.
441
2ebd93e1
MP
4422017-01-20 Marek Polacek <polacek@redhat.com>
443
444 PR c/64279
445 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
446
b1c95bb5
RB
4472017-01-13 Richard Biener <rguenther@suse.de>
448
449 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
450 nops.
451
25329913
RB
4522017-01-13 Richard Biener <rguenther@suse.de>
453
454 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
455 _Literal ( type-name ) number.
456
6bb4ea5c
RB
4572017-01-12 Richard Biener <rguenther@suse.de>
458
459 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
460 __MEM.
461
6b5b4e9c
JJ
4622017-01-11 Jakub Jelinek <jakub@redhat.com>
463
464 PR c++/72813
465 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
466 PCH file.
467
e3252775
RB
4682017-01-11 Richard Biener <rguenther@suse.de>
469
470 PR bootstrap/79052
471 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
472 returns on parse errors.
473
a9342885
MP
4742017-01-04 Marek Polacek <polacek@redhat.com>
475
476 PR c++/64767
477 * c-parser.c (c_parser_postfix_expression): Mark zero character
478 constants by setting original_type in c_expr.
479 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
480 with a zero character constant.
481 (char_type_p): New function.
482
5dd9a9d0
DM
4832017-01-04 David Malcolm <dmalcolm@redhat.com>
484
485 * c-parser.c (c_parser_declaration_or_fndef): Create a
486 rich_location at init_loc and parse it to start_init.
487 (last_init_list_comma): New global.
488 (c_parser_braced_init): Update last_init_list_comma when parsing
489 commas. Pass it to pop_init_level. Pass location of closing
490 brace to pop_init_level.
491 (c_parser_postfix_expression_after_paren_type): Create a
492 rich_location at type_loc and parse it to start_init.
493 (c_parser_omp_declare_reduction): Likewise for loc.
494 * c-tree.h (start_init): Add rich_location * param.
495 (pop_init_level): Add location_t param.
496 * c-typeck.c (struct initializer_stack): Add field
497 "missing_brace_richloc".
498 (start_init): Add richloc param, use it to initialize
499 the stack node's missing_brace_richloc.
500 (last_init_list_comma): New decl.
501 (finish_implicit_inits): Pass last_init_list_comma to
502 pop_init_level.
503 (push_init_level): When finding missing open braces, add fix-it
504 hints to the richloc.
505 (pop_init_level): Add "insert_before" param and pass it
506 when calling pop_init_level. Add fixits about missing
507 close braces to any richloc. Use the richloc for the
508 -Wmissing-braces warning.
509 (set_designator): Pass last_init_list_comma to pop_init_level.
510 (process_init_element): Likewise.
511
cbe34bb5
JJ
5122017-01-01 Jakub Jelinek <jakub@redhat.com>
513
514 Update copyright years.
515
d17680f3
JJ
5162016-12-21 Jakub Jelinek <jakub@redhat.com>
517
0dba7960
JJ
518 PR bootstrap/78817
519 * c-typeck.c (build_function_call_vec): If check_function_arguments
520 returns true, set TREE_NO_WARNING on CALL_EXPR.
521
d17680f3
JJ
522 PR c/77767
523 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
524 to *expr instead of overwriting it.
525
aa90531e
RB
5262016-12-20 Richard Biener <rguenther@suse.de>
527
528 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
529 error recovery.
530 (c_parser_gimple_statement): Only build assigns for non-error
531 stmts.
532 (c_parser_gimple_postfix_expression_after): Improve error recovery.
533
629b3d75
MJ
5342016-12-14 Martin Jambor <mjambor@suse.cz>
535
536 * c-parser.c: Include omp-general.h and omp-offload.h instead of
537 omp-low.h.
538 (c_finish_oacc_routine): Adjusted call to
539 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
540 to use their new names.
541 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
542 use its new name.
543 (c_parser_oacc_update): Likewise.
544 (c_parser_omp_simd): Likewise.
545 (c_parser_omp_target_update): Likewise.
546 * c-typeck.c: Include omp-general.h instead of omp-low.h.
547 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
548 name.
549 (c_finish_omp_cancellation_point): Likewise.
550 * gimple-parser.c: Do not include omp-low.h
551
c5af52eb
CP
5522016-12-02 Cesar Philippidis <cesar@codesourcery.com>
553 James Norris <jnorris@codesourcery.com>
554
555 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
556 EXIT_DATA,WAIT} are not used in compound statements.
557 (c_parser_oacc_enter_exit_data): Update diagnostics.
558
48330c93
BE
5592016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
560
561 PR c++/71973
562 * c-decl.c (diagnose_mismatched_decls): Use
563 OPT_Wbuiltin_declaration_mismatch here too.
564
899ca90e 5652016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
566 Alan Hayward <alan.hayward@arm.com>
567 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
568
569 * c-decl.c (merge_decls): Use SET_DECL_MODE.
570 (make_label, finish_struct): Likewise.
571
1ee62b92 5722016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 573 Richard Biener <rguenther@suse.de>
22b15758 574
8e745a17
JJ
575 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
576 * config-lang.in (gtfiles): Add c/c-parser.h.
577 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
578 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
579 * c-parser.c (enum c_id_kind, struct c_token,
580 c_parser_next_token_is, c_parser_next_token_is_not,
581 c_parser_next_token_is_keyword,
582 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
583 Split out to ...
584 * c-parser.h: ... new header.
585 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 586 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
587 c_token_starts_typename, c_parser_next_token_starts_declspecs,
588 c_parser_next_tokens_start_declaration, c_parser_consume_token,
589 c_parser_error, c_parser_require, c_parser_skip_until_found,
590 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
591 c_parser_type_name): Export.
592 (c_parser_tokens_buf): New function.
593 (c_parser_error): Likewise.
594 (c_parser_set_error): Likewise.
595 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
596 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
597 via c_parser_parse_gimple_body.
8e745a17
JJ
598 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
599 c_token_starts_typename, c_parser_next_token_starts_declspecs,
600 c_parser_next_tokens_start_declaration, c_parser_consume_token,
601 c_parser_error, c_parser_require, c_parser_skip_until_found,
602 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
603 c_parser_type_name): Declare.
1ee62b92
PG
604 (struct c_parser): Declare forward.
605 (c_parser_tokens_buf): Declare.
8e745a17
JJ
606 (c_parser_error): Likewise.
607 (c_parser_set_error): Likewise.
608 * gimple-parser.c: New file.
609 * gimple-parser.h: Likewise.
1ee62b92 610
22b15758
UB
6112016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
612
613 PR c/35503
614 * c-parser.c (c_parser_postfix_expression_after_primary): Call
615 warn_for_restrict.
616
84ff4775
LCW
6172016-09-11 Le-Chun Wu <lcwu@google.com>
618 Mark Wielaard <mjw@redhat.com>
619
620 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
621 to the given -Wshadow= variant.
622
4d0cdd0c
TP
6232016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
624
625 * c-typeck.c: Include memmodel.h.
626
1202f33e
JJ
6272016-10-13 Jakub Jelinek <jakub@redhat.com>
628
629 PR target/77957
630 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
631 instead of lhd_return_null_tree_v.
632
8a14afd0
BS
6332016-10-07 Bernd Schmidt <bschmidt@redhat.com>
634
635 PR c++/69733
636 * c-decl.c (smallest_type_quals_location): New static function.
637 (grokdeclarator): Try to find the correct location for an ignored
638 qualifier.
639
81fea426
MP
6402016-09-26 Marek Polacek <polacek@redhat.com>
641
642 PR c/7652
643 * c-decl.c (pop_scope): Add gcc_fallthrough.
644
6452016-09-26 Marek Polacek <polacek@redhat.com>
646
647 PR c/7652
648 * c-parser.c (struct c_token): Add flags field.
649 (c_lex_one_token): Pass it to c_lex_with_flags.
650 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
651 into IFN_FALLTHROUGH.
652 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
653 attribute fallthrough after a case label or default label.
654 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
655
9a2300e9
MP
6562016-09-24 Marek Polacek <polacek@redhat.com>
657
658 PR c/77490
659 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
660 have boolean value. Warn about ++/-- on booleans.
661
7de76362
JJ
6622016-09-23 Jakub Jelinek <jakub@redhat.com>
663
664 * c-parser.c (incomplete_record_decls): Remove unnecessary
665 = vNULL initialization of file scope vec.
666
5b73d2ab
MP
6672016-09-16 Marek Polacek <polacek@redhat.com>
668
669 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
670
e51fbec3
MP
6712016-09-14 Marek Polacek <polacek@redhat.com>
672
673 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
674 (fix_array_notation_expr): Likewise.
675 * c-decl.c (finish_decl): Likewise.
676 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
677 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
678 (function_to_pointer_conversion): Use false instead of 0.
679 (convert_lvalue_to_rvalue): Likewise.
680 (parser_build_unary_op): Likewise.
681 (build_atomic_assign): Likewise.
682 (build_unary_op): Change nonconvert parameter type to bool, use
683 true/false instead of 1/0.
684 (build_binary_op): Use true instead of 1.
685
254830ba
DM
6862016-09-13 David Malcolm <dmalcolm@redhat.com>
687
688 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
689 of add_fixit_insert to add_fixit_insert_before.
690
4c13ba17
MP
6912016-09-13 Marek Polacek <polacek@redhat.com>
692
693 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
694 it.
695
54dcdb88
BE
6962016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
697
698 PR c++/77496
699 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
700 COMPOUND_EXPR to warn_for_omitted_condop.
701
e5106e27
DM
7022016-09-07 David Malcolm <dmalcolm@redhat.com>
703
704 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
705 c_get_substring_location for this new langhook.
706
9dc5773f
JJ
7072016-09-02 Jakub Jelinek <jakub@redhat.com>
708
709 PR c/65467
710 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
711 flag_openmp.
712 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
713 instead of mark_exp_read on low_bound/length expression.
714 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
715 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
716 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
717 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
718 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
719 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
720 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
721 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
722 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
723 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
724 instead of mark_expr_read.
725 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
726 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
727 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
728 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
729 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
730 array section bases outside of depend clause, for depend clause
731 use convert_lvalue_to_rvalue on the base.
732 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
733 linear, aligned, map, to and from clauses.
734 (c_omp_clause_copy_ctor): New function.
735
295844f6
MP
7362016-09-01 Marek Polacek <polacek@redhat.com>
737
738 PR c/7652
739 * c-typeck.c (composite_type): Add FALLTHRU comment.
740
089af25c
DM
7412016-08-31 David Malcolm <dmalcolm@redhat.com>
742
743 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
744 to the insertion fixits for "struct", "union", and "enum".
745
f9087798
DM
7462016-08-30 David Malcolm <dmalcolm@redhat.com>
747
748 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
749 rather than add_fixit_misspelled_id.
750 (undeclared_variable): Likewise.
751 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
752 now-redundant "here" params from add_fixit_insert method calls.
753 (c_parser_parameter_declaration): Likewise.
754 * c-typeck.c (build_component_ref): Remove now-redundant range
755 param from add_fixit_replace method calls.
756
ebef225f
MP
7572016-08-25 Marek Polacek <polacek@redhat.com>
758
759 * c-typeck.c (parser_build_binary_op): Pass LHS to
760 warn_logical_not_parentheses.
761
fe377a48
MP
7622016-08-25 Marek Polacek <polacek@redhat.com>
763
764 PR c/77323
765 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
766 or _FloatN or _FloatNx is not supported.
767 (finish_declspecs): Set type to integer_type_node when _FloatN or
768 _FloatNx is not supported.
769
c65699ef
JM
7702016-08-19 Joseph Myers <joseph@codesourcery.com>
771
772 PR c/32187
773 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
774 (struct c_declspecs): Add field floatn_nx_idx.
775 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
776 and _FloatNx type specifiers.
777 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
778 (c_parser_declspecs, c_parser_attribute_any_word)
779 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
780 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
781 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
782 narrower than double.
783
2f1364c2
JJ
7842016-08-12 Jakub Jelinek <jakub@redhat.com>
785 Martin Liska <mliska@suse.cz>
786
787 PR c/67410
788 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
789 % to determine val element to change. Assert that
790 wchar_bytes * charwidth fits into val array.
791
191816a3
MP
7922016-08-12 Marek Polacek <polacek@redhat.com>
793
794 PR c/7652
795 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
796 (c_parser_postfix_expression): Likewise.
797 * c-typeck.c (build_unary_op): Adjust fall through comment.
798 (c_mark_addressable): Likewise.
799
b95a64bb
JJ
8002016-08-11 Jakub Jelinek <jakub@redhat.com>
801
802 PR c/72816
803 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
804 array member through typedef, for orig_qual_indirect == 0 clear
805 orig_qual_type.
806
895aa8e1
DM
8072016-08-08 David Malcolm <dmalcolm@redhat.com>
808
809 PR c/64955
810 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
811 this up to selftest::run_c_tests.
812 (selftest::run_c_tests): New function.
813
0b212d8c
TS
8142016-08-04 Thomas Schwinge <thomas@codesourcery.com>
815
ae9281fc
TS
816 * c-parser.c (struct oacc_routine_data): Add error_seen and
817 fndecl_seen members.
818 (c_finish_oacc_routine): Use these.
819 (c_parser_declaration_or_fndef): Adjust.
820 (c_parser_oacc_routine): Likewise. Support more C language
821 constructs, and improve diagnostics. Move pragma context
822 checking...
823 (c_parser_pragma): ... here.
824
0b212d8c
TS
825 * c-parser.c (struct oacc_routine_data): New.
826 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
827 Simplify code.
828 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
829 declare target" attribute.
830
76e2c821
JB
8312016-08-01 Jan Beulich <jbeulich@suse.com>
832
833 * c-fold.c (c_fully_fold_internal): Also emit shift count
834 warnings for vector types.
835 * c-typeck.c (build_binary_op): Likewise.
836
f618a472
MP
8372016-07-29 Marek Polacek <polacek@redhat.com>
838
839 PR c/71742
840 * c-decl.c (finish_struct): Rephrase an error message.
841
efd0786f
MP
842 PR c/71853
843 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
844 to error node for invalid code.
845
e00dceaf
MP
846 PR c/71573
847 * c-decl.c (implicitly_declare): Return decl early not only for
848 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
849
673a107a
JJ
8502016-07-29 Jakub Jelinek <jakub@redhat.com>
851
852 PR c/71969
853 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
854 on GNU extern inline functions.
855
a5b5c8b6
MP
8562016-07-29 Marek Polacek <polacek@redhat.com>
857
858 PR c/71583
859 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
860 check expr.value.
861
e3fe09c1
UB
8622016-07-22 Uros Bizjak <ubizjak@gmail.com>
863
864 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
865
7c8f7eaa
DM
8662016-07-20 David Malcolm <dmalcolm@redhat.com>
867
868 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
869 spellcheck-tree.h
870 (best_macro_match): Likewise, converting from a typedef to a
871 subclass.
872 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
873 (lookup_name_fuzzy): Update for change of best_macro_match to a
874 subclass with a ctor that calls cpp_forall_identifiers.
875
de6a69ee
DM
8762016-07-20 David Malcolm <dmalcolm@redhat.com>
877
878 * c-decl.c (implicit_decl_warning): Update for conversion of
879 return type of lookup_name_fuzzy to const char *.
880 (undeclared_variable): Likewise.
881 (lookup_name_fuzzy): Convert return type from tree to
882 const char *.
883 * c-parser.c (c_parser_declaration_or_fndef): Update for
884 conversion of return type of lookup_name_fuzzy to const char *.
885 (c_parser_parameter_declaration): Likewise.
886
b1c9c068
CP
8872016-07-15 Cesar Philippidis <cesar@codesourcery.com>
888
889 * c-parser.c (c_parser_oacc_declare): Don't scan for
890 GOMP_MAP_POINTER.
891 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
892 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
893 zero-length subarrays.
894
ddbbcb19
JJ
8952016-07-15 Jakub Jelinek <jakub@redhat.com>
896
897 PR c/71858
898 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
899 instead of FUZZY_LOOKUP_NAME.
900 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
901 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
902
dd36b877
JJ
9032016-07-14 Jakub Jelinek <jakub@redhat.com>
904
905 PR c/71858
906 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
907
8c681247
TS
9082016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
909
910 * c-parser.c (c_parser_generic_selection): Make type of variable
911 auto_vec.
912 (c_parser_omp_declare_simd): Likewise.
913
bf4fa671
TS
9142016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
915
916 * c-decl.c (struct c_struct_parse_info): Change member types
917 from vec to auto_vec.
918 (start_struct): Adjust.
919 (finish_struct): Likewise.
920
557e8c49
JJ
9212016-07-02 Jakub Jelinek <jakub@redhat.com>
922
923 PR c/71719
924 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
925
54d19c3b
TS
9262016-06-29 Thomas Schwinge <thomas@codesourcery.com>
927
928 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
929 Move pragma context checking into...
930 (c_parser_omp_cancellation_point): ... here, and improve
931 diagnostic messages.
932 * c-typeck.c (c_finish_omp_cancel)
933 (c_finish_omp_cancellation_point): Improve diagnostic messages.
934
152ef731
JJ
9352016-06-29 Jakub Jelinek <jakub@redhat.com>
936
937 PR c/71685
938 * c-typeck.c (c_build_qualified_type): Don't clear
939 C_TYPE_INCOMPLETE_VARS for the main variant.
940
9412016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
942
943 PR c/71552
944 * c-typeck.c (output_init_element): Diagnose incompatible types
945 before non-constant initializers.
946
e9ac1f86
JJ
9472016-06-28 Jakub Jelinek <jakub@redhat.com>
948
949 * Make-lang.in: Don't cat ../stage_current if it does not exist.
950
277d7ee0
AK
9512016-06-23 Andi Kleen <ak@linux.intel.com>
952
953 * Make-lang.in: Add support for autofdo.
954
1a4f11c8
DM
9552016-06-22 David Malcolm <dmalcolm@redhat.com>
956
957 PR c/70339
958 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
959 (implicit_decl_warning): When issuing warnings for implicit
960 declarations, attempt to provide a suggestion via
961 lookup_name_fuzzy.
962 (undeclared_variable): Likewise when issuing errors.
963 (lookup_name_in_scope): Likewise.
964 (struct edit_distance_traits<cpp_hashnode *>): New struct.
965 (best_macro_match): New typedef.
966 (find_closest_macro_cpp_cb): New function.
967 (lookup_name_fuzzy): New function.
968 * c-parser.c: Include gcc-rich-location.h.
969 (c_token_starts_typename): Split out case CPP_KEYWORD into...
970 (c_keyword_starts_typename): ...this new function.
971 (c_parser_declaration_or_fndef): When issuing errors about
972 missing "struct" etc, add a fixit. For other kinds of errors,
973 attempt to provide a suggestion via lookup_name_fuzzy.
974 (c_parser_parms_declarator): When looking ahead to detect typos in
975 type names, also reject CPP_KEYWORD.
976 (c_parser_parameter_declaration): When issuing errors about
977 unknown type names, attempt to provide a suggestion via
978 lookup_name_fuzzy.
979 * c-tree.h (c_keyword_starts_typename): New prototype.
980
5a578671
JM
9812016-06-20 Joseph Myers <joseph@codesourcery.com>
982
983 PR c/71601
984 * c-typeck.c (build_conditional_expr): Return error_mark_node if
985 c_common_type returns error_mark_node.
986
3f8257db 9872016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
988
989 PR c/69507
990 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
991 __alignof__ (expression).
992
6a3f203c
DM
9932016-06-14 David Malcolm <dmalcolm@redhat.com>
994
995 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
996
264757fb
DM
9972016-06-14 David Malcolm <dmalcolm@redhat.com>
998
999 * c-typeck.c (build_component_ref): Simplify fixit code by
1000 using gcc_rich_location::add_fixit_misspelled_id.
1001 (set_init_label): Likewise.
1002
f7e4f2e3
DM
10032016-06-13 David Malcolm <dmalcolm@redhat.com>
1004
1005 * c-parser.c (c_parser_initelt): Provide location of name for new
1006 location_t param of set_init_label.
1007 * c-tree.h (set_init_label): Add location_t param.
1008 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1009 param and use it when issuing error messages about unrecognized
1010 field names. Attempt to provide a fixit hint if appropriate,
1011 otherwise update the error message to provide the type name.
1012
4b1ffdb1
TS
10132016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1014
1015 PR c/71381
1016 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1017 Loosen checking.
1018
44a845ca
MS
10192016-06-08 Martin Sebor <msebor@redhat.com>
1020 Jakub Jelinek <jakub@redhat.com>
1021
1022 PR c++/70507
1023 PR c/68120
1024 * c-typeck.c (convert_arguments): Don't promote last argument
1025 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1026
92a5f2ba
MP
10272016-06-08 Marek Polacek <polacek@redhat.com>
1028
1029 PR c/71418
1030 * c-decl.c (grokdeclarator): Check TYPE_P.
1031
08203f73
MP
1032 PR c/71426
1033 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1034 code.
1035
6ffd47b7
DM
10362016-06-07 David Malcolm <dmalcolm@redhat.com>
1037
1038 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1039 and structure element reference, capture the location of the
1040 element name token and pass it to build_component_ref.
1041 (c_parser_postfix_expression_after_primary): Likewise for
1042 structure element dereference.
1043 (c_parser_omp_variable_list): Likewise for
1044 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1045 * c-tree.h (build_component_ref): Add location_t param.
1046 * c-typeck.c (build_component_ref): Add location_t param
1047 COMPONENT_LOC. Use it, if available, when issuing hints about
1048 mispelled member names to provide a fixit replacement hint.
1049
1f40cff3
MP
10502016-06-06 Marek Polacek <polacek@redhat.com>
1051
1052 PR c/71362
1053 * c-parser.c (c_parser_direct_declarator): Set location.
1054
5545a907
MP
10552016-06-06 Marek Polacek <polacek@redhat.com>
1056
1057 * c-typeck.c (comptypes_internal): Handle comparisons of
1058 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1059 TYPE_REF_CAN_ALIAS_ALL.
1060
b605f663
CLT
10612016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1062
1063 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1064 arguments as addressable when async clause exists.
1065
00631022
JJ
10662016-05-30 Jakub Jelinek <jakub@redhat.com>
1067
1068 PR c++/71349
1069 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1070 when combined with target construct.
1071
7211a097
JJ
10722016-05-26 Jakub Jelinek <jakub@redhat.com>
1073
1074 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1075 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1076
95efe6b6
MP
10772016-05-25 Marek Polacek <polacek@redhat.com>
1078
1079 PR c/71265
1080 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1081
a23faf7a
MP
1082 PR c/71266
1083 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1084
e46c7770
CP
10852016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1086
1087 * c-parser.c (c_parser_oacc_declare): Add support for
1088 GOMP_MAP_FIRSTPRIVATE_POINTER.
1089 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1090 argument with enum c_omp_region_type ort.
1091 (handle_omp_array_sections): Likewise. Update call to
1092 handle_omp_array_sections_1.
1093 (c_finish_omp_clauses): Add specific errors and warning messages for
1094 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1095 call to handle_omp_array_sections.
1096
a04e69c0
TS
10972016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1098
1099 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1100
f17a223d
RB
11012016-05-24 Richard Biener <rguenther@suse.de>
1102
1103 PR middle-end/70434
1104 PR c/69504
1105 * c-typeck.c (build_array_ref): Do not complain about indexing
1106 non-lvalue vectors. Adjust for function name change.
1107
79063edd
MS
11082016-05-20 Martin Sebor <msebor@redhat.com>
1109
1110 PR c/71115
1111 * c-typeck.c (error_init): Use
1112 expansion_point_location_if_in_system_header.
1113 (warning_init): Same.
1114
8a40fef3
DM
11152016-05-19 David Malcolm <dmalcolm@redhat.com>
1116
1117 PR c/71171
1118 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1119 in error-handling.
1120 (c_parser_postfix_expression): Likewise.
1121 * c-tree.h (c_expr::set_error): New method.
1122 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1123 that result's range is initialized.
1124
e9892350
JG
11252016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1126
1127 * c-typeck.c (parser_build_unary_op): Fix formatting.
1128
8fad45f5
MW
11292016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1130
1131 * c-decl.c (grokdeclarator): Remove errmsg and use of
1132 targetm.invalid_return_type.
1133 (grokparms): Remove errmsg and use of
1134 targetm.invalid_parameter_type.
1135
aa4b467b
JM
11362016-05-13 Joseph Myers <joseph@codesourcery.com>
1137
1138 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1139 function return type.
1140
4f2e1536
MP
11412016-05-12 Marek Polacek <polacek@redhat.com>
1142
1143 PR c/70756
1144 * c-decl.c (build_compound_literal): Pass LOC down to
1145 c_incomplete_type_error.
1146 * c-tree.h (require_complete_type): Adjust declaration.
1147 (c_incomplete_type_error): Likewise.
1148 * c-typeck.c (require_complete_type): Add location parameter, pass it
1149 down to c_incomplete_type_error.
1150 (c_incomplete_type_error): Add location parameter, pass it down to
1151 error_at.
1152 (build_component_ref): Pass location down to c_incomplete_type_error.
1153 (default_conversion): Pass location down to require_complete_type.
1154 (build_array_ref): Likewise.
1155 (build_function_call_vec): Likewise.
1156 (convert_arguments): Likewise.
1157 (build_unary_op): Likewise.
1158 (build_c_cast): Likewise.
1159 (build_modify_expr): Likewise.
1160 (convert_for_assignment): Likewise.
1161 (c_finish_omp_clauses): Likewise.
1162
d6e83a8d
MM
11632016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1164
1165 PR c/43651
1166 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1167 is enabled.
1168 * c-errors.c (pedwarn_c90): Return true if warned.
1169 * c-tree.h (pedwarn_c90): Change return type to bool.
1170 (enum c_declspec_word): Add new enumerator cdw_atomic.
1171
5c3a10fb
MP
11722016-05-11 Marek Polacek <polacek@redhat.com>
1173
1174 PR c++/71024
1175 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1176 diagnose_mismatched_attributes and call it.
1177
cf68d92c
MP
11782016-05-10 Marek Polacek <polacek@redhat.com>
1179
1180 PR c/70255
1181 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1182 on a declaration following the definition.
1183
351f85c5
JJ
11842016-05-05 Jakub Jelinek <jakub@redhat.com>
1185
1186 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1187 parse it through to c_parser_c99_block_statement.
1188 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1189 caller.
1190
deef7113
MP
11912016-05-04 Marek Polacek <polacek@redhat.com>
1192
1193 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1194 OPT_Wdangling_else.
1195
de55efd5
MP
11962016-05-04 Marek Polacek <polacek@redhat.com>
1197
1198 PR c/48778
1199 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1200 for macro expansions.
1201
79ce98bc
MP
12022016-05-03 Marek Polacek <polacek@redhat.com>
1203
1204 PR c/70859
1205 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1206 check_builtin_function_arguments.
1207
fb2647aa
RB
12082016-05-03 Richard Biener <rguenther@suse.de>
1209
1210 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1211 the checksum from the previous stage.
1212
77886428
CP
12132016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1214
1215 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1216 c_finish_omp_clauses.
1217 (c_parser_omp_all_clauses): Likewise.
1218 (c_parser_oacc_cache): Likewise.
1219 (c_parser_oacc_loop): Likewise.
1220 (omp_split_clauses): Likewise.
1221 (c_parser_omp_declare_target): Likewise.
1222 (c_parser_cilk_all_clauses): Likewise.
1223 (c_parser_cilk_for): Likewise.
1224 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1225 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1226
7176a4a0
MP
12272016-05-02 Marek Polacek <polacek@redhat.com>
1228
1229 PR c/70851
1230 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1231 incomplete type.
1232
e7ff0319
CP
12332016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1234
1235 PR middle-end/70626
1236 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1237 OACC_LOOP_CLAUSE_MASK.
1238 (c_parser_oacc_kernels_parallel): Update call to
1239 c_oacc_split_loop_clauses.
1240
9f405ce1
AM
12412016-04-28 Andrew MacLeod <amacleod@redhat.com>
1242
1243 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1244 argument to build_modify_expr in two cases.
1245
c1e1f433
BS
12462016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1247
1248 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1249 warn_for_memset instead of warning directly here.
1250
2448a956
MP
12512016-04-26 Marek Polacek <polacek@redhat.com>
1252
1253 PR c/67784
1254 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1255 out of ...
1256 (c_parser_for_statement): ... here.
1257 (c_parser_if_statement): Use it.
1258 (c_parser_switch_statement): Use it.
1259 (c_parser_while_statement): Use it.
1260
b02a5e26
MP
1261 PR c/70791
1262 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1263
477d4906
IV
12642016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1265
1266 PR c++/69363
1267 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1268 instead of c_finish_cilk_clauses.
1269 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1270 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1271 floating-point variables in the linear clause for Cilk Plus.
1272
fe37c7af
MM
12732016-04-18 Michael Matz <matz@suse.de>
1274
1275 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1276 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1277
949505a9
MP
12782016-04-15 Marek Polacek <polacek@redhat.com>
1279
1280 PR c/70671
1281 * c-typeck.c (build_unary_op): Pass location down to error and
1282 warning call.
1283
dda1bf61
JJ
12842016-04-15 Jakub Jelinek <jakub@redhat.com>
1285
1286 PR c/70436
1287 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1288 where needed.
1289 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1290 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1291 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1292 Adjust c_parser_pragma callers.
1293 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1294 caller.
1295 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1296 c_parser_statement.
1297 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1298 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1299 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1300 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1301 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1302 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1303 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1304 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1305 down where needed.
1306 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1307 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1308 calls.
1309
99cd9857
MP
13102016-04-13 Marek Polacek <polacek@redhat.com>
1311
1312 PR c/70436
1313 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1314 adjust callers.
1315 (c_parser_statement): Likewise.
1316 (c_parser_c99_block_statement): Likewise.
1317 (c_parser_while_statement): Likewise.
1318 (c_parser_for_statement): Likewise.
1319 (c_parser_if_body): Don't set IF_P here.
1320 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1321 about dangling else here.
1322 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1323 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1324 warn about dangling else here.
1325
f13355da
MP
13262016-04-04 Marek Polacek <polacek@redhat.com>
1327
1328 PR c/70307
1329 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1330
5fde6a45
MP
13312016-03-31 Marek Polacek <polacek@redhat.com>
1332
1333 PR c/70297
1334 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1335
4bbf545b
DM
13362016-03-18 David Malcolm <dmalcolm@redhat.com>
1337
1338 PR c/70281
1339 * c-parser.c (c_parser_postfix_expression): Set the source range
1340 for uses of "__builtin_types_compatible_p".
1341
fcc2b74f
JJ
13422016-03-17 Jakub Jelinek <jakub@redhat.com>
1343
1344 PR c/70280
1345 * c-typeck.c (composite_type): Don't count void_list_node
1346 into len, if the list is terminated by void_list_node, start
1347 with void_list_node instead of NULL for newargs. Stop
1348 at void_list_node.
1349
ab4c578f
MP
13502016-03-16 Marek Polacek <polacek@redhat.com>
1351
1352 PR c/70093
1353 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1354 nested functions returning VM types.
1355
96b3c82d
CP
13562016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1357
1358 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1359 when calling c_finish_omp_clauses.
1360
29b9828f
BS
13612016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1362
1363 PR c/69824
1364 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1365 for later.
1366
7ff6ca38
MP
13672016-03-04 Marek Polacek <polacek@redhat.com>
1368
1369 PR c/69798
1370 * c-parser.c (c_parser_postfix_expression): Call
1371 c_parser_cast_expression rather than c_parser_postfix_expression.
1372
686e2237
JJ
13732016-03-01 Jakub Jelinek <jakub@redhat.com>
1374
1375 PR c/69796
1376 PR c/69974
1377 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1378 of incomplete decls to error_mark_node.
1379
0b05329b
MP
13802016-02-24 Marek Polacek <polacek@redhat.com>
1381
1382 PR c/69819
1383 * c-decl.c (finish_decl): Don't update the copy of the type of a
1384 different decl type.
1385
067fbd8b
JJ
13862016-02-23 Jakub Jelinek <jakub@redhat.com>
1387
1388 PR objc/69844
1389 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1390 in id_kind reclassification.
1391
bf14eba2
JJ
13922016-02-16 Jakub Jelinek <jakub@redhat.com>
1393
1394 PR c/69835
1395 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1396
ba539195
JN
13972016-02-16 James Norris <jnorris@codesourcery.com>
1398
1399 PR c/64748
1400 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1401
16595a1f
BS
14022016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1403
f48dfe98
BS
1404 * c-decl.c (build_null_declspecs): Zero the entire struct.
1405
16595a1f
BS
1406 PR c/69522
1407 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1408 callers changed. If nested_p is true, use it to call
1409 finish_implicit_inits.
1410 * c-tree.h (finish_implicit_inits): Declare.
1411 * c-typeck.c (finish_implicit_inits): New function. Move code
1412 from ...
1413 (push_init_level): ... here.
1414 (set_designator, process_init_element): Call finish_implicit_inits.
1415
66756373
JJ
14162016-02-11 Jakub Jelinek <jakub@redhat.com>
1417
1418 PR c/69768
1419 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1420 arguments for -Waddress warning.
1421
1066e9b5
JJ
14222016-02-04 Jakub Jelinek <jakub@redhat.com>
1423
1424 PR c/69669
1425 * c-decl.c (finish_enum): When honoring mode attribute,
1426 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1427
3a5d2ba4
JJ
14282016-01-29 Jakub Jelinek <jakub@redhat.com>
1429
1430 PR debug/69518
1431 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1432 all type variants, not just TYPE_MAIN_VARIANT.
1433
cbdd8ae0
JJ
14342016-01-27 Jakub Jelinek <jakub@redhat.com>
1435
1436 PR debug/66869
1437 * c-decl.c (c_write_global_declarations_1): Warn with
1438 warn_unused_function if static prototype without definition
1439 is not C_DECL_USED.
1440
fa74a4bc
MP
14412016-01-27 Marek Polacek <polacek@redhat.com>
1442
1443 PR c/68062
1444 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1445 to unsigned, if needed. Add -Wsign-compare warning.
1446
13f92e8d
JJ
14472016-01-26 Jakub Jelinek <jakub@redhat.com>
1448
1449 PR tree-optimization/69483
1450 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1451
cd8e73dc 14522016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1453
1454 PR c/24293
1455 * c-tree.h (incomplete_record_decls): Declare.
1456 * c-parser.c (incomplete_record_decls): Define.
1457 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1458 report error if any decl has zero size.
1459 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1460 or enum type to incomplete_record_decls.
1461
e6d6ec9e
TV
14622016-01-14 Tom de Vries <tom@codesourcery.com>
1463
1464 PR tree-optimization/68773
1465 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1466 set force_output.
1467
00083992
MP
14682016-01-14 Marek Polacek <polacek@redhat.com>
1469
1470 PR c/69262
1471 * c-decl.c (grokdeclarator): Provide more information for invalid
1472 array declarations.
1473
7443cf13
DM
14742016-01-06 David Malcolm <dmalcolm@redhat.com>
1475
1476 * c-parser.c (c_parser_unary_expression): For dereferences, build
1477 a combined location before calling build_indirect_ref, so that
1478 error reports cover the full range, manually updating the c_expr
1479 src_range.
1480
6b131d5b
MP
14812016-01-06 Marek Polacek <polacek@redhat.com>
1482
1483 PR sanitizer/69099
1484 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1485 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1486 NULL.
1487
818ab71a
JJ
14882016-01-04 Jakub Jelinek <jakub@redhat.com>
1489
1490 Update copyright years.
1491
2fe0a208
MP
14922016-01-04 Marek Polacek <polacek@redhat.com>
1493
1494 PR c/68908
1495 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1496 optimization to use __atomic_fetch_* built-in if possible.
1497
c7b48c8a
TS
14982015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1499
1500 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1501 into...
1502 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1503 all users.
1504
fda5652f
MP
15052015-12-22 Marek Polacek <polacek@redhat.com>
1506
1507 PR c/69002
1508 * c-typeck.c (build_component_ref): Warn when acessing elements of
1509 atomic structures or unions.
1510
745e411d
DM
15112015-12-21 David Malcolm <dmalcolm@redhat.com>
1512
1513 * c-typeck.c: Include "gcc-rich-location.h".
1514 (build_binary_op): In the two places that call binary_op_error,
1515 create a gcc_rich_location and populate it with the location of
1516 the binary op and its two operands.
1517
94c40e19
DM
15182015-12-16 David Malcolm <dmalcolm@redhat.com>
1519
1520 * c-parser.c (c_parser_statement_after_labels): When calling
1521 c_finish_return, Use the return expression's location if it has
1522 one, falling back to the location of the first token within it.
1523 * c-typeck.c (c_finish_return): When issuing warnings about
1524 the incorrect presence/absence of a return value, issue a note
1525 showing the declaration of the function.
1526
de67c4c3
DM
15272015-12-16 David Malcolm <dmalcolm@redhat.com>
1528
1529 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1530 to 4.
1531 (c_parser_peek_nth_token): New function.
1532 (c_parser_peek_conflict_marker): New function.
1533 (c_parser_error): Detect conflict markers and report them as such.
1534
a10704e1
DM
15352015-12-16 David Malcolm <dmalcolm@redhat.com>
1536
1537 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1538 to preserve range information for the primary expression
1539 in the call to c_parser_postfix_expression_after_primary.
1540
8062bca6
DM
15412015-12-16 David Malcolm <dmalcolm@redhat.com>
1542
1543 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1544 expression location, falling back on the first token location,
1545 rather than always using the latter.
1546
d06f8b75
MP
15472015-12-16 Marek Polacek <polacek@redhat.com>
1548
1549 PR c/64637
1550 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1551 available.
1552
2994fb91
MP
15532015-12-15 Marek Polacek <polacek@redhat.com>
1554
1555 PR c/68907
1556 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1557 artificial decl.
1558
a1b93f8d
DM
15592015-12-08 David Malcolm <dmalcolm@redhat.com>
1560
1561 * c-parser.c (c_parser_alignof_expression): Capture location of
1562 closing parenthesis (if any), or of end of unary expression, and
1563 use it to build a src_range for the expression.
1564
46c6e1e2
DM
15652015-12-08 David Malcolm <dmalcolm@redhat.com>
1566
1567 PR c/68757
1568 * c-parser.c (c_parser_get_builtin_args): Add
1569 "out_close_paren_loc" param, and write back to it.
1570 (c_parser_postfix_expression): Capture the closing
1571 parenthesis location for RID_CHOOSE_EXPR,
1572 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1573 RID_BUILTIN_SHUFFLE and use it to set the source range
1574 for such expressions; within RID_BUILTIN_COMPLEX set
1575 the underlying location.
1576
66189108
MP
15772015-12-07 Marek Polacek <polacek@redhat.com>
1578
1579 PR c/68668
1580 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1581 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1582
f187980b
EB
15832015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1584
1585 * c-tree.h (c_build_va_arg): Adjust prototype.
1586 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1587 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1588 parameter, adjust throughout and issue an error if EXPR is a component
1589 with reverse storage order.
1590
4250754e
JM
15912015-12-02 Jason Merrill <jason@redhat.com>
1592
1593 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1594 (c_fully_fold_internal, decl_constant_value_for_optimization):
1595 Move from c-common.c.
1596 * c-tree.h: Declare decl_constant_value_for_optimization.
1597 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1598
e9e32ee6
JM
15992015-12-02 Joseph Myers <joseph@codesourcery.com>
1600
1601 PR c/68162
1602 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1603 following link from declarator to next declarator. Track original
1604 qualified type and pass it to c_build_qualified_type.
1605 * c-typeck.c (c_build_qualified_type): Add arguments
1606 orig_qual_type and orig_qual_indirect.
1607
ff7a55bf
TS
16082015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1609
1610 * c-parser.c (c_parser_omp_clause_name)
1611 (c_parser_oacc_all_clauses): Alphabetical sorting.
1612
657e4e47
JJ
16132015-12-02 Jakub Jelinek <jakub@redhat.com>
1614
1615 PR c/68533
1616 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1617 for diagnostics.
1618
37d5ad46
JB
16192015-12-01 Julian Brown <julian@codesourcery.com>
1620 Cesar Philippidis <cesar@codesourcery.com>
1621 James Norris <James_Norris@mentor.com>
1622
1623 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1624 (c_parser_oacc_clause_use_device): New function.
1625 (c_parser_oacc_all_clauses): Add use_device support.
1626 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1627 (c_parser_oacc_host_data): New function.
1628 (c_parser_omp_construct): Add host_data support.
1629 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1630 * c-typeck.c (c_finish_oacc_host_data): New function.
1631 (c_finish_omp_clauses): Add use_device support.
1632
a4850ce9
JH
16332015-11-29 Jan Hubicka <hubicka@ucw.cz>
1634
1635 PR c/67106
1636 * c-decl.c: Set TYPE_PACKED in variants.
1637
b58d3df2
ML
16382015-11-27 Martin Liska <mliska@suse.cz>
1639
1640 PR c++/68312
1641 * c-array-notation.c (fix_builtin_array_notation_fn):
1642 Use release_vec_vec instead of vec::release.
1643 (build_array_notation_expr): Likewise.
1644 (fix_conditional_array_notations_1): Likewise.
1645 (fix_array_notation_expr): Likewise.
1646 (fix_array_notation_call_expr): Likewise.
1647
aec17bfe
JJ
16482015-11-27 Jakub Jelinek <jakub@redhat.com>
1649
1650 PR c/63326
1651 * c-parser.c (c_parser_compound_statement_nostart): If
1652 last_label is true, use pragma_stmt instead of pragma_compound
1653 as second c_parser_pragma argument.
1654 (c_parser_omp_ordered, c_parser_omp_target_update,
1655 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1656 false as second argument to c_parser_skip_to_pragma_eol after
1657 diagnosing standalone directives used in pragma_stmt context.
1658
688c4de0
IV
16592015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1660
1661 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1662 with "if (ENABLE_OFFLOADING)".
1663
cbd03aee
DM
16642015-11-23 David Malcolm <dmalcolm@redhat.com>
1665
1666 PR objc/68438
1667 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1668 for various Objective-C constructs: Class.name syntax,
1669 @selector(), @protocol(), @encode(), and [] message syntax.
1670
a87a86e1
DM
16712015-11-20 David Malcolm <dmalcolm@redhat.com>
1672
1673 PR 62314
1674 * c-typeck.c (should_suggest_deref_p): New function.
1675 (build_component_ref): Special-case POINTER_TYPE when
1676 generating a "not a structure of union" error message, and
1677 suggest a "->" rather than a ".", providing a fix-it hint.
1678
8ece8dfb
DM
16792015-11-19 David Malcolm <dmalcolm@redhat.com>
1680
1681 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1682 candidate into a new function, find_closest_identifier.
1683
433068cc
MP
16842015-11-19 Marek Polacek <polacek@redhat.com>
1685
1686 PR c/68412
1687 * c-typeck.c (parser_build_binary_op): Properly handle
1688 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1689
bef08b71
DM
16902015-11-17 David Malcolm <dmalcolm@redhat.com>
1691
1692 * c-parser.c (set_c_expr_source_range): Bulletproof both
1693 overloaded implementations against NULL expr->value.
1694 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1695 values.
1696 (c_parser_unary_expression): Likewise when handling addresses of
1697 labels.
1698 (c_parser_postfix_expression): Likewise for statement expressions,
1699 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1700 __builtin_va_arg, and for __builtin_offset_of.
1701 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1702 src_range using the range of the braced initializer.
1703 (c_parser_transaction_expression): Set src_range for "ret" to a
1704 sane pair of values.
1705
fff77217
KY
17062015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1707
1708 * c-parser.c (c_finish_omp_declare_simd): Look for
1709 "simd" attribute as well. Update error message.
1710
1d899da2
TS
17112015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1712
1713 * c-parser.c (c_parser_omp_declare_target): Adjust.
1714
e4606348
JJ
17152015-11-14 Jakub Jelinek <jakub@redhat.com>
1716
1717 * c-typeck.c (c_finish_omp_clauses): Don't mark
1718 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1719
3e636daf
MP
17202015-11-14 Marek Polacek <polacek@redhat.com>
1721
1722 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1723 * c-typeck.c: Likewise.
1724
ebedc9a3
DM
17252015-11-13 David Malcolm <dmalcolm@redhat.com>
1726
1727 * c-decl.c (warn_defaults_to): Pass line_table to
1728 rich_location ctor.
1729 * c-errors.c (pedwarn_c99): Likewise.
1730 (pedwarn_c90): Likewise.
1731 * c-parser.c (set_c_expr_source_range): New functions.
1732 (c_token::get_range): New method.
1733 (c_token::get_finish): New method.
1734 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1735 based on the range from the start of the LHS to the end of the
1736 RHS.
1737 (c_parser_conditional_expression): Likewise, based on the range
1738 from the start of the cond.value to the end of exp2.value.
1739 (c_parser_binary_expression): Call set_c_expr_source_range on
1740 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1741 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1742 based on the cast_loc through to the end of the expr.
1743 (c_parser_unary_expression): Likewise, based on the
1744 op_loc through to the end of op.
1745 (c_parser_sizeof_expression) Likewise, based on the start of the
1746 sizeof token through to either the closing paren or the end of
1747 expr.
1748 (c_parser_postfix_expression): Likewise, using the token range,
1749 or from the open paren through to the close paren for
1750 parenthesized expressions.
1751 (c_parser_postfix_expression_after_primary): Likewise, for
1752 various kinds of expression.
1753 * c-tree.h (struct c_expr): Add field "src_range".
1754 (c_expr::get_start): New method.
1755 (c_expr::get_finish): New method.
1756 (set_c_expr_source_range): New decls.
1757 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1758 on ret for prefix unary ops.
1759 (parser_build_binary_op): Likewise, running from the start of
1760 arg1.value through to the end of arg2.value.
1761
ec8b536f
MP
17622015-11-13 Marek Polacek <polacek@redhat.com>
1763
1764 PR c/68320
1765 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1766
277fe616
DM
17672015-11-13 David Malcolm <dmalcolm@redhat.com>
1768
1769 * c-typeck.c: Include spellcheck.h.
1770 (lookup_field_fuzzy_find_candidates): New function.
1771 (lookup_field_fuzzy): New function.
1772 (build_component_ref): If the field was not found, try using
1773 lookup_field_fuzzy and potentially offer a suggestion.
1774
6e232ba4
JN
17752015-11-12 James Norris <jnorris@codesourcery.com>
1776 Joseph Myers <joseph@codesourcery.com>
1777
1778 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1779 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1780 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1781 and PRAGMA_OMP_CLAUSE_LINK.
1782 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1783 and PRAGMA_OACC_CLAUSE_LINK.
1784 (OACC_DECLARE_CLAUSE_MASK): New definition.
1785 (c_parser_oacc_declare): New function.
1786
9be4f715
MP
17872015-11-12 Marek Polacek <polacek@redhat.com>
1788
1789 PR c/67784
1790 * c-parser.c (c_parser_for_statement): Reclassify the token in
1791 a correct scope.
1792
e78bede6
MP
17932015-11-11 Marek Polacek <polacek@redhat.com>
1794
1795 PR c/68107
1796 PR c++/68266
1797 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1798 checking the size of an array.
1799
69f293c9
AM
18002015-11-11 Andrew MacLeod <amacleod@redhat.com>
1801
1802 * c-array-notation.c: Remove unused header files.
1803 * c-aux-info.c: Likewise.
1804 * c-convert.c: Likewise.
1805 * c-decl.c: Likewise.
1806 * c-errors.c: Likewise.
1807 * c-lang.c: Likewise.
1808 * c-objc-common.c: Likewise.
1809 * c-parser.c: Likewise.
1810 * c-typeck.c: Likewise.
1811 * gccspec.c: Likewise.
1812
3a40d81d
NS
18132015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1814 Cesar Philippidis <cesar@codesourcery.com>
1815 James Norris <jnorris@codesourcery.com>
1816 Julian Brown <julian@codesourcery.com>
1817 Nathan Sidwell <nathan@codesourcery.com>
1818
1819 c/
1820 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1821 routine arg.
1822 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1823 (c_parser_pragma): Parse 'acc routine'.
1824 (OACC_ROUTINE_CLAUSE_MARK): Define.
1825 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1826
fc402eec
AA
18272015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1828
1829 PR debug/67192
1830 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1831 location of the backward-goto to the start of the loop body.
1832
f6b0b3db
AA
18332015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1834
1835 PR debug/67192
1836 * c-parser.c (c_parser_while_statement): Finish the loop before
1837 parsing ahead for misleading indentation.
1838 (c_parser_for_statement): Likewise.
1839
ee45a32d
EB
18402015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1841
1842 * c-decl.c (finish_struct): If the structure has reverse storage
1843 order, rewrite the type of array fields with scalar component. Call
1844 maybe_apply_pragma_scalar_storage_order on entry.
1845 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1846 errors on bit-fields and reverse SSO here and not...
1847 (c_mark_addressable): ...here.
1848 (output_init_element): Adjust call to initializer_constant_valid_p.
1849 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1850
8a645150
DM
18512015-11-06 David Malcolm <dmalcolm@redhat.com>
1852
1853 * c-decl.c (warn_defaults_to): Update for change in signature
1854 of diagnostic_set_info.
1855 * c-errors.c (pedwarn_c99): Likewise.
1856 (pedwarn_c90): Likewise.
1857 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1858 for textinfo::set_location.
1859
7a5e4956
CP
18602015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1861 Thomas Schwinge <thomas@codesourcery.com>
1862 James Norris <jnorris@codesourcery.com>
1863
1864 * c-parser.c (c_parser_omp_clause_name): Add support for
1865 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1866 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1867 default(none) in OpenACC.
1868 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1869 arguments.
1870 (c_parser_oacc_clause_tile): New function.
1871 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1872 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1873 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1874 TILE}.
1875 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1876 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1877 FIRSTPRIVATE}.
1878 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1879 (c_parser_oacc_update): Update the error message for missing clauses.
1880 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1881 and OMP_CLAUSE_INDEPENDENT.
1882
bfcfbfa0
MP
18832015-11-05 Marek Polacek <polacek@redhat.com>
1884
1885 PR c/68090
1886 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1887 deal with pre-evaluation on invalid types.
1888
e01d41e5
JJ
18892015-11-05 Jakub Jelinek <jakub@redhat.com>
1890 Ilya Verbin <ilya.verbin@intel.com>
1891
1892 * c-parser.c: Include context.h and gimple-expr.h.
1893 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1894 monotonic together with nonmonotonic.
1895 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1896 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1897 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1898 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1899 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1900 expressions on combined target teams before the target.
1901 (c_parser_omp_declare_target): If decl has "omp declare target" or
1902 "omp declare target link" attribute, and cgraph or varpool node already
1903 exists, then set corresponding flags. Call c_finish_omp_clauses
1904 in the parenthesized extended-list syntax case.
1905 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1906 declare target.
1907 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1908 on OMP_CLAUSE_REDUCTION array sections.
1909 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1910 into the constant offset, or for variable low-bound using
1911 POINTER_PLUS_EXPR. For structure element based array sections use
1912 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1913 (c_finish_omp_clauses): Drop generic_field_head, structure
1914 elements are now always mapped even as array section bases,
1915 diagnose same var in data sharing and mapping clauses. Diagnose if
1916 linear step on declare simd is neither a constant nor a uniform
1917 parameter. Look through POINTER_PLUS_EXPR for array section
1918 reductions. Diagnose the same var or function appearing multiple
1919 times on the same directive. Fix up wording for the to clause if t
1920 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1921 modifier on kinds other than dynamic or guided or nonmonotonic
1922 modifier together with ordered clause.
1923
4bf9e5a8
TS
19242015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1925 Chung-Lin Tang <cltang@codesourcery.com>
1926
1927 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1928
2adfab87
AM
19292015-10-29 Andrew MacLeod <amacleod@redhat.com>
1930
1931 * c-array-notation.c: Reorder #include's and remove duplicates.
1932 * c-aux-info.c: Likewise.
1933 * c-convert.c: Likewise.
1934 * c-decl.c: Likewise.
1935 * c-errors.c: Likewise.
1936 * c-lang.c: Likewise.
1937 * c-objc-common.c: Likewise.
1938 * c-parser.c: Likewise.
1939 * c-typeck.c: Likewise.
1940
e922069e
JW
19412015-10-26 Jim Wilson <jim.wilson@linaro.org>
1942
1943 PR debug/66068
1944 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1945 after calling build_qualified_type.
1946
765dd391
CP
19472015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1948 Thomas Schwinge <thomas@codesourcery.com>
1949 James Norris <jnorris@codesourcery.com>
1950 Joseph Myers <joseph@codesourcery.com>
1951 Julian Brown <julian@codesourcery.com>
1952 Bernd Schmidt <bschmidt@redhat.com>
1953
1954 * c-parser.c (c_parser_oacc_shape_clause): New.
1955 (c_parser_oacc_simple_clause): New.
1956 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1957 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1958
88bae6f4
TS
19592015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1960 James Norris <jnorris@codesourcery.com>
1961 Cesar Philippidis <cesar@codesourcery.com>
1962
1963 PR c/64765
1964 PR c/64880
1965 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1966 parameters, and handle these. Adjust all users.
1967 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1968 into...
1969 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1970 all users.
1971 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1972 declare functions.
1973 (c_finish_omp_construct): Declare function.
1974 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1975 Merge functions into...
1976 (c_finish_omp_construct): ... this new function.
1977
a8fc2579
RB
19782015-10-22 Richard Biener <rguenther@suse.de>
1979
1980 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1981 before folding a MINUS_EXPR.
1982
e9122ef6
MP
19832015-10-21 Marek Polacek <polacek@redhat.com>
1984
1985 PR c/68024
1986 * c-decl.c (start_function): Warn about vararg functions without
1987 a prototype.
1988
9f47c7e5
IE
19892015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1990
1991 * c-typeck.c (build_conditional_expr): Use boolean vector
1992 type for vector comparison.
1993 (build_vec_cmp): New.
1994 (build_binary_op): Use build_vec_cmp for comparison.
1995
fa60eeb9
MP
19962015-10-20 Marek Polacek <polacek@redhat.com>
1997
1998 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1999
2c7020eb
MP
20002015-10-20 Marek Polacek <polacek@redhat.com>
2001
2002 PR c/67964
2003 * c-parser.c (c_parser_attributes): Break out of the loop if the
2004 token after an attribute isn't a comma.
2005
d9a6bd32
JJ
20062015-10-13 Jakub Jelinek <jakub@redhat.com>
2007 Aldy Hernandez <aldyh@redhat.com>
2008
2009 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2010 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2011 (c_parser_omp_variable_list): Handle structure elements for
2012 map, to and from clauses. Handle array sections in reduction
2013 clause. Formatting fixes.
2014 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2015 if clause modifiers.
2016 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2017 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2018 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2019 c_parser_omp_clause_is_device_ptr): New functions.
2020 (c_parser_omp_clause_ordered): Parse optional parameter.
2021 (c_parser_omp_clause_reduction): Handle array reductions.
2022 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2023 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2024 functions.
2025 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2026 (c_parser_omp_clause_depend_sink): New function.
2027 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2028 (c_parser_omp_clause_map): Parse release/delete map kinds and
2029 optional always modifier.
2030 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2031 and c_finish_omp_clauses callers.
2032 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2033 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2034 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2035 (OMP_CRITICAL_CLAUSE_MASK): Define.
2036 (c_parser_omp_critical): Parse critical clauses.
2037 (c_parser_omp_for_loop): Handle doacross loops, adjust
2038 c_finish_omp_for and c_finish_omp_clauses callers.
2039 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2040 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2041 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2042 (c_parser_omp_for): Disallow ordered clause when combined with
2043 distribute. Disallow linear clause when combined with distribute
2044 and not combined with simd.
2045 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2046 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2047 parse clauses and if depend clause is found, don't parse a body.
2048 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2049 Allow target parallel without for after it.
2050 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2051 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2052 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2053 invalid kinds.
2054 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2055 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2056 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2057 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2058 functions.
2059 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2060 defaultmap and is_device_ptr clauses.
2061 (c_parser_omp_target): Parse target parallel and target simd. Set
2062 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2063 and target exit data. Diagnose invalid map kinds.
2064 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2065 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2066 construct.
2067 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2068 &omp_priv.
2069 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2070 (c_parser_omp_taskloop): New function.
2071 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2072 handle PRAGMA_OMP_TASKLOOP.
2073 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2074 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2075 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2076 Add IS_OMP argument, handle structure element bases, diagnose
2077 bitfields, pass IS_OMP recursively, diagnose known zero length
2078 array sections in depend clauses, handle array sections in reduction
2079 clause, diagnose negative length even for pointers.
2080 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2081 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2082 array sections in reduction clause, set
2083 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2084 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2085 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2086 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2087
21ba0cea
MP
20882015-10-06 Marek Polacek <polacek@redhat.com>
2089
2090 * c-parser.c (c_parser_statement_after_labels): Use
2091 protected_set_expr_location.
2092 (c_parser_omp_clause_num_gangs): Likewise.
2093 (c_parser_omp_clause_num_threads): Likewise.
2094 (c_parser_omp_clause_num_workers): Likewise.
2095 (c_parser_omp_clause_vector_length): Likewise.
2096 (c_parser_omp_clause_num_teams): Likewise.
2097 (c_parser_omp_clause_thread_limit): Likewise.
2098 * c-typeck.c (build_c_cast): Likewise.
2099 (c_cast_expr): Likewise.
2100
624d31fe
RS
21012015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2102
2103 * c-typeck.c (c_tree_equal): Use real_equal instead of
2104 REAL_VALUES_EQUAL.
2105
b8fd7909
JM
21062015-10-04 Jason Merrill <jason@redhat.com>
2107
2108 * c-parser.c (c_lex_one_token): Handle @synchronized.
2109 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2110 can change whether the function is transaction_safe.
2111
1c7485af
MP
21122015-10-02 Marek Polacek <polacek@redhat.com>
2113
2114 PR c/67730
2115 * c-typeck.c (convert_for_assignment): Use the expansion point
2116 location throughout.
2117
3e3b8d63
MP
21182015-10-02 Marek Polacek <polacek@redhat.com>
2119
2120 PR c/64249
2121 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2122 and pass it down to c_parser_if_statement.
2123 (c_parser_else_body): Add CHAIN parameter and pass it down to
2124 c_parser_statement_after_labels.
2125 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2126 duplicated if-else-if conditions.
2127
aabef2de
MP
21282015-10-01 Marek Polacek <polacek@redhat.com>
2129
2130 * c-typeck.c (convert_for_assignment): Improve commentary.
2131
de8ddd5f
MP
21322015-09-30 Marek Polacek <polacek@redhat.com>
2133
2134 PR c/67730
2135 * c-typeck.c (c_finish_return): Use the expansion point location for
2136 certain "return with value" warnings.
2137
c4914de6
MLI
21382015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2139
2140 * c-parser.c (pragma_lex): Add loc argument.
2141
0e36f5c7
MP
21422015-09-15 Marek Polacek <polacek@redhat.com>
2143
2144 PR c/67580
2145 * c-decl.c (tag_exists_p): New function.
2146 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2147 struct/union/enum keywords are missing.
2148 * c-tree.h (tag_exists_p): Declare.
2149
2f3bb934
MP
21502015-09-15 Marek Polacek <polacek@redhat.com>
2151
2152 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2153 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2154 Return NULL_TREE instead of 0.
2155 (lookup_name): Return NULL_TREE instead of 0.
2156 (lookup_name_in_scope): Likewise.
2157 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2158 (parser_xref_tag): Use false instead of 0.
2159 (start_struct): Use true instead of 1.
2160 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2161
aa256c4a
MP
21622015-09-14 Marek Polacek <polacek@redhat.com>
2163
2164 * c-typeck.c (set_nonincremental_init_from_string): Use
2165 HOST_WIDE_INT_M1U when shifting a negative value.
2166
dbb68221
MW
21672015-09-09 Mark Wielaard <mjw@redhat.com>
2168
2169 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2170 parm against NULL.
2171
a8a098ac
JJ
21722015-09-10 Jakub Jelinek <jakub@redhat.com>
2173
2174 PR c/67502
2175 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2176 into OMP_FOR_PRE_BODY rather than before the loop.
2177
f4b189d5
JJ
21782015-09-09 Jakub Jelinek <jakub@redhat.com>
2179
0bb99c11
JJ
2180 PR c/67501
2181 * c-parser.c (c_parser_oacc_all_clauses,
2182 c_parser_omp_all_clauses): Remove invalid clause from
2183 list of clauses even if parser->error is set.
2184
fce5e5e3
JJ
2185 PR c/67500
2186 * c-parser.c (c_parser_omp_clause_aligned,
2187 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2188 test for errors.
2189 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2190 error_mark_node.
2191
f4b189d5
JJ
2192 PR c/67495
2193 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2194 instead of c_parser_unary_expression. If the result is !lvalue_p,
2195 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2196
b2aaf235
MP
21972015-09-04 Marek Polacek <polacek@redhat.com>
2198
2199 PR sanitizer/67279
2200 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2201
1807ffc1
MS
22022015-09-03 Martin Sebor <msebor@redhat.com>
2203
2204 PR c/66516
8b652e65
JJ
2205 * c-typeck.c (convert_arguments, parser_build_unary_op,
2206 build_conditional_expr, c_cast_expr, convert_for_assignment,
2207 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2208 reject_gcc_builtin.
2209 (c_decl_implicit): Define.
2210
d04ff417
MP
22112015-09-02 Marek Polacek <polacek@redhat.com>
2212
2213 PR c/67432
2214 * c-parser.c (c_parser_enum_specifier): Give a better error for
2215 an empty enum.
2216
a79683d5
TS
22172015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2218
2219 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2220
191a6b94
MP
22212015-08-12 Marek Polacek <polacek@redhat.com>
2222
2223 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2224 LOC to it.
2225
420a9d9b
MP
22262015-08-03 Marek Polacek <polacek@redhat.com>
2227
2228 PR c/67088
2229 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2230 Use it.
2231 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2232
992118a1
PP
22332015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2234
2235 * c-parser.c (c_parser_if_body): Take token_indent_info
2236 argument. Call warn_for_misleading_indentation even when the
2237 body is a semicolon. Extract token_indent_infos corresponding
2238 to the guard, body and next tokens. Adjust call to
2239 warn_for_misleading_indentation accordingly.
2240 (c_parser_else_body): Likewise.
2241 (c_parser_if_statement): Likewise.
2242 (c_parser_while_statement): Likewise.
2243 (c_parser_for_statement): Likewise.
2244
46308474
LFSM
22452015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2246 Manuel López-Ibáñez <manu@gcc.gnu.org>
2247
2248 * c-decl.c (get_parm_info): Remove static var. Update warning
2249 message.
2250
05b28fd6
MP
22512015-07-27 Marek Polacek <polacek@redhat.com>
2252
2253 PR c++/66555
2254 PR c/54979
2255 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2256
451b5e48
MP
22572015-07-20 Marek Polacek <polacek@redhat.com>
2258
2259 PR c++/55095
2260 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2261 (build_binary_op): Warn about left shift overflows.
2262
1916bcb5
AM
22632015-07-09 Andrew MacLeod <amacleod@redhat.com>
2264
2265 * c-array-notation.c: Adjust includes for flags.h changes.
2266 * c-objc-common.c: Likewise.
2267
c7131fb2
AM
22682015-07-07 Andrew MacLeod <amacleod@redhat.com>
2269
2270 * c-array-notation.c: Adjust includes.
2271 * c-aux-info.c: Likewise.
2272 * c-convert.c: Likewise.
2273 * c-decl.c: Likewise.
2274 * c-errors.c: Likewise.
2275 * c-lang.c: Likewise.
2276 * c-objc-common.c: Likewise.
2277 * c-parser.c: Likewise.
2278 * c-typeck.c: Likewise.
2279
da2e71c9
MLI
22802015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2281
2282 PR fortran/66605
2283 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2284
b155cfd9
MP
22852015-06-29 Marek Polacek <polacek@redhat.com>
2286
2287 PR c/66322
2288 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2289 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2290 about -Wswitch-bool here.
2291 (do_case): Update c_add_case_label call.
2292 (c_finish_case): Update c_do_switch_warnings call.
2293
31521951
MP
22942015-06-27 Marek Polacek <polacek@redhat.com>
2295
2296 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2297
22d03525
MP
22982015-06-26 Marek Polacek <polacek@redhat.com>
2299
2300 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2301 INDIRECT_REF_P.
2302 * c-typeck.c (array_to_pointer_conversion): Likewise.
2303 (build_unary_op): Likewise.
2304 (c_finish_return): Likewise.
2305
f0889939
AM
23062015-06-25 Andrew MacLeod <amacleod@redhat.com>
2307
2308 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2309 * c-parser.c: Likewise.
2310
8d67ee55
RS
23112015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2312
2313 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2314 instead of pointer_hash.
2315 (detect_field_duplicates): Likewise.
2316
0ae9bd27
MP
23172015-06-25 Marek Polacek <polacek@redhat.com>
2318
2319 * c-array-notation.c: Use VAR_P throughout.
2320 * c-decl.c: Likewise.
2321 * c-objc-common.c: Likewise.
2322 * c-parser.c: Likewise.
2323 * c-typeck.c: Likewise.
2324
62f9079a
MP
23252015-06-25 Marek Polacek <polacek@redhat.com>
2326
2327 * c-decl.c: Use is_global_var throughout.
2328 * c-parser.c: Likewise.
2329 * c-typeck.c: Likewise.
2330
abb226c9
AM
23312015-06-17 Andrew MacLeod <amacleod@redhat.com>
2332
2333 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2334 * c-aux-info.c: Likewise.
2335 * c-convert.c: Likewise.
2336 * c-decl.c: Likewise.
2337 * c-errors.c: Likewise.
2338 * c-lang.c: Likewise.
2339 * c-objc-common.c: Likewise.
2340 * c-parser.c: Likewise.
2341 * c-typeck.c: Likewise.
2342
8cbababc
JH
23432015-06-11 Jan Hubicka <hubicka@ucw.cz>
2344
2345 PR middle-end/66325
2346 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2347 variants.
2348
a0349665
PMR
23492015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2350
2351 * c-decl.c (pop_scope): Register the main translation unit
2352 through the new debug hook.
2353
13fdf2e2
AM
23542015-06-08 Andrew MacLeod <amacleod@redhat.com>
2355
2356 * c-array-notation.c : Adjust include files.
2357 * c-aux-info.c : Likewise.
2358 * c-convert.c : Likewise.
2359 * c-decl.c : Likewise.
2360 * c-errors.c : Likewise.
2361 * c-lang.c : Likewise.
2362 * c-lang.h : Likewise.
2363 * c-objc-common.c : Likewise.
2364 * c-parser.c : Likewise.
2365 * c-typeck.c : Likewise.
2366
d7438551
AH
23672015-06-05 Aldy Hernandez <aldyh@redhat.com>
2368
2369 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2370 immediately clobber it.
2371 (c_write_global_declarations_1): Remove call to
2372 check_global_declaration_1.
2373 (c_write_global_declarations_2): Remove.
2374 (c_write_final_cleanups): Rename from c_write_global_declarations.
2375 Remove call to finalize_compilation_unit.
2376 Remove calls to debugging hooks.
2377 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2378 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2379 * c-tree.h: Remove c_write_global_declarations.
2380
ecb9f223
AM
23812015-06-04 Andrew MacLeod <amacleod@redhat.com>
2382
2383 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2384 * c-aux-info.c: Likewise.
2385 * c-convert.c: Likewise.
2386 * c-decl.c: Likewise.
2387 * c-errors.c: Likewise.
2388 * c-lang.c: Likewise.
2389 * c-objc-common.c: Likewise.
2390 * c-parser.c: Likewise.
2391 * c-typeck.c: Likewise.
2392
9482b620
MP
23932015-06-04 Marek Polacek <polacek@redhat.com>
2394
2395 PR c/66341
2396 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2397 it is a lvalue.
2398
bc51ace3
PK
23992015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2400
2401 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2402 Warn for empty struct.
2403 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2404
ea5b45b6
AT
24052015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2406
2407 * c-decl.c (start_function): Call plugin before parsing.
2408 (finish_function): Call plugin after parsing.
2409
c2d47482
PK
24102015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2411
2412 PR c/49551
2413 * c-decl.c (merge_decls): Merge DECL_COMMON.
2414
a95492ab
JW
24152015-05-22 Jim Wilson <jim.wilson@linaro.org>
2416
2417 * Make-lang.in (check_gcc_pallelize): Define.
2418
fd5c817a
MP
24192015-05-22 Marek Polacek <polacek@redhat.com>
2420
2421 PR c/47043
2422 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2423 attributes.
2424
c7b70a3c
MP
24252015-05-21 Marek Polacek <polacek@redhat.com>
2426
2427 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2428 DECL_BUILT_IN.
2429
21b634ae
MP
24302015-05-20 Marek Polacek <polacek@redhat.com>
2431
2432 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2433 * c-typeck.c: Likewise.
2434
296a8c2f
MP
24352015-05-19 Marek Polacek <polacek@redhat.com>
2436
2437 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2438
41b37d5e
JJ
24392015-05-19 Jakub Jelinek <jakub@redhat.com>
2440
2441 PR middle-end/66199
2442 * c-parser.c (c_parser_omp_for_loop): Don't add
2443 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2444 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2445 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2446 constructs.
2447
fab27f52
MM
24482015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2449
2450 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2451 swaps.
fab27f52 2452
40de31cf
MLI
24532015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2454
2455 PR fortran/44054
2456 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2457 accessor function.
2458
3aa3c9fc
MP
24592015-05-14 Marek Polacek <polacek@redhat.com>
2460
2461 PR c/66066
2462 PR c/66127
2463 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2464 rather than with 0.
2465
c3388e62
DM
24662015-05-12 David Malcolm <dmalcolm@redhat.com>
2467
2468 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2469 to add a call to warn_for_misleading_indentation.
2470 (c_parser_else_body): Likewise, adding param "else_loc".
2471 (c_parser_if_statement): Check for misleading indentation.
2472 (c_parser_while_statement): Likewise.
2473 (c_parser_for_statement): Likewise.
2474
755e528f
MP
24752015-05-08 Marek Polacek <polacek@redhat.com>
2476
2477 PR c/64918
2478 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2479 (output_init_element): Likewise.
2480
0173bd2a
MP
24812015-05-07 Marek Polacek <polacek@redhat.com>
2482
2483 PR c/65179
2484 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2485 value.
2486
9babc352
MP
24872015-04-30 Marek Polacek <polacek@redhat.com>
2488
2489 * c-typeck.c (set_init_label): Call error_at instead of error and
2490 pass LOC to it.
2491
ac9f18db
MP
2492 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2493 the type of a decl.
2494
ec3fba51
MP
2495 * c-typeck.c (c_build_va_arg): Clarify the error message.
2496
b811915d
TS
24972015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2498
2499 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2500 OMP_STANDALONE_CLAUSES.
2501
f3075008
MP
25022015-04-28 Marek Polacek <polacek@redhat.com>
2503
2504 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2505
4e81b788
MP
25062015-04-28 Marek Polacek <polacek@redhat.com>
2507
2508 PR c/65901
2509 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2510
6c1db78e
MP
25112015-04-25 Marek Polacek <polacek@redhat.com>
2512
2513 PR c/52085
2514 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2515 attribute.
2516
5c4abbb8
MP
25172015-04-23 Marek Polacek <polacek@redhat.com>
2518
2519 PR c/65345
2520 * c-decl.c (set_labels_context_r): New function.
2521 (store_parm_decls): Call it via walk_tree_without_duplicates.
2522 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2523 instead of create_tmp_var. Build TARGET_EXPR instead of
2524 COMPOUND_EXPR.
2525 (build_atomic_assign): Use create_tmp_var_raw instead of
2526 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2527
06aca1d5
IV
25282015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2529
2530 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2531 (c_parser_omp_target_update): Add missed %> to error_at ().
2532
8fba1830
BRF
25332015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2534
2535 PR target/55143
2536 * c-decl.c (c_default_pointer_mode): Remove definition.
2537 * c-tree.h (c_default_pointer_mode): Remove declaration.
2538
62021f64
TB
25392015-03-27 Tobias Burnus <burnus@net-b.de>
2540
2541 PR c/65586
2542 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2543 error out.
2544 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2545 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2546 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2547
9b65e171
JJ
25482015-03-19 Jakub Jelinek <jakub@redhat.com>
2549
2550 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2551 attribute for DECL_EXTERNAL VAR_DECLs.
2552
17958621
JJ
25532015-03-11 Jakub Jelinek <jakub@redhat.com>
2554
2555 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2556 argument.
2557
7ccb1a11
JJ
25582015-03-10 Jakub Jelinek <jakub@redhat.com>
2559
2560 PR c/65120
2561 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2562 before preparing arguments to warn_logical_not_parentheses.
2563
01177669
JJ
25642015-03-09 Jakub Jelinek <jakub@redhat.com>
2565
2566 PR c/65120
2567 * c-typeck.c (parser_build_binary_op): Don't warn for
2568 !!x == y or !b == y where b is _Bool.
2569
802ac282
MP
25702015-03-09 Marek Polacek <polacek@redhat.com>
2571
2572 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2573 * c-decl.c (grokdeclarator): Likewise.
2574 * c-typeck.c (build_binary_op): Likewise.
2575
e5165b60
MP
25762015-02-27 Marek Polacek <polacek@redhat.com>
2577
2578 PR c/65228
2579 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2580
065d214c
MP
25812015-02-14 Marek Polacek <polacek@redhat.com>
2582
2583 PR c/64768
2584 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2585 declared through a typedef name.
2586
e5d9235b
MP
25872015-02-13 Marek Polacek <polacek@redhat.com>
2588
2589 PR c/65050
2590 * c-decl.c (grokdeclarator): Print also the type when giving
2591 the error message about array's incomplete element type.
2592
fa01ffcc
JJ
25932015-02-11 Jakub Jelinek <jakub@redhat.com>
2594
2595 PR c/64824
2596 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2597 check in the POP macro.
2598
c3e38a03
MP
25992015-02-09 Marek Polacek <polacek@redhat.com>
2600
2601 PR c/64856
2602 * c-typeck.c (process_init_element): Don't always wrap
2603 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2604 initializing a range of elements.
2605
4886ec8e
JJ
26062015-02-04 Jakub Jelinek <jakub@redhat.com>
2607
2608 PR c/64824
2609 PR c/64868
2610 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2611
c3e38a03 26122015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2613
2614 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2615 processing enum declaration.
2616
7b33f0c8
MP
26172015-01-29 Marek Polacek <polacek@redhat.com>
2618
2619 PR c/64709
2620 * c-typeck.c (pop_init_level): If constructor_elements has
2621 exactly one element with integer_zerop value, set constructor_zeroinit
2622 to 1. Remove braces around warning_init call.
2623
dea63e49
JJ
26242015-01-27 Jakub Jelinek <jakub@redhat.com>
2625
2626 PR c/64766
2627 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2628 of FUNCTION_DECLs with error_mark_node.
2629
d38f7dce
JJ
26302015-01-26 Jakub Jelinek <jakub@redhat.com>
2631
2632 PR c/64778
2633 * c-typeck.c (convert_arguments): Return -1 if there are
2634 error_args, even if we've diagnosed too many arguments.
2635
cbf5d0e7
RB
26362015-01-21 Richard Biener <rguenther@suse.de>
2637
2638 PR middle-end/64313
2639 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2640 for builtins the user declared correctly.
2641
41dbbb37
TS
26422015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2643 Bernd Schmidt <bernds@codesourcery.com>
2644 Cesar Philippidis <cesar@codesourcery.com>
2645 James Norris <jnorris@codesourcery.com>
2646 Jakub Jelinek <jakub@redhat.com>
2647 Ilmir Usmanov <i.usmanov@samsung.com>
2648
2649 * c-parser.c: Include "gomp-constants.h".
2650 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2651 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2652 Use OMP_CLAUSE_SET_MAP_KIND.
2653 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2654 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2655 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2656 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2657 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2658 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2659 "copyout", "create", "delete", "deviceptr", "gang", "host",
2660 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2661 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2662 "present_or_create", "pcreate", "seq", "self", "vector",
2663 "vector_length", "wait", "worker".
2664 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2665 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2666 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2667 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2668 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2669 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2670 (c_parser_oacc_data_clause_deviceptr)
2671 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2672 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2673 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2674 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2675 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2676 (c_parser_oacc_parallel, c_parser_oacc_update)
2677 (c_parser_oacc_wait): New functions.
2678 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2679 (c_finish_oacc_data): New prototypes.
2680 * c-typeck.c: Include "gomp-constants.h".
2681 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2682 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2683 OMP_CLAUSE_SET_MAP_KIND.
2684 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2685 (c_finish_oacc_data): New functions.
2686 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2687 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2688 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2689 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2690 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2691 GOMP_MAP_FORCE_DEVICEPTR.
2692
adfac8df
JJ
26932015-01-09 Michael Collison <michael.collison@linaro.org>
2694
2695 * c-array-notation.c: Include hash-set.h, machmode.h,
2696 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2697 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2698 * c-aux-info.c: Ditto.
2699 * c-convert.c: Ditto.
2700 * c-decl.c: Ditto.
2701 * c-errors.c: Ditto.
2702 * c-lang.c: Dittoxs.
2703 * c-objc-common.c: Ditto.
2704 * c-parser.c: Ditto.
2705 * c-typeck.c: Include hash-set.h, machmode.h,
2706 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2707 fold-const.h, wide-int.h, inchash.h, real.h and
2708 fixed-value.h due to flattening of tree.h.
2709
2cc901dc
MP
27102015-01-07 Marek Polacek <polacek@redhat.com>
2711
2712 PR c/64417
2713 * c-typeck.c (process_init_element): Disallow initialization of
2714 a flexible array member with a string constant if the structure
2715 is in an array.
2716
5624e564
JJ
27172015-01-05 Jakub Jelinek <jakub@redhat.com>
2718
e5341100
JJ
2719 PR sanitizer/64344
2720 * c-typeck.c (convert_for_assignment, c_finish_return): For
2721 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2722 types also set in_late_binary_op around convert call.
2723 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2724 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2725 result on expr as last argument to ubsan_instrument_float_cast,
2726 if in_late_binary_op, don't use c_save_expr but save_expr.
2727
5624e564
JJ
2728 Update copyright years.
2729
5bd012f8
MP
27302015-01-05 Marek Polacek <polacek@redhat.com>
2731
2732 PR c/64423
2733 * c-typeck.c (build_array_ref): Pass loc down to
2734 warn_array_subscript_with_type_char.
2735
3f8257db 27362014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2737
2738 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2739 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2740 element type.
8e745a17 2741 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2742 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2743 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2744 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2745 to PEDWARN_FOR_QUALIFIERS.
768952be 2746
8f94a8c4
JJ
27472014-12-17 Jakub Jelinek <jakub@redhat.com>
2748
2749 PR sanitizer/64289
2750 * c-convert.c: Include ubsan.h.
2751 (convert): For real -> integral casts and
2752 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2753 instead instrument the float cast directly.
2754
b731b390
JJ
27552014-11-29 Jakub Jelinek <jakub@redhat.com>
2756
2757 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2758 c_finish_stmt_expr): Remove NULL last argument from
2759 create_tmp_var_raw and create_tmp_var calls.
2760 * c-array-notation.c (fix_builtin_array_notation_fn,
2761 build_array_notation_expr, fix_conditional_array_notations_1,
2762 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2763
541e35a6
MP
27642014-11-28 Marek Polacek <polacek@redhat.com>
2765
2766 PR c/63862
2767 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2768 convert the right operand to integer type.
2769
b286be94
MP
27702014-11-25 Marek Polacek <polacek@redhat.com>
2771
2772 PR c/63877
2773 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2774 for inline functions.
2775
aa7da51a
JJ
27762014-11-21 Jakub Jelinek <jakub@redhat.com>
2777
2778 PR target/63764
2779 * c-typeck.c (build_array_ref): Adjust
2780 convert_vector_to_pointer_for_subscript caller. If it returns true,
2781 call non_lvalue_loc on the result.
2782
d876207f
RB
27832014-11-11 Richard Biener <rguenther@suse.de>
2784
2785 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2786 to true.
2787
e5e44252
AK
27882014-11-10 Andi Kleen <ak@linux.intel.com>
2789
2790 PR c/60804
2791 * c-parser.c (c_parser_statement_after_labels): Call
2792 check_no_cilk.
2793 (c_parser_if_statement): Dito.
2794 (c_parser_switch_statement): Dito.
2795 (c_parser_while_statement): Dito.
2796 (c_parser_do_statement): Dito.
2797 (c_parser_for_statement): Dito.
2798 * c-typeck.c (c_finish_loop): Dito.
2799
13c21655
PC
28002014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2801
2802 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2803 OPT_Wshift_count_overflow in the warnings.
2804
2d51fcef
MP
28052014-10-30 Marek Polacek <polacek@redhat.com>
2806
2807 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2808 print the stripped version as well, if they're not the same.
2809
ef4bddc2
RS
28102014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2811
2812 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2813 machine_mode.
2814
c582198b
AM
28152014-10-28 Andrew MacLeod <amacleod@redhat.com>
2816
2817 * c-decl.c: Adjust include files.
2818 * c-parser.c: Ditto.
2819
ddc8de03
PM
28202014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2821 Tom Tromey <tromey@redhat.com>
2822
2823 * c-tree.h (enum c_oracle_request): New.
2824 (c_binding_oracle_function): New typedef.
2825 (c_binding_oracle, c_pushtag, c_bind): Declare.
2826 * c-decl.c (c_binding_oracle): New global.
2827 (I_SYMBOL_CHECKED): New macro.
2828 (i_symbol_binding): New function.
2829 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2830 (I_TAG_CHECKED): New macro.
2831 (i_tag_binding): New function.
2832 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2833 (I_LABEL_CHECKED): New macro.
2834 (i_label_binding): New function.
2835 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2836 (c_print_identifier): Save and restore c_binding_oracle.
2837 (c_pushtag, c_bind): New functions.
2838
60393bbc
AM
28392014-10-27 Andrew MacLeod <amacleod@redhat.com>
2840
2841 * c-typeck.c: Adjust include files.
2842
d723bb7c
MLI
28432014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2844
2845 PR c++/53061
2846 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2847 initialization here...
2848 (c_initialize_diagnostics): ... but here. Set defaults after
2849 building pretty-printer.
2850
1bc5a451
MP
28512014-10-23 Marek Polacek <polacek@redhat.com>
2852
2853 PR c/63626
2854 * c-decl.c (pop_scope): Don't print warning in external_scope.
2855
4435bb92
MP
28562014-10-19 Marek Polacek <polacek@redhat.com>
2857
2858 PR c/63567
2859 * c-typeck.c (output_init_element): Allow initializing objects with
2860 static storage duration with compound literals even in C99 and add
2861 pedwarn for it.
2862
7278465e
MP
28632014-10-17 Marek Polacek <polacek@redhat.com>
2864
2865 PR c/63567
2866 * c-typeck.c (digest_init): Allow initializing objects with static
2867 storage duration with compound literals even in C99 and add pedwarn
2868 for it.
2869
d9b7be2e
MP
28702014-10-17 Marek Polacek <polacek@redhat.com>
2871
2872 PR c/63543
2873 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2874 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2875 error multiple times. Print the type.
2876
f406ae1f
MP
28772014-10-17 Marek Polacek <polacek@redhat.com>
2878
2879 PR c/63549
2880 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2881 type.
2882
92574c7c
MP
28832014-10-17 Marek Polacek <polacek@redhat.com>
2884
2885 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2886 (start_function): Use OPT_Wimplicit_int instead of 0.
2887 (store_parm_decls_oldstyle): Likewise.
2888
1bc4a978
MT
28892014-10-17 Alan Modra <amodra@gmail.com>
2890
2891 PR middle-end/61848
2892 * c-decl.c (merge_decls): Don't merge section name or tls model
2893 to newdecl symtab node, instead merge to olddecl. Override
2894 existing olddecl section name. Set tls_model for all thread-local
2895 vars, not just OMP thread-private ones. Remove incorrect comment.
2896
83685514
AM
28972014-10-16 Andrew MacLeod <amacleod@redhat.com>
2898
2899 * c-decl.c: Adjust include files.
2900
78a7c317
DD
29012014-10-14 DJ Delorie <dj@redhat.com>
2902
2903 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2904 (c_token_starts_typename): Check all __intN, not just __int128.
2905 (c_token_starts_declspecs): Likewise.
2906 (c_parser_declspecs): Likewise.
2907 (c_parser_attribute_any_word): Likewise.
2908 (c_parser_objc_selector): Likewise.
2909 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2910 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2911 is specified.
2912 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2913 __int128.
2914 (finish_declspecs): Likewise.
2915
74d98c1e
AB
29162014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2917
8e745a17 2918 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 2919 the duplicate code.
8e745a17 2920 (c_parser_statement): Call the new function.
74d98c1e 2921
84937de2
MP
29222014-10-09 Marek Polacek <polacek@redhat.com>
2923
2924 PR c/63480
2925 * c-typeck.c (pop_init_level): Don't warn about initializing
2926 with { }.
2927
0382aaa0
MP
29282014-10-07 Marek Polacek <polacek@redhat.com>
2929
2930 PR c/59717
2931 * c-decl.c (header_for_builtin_fn): New function.
2932 (implicitly_declare): Suggest which header to include.
2933
7a0ca710
MP
29342014-10-07 Marek Polacek <polacek@redhat.com>
2935
2936 * c-convert.c (convert): Use error_operand_p.
2937 * c-typeck.c (require_complete_type): Likewise.
2938 (really_atomic_lvalue): Likewise.
2939 (digest_init): Likewise.
2940 (handle_omp_array_sections_1): Likewise.
2941
6bc8a126
MP
29422014-10-03 Marek Polacek <polacek@redhat.com>
2943
2944 PR c/63453
2945 * c-decl.c (pop_scope): Don't warn about "inline function declared
2946 but never defined" for functions marked with gnu_inline attribute.
2947
d90c0a59
JJ
29482014-09-25 Jakub Jelinek <jakub@redhat.com>
2949
2950 PR c++/63249
2951 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2952 on low_bound and length.
2953
083e891e
MP
29542014-09-24 Marek Polacek <polacek@redhat.com>
2955
2956 PR c/61405
2957 PR c/53874
2958 * c-parser.c: Don't define CPP_KEYWORD.
2959 (c_parser_switch_statement): Pass original type to c_finish_case.
2960 * c-tree.h (c_finish_case): Update declaration.
2961 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2962 conditionally to c_do_switch_warnings.
2963
8d95fe25
MP
29642014-09-03 Marek Polacek <polacek@redhat.com>
2965
2966 PR c/62024
2967 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2968 conversions.
2969
9a771876
JJ
29702014-09-02 Jakub Jelinek <jakub@redhat.com>
2971 Balaji V. Iyer <balaji.v.iyer@intel.com>
2972 Igor Zamyatin <igor.zamyatin@intel.com>
2973
2974 * c-parser.c (c_parser_cilk_for): New function.
2975 (c_parser_cilk_grainsize): Likewise.
2976 (c_get_temp_regvar): Likewise.
2977 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2978 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2979 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2980 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2981 case.
2982
b7679d96
CG
29832014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2984
2985 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2986 with using HOST_WIDE_INT without truncation to 'int'
2987
59ea0364
MP
29882014-08-22 Marek Polacek <polacek@redhat.com>
2989
2990 PR c++/62199
2991 * c-typeck.c (parser_build_binary_op): Adjust call to
2992 warn_logical_not_parentheses.
2993
671a475e
IZ
29942014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2995
2996 PR other/62008
2997 * c-parser.c (c_parser_array_notation): Check for correct
2998 type of an array added.
2999
04159acf
MP
30002014-08-19 Marek Polacek <polacek@redhat.com>
3001
3002 PR c++/62153
3003 * c-typeck.c (build_binary_op): If either operand of a comparison
3004 is a boolean expression, call maybe_warn_bool_compare.
3005
c77935ee
PP
30062014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3007
3008 PR c/45584
3009 * c-typeck.c (build_c_cast): Do a conversion even when the
3010 TYPE_MAIN_VARIANTs are the same.
3011
35aff4fb
MP
30122014-08-19 Marek Polacek <polacek@redhat.com>
3013
3014 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3015 pedwarn_c99 instead of pedwarn.
3016 (grokfield): Likewise.
3017 (warn_defaults_to): New function.
3018 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3019 Unconditionally call pedwarn_c99 instead of pedwarn.
3020 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3021 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3022 check flag_isoc11 before.
3023 * c-errors.c (pedwarn_c99): Change the return type to bool.
3024 Handle -Wc99-c11-compat.
3025 * c-parser.c (disable_extension_diagnostics): Handle
3026 warn_c99_c11_compat.
3027 (restore_extension_diagnostics): Likewise.
3028 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3029 instead of pedwarn, don't check flag_isoc11 before.
3030 (c_parser_declspecs): Likewise.
3031 (c_parser_alignas_specifier): Likewise.
3032 (c_parser_alignof_expression): Likewise.
3033 (c_parser_generic_selection): Likewise.
3034 * c-tree.h (pedwarn_c99): Update declaration.
3035 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3036 of pedwarn_c99.
3037
177cce46
MP
30382014-08-19 Marek Polacek <polacek@redhat.com>
3039
3040 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3041 to pedwarn_c90.
3042 * c-errors.c: Include "opts.h".
3043 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3044 * c-parser.c (disable_extension_diagnostics): Handle negative value
3045 of warn_c90_c99_compat, too.
3046 (restore_extension_diagnostics): Likewise.
3047 (c_parser_compound_statement_nostart): Pass
3048 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3049
6dc99c33
MP
30502014-08-12 Marek Polacek <polacek@redhat.com>
3051
3052 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3053 Add pedwarn.
3054 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3055 Likewise.
3056 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3057
3f8257db 30582014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3059
3060 PR c/51849
3061 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3062 Call pedwarn_c90 instead of pedwarn.
3063 (check_bitfield_type_and_width): Likewise.
3064 (declspecs_add_qual): Likewise.
3065 (declspecs_add_type): Likewise.
3066 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3067 Adjust to only call pedwarn_c90.
3068 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3069 pedwarn_c90 instead of pedwarn.
3070 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3071 * c-parser.c (disable_extension_diagnostics): Handle
3072 warn_c90_c99_compat.
3073 (restore_extension_diagnostics): Likewise.
3074 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3075 pedwarn_c90 instead of pedwarn.
3076 (c_parser_initelt): Likewise.
3077 (c_parser_postfix_expression): Likewise.
3078 (c_parser_postfix_expression_after_paren_type): Likewise.
3079 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3080 * c-tree.h: Fix formatting.
3081 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3082 pedwarn_c90 instead of pedwarn.
3083
9f25a338
TS
30842014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3085
3086 * c-typeck.c: Remove include of pointer-set.h.
3087
044331a8
MP
30882014-08-07 Marek Polacek <polacek@redhat.com>
3089
3090 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3091
b787e7a2
TS
30922014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3093
3094 * c-typeck.c: Use hash_map instead of pointer_map.
3095
6e2830c3
TS
30962014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3097
3098 * c-decl.c: Use hash_set instead of pointer_set.
3099
a7ee52fb
IZ
31002014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3101
3102 PR middle-end/61455
3103 * c-array-notation.c (expand_array_notations): Handling
3104 of DECL_EXPR added.
3105
b4dfdc11
MG
31062014-07-31 Marc Glisse <marc.glisse@inria.fr>
3107
3108 PR c++/60517
3109 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3110 a local variable.
3111
976d5a22
TT
31122014-07-30 Tom Tromey <tromey@redhat.com>
3113
3114 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3115 field.
3116 (really_start_incremental_init, push_init_level): Initialize
3117 designator_depth.
3118 (pop_init_level): Set global designator_depth.
3119 (process_init_element): Check for designated_init attribute.
3120
30281de2
MP
31212014-07-20 Marek Polacek <polacek@redhat.com>
3122
3123 PR c/61852
3124 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3125 (implicitly_declare): Pass location to implicit_decl_warning.
3126
b108f48f
JJ
31272014-07-14 Jakub Jelinek <jakub@redhat.com>
3128
3129 PR middle-end/61294
3130 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3131 If non-NULL, call c_parser_check_literal_zero.
3132 (c_parser_check_literal_zero): New function.
3133 (c_parser_postfix_expression_after_primary): Adjust
3134 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3135
773ec47f
MP
31362014-07-06 Marek Polacek <polacek@redhat.com>
3137
3138 PR c/6940
3139 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3140 * c-tree.h (C_ARRAY_PARAMETER): Define.
3141 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3142 function parameter.
3143
22e1cf1c 31442014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3145 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3146
3147 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3148 releasing symbol.
3149
52ec0ea3
MP
31502014-07-01 Marek Polacek <polacek@redhat.com>
3151
3152 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3153 instead of 0 to WARN_FOR_ASSIGNMENT.
3154
d5c3d343
MP
31552014-07-01 Marek Polacek <polacek@redhat.com>
3156
3157 PR c/58286
3158 * c-typeck.c (convert_for_assignment): Pass
3159 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3160
6a7253a4
MP
31612014-06-30 Marek Polacek <polacek@redhat.com>
3162
3163 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3164 has no_sanitize_undefined attribute.
3165
5e88a8f4
IZ
31662014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3167
3168 PR middle-end/57541
3169 * c-array-notation.c (fix_builtin_array_notation_fn):
3170 Check for 0 arguments in builtin call. Check that bultin argument is
3171 correct.
3172 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3173 index.
3174
9698b078
SH
31752014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3176
3177 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3178 qualifiers in __auto_type for atomic types.
3179 (c_parser_typeof_specifier): Discard all type qualifiers in
3180 __typeof__ for atomic types.
3181
6e07c515
MP
31822014-06-25 Marek Polacek <polacek@redhat.com>
3183
3184 PR c/61162
3185 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3186 the return expression to c_finish_return.
3187
da6f124d
JJ
31882014-06-25 Jakub Jelinek <jakub@redhat.com>
3189
3190 * c-typeck.c (c_finish_omp_clauses): Make sure
3191 OMP_CLAUSE_LINEAR_STEP has correct type.
3192
c203e8a7
TS
31932014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3194
3195 * c-decl.c: Adjust.
3196
56ad0e38
JJ
31972014-06-24 Jakub Jelinek <jakub@redhat.com>
3198
3199 * c-parser.c (c_parser_omp_for_loop): For
3200 #pragma omp parallel for simd move lastprivate clause from parallel
3201 to for rather than simd.
3202
47c2554f
MP
32032014-06-23 Marek Polacek <polacek@redhat.com>
3204
3205 * c-typeck.c (parser_build_binary_op): Don't call
3206 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3207
56363ffd
JH
32082014-06-15 Jan Hubicka <hubicka@ucw.cz>
3209
3210 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3211 * c-decl.c (merge_decls): Likewise.
3212
d7ff7ae5
MP
32132014-06-09 Marek Polacek <polacek@redhat.com>
3214
3215 PR c/36446
3216 * c-typeck.c (error_init): Call inform instead of error_at.
3217 (pedwarn_init): Call inform instead of pedwarn.
3218 (warning_init): Call inform instead of warning_at.
3219
24d047a3
JH
32202014-06-07 Jan Hubicka <hubicka@ucw.cz>
3221
3222 * c-decl.c (merge_decls): Use set_decl_section_name.
3223 (duplicate_decls): Remove node if it exists.
3224
9bac5cbb
G
32252014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3226
3227 PR c/53119
3228 * c-typeck.c (push_init_level, process_init_element,
3229 pop_init_level): Correct check for zero initialization, move
3230 missing brace warning to respect zero initialization.
3231
8ffcdea8
MP
32322014-06-05 Marek Polacek <polacek@redhat.com>
3233
3234 PR c/56724
3235 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3236
742938c9
MP
32372014-06-05 Marek Polacek <polacek@redhat.com>
3238
3239 PR c/49706
3240 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3241 on the left hand side operand of a comparison.
3242
6447c55d
MP
32432014-06-05 Marek Polacek <polacek@redhat.com>
3244
3245 PR c/48062
3246 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3247 Print note only if the warning was printed.
3248
9dc7743c
IZ
32492014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3250
3251 PR c/58942
3252 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3253 with a pointer.
3254
fedfecef
MP
32552014-06-03 Marek Polacek <polacek@redhat.com>
3256
3257 PR c/60439
3258 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3259 c_start_case.
3260 * c-tree.h (c_start_case): Update.
3261 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3262 switch condition has boolean value.
3263
9b2b7279
AM
32642014-06-02 Andrew MacLeod <amacleod@redhat.com>
3265
3266 * c-decl.c: Include builtins.h.
3267 * c-parser.c: Likewise.
3268
5c1bc275
MP
32692014-05-27 Marek Polacek <polacek@redhat.com>
3270
3271 PR c/56724
3272 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3273 error and warning calls to error_at and warning_at. Pass location of
3274 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3275 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3276 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3277
97563bc8
IZ
32782014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3279
3280 PR c/61191
3281 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3282 function parameters.
3283
aede2c10
JH
32842014-05-23 Jan Hubicka <hubicka@ucw.cz>
3285
3286 * c-decl.c (merge_decls): Preserve symtab node pointers.
3287 (duplicate_decls): Free new decl.
3288
edbba2ce
TS
32892014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3290
f3316c6d
TS
3291 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3292 initialization.
3293
edbba2ce
TS
3294 * c-parser.c (c_parser_omp_target): Return bool values.
3295
68c81f24
TS
32962014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3297
3298 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3299 num_teams_loc variable to num_thread_limit_loc.
3300
632f2871
RS
33012014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3302
3303 * c-array-notation.c (expand_array_notations): Use void_node
3304 instead of void_zero_node.
3305
766090c2
TS
33062014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3307
3308 * c-decl.c (finish_struct): Adjust.
3309 (finish_enum): Likewise.
3310 (bind): Adjust.
3311 (record_inline_static): Likewise.
3312 (push_scope): Likewise.
3313 (make_label): Likewise.
3314 (lookup_label_for_goto): Likewise.
3315 (finish_struct): Likewise.
3316 (finish_enum): Likewise.
3317 (store_parm_decls): Likewise.
3318 (c_push_function_context): Likewise.
3319 * c-lang.h: Remove usage of variable_size gty attribute.
3320 * c-parser.c (c_parse_init): Adjust.
3321 (c_parse_file): Likewise.
3322
2b107f6b
MP
33232014-05-13 Marek Polacek <polacek@redhat.com>
3324
3325 PR c/61162
3326 * c-typeck.c (convert_for_assignment): Pass location to
3327 WARN_FOR_ASSIGNMENT instead of input_location.
3328
d033409e
MP
33292014-05-10 Marek Polacek <polacek@redhat.com>
3330
3331 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3332 maybe_warn_string_init.
3333 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3334 maybe_warn_string_init.
3335 * c-tree.h (maybe_warn_string_init): Update declaration.
3336 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3337 Call pedwarn_init with loc instead of with input_location.
3338 (digest_init): Pass init_loc to maybe_warn_string_init.
3339 (pop_init_level): Call pedwarn_init with loc instead of with
3340 input_location.
3341 (set_init_index): Likewise.
3342 (process_init_element): Likewise.
3343
ea58ef42
MP
33442014-05-09 Marek Polacek <polacek@redhat.com>
3345
3346 PR c/61096
3347 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3348 (c_parser_initelt): Pass location to set_init_label. Pass array index
3349 location to set_init_index.
3350 * c-tree.h (push_init_level): Update declaration.
3351 (pop_init_level): Likewise.
3352 (set_init_index): Likewise.
3353 (set_init_label): Likewise.
3354 * c-typeck.c (error_init): Add location parameter. Call error_at
3355 instead of error.
3356 (digest_init): Pass init_loc to error_init.
3357 (really_start_incremental_init):
3358 (push_init_level): Add location parameter. Pass loc to pop_init_level
3359 and error_init.
3360 (pop_init_level): Likewise.
3361 (set_designator): Add location parameter. Pass loc to pop_init_level,
3362 push_init_level, and error_init.
3363 (set_init_index): Add location parameter. Pass loc to error_init and
3364 set_designator.
3365 (set_init_label): Likewise.
3366 (output_init_element): Pass loc to error_init.
3367 (process_init_element): Pass loc to error_init, pop_init_level,
3368 pedwarn_init, and push_init_level.
3369
661a0813
MP
33702014-05-09 Marek Polacek <polacek@redhat.com>
3371
3372 PR c/50459
3373 * c-parser.c (c_parser_attributes): Parse the arguments as an
3374 expression-list if the attribute takes identifier.
3375
2793eeab
MP
33762014-05-08 Marek Polacek <polacek@redhat.com>
3377
3378 PR c/61053
3379 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3380 TYPE_ALIGN_UNIT.
3381
f827930a
MP
33822014-05-08 Marek Polacek <polacek@redhat.com>
3383
3384 PR c/61077
3385 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3386 of main.
3387
1d60af08
KZ
33882014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3389 Mike Stump <mikestump@comcast.net>
3390 Richard Sandiford <rdsandiford@googlemail.com>
3391
3392 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3393 (finish_enum): Use wide-int interfaces.
3394 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3395 * c-typeck.c (build_c_cast): Likewise.
3396 (set_nonincremental_init_from_string): Likewise.
3397 (c_tree_equal): Likewise.
3398
a0e24419
MP
33992014-05-02 Marek Polacek <polacek@redhat.com>
3400
3401 PR c/25801
3402 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3403 Return size_one_node when the type is not complete.
3404 (pointer_diff): Remove comment.
3405 (build_unary_op): Improve error messages.
3406
19fc9faa
MP
34072014-05-02 Marek Polacek <polacek@redhat.com>
3408
3409 * c-typeck.c (c_finish_return): Separate warning_at calls.
3410
63bc4e87
MP
34112014-05-02 Marek Polacek <polacek@redhat.com>
3412
3413 * c-tree.h (error_init): Remove declaration.
3414 (pedwarn_init): Likewise.
3415 * c-typeck.c (error_init): Make static and move above.
3416 (pedwarn_init): Likewise.
3417 (warning_init): Move above.
3418 (maybe_warn_string_init): Likewise.
3419
4bd2511b
JL
34202014-05-01 Jeff Law <law@redhat.com>
3421
3422 Revert:
3423
3424 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3425 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3426 avoid goto.
3427
6a358dcb
MP
34282014-05-02 Marek Polacek <polacek@redhat.com>
3429
3430 PR c/60784
3431 * c-typeck.c (push_init_level): Set constructor_designated to
3432 p->designated for structures.
3433
ae5ebda4
MP
34342014-05-01 Marek Polacek <polacek@redhat.com>
3435
3436 PR c/60915
3437 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3438 function-definition has an attribute after the declarator.
3439
96b40f8d
MP
34402014-05-01 Marek Polacek <polacek@redhat.com>
3441
3442 PR c/60257
3443 * c-typeck.c (warning_init): Add location_t parameter. Call
3444 warning_at instead of warning.
3445 (push_init_level): Pass input_location to warning_init.
3446 (add_pending_init): Add location_t parameter. Pass loc to
3447 warning_init.
3448 (set_nonincremental_init): Pass input_location to add_pending_init.
3449 (set_nonincremental_init_from_string): Likewise.
3450 (output_init_element): Pass loc to warning_init and to
3451 add_pending_init.
3452
32e00768
MP
34532014-05-01 Marek Polacek <polacek@redhat.com>
3454
3455 PR c/43395
3456 * c-typeck.c (c_finish_return): Distinguish between label and variable
3457 when warning about returning local address.
3458
c9379ce2
MP
34592014-05-01 Marek Polacek <polacek@redhat.com>
3460
3461 PR c/29467
3462 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3463 in C89 mode.
3464
d00887e8
MP
34652014-05-01 Marek Polacek <polacek@redhat.com>
3466
3467 PR c/43245
3468 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3469 instead of 0 to WARN_FOR_QUALIFIERS.
3470
5436fa2e
MP
34712014-05-01 Marek Polacek <polacek@redhat.com>
3472
3473 PR c/56989
3474 * c-typeck.c (default_conversion): Use better location for
3475 error call.
3476
f8ed5150
MP
34772014-04-30 Marek Polacek <polacek@redhat.com>
3478
3479 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3480 also when SANITIZE_FLOAT_DIVIDE is on.
3481
8337d1db
MP
34822014-04-30 Marek Polacek <polacek@redhat.com>
3483
3484 PR c/60139
3485 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3486 and pedwarn_init. Use loc insted of input_location.
3487
c4bdc42f
MP
34882014-04-30 Marek Polacek <polacek@redhat.com>
3489
3490 PR c/60351
3491 * c-typeck.c (build_binary_op): Use location when warning about
3492 shift count.
3493
45484dcf
MP
34942014-04-25 Marek Polacek <polacek@redhat.com>
3495
3496 PR c/18079
3497 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3498 always_inline/noinline and hot/cold attributes.
3499
34cf811f
MP
35002014-04-25 Marek Polacek <polacek@redhat.com>
3501
3502 PR c/60114
3503 * c-parser.c (c_parser_initelt): Pass input_location to
3504 process_init_element.
3505 (c_parser_initval): Pass loc to process_init_element.
3506 * c-tree.h (process_init_element): Adjust declaration.
3507 * c-typeck.c (push_init_level): Pass input_location to
3508 process_init_element.
3509 (pop_init_level): Likewise.
3510 (set_designator): Likewise.
3511 (output_init_element): Add location_t parameter. Pass loc to
3512 digest_init.
3513 (output_pending_init_elements): Pass input_location to
3514 output_init_element.
3515 (process_init_element): Add location_t parameter. Pass loc to
3516 output_init_element.
3517
42056eac
JJ
35182014-04-24 Jakub Jelinek <jakub@redhat.com>
3519
3520 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3521 atomic-clause, allow comma in between atomic-clause and
3522 seq_cst.
3523
e162a134
JJ
35242014-04-22 Jakub Jelinek <jakub@redhat.com>
3525
3526 PR c/59073
3527 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3528 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3529
2f6babac
IZ
35302014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3531
3532 PR middle-end/60469
3533 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3534 create_tmp_var instead build_decl for creating temps.
3535 (build_array_notation_expr): Likewise.
3536 (fix_conditional_array_notations_1): Likewise.
3537 (fix_array_notation_expr): Likewise.
3538 (fix_array_notation_call_expr): Likewise.
3539
8edbfaa6
JJ
35402014-03-28 Jakub Jelinek <jakub@redhat.com>
3541
3542 PR c++/60689
3543 * c-tree.h (c_build_function_call_vec): New prototype.
3544 * c-typeck.c (build_function_call_vec): Don't call
3545 resolve_overloaded_builtin here.
3546 (c_build_function_call_vec): New wrapper function around
3547 build_function_call_vec. Call resolve_overloaded_builtin here.
3548 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3549 Call c_build_function_call_vec instead of build_function_call_vec.
3550 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3551 * c-decl.c (finish_decl): Likewise.
3552
7485aeea
MLI
35532014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3554
3555 PR c/55383
3556 * c-typeck.c: Use correct format string in cast-qual warning
3557
b17a8b07
TS
35582014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3559
3560 * c-decl.c (c_decl_attributes): Use
3561 lang_hooks.types.omp_mappable_type.
3562 * c-typeck.c (c_finish_omp_clauses): Likewise.
3563
3af9c5e9
MP
35642014-03-06 Marek Polacek <polacek@redhat.com>
3565
3566 PR c/60197
3567 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3568 of checking tree code.
3569
1c9f5f33
PK
35702014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3571
3572 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3573 (c_parser_parameter_declaration): Likewise.
3574
cc28fc7f
MP
35752014-02-19 Marek Polacek <polacek@redhat.com>
3576
3577 PR c/60195
3578 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3579 Call mark_exp_read on exp.value.
3580 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3581 TREE_ADDRESSABLE on old instead of val.
3582 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3583
b581c05c
PK
35842014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3585
3586 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3587 C_EXPR_APPEND by vec_safe_push.
3588 * c-tree.h (C_EXPR_APPEND): Remove.
3589
81e5eca8
MP
35902014-01-31 Marek Polacek <polacek@redhat.com>
3591
3592 PR c/59963
3593 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3594 build_function_call_vec.
3595 (build_function_call): Likewise.
3596 (build_atomic_assign): Likewise.
3597 (build_function_call_vec): Add arg_loc parameter. Use it.
3598 (convert_arguments): Likewise.
3599 (convert_for_assignment): Rename rhs_loc to expr_loc.
3600 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3601 (c_parser_objc_keywordexpr): Likewise.
3602 (c_parser_postfix_expression_after_primary): Call
3603 build_function_call_vec with expr_loc rather than op_loc.
3604 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3605 build_function_call_vec.
3606 (c_parser_expr_list): Add locations parameter. Fill it with locations
3607 of function arguments.
3608 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3609
68fca595
MP
36102014-01-30 Marek Polacek <polacek@redhat.com>
3611
3612 PR c/59940
3613 * c-typeck.c (build_function_call_vec): Use loc parameter.
3614 (convert_arguments): Add location parameter. Use it.
3615 (ep_convert_and_check): Likewise.
3616 (build_atomic_assign): Adjust convert_for_assignment call.
3617 (build_modify_expr): Likewise.
3618 (digest_init): Likewise.
3619 (c_finish_return): Likewise.
3620 (build_conditional_expr): Adjust ep_convert_and_check calls.
3621 (convert_for_assignment): Add rhs_loc parameter. Use it.
3622 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3623 calls.
3624
fa337f3a
RB
36252014-01-30 Richard Biener <rguenther@suse.de>
3626
3627 PR c/59905
3628 * c-typeck.c (build_function_call_vec): Do not replace calls
3629 to a function via an incompatible type with a runtime abort.
3630
b72271b9
BI
36312014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3632
3633 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3634 flag_enable_cilkplus with flag_cilkplus.
3635 (c_parser_direct_declarator_inner): Likewise.
3636 (c_parser_attribute_any_word): Likewise.
3637 (c_parser_attributes): Likewise.
3638 (c_parser_compound_statement): Likewise.
3639 (c_parser_statement_after_labels): Likewise.
3640 (c_parser_if_statement): Likewise.
3641 (c_parser_switch_statement): Likewise.
3642 (c_parser_do_statement): Likewise.
3643 (c_parser_for_statement): Likewise.
3644 (c_parser_unary_expression): Likewise.
3645 (c_parser_postfix_expression): Likewise.
3646 (c_parser_postfix_expression_after_primary): Likewise.
3647 (c_parser_postfix_expression_after_primary): Likewise.
3648 (c_parser_omp_clause_name): Likewise.
3649 (c_finish_omp_declare_simd): Likewise.
3650 (c_parser_cilk_verify_simd): Likewise.
3651 * c-typeck.c (build_array_ref): Likewise.
3652 (build_function_call_vec): Likewise.
3653 (convert_arguments): Likewise.
3654 (build_compound_expr): Likewise.
3655 (c_finish_return): Likewise.
3656 (c_finish_if_stmt): Likewise.
3657 (c_finish_loop): Likewise.
3658 (build_binary_op): Likewise.
3659
393e8e8b
MP
36602014-01-23 Marek Polacek <polacek@redhat.com>
3661
3662 PR c/59846
3663 * c-typeck.c (parser_build_binary_op): Use location instead of
3664 input_location.
3665 (build_binary_op): Pass location to shorten_compare.
3666
f04dda30
MP
36672014-01-23 Marek Polacek <polacek@redhat.com>
3668
3669 PR c/58346
3670 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3671 an empty aggregate.
3672
789eadcd
MP
36732014-01-23 Marek Polacek <polacek@redhat.com>
3674
3675 PR c/59871
3676 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3677 of a comma expression.
3678 (emit_side_effect_warnings): Likewise.
3679
40f14e9f
BI
36802014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3681
3682 PR c/59825
3683 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3684 function to use walk_tree and moved a lot of its functionality to
3685 expand_array_notations.
3686 (expand_array_notations): New function.
3687
74558dd9
BI
36882014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3689
3690 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3691 attribute an attribute without value.
3692
652fea39
JJ
36932014-01-23 Jakub Jelinek <jakub@redhat.com>
3694
3695 PR middle-end/58809
3696 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3697 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3698
f34f1c87
MP
36992014-01-22 Marek Polacek <polacek@redhat.com>
3700
3701 PR c/59891
3702 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3703 of remove_c_maybe_const_expr on op1 and op2.
3704
241f845a
JJ
37052014-01-15 Jakub Jelinek <jakub@redhat.com>
3706
3707 PR c/58943
3708 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3709 effects, preevaluate rhs using SAVE_EXPR first.
3710
9a74f20c
BI
37112014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3712
3713 PR c++/59631
3714 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3715 statements with if-elseif statements.
3716
96066ce1
MP
37172014-01-06 Marek Polacek <polacek@redhat.com>
3718
3719 PR c/57773
3720 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3721 defined bit-field types only in ISO C.
3722
23a5b65a
RS
37232014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3724
3725 Update copyright years
3726
f9030485
RS
37272014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3728
3729 * c-array-notation.c: Use the standard form for the copyright notice.
3730
41958c28
BI
37312013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3732
3733 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3734 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3735 field in parser is not empty. If not-empty, call the function
3736 c_parser_finish_omp_declare_simd.
3737 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3738 between SIMD-enabled functions and #pragma simd. Added new parameter.
3739 (c_parser_cilk_all_clauses): Modified the usage of the function
3740 c_parser_cilk_clause_vectorlength as mentioned above.
3741 (c_parser_cilk_simd_fn_vector_attrs): New function.
3742 (c_finish_cilk_simd_fn_tokens): Likewise.
3743 (is_cilkplus_vector_p): Likewise.
3744 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3745 "nomask," and "mask" strings in clause name.
3746 (c_parser_omp_all_clauses): Added 3 new case statements:
3747 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3748 PRAGMA_CILK_CLAUSE_NOMASK.
3749 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3750 check for vector attribute and if so call the function
3751 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3752 called the function c_finish_cilk_simd_fn_tokens.
3753 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3754 parser field is non-empty. If so, parse them as you would parse
3755 the omp declare simd pragma.
3756 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3757 Added a check when step is a parameter and flag it as error.
3758 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3759 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3760 pragma_omp_clause.
3761
cef0fd0e
TS
37622013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3763
3764 * c-parser.c (c_parser_omp_parallel): Fix description.
3765
12893402
BI
37662013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3767
3768 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3769 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3770 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3771 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3772
296674db
JM
37732013-12-04 Joseph Myers <joseph@codesourcery.com>
3774
3775 PR c/52023
3776 * c-parser.c (c_parser_alignas_specifier): Use
3777 c_sizeof_or_alignof_type instead of c_alignof.
3778 (c_parser_alignof_expression): Likewise, with min_alignof
3779 parameter depending on alignof spelling used.
3780
edd28054
MP
37812013-12-04 Marek Polacek <polacek@redhat.com>
3782
3783 PR c/54113
3784 * c-decl.c (start_function): Don't warn for missing prototype for
3785 inline functions.
3786
da0fc454
MP
37872013-12-03 Marek Polacek <polacek@redhat.com>
3788
3789 PR c/59351
3790 * c-decl.c (build_compound_literal): Allow compound literals with
3791 empty initial value.
3792
4c2ecab0
JM
37932013-12-02 Joseph Myers <joseph@codesourcery.com>
3794
3795 PR c/58235
3796 * c-typeck.c (build_modify_expr): Diagnose assignment to
3797 expression with array type.
3798
340baef7
JM
37992013-11-29 Joseph Myers <joseph@codesourcery.com>
3800
3801 PR c/42262
3802 * c-typeck.c (process_init_element): Do not treat a string as
3803 initializing a whole array when used with a designator for an
3804 individual element.
3805
6763b9f7
JM
38062013-11-29 Joseph Myers <joseph@codesourcery.com>
3807
3808 PR c/57574
3809 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3810 an inline function following a static declaration.
3811
e7bd1de1
JJ
38122013-11-28 Jakub Jelinek <jakub@redhat.com>
3813
3814 PR c/59310
3815 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3816 to p_name before calling c_parser_omp_teams instead of after.
3817 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3818 argument. Remove unused p_name variable.
3819
0136f8f0
AH
38202013-11-27 Aldy Hernandez <aldyh@redhat.com>
3821 Jakub Jelinek <jakub@redhat.com>
3822
3823 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3824 external_scope is NULL.
3825
241b71bb
TV
38262013-11-27 Tom de Vries <tom@codesourcery.com>
3827 Marc Glisse <marc.glisse@inria.fr>
3828
3829 PR c++/59032
3830 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3831
2fb9a547
AM
38322013-11-22 Andrew MacLeod <amacleod@redhat.com>
3833
3834 * c-typeck.c: Add required include files from gimple.h.
3835
8400e75e
DM
38362013-11-22 David Malcolm <dmalcolm@redhat.com>
3837
3838 * c-decl.c (define_label, shadow_tag_warned)
3839 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3840 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3841 (declspecs_add_type): Remove use of in_system_header macro.
3842 * c-parser.c (c_parser_unary_expression): Likewise.
3843 * c-typeck.c (store_init_value, process_init_element)
3844 (c_start_case): Likewise.
3845
3846 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3847 macro.
3848
3849 * c-parser.c (c_parser_set_source_position_from_token): Remove
3850 reference to in_system_header from comment.
3851
386b1f1f
RS
38522013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3853
3854 * c-decl.c (grokdeclarator): Update comment to refer to
3855 tree_to_[su]hwi rather than tree_low_cst.
3856
ae7e9ddd
RS
38572013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3858
3859 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3860 tree_to_uhwi throughout.
3861
9439e9a1
RS
38622013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3863
3864 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3865 throughout.
3866
9541ffee
RS
38672013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3868
3869 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3870 throughout.
3871
c02065fc
AH
38722013-11-15 Aldy Hernandez <aldyh@redhat.com>
3873
3874 * c-parser.c (c_parser_cilk_simd): New.
3875 (c_parser_cilk_verify_simd): New.
3876 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3877 (c_parser_omp_for_loop): Add case for NE_EXPR.
3878 Set c_break_label for CILK_SIMD.
3879 (c_parser_cilk_clause_vectorlength): New.
3880 (c_parser_cilk_clause_linear): New.
3881 (c_parser_cilk_clause_name): New.
3882 (c_parser_cilk_all_clauses): New.
3883 * c-typeck.c (build_unary_op): Pass location argument to
3884 readonly_error.
3885 (build_modify_expr): Same.
3886 (build_asm_expr): Same.
3887 (c_finish_bc_stmt): Error on break/continue in loops.
3888
18f429e2
AM
38892013-11-14 Andrew MacLeod <amacleod@redhat.com>
3890
3891 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3892
d8a2d370
DN
38932013-11-14 Diego Novillo <dnovillo@google.com>
3894
3895 * c-decl.c: Include print-tree.h.
3896 Include stor-layout.h.
3897 Include varasm.h.
3898 Include attribs.h.
3899 Include stringpool.h.
3900 * c-lang.c: Include fold-const.h.
3901 * c-parser.c: Include stringpool.h.
3902 Include attribs.h.
3903 Include stor-layout.h.
3904 Include varasm.h.
3905 Include trans-mem.h.
3906 * c-typeck.c: Include stor-layout.h.
3907 Include trans-mem.h.
3908 Include varasm.h.
3909 Include stmt.h.
3910
38b7bc7f
JM
39112013-11-13 Joseph Myers <joseph@codesourcery.com>
3912
3913 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3914 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3915 __auto_type.
3916 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3917 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3918 RID_AUTO_TYPE.
3919 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3920 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3921 (c_parser_declarator, c_parser_direct_declarator_inner)
3922 (c_parser_parameter_declaration, c_parser_type_name): All callers
3923 changed.
3924 (c_parser_declaration_or_fndef): Handle declarations with type
3925 determined from the initializer.
3926
45b0be94
AM
39272013-11-12 Andrew MacLeod <amacleod@redhat.com>
3928
18f429e2 3929 * c-typeck.c: Include gimplify.h.
45b0be94 3930
582d9b50
JM
39312013-11-12 Joseph Myers <joseph@codesourcery.com>
3932
3933 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3934 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3935 comment.
3936 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3937 or _Thread_local as appropriate in diagnostics.
3938 (build_null_declspecs): Initialize ret->thread_gnu_p.
3939 (declspecs_add_scspec): Handle either __thread or _Thread_local
3940 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3941 pedantic. Do not disallow _Thread_local extern and _Thread_local
3942 static.
3943
267bac10
JM
39442013-11-07 Joseph Myers <joseph@codesourcery.com>
3945 Andrew MacLeod <amacleod@redhat.com>
3946
3947 * c-aux-info.c (gen_type): Handle atomic qualifier.
3948 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3949 qualifiers when compating types.
3950 (shadow_tag_warned): Handle atomic_p in declspecs.
3951 (quals_from_declspecs): Likewise.
3952 (start_decl): Use c_type_promotes_to when promoting argument
3953 types.
3954 (grokdeclarator): Handle _Atomic.
3955 (get_parm_info): Diagnose any qualifier on "void" as only
3956 parameter.
3957 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3958 comparing types. Use c_type_promotes_to when promoting argument
3959 types.
3960 (finish_function): Use c_type_promotes_to when promoting argument
3961 types.
3962 (build_null_declspecs): Handle atomic_p in declspecs.
3963 (declspecs_add_qual): Handle RID_ATOMIC.
3964 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3965 (c_token_starts_declspecs): Handle RID_ATOMIC.
3966 (c_parser_declspecs): Handle atomic type specifiers and
3967 qualifiers.
3968 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3969 from types of expressions with atomic type.
3970 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3971 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3972 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3973 (c_parser_statement_after_labels, c_parser_switch_statement)
3974 (c_parser_for_statement, c_parser_expr_no_commas)
3975 (c_parser_conditional_expression, c_parser_binary_expression)
3976 (c_parser_cast_expression, c_parser_unary_expression)
3977 (c_parser_postfix_expression)
3978 (c_parser_postfix_expression_after_primary, c_parser_expression):
3979 Use convert_lvalue_to_rvalue.
3980 (c_parser_expression_conv, c_parser_expr_list): Document
3981 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3982 (c_parser_objc_synchronized_statement): Use
3983 convert_lvalue_to_rvalue.
3984 (c_parser_objc_selector): Handle RID_ATOMIC.
3985 (c_parser_objc_receiver, c_parser_array_notation): Use
3986 convert_lvalue_to_rvalue.
3987 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3988 _Atomic (type-name).
3989 (struct c_declspecs): Add atomic_p field.
3990 (convert_lvalue_to_rvalue): Declare.
3991 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3992 corresponding atomic types.
3993 (qualify_type): Don't add _Atomic qualifiers from second argument.
3994 (comp_target_types): Do not allow _Atomic mismatches.
3995 (type_lists_compatible_p): Do not remove atomic qualifiers when
3996 comparing types.
3997 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3998 (build_atomic_assign): New functions.
3999 (build_unary_op): Use build_atomic_assign for atomic increment and
4000 decrement.
4001 (build_conditional_expr): Do not treat _Atomic void as a qualified
4002 version of void.
4003 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4004 (find_anonymous_field_with_type, convert_to_anonymous_field)
4005 (convert_for_assignment): Do not remove atomic qualifiers when
4006 comparing types.
4007 (digest_init): Do not accept initialization of arrays of atomic
4008 elements by string constants.
4009 (build_asm_expr): Use convert_lvalue_to_rvalue.
4010 (build_binary_op): Do not treat _Atomic void as a qualified
4011 version of void.
4012
0c249d4b
DD
40132013-11-06 DJ Delorie <dj@redhat.com>
4014
4015 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4016 both explicit and builtin, print the location of the explicit one.
4017
6d7f7e0a
TB
40182013-11-05 Tobias Burnus <burnus@net-b.de>
4019
4020 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4021 c_parser_omp_distribute, c_parser_omp_teams,
4022 c_parser_omp_target, c_parser_omp_declare): Handle
4023 -fopenmp-simd.
4024
b906f4ca
MP
40252013-11-03 Marek Polacek <polacek@redhat.com>
4026
4027 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4028
ee1d5a02
JJ
40292013-11-01 Jakub Jelinek <jakub@redhat.com>
4030
4031 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4032 check_dup_generic at the end, unless remove is true.
4033 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4034 remove = true;.
4035 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4036
5a9785fb
JJ
40372013-10-31 Jakub Jelinek <jakub@redhat.com>
4038
4039 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4040 with decl that is not pointer nor array.
4041
939b37da
BI
40422013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4043
4044 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4045 a spawning function is found.
4046 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4047 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4048 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4049 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4050 case.
4051 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4052 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4053 expr.
4054 (c_finish_return): Added a check to reject _Cilk_spawn in return
4055 expression.
4056 (build_cilk_spawn): New function.
4057 (build_cilk_sync): Likewise.
4058 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4059
d4af74d4
TB
40602013-10-27 Tobias Burnus <burnus@net-b.de>
4061
4062 PR other/33426
4063 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4064 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4065 (c_parser_statement_after_labels): Update calls.
4066
d73749df 40672013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4068
4069 PR other/33426
4070 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4071 Handle PRAGMA_IVDEP.
4072 (c_parser_statement_after_labels): Update call.
4073
f28aa681
MP
40742013-10-24 Marek Polacek <polacek@redhat.com>
4075
4076 * c-parser.c (c_parser_struct_declaration): Add a comment.
4077 (c_parser_declarator): Don't allow _Alignas here.
4078
0645c1a2
AM
40792013-10-17 Andrew MacLeod <amacleod@redhat.com>
4080
4081 * c-parser.c: Include omp-low.h.
4082 * c-typeck.c: Likewise.
4083
568a31f2
MP
40842013-10-17 Marek Polacek <polacek@redhat.com>
4085
4086 PR c/58267
4087 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4088 Document syntax of the array-declarator.
4089 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4090 are not permitted.
4091 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4092 (c_parser_struct_declaration): Likewise.
4093 (c_parser_declarator): Likewise.
4094 (c_parser_direct_declarator_inner): Likewise.
4095 (c_parser_parameter_declaration): Likewise.
4096 (c_parser_type_name): Likewise.
4097
acf0174b
JJ
40982013-10-11 Jakub Jelinek <jakub@redhat.com>
4099
4100 * c-lang.h (current_omp_declare_target_attribute): New extern
4101 decl.
4102 * c-parser.c: Include c-lang.h.
4103 (struct c_parser): Change tokens to c_token *.
4104 Add tokens_buf field. Change tokens_avail type to unsigned int.
4105 (c_parser_consume_token): If parser->tokens isn't
4106 &parser->tokens_buf[0], increment parser->tokens.
4107 (c_parser_consume_pragma): Likewise.
4108 (enum pragma_context): Add pragma_struct and pragma_param.
4109 (c_parser_external_declaration): Adjust
4110 c_parser_declaration_or_fndef caller.
4111 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4112 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4113 Adjust recursive call.
4114 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4115 of pragma_external.
4116 (c_parser_parameter_declaration): Use pragma_param instead of
4117 pragma_external.
4118 (c_parser_compound_statement_nostart, c_parser_label,
4119 c_parser_for_statement): Adjust
4120 c_parser_declaration_or_fndef callers.
4121 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4122 it through to c_parser_conditional_expression.
4123 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4124 pass it through to c_parser_binary_expression. Adjust recursive
4125 call.
4126 (c_parser_binary_expression): Remove prec argument, add
4127 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4128 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4129 binop matches it, use build2 instead of parser_build_binary_op.
4130 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4131 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4132 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4133 Handle pragma_struct and pragma_param the same as pragma_external.
4134 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4135 (c_parser_omp_variable_list): Parse array sections for
4136 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4137 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4138 (c_parser_omp_clause_reduction): Handle user defined reductions.
4139 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4140 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4141 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4142 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4143 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4144 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4145 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4146 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4147 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4148 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4149 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4150 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4151 (c_parser_omp_for_loop): Add CODE argument, pass it through
4152 to c_finish_omp_for. Change last argument to cclauses,
4153 and adjust uses to grab parallel clauses from the array of all
4154 the split clauses. Adjust c_parser_binary_expression,
4155 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4156 (omp_split_clauses): New function.
4157 (c_parser_omp_simd): New function.
4158 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4159 Allow the function to be called also when parsing combined constructs,
4160 and call c_parser_omp_simd when parsing for simd.
4161 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4162 #pragma omp section, require exactly one structured-block instead of
4163 sequence of statements.
4164 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4165 Allow the function to be called also when parsing combined constructs.
4166 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4167 Allow the function to be called also when parsing combined
4168 constructs.
4169 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4170 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4171 c_parser_omp_teams, c_parser_omp_target_data,
4172 c_parser_omp_target_update, c_parser_omp_target,
4173 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4174 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4175 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4176 (c_parser_omp_construct): Add p_name and mask vars. Handle
4177 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4178 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4179 and c_parser_omp_sections callers.
4180 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4181 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4182 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4183 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4184 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4185 OMP_CLAUSE_DEPEND.
4186 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4187 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4188 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4189 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4190 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4191 * c-typeck.c: Include tree-inline.h.
4192 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4193 handle_omp_array_sections_1, handle_omp_array_sections,
4194 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4195 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4196 user defined reductions.
4197 (c_tree_equal): New function.
4198 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4199 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4200 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4201 c_check_omp_declare_reduction_r): New prototypes.
4202 * c-decl.c (current_omp_declare_target_attribute): New variable.
4203 (c_decl_attributes): New function.
4204 (start_decl, start_function): Use it instead of decl_attributes.
4205 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4206 c_omp_reduction_decl, c_omp_reduction_lookup,
4207 c_check_omp_declare_reduction_r): New functions.
4208
0a6c2227
TT
42092013-09-25 Tom Tromey <tromey@redhat.com>
4210
4211 * Make-lang.in (c/gccspec.o): Remove.
4212 (CFLAGS-c/gccspec.o): New variable.
4213 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4214 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4215 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4216
f3bc55f0
TT
42172013-09-25 Tom Tromey <tromey@redhat.com>
4218
4219 * Make-lang.in (c/gccspec.o): Don't use subshell.
4220
a24d975c
MP
42212013-09-18 Marek Polacek <polacek@redhat.com>
4222
4223 PR sanitize/58443
4224 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4225 Remove unnecessary check.
4226
ce6923c5
MP
42272013-09-18 Marek Polacek <polacek@redhat.com>
4228
4229 PR sanitizer/58411
4230 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4231 no_sanitize_undefined attribute.
4232
a1e51df9
KT
42332013-09-13 Kai Tietz <ktietz@redhat.com>
4234
4235 PR target/57848
4236 * c-decl.c (c_builtin_function_ext_scope): Remove
4237 wrong assumption that it is never called on prexisting
4238 symbol.
4239
0af94e6f
JR
42402013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4241
4242 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4243
20059c8b
GDR
42442013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4245
4246 * c-objc-common.c (c_tree_printer): Tidy.
4247
de5a5fa1
MP
42482013-08-30 Marek Polacek <polacek@redhat.com>
4249
4250 * c-typeck.c (build_binary_op): Add division by zero and shift
4251 instrumentation.
4252
2531a1d9 42532013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4254 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4255
6e2bcc98 4256 PR c/35649
2531a1d9
JR
4257 * c-typeck.c (c_common_type): Prefer double_type_node over
4258 other REAL_TYPE types with the same precision.
4259 (convert_arguments): Likewise.
4260
025311c4
GDR
42612013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4262
4263 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4264 (c_initialize_diagnostics): Call a destructor for the early printer.
4265
da6ca2b5
GDR
42662013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4267
4268 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4269 printer initialization.
4270
318cda85 42712013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4272
318cda85
BI
4273 PR c/57490
4274 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4275 check for truth values.
4276 (expand_array_notation_exprs): Added truth values case. Removed an
4277 unwanted else. Added for-loop to walk through subtrees in default
4278 case.
4279
b066401f
GDR
42802013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4281
4282 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4283
fb48aadc
JM
42842013-07-23 Joseph Myers <joseph@codesourcery.com>
4285
4286 * c-parser.c (struct c_generic_association): Fix typo.
4287
433cc7b0
TT
42882013-07-23 Tom Tromey <tromey@redhat.com>
4289 Joseph Myers <joseph@codesourcery.com>
4290
4291 * c-parser.c (struct c_generic_association): New.
4292 (c_generic_association_d): New typedef.
4293 (c_parser_generic_selection): New function.
4294 (c_parser_postfix_expression): Handle RID_GENERIC.
4295
26d40c3d
JM
42962013-07-13 Jason Merrill <jason@redhat.com>
4297
4298 PR c++/57793
4299 * c-decl.c (finish_struct): Check for too-large class.
4300
ecdbd01a 43012013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4302
4303 PR c/57821
4304 * c-typeck.c (set_init_index): When folding, check for index overflow.
4305
1141ed3f
BI
43062013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4307
4308 * c-parser.c (c_parser_array_notation): Removed rejection of array
4309 notations in an array of function pointers.
4310
713b46fa
BI
43112013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4312
4313 * c-array-notation.c (make_triplet_val_inv): New function.
4314 (create_cmp_incr): Likewise.
4315 (create_array_refs): Likewise.
4316 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4317 Also modularized common parts between functions and called the function.
4318 (build_array_notation_expr): Likewise.
4319 (fix_conditional_array_notations_1): Likewise.
4320 (fix_array_notation_expr): Likewise.
4321 (fix_array_notation_call_expr): Likewise.
4322
92f20202
MP
43232013-06-18 Marek Polacek <polacek@redhat.com>
4324
4325 PR c/57630
4326 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4327
73a23b06
BI
43282013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4329
4330 * c-array-notation.c (build_array_notation_expr): Reject array notation
4331 mismatch between LHS and RHS even inside a call_expr. Also, removed
4332 a couple while statements that were dead code.
4333
00b8517d
BI
43342013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4335
4336 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4337 excessive precision expressions in function parameters. Also removed
4338 couple unwanted while statements.
4339
1509bdda
BI
43402013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4341
4342 * c-array-notation.c (expand_array_notation_exprs): Added
4343 ARRAY_NOTATION_REF case.
4344
d60f1706
BI
43452013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4346
4347 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4348 function to c-family/array-notation-common.c.
4349 (is_cilkplus_reduce_builtin): Likewise.
4350 (find_rank): Likewise.
4351 (extract_array_notation_exprs): Likewise.
4352 (replace_array_notations): Likewise.
4353 (find_inv_trees): Likewise.
4354 (replace_inv_trees): Likewise.
4355 (contains_array_notation_expr): Likewise.
4356 (find_correct_array_notation_type): Likewise.
4357 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4358 (struct inv_list): Moved this to c-family/array-notation-common.c.
4359 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4360
6d6efbb3
BI
43612013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4362
4363 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4364 reduction functions outside the for-loop. Added a check if the fundecl
4365 is non-NULL. Finally, removed an unwanted if-statement, and made the
4366 body unconditional.
4367
25c22937
BI
43682013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4369
4370 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4371 condition of the if-statement matches the rank of else-block and then-
4372 block when array notations are used.
4373 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4374 expression after the entire function body is parsed.
4375 (c_parser_expr_no_commas): Delayed creating array notation expressions
4376 to the end of function parsing.
4377 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4378 whole if-statement instead of just the condition.
4379 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4380
edd25645
BI
43812013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4382
4383 PR c/57474
4384 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4385 array to NULL_TREE if they are unused. Also added a check for the
4386 field to be NULL before its fields are used in future.
4387
065ce7f1
RO
43882013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4389
4390 PR bootstrap/57450
4391 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4392 (build_array_notation_expr): Likewise.
4393
36536d79
BI
43942013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4395
4396 * c-typeck.c (build_array_ref): Added a check to see if array's
4397 index is greater than one. If true, then emit an error.
4398 (build_function_call_vec): Exclude error reporting and checking
4399 for builtin array-notation functions.
4400 (convert_arguments): Likewise.
4401 (c_finish_return): Added a check for array notations as a return
4402 expression. If true, then emit an error.
4403 (c_finish_loop): Added a check for array notations in a loop
4404 condition. If true then emit an error.
4405 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4406 (build_binary_op): Added a check for array notation expr inside
4407 op1 and op0. If present, we call another function to find correct
4408 type.
4409 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4410 * c-parser.c (c_parser_compound_statement): Check if array
4411 notation code is used in tree, if so, then transform them into
4412 appropriate C code.
4413 (c_parser_expr_no_commas): Check if array notation is used in LHS
4414 or RHS, if so, then build array notation expression instead of
4415 regular modify.
4416 (c_parser_postfix_expression_after_primary): Added a check for
4417 colon(s) after square braces, if so then handle it like an array
4418 notation. Also, break up array notations in unary op if found.
4419 (c_parser_direct_declarator_inner): Added a check for array
4420 notation.
4421 (c_parser_compound_statement): Added a check for array notation in
4422 a stmt. If one is present, then expand array notation expr.
4423 (c_parser_if_statement): Likewise.
4424 (c_parser_switch_statement): Added a check for array notations in
4425 a switch statement's condition. If true, then output an error.
4426 (c_parser_while_statement): Similarly, but for a while.
4427 (c_parser_do_statement): Similarly, but for a do-while.
4428 (c_parser_for_statement): Similarly, but for a for-loop.
4429 (c_parser_unary_expression): Check if array notation is used in a
4430 pre-increment or pre-decrement expression. If true, then expand
4431 them.
4432 (c_parser_array_notation): New function.
4433 * c-array-notation.c: New file.
4434 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4435
cd192ccc
MS
44362013-05-23 Mike Stump <mikestump@comcast.net>
4437
4438 * c-typeck.c (convert_for_assignment): Handle references to memory
4439 spaces better.
4440
427b248d
JM
44412013-05-16 Jason Merrill <jason@redhat.com>
4442
4443 * Make-lang.in (cc1$(exeext)): Use link mutex.
4444
44d90fe1
PC
44452013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4446
4447 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4448 to simply use OPT_Wpointer_arith.
4449 (build_unary_op): Likewise.
4450
4e7d7b3d
JJ
44512013-04-03 Jakub Jelinek <jakub@redhat.com>
4452
4453 PR c/19449
4454 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4455 argument. If set, or it temporarily for parsing of the first
4456 argument into force_folding_builtin_constant_p.
4457 (c_parser_postfix_expression): Adjust callers.
4458
839b422f
RB
44592013-03-21 Richard Biener <rguenther@suse.de>
4460
4461 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4462 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4463
2ee028f1
MP
44642013-02-12 Marek Polacek <polacek@redhat.com>
4465
4466 PR c/44938
4467 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4468 origtypes to NULL.
4469
8824edff
JJ
44702013-01-24 Jakub Jelinek <jakub@redhat.com>
4471
4472 PR c/56078
4473 * c-typeck.c (set_nonincremental_init_from_string): If
4474 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4475 returned false.
4476 (process_init_element): Likewise.
4477
eadd3d0d
JJ
44782012-12-20 Jakub Jelinek <jakub@redhat.com>
4479
4480 PR c++/55619
4481 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4482 argument, don't call default_function_array_conversion
4483 nor c_fully_fold here.
4484 (c_parser_asm_statement): Adjust callers.
4485 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4486 and outputs here, and call default_function_array_conversion
4487 on inputs that don't need to be addressable.
4488
f8a93a2e
JJ
44892012-12-18 Jakub Jelinek <jakub@redhat.com>
4490
4491 PR c/39464
4492 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4493 warning require that both c_common_unsigned_type as well as
4494 c_common_signed_type is the same for both mvl and mvr types.
4495
9771b263
DN
44962012-11-16 Diego Novillo <dnovillo@google.com>
4497
4498 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4499
4500 * c-common.c: Use new vec API in vec.h.
4501 * c-common.h: Likewise.
4502 * c-gimplify.c: Likewise.
4503 * c-pragma.c: Likewise.
4504 * c-pretty-print.c: Likewise.
4505 * c-pretty-print.h: Likewise.
4506 * c-semantics.c: Likewise.
4507 * c-decl.c: Likewise.
4508 * c-parser.c: Likewise.
4509 * c-tree.h: Likewise.
4510 * c-typeck.c: Likewise.
4511
880661a4
JW
45122012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4513
4514 PR c++/54930
4515 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4516
077d1abe
MLI
45172012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4518
4519 PR c/53066
4520 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4521 shadows a function, unless the variable is a function or a
4522 pointer-to-function.
4523
3a785c97
JJ
45242012-10-12 Jakub Jelinek <jakub@redhat.com>
4525
4526 PR c/54381
4527 * c-parser.c (struct c_tree_loc_pair): Removed.
4528 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4529 add location_t * and tree * arguments, fill in array of 3
4530 sizeof_arg trees and corresponding locs.
4531 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4532 c_parser_expr_list callers.
4533 (c_parser_postfix_expression_after_primary): Likewise. Pass
4534 array of 3 sizeof_arg trees and locs (corresponding to first
4535 3 arguments) to sizeof_pointer_memaccess_warning.
4536
703c8606
LC
45372012-10-09 Lawrence Crowl <crowl@google.com>
4538
4539 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4540 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4541 hash table.
4542
5d9de0d0
PC
45432012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4544
4545 PR c++/54194
4546 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4547 call.
4548
a212e43f
MG
45492012-10-09 Marc Glisse <marc.glisse@inria.fr>
4550
4551 PR c++/54427
4552 * c-typeck.c: Include c-common.h.
4553 (enum stv_conv): Moved to c-common.h.
4554 (scalar_to_vector): Moved to c-common.c.
4555 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4556 * Make-lang.in: c-typeck.c depends on c-common.h.
4557
3b78de56
AC
45582012-10-04 Arnaud Charlet <charlet@adacore.com>
4559
4560 * c-decl.c (c_write_global_declarations): Fix handling of
4561 -fdump-ada-spec*.
4562
78c60e3d
SS
45632012-09-30 Sharad Singhai <singhai@google.com>
4564
4565 * c-decl.c (c_write_global_declarations): Use a different method
4566 to determine if the dump has ben initialized.
4567
9f33203d
JM
45682012-09-14 Joseph Myers <joseph@codesourcery.com>
4569
4570 PR c/54552
4571 * c-typeck.c (c_cast_expr): When casting to a type requiring
4572 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4573 c_fully_fold first.
4574
a27d595d
JM
45752012-09-14 Joseph Myers <joseph@codesourcery.com>
4576
4577 PR c/54103
4578 * c-typeck.c (build_unary_op): Pass original argument of
4579 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4580 any C_MAYBE_CONST_EXPR, if it has integer operands.
4581 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4582 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4583 to c_objc_common_truthvalue_conversion, then remove any
4584 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4585 c_objc_common_truthvalue_conversion not
4586 c_common_truthvalue_conversion.
4587 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4588 call note_integer_operands for arguments with integer operands
4589 that are not integer constants.
4590
9feb29df
JJ
45912012-09-13 Jakub Jelinek <jakub@redhat.com>
4592
4593 PR c/54559
4594 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4595 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4596
d409320c
JJ
45972012-08-31 Jakub Jelinek <jakub@redhat.com>
4598
4599 PR c/54428
4600 * c-convert.c (convert): Don't call fold_convert_loc if
4601 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4602 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4603 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4604
6265d07c
JJ
46052012-08-24 Jakub Jelinek <jakub@redhat.com>
4606
4607 PR c/54355
4608 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4609 for nested and empty_ok arguments in the call to
4610 c_parser_declaration_or_fndef.
4611
1a4049e7
JJ
46122012-08-17 Jakub Jelinek <jakub@redhat.com>
4613
4614 * c-tree.h (c_last_sizeof_arg): Declare.
4615 * c-parser.c (struct c_tree_loc_pair): New type.
4616 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4617 non-NULL.
4618 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4619 (c_parser_postfix_expression_after_primary): Likewise. Call
4620 sizeof_pointer_memaccess_warning if needed.
4621 (sizeof_ptr_memacc_comptypes): New function.
4622 * c-typeck.c (c_last_sizeof_arg): New global variable.
4623 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4624
0229aee9
UB
46252012-07-24 Uros Bizjak <ubizjak@gmail.com>
4626
4627 * c-lang.h (lang_decl): Add variable_size GTY option.
4628
7ee2468b
SB
46292012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4630
4631 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4632 * Make-lang.in: Fix dependencies.
4633
d4a10d0a
SB
46342012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4635
4636 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4637 and add language Makefile hooks.
4638 * config-lang.in: New file.
4639 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4640 add the required "normal" config-lang.in rules.
4641 * c-lang.h: Moved from gcc/ to here.
4642 * c-tree.h: Likewise.
4643 * c-objc-common.c: Likewise.
4644 * c-objc-common.h: Likewise.
4645 * c-typeck.c: Likewise.
4646 * c-convert.c: Likewise.
4647 * c-lang.c: Likewise.
4648 * c-aux-info.c: Likewise.
4649 * c-errors.c: Likewise.
4650 * gccspec.c: Likewise.
4651 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4652 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4653\f
cbe34bb5 4654Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4655
4656Copying and distribution of this file, with or without modification,
4657are permitted in any medium without royalty provided the copyright
4658notice and this notice are preserved.