]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Remove gen_cell_microcode, warn_cell_microcode
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
3cd211af
MS
12017-05-24 Martin Sebor <msebor@redhat.com>
2
3 PR c/80731
4 * c-fold.c (c_fully_fold_internal): Adjust.
5 * c-typeck.c (parser_build_unary_op): Adjust.
6
fd71a9a2
TS
72017-05-23 Thomas Schwinge <thomas@codesourcery.com>
8
9 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
10 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
11 "VECTOR_LENGTH".
12
92fa0f9e
MP
132017-05-23 Marek Polacek <polacek@redhat.com>
14
15 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
16 quotes.
17
d11c168a
JJ
182017-05-22 Jakub Jelinek <jakub@redhat.com>
19
20 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
21 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
22 it returned invariant. Call tree_invariant_p unconditionally
23 afterwards to decide whether to return expr or op0.
24
58aca9d9
NS
252017-05-22 Nathan Sidwell <nathan@acm.org>
26
27 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
28
7fd549d2
TS
292017-05-19 Thomas Schwinge <thomas@codesourcery.com>
30
31 * c-parser.c (c_parser_omp_clause_default): Handle
32 "OMP_CLAUSE_DEFAULT_PRESENT".
33
6ecd2339
BE
342017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
35
36 * config-lang.in (gtfiles): Add c-family/c-format.c.
37
8a57ecff
NS
382017-05-18 Nathan Sidwell <nathan@acm.org>
39
40 * c-decl.c (pushdecl_top_level): Delete unused function.
41
6574d78e
MP
422017-05-18 Marek Polacek <polacek@redhat.com>
43
44 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
45 (check_earlier_gotos): Likewise.
46 (define_label): Likewise.
47 (pending_xref_error): Likewise.
48 (smallest_type_quals_location): Likewise.
49 (grokdeclarator): Likewise.
50 (grokparms): Likewise.
51 (identifier_global_value): Likewise.
52 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
53 (find_init_member): Likewise.
54
e3455240
MP
552017-05-18 Marek Polacek <polacek@redhat.com>
56
57 * c-decl.c (start_decl): Use false/true instead of 0/1.
58 (grokdeclarator): Likewise.
59 (finish_struct): Likewise.
60 (start_function): Change the return type to bool. Use false/true
61 instead of 0/1.
62 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
63 * c-tree.h (start_function): Update.
64 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
65 (set_designator): Change the return type to bool. Use false/true
66 instead of 0/1.
67
3fa8871b
MP
682017-05-17 Marek Polacek <polacek@redhat.com>
69
70 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
71 * c-typeck.c: Likewise.
72
142473df
MP
732017-05-17 Marek Polacek <polacek@redhat.com>
74
75 PR sanitizer/80659
76 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
77 DECL_IGNORED_P even for non-static compound literals.
78
1a817418
ML
792017-05-17 Martin Liska <mliska@suse.cz>
80
81 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
82 use it instead of int type.
83
b2fa0a8b
MP
842017-05-17 Marek Polacek <polacek@redhat.com>
85
86 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
87 call c_fully_fold.
88 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
89 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
90 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
91 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
92 save_expr.
93 (c_parser_conditional_expression): Likewise.
94 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
95 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
96 (process_init_element): Likewise.
97 (build_binary_op): Likewise.
98 (handle_omp_array_sections_1): Likewise.
99
1e47f02b
TS
1002017-05-12 Thomas Schwinge <thomas@codesourcery.com>
101
102 * c-parser.c (c_parser_omp_clause_num_gangs)
103 (c_parser_omp_clause_num_workers)
104 (c_parser_omp_clause_vector_length): Merge functions into...
105 (c_parser_oacc_single_int_clause): ... this new function. Adjust
106 all users.
107
c24e924f
NS
1082017-05-11 Nathan Sidwell <nathan@acm.org>
109
110 * gimple-parser.c: Don't #include tree-dump.h.
111
c587104e
MM
1122017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
113
114 PR testsuite/80580
115 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
116
67ac9a9d
MM
1172017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
118
119 PR testsuite/80580
120 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
121 incorrect __MEM syntax.
122
ac4eb40f
MM
1232017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
124
125 PR testsuite/80580
126 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
127 type of unary '*'.
128
641da50a
NS
1292017-05-09 Nathan Sidwell <nathan@acm.org>
130
131 * c-tree.h (pushdecl): Declare.
132
56d35585
DM
1332017-05-05 David Malcolm <dmalcolm@redhat.com>
134
135 * c-decl.c (warn_defaults_to): Replace report_diagnostic
136 with diagnostic_report_diagnostic.
137 * c-errors.c (pedwarn_c99): Likewise.
138 (pedwarn_c90): Likewise.
139
815d9cc6
XR
1402017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
141
142 PR c++/80038
143 * c-gimplify.c (c_gimplify_expr): Remove calls to
144 cilk_gimplifY_call_params_in_spawned_fn.
145
1c4ea66f
DM
1462017-04-25 David Malcolm <dmalcolm@redhat.com>
147
148 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
149 hint for removing extra semicolon.
150
666f7903
JJ
1512017-04-21 Jakub Jelinek <jakub@redhat.com>
152
153 PR c/80468
154 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
155 enabled, set specs->type to integer_type_node.
156
5764ee3c
JW
1572017-04-03 Jonathan Wakely <jwakely@redhat.com>
158
159 * c-array-notation.c: Fix typo in comment.
160
10fa8dfb
MP
1612017-03-29 Marek Polacek <polacek@redhat.com>
162
163 PR c/79730
164 * c-decl.c (finish_decl): Check VAR_P.
165
a9e4a1a5
JJ
1662017-03-27 Jakub Jelinek <jakub@redhat.com>
167
168 PR middle-end/80162
169 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
170 * c-typeck.c (c_mark_addressable): Likewise. Look through
171 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
172 to ARRAY_TYPE.
173 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
174
ee3ff394
MP
1752017-03-23 Marek Polacek <polacek@redhat.com>
176
177 * c-tree.h: Remove a C_RID_YYCODE reference.
178
4d1b8e70
JJ
1792017-03-21 Jakub Jelinek <jakub@redhat.com>
180
181 PR c/80097
182 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
183 optional COMPOUND_EXPR with ubsan instrumentation.
184
31dc71a8
MP
1852017-03-17 Marek Polacek <polacek@redhat.com>
186
187 * c-parser.c: Add C11 references.
188
d579c385
MP
1892017-03-15 Marek Polacek <polacek@redhat.com>
190
191 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
192
85059a38
MP
1932017-03-11 Marek Polacek <polacek@redhat.com>
194
195 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
196
2f6f187a
DM
1972017-03-10 David Malcolm <dmalcolm@redhat.com>
198
199 PR translation/79848
200 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
201 "%qs".
202 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
203
36618428
MP
2042017-03-09 Marek Polacek <polacek@redhat.com>
205
206 PR sanitizer/79757
207 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
208 parameter declarations with initializers.
209
01e5af5a
JJ
2102017-03-09 Jakub Jelinek <jakub@redhat.com>
211
212 PR c/79969
213 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
214 TYPE_STUB_DECL.
215
a71dbc63
JJ
2162017-03-07 Jakub Jelinek <jakub@redhat.com>
217
218 PR c/79834
219 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
220 for "may only be used in compound statements" diagnostics, change it
221 such that the same translatable string is used for all pragmas. For
222 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
223 diagnostics.
224 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
225 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
226 "may only be used in compound statements" diagnostics, such that the
227 same translatable string is used for all pragmas.
228
1ff4bae6
MP
2292017-03-04 Marek Polacek <polacek@redhat.com>
230
231 PR c/79847
232 * c-decl.c (implicit_decl_warning): Add missing space.
233
7f5a7d78
MP
2342017-03-03 Marek Polacek <polacek@redhat.com>
235
236 PR c/79758
237 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
238 current_function_prototype_arg_types is error_mark_node. Fix
239 formatting. Use TREE_VALUE instead of TREE_TYPE.
240
883c8f06
JJ
2412017-03-03 Jakub Jelinek <jakub@redhat.com>
242
79c9b7a8
JJ
243 PR c/79837
244 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
245 %<min%> or %<max%> in the diagnostics, instead mention identifier.
246 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
247 diagnostics.
248
883c8f06
JJ
249 PR c/79836
250 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
251 instead of %<_Generic>.
252 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
253 (c_parser_omp_target_exit_data): Use %<release%> instead of
254 %<release>.
255
324ff1a0
JJ
2562017-02-28 Jakub Jelinek <jakub@redhat.com>
257
258 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
259 instead of just cond ? "..." : "...".
260 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
261 for "enter"/"exit" keyword.
262 (c_finish_oacc_routine): Don't use %s to supply portions of the
263 message.
264
4227c9ad
JJ
2652017-02-24 Jakub Jelinek <jakub@redhat.com>
266
267 PR c++/79588
268 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
269 handle -Wrestrict here.
270 * c-typeck.c (build_function_call_vec): Adjust
271 check_function_arguments caller.
272
5d972e66
RB
2732017-02-23 Richard Biener <rguenther@suse.de>
274
275 PR c/79684
276 * gimple-parser.c (c_parser_gimple_statement): Use set_error
277 to initialize c_exprs to return.
278 (c_parser_gimple_binary_expression): Likewise.
279 (c_parser_gimple_unary_expression): Likewise.
280 (c_parser_gimple_postfix_expression): Likewise.
281
61ac5ebe
MP
2822017-02-22 Marek Polacek <polacek@redhat.com>
283
284 PR c/79662
285 * c-typeck.c (convert_arguments): Handle error_mark_node.
286
41d1b0b1
PK
2872017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
288
289 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
290 value of c_parser_parse_ssa_name against error_mark_node and emit
291 error if ssa name is anonymous and written as default definition.
292
eab1f169
PK
2932017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
294
295 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
296 FMA_EXPR.
297
bcac0b4d
JJ
2982017-02-16 Jakub Jelinek <jakub@redhat.com>
299
300 PR c++/79512
301 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
302 ignore #pragma omp target even when not followed by identifier.
303
1be33173
PK
3042017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
305
306 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
307 (c_parser_gimple_unary_expression): Likewise.
308
aa326bfb
JJ
3092017-02-13 Jakub Jelinek <jakub@redhat.com>
310
311 * c-parser.c (c_parser_oacc_declare): Add missing space in
312 diagnostics.
313
8a398bc5
PK
3142017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
315
316 PR c/79478
317 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
318 set_c_expr_source_range when parsing ssa-name.
319
3dcde5ef
PG
3202017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
321 Richard Biener <rguenther@suse.de>
322
323 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
324 building IL when arguments are error_mark_node.
325 (c_parser_gimple_unary_expression): Likewise.
326 (c_parser_gimple_if_stmt): Likewise.
327 (c_parser_gimple_switch_stmt): Likewise.
328 (c_parser_gimple_return_stmt): Likewise.
329 (c_parser_parse_ssa_name): When name lookup fails do not build
330 an SSA name. Use undeclared rather than not declared in error
331 reporting.
332
192b048b
MP
3332017-02-09 Marek Polacek <polacek@redhat.com>
334
335 PR c/79428
336 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
337 instead of c_parser_skip_until_found.
338
56f71478
JJ
3392017-02-09 Jakub Jelinek <jakub@redhat.com>
340
341 PR c/79431
342 * c-parser.c (c_parser_omp_declare_target): Don't invoke
343 symtab_node::get on automatic variables.
344
02889d23
CLT
3452016-02-09 Nathan Sidwell <nathan@codesourcery.com>
346 Chung-Lin Tang <cltang@codesourcery.com>
347
348 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
349 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
350 semantic checking.
351 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
352
7af4b20d
RB
3532017-02-07 Richard Biener <rguenther@suse.de>
354
355 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
356 (c_parser_gimple_postfix_expression_after_primary):
357 Do not use c_build_function_call_vec to avoid folding and promotion.
358 Simplify.
359
e5e391d6
MO
3602017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
361
362 PR lto/79061
363 * c-decl.c (pop_scope): Pass main_input_filename to
364 build_translation_unit_decl.
365
c2e84327
DM
3662017-01-24 David Malcolm <dmalcolm@redhat.com>
367
368 * c-parser.c: Include "read-rtl-function.h" and
369 "run-rtl-passes.h".
370 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
371 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
372 production. Update for renaming of field "gimple_pass" to
373 "gimple_or_rtl_pass". If __RTL was seen, call
374 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
375 to an auto_timevar, to cope with early exit.
376 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
377 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
378 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
379 Handle RID_RTL.
380 (c_parser_parse_rtl_body): New function.
381 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
382 (struct c_declspecs): Rename field "gimple_pass" to
383 "gimple_or_rtl_pass". Add field "rtl_p".
384 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
385 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
386 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
387 (c_parser_gimple_or_rtl_pass_list): ...this.
388
2ebd93e1
MP
3892017-01-20 Marek Polacek <polacek@redhat.com>
390
391 PR c/64279
392 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
393
b1c95bb5
RB
3942017-01-13 Richard Biener <rguenther@suse.de>
395
396 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
397 nops.
398
25329913
RB
3992017-01-13 Richard Biener <rguenther@suse.de>
400
401 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
402 _Literal ( type-name ) number.
403
6bb4ea5c
RB
4042017-01-12 Richard Biener <rguenther@suse.de>
405
406 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
407 __MEM.
408
6b5b4e9c
JJ
4092017-01-11 Jakub Jelinek <jakub@redhat.com>
410
411 PR c++/72813
412 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
413 PCH file.
414
e3252775
RB
4152017-01-11 Richard Biener <rguenther@suse.de>
416
417 PR bootstrap/79052
418 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
419 returns on parse errors.
420
a9342885
MP
4212017-01-04 Marek Polacek <polacek@redhat.com>
422
423 PR c++/64767
424 * c-parser.c (c_parser_postfix_expression): Mark zero character
425 constants by setting original_type in c_expr.
426 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
427 with a zero character constant.
428 (char_type_p): New function.
429
5dd9a9d0
DM
4302017-01-04 David Malcolm <dmalcolm@redhat.com>
431
432 * c-parser.c (c_parser_declaration_or_fndef): Create a
433 rich_location at init_loc and parse it to start_init.
434 (last_init_list_comma): New global.
435 (c_parser_braced_init): Update last_init_list_comma when parsing
436 commas. Pass it to pop_init_level. Pass location of closing
437 brace to pop_init_level.
438 (c_parser_postfix_expression_after_paren_type): Create a
439 rich_location at type_loc and parse it to start_init.
440 (c_parser_omp_declare_reduction): Likewise for loc.
441 * c-tree.h (start_init): Add rich_location * param.
442 (pop_init_level): Add location_t param.
443 * c-typeck.c (struct initializer_stack): Add field
444 "missing_brace_richloc".
445 (start_init): Add richloc param, use it to initialize
446 the stack node's missing_brace_richloc.
447 (last_init_list_comma): New decl.
448 (finish_implicit_inits): Pass last_init_list_comma to
449 pop_init_level.
450 (push_init_level): When finding missing open braces, add fix-it
451 hints to the richloc.
452 (pop_init_level): Add "insert_before" param and pass it
453 when calling pop_init_level. Add fixits about missing
454 close braces to any richloc. Use the richloc for the
455 -Wmissing-braces warning.
456 (set_designator): Pass last_init_list_comma to pop_init_level.
457 (process_init_element): Likewise.
458
cbe34bb5
JJ
4592017-01-01 Jakub Jelinek <jakub@redhat.com>
460
461 Update copyright years.
462
d17680f3
JJ
4632016-12-21 Jakub Jelinek <jakub@redhat.com>
464
0dba7960
JJ
465 PR bootstrap/78817
466 * c-typeck.c (build_function_call_vec): If check_function_arguments
467 returns true, set TREE_NO_WARNING on CALL_EXPR.
468
d17680f3
JJ
469 PR c/77767
470 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
471 to *expr instead of overwriting it.
472
aa90531e
RB
4732016-12-20 Richard Biener <rguenther@suse.de>
474
475 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
476 error recovery.
477 (c_parser_gimple_statement): Only build assigns for non-error
478 stmts.
479 (c_parser_gimple_postfix_expression_after): Improve error recovery.
480
629b3d75
MJ
4812016-12-14 Martin Jambor <mjambor@suse.cz>
482
483 * c-parser.c: Include omp-general.h and omp-offload.h instead of
484 omp-low.h.
485 (c_finish_oacc_routine): Adjusted call to
486 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
487 to use their new names.
488 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
489 use its new name.
490 (c_parser_oacc_update): Likewise.
491 (c_parser_omp_simd): Likewise.
492 (c_parser_omp_target_update): Likewise.
493 * c-typeck.c: Include omp-general.h instead of omp-low.h.
494 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
495 name.
496 (c_finish_omp_cancellation_point): Likewise.
497 * gimple-parser.c: Do not include omp-low.h
498
c5af52eb
CP
4992016-12-02 Cesar Philippidis <cesar@codesourcery.com>
500 James Norris <jnorris@codesourcery.com>
501
502 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
503 EXIT_DATA,WAIT} are not used in compound statements.
504 (c_parser_oacc_enter_exit_data): Update diagnostics.
505
48330c93
BE
5062016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
507
508 PR c++/71973
509 * c-decl.c (diagnose_mismatched_decls): Use
510 OPT_Wbuiltin_declaration_mismatch here too.
511
899ca90e 5122016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
513 Alan Hayward <alan.hayward@arm.com>
514 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
515
516 * c-decl.c (merge_decls): Use SET_DECL_MODE.
517 (make_label, finish_struct): Likewise.
518
1ee62b92 5192016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 520 Richard Biener <rguenther@suse.de>
22b15758 521
8e745a17
JJ
522 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
523 * config-lang.in (gtfiles): Add c/c-parser.h.
524 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
525 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
526 * c-parser.c (enum c_id_kind, struct c_token,
527 c_parser_next_token_is, c_parser_next_token_is_not,
528 c_parser_next_token_is_keyword,
529 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
530 Split out to ...
531 * c-parser.h: ... new header.
532 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 533 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
534 c_token_starts_typename, c_parser_next_token_starts_declspecs,
535 c_parser_next_tokens_start_declaration, c_parser_consume_token,
536 c_parser_error, c_parser_require, c_parser_skip_until_found,
537 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
538 c_parser_type_name): Export.
539 (c_parser_tokens_buf): New function.
540 (c_parser_error): Likewise.
541 (c_parser_set_error): Likewise.
542 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
543 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
544 via c_parser_parse_gimple_body.
8e745a17
JJ
545 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
546 c_token_starts_typename, c_parser_next_token_starts_declspecs,
547 c_parser_next_tokens_start_declaration, c_parser_consume_token,
548 c_parser_error, c_parser_require, c_parser_skip_until_found,
549 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
550 c_parser_type_name): Declare.
1ee62b92
PG
551 (struct c_parser): Declare forward.
552 (c_parser_tokens_buf): Declare.
8e745a17
JJ
553 (c_parser_error): Likewise.
554 (c_parser_set_error): Likewise.
555 * gimple-parser.c: New file.
556 * gimple-parser.h: Likewise.
1ee62b92 557
22b15758
UB
5582016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
559
560 PR c/35503
561 * c-parser.c (c_parser_postfix_expression_after_primary): Call
562 warn_for_restrict.
563
84ff4775
LCW
5642016-09-11 Le-Chun Wu <lcwu@google.com>
565 Mark Wielaard <mjw@redhat.com>
566
567 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
568 to the given -Wshadow= variant.
569
4d0cdd0c
TP
5702016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
571
572 * c-typeck.c: Include memmodel.h.
573
1202f33e
JJ
5742016-10-13 Jakub Jelinek <jakub@redhat.com>
575
576 PR target/77957
577 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
578 instead of lhd_return_null_tree_v.
579
8a14afd0
BS
5802016-10-07 Bernd Schmidt <bschmidt@redhat.com>
581
582 PR c++/69733
583 * c-decl.c (smallest_type_quals_location): New static function.
584 (grokdeclarator): Try to find the correct location for an ignored
585 qualifier.
586
81fea426
MP
5872016-09-26 Marek Polacek <polacek@redhat.com>
588
589 PR c/7652
590 * c-decl.c (pop_scope): Add gcc_fallthrough.
591
5922016-09-26 Marek Polacek <polacek@redhat.com>
593
594 PR c/7652
595 * c-parser.c (struct c_token): Add flags field.
596 (c_lex_one_token): Pass it to c_lex_with_flags.
597 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
598 into IFN_FALLTHROUGH.
599 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
600 attribute fallthrough after a case label or default label.
601 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
602
9a2300e9
MP
6032016-09-24 Marek Polacek <polacek@redhat.com>
604
605 PR c/77490
606 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
607 have boolean value. Warn about ++/-- on booleans.
608
7de76362
JJ
6092016-09-23 Jakub Jelinek <jakub@redhat.com>
610
611 * c-parser.c (incomplete_record_decls): Remove unnecessary
612 = vNULL initialization of file scope vec.
613
5b73d2ab
MP
6142016-09-16 Marek Polacek <polacek@redhat.com>
615
616 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
617
e51fbec3
MP
6182016-09-14 Marek Polacek <polacek@redhat.com>
619
620 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
621 (fix_array_notation_expr): Likewise.
622 * c-decl.c (finish_decl): Likewise.
623 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
624 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
625 (function_to_pointer_conversion): Use false instead of 0.
626 (convert_lvalue_to_rvalue): Likewise.
627 (parser_build_unary_op): Likewise.
628 (build_atomic_assign): Likewise.
629 (build_unary_op): Change nonconvert parameter type to bool, use
630 true/false instead of 1/0.
631 (build_binary_op): Use true instead of 1.
632
254830ba
DM
6332016-09-13 David Malcolm <dmalcolm@redhat.com>
634
635 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
636 of add_fixit_insert to add_fixit_insert_before.
637
4c13ba17
MP
6382016-09-13 Marek Polacek <polacek@redhat.com>
639
640 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
641 it.
642
54dcdb88
BE
6432016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
644
645 PR c++/77496
646 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
647 COMPOUND_EXPR to warn_for_omitted_condop.
648
e5106e27
DM
6492016-09-07 David Malcolm <dmalcolm@redhat.com>
650
651 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
652 c_get_substring_location for this new langhook.
653
9dc5773f
JJ
6542016-09-02 Jakub Jelinek <jakub@redhat.com>
655
656 PR c/65467
657 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
658 flag_openmp.
659 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
660 instead of mark_exp_read on low_bound/length expression.
661 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
662 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
663 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
664 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
665 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
666 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
667 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
668 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
669 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
670 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
671 instead of mark_expr_read.
672 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
673 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
674 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
675 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
676 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
677 array section bases outside of depend clause, for depend clause
678 use convert_lvalue_to_rvalue on the base.
679 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
680 linear, aligned, map, to and from clauses.
681 (c_omp_clause_copy_ctor): New function.
682
295844f6
MP
6832016-09-01 Marek Polacek <polacek@redhat.com>
684
685 PR c/7652
686 * c-typeck.c (composite_type): Add FALLTHRU comment.
687
089af25c
DM
6882016-08-31 David Malcolm <dmalcolm@redhat.com>
689
690 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
691 to the insertion fixits for "struct", "union", and "enum".
692
f9087798
DM
6932016-08-30 David Malcolm <dmalcolm@redhat.com>
694
695 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
696 rather than add_fixit_misspelled_id.
697 (undeclared_variable): Likewise.
698 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
699 now-redundant "here" params from add_fixit_insert method calls.
700 (c_parser_parameter_declaration): Likewise.
701 * c-typeck.c (build_component_ref): Remove now-redundant range
702 param from add_fixit_replace method calls.
703
ebef225f
MP
7042016-08-25 Marek Polacek <polacek@redhat.com>
705
706 * c-typeck.c (parser_build_binary_op): Pass LHS to
707 warn_logical_not_parentheses.
708
fe377a48
MP
7092016-08-25 Marek Polacek <polacek@redhat.com>
710
711 PR c/77323
712 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
713 or _FloatN or _FloatNx is not supported.
714 (finish_declspecs): Set type to integer_type_node when _FloatN or
715 _FloatNx is not supported.
716
c65699ef
JM
7172016-08-19 Joseph Myers <joseph@codesourcery.com>
718
719 PR c/32187
720 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
721 (struct c_declspecs): Add field floatn_nx_idx.
722 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
723 and _FloatNx type specifiers.
724 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
725 (c_parser_declspecs, c_parser_attribute_any_word)
726 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
727 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
728 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
729 narrower than double.
730
2f1364c2
JJ
7312016-08-12 Jakub Jelinek <jakub@redhat.com>
732 Martin Liska <mliska@suse.cz>
733
734 PR c/67410
735 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
736 % to determine val element to change. Assert that
737 wchar_bytes * charwidth fits into val array.
738
191816a3
MP
7392016-08-12 Marek Polacek <polacek@redhat.com>
740
741 PR c/7652
742 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
743 (c_parser_postfix_expression): Likewise.
744 * c-typeck.c (build_unary_op): Adjust fall through comment.
745 (c_mark_addressable): Likewise.
746
b95a64bb
JJ
7472016-08-11 Jakub Jelinek <jakub@redhat.com>
748
749 PR c/72816
750 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
751 array member through typedef, for orig_qual_indirect == 0 clear
752 orig_qual_type.
753
895aa8e1
DM
7542016-08-08 David Malcolm <dmalcolm@redhat.com>
755
756 PR c/64955
757 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
758 this up to selftest::run_c_tests.
759 (selftest::run_c_tests): New function.
760
0b212d8c
TS
7612016-08-04 Thomas Schwinge <thomas@codesourcery.com>
762
ae9281fc
TS
763 * c-parser.c (struct oacc_routine_data): Add error_seen and
764 fndecl_seen members.
765 (c_finish_oacc_routine): Use these.
766 (c_parser_declaration_or_fndef): Adjust.
767 (c_parser_oacc_routine): Likewise. Support more C language
768 constructs, and improve diagnostics. Move pragma context
769 checking...
770 (c_parser_pragma): ... here.
771
0b212d8c
TS
772 * c-parser.c (struct oacc_routine_data): New.
773 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
774 Simplify code.
775 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
776 declare target" attribute.
777
76e2c821
JB
7782016-08-01 Jan Beulich <jbeulich@suse.com>
779
780 * c-fold.c (c_fully_fold_internal): Also emit shift count
781 warnings for vector types.
782 * c-typeck.c (build_binary_op): Likewise.
783
f618a472
MP
7842016-07-29 Marek Polacek <polacek@redhat.com>
785
786 PR c/71742
787 * c-decl.c (finish_struct): Rephrase an error message.
788
efd0786f
MP
789 PR c/71853
790 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
791 to error node for invalid code.
792
e00dceaf
MP
793 PR c/71573
794 * c-decl.c (implicitly_declare): Return decl early not only for
795 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
796
673a107a
JJ
7972016-07-29 Jakub Jelinek <jakub@redhat.com>
798
799 PR c/71969
800 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
801 on GNU extern inline functions.
802
a5b5c8b6
MP
8032016-07-29 Marek Polacek <polacek@redhat.com>
804
805 PR c/71583
806 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
807 check expr.value.
808
e3fe09c1
UB
8092016-07-22 Uros Bizjak <ubizjak@gmail.com>
810
811 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
812
7c8f7eaa
DM
8132016-07-20 David Malcolm <dmalcolm@redhat.com>
814
815 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
816 spellcheck-tree.h
817 (best_macro_match): Likewise, converting from a typedef to a
818 subclass.
819 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
820 (lookup_name_fuzzy): Update for change of best_macro_match to a
821 subclass with a ctor that calls cpp_forall_identifiers.
822
de6a69ee
DM
8232016-07-20 David Malcolm <dmalcolm@redhat.com>
824
825 * c-decl.c (implicit_decl_warning): Update for conversion of
826 return type of lookup_name_fuzzy to const char *.
827 (undeclared_variable): Likewise.
828 (lookup_name_fuzzy): Convert return type from tree to
829 const char *.
830 * c-parser.c (c_parser_declaration_or_fndef): Update for
831 conversion of return type of lookup_name_fuzzy to const char *.
832 (c_parser_parameter_declaration): Likewise.
833
b1c9c068
CP
8342016-07-15 Cesar Philippidis <cesar@codesourcery.com>
835
836 * c-parser.c (c_parser_oacc_declare): Don't scan for
837 GOMP_MAP_POINTER.
838 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
839 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
840 zero-length subarrays.
841
ddbbcb19
JJ
8422016-07-15 Jakub Jelinek <jakub@redhat.com>
843
844 PR c/71858
845 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
846 instead of FUZZY_LOOKUP_NAME.
847 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
848 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
849
dd36b877
JJ
8502016-07-14 Jakub Jelinek <jakub@redhat.com>
851
852 PR c/71858
853 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
854
8c681247
TS
8552016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
856
857 * c-parser.c (c_parser_generic_selection): Make type of variable
858 auto_vec.
859 (c_parser_omp_declare_simd): Likewise.
860
bf4fa671
TS
8612016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
862
863 * c-decl.c (struct c_struct_parse_info): Change member types
864 from vec to auto_vec.
865 (start_struct): Adjust.
866 (finish_struct): Likewise.
867
557e8c49
JJ
8682016-07-02 Jakub Jelinek <jakub@redhat.com>
869
870 PR c/71719
871 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
872
54d19c3b
TS
8732016-06-29 Thomas Schwinge <thomas@codesourcery.com>
874
875 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
876 Move pragma context checking into...
877 (c_parser_omp_cancellation_point): ... here, and improve
878 diagnostic messages.
879 * c-typeck.c (c_finish_omp_cancel)
880 (c_finish_omp_cancellation_point): Improve diagnostic messages.
881
152ef731
JJ
8822016-06-29 Jakub Jelinek <jakub@redhat.com>
883
884 PR c/71685
885 * c-typeck.c (c_build_qualified_type): Don't clear
886 C_TYPE_INCOMPLETE_VARS for the main variant.
887
8882016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
889
890 PR c/71552
891 * c-typeck.c (output_init_element): Diagnose incompatible types
892 before non-constant initializers.
893
e9ac1f86
JJ
8942016-06-28 Jakub Jelinek <jakub@redhat.com>
895
896 * Make-lang.in: Don't cat ../stage_current if it does not exist.
897
277d7ee0
AK
8982016-06-23 Andi Kleen <ak@linux.intel.com>
899
900 * Make-lang.in: Add support for autofdo.
901
1a4f11c8
DM
9022016-06-22 David Malcolm <dmalcolm@redhat.com>
903
904 PR c/70339
905 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
906 (implicit_decl_warning): When issuing warnings for implicit
907 declarations, attempt to provide a suggestion via
908 lookup_name_fuzzy.
909 (undeclared_variable): Likewise when issuing errors.
910 (lookup_name_in_scope): Likewise.
911 (struct edit_distance_traits<cpp_hashnode *>): New struct.
912 (best_macro_match): New typedef.
913 (find_closest_macro_cpp_cb): New function.
914 (lookup_name_fuzzy): New function.
915 * c-parser.c: Include gcc-rich-location.h.
916 (c_token_starts_typename): Split out case CPP_KEYWORD into...
917 (c_keyword_starts_typename): ...this new function.
918 (c_parser_declaration_or_fndef): When issuing errors about
919 missing "struct" etc, add a fixit. For other kinds of errors,
920 attempt to provide a suggestion via lookup_name_fuzzy.
921 (c_parser_parms_declarator): When looking ahead to detect typos in
922 type names, also reject CPP_KEYWORD.
923 (c_parser_parameter_declaration): When issuing errors about
924 unknown type names, attempt to provide a suggestion via
925 lookup_name_fuzzy.
926 * c-tree.h (c_keyword_starts_typename): New prototype.
927
5a578671
JM
9282016-06-20 Joseph Myers <joseph@codesourcery.com>
929
930 PR c/71601
931 * c-typeck.c (build_conditional_expr): Return error_mark_node if
932 c_common_type returns error_mark_node.
933
3f8257db 9342016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
935
936 PR c/69507
937 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
938 __alignof__ (expression).
939
6a3f203c
DM
9402016-06-14 David Malcolm <dmalcolm@redhat.com>
941
942 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
943
264757fb
DM
9442016-06-14 David Malcolm <dmalcolm@redhat.com>
945
946 * c-typeck.c (build_component_ref): Simplify fixit code by
947 using gcc_rich_location::add_fixit_misspelled_id.
948 (set_init_label): Likewise.
949
f7e4f2e3
DM
9502016-06-13 David Malcolm <dmalcolm@redhat.com>
951
952 * c-parser.c (c_parser_initelt): Provide location of name for new
953 location_t param of set_init_label.
954 * c-tree.h (set_init_label): Add location_t param.
955 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
956 param and use it when issuing error messages about unrecognized
957 field names. Attempt to provide a fixit hint if appropriate,
958 otherwise update the error message to provide the type name.
959
4b1ffdb1
TS
9602016-06-10 Thomas Schwinge <thomas@codesourcery.com>
961
962 PR c/71381
963 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
964 Loosen checking.
965
44a845ca
MS
9662016-06-08 Martin Sebor <msebor@redhat.com>
967 Jakub Jelinek <jakub@redhat.com>
968
969 PR c++/70507
970 PR c/68120
971 * c-typeck.c (convert_arguments): Don't promote last argument
972 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
973
92a5f2ba
MP
9742016-06-08 Marek Polacek <polacek@redhat.com>
975
976 PR c/71418
977 * c-decl.c (grokdeclarator): Check TYPE_P.
978
08203f73
MP
979 PR c/71426
980 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
981 code.
982
6ffd47b7
DM
9832016-06-07 David Malcolm <dmalcolm@redhat.com>
984
985 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
986 and structure element reference, capture the location of the
987 element name token and pass it to build_component_ref.
988 (c_parser_postfix_expression_after_primary): Likewise for
989 structure element dereference.
990 (c_parser_omp_variable_list): Likewise for
991 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
992 * c-tree.h (build_component_ref): Add location_t param.
993 * c-typeck.c (build_component_ref): Add location_t param
994 COMPONENT_LOC. Use it, if available, when issuing hints about
995 mispelled member names to provide a fixit replacement hint.
996
1f40cff3
MP
9972016-06-06 Marek Polacek <polacek@redhat.com>
998
999 PR c/71362
1000 * c-parser.c (c_parser_direct_declarator): Set location.
1001
5545a907
MP
10022016-06-06 Marek Polacek <polacek@redhat.com>
1003
1004 * c-typeck.c (comptypes_internal): Handle comparisons of
1005 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1006 TYPE_REF_CAN_ALIAS_ALL.
1007
b605f663
CLT
10082016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1009
1010 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1011 arguments as addressable when async clause exists.
1012
00631022
JJ
10132016-05-30 Jakub Jelinek <jakub@redhat.com>
1014
1015 PR c++/71349
1016 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1017 when combined with target construct.
1018
7211a097
JJ
10192016-05-26 Jakub Jelinek <jakub@redhat.com>
1020
1021 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1022 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1023
95efe6b6
MP
10242016-05-25 Marek Polacek <polacek@redhat.com>
1025
1026 PR c/71265
1027 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1028
a23faf7a
MP
1029 PR c/71266
1030 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1031
e46c7770
CP
10322016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1033
1034 * c-parser.c (c_parser_oacc_declare): Add support for
1035 GOMP_MAP_FIRSTPRIVATE_POINTER.
1036 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1037 argument with enum c_omp_region_type ort.
1038 (handle_omp_array_sections): Likewise. Update call to
1039 handle_omp_array_sections_1.
1040 (c_finish_omp_clauses): Add specific errors and warning messages for
1041 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1042 call to handle_omp_array_sections.
1043
a04e69c0
TS
10442016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1045
1046 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1047
f17a223d
RB
10482016-05-24 Richard Biener <rguenther@suse.de>
1049
1050 PR middle-end/70434
1051 PR c/69504
1052 * c-typeck.c (build_array_ref): Do not complain about indexing
1053 non-lvalue vectors. Adjust for function name change.
1054
79063edd
MS
10552016-05-20 Martin Sebor <msebor@redhat.com>
1056
1057 PR c/71115
1058 * c-typeck.c (error_init): Use
1059 expansion_point_location_if_in_system_header.
1060 (warning_init): Same.
1061
8a40fef3
DM
10622016-05-19 David Malcolm <dmalcolm@redhat.com>
1063
1064 PR c/71171
1065 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1066 in error-handling.
1067 (c_parser_postfix_expression): Likewise.
1068 * c-tree.h (c_expr::set_error): New method.
1069 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1070 that result's range is initialized.
1071
e9892350
JG
10722016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1073
1074 * c-typeck.c (parser_build_unary_op): Fix formatting.
1075
8fad45f5
MW
10762016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1077
1078 * c-decl.c (grokdeclarator): Remove errmsg and use of
1079 targetm.invalid_return_type.
1080 (grokparms): Remove errmsg and use of
1081 targetm.invalid_parameter_type.
1082
aa4b467b
JM
10832016-05-13 Joseph Myers <joseph@codesourcery.com>
1084
1085 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1086 function return type.
1087
4f2e1536
MP
10882016-05-12 Marek Polacek <polacek@redhat.com>
1089
1090 PR c/70756
1091 * c-decl.c (build_compound_literal): Pass LOC down to
1092 c_incomplete_type_error.
1093 * c-tree.h (require_complete_type): Adjust declaration.
1094 (c_incomplete_type_error): Likewise.
1095 * c-typeck.c (require_complete_type): Add location parameter, pass it
1096 down to c_incomplete_type_error.
1097 (c_incomplete_type_error): Add location parameter, pass it down to
1098 error_at.
1099 (build_component_ref): Pass location down to c_incomplete_type_error.
1100 (default_conversion): Pass location down to require_complete_type.
1101 (build_array_ref): Likewise.
1102 (build_function_call_vec): Likewise.
1103 (convert_arguments): Likewise.
1104 (build_unary_op): Likewise.
1105 (build_c_cast): Likewise.
1106 (build_modify_expr): Likewise.
1107 (convert_for_assignment): Likewise.
1108 (c_finish_omp_clauses): Likewise.
1109
d6e83a8d
MM
11102016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1111
1112 PR c/43651
1113 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1114 is enabled.
1115 * c-errors.c (pedwarn_c90): Return true if warned.
1116 * c-tree.h (pedwarn_c90): Change return type to bool.
1117 (enum c_declspec_word): Add new enumerator cdw_atomic.
1118
5c3a10fb
MP
11192016-05-11 Marek Polacek <polacek@redhat.com>
1120
1121 PR c++/71024
1122 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1123 diagnose_mismatched_attributes and call it.
1124
cf68d92c
MP
11252016-05-10 Marek Polacek <polacek@redhat.com>
1126
1127 PR c/70255
1128 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1129 on a declaration following the definition.
1130
351f85c5
JJ
11312016-05-05 Jakub Jelinek <jakub@redhat.com>
1132
1133 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1134 parse it through to c_parser_c99_block_statement.
1135 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1136 caller.
1137
deef7113
MP
11382016-05-04 Marek Polacek <polacek@redhat.com>
1139
1140 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1141 OPT_Wdangling_else.
1142
de55efd5
MP
11432016-05-04 Marek Polacek <polacek@redhat.com>
1144
1145 PR c/48778
1146 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1147 for macro expansions.
1148
79ce98bc
MP
11492016-05-03 Marek Polacek <polacek@redhat.com>
1150
1151 PR c/70859
1152 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1153 check_builtin_function_arguments.
1154
fb2647aa
RB
11552016-05-03 Richard Biener <rguenther@suse.de>
1156
1157 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1158 the checksum from the previous stage.
1159
77886428
CP
11602016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1161
1162 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1163 c_finish_omp_clauses.
1164 (c_parser_omp_all_clauses): Likewise.
1165 (c_parser_oacc_cache): Likewise.
1166 (c_parser_oacc_loop): Likewise.
1167 (omp_split_clauses): Likewise.
1168 (c_parser_omp_declare_target): Likewise.
1169 (c_parser_cilk_all_clauses): Likewise.
1170 (c_parser_cilk_for): Likewise.
1171 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1172 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1173
7176a4a0
MP
11742016-05-02 Marek Polacek <polacek@redhat.com>
1175
1176 PR c/70851
1177 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1178 incomplete type.
1179
e7ff0319
CP
11802016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1181
1182 PR middle-end/70626
1183 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1184 OACC_LOOP_CLAUSE_MASK.
1185 (c_parser_oacc_kernels_parallel): Update call to
1186 c_oacc_split_loop_clauses.
1187
9f405ce1
AM
11882016-04-28 Andrew MacLeod <amacleod@redhat.com>
1189
1190 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1191 argument to build_modify_expr in two cases.
1192
c1e1f433
BS
11932016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1194
1195 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1196 warn_for_memset instead of warning directly here.
1197
2448a956
MP
11982016-04-26 Marek Polacek <polacek@redhat.com>
1199
1200 PR c/67784
1201 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1202 out of ...
1203 (c_parser_for_statement): ... here.
1204 (c_parser_if_statement): Use it.
1205 (c_parser_switch_statement): Use it.
1206 (c_parser_while_statement): Use it.
1207
b02a5e26
MP
1208 PR c/70791
1209 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1210
477d4906
IV
12112016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1212
1213 PR c++/69363
1214 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1215 instead of c_finish_cilk_clauses.
1216 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1217 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1218 floating-point variables in the linear clause for Cilk Plus.
1219
fe37c7af
MM
12202016-04-18 Michael Matz <matz@suse.de>
1221
1222 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1223 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1224
949505a9
MP
12252016-04-15 Marek Polacek <polacek@redhat.com>
1226
1227 PR c/70671
1228 * c-typeck.c (build_unary_op): Pass location down to error and
1229 warning call.
1230
dda1bf61
JJ
12312016-04-15 Jakub Jelinek <jakub@redhat.com>
1232
1233 PR c/70436
1234 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1235 where needed.
1236 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1237 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1238 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1239 Adjust c_parser_pragma callers.
1240 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1241 caller.
1242 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1243 c_parser_statement.
1244 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1245 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1246 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1247 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1248 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1249 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1250 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1251 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1252 down where needed.
1253 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1254 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1255 calls.
1256
99cd9857
MP
12572016-04-13 Marek Polacek <polacek@redhat.com>
1258
1259 PR c/70436
1260 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1261 adjust callers.
1262 (c_parser_statement): Likewise.
1263 (c_parser_c99_block_statement): Likewise.
1264 (c_parser_while_statement): Likewise.
1265 (c_parser_for_statement): Likewise.
1266 (c_parser_if_body): Don't set IF_P here.
1267 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1268 about dangling else here.
1269 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1270 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1271 warn about dangling else here.
1272
f13355da
MP
12732016-04-04 Marek Polacek <polacek@redhat.com>
1274
1275 PR c/70307
1276 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1277
5fde6a45
MP
12782016-03-31 Marek Polacek <polacek@redhat.com>
1279
1280 PR c/70297
1281 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1282
4bbf545b
DM
12832016-03-18 David Malcolm <dmalcolm@redhat.com>
1284
1285 PR c/70281
1286 * c-parser.c (c_parser_postfix_expression): Set the source range
1287 for uses of "__builtin_types_compatible_p".
1288
fcc2b74f
JJ
12892016-03-17 Jakub Jelinek <jakub@redhat.com>
1290
1291 PR c/70280
1292 * c-typeck.c (composite_type): Don't count void_list_node
1293 into len, if the list is terminated by void_list_node, start
1294 with void_list_node instead of NULL for newargs. Stop
1295 at void_list_node.
1296
ab4c578f
MP
12972016-03-16 Marek Polacek <polacek@redhat.com>
1298
1299 PR c/70093
1300 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1301 nested functions returning VM types.
1302
96b3c82d
CP
13032016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1304
1305 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1306 when calling c_finish_omp_clauses.
1307
29b9828f
BS
13082016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1309
1310 PR c/69824
1311 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1312 for later.
1313
7ff6ca38
MP
13142016-03-04 Marek Polacek <polacek@redhat.com>
1315
1316 PR c/69798
1317 * c-parser.c (c_parser_postfix_expression): Call
1318 c_parser_cast_expression rather than c_parser_postfix_expression.
1319
686e2237
JJ
13202016-03-01 Jakub Jelinek <jakub@redhat.com>
1321
1322 PR c/69796
1323 PR c/69974
1324 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1325 of incomplete decls to error_mark_node.
1326
0b05329b
MP
13272016-02-24 Marek Polacek <polacek@redhat.com>
1328
1329 PR c/69819
1330 * c-decl.c (finish_decl): Don't update the copy of the type of a
1331 different decl type.
1332
067fbd8b
JJ
13332016-02-23 Jakub Jelinek <jakub@redhat.com>
1334
1335 PR objc/69844
1336 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1337 in id_kind reclassification.
1338
bf14eba2
JJ
13392016-02-16 Jakub Jelinek <jakub@redhat.com>
1340
1341 PR c/69835
1342 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1343
ba539195
JN
13442016-02-16 James Norris <jnorris@codesourcery.com>
1345
1346 PR c/64748
1347 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1348
16595a1f
BS
13492016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1350
f48dfe98
BS
1351 * c-decl.c (build_null_declspecs): Zero the entire struct.
1352
16595a1f
BS
1353 PR c/69522
1354 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1355 callers changed. If nested_p is true, use it to call
1356 finish_implicit_inits.
1357 * c-tree.h (finish_implicit_inits): Declare.
1358 * c-typeck.c (finish_implicit_inits): New function. Move code
1359 from ...
1360 (push_init_level): ... here.
1361 (set_designator, process_init_element): Call finish_implicit_inits.
1362
66756373
JJ
13632016-02-11 Jakub Jelinek <jakub@redhat.com>
1364
1365 PR c/69768
1366 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1367 arguments for -Waddress warning.
1368
1066e9b5
JJ
13692016-02-04 Jakub Jelinek <jakub@redhat.com>
1370
1371 PR c/69669
1372 * c-decl.c (finish_enum): When honoring mode attribute,
1373 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1374
3a5d2ba4
JJ
13752016-01-29 Jakub Jelinek <jakub@redhat.com>
1376
1377 PR debug/69518
1378 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1379 all type variants, not just TYPE_MAIN_VARIANT.
1380
cbdd8ae0
JJ
13812016-01-27 Jakub Jelinek <jakub@redhat.com>
1382
1383 PR debug/66869
1384 * c-decl.c (c_write_global_declarations_1): Warn with
1385 warn_unused_function if static prototype without definition
1386 is not C_DECL_USED.
1387
fa74a4bc
MP
13882016-01-27 Marek Polacek <polacek@redhat.com>
1389
1390 PR c/68062
1391 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1392 to unsigned, if needed. Add -Wsign-compare warning.
1393
13f92e8d
JJ
13942016-01-26 Jakub Jelinek <jakub@redhat.com>
1395
1396 PR tree-optimization/69483
1397 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1398
cd8e73dc 13992016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1400
1401 PR c/24293
1402 * c-tree.h (incomplete_record_decls): Declare.
1403 * c-parser.c (incomplete_record_decls): Define.
1404 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1405 report error if any decl has zero size.
1406 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1407 or enum type to incomplete_record_decls.
1408
e6d6ec9e
TV
14092016-01-14 Tom de Vries <tom@codesourcery.com>
1410
1411 PR tree-optimization/68773
1412 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1413 set force_output.
1414
00083992
MP
14152016-01-14 Marek Polacek <polacek@redhat.com>
1416
1417 PR c/69262
1418 * c-decl.c (grokdeclarator): Provide more information for invalid
1419 array declarations.
1420
7443cf13
DM
14212016-01-06 David Malcolm <dmalcolm@redhat.com>
1422
1423 * c-parser.c (c_parser_unary_expression): For dereferences, build
1424 a combined location before calling build_indirect_ref, so that
1425 error reports cover the full range, manually updating the c_expr
1426 src_range.
1427
6b131d5b
MP
14282016-01-06 Marek Polacek <polacek@redhat.com>
1429
1430 PR sanitizer/69099
1431 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1432 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1433 NULL.
1434
818ab71a
JJ
14352016-01-04 Jakub Jelinek <jakub@redhat.com>
1436
1437 Update copyright years.
1438
2fe0a208
MP
14392016-01-04 Marek Polacek <polacek@redhat.com>
1440
1441 PR c/68908
1442 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1443 optimization to use __atomic_fetch_* built-in if possible.
1444
c7b48c8a
TS
14452015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1446
1447 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1448 into...
1449 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1450 all users.
1451
fda5652f
MP
14522015-12-22 Marek Polacek <polacek@redhat.com>
1453
1454 PR c/69002
1455 * c-typeck.c (build_component_ref): Warn when acessing elements of
1456 atomic structures or unions.
1457
745e411d
DM
14582015-12-21 David Malcolm <dmalcolm@redhat.com>
1459
1460 * c-typeck.c: Include "gcc-rich-location.h".
1461 (build_binary_op): In the two places that call binary_op_error,
1462 create a gcc_rich_location and populate it with the location of
1463 the binary op and its two operands.
1464
94c40e19
DM
14652015-12-16 David Malcolm <dmalcolm@redhat.com>
1466
1467 * c-parser.c (c_parser_statement_after_labels): When calling
1468 c_finish_return, Use the return expression's location if it has
1469 one, falling back to the location of the first token within it.
1470 * c-typeck.c (c_finish_return): When issuing warnings about
1471 the incorrect presence/absence of a return value, issue a note
1472 showing the declaration of the function.
1473
de67c4c3
DM
14742015-12-16 David Malcolm <dmalcolm@redhat.com>
1475
1476 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1477 to 4.
1478 (c_parser_peek_nth_token): New function.
1479 (c_parser_peek_conflict_marker): New function.
1480 (c_parser_error): Detect conflict markers and report them as such.
1481
a10704e1
DM
14822015-12-16 David Malcolm <dmalcolm@redhat.com>
1483
1484 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1485 to preserve range information for the primary expression
1486 in the call to c_parser_postfix_expression_after_primary.
1487
8062bca6
DM
14882015-12-16 David Malcolm <dmalcolm@redhat.com>
1489
1490 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1491 expression location, falling back on the first token location,
1492 rather than always using the latter.
1493
d06f8b75
MP
14942015-12-16 Marek Polacek <polacek@redhat.com>
1495
1496 PR c/64637
1497 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1498 available.
1499
2994fb91
MP
15002015-12-15 Marek Polacek <polacek@redhat.com>
1501
1502 PR c/68907
1503 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1504 artificial decl.
1505
a1b93f8d
DM
15062015-12-08 David Malcolm <dmalcolm@redhat.com>
1507
1508 * c-parser.c (c_parser_alignof_expression): Capture location of
1509 closing parenthesis (if any), or of end of unary expression, and
1510 use it to build a src_range for the expression.
1511
46c6e1e2
DM
15122015-12-08 David Malcolm <dmalcolm@redhat.com>
1513
1514 PR c/68757
1515 * c-parser.c (c_parser_get_builtin_args): Add
1516 "out_close_paren_loc" param, and write back to it.
1517 (c_parser_postfix_expression): Capture the closing
1518 parenthesis location for RID_CHOOSE_EXPR,
1519 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1520 RID_BUILTIN_SHUFFLE and use it to set the source range
1521 for such expressions; within RID_BUILTIN_COMPLEX set
1522 the underlying location.
1523
66189108
MP
15242015-12-07 Marek Polacek <polacek@redhat.com>
1525
1526 PR c/68668
1527 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1528 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1529
f187980b
EB
15302015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1531
1532 * c-tree.h (c_build_va_arg): Adjust prototype.
1533 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1534 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1535 parameter, adjust throughout and issue an error if EXPR is a component
1536 with reverse storage order.
1537
4250754e
JM
15382015-12-02 Jason Merrill <jason@redhat.com>
1539
1540 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1541 (c_fully_fold_internal, decl_constant_value_for_optimization):
1542 Move from c-common.c.
1543 * c-tree.h: Declare decl_constant_value_for_optimization.
1544 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1545
e9e32ee6
JM
15462015-12-02 Joseph Myers <joseph@codesourcery.com>
1547
1548 PR c/68162
1549 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1550 following link from declarator to next declarator. Track original
1551 qualified type and pass it to c_build_qualified_type.
1552 * c-typeck.c (c_build_qualified_type): Add arguments
1553 orig_qual_type and orig_qual_indirect.
1554
ff7a55bf
TS
15552015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1556
1557 * c-parser.c (c_parser_omp_clause_name)
1558 (c_parser_oacc_all_clauses): Alphabetical sorting.
1559
657e4e47
JJ
15602015-12-02 Jakub Jelinek <jakub@redhat.com>
1561
1562 PR c/68533
1563 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1564 for diagnostics.
1565
37d5ad46
JB
15662015-12-01 Julian Brown <julian@codesourcery.com>
1567 Cesar Philippidis <cesar@codesourcery.com>
1568 James Norris <James_Norris@mentor.com>
1569
1570 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1571 (c_parser_oacc_clause_use_device): New function.
1572 (c_parser_oacc_all_clauses): Add use_device support.
1573 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1574 (c_parser_oacc_host_data): New function.
1575 (c_parser_omp_construct): Add host_data support.
1576 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1577 * c-typeck.c (c_finish_oacc_host_data): New function.
1578 (c_finish_omp_clauses): Add use_device support.
1579
a4850ce9
JH
15802015-11-29 Jan Hubicka <hubicka@ucw.cz>
1581
1582 PR c/67106
1583 * c-decl.c: Set TYPE_PACKED in variants.
1584
b58d3df2
ML
15852015-11-27 Martin Liska <mliska@suse.cz>
1586
1587 PR c++/68312
1588 * c-array-notation.c (fix_builtin_array_notation_fn):
1589 Use release_vec_vec instead of vec::release.
1590 (build_array_notation_expr): Likewise.
1591 (fix_conditional_array_notations_1): Likewise.
1592 (fix_array_notation_expr): Likewise.
1593 (fix_array_notation_call_expr): Likewise.
1594
aec17bfe
JJ
15952015-11-27 Jakub Jelinek <jakub@redhat.com>
1596
1597 PR c/63326
1598 * c-parser.c (c_parser_compound_statement_nostart): If
1599 last_label is true, use pragma_stmt instead of pragma_compound
1600 as second c_parser_pragma argument.
1601 (c_parser_omp_ordered, c_parser_omp_target_update,
1602 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1603 false as second argument to c_parser_skip_to_pragma_eol after
1604 diagnosing standalone directives used in pragma_stmt context.
1605
688c4de0
IV
16062015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1607
1608 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1609 with "if (ENABLE_OFFLOADING)".
1610
cbd03aee
DM
16112015-11-23 David Malcolm <dmalcolm@redhat.com>
1612
1613 PR objc/68438
1614 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1615 for various Objective-C constructs: Class.name syntax,
1616 @selector(), @protocol(), @encode(), and [] message syntax.
1617
a87a86e1
DM
16182015-11-20 David Malcolm <dmalcolm@redhat.com>
1619
1620 PR 62314
1621 * c-typeck.c (should_suggest_deref_p): New function.
1622 (build_component_ref): Special-case POINTER_TYPE when
1623 generating a "not a structure of union" error message, and
1624 suggest a "->" rather than a ".", providing a fix-it hint.
1625
8ece8dfb
DM
16262015-11-19 David Malcolm <dmalcolm@redhat.com>
1627
1628 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1629 candidate into a new function, find_closest_identifier.
1630
433068cc
MP
16312015-11-19 Marek Polacek <polacek@redhat.com>
1632
1633 PR c/68412
1634 * c-typeck.c (parser_build_binary_op): Properly handle
1635 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1636
bef08b71
DM
16372015-11-17 David Malcolm <dmalcolm@redhat.com>
1638
1639 * c-parser.c (set_c_expr_source_range): Bulletproof both
1640 overloaded implementations against NULL expr->value.
1641 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1642 values.
1643 (c_parser_unary_expression): Likewise when handling addresses of
1644 labels.
1645 (c_parser_postfix_expression): Likewise for statement expressions,
1646 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1647 __builtin_va_arg, and for __builtin_offset_of.
1648 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1649 src_range using the range of the braced initializer.
1650 (c_parser_transaction_expression): Set src_range for "ret" to a
1651 sane pair of values.
1652
fff77217
KY
16532015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1654
1655 * c-parser.c (c_finish_omp_declare_simd): Look for
1656 "simd" attribute as well. Update error message.
1657
1d899da2
TS
16582015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1659
1660 * c-parser.c (c_parser_omp_declare_target): Adjust.
1661
e4606348
JJ
16622015-11-14 Jakub Jelinek <jakub@redhat.com>
1663
1664 * c-typeck.c (c_finish_omp_clauses): Don't mark
1665 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1666
3e636daf
MP
16672015-11-14 Marek Polacek <polacek@redhat.com>
1668
1669 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1670 * c-typeck.c: Likewise.
1671
ebedc9a3
DM
16722015-11-13 David Malcolm <dmalcolm@redhat.com>
1673
1674 * c-decl.c (warn_defaults_to): Pass line_table to
1675 rich_location ctor.
1676 * c-errors.c (pedwarn_c99): Likewise.
1677 (pedwarn_c90): Likewise.
1678 * c-parser.c (set_c_expr_source_range): New functions.
1679 (c_token::get_range): New method.
1680 (c_token::get_finish): New method.
1681 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1682 based on the range from the start of the LHS to the end of the
1683 RHS.
1684 (c_parser_conditional_expression): Likewise, based on the range
1685 from the start of the cond.value to the end of exp2.value.
1686 (c_parser_binary_expression): Call set_c_expr_source_range on
1687 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1688 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1689 based on the cast_loc through to the end of the expr.
1690 (c_parser_unary_expression): Likewise, based on the
1691 op_loc through to the end of op.
1692 (c_parser_sizeof_expression) Likewise, based on the start of the
1693 sizeof token through to either the closing paren or the end of
1694 expr.
1695 (c_parser_postfix_expression): Likewise, using the token range,
1696 or from the open paren through to the close paren for
1697 parenthesized expressions.
1698 (c_parser_postfix_expression_after_primary): Likewise, for
1699 various kinds of expression.
1700 * c-tree.h (struct c_expr): Add field "src_range".
1701 (c_expr::get_start): New method.
1702 (c_expr::get_finish): New method.
1703 (set_c_expr_source_range): New decls.
1704 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1705 on ret for prefix unary ops.
1706 (parser_build_binary_op): Likewise, running from the start of
1707 arg1.value through to the end of arg2.value.
1708
ec8b536f
MP
17092015-11-13 Marek Polacek <polacek@redhat.com>
1710
1711 PR c/68320
1712 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1713
277fe616
DM
17142015-11-13 David Malcolm <dmalcolm@redhat.com>
1715
1716 * c-typeck.c: Include spellcheck.h.
1717 (lookup_field_fuzzy_find_candidates): New function.
1718 (lookup_field_fuzzy): New function.
1719 (build_component_ref): If the field was not found, try using
1720 lookup_field_fuzzy and potentially offer a suggestion.
1721
6e232ba4
JN
17222015-11-12 James Norris <jnorris@codesourcery.com>
1723 Joseph Myers <joseph@codesourcery.com>
1724
1725 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1726 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1727 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1728 and PRAGMA_OMP_CLAUSE_LINK.
1729 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1730 and PRAGMA_OACC_CLAUSE_LINK.
1731 (OACC_DECLARE_CLAUSE_MASK): New definition.
1732 (c_parser_oacc_declare): New function.
1733
9be4f715
MP
17342015-11-12 Marek Polacek <polacek@redhat.com>
1735
1736 PR c/67784
1737 * c-parser.c (c_parser_for_statement): Reclassify the token in
1738 a correct scope.
1739
e78bede6
MP
17402015-11-11 Marek Polacek <polacek@redhat.com>
1741
1742 PR c/68107
1743 PR c++/68266
1744 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1745 checking the size of an array.
1746
69f293c9
AM
17472015-11-11 Andrew MacLeod <amacleod@redhat.com>
1748
1749 * c-array-notation.c: Remove unused header files.
1750 * c-aux-info.c: Likewise.
1751 * c-convert.c: Likewise.
1752 * c-decl.c: Likewise.
1753 * c-errors.c: Likewise.
1754 * c-lang.c: Likewise.
1755 * c-objc-common.c: Likewise.
1756 * c-parser.c: Likewise.
1757 * c-typeck.c: Likewise.
1758 * gccspec.c: Likewise.
1759
3a40d81d
NS
17602015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1761 Cesar Philippidis <cesar@codesourcery.com>
1762 James Norris <jnorris@codesourcery.com>
1763 Julian Brown <julian@codesourcery.com>
1764 Nathan Sidwell <nathan@codesourcery.com>
1765
1766 c/
1767 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1768 routine arg.
1769 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1770 (c_parser_pragma): Parse 'acc routine'.
1771 (OACC_ROUTINE_CLAUSE_MARK): Define.
1772 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1773
fc402eec
AA
17742015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1775
1776 PR debug/67192
1777 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1778 location of the backward-goto to the start of the loop body.
1779
f6b0b3db
AA
17802015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1781
1782 PR debug/67192
1783 * c-parser.c (c_parser_while_statement): Finish the loop before
1784 parsing ahead for misleading indentation.
1785 (c_parser_for_statement): Likewise.
1786
ee45a32d
EB
17872015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1788
1789 * c-decl.c (finish_struct): If the structure has reverse storage
1790 order, rewrite the type of array fields with scalar component. Call
1791 maybe_apply_pragma_scalar_storage_order on entry.
1792 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1793 errors on bit-fields and reverse SSO here and not...
1794 (c_mark_addressable): ...here.
1795 (output_init_element): Adjust call to initializer_constant_valid_p.
1796 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1797
8a645150
DM
17982015-11-06 David Malcolm <dmalcolm@redhat.com>
1799
1800 * c-decl.c (warn_defaults_to): Update for change in signature
1801 of diagnostic_set_info.
1802 * c-errors.c (pedwarn_c99): Likewise.
1803 (pedwarn_c90): Likewise.
1804 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1805 for textinfo::set_location.
1806
7a5e4956
CP
18072015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1808 Thomas Schwinge <thomas@codesourcery.com>
1809 James Norris <jnorris@codesourcery.com>
1810
1811 * c-parser.c (c_parser_omp_clause_name): Add support for
1812 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1813 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1814 default(none) in OpenACC.
1815 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1816 arguments.
1817 (c_parser_oacc_clause_tile): New function.
1818 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1819 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1820 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1821 TILE}.
1822 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1823 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1824 FIRSTPRIVATE}.
1825 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1826 (c_parser_oacc_update): Update the error message for missing clauses.
1827 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1828 and OMP_CLAUSE_INDEPENDENT.
1829
bfcfbfa0
MP
18302015-11-05 Marek Polacek <polacek@redhat.com>
1831
1832 PR c/68090
1833 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1834 deal with pre-evaluation on invalid types.
1835
e01d41e5
JJ
18362015-11-05 Jakub Jelinek <jakub@redhat.com>
1837 Ilya Verbin <ilya.verbin@intel.com>
1838
1839 * c-parser.c: Include context.h and gimple-expr.h.
1840 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1841 monotonic together with nonmonotonic.
1842 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1843 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1844 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1845 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1846 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1847 expressions on combined target teams before the target.
1848 (c_parser_omp_declare_target): If decl has "omp declare target" or
1849 "omp declare target link" attribute, and cgraph or varpool node already
1850 exists, then set corresponding flags. Call c_finish_omp_clauses
1851 in the parenthesized extended-list syntax case.
1852 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1853 declare target.
1854 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1855 on OMP_CLAUSE_REDUCTION array sections.
1856 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1857 into the constant offset, or for variable low-bound using
1858 POINTER_PLUS_EXPR. For structure element based array sections use
1859 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1860 (c_finish_omp_clauses): Drop generic_field_head, structure
1861 elements are now always mapped even as array section bases,
1862 diagnose same var in data sharing and mapping clauses. Diagnose if
1863 linear step on declare simd is neither a constant nor a uniform
1864 parameter. Look through POINTER_PLUS_EXPR for array section
1865 reductions. Diagnose the same var or function appearing multiple
1866 times on the same directive. Fix up wording for the to clause if t
1867 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1868 modifier on kinds other than dynamic or guided or nonmonotonic
1869 modifier together with ordered clause.
1870
4bf9e5a8
TS
18712015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1872 Chung-Lin Tang <cltang@codesourcery.com>
1873
1874 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1875
2adfab87
AM
18762015-10-29 Andrew MacLeod <amacleod@redhat.com>
1877
1878 * c-array-notation.c: Reorder #include's and remove duplicates.
1879 * c-aux-info.c: Likewise.
1880 * c-convert.c: Likewise.
1881 * c-decl.c: Likewise.
1882 * c-errors.c: Likewise.
1883 * c-lang.c: Likewise.
1884 * c-objc-common.c: Likewise.
1885 * c-parser.c: Likewise.
1886 * c-typeck.c: Likewise.
1887
e922069e
JW
18882015-10-26 Jim Wilson <jim.wilson@linaro.org>
1889
1890 PR debug/66068
1891 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1892 after calling build_qualified_type.
1893
765dd391
CP
18942015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1895 Thomas Schwinge <thomas@codesourcery.com>
1896 James Norris <jnorris@codesourcery.com>
1897 Joseph Myers <joseph@codesourcery.com>
1898 Julian Brown <julian@codesourcery.com>
1899 Bernd Schmidt <bschmidt@redhat.com>
1900
1901 * c-parser.c (c_parser_oacc_shape_clause): New.
1902 (c_parser_oacc_simple_clause): New.
1903 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1904 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1905
88bae6f4
TS
19062015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1907 James Norris <jnorris@codesourcery.com>
1908 Cesar Philippidis <cesar@codesourcery.com>
1909
1910 PR c/64765
1911 PR c/64880
1912 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1913 parameters, and handle these. Adjust all users.
1914 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1915 into...
1916 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1917 all users.
1918 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1919 declare functions.
1920 (c_finish_omp_construct): Declare function.
1921 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1922 Merge functions into...
1923 (c_finish_omp_construct): ... this new function.
1924
a8fc2579
RB
19252015-10-22 Richard Biener <rguenther@suse.de>
1926
1927 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1928 before folding a MINUS_EXPR.
1929
e9122ef6
MP
19302015-10-21 Marek Polacek <polacek@redhat.com>
1931
1932 PR c/68024
1933 * c-decl.c (start_function): Warn about vararg functions without
1934 a prototype.
1935
9f47c7e5
IE
19362015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1937
1938 * c-typeck.c (build_conditional_expr): Use boolean vector
1939 type for vector comparison.
1940 (build_vec_cmp): New.
1941 (build_binary_op): Use build_vec_cmp for comparison.
1942
fa60eeb9
MP
19432015-10-20 Marek Polacek <polacek@redhat.com>
1944
1945 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1946
2c7020eb
MP
19472015-10-20 Marek Polacek <polacek@redhat.com>
1948
1949 PR c/67964
1950 * c-parser.c (c_parser_attributes): Break out of the loop if the
1951 token after an attribute isn't a comma.
1952
d9a6bd32
JJ
19532015-10-13 Jakub Jelinek <jakub@redhat.com>
1954 Aldy Hernandez <aldyh@redhat.com>
1955
1956 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1957 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1958 (c_parser_omp_variable_list): Handle structure elements for
1959 map, to and from clauses. Handle array sections in reduction
1960 clause. Formatting fixes.
1961 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1962 if clause modifiers.
1963 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1964 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1965 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1966 c_parser_omp_clause_is_device_ptr): New functions.
1967 (c_parser_omp_clause_ordered): Parse optional parameter.
1968 (c_parser_omp_clause_reduction): Handle array reductions.
1969 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1970 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1971 functions.
1972 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1973 (c_parser_omp_clause_depend_sink): New function.
1974 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1975 (c_parser_omp_clause_map): Parse release/delete map kinds and
1976 optional always modifier.
1977 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1978 and c_finish_omp_clauses callers.
1979 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1980 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1981 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1982 (OMP_CRITICAL_CLAUSE_MASK): Define.
1983 (c_parser_omp_critical): Parse critical clauses.
1984 (c_parser_omp_for_loop): Handle doacross loops, adjust
1985 c_finish_omp_for and c_finish_omp_clauses callers.
1986 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1987 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1988 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1989 (c_parser_omp_for): Disallow ordered clause when combined with
1990 distribute. Disallow linear clause when combined with distribute
1991 and not combined with simd.
1992 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1993 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1994 parse clauses and if depend clause is found, don't parse a body.
1995 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1996 Allow target parallel without for after it.
1997 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1998 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1999 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2000 invalid kinds.
2001 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2002 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2003 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2004 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2005 functions.
2006 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2007 defaultmap and is_device_ptr clauses.
2008 (c_parser_omp_target): Parse target parallel and target simd. Set
2009 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2010 and target exit data. Diagnose invalid map kinds.
2011 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2012 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2013 construct.
2014 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2015 &omp_priv.
2016 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2017 (c_parser_omp_taskloop): New function.
2018 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2019 handle PRAGMA_OMP_TASKLOOP.
2020 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2021 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2022 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2023 Add IS_OMP argument, handle structure element bases, diagnose
2024 bitfields, pass IS_OMP recursively, diagnose known zero length
2025 array sections in depend clauses, handle array sections in reduction
2026 clause, diagnose negative length even for pointers.
2027 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2028 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2029 array sections in reduction clause, set
2030 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2031 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2032 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2033 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2034
21ba0cea
MP
20352015-10-06 Marek Polacek <polacek@redhat.com>
2036
2037 * c-parser.c (c_parser_statement_after_labels): Use
2038 protected_set_expr_location.
2039 (c_parser_omp_clause_num_gangs): Likewise.
2040 (c_parser_omp_clause_num_threads): Likewise.
2041 (c_parser_omp_clause_num_workers): Likewise.
2042 (c_parser_omp_clause_vector_length): Likewise.
2043 (c_parser_omp_clause_num_teams): Likewise.
2044 (c_parser_omp_clause_thread_limit): Likewise.
2045 * c-typeck.c (build_c_cast): Likewise.
2046 (c_cast_expr): Likewise.
2047
624d31fe
RS
20482015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2049
2050 * c-typeck.c (c_tree_equal): Use real_equal instead of
2051 REAL_VALUES_EQUAL.
2052
b8fd7909
JM
20532015-10-04 Jason Merrill <jason@redhat.com>
2054
2055 * c-parser.c (c_lex_one_token): Handle @synchronized.
2056 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2057 can change whether the function is transaction_safe.
2058
1c7485af
MP
20592015-10-02 Marek Polacek <polacek@redhat.com>
2060
2061 PR c/67730
2062 * c-typeck.c (convert_for_assignment): Use the expansion point
2063 location throughout.
2064
3e3b8d63
MP
20652015-10-02 Marek Polacek <polacek@redhat.com>
2066
2067 PR c/64249
2068 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2069 and pass it down to c_parser_if_statement.
2070 (c_parser_else_body): Add CHAIN parameter and pass it down to
2071 c_parser_statement_after_labels.
2072 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2073 duplicated if-else-if conditions.
2074
aabef2de
MP
20752015-10-01 Marek Polacek <polacek@redhat.com>
2076
2077 * c-typeck.c (convert_for_assignment): Improve commentary.
2078
de8ddd5f
MP
20792015-09-30 Marek Polacek <polacek@redhat.com>
2080
2081 PR c/67730
2082 * c-typeck.c (c_finish_return): Use the expansion point location for
2083 certain "return with value" warnings.
2084
c4914de6
MLI
20852015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2086
2087 * c-parser.c (pragma_lex): Add loc argument.
2088
0e36f5c7
MP
20892015-09-15 Marek Polacek <polacek@redhat.com>
2090
2091 PR c/67580
2092 * c-decl.c (tag_exists_p): New function.
2093 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2094 struct/union/enum keywords are missing.
2095 * c-tree.h (tag_exists_p): Declare.
2096
2f3bb934
MP
20972015-09-15 Marek Polacek <polacek@redhat.com>
2098
2099 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2100 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2101 Return NULL_TREE instead of 0.
2102 (lookup_name): Return NULL_TREE instead of 0.
2103 (lookup_name_in_scope): Likewise.
2104 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2105 (parser_xref_tag): Use false instead of 0.
2106 (start_struct): Use true instead of 1.
2107 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2108
aa256c4a
MP
21092015-09-14 Marek Polacek <polacek@redhat.com>
2110
2111 * c-typeck.c (set_nonincremental_init_from_string): Use
2112 HOST_WIDE_INT_M1U when shifting a negative value.
2113
dbb68221
MW
21142015-09-09 Mark Wielaard <mjw@redhat.com>
2115
2116 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2117 parm against NULL.
2118
a8a098ac
JJ
21192015-09-10 Jakub Jelinek <jakub@redhat.com>
2120
2121 PR c/67502
2122 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2123 into OMP_FOR_PRE_BODY rather than before the loop.
2124
f4b189d5
JJ
21252015-09-09 Jakub Jelinek <jakub@redhat.com>
2126
0bb99c11
JJ
2127 PR c/67501
2128 * c-parser.c (c_parser_oacc_all_clauses,
2129 c_parser_omp_all_clauses): Remove invalid clause from
2130 list of clauses even if parser->error is set.
2131
fce5e5e3
JJ
2132 PR c/67500
2133 * c-parser.c (c_parser_omp_clause_aligned,
2134 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2135 test for errors.
2136 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2137 error_mark_node.
2138
f4b189d5
JJ
2139 PR c/67495
2140 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2141 instead of c_parser_unary_expression. If the result is !lvalue_p,
2142 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2143
b2aaf235
MP
21442015-09-04 Marek Polacek <polacek@redhat.com>
2145
2146 PR sanitizer/67279
2147 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2148
1807ffc1
MS
21492015-09-03 Martin Sebor <msebor@redhat.com>
2150
2151 PR c/66516
8b652e65
JJ
2152 * c-typeck.c (convert_arguments, parser_build_unary_op,
2153 build_conditional_expr, c_cast_expr, convert_for_assignment,
2154 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2155 reject_gcc_builtin.
2156 (c_decl_implicit): Define.
2157
d04ff417
MP
21582015-09-02 Marek Polacek <polacek@redhat.com>
2159
2160 PR c/67432
2161 * c-parser.c (c_parser_enum_specifier): Give a better error for
2162 an empty enum.
2163
a79683d5
TS
21642015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2165
2166 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2167
191a6b94
MP
21682015-08-12 Marek Polacek <polacek@redhat.com>
2169
2170 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2171 LOC to it.
2172
420a9d9b
MP
21732015-08-03 Marek Polacek <polacek@redhat.com>
2174
2175 PR c/67088
2176 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2177 Use it.
2178 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2179
992118a1
PP
21802015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2181
2182 * c-parser.c (c_parser_if_body): Take token_indent_info
2183 argument. Call warn_for_misleading_indentation even when the
2184 body is a semicolon. Extract token_indent_infos corresponding
2185 to the guard, body and next tokens. Adjust call to
2186 warn_for_misleading_indentation accordingly.
2187 (c_parser_else_body): Likewise.
2188 (c_parser_if_statement): Likewise.
2189 (c_parser_while_statement): Likewise.
2190 (c_parser_for_statement): Likewise.
2191
46308474
LFSM
21922015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2193 Manuel López-Ibáñez <manu@gcc.gnu.org>
2194
2195 * c-decl.c (get_parm_info): Remove static var. Update warning
2196 message.
2197
05b28fd6
MP
21982015-07-27 Marek Polacek <polacek@redhat.com>
2199
2200 PR c++/66555
2201 PR c/54979
2202 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2203
451b5e48
MP
22042015-07-20 Marek Polacek <polacek@redhat.com>
2205
2206 PR c++/55095
2207 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2208 (build_binary_op): Warn about left shift overflows.
2209
1916bcb5
AM
22102015-07-09 Andrew MacLeod <amacleod@redhat.com>
2211
2212 * c-array-notation.c: Adjust includes for flags.h changes.
2213 * c-objc-common.c: Likewise.
2214
c7131fb2
AM
22152015-07-07 Andrew MacLeod <amacleod@redhat.com>
2216
2217 * c-array-notation.c: Adjust includes.
2218 * c-aux-info.c: Likewise.
2219 * c-convert.c: Likewise.
2220 * c-decl.c: Likewise.
2221 * c-errors.c: Likewise.
2222 * c-lang.c: Likewise.
2223 * c-objc-common.c: Likewise.
2224 * c-parser.c: Likewise.
2225 * c-typeck.c: Likewise.
2226
da2e71c9
MLI
22272015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2228
2229 PR fortran/66605
2230 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2231
b155cfd9
MP
22322015-06-29 Marek Polacek <polacek@redhat.com>
2233
2234 PR c/66322
2235 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2236 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2237 about -Wswitch-bool here.
2238 (do_case): Update c_add_case_label call.
2239 (c_finish_case): Update c_do_switch_warnings call.
2240
31521951
MP
22412015-06-27 Marek Polacek <polacek@redhat.com>
2242
2243 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2244
22d03525
MP
22452015-06-26 Marek Polacek <polacek@redhat.com>
2246
2247 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2248 INDIRECT_REF_P.
2249 * c-typeck.c (array_to_pointer_conversion): Likewise.
2250 (build_unary_op): Likewise.
2251 (c_finish_return): Likewise.
2252
f0889939
AM
22532015-06-25 Andrew MacLeod <amacleod@redhat.com>
2254
2255 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2256 * c-parser.c: Likewise.
2257
8d67ee55
RS
22582015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2259
2260 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2261 instead of pointer_hash.
2262 (detect_field_duplicates): Likewise.
2263
0ae9bd27
MP
22642015-06-25 Marek Polacek <polacek@redhat.com>
2265
2266 * c-array-notation.c: Use VAR_P throughout.
2267 * c-decl.c: Likewise.
2268 * c-objc-common.c: Likewise.
2269 * c-parser.c: Likewise.
2270 * c-typeck.c: Likewise.
2271
62f9079a
MP
22722015-06-25 Marek Polacek <polacek@redhat.com>
2273
2274 * c-decl.c: Use is_global_var throughout.
2275 * c-parser.c: Likewise.
2276 * c-typeck.c: Likewise.
2277
abb226c9
AM
22782015-06-17 Andrew MacLeod <amacleod@redhat.com>
2279
2280 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2281 * c-aux-info.c: Likewise.
2282 * c-convert.c: Likewise.
2283 * c-decl.c: Likewise.
2284 * c-errors.c: Likewise.
2285 * c-lang.c: Likewise.
2286 * c-objc-common.c: Likewise.
2287 * c-parser.c: Likewise.
2288 * c-typeck.c: Likewise.
2289
8cbababc
JH
22902015-06-11 Jan Hubicka <hubicka@ucw.cz>
2291
2292 PR middle-end/66325
2293 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2294 variants.
2295
a0349665
PMR
22962015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2297
2298 * c-decl.c (pop_scope): Register the main translation unit
2299 through the new debug hook.
2300
13fdf2e2
AM
23012015-06-08 Andrew MacLeod <amacleod@redhat.com>
2302
2303 * c-array-notation.c : Adjust include files.
2304 * c-aux-info.c : Likewise.
2305 * c-convert.c : Likewise.
2306 * c-decl.c : Likewise.
2307 * c-errors.c : Likewise.
2308 * c-lang.c : Likewise.
2309 * c-lang.h : Likewise.
2310 * c-objc-common.c : Likewise.
2311 * c-parser.c : Likewise.
2312 * c-typeck.c : Likewise.
2313
d7438551
AH
23142015-06-05 Aldy Hernandez <aldyh@redhat.com>
2315
2316 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2317 immediately clobber it.
2318 (c_write_global_declarations_1): Remove call to
2319 check_global_declaration_1.
2320 (c_write_global_declarations_2): Remove.
2321 (c_write_final_cleanups): Rename from c_write_global_declarations.
2322 Remove call to finalize_compilation_unit.
2323 Remove calls to debugging hooks.
2324 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2325 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2326 * c-tree.h: Remove c_write_global_declarations.
2327
ecb9f223
AM
23282015-06-04 Andrew MacLeod <amacleod@redhat.com>
2329
2330 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2331 * c-aux-info.c: Likewise.
2332 * c-convert.c: Likewise.
2333 * c-decl.c: Likewise.
2334 * c-errors.c: Likewise.
2335 * c-lang.c: Likewise.
2336 * c-objc-common.c: Likewise.
2337 * c-parser.c: Likewise.
2338 * c-typeck.c: Likewise.
2339
9482b620
MP
23402015-06-04 Marek Polacek <polacek@redhat.com>
2341
2342 PR c/66341
2343 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2344 it is a lvalue.
2345
bc51ace3
PK
23462015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2347
2348 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2349 Warn for empty struct.
2350 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2351
ea5b45b6
AT
23522015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2353
2354 * c-decl.c (start_function): Call plugin before parsing.
2355 (finish_function): Call plugin after parsing.
2356
c2d47482
PK
23572015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2358
2359 PR c/49551
2360 * c-decl.c (merge_decls): Merge DECL_COMMON.
2361
a95492ab
JW
23622015-05-22 Jim Wilson <jim.wilson@linaro.org>
2363
2364 * Make-lang.in (check_gcc_pallelize): Define.
2365
fd5c817a
MP
23662015-05-22 Marek Polacek <polacek@redhat.com>
2367
2368 PR c/47043
2369 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2370 attributes.
2371
c7b70a3c
MP
23722015-05-21 Marek Polacek <polacek@redhat.com>
2373
2374 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2375 DECL_BUILT_IN.
2376
21b634ae
MP
23772015-05-20 Marek Polacek <polacek@redhat.com>
2378
2379 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2380 * c-typeck.c: Likewise.
2381
296a8c2f
MP
23822015-05-19 Marek Polacek <polacek@redhat.com>
2383
2384 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2385
41b37d5e
JJ
23862015-05-19 Jakub Jelinek <jakub@redhat.com>
2387
2388 PR middle-end/66199
2389 * c-parser.c (c_parser_omp_for_loop): Don't add
2390 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2391 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2392 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2393 constructs.
2394
fab27f52
MM
23952015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2396
2397 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2398 swaps.
fab27f52 2399
40de31cf
MLI
24002015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2401
2402 PR fortran/44054
2403 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2404 accessor function.
2405
3aa3c9fc
MP
24062015-05-14 Marek Polacek <polacek@redhat.com>
2407
2408 PR c/66066
2409 PR c/66127
2410 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2411 rather than with 0.
2412
c3388e62
DM
24132015-05-12 David Malcolm <dmalcolm@redhat.com>
2414
2415 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2416 to add a call to warn_for_misleading_indentation.
2417 (c_parser_else_body): Likewise, adding param "else_loc".
2418 (c_parser_if_statement): Check for misleading indentation.
2419 (c_parser_while_statement): Likewise.
2420 (c_parser_for_statement): Likewise.
2421
755e528f
MP
24222015-05-08 Marek Polacek <polacek@redhat.com>
2423
2424 PR c/64918
2425 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2426 (output_init_element): Likewise.
2427
0173bd2a
MP
24282015-05-07 Marek Polacek <polacek@redhat.com>
2429
2430 PR c/65179
2431 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2432 value.
2433
9babc352
MP
24342015-04-30 Marek Polacek <polacek@redhat.com>
2435
2436 * c-typeck.c (set_init_label): Call error_at instead of error and
2437 pass LOC to it.
2438
ac9f18db
MP
2439 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2440 the type of a decl.
2441
ec3fba51
MP
2442 * c-typeck.c (c_build_va_arg): Clarify the error message.
2443
b811915d
TS
24442015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2445
2446 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2447 OMP_STANDALONE_CLAUSES.
2448
f3075008
MP
24492015-04-28 Marek Polacek <polacek@redhat.com>
2450
2451 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2452
4e81b788
MP
24532015-04-28 Marek Polacek <polacek@redhat.com>
2454
2455 PR c/65901
2456 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2457
6c1db78e
MP
24582015-04-25 Marek Polacek <polacek@redhat.com>
2459
2460 PR c/52085
2461 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2462 attribute.
2463
5c4abbb8
MP
24642015-04-23 Marek Polacek <polacek@redhat.com>
2465
2466 PR c/65345
2467 * c-decl.c (set_labels_context_r): New function.
2468 (store_parm_decls): Call it via walk_tree_without_duplicates.
2469 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2470 instead of create_tmp_var. Build TARGET_EXPR instead of
2471 COMPOUND_EXPR.
2472 (build_atomic_assign): Use create_tmp_var_raw instead of
2473 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2474
06aca1d5
IV
24752015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2476
2477 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2478 (c_parser_omp_target_update): Add missed %> to error_at ().
2479
8fba1830
BRF
24802015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2481
2482 PR target/55143
2483 * c-decl.c (c_default_pointer_mode): Remove definition.
2484 * c-tree.h (c_default_pointer_mode): Remove declaration.
2485
62021f64
TB
24862015-03-27 Tobias Burnus <burnus@net-b.de>
2487
2488 PR c/65586
2489 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2490 error out.
2491 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2492 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2493 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2494
9b65e171
JJ
24952015-03-19 Jakub Jelinek <jakub@redhat.com>
2496
2497 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2498 attribute for DECL_EXTERNAL VAR_DECLs.
2499
17958621
JJ
25002015-03-11 Jakub Jelinek <jakub@redhat.com>
2501
2502 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2503 argument.
2504
7ccb1a11
JJ
25052015-03-10 Jakub Jelinek <jakub@redhat.com>
2506
2507 PR c/65120
2508 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2509 before preparing arguments to warn_logical_not_parentheses.
2510
01177669
JJ
25112015-03-09 Jakub Jelinek <jakub@redhat.com>
2512
2513 PR c/65120
2514 * c-typeck.c (parser_build_binary_op): Don't warn for
2515 !!x == y or !b == y where b is _Bool.
2516
802ac282
MP
25172015-03-09 Marek Polacek <polacek@redhat.com>
2518
2519 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2520 * c-decl.c (grokdeclarator): Likewise.
2521 * c-typeck.c (build_binary_op): Likewise.
2522
e5165b60
MP
25232015-02-27 Marek Polacek <polacek@redhat.com>
2524
2525 PR c/65228
2526 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2527
065d214c
MP
25282015-02-14 Marek Polacek <polacek@redhat.com>
2529
2530 PR c/64768
2531 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2532 declared through a typedef name.
2533
e5d9235b
MP
25342015-02-13 Marek Polacek <polacek@redhat.com>
2535
2536 PR c/65050
2537 * c-decl.c (grokdeclarator): Print also the type when giving
2538 the error message about array's incomplete element type.
2539
fa01ffcc
JJ
25402015-02-11 Jakub Jelinek <jakub@redhat.com>
2541
2542 PR c/64824
2543 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2544 check in the POP macro.
2545
c3e38a03
MP
25462015-02-09 Marek Polacek <polacek@redhat.com>
2547
2548 PR c/64856
2549 * c-typeck.c (process_init_element): Don't always wrap
2550 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2551 initializing a range of elements.
2552
4886ec8e
JJ
25532015-02-04 Jakub Jelinek <jakub@redhat.com>
2554
2555 PR c/64824
2556 PR c/64868
2557 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2558
c3e38a03 25592015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2560
2561 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2562 processing enum declaration.
2563
7b33f0c8
MP
25642015-01-29 Marek Polacek <polacek@redhat.com>
2565
2566 PR c/64709
2567 * c-typeck.c (pop_init_level): If constructor_elements has
2568 exactly one element with integer_zerop value, set constructor_zeroinit
2569 to 1. Remove braces around warning_init call.
2570
dea63e49
JJ
25712015-01-27 Jakub Jelinek <jakub@redhat.com>
2572
2573 PR c/64766
2574 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2575 of FUNCTION_DECLs with error_mark_node.
2576
d38f7dce
JJ
25772015-01-26 Jakub Jelinek <jakub@redhat.com>
2578
2579 PR c/64778
2580 * c-typeck.c (convert_arguments): Return -1 if there are
2581 error_args, even if we've diagnosed too many arguments.
2582
cbf5d0e7
RB
25832015-01-21 Richard Biener <rguenther@suse.de>
2584
2585 PR middle-end/64313
2586 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2587 for builtins the user declared correctly.
2588
41dbbb37
TS
25892015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2590 Bernd Schmidt <bernds@codesourcery.com>
2591 Cesar Philippidis <cesar@codesourcery.com>
2592 James Norris <jnorris@codesourcery.com>
2593 Jakub Jelinek <jakub@redhat.com>
2594 Ilmir Usmanov <i.usmanov@samsung.com>
2595
2596 * c-parser.c: Include "gomp-constants.h".
2597 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2598 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2599 Use OMP_CLAUSE_SET_MAP_KIND.
2600 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2601 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2602 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2603 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2604 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2605 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2606 "copyout", "create", "delete", "deviceptr", "gang", "host",
2607 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2608 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2609 "present_or_create", "pcreate", "seq", "self", "vector",
2610 "vector_length", "wait", "worker".
2611 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2612 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2613 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2614 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2615 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2616 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2617 (c_parser_oacc_data_clause_deviceptr)
2618 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2619 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2620 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2621 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2622 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2623 (c_parser_oacc_parallel, c_parser_oacc_update)
2624 (c_parser_oacc_wait): New functions.
2625 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2626 (c_finish_oacc_data): New prototypes.
2627 * c-typeck.c: Include "gomp-constants.h".
2628 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2629 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2630 OMP_CLAUSE_SET_MAP_KIND.
2631 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2632 (c_finish_oacc_data): New functions.
2633 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2634 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2635 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2636 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2637 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2638 GOMP_MAP_FORCE_DEVICEPTR.
2639
adfac8df
JJ
26402015-01-09 Michael Collison <michael.collison@linaro.org>
2641
2642 * c-array-notation.c: Include hash-set.h, machmode.h,
2643 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2644 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2645 * c-aux-info.c: Ditto.
2646 * c-convert.c: Ditto.
2647 * c-decl.c: Ditto.
2648 * c-errors.c: Ditto.
2649 * c-lang.c: Dittoxs.
2650 * c-objc-common.c: Ditto.
2651 * c-parser.c: Ditto.
2652 * c-typeck.c: Include hash-set.h, machmode.h,
2653 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2654 fold-const.h, wide-int.h, inchash.h, real.h and
2655 fixed-value.h due to flattening of tree.h.
2656
2cc901dc
MP
26572015-01-07 Marek Polacek <polacek@redhat.com>
2658
2659 PR c/64417
2660 * c-typeck.c (process_init_element): Disallow initialization of
2661 a flexible array member with a string constant if the structure
2662 is in an array.
2663
5624e564
JJ
26642015-01-05 Jakub Jelinek <jakub@redhat.com>
2665
e5341100
JJ
2666 PR sanitizer/64344
2667 * c-typeck.c (convert_for_assignment, c_finish_return): For
2668 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2669 types also set in_late_binary_op around convert call.
2670 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2671 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2672 result on expr as last argument to ubsan_instrument_float_cast,
2673 if in_late_binary_op, don't use c_save_expr but save_expr.
2674
5624e564
JJ
2675 Update copyright years.
2676
5bd012f8
MP
26772015-01-05 Marek Polacek <polacek@redhat.com>
2678
2679 PR c/64423
2680 * c-typeck.c (build_array_ref): Pass loc down to
2681 warn_array_subscript_with_type_char.
2682
3f8257db 26832014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2684
2685 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2686 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2687 element type.
8e745a17 2688 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2689 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2690 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2691 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2692 to PEDWARN_FOR_QUALIFIERS.
768952be 2693
8f94a8c4
JJ
26942014-12-17 Jakub Jelinek <jakub@redhat.com>
2695
2696 PR sanitizer/64289
2697 * c-convert.c: Include ubsan.h.
2698 (convert): For real -> integral casts and
2699 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2700 instead instrument the float cast directly.
2701
b731b390
JJ
27022014-11-29 Jakub Jelinek <jakub@redhat.com>
2703
2704 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2705 c_finish_stmt_expr): Remove NULL last argument from
2706 create_tmp_var_raw and create_tmp_var calls.
2707 * c-array-notation.c (fix_builtin_array_notation_fn,
2708 build_array_notation_expr, fix_conditional_array_notations_1,
2709 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2710
541e35a6
MP
27112014-11-28 Marek Polacek <polacek@redhat.com>
2712
2713 PR c/63862
2714 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2715 convert the right operand to integer type.
2716
b286be94
MP
27172014-11-25 Marek Polacek <polacek@redhat.com>
2718
2719 PR c/63877
2720 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2721 for inline functions.
2722
aa7da51a
JJ
27232014-11-21 Jakub Jelinek <jakub@redhat.com>
2724
2725 PR target/63764
2726 * c-typeck.c (build_array_ref): Adjust
2727 convert_vector_to_pointer_for_subscript caller. If it returns true,
2728 call non_lvalue_loc on the result.
2729
d876207f
RB
27302014-11-11 Richard Biener <rguenther@suse.de>
2731
2732 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2733 to true.
2734
e5e44252
AK
27352014-11-10 Andi Kleen <ak@linux.intel.com>
2736
2737 PR c/60804
2738 * c-parser.c (c_parser_statement_after_labels): Call
2739 check_no_cilk.
2740 (c_parser_if_statement): Dito.
2741 (c_parser_switch_statement): Dito.
2742 (c_parser_while_statement): Dito.
2743 (c_parser_do_statement): Dito.
2744 (c_parser_for_statement): Dito.
2745 * c-typeck.c (c_finish_loop): Dito.
2746
13c21655
PC
27472014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2748
2749 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2750 OPT_Wshift_count_overflow in the warnings.
2751
2d51fcef
MP
27522014-10-30 Marek Polacek <polacek@redhat.com>
2753
2754 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2755 print the stripped version as well, if they're not the same.
2756
ef4bddc2
RS
27572014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2758
2759 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2760 machine_mode.
2761
c582198b
AM
27622014-10-28 Andrew MacLeod <amacleod@redhat.com>
2763
2764 * c-decl.c: Adjust include files.
2765 * c-parser.c: Ditto.
2766
ddc8de03
PM
27672014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2768 Tom Tromey <tromey@redhat.com>
2769
2770 * c-tree.h (enum c_oracle_request): New.
2771 (c_binding_oracle_function): New typedef.
2772 (c_binding_oracle, c_pushtag, c_bind): Declare.
2773 * c-decl.c (c_binding_oracle): New global.
2774 (I_SYMBOL_CHECKED): New macro.
2775 (i_symbol_binding): New function.
2776 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2777 (I_TAG_CHECKED): New macro.
2778 (i_tag_binding): New function.
2779 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2780 (I_LABEL_CHECKED): New macro.
2781 (i_label_binding): New function.
2782 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2783 (c_print_identifier): Save and restore c_binding_oracle.
2784 (c_pushtag, c_bind): New functions.
2785
60393bbc
AM
27862014-10-27 Andrew MacLeod <amacleod@redhat.com>
2787
2788 * c-typeck.c: Adjust include files.
2789
d723bb7c
MLI
27902014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2791
2792 PR c++/53061
2793 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2794 initialization here...
2795 (c_initialize_diagnostics): ... but here. Set defaults after
2796 building pretty-printer.
2797
1bc5a451
MP
27982014-10-23 Marek Polacek <polacek@redhat.com>
2799
2800 PR c/63626
2801 * c-decl.c (pop_scope): Don't print warning in external_scope.
2802
4435bb92
MP
28032014-10-19 Marek Polacek <polacek@redhat.com>
2804
2805 PR c/63567
2806 * c-typeck.c (output_init_element): Allow initializing objects with
2807 static storage duration with compound literals even in C99 and add
2808 pedwarn for it.
2809
7278465e
MP
28102014-10-17 Marek Polacek <polacek@redhat.com>
2811
2812 PR c/63567
2813 * c-typeck.c (digest_init): Allow initializing objects with static
2814 storage duration with compound literals even in C99 and add pedwarn
2815 for it.
2816
d9b7be2e
MP
28172014-10-17 Marek Polacek <polacek@redhat.com>
2818
2819 PR c/63543
2820 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2821 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2822 error multiple times. Print the type.
2823
f406ae1f
MP
28242014-10-17 Marek Polacek <polacek@redhat.com>
2825
2826 PR c/63549
2827 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2828 type.
2829
92574c7c
MP
28302014-10-17 Marek Polacek <polacek@redhat.com>
2831
2832 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2833 (start_function): Use OPT_Wimplicit_int instead of 0.
2834 (store_parm_decls_oldstyle): Likewise.
2835
1bc4a978
MT
28362014-10-17 Alan Modra <amodra@gmail.com>
2837
2838 PR middle-end/61848
2839 * c-decl.c (merge_decls): Don't merge section name or tls model
2840 to newdecl symtab node, instead merge to olddecl. Override
2841 existing olddecl section name. Set tls_model for all thread-local
2842 vars, not just OMP thread-private ones. Remove incorrect comment.
2843
83685514
AM
28442014-10-16 Andrew MacLeod <amacleod@redhat.com>
2845
2846 * c-decl.c: Adjust include files.
2847
78a7c317
DD
28482014-10-14 DJ Delorie <dj@redhat.com>
2849
2850 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2851 (c_token_starts_typename): Check all __intN, not just __int128.
2852 (c_token_starts_declspecs): Likewise.
2853 (c_parser_declspecs): Likewise.
2854 (c_parser_attribute_any_word): Likewise.
2855 (c_parser_objc_selector): Likewise.
2856 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2857 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2858 is specified.
2859 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2860 __int128.
2861 (finish_declspecs): Likewise.
2862
74d98c1e
AB
28632014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2864
8e745a17 2865 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 2866 the duplicate code.
8e745a17 2867 (c_parser_statement): Call the new function.
74d98c1e 2868
84937de2
MP
28692014-10-09 Marek Polacek <polacek@redhat.com>
2870
2871 PR c/63480
2872 * c-typeck.c (pop_init_level): Don't warn about initializing
2873 with { }.
2874
0382aaa0
MP
28752014-10-07 Marek Polacek <polacek@redhat.com>
2876
2877 PR c/59717
2878 * c-decl.c (header_for_builtin_fn): New function.
2879 (implicitly_declare): Suggest which header to include.
2880
7a0ca710
MP
28812014-10-07 Marek Polacek <polacek@redhat.com>
2882
2883 * c-convert.c (convert): Use error_operand_p.
2884 * c-typeck.c (require_complete_type): Likewise.
2885 (really_atomic_lvalue): Likewise.
2886 (digest_init): Likewise.
2887 (handle_omp_array_sections_1): Likewise.
2888
6bc8a126
MP
28892014-10-03 Marek Polacek <polacek@redhat.com>
2890
2891 PR c/63453
2892 * c-decl.c (pop_scope): Don't warn about "inline function declared
2893 but never defined" for functions marked with gnu_inline attribute.
2894
d90c0a59
JJ
28952014-09-25 Jakub Jelinek <jakub@redhat.com>
2896
2897 PR c++/63249
2898 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2899 on low_bound and length.
2900
083e891e
MP
29012014-09-24 Marek Polacek <polacek@redhat.com>
2902
2903 PR c/61405
2904 PR c/53874
2905 * c-parser.c: Don't define CPP_KEYWORD.
2906 (c_parser_switch_statement): Pass original type to c_finish_case.
2907 * c-tree.h (c_finish_case): Update declaration.
2908 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2909 conditionally to c_do_switch_warnings.
2910
8d95fe25
MP
29112014-09-03 Marek Polacek <polacek@redhat.com>
2912
2913 PR c/62024
2914 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2915 conversions.
2916
9a771876
JJ
29172014-09-02 Jakub Jelinek <jakub@redhat.com>
2918 Balaji V. Iyer <balaji.v.iyer@intel.com>
2919 Igor Zamyatin <igor.zamyatin@intel.com>
2920
2921 * c-parser.c (c_parser_cilk_for): New function.
2922 (c_parser_cilk_grainsize): Likewise.
2923 (c_get_temp_regvar): Likewise.
2924 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2925 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2926 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2927 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2928 case.
2929
b7679d96
CG
29302014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2931
2932 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2933 with using HOST_WIDE_INT without truncation to 'int'
2934
59ea0364
MP
29352014-08-22 Marek Polacek <polacek@redhat.com>
2936
2937 PR c++/62199
2938 * c-typeck.c (parser_build_binary_op): Adjust call to
2939 warn_logical_not_parentheses.
2940
671a475e
IZ
29412014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2942
2943 PR other/62008
2944 * c-parser.c (c_parser_array_notation): Check for correct
2945 type of an array added.
2946
04159acf
MP
29472014-08-19 Marek Polacek <polacek@redhat.com>
2948
2949 PR c++/62153
2950 * c-typeck.c (build_binary_op): If either operand of a comparison
2951 is a boolean expression, call maybe_warn_bool_compare.
2952
c77935ee
PP
29532014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2954
2955 PR c/45584
2956 * c-typeck.c (build_c_cast): Do a conversion even when the
2957 TYPE_MAIN_VARIANTs are the same.
2958
35aff4fb
MP
29592014-08-19 Marek Polacek <polacek@redhat.com>
2960
2961 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2962 pedwarn_c99 instead of pedwarn.
2963 (grokfield): Likewise.
2964 (warn_defaults_to): New function.
2965 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2966 Unconditionally call pedwarn_c99 instead of pedwarn.
2967 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2968 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2969 check flag_isoc11 before.
2970 * c-errors.c (pedwarn_c99): Change the return type to bool.
2971 Handle -Wc99-c11-compat.
2972 * c-parser.c (disable_extension_diagnostics): Handle
2973 warn_c99_c11_compat.
2974 (restore_extension_diagnostics): Likewise.
2975 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2976 instead of pedwarn, don't check flag_isoc11 before.
2977 (c_parser_declspecs): Likewise.
2978 (c_parser_alignas_specifier): Likewise.
2979 (c_parser_alignof_expression): Likewise.
2980 (c_parser_generic_selection): Likewise.
2981 * c-tree.h (pedwarn_c99): Update declaration.
2982 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2983 of pedwarn_c99.
2984
177cce46
MP
29852014-08-19 Marek Polacek <polacek@redhat.com>
2986
2987 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2988 to pedwarn_c90.
2989 * c-errors.c: Include "opts.h".
2990 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2991 * c-parser.c (disable_extension_diagnostics): Handle negative value
2992 of warn_c90_c99_compat, too.
2993 (restore_extension_diagnostics): Likewise.
2994 (c_parser_compound_statement_nostart): Pass
2995 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2996
6dc99c33
MP
29972014-08-12 Marek Polacek <polacek@redhat.com>
2998
2999 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3000 Add pedwarn.
3001 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3002 Likewise.
3003 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3004
3f8257db 30052014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3006
3007 PR c/51849
3008 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3009 Call pedwarn_c90 instead of pedwarn.
3010 (check_bitfield_type_and_width): Likewise.
3011 (declspecs_add_qual): Likewise.
3012 (declspecs_add_type): Likewise.
3013 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3014 Adjust to only call pedwarn_c90.
3015 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3016 pedwarn_c90 instead of pedwarn.
3017 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3018 * c-parser.c (disable_extension_diagnostics): Handle
3019 warn_c90_c99_compat.
3020 (restore_extension_diagnostics): Likewise.
3021 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3022 pedwarn_c90 instead of pedwarn.
3023 (c_parser_initelt): Likewise.
3024 (c_parser_postfix_expression): Likewise.
3025 (c_parser_postfix_expression_after_paren_type): Likewise.
3026 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3027 * c-tree.h: Fix formatting.
3028 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3029 pedwarn_c90 instead of pedwarn.
3030
9f25a338
TS
30312014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3032
3033 * c-typeck.c: Remove include of pointer-set.h.
3034
044331a8
MP
30352014-08-07 Marek Polacek <polacek@redhat.com>
3036
3037 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3038
b787e7a2
TS
30392014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3040
3041 * c-typeck.c: Use hash_map instead of pointer_map.
3042
6e2830c3
TS
30432014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3044
3045 * c-decl.c: Use hash_set instead of pointer_set.
3046
a7ee52fb
IZ
30472014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3048
3049 PR middle-end/61455
3050 * c-array-notation.c (expand_array_notations): Handling
3051 of DECL_EXPR added.
3052
b4dfdc11
MG
30532014-07-31 Marc Glisse <marc.glisse@inria.fr>
3054
3055 PR c++/60517
3056 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3057 a local variable.
3058
976d5a22
TT
30592014-07-30 Tom Tromey <tromey@redhat.com>
3060
3061 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3062 field.
3063 (really_start_incremental_init, push_init_level): Initialize
3064 designator_depth.
3065 (pop_init_level): Set global designator_depth.
3066 (process_init_element): Check for designated_init attribute.
3067
30281de2
MP
30682014-07-20 Marek Polacek <polacek@redhat.com>
3069
3070 PR c/61852
3071 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3072 (implicitly_declare): Pass location to implicit_decl_warning.
3073
b108f48f
JJ
30742014-07-14 Jakub Jelinek <jakub@redhat.com>
3075
3076 PR middle-end/61294
3077 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3078 If non-NULL, call c_parser_check_literal_zero.
3079 (c_parser_check_literal_zero): New function.
3080 (c_parser_postfix_expression_after_primary): Adjust
3081 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3082
773ec47f
MP
30832014-07-06 Marek Polacek <polacek@redhat.com>
3084
3085 PR c/6940
3086 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3087 * c-tree.h (C_ARRAY_PARAMETER): Define.
3088 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3089 function parameter.
3090
22e1cf1c 30912014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3092 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3093
3094 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3095 releasing symbol.
3096
52ec0ea3
MP
30972014-07-01 Marek Polacek <polacek@redhat.com>
3098
3099 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3100 instead of 0 to WARN_FOR_ASSIGNMENT.
3101
d5c3d343
MP
31022014-07-01 Marek Polacek <polacek@redhat.com>
3103
3104 PR c/58286
3105 * c-typeck.c (convert_for_assignment): Pass
3106 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3107
6a7253a4
MP
31082014-06-30 Marek Polacek <polacek@redhat.com>
3109
3110 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3111 has no_sanitize_undefined attribute.
3112
5e88a8f4
IZ
31132014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3114
3115 PR middle-end/57541
3116 * c-array-notation.c (fix_builtin_array_notation_fn):
3117 Check for 0 arguments in builtin call. Check that bultin argument is
3118 correct.
3119 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3120 index.
3121
9698b078
SH
31222014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3123
3124 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3125 qualifiers in __auto_type for atomic types.
3126 (c_parser_typeof_specifier): Discard all type qualifiers in
3127 __typeof__ for atomic types.
3128
6e07c515
MP
31292014-06-25 Marek Polacek <polacek@redhat.com>
3130
3131 PR c/61162
3132 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3133 the return expression to c_finish_return.
3134
da6f124d
JJ
31352014-06-25 Jakub Jelinek <jakub@redhat.com>
3136
3137 * c-typeck.c (c_finish_omp_clauses): Make sure
3138 OMP_CLAUSE_LINEAR_STEP has correct type.
3139
c203e8a7
TS
31402014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3141
3142 * c-decl.c: Adjust.
3143
56ad0e38
JJ
31442014-06-24 Jakub Jelinek <jakub@redhat.com>
3145
3146 * c-parser.c (c_parser_omp_for_loop): For
3147 #pragma omp parallel for simd move lastprivate clause from parallel
3148 to for rather than simd.
3149
47c2554f
MP
31502014-06-23 Marek Polacek <polacek@redhat.com>
3151
3152 * c-typeck.c (parser_build_binary_op): Don't call
3153 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3154
56363ffd
JH
31552014-06-15 Jan Hubicka <hubicka@ucw.cz>
3156
3157 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3158 * c-decl.c (merge_decls): Likewise.
3159
d7ff7ae5
MP
31602014-06-09 Marek Polacek <polacek@redhat.com>
3161
3162 PR c/36446
3163 * c-typeck.c (error_init): Call inform instead of error_at.
3164 (pedwarn_init): Call inform instead of pedwarn.
3165 (warning_init): Call inform instead of warning_at.
3166
24d047a3
JH
31672014-06-07 Jan Hubicka <hubicka@ucw.cz>
3168
3169 * c-decl.c (merge_decls): Use set_decl_section_name.
3170 (duplicate_decls): Remove node if it exists.
3171
9bac5cbb
G
31722014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3173
3174 PR c/53119
3175 * c-typeck.c (push_init_level, process_init_element,
3176 pop_init_level): Correct check for zero initialization, move
3177 missing brace warning to respect zero initialization.
3178
8ffcdea8
MP
31792014-06-05 Marek Polacek <polacek@redhat.com>
3180
3181 PR c/56724
3182 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3183
742938c9
MP
31842014-06-05 Marek Polacek <polacek@redhat.com>
3185
3186 PR c/49706
3187 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3188 on the left hand side operand of a comparison.
3189
6447c55d
MP
31902014-06-05 Marek Polacek <polacek@redhat.com>
3191
3192 PR c/48062
3193 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3194 Print note only if the warning was printed.
3195
9dc7743c
IZ
31962014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3197
3198 PR c/58942
3199 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3200 with a pointer.
3201
fedfecef
MP
32022014-06-03 Marek Polacek <polacek@redhat.com>
3203
3204 PR c/60439
3205 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3206 c_start_case.
3207 * c-tree.h (c_start_case): Update.
3208 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3209 switch condition has boolean value.
3210
9b2b7279
AM
32112014-06-02 Andrew MacLeod <amacleod@redhat.com>
3212
3213 * c-decl.c: Include builtins.h.
3214 * c-parser.c: Likewise.
3215
5c1bc275
MP
32162014-05-27 Marek Polacek <polacek@redhat.com>
3217
3218 PR c/56724
3219 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3220 error and warning calls to error_at and warning_at. Pass location of
3221 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3222 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3223 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3224
97563bc8
IZ
32252014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3226
3227 PR c/61191
3228 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3229 function parameters.
3230
aede2c10
JH
32312014-05-23 Jan Hubicka <hubicka@ucw.cz>
3232
3233 * c-decl.c (merge_decls): Preserve symtab node pointers.
3234 (duplicate_decls): Free new decl.
3235
edbba2ce
TS
32362014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3237
f3316c6d
TS
3238 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3239 initialization.
3240
edbba2ce
TS
3241 * c-parser.c (c_parser_omp_target): Return bool values.
3242
68c81f24
TS
32432014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3244
3245 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3246 num_teams_loc variable to num_thread_limit_loc.
3247
632f2871
RS
32482014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3249
3250 * c-array-notation.c (expand_array_notations): Use void_node
3251 instead of void_zero_node.
3252
766090c2
TS
32532014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3254
3255 * c-decl.c (finish_struct): Adjust.
3256 (finish_enum): Likewise.
3257 (bind): Adjust.
3258 (record_inline_static): Likewise.
3259 (push_scope): Likewise.
3260 (make_label): Likewise.
3261 (lookup_label_for_goto): Likewise.
3262 (finish_struct): Likewise.
3263 (finish_enum): Likewise.
3264 (store_parm_decls): Likewise.
3265 (c_push_function_context): Likewise.
3266 * c-lang.h: Remove usage of variable_size gty attribute.
3267 * c-parser.c (c_parse_init): Adjust.
3268 (c_parse_file): Likewise.
3269
2b107f6b
MP
32702014-05-13 Marek Polacek <polacek@redhat.com>
3271
3272 PR c/61162
3273 * c-typeck.c (convert_for_assignment): Pass location to
3274 WARN_FOR_ASSIGNMENT instead of input_location.
3275
d033409e
MP
32762014-05-10 Marek Polacek <polacek@redhat.com>
3277
3278 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3279 maybe_warn_string_init.
3280 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3281 maybe_warn_string_init.
3282 * c-tree.h (maybe_warn_string_init): Update declaration.
3283 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3284 Call pedwarn_init with loc instead of with input_location.
3285 (digest_init): Pass init_loc to maybe_warn_string_init.
3286 (pop_init_level): Call pedwarn_init with loc instead of with
3287 input_location.
3288 (set_init_index): Likewise.
3289 (process_init_element): Likewise.
3290
ea58ef42
MP
32912014-05-09 Marek Polacek <polacek@redhat.com>
3292
3293 PR c/61096
3294 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3295 (c_parser_initelt): Pass location to set_init_label. Pass array index
3296 location to set_init_index.
3297 * c-tree.h (push_init_level): Update declaration.
3298 (pop_init_level): Likewise.
3299 (set_init_index): Likewise.
3300 (set_init_label): Likewise.
3301 * c-typeck.c (error_init): Add location parameter. Call error_at
3302 instead of error.
3303 (digest_init): Pass init_loc to error_init.
3304 (really_start_incremental_init):
3305 (push_init_level): Add location parameter. Pass loc to pop_init_level
3306 and error_init.
3307 (pop_init_level): Likewise.
3308 (set_designator): Add location parameter. Pass loc to pop_init_level,
3309 push_init_level, and error_init.
3310 (set_init_index): Add location parameter. Pass loc to error_init and
3311 set_designator.
3312 (set_init_label): Likewise.
3313 (output_init_element): Pass loc to error_init.
3314 (process_init_element): Pass loc to error_init, pop_init_level,
3315 pedwarn_init, and push_init_level.
3316
661a0813
MP
33172014-05-09 Marek Polacek <polacek@redhat.com>
3318
3319 PR c/50459
3320 * c-parser.c (c_parser_attributes): Parse the arguments as an
3321 expression-list if the attribute takes identifier.
3322
2793eeab
MP
33232014-05-08 Marek Polacek <polacek@redhat.com>
3324
3325 PR c/61053
3326 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3327 TYPE_ALIGN_UNIT.
3328
f827930a
MP
33292014-05-08 Marek Polacek <polacek@redhat.com>
3330
3331 PR c/61077
3332 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3333 of main.
3334
1d60af08
KZ
33352014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3336 Mike Stump <mikestump@comcast.net>
3337 Richard Sandiford <rdsandiford@googlemail.com>
3338
3339 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3340 (finish_enum): Use wide-int interfaces.
3341 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3342 * c-typeck.c (build_c_cast): Likewise.
3343 (set_nonincremental_init_from_string): Likewise.
3344 (c_tree_equal): Likewise.
3345
a0e24419
MP
33462014-05-02 Marek Polacek <polacek@redhat.com>
3347
3348 PR c/25801
3349 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3350 Return size_one_node when the type is not complete.
3351 (pointer_diff): Remove comment.
3352 (build_unary_op): Improve error messages.
3353
19fc9faa
MP
33542014-05-02 Marek Polacek <polacek@redhat.com>
3355
3356 * c-typeck.c (c_finish_return): Separate warning_at calls.
3357
63bc4e87
MP
33582014-05-02 Marek Polacek <polacek@redhat.com>
3359
3360 * c-tree.h (error_init): Remove declaration.
3361 (pedwarn_init): Likewise.
3362 * c-typeck.c (error_init): Make static and move above.
3363 (pedwarn_init): Likewise.
3364 (warning_init): Move above.
3365 (maybe_warn_string_init): Likewise.
3366
4bd2511b
JL
33672014-05-01 Jeff Law <law@redhat.com>
3368
3369 Revert:
3370
3371 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3372 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3373 avoid goto.
3374
6a358dcb
MP
33752014-05-02 Marek Polacek <polacek@redhat.com>
3376
3377 PR c/60784
3378 * c-typeck.c (push_init_level): Set constructor_designated to
3379 p->designated for structures.
3380
ae5ebda4
MP
33812014-05-01 Marek Polacek <polacek@redhat.com>
3382
3383 PR c/60915
3384 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3385 function-definition has an attribute after the declarator.
3386
96b40f8d
MP
33872014-05-01 Marek Polacek <polacek@redhat.com>
3388
3389 PR c/60257
3390 * c-typeck.c (warning_init): Add location_t parameter. Call
3391 warning_at instead of warning.
3392 (push_init_level): Pass input_location to warning_init.
3393 (add_pending_init): Add location_t parameter. Pass loc to
3394 warning_init.
3395 (set_nonincremental_init): Pass input_location to add_pending_init.
3396 (set_nonincremental_init_from_string): Likewise.
3397 (output_init_element): Pass loc to warning_init and to
3398 add_pending_init.
3399
32e00768
MP
34002014-05-01 Marek Polacek <polacek@redhat.com>
3401
3402 PR c/43395
3403 * c-typeck.c (c_finish_return): Distinguish between label and variable
3404 when warning about returning local address.
3405
c9379ce2
MP
34062014-05-01 Marek Polacek <polacek@redhat.com>
3407
3408 PR c/29467
3409 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3410 in C89 mode.
3411
d00887e8
MP
34122014-05-01 Marek Polacek <polacek@redhat.com>
3413
3414 PR c/43245
3415 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3416 instead of 0 to WARN_FOR_QUALIFIERS.
3417
5436fa2e
MP
34182014-05-01 Marek Polacek <polacek@redhat.com>
3419
3420 PR c/56989
3421 * c-typeck.c (default_conversion): Use better location for
3422 error call.
3423
f8ed5150
MP
34242014-04-30 Marek Polacek <polacek@redhat.com>
3425
3426 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3427 also when SANITIZE_FLOAT_DIVIDE is on.
3428
8337d1db
MP
34292014-04-30 Marek Polacek <polacek@redhat.com>
3430
3431 PR c/60139
3432 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3433 and pedwarn_init. Use loc insted of input_location.
3434
c4bdc42f
MP
34352014-04-30 Marek Polacek <polacek@redhat.com>
3436
3437 PR c/60351
3438 * c-typeck.c (build_binary_op): Use location when warning about
3439 shift count.
3440
45484dcf
MP
34412014-04-25 Marek Polacek <polacek@redhat.com>
3442
3443 PR c/18079
3444 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3445 always_inline/noinline and hot/cold attributes.
3446
34cf811f
MP
34472014-04-25 Marek Polacek <polacek@redhat.com>
3448
3449 PR c/60114
3450 * c-parser.c (c_parser_initelt): Pass input_location to
3451 process_init_element.
3452 (c_parser_initval): Pass loc to process_init_element.
3453 * c-tree.h (process_init_element): Adjust declaration.
3454 * c-typeck.c (push_init_level): Pass input_location to
3455 process_init_element.
3456 (pop_init_level): Likewise.
3457 (set_designator): Likewise.
3458 (output_init_element): Add location_t parameter. Pass loc to
3459 digest_init.
3460 (output_pending_init_elements): Pass input_location to
3461 output_init_element.
3462 (process_init_element): Add location_t parameter. Pass loc to
3463 output_init_element.
3464
42056eac
JJ
34652014-04-24 Jakub Jelinek <jakub@redhat.com>
3466
3467 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3468 atomic-clause, allow comma in between atomic-clause and
3469 seq_cst.
3470
e162a134
JJ
34712014-04-22 Jakub Jelinek <jakub@redhat.com>
3472
3473 PR c/59073
3474 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3475 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3476
2f6babac
IZ
34772014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3478
3479 PR middle-end/60469
3480 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3481 create_tmp_var instead build_decl for creating temps.
3482 (build_array_notation_expr): Likewise.
3483 (fix_conditional_array_notations_1): Likewise.
3484 (fix_array_notation_expr): Likewise.
3485 (fix_array_notation_call_expr): Likewise.
3486
8edbfaa6
JJ
34872014-03-28 Jakub Jelinek <jakub@redhat.com>
3488
3489 PR c++/60689
3490 * c-tree.h (c_build_function_call_vec): New prototype.
3491 * c-typeck.c (build_function_call_vec): Don't call
3492 resolve_overloaded_builtin here.
3493 (c_build_function_call_vec): New wrapper function around
3494 build_function_call_vec. Call resolve_overloaded_builtin here.
3495 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3496 Call c_build_function_call_vec instead of build_function_call_vec.
3497 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3498 * c-decl.c (finish_decl): Likewise.
3499
7485aeea
MLI
35002014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3501
3502 PR c/55383
3503 * c-typeck.c: Use correct format string in cast-qual warning
3504
b17a8b07
TS
35052014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3506
3507 * c-decl.c (c_decl_attributes): Use
3508 lang_hooks.types.omp_mappable_type.
3509 * c-typeck.c (c_finish_omp_clauses): Likewise.
3510
3af9c5e9
MP
35112014-03-06 Marek Polacek <polacek@redhat.com>
3512
3513 PR c/60197
3514 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3515 of checking tree code.
3516
1c9f5f33
PK
35172014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3518
3519 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3520 (c_parser_parameter_declaration): Likewise.
3521
cc28fc7f
MP
35222014-02-19 Marek Polacek <polacek@redhat.com>
3523
3524 PR c/60195
3525 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3526 Call mark_exp_read on exp.value.
3527 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3528 TREE_ADDRESSABLE on old instead of val.
3529 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3530
b581c05c
PK
35312014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3532
3533 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3534 C_EXPR_APPEND by vec_safe_push.
3535 * c-tree.h (C_EXPR_APPEND): Remove.
3536
81e5eca8
MP
35372014-01-31 Marek Polacek <polacek@redhat.com>
3538
3539 PR c/59963
3540 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3541 build_function_call_vec.
3542 (build_function_call): Likewise.
3543 (build_atomic_assign): Likewise.
3544 (build_function_call_vec): Add arg_loc parameter. Use it.
3545 (convert_arguments): Likewise.
3546 (convert_for_assignment): Rename rhs_loc to expr_loc.
3547 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3548 (c_parser_objc_keywordexpr): Likewise.
3549 (c_parser_postfix_expression_after_primary): Call
3550 build_function_call_vec with expr_loc rather than op_loc.
3551 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3552 build_function_call_vec.
3553 (c_parser_expr_list): Add locations parameter. Fill it with locations
3554 of function arguments.
3555 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3556
68fca595
MP
35572014-01-30 Marek Polacek <polacek@redhat.com>
3558
3559 PR c/59940
3560 * c-typeck.c (build_function_call_vec): Use loc parameter.
3561 (convert_arguments): Add location parameter. Use it.
3562 (ep_convert_and_check): Likewise.
3563 (build_atomic_assign): Adjust convert_for_assignment call.
3564 (build_modify_expr): Likewise.
3565 (digest_init): Likewise.
3566 (c_finish_return): Likewise.
3567 (build_conditional_expr): Adjust ep_convert_and_check calls.
3568 (convert_for_assignment): Add rhs_loc parameter. Use it.
3569 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3570 calls.
3571
fa337f3a
RB
35722014-01-30 Richard Biener <rguenther@suse.de>
3573
3574 PR c/59905
3575 * c-typeck.c (build_function_call_vec): Do not replace calls
3576 to a function via an incompatible type with a runtime abort.
3577
b72271b9
BI
35782014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3579
3580 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3581 flag_enable_cilkplus with flag_cilkplus.
3582 (c_parser_direct_declarator_inner): Likewise.
3583 (c_parser_attribute_any_word): Likewise.
3584 (c_parser_attributes): Likewise.
3585 (c_parser_compound_statement): Likewise.
3586 (c_parser_statement_after_labels): Likewise.
3587 (c_parser_if_statement): Likewise.
3588 (c_parser_switch_statement): Likewise.
3589 (c_parser_do_statement): Likewise.
3590 (c_parser_for_statement): Likewise.
3591 (c_parser_unary_expression): Likewise.
3592 (c_parser_postfix_expression): Likewise.
3593 (c_parser_postfix_expression_after_primary): Likewise.
3594 (c_parser_postfix_expression_after_primary): Likewise.
3595 (c_parser_omp_clause_name): Likewise.
3596 (c_finish_omp_declare_simd): Likewise.
3597 (c_parser_cilk_verify_simd): Likewise.
3598 * c-typeck.c (build_array_ref): Likewise.
3599 (build_function_call_vec): Likewise.
3600 (convert_arguments): Likewise.
3601 (build_compound_expr): Likewise.
3602 (c_finish_return): Likewise.
3603 (c_finish_if_stmt): Likewise.
3604 (c_finish_loop): Likewise.
3605 (build_binary_op): Likewise.
3606
393e8e8b
MP
36072014-01-23 Marek Polacek <polacek@redhat.com>
3608
3609 PR c/59846
3610 * c-typeck.c (parser_build_binary_op): Use location instead of
3611 input_location.
3612 (build_binary_op): Pass location to shorten_compare.
3613
f04dda30
MP
36142014-01-23 Marek Polacek <polacek@redhat.com>
3615
3616 PR c/58346
3617 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3618 an empty aggregate.
3619
789eadcd
MP
36202014-01-23 Marek Polacek <polacek@redhat.com>
3621
3622 PR c/59871
3623 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3624 of a comma expression.
3625 (emit_side_effect_warnings): Likewise.
3626
40f14e9f
BI
36272014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3628
3629 PR c/59825
3630 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3631 function to use walk_tree and moved a lot of its functionality to
3632 expand_array_notations.
3633 (expand_array_notations): New function.
3634
74558dd9
BI
36352014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3636
3637 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3638 attribute an attribute without value.
3639
652fea39
JJ
36402014-01-23 Jakub Jelinek <jakub@redhat.com>
3641
3642 PR middle-end/58809
3643 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3644 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3645
f34f1c87
MP
36462014-01-22 Marek Polacek <polacek@redhat.com>
3647
3648 PR c/59891
3649 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3650 of remove_c_maybe_const_expr on op1 and op2.
3651
241f845a
JJ
36522014-01-15 Jakub Jelinek <jakub@redhat.com>
3653
3654 PR c/58943
3655 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3656 effects, preevaluate rhs using SAVE_EXPR first.
3657
9a74f20c
BI
36582014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3659
3660 PR c++/59631
3661 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3662 statements with if-elseif statements.
3663
96066ce1
MP
36642014-01-06 Marek Polacek <polacek@redhat.com>
3665
3666 PR c/57773
3667 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3668 defined bit-field types only in ISO C.
3669
23a5b65a
RS
36702014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3671
3672 Update copyright years
3673
f9030485
RS
36742014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3675
3676 * c-array-notation.c: Use the standard form for the copyright notice.
3677
41958c28
BI
36782013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3679
3680 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3681 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3682 field in parser is not empty. If not-empty, call the function
3683 c_parser_finish_omp_declare_simd.
3684 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3685 between SIMD-enabled functions and #pragma simd. Added new parameter.
3686 (c_parser_cilk_all_clauses): Modified the usage of the function
3687 c_parser_cilk_clause_vectorlength as mentioned above.
3688 (c_parser_cilk_simd_fn_vector_attrs): New function.
3689 (c_finish_cilk_simd_fn_tokens): Likewise.
3690 (is_cilkplus_vector_p): Likewise.
3691 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3692 "nomask," and "mask" strings in clause name.
3693 (c_parser_omp_all_clauses): Added 3 new case statements:
3694 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3695 PRAGMA_CILK_CLAUSE_NOMASK.
3696 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3697 check for vector attribute and if so call the function
3698 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3699 called the function c_finish_cilk_simd_fn_tokens.
3700 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3701 parser field is non-empty. If so, parse them as you would parse
3702 the omp declare simd pragma.
3703 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3704 Added a check when step is a parameter and flag it as error.
3705 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3706 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3707 pragma_omp_clause.
3708
cef0fd0e
TS
37092013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3710
3711 * c-parser.c (c_parser_omp_parallel): Fix description.
3712
12893402
BI
37132013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3714
3715 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3716 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3717 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3718 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3719
296674db
JM
37202013-12-04 Joseph Myers <joseph@codesourcery.com>
3721
3722 PR c/52023
3723 * c-parser.c (c_parser_alignas_specifier): Use
3724 c_sizeof_or_alignof_type instead of c_alignof.
3725 (c_parser_alignof_expression): Likewise, with min_alignof
3726 parameter depending on alignof spelling used.
3727
edd28054
MP
37282013-12-04 Marek Polacek <polacek@redhat.com>
3729
3730 PR c/54113
3731 * c-decl.c (start_function): Don't warn for missing prototype for
3732 inline functions.
3733
da0fc454
MP
37342013-12-03 Marek Polacek <polacek@redhat.com>
3735
3736 PR c/59351
3737 * c-decl.c (build_compound_literal): Allow compound literals with
3738 empty initial value.
3739
4c2ecab0
JM
37402013-12-02 Joseph Myers <joseph@codesourcery.com>
3741
3742 PR c/58235
3743 * c-typeck.c (build_modify_expr): Diagnose assignment to
3744 expression with array type.
3745
340baef7
JM
37462013-11-29 Joseph Myers <joseph@codesourcery.com>
3747
3748 PR c/42262
3749 * c-typeck.c (process_init_element): Do not treat a string as
3750 initializing a whole array when used with a designator for an
3751 individual element.
3752
6763b9f7
JM
37532013-11-29 Joseph Myers <joseph@codesourcery.com>
3754
3755 PR c/57574
3756 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3757 an inline function following a static declaration.
3758
e7bd1de1
JJ
37592013-11-28 Jakub Jelinek <jakub@redhat.com>
3760
3761 PR c/59310
3762 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3763 to p_name before calling c_parser_omp_teams instead of after.
3764 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3765 argument. Remove unused p_name variable.
3766
0136f8f0
AH
37672013-11-27 Aldy Hernandez <aldyh@redhat.com>
3768 Jakub Jelinek <jakub@redhat.com>
3769
3770 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3771 external_scope is NULL.
3772
241b71bb
TV
37732013-11-27 Tom de Vries <tom@codesourcery.com>
3774 Marc Glisse <marc.glisse@inria.fr>
3775
3776 PR c++/59032
3777 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3778
2fb9a547
AM
37792013-11-22 Andrew MacLeod <amacleod@redhat.com>
3780
3781 * c-typeck.c: Add required include files from gimple.h.
3782
8400e75e
DM
37832013-11-22 David Malcolm <dmalcolm@redhat.com>
3784
3785 * c-decl.c (define_label, shadow_tag_warned)
3786 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3787 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3788 (declspecs_add_type): Remove use of in_system_header macro.
3789 * c-parser.c (c_parser_unary_expression): Likewise.
3790 * c-typeck.c (store_init_value, process_init_element)
3791 (c_start_case): Likewise.
3792
3793 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3794 macro.
3795
3796 * c-parser.c (c_parser_set_source_position_from_token): Remove
3797 reference to in_system_header from comment.
3798
386b1f1f
RS
37992013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3800
3801 * c-decl.c (grokdeclarator): Update comment to refer to
3802 tree_to_[su]hwi rather than tree_low_cst.
3803
ae7e9ddd
RS
38042013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3805
3806 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3807 tree_to_uhwi throughout.
3808
9439e9a1
RS
38092013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3810
3811 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3812 throughout.
3813
9541ffee
RS
38142013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3815
3816 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3817 throughout.
3818
c02065fc
AH
38192013-11-15 Aldy Hernandez <aldyh@redhat.com>
3820
3821 * c-parser.c (c_parser_cilk_simd): New.
3822 (c_parser_cilk_verify_simd): New.
3823 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3824 (c_parser_omp_for_loop): Add case for NE_EXPR.
3825 Set c_break_label for CILK_SIMD.
3826 (c_parser_cilk_clause_vectorlength): New.
3827 (c_parser_cilk_clause_linear): New.
3828 (c_parser_cilk_clause_name): New.
3829 (c_parser_cilk_all_clauses): New.
3830 * c-typeck.c (build_unary_op): Pass location argument to
3831 readonly_error.
3832 (build_modify_expr): Same.
3833 (build_asm_expr): Same.
3834 (c_finish_bc_stmt): Error on break/continue in loops.
3835
18f429e2
AM
38362013-11-14 Andrew MacLeod <amacleod@redhat.com>
3837
3838 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3839
d8a2d370
DN
38402013-11-14 Diego Novillo <dnovillo@google.com>
3841
3842 * c-decl.c: Include print-tree.h.
3843 Include stor-layout.h.
3844 Include varasm.h.
3845 Include attribs.h.
3846 Include stringpool.h.
3847 * c-lang.c: Include fold-const.h.
3848 * c-parser.c: Include stringpool.h.
3849 Include attribs.h.
3850 Include stor-layout.h.
3851 Include varasm.h.
3852 Include trans-mem.h.
3853 * c-typeck.c: Include stor-layout.h.
3854 Include trans-mem.h.
3855 Include varasm.h.
3856 Include stmt.h.
3857
38b7bc7f
JM
38582013-11-13 Joseph Myers <joseph@codesourcery.com>
3859
3860 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3861 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3862 __auto_type.
3863 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3864 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3865 RID_AUTO_TYPE.
3866 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3867 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3868 (c_parser_declarator, c_parser_direct_declarator_inner)
3869 (c_parser_parameter_declaration, c_parser_type_name): All callers
3870 changed.
3871 (c_parser_declaration_or_fndef): Handle declarations with type
3872 determined from the initializer.
3873
45b0be94
AM
38742013-11-12 Andrew MacLeod <amacleod@redhat.com>
3875
18f429e2 3876 * c-typeck.c: Include gimplify.h.
45b0be94 3877
582d9b50
JM
38782013-11-12 Joseph Myers <joseph@codesourcery.com>
3879
3880 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3881 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3882 comment.
3883 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3884 or _Thread_local as appropriate in diagnostics.
3885 (build_null_declspecs): Initialize ret->thread_gnu_p.
3886 (declspecs_add_scspec): Handle either __thread or _Thread_local
3887 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3888 pedantic. Do not disallow _Thread_local extern and _Thread_local
3889 static.
3890
267bac10
JM
38912013-11-07 Joseph Myers <joseph@codesourcery.com>
3892 Andrew MacLeod <amacleod@redhat.com>
3893
3894 * c-aux-info.c (gen_type): Handle atomic qualifier.
3895 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3896 qualifiers when compating types.
3897 (shadow_tag_warned): Handle atomic_p in declspecs.
3898 (quals_from_declspecs): Likewise.
3899 (start_decl): Use c_type_promotes_to when promoting argument
3900 types.
3901 (grokdeclarator): Handle _Atomic.
3902 (get_parm_info): Diagnose any qualifier on "void" as only
3903 parameter.
3904 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3905 comparing types. Use c_type_promotes_to when promoting argument
3906 types.
3907 (finish_function): Use c_type_promotes_to when promoting argument
3908 types.
3909 (build_null_declspecs): Handle atomic_p in declspecs.
3910 (declspecs_add_qual): Handle RID_ATOMIC.
3911 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3912 (c_token_starts_declspecs): Handle RID_ATOMIC.
3913 (c_parser_declspecs): Handle atomic type specifiers and
3914 qualifiers.
3915 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3916 from types of expressions with atomic type.
3917 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3918 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3919 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3920 (c_parser_statement_after_labels, c_parser_switch_statement)
3921 (c_parser_for_statement, c_parser_expr_no_commas)
3922 (c_parser_conditional_expression, c_parser_binary_expression)
3923 (c_parser_cast_expression, c_parser_unary_expression)
3924 (c_parser_postfix_expression)
3925 (c_parser_postfix_expression_after_primary, c_parser_expression):
3926 Use convert_lvalue_to_rvalue.
3927 (c_parser_expression_conv, c_parser_expr_list): Document
3928 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3929 (c_parser_objc_synchronized_statement): Use
3930 convert_lvalue_to_rvalue.
3931 (c_parser_objc_selector): Handle RID_ATOMIC.
3932 (c_parser_objc_receiver, c_parser_array_notation): Use
3933 convert_lvalue_to_rvalue.
3934 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3935 _Atomic (type-name).
3936 (struct c_declspecs): Add atomic_p field.
3937 (convert_lvalue_to_rvalue): Declare.
3938 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3939 corresponding atomic types.
3940 (qualify_type): Don't add _Atomic qualifiers from second argument.
3941 (comp_target_types): Do not allow _Atomic mismatches.
3942 (type_lists_compatible_p): Do not remove atomic qualifiers when
3943 comparing types.
3944 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3945 (build_atomic_assign): New functions.
3946 (build_unary_op): Use build_atomic_assign for atomic increment and
3947 decrement.
3948 (build_conditional_expr): Do not treat _Atomic void as a qualified
3949 version of void.
3950 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3951 (find_anonymous_field_with_type, convert_to_anonymous_field)
3952 (convert_for_assignment): Do not remove atomic qualifiers when
3953 comparing types.
3954 (digest_init): Do not accept initialization of arrays of atomic
3955 elements by string constants.
3956 (build_asm_expr): Use convert_lvalue_to_rvalue.
3957 (build_binary_op): Do not treat _Atomic void as a qualified
3958 version of void.
3959
0c249d4b
DD
39602013-11-06 DJ Delorie <dj@redhat.com>
3961
3962 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3963 both explicit and builtin, print the location of the explicit one.
3964
6d7f7e0a
TB
39652013-11-05 Tobias Burnus <burnus@net-b.de>
3966
3967 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3968 c_parser_omp_distribute, c_parser_omp_teams,
3969 c_parser_omp_target, c_parser_omp_declare): Handle
3970 -fopenmp-simd.
3971
b906f4ca
MP
39722013-11-03 Marek Polacek <polacek@redhat.com>
3973
3974 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3975
ee1d5a02
JJ
39762013-11-01 Jakub Jelinek <jakub@redhat.com>
3977
3978 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3979 check_dup_generic at the end, unless remove is true.
3980 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3981 remove = true;.
3982 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3983
5a9785fb
JJ
39842013-10-31 Jakub Jelinek <jakub@redhat.com>
3985
3986 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3987 with decl that is not pointer nor array.
3988
939b37da
BI
39892013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3990
3991 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3992 a spawning function is found.
3993 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3994 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3995 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3996 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3997 case.
3998 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3999 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4000 expr.
4001 (c_finish_return): Added a check to reject _Cilk_spawn in return
4002 expression.
4003 (build_cilk_spawn): New function.
4004 (build_cilk_sync): Likewise.
4005 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4006
d4af74d4
TB
40072013-10-27 Tobias Burnus <burnus@net-b.de>
4008
4009 PR other/33426
4010 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4011 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4012 (c_parser_statement_after_labels): Update calls.
4013
d73749df 40142013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4015
4016 PR other/33426
4017 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4018 Handle PRAGMA_IVDEP.
4019 (c_parser_statement_after_labels): Update call.
4020
f28aa681
MP
40212013-10-24 Marek Polacek <polacek@redhat.com>
4022
4023 * c-parser.c (c_parser_struct_declaration): Add a comment.
4024 (c_parser_declarator): Don't allow _Alignas here.
4025
0645c1a2
AM
40262013-10-17 Andrew MacLeod <amacleod@redhat.com>
4027
4028 * c-parser.c: Include omp-low.h.
4029 * c-typeck.c: Likewise.
4030
568a31f2
MP
40312013-10-17 Marek Polacek <polacek@redhat.com>
4032
4033 PR c/58267
4034 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4035 Document syntax of the array-declarator.
4036 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4037 are not permitted.
4038 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4039 (c_parser_struct_declaration): Likewise.
4040 (c_parser_declarator): Likewise.
4041 (c_parser_direct_declarator_inner): Likewise.
4042 (c_parser_parameter_declaration): Likewise.
4043 (c_parser_type_name): Likewise.
4044
acf0174b
JJ
40452013-10-11 Jakub Jelinek <jakub@redhat.com>
4046
4047 * c-lang.h (current_omp_declare_target_attribute): New extern
4048 decl.
4049 * c-parser.c: Include c-lang.h.
4050 (struct c_parser): Change tokens to c_token *.
4051 Add tokens_buf field. Change tokens_avail type to unsigned int.
4052 (c_parser_consume_token): If parser->tokens isn't
4053 &parser->tokens_buf[0], increment parser->tokens.
4054 (c_parser_consume_pragma): Likewise.
4055 (enum pragma_context): Add pragma_struct and pragma_param.
4056 (c_parser_external_declaration): Adjust
4057 c_parser_declaration_or_fndef caller.
4058 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4059 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4060 Adjust recursive call.
4061 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4062 of pragma_external.
4063 (c_parser_parameter_declaration): Use pragma_param instead of
4064 pragma_external.
4065 (c_parser_compound_statement_nostart, c_parser_label,
4066 c_parser_for_statement): Adjust
4067 c_parser_declaration_or_fndef callers.
4068 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4069 it through to c_parser_conditional_expression.
4070 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4071 pass it through to c_parser_binary_expression. Adjust recursive
4072 call.
4073 (c_parser_binary_expression): Remove prec argument, add
4074 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4075 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4076 binop matches it, use build2 instead of parser_build_binary_op.
4077 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4078 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4079 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4080 Handle pragma_struct and pragma_param the same as pragma_external.
4081 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4082 (c_parser_omp_variable_list): Parse array sections for
4083 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4084 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4085 (c_parser_omp_clause_reduction): Handle user defined reductions.
4086 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4087 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4088 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4089 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4090 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4091 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4092 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4093 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4094 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4095 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4096 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4097 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4098 (c_parser_omp_for_loop): Add CODE argument, pass it through
4099 to c_finish_omp_for. Change last argument to cclauses,
4100 and adjust uses to grab parallel clauses from the array of all
4101 the split clauses. Adjust c_parser_binary_expression,
4102 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4103 (omp_split_clauses): New function.
4104 (c_parser_omp_simd): New function.
4105 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4106 Allow the function to be called also when parsing combined constructs,
4107 and call c_parser_omp_simd when parsing for simd.
4108 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4109 #pragma omp section, require exactly one structured-block instead of
4110 sequence of statements.
4111 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4112 Allow the function to be called also when parsing combined constructs.
4113 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4114 Allow the function to be called also when parsing combined
4115 constructs.
4116 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4117 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4118 c_parser_omp_teams, c_parser_omp_target_data,
4119 c_parser_omp_target_update, c_parser_omp_target,
4120 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4121 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4122 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4123 (c_parser_omp_construct): Add p_name and mask vars. Handle
4124 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4125 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4126 and c_parser_omp_sections callers.
4127 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4128 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4129 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4130 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4131 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4132 OMP_CLAUSE_DEPEND.
4133 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4134 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4135 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4136 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4137 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4138 * c-typeck.c: Include tree-inline.h.
4139 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4140 handle_omp_array_sections_1, handle_omp_array_sections,
4141 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4142 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4143 user defined reductions.
4144 (c_tree_equal): New function.
4145 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4146 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4147 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4148 c_check_omp_declare_reduction_r): New prototypes.
4149 * c-decl.c (current_omp_declare_target_attribute): New variable.
4150 (c_decl_attributes): New function.
4151 (start_decl, start_function): Use it instead of decl_attributes.
4152 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4153 c_omp_reduction_decl, c_omp_reduction_lookup,
4154 c_check_omp_declare_reduction_r): New functions.
4155
0a6c2227
TT
41562013-09-25 Tom Tromey <tromey@redhat.com>
4157
4158 * Make-lang.in (c/gccspec.o): Remove.
4159 (CFLAGS-c/gccspec.o): New variable.
4160 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4161 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4162 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4163
f3bc55f0
TT
41642013-09-25 Tom Tromey <tromey@redhat.com>
4165
4166 * Make-lang.in (c/gccspec.o): Don't use subshell.
4167
a24d975c
MP
41682013-09-18 Marek Polacek <polacek@redhat.com>
4169
4170 PR sanitize/58443
4171 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4172 Remove unnecessary check.
4173
ce6923c5
MP
41742013-09-18 Marek Polacek <polacek@redhat.com>
4175
4176 PR sanitizer/58411
4177 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4178 no_sanitize_undefined attribute.
4179
a1e51df9
KT
41802013-09-13 Kai Tietz <ktietz@redhat.com>
4181
4182 PR target/57848
4183 * c-decl.c (c_builtin_function_ext_scope): Remove
4184 wrong assumption that it is never called on prexisting
4185 symbol.
4186
0af94e6f
JR
41872013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4188
4189 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4190
20059c8b
GDR
41912013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4192
4193 * c-objc-common.c (c_tree_printer): Tidy.
4194
de5a5fa1
MP
41952013-08-30 Marek Polacek <polacek@redhat.com>
4196
4197 * c-typeck.c (build_binary_op): Add division by zero and shift
4198 instrumentation.
4199
2531a1d9 42002013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4201 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4202
6e2bcc98 4203 PR c/35649
2531a1d9
JR
4204 * c-typeck.c (c_common_type): Prefer double_type_node over
4205 other REAL_TYPE types with the same precision.
4206 (convert_arguments): Likewise.
4207
025311c4
GDR
42082013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4209
4210 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4211 (c_initialize_diagnostics): Call a destructor for the early printer.
4212
da6ca2b5
GDR
42132013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4214
4215 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4216 printer initialization.
4217
318cda85 42182013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4219
318cda85
BI
4220 PR c/57490
4221 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4222 check for truth values.
4223 (expand_array_notation_exprs): Added truth values case. Removed an
4224 unwanted else. Added for-loop to walk through subtrees in default
4225 case.
4226
b066401f
GDR
42272013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4228
4229 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4230
fb48aadc
JM
42312013-07-23 Joseph Myers <joseph@codesourcery.com>
4232
4233 * c-parser.c (struct c_generic_association): Fix typo.
4234
433cc7b0
TT
42352013-07-23 Tom Tromey <tromey@redhat.com>
4236 Joseph Myers <joseph@codesourcery.com>
4237
4238 * c-parser.c (struct c_generic_association): New.
4239 (c_generic_association_d): New typedef.
4240 (c_parser_generic_selection): New function.
4241 (c_parser_postfix_expression): Handle RID_GENERIC.
4242
26d40c3d
JM
42432013-07-13 Jason Merrill <jason@redhat.com>
4244
4245 PR c++/57793
4246 * c-decl.c (finish_struct): Check for too-large class.
4247
ecdbd01a 42482013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4249
4250 PR c/57821
4251 * c-typeck.c (set_init_index): When folding, check for index overflow.
4252
1141ed3f
BI
42532013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4254
4255 * c-parser.c (c_parser_array_notation): Removed rejection of array
4256 notations in an array of function pointers.
4257
713b46fa
BI
42582013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4259
4260 * c-array-notation.c (make_triplet_val_inv): New function.
4261 (create_cmp_incr): Likewise.
4262 (create_array_refs): Likewise.
4263 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4264 Also modularized common parts between functions and called the function.
4265 (build_array_notation_expr): Likewise.
4266 (fix_conditional_array_notations_1): Likewise.
4267 (fix_array_notation_expr): Likewise.
4268 (fix_array_notation_call_expr): Likewise.
4269
92f20202
MP
42702013-06-18 Marek Polacek <polacek@redhat.com>
4271
4272 PR c/57630
4273 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4274
73a23b06
BI
42752013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4276
4277 * c-array-notation.c (build_array_notation_expr): Reject array notation
4278 mismatch between LHS and RHS even inside a call_expr. Also, removed
4279 a couple while statements that were dead code.
4280
00b8517d
BI
42812013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4282
4283 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4284 excessive precision expressions in function parameters. Also removed
4285 couple unwanted while statements.
4286
1509bdda
BI
42872013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4288
4289 * c-array-notation.c (expand_array_notation_exprs): Added
4290 ARRAY_NOTATION_REF case.
4291
d60f1706
BI
42922013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4293
4294 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4295 function to c-family/array-notation-common.c.
4296 (is_cilkplus_reduce_builtin): Likewise.
4297 (find_rank): Likewise.
4298 (extract_array_notation_exprs): Likewise.
4299 (replace_array_notations): Likewise.
4300 (find_inv_trees): Likewise.
4301 (replace_inv_trees): Likewise.
4302 (contains_array_notation_expr): Likewise.
4303 (find_correct_array_notation_type): Likewise.
4304 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4305 (struct inv_list): Moved this to c-family/array-notation-common.c.
4306 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4307
6d6efbb3
BI
43082013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4309
4310 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4311 reduction functions outside the for-loop. Added a check if the fundecl
4312 is non-NULL. Finally, removed an unwanted if-statement, and made the
4313 body unconditional.
4314
25c22937
BI
43152013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4316
4317 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4318 condition of the if-statement matches the rank of else-block and then-
4319 block when array notations are used.
4320 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4321 expression after the entire function body is parsed.
4322 (c_parser_expr_no_commas): Delayed creating array notation expressions
4323 to the end of function parsing.
4324 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4325 whole if-statement instead of just the condition.
4326 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4327
edd25645
BI
43282013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4329
4330 PR c/57474
4331 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4332 array to NULL_TREE if they are unused. Also added a check for the
4333 field to be NULL before its fields are used in future.
4334
065ce7f1
RO
43352013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4336
4337 PR bootstrap/57450
4338 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4339 (build_array_notation_expr): Likewise.
4340
36536d79
BI
43412013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4342
4343 * c-typeck.c (build_array_ref): Added a check to see if array's
4344 index is greater than one. If true, then emit an error.
4345 (build_function_call_vec): Exclude error reporting and checking
4346 for builtin array-notation functions.
4347 (convert_arguments): Likewise.
4348 (c_finish_return): Added a check for array notations as a return
4349 expression. If true, then emit an error.
4350 (c_finish_loop): Added a check for array notations in a loop
4351 condition. If true then emit an error.
4352 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4353 (build_binary_op): Added a check for array notation expr inside
4354 op1 and op0. If present, we call another function to find correct
4355 type.
4356 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4357 * c-parser.c (c_parser_compound_statement): Check if array
4358 notation code is used in tree, if so, then transform them into
4359 appropriate C code.
4360 (c_parser_expr_no_commas): Check if array notation is used in LHS
4361 or RHS, if so, then build array notation expression instead of
4362 regular modify.
4363 (c_parser_postfix_expression_after_primary): Added a check for
4364 colon(s) after square braces, if so then handle it like an array
4365 notation. Also, break up array notations in unary op if found.
4366 (c_parser_direct_declarator_inner): Added a check for array
4367 notation.
4368 (c_parser_compound_statement): Added a check for array notation in
4369 a stmt. If one is present, then expand array notation expr.
4370 (c_parser_if_statement): Likewise.
4371 (c_parser_switch_statement): Added a check for array notations in
4372 a switch statement's condition. If true, then output an error.
4373 (c_parser_while_statement): Similarly, but for a while.
4374 (c_parser_do_statement): Similarly, but for a do-while.
4375 (c_parser_for_statement): Similarly, but for a for-loop.
4376 (c_parser_unary_expression): Check if array notation is used in a
4377 pre-increment or pre-decrement expression. If true, then expand
4378 them.
4379 (c_parser_array_notation): New function.
4380 * c-array-notation.c: New file.
4381 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4382
cd192ccc
MS
43832013-05-23 Mike Stump <mikestump@comcast.net>
4384
4385 * c-typeck.c (convert_for_assignment): Handle references to memory
4386 spaces better.
4387
427b248d
JM
43882013-05-16 Jason Merrill <jason@redhat.com>
4389
4390 * Make-lang.in (cc1$(exeext)): Use link mutex.
4391
44d90fe1
PC
43922013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4393
4394 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4395 to simply use OPT_Wpointer_arith.
4396 (build_unary_op): Likewise.
4397
4e7d7b3d
JJ
43982013-04-03 Jakub Jelinek <jakub@redhat.com>
4399
4400 PR c/19449
4401 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4402 argument. If set, or it temporarily for parsing of the first
4403 argument into force_folding_builtin_constant_p.
4404 (c_parser_postfix_expression): Adjust callers.
4405
839b422f
RB
44062013-03-21 Richard Biener <rguenther@suse.de>
4407
4408 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4409 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4410
2ee028f1
MP
44112013-02-12 Marek Polacek <polacek@redhat.com>
4412
4413 PR c/44938
4414 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4415 origtypes to NULL.
4416
8824edff
JJ
44172013-01-24 Jakub Jelinek <jakub@redhat.com>
4418
4419 PR c/56078
4420 * c-typeck.c (set_nonincremental_init_from_string): If
4421 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4422 returned false.
4423 (process_init_element): Likewise.
4424
eadd3d0d
JJ
44252012-12-20 Jakub Jelinek <jakub@redhat.com>
4426
4427 PR c++/55619
4428 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4429 argument, don't call default_function_array_conversion
4430 nor c_fully_fold here.
4431 (c_parser_asm_statement): Adjust callers.
4432 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4433 and outputs here, and call default_function_array_conversion
4434 on inputs that don't need to be addressable.
4435
f8a93a2e
JJ
44362012-12-18 Jakub Jelinek <jakub@redhat.com>
4437
4438 PR c/39464
4439 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4440 warning require that both c_common_unsigned_type as well as
4441 c_common_signed_type is the same for both mvl and mvr types.
4442
9771b263
DN
44432012-11-16 Diego Novillo <dnovillo@google.com>
4444
4445 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4446
4447 * c-common.c: Use new vec API in vec.h.
4448 * c-common.h: Likewise.
4449 * c-gimplify.c: Likewise.
4450 * c-pragma.c: Likewise.
4451 * c-pretty-print.c: Likewise.
4452 * c-pretty-print.h: Likewise.
4453 * c-semantics.c: Likewise.
4454 * c-decl.c: Likewise.
4455 * c-parser.c: Likewise.
4456 * c-tree.h: Likewise.
4457 * c-typeck.c: Likewise.
4458
880661a4
JW
44592012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4460
4461 PR c++/54930
4462 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4463
077d1abe
MLI
44642012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4465
4466 PR c/53066
4467 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4468 shadows a function, unless the variable is a function or a
4469 pointer-to-function.
4470
3a785c97
JJ
44712012-10-12 Jakub Jelinek <jakub@redhat.com>
4472
4473 PR c/54381
4474 * c-parser.c (struct c_tree_loc_pair): Removed.
4475 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4476 add location_t * and tree * arguments, fill in array of 3
4477 sizeof_arg trees and corresponding locs.
4478 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4479 c_parser_expr_list callers.
4480 (c_parser_postfix_expression_after_primary): Likewise. Pass
4481 array of 3 sizeof_arg trees and locs (corresponding to first
4482 3 arguments) to sizeof_pointer_memaccess_warning.
4483
703c8606
LC
44842012-10-09 Lawrence Crowl <crowl@google.com>
4485
4486 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4487 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4488 hash table.
4489
5d9de0d0
PC
44902012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4491
4492 PR c++/54194
4493 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4494 call.
4495
a212e43f
MG
44962012-10-09 Marc Glisse <marc.glisse@inria.fr>
4497
4498 PR c++/54427
4499 * c-typeck.c: Include c-common.h.
4500 (enum stv_conv): Moved to c-common.h.
4501 (scalar_to_vector): Moved to c-common.c.
4502 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4503 * Make-lang.in: c-typeck.c depends on c-common.h.
4504
3b78de56
AC
45052012-10-04 Arnaud Charlet <charlet@adacore.com>
4506
4507 * c-decl.c (c_write_global_declarations): Fix handling of
4508 -fdump-ada-spec*.
4509
78c60e3d
SS
45102012-09-30 Sharad Singhai <singhai@google.com>
4511
4512 * c-decl.c (c_write_global_declarations): Use a different method
4513 to determine if the dump has ben initialized.
4514
9f33203d
JM
45152012-09-14 Joseph Myers <joseph@codesourcery.com>
4516
4517 PR c/54552
4518 * c-typeck.c (c_cast_expr): When casting to a type requiring
4519 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4520 c_fully_fold first.
4521
a27d595d
JM
45222012-09-14 Joseph Myers <joseph@codesourcery.com>
4523
4524 PR c/54103
4525 * c-typeck.c (build_unary_op): Pass original argument of
4526 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4527 any C_MAYBE_CONST_EXPR, if it has integer operands.
4528 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4529 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4530 to c_objc_common_truthvalue_conversion, then remove any
4531 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4532 c_objc_common_truthvalue_conversion not
4533 c_common_truthvalue_conversion.
4534 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4535 call note_integer_operands for arguments with integer operands
4536 that are not integer constants.
4537
9feb29df
JJ
45382012-09-13 Jakub Jelinek <jakub@redhat.com>
4539
4540 PR c/54559
4541 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4542 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4543
d409320c
JJ
45442012-08-31 Jakub Jelinek <jakub@redhat.com>
4545
4546 PR c/54428
4547 * c-convert.c (convert): Don't call fold_convert_loc if
4548 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4549 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4550 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4551
6265d07c
JJ
45522012-08-24 Jakub Jelinek <jakub@redhat.com>
4553
4554 PR c/54355
4555 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4556 for nested and empty_ok arguments in the call to
4557 c_parser_declaration_or_fndef.
4558
1a4049e7
JJ
45592012-08-17 Jakub Jelinek <jakub@redhat.com>
4560
4561 * c-tree.h (c_last_sizeof_arg): Declare.
4562 * c-parser.c (struct c_tree_loc_pair): New type.
4563 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4564 non-NULL.
4565 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4566 (c_parser_postfix_expression_after_primary): Likewise. Call
4567 sizeof_pointer_memaccess_warning if needed.
4568 (sizeof_ptr_memacc_comptypes): New function.
4569 * c-typeck.c (c_last_sizeof_arg): New global variable.
4570 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4571
0229aee9
UB
45722012-07-24 Uros Bizjak <ubizjak@gmail.com>
4573
4574 * c-lang.h (lang_decl): Add variable_size GTY option.
4575
7ee2468b
SB
45762012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4577
4578 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4579 * Make-lang.in: Fix dependencies.
4580
d4a10d0a
SB
45812012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4582
4583 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4584 and add language Makefile hooks.
4585 * config-lang.in: New file.
4586 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4587 add the required "normal" config-lang.in rules.
4588 * c-lang.h: Moved from gcc/ to here.
4589 * c-tree.h: Likewise.
4590 * c-objc-common.c: Likewise.
4591 * c-objc-common.h: Likewise.
4592 * c-typeck.c: Likewise.
4593 * c-convert.c: Likewise.
4594 * c-lang.c: Likewise.
4595 * c-aux-info.c: Likewise.
4596 * c-errors.c: Likewise.
4597 * gccspec.c: Likewise.
4598 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4599 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4600\f
cbe34bb5 4601Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4602
4603Copying and distribution of this file, with or without modification,
4604are permitted in any medium without royalty provided the copyright
4605notice and this notice are preserved.