]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
PR target/81305
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
2bfb0686 12017-06-26 Marek Polacek <polacek@redhat.com>
2
3 PR c/80116
4 * c-parser.c (c_parser_if_body): Set the location of the
5 body of the conditional after parsing all the labels. Call
6 warn_for_multistatement_macros.
7 (c_parser_else_body): Likewise.
8 (c_parser_switch_statement): Likewise.
9 (c_parser_while_statement): Likewise.
10 (c_parser_for_statement): Likewise.
11 (c_parser_statement): Add a default argument. Save the location
12 after labels have been parsed.
13 (c_parser_c99_block_statement): Likewise.
14
edd07ff6 152017-06-19 Richard Biener <rguenther@suse.de>
16
17 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
18 negated _Literals to parse _Literal (int) -1.
19
9917317a 202017-06-13 Martin Liska <mliska@suse.cz>
21
22 PR sanitize/78204
23 * c-convert.c (convert): Use sanitize_flags_p.
24 * c-decl.c (grokdeclarator): Likewise.
25 * c-typeck.c (convert_for_assignment): Likewise.
26 (c_finish_return): Likewise.
27 (build_binary_op): Likewise.
28
37ce62dc 292017-06-08 Jakub Jelinek <jakub@redhat.com>
30
31 PR c/81006
32 * c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
33 to sizetype before size_binop.
34
73714718 352017-06-07 Jakub Jelinek <jakub@redhat.com>
36
37 * gimple-parser.c (c_parser_parse_gimple_body): Use TDI_gimple instead
38 of TDI_generic.
39
1d1d0f37 402017-06-06 Marek Polacek <polacek@redhat.com>
41
42 PR c/79983
43 * c-decl.c (start_struct): Use the location of TYPE_STUB_DECL of
44 ref.
45 (start_enum): Use the location of TYPE_STUB_DECL of enumtype.
46
0ca70bfd 472017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
48
49 * c-parser.c (c_parser_binary_expression): Implement the
50 -Wsizeof_pointer_div warning.
51 (c_parser_postfix_expression): Allow SIZEOF_EXPR as expr.original_code
52 from a parenthesized expression.
53 (c_parser_expr_list): Use c_last_sizeof_loc.
54 * c-tree.h (c_last_sizeof_loc): New external.
55 * c-typeck.c (c_last_sizeof_loc): New variable.
56 (c_expr_sizeof_expr, c_expr_sizeof_type): Assign c_last_sizeof_loc.
57
8c7a5be5 582017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
59
60 PR testsuite/80580
61 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
62
4d1eda3a 632017-05-30 David Malcolm <dmalcolm@redhat.com>
64
65 * c-objc-common.c (c_tree_printer): Gain bool and const char **
66 parameters.
67
645b0f8d 682017-05-24 Martin Sebor <msebor@redhat.com>
69
70 PR c/80731
71 * c-fold.c (c_fully_fold_internal): Adjust.
72 * c-typeck.c (parser_build_unary_op): Adjust.
73
9d5c2cca 742017-05-23 Thomas Schwinge <thomas@codesourcery.com>
75
76 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
77 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
78 "VECTOR_LENGTH".
79
50253e07 802017-05-23 Marek Polacek <polacek@redhat.com>
81
82 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
83 quotes.
84
5c05c939 852017-05-22 Jakub Jelinek <jakub@redhat.com>
86
87 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
88 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
89 it returned invariant. Call tree_invariant_p unconditionally
90 afterwards to decide whether to return expr or op0.
91
88df6264 922017-05-22 Nathan Sidwell <nathan@acm.org>
93
94 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
95
6acf639f 962017-05-19 Thomas Schwinge <thomas@codesourcery.com>
97
98 * c-parser.c (c_parser_omp_clause_default): Handle
99 "OMP_CLAUSE_DEFAULT_PRESENT".
100
1bccae6b 1012017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
102
103 * config-lang.in (gtfiles): Add c-family/c-format.c.
104
8eb8a179 1052017-05-18 Nathan Sidwell <nathan@acm.org>
106
107 * c-decl.c (pushdecl_top_level): Delete unused function.
108
78173203 1092017-05-18 Marek Polacek <polacek@redhat.com>
110
111 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
112 (check_earlier_gotos): Likewise.
113 (define_label): Likewise.
114 (pending_xref_error): Likewise.
115 (smallest_type_quals_location): Likewise.
116 (grokdeclarator): Likewise.
117 (grokparms): Likewise.
118 (identifier_global_value): Likewise.
119 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
120 (find_init_member): Likewise.
121
2823920b 1222017-05-18 Marek Polacek <polacek@redhat.com>
123
124 * c-decl.c (start_decl): Use false/true instead of 0/1.
125 (grokdeclarator): Likewise.
126 (finish_struct): Likewise.
127 (start_function): Change the return type to bool. Use false/true
128 instead of 0/1.
129 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
130 * c-tree.h (start_function): Update.
131 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
132 (set_designator): Change the return type to bool. Use false/true
133 instead of 0/1.
134
72749341 1352017-05-17 Marek Polacek <polacek@redhat.com>
136
137 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
138 * c-typeck.c: Likewise.
139
63b8aca5 1402017-05-17 Marek Polacek <polacek@redhat.com>
141
142 PR sanitizer/80659
143 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
144 DECL_IGNORED_P even for non-static compound literals.
145
3f6e5ced 1462017-05-17 Martin Liska <mliska@suse.cz>
147
148 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
149 use it instead of int type.
150
d0869ea4 1512017-05-17 Marek Polacek <polacek@redhat.com>
152
153 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
154 call c_fully_fold.
155 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
156 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
157 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
158 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
159 save_expr.
160 (c_parser_conditional_expression): Likewise.
161 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
162 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
163 (process_init_element): Likewise.
164 (build_binary_op): Likewise.
165 (handle_omp_array_sections_1): Likewise.
166
641fc3ae 1672017-05-12 Thomas Schwinge <thomas@codesourcery.com>
168
169 * c-parser.c (c_parser_omp_clause_num_gangs)
170 (c_parser_omp_clause_num_workers)
171 (c_parser_omp_clause_vector_length): Merge functions into...
172 (c_parser_oacc_single_int_clause): ... this new function. Adjust
173 all users.
174
930c75f4 1752017-05-11 Nathan Sidwell <nathan@acm.org>
176
177 * gimple-parser.c: Don't #include tree-dump.h.
178
22ba59df 1792017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
180
181 PR testsuite/80580
182 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
183
e58d47fc 1842017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
185
186 PR testsuite/80580
187 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
188 incorrect __MEM syntax.
189
a38eda85 1902017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
191
192 PR testsuite/80580
193 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
194 type of unary '*'.
195
cdf05a3f 1962017-05-09 Nathan Sidwell <nathan@acm.org>
197
198 * c-tree.h (pushdecl): Declare.
199
56b8400f 2002017-05-05 David Malcolm <dmalcolm@redhat.com>
201
202 * c-decl.c (warn_defaults_to): Replace report_diagnostic
203 with diagnostic_report_diagnostic.
204 * c-errors.c (pedwarn_c99): Likewise.
205 (pedwarn_c90): Likewise.
206
92bc38e7 2072017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
208
209 PR c++/80038
210 * c-gimplify.c (c_gimplify_expr): Remove calls to
211 cilk_gimplifY_call_params_in_spawned_fn.
212
112e1c2c 2132017-04-25 David Malcolm <dmalcolm@redhat.com>
214
215 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
216 hint for removing extra semicolon.
217
0b515531 2182017-04-21 Jakub Jelinek <jakub@redhat.com>
219
220 PR c/80468
221 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
222 enabled, set specs->type to integer_type_node.
223
2fbe7a32 2242017-04-03 Jonathan Wakely <jwakely@redhat.com>
225
226 * c-array-notation.c: Fix typo in comment.
227
3582b9a6 2282017-03-29 Marek Polacek <polacek@redhat.com>
229
230 PR c/79730
231 * c-decl.c (finish_decl): Check VAR_P.
232
3385a573 2332017-03-27 Jakub Jelinek <jakub@redhat.com>
234
235 PR middle-end/80162
236 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
237 * c-typeck.c (c_mark_addressable): Likewise. Look through
238 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
239 to ARRAY_TYPE.
240 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
241
5c1d51e3 2422017-03-23 Marek Polacek <polacek@redhat.com>
243
244 * c-tree.h: Remove a C_RID_YYCODE reference.
245
048100df 2462017-03-21 Jakub Jelinek <jakub@redhat.com>
247
248 PR c/80097
249 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
250 optional COMPOUND_EXPR with ubsan instrumentation.
251
c153c724 2522017-03-17 Marek Polacek <polacek@redhat.com>
253
254 * c-parser.c: Add C11 references.
255
51eb47a0 2562017-03-15 Marek Polacek <polacek@redhat.com>
257
258 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
259
726add0b 2602017-03-11 Marek Polacek <polacek@redhat.com>
261
262 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
263
ca1f4c7a 2642017-03-10 David Malcolm <dmalcolm@redhat.com>
265
266 PR translation/79848
267 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
268 "%qs".
269 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
270
e14b765f 2712017-03-09 Marek Polacek <polacek@redhat.com>
272
273 PR sanitizer/79757
274 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
275 parameter declarations with initializers.
276
7ad571b2 2772017-03-09 Jakub Jelinek <jakub@redhat.com>
278
279 PR c/79969
280 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
281 TYPE_STUB_DECL.
282
d87f668a 2832017-03-07 Jakub Jelinek <jakub@redhat.com>
284
285 PR c/79834
286 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
287 for "may only be used in compound statements" diagnostics, change it
288 such that the same translatable string is used for all pragmas. For
289 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
290 diagnostics.
291 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
292 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
293 "may only be used in compound statements" diagnostics, such that the
294 same translatable string is used for all pragmas.
295
16b0e324 2962017-03-04 Marek Polacek <polacek@redhat.com>
297
298 PR c/79847
299 * c-decl.c (implicit_decl_warning): Add missing space.
300
f2360ea5 3012017-03-03 Marek Polacek <polacek@redhat.com>
302
303 PR c/79758
304 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
305 current_function_prototype_arg_types is error_mark_node. Fix
306 formatting. Use TREE_VALUE instead of TREE_TYPE.
307
d33f5911 3082017-03-03 Jakub Jelinek <jakub@redhat.com>
309
408a47b2 310 PR c/79837
311 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
312 %<min%> or %<max%> in the diagnostics, instead mention identifier.
313 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
314 diagnostics.
315
d33f5911 316 PR c/79836
317 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
318 instead of %<_Generic>.
319 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
320 (c_parser_omp_target_exit_data): Use %<release%> instead of
321 %<release>.
322
1caf9cb4 3232017-02-28 Jakub Jelinek <jakub@redhat.com>
324
325 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
326 instead of just cond ? "..." : "...".
327 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
328 for "enter"/"exit" keyword.
329 (c_finish_oacc_routine): Don't use %s to supply portions of the
330 message.
331
bbd5521e 3322017-02-24 Jakub Jelinek <jakub@redhat.com>
333
334 PR c++/79588
335 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
336 handle -Wrestrict here.
337 * c-typeck.c (build_function_call_vec): Adjust
338 check_function_arguments caller.
339
a450df95 3402017-02-23 Richard Biener <rguenther@suse.de>
341
342 PR c/79684
343 * gimple-parser.c (c_parser_gimple_statement): Use set_error
344 to initialize c_exprs to return.
345 (c_parser_gimple_binary_expression): Likewise.
346 (c_parser_gimple_unary_expression): Likewise.
347 (c_parser_gimple_postfix_expression): Likewise.
348
2567d975 3492017-02-22 Marek Polacek <polacek@redhat.com>
350
351 PR c/79662
352 * c-typeck.c (convert_arguments): Handle error_mark_node.
353
21bfe0d4 3542017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
355
356 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
357 value of c_parser_parse_ssa_name against error_mark_node and emit
358 error if ssa name is anonymous and written as default definition.
359
a8deddc8 3602017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
361
362 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
363 FMA_EXPR.
364
79878c89 3652017-02-16 Jakub Jelinek <jakub@redhat.com>
366
367 PR c++/79512
368 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
369 ignore #pragma omp target even when not followed by identifier.
370
78c6d67e 3712017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
372
373 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
374 (c_parser_gimple_unary_expression): Likewise.
375
19efce70 3762017-02-13 Jakub Jelinek <jakub@redhat.com>
377
378 * c-parser.c (c_parser_oacc_declare): Add missing space in
379 diagnostics.
380
32b8484d 3812017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
382
383 PR c/79478
384 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
385 set_c_expr_source_range when parsing ssa-name.
386
b91919ba 3872017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
388 Richard Biener <rguenther@suse.de>
389
390 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
391 building IL when arguments are error_mark_node.
392 (c_parser_gimple_unary_expression): Likewise.
393 (c_parser_gimple_if_stmt): Likewise.
394 (c_parser_gimple_switch_stmt): Likewise.
395 (c_parser_gimple_return_stmt): Likewise.
396 (c_parser_parse_ssa_name): When name lookup fails do not build
397 an SSA name. Use undeclared rather than not declared in error
398 reporting.
399
127144a0 4002017-02-09 Marek Polacek <polacek@redhat.com>
401
402 PR c/79428
403 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
404 instead of c_parser_skip_until_found.
405
b5c83b44 4062017-02-09 Jakub Jelinek <jakub@redhat.com>
407
408 PR c/79431
409 * c-parser.c (c_parser_omp_declare_target): Don't invoke
410 symtab_node::get on automatic variables.
411
719a7570 4122016-02-09 Nathan Sidwell <nathan@codesourcery.com>
413 Chung-Lin Tang <cltang@codesourcery.com>
414
415 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
416 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
417 semantic checking.
418 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
419
29beab79 4202017-02-07 Richard Biener <rguenther@suse.de>
421
422 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
423 (c_parser_gimple_postfix_expression_after_primary):
424 Do not use c_build_function_call_vec to avoid folding and promotion.
425 Simplify.
426
96afa092 4272017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
428
429 PR lto/79061
430 * c-decl.c (pop_scope): Pass main_input_filename to
431 build_translation_unit_decl.
432
175e0d6b 4332017-01-24 David Malcolm <dmalcolm@redhat.com>
434
435 * c-parser.c: Include "read-rtl-function.h" and
436 "run-rtl-passes.h".
437 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
438 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
439 production. Update for renaming of field "gimple_pass" to
440 "gimple_or_rtl_pass". If __RTL was seen, call
441 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
442 to an auto_timevar, to cope with early exit.
443 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
444 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
445 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
446 Handle RID_RTL.
447 (c_parser_parse_rtl_body): New function.
448 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
449 (struct c_declspecs): Rename field "gimple_pass" to
450 "gimple_or_rtl_pass". Add field "rtl_p".
451 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
452 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
453 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
454 (c_parser_gimple_or_rtl_pass_list): ...this.
455
3ef7eab1 4562017-01-20 Marek Polacek <polacek@redhat.com>
457
458 PR c/64279
459 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
460
785353b9 4612017-01-13 Richard Biener <rguenther@suse.de>
462
463 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
464 nops.
465
ac5f04c1 4662017-01-13 Richard Biener <rguenther@suse.de>
467
468 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
469 _Literal ( type-name ) number.
470
2b11c996 4712017-01-12 Richard Biener <rguenther@suse.de>
472
473 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
474 __MEM.
475
9a26d403 4762017-01-11 Jakub Jelinek <jakub@redhat.com>
477
478 PR c++/72813
479 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
480 PCH file.
481
a19c4dc1 4822017-01-11 Richard Biener <rguenther@suse.de>
483
484 PR bootstrap/79052
485 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
486 returns on parse errors.
487
6124217c 4882017-01-04 Marek Polacek <polacek@redhat.com>
489
490 PR c++/64767
491 * c-parser.c (c_parser_postfix_expression): Mark zero character
492 constants by setting original_type in c_expr.
493 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
494 with a zero character constant.
495 (char_type_p): New function.
496
8ccda24a 4972017-01-04 David Malcolm <dmalcolm@redhat.com>
498
499 * c-parser.c (c_parser_declaration_or_fndef): Create a
500 rich_location at init_loc and parse it to start_init.
501 (last_init_list_comma): New global.
502 (c_parser_braced_init): Update last_init_list_comma when parsing
503 commas. Pass it to pop_init_level. Pass location of closing
504 brace to pop_init_level.
505 (c_parser_postfix_expression_after_paren_type): Create a
506 rich_location at type_loc and parse it to start_init.
507 (c_parser_omp_declare_reduction): Likewise for loc.
508 * c-tree.h (start_init): Add rich_location * param.
509 (pop_init_level): Add location_t param.
510 * c-typeck.c (struct initializer_stack): Add field
511 "missing_brace_richloc".
512 (start_init): Add richloc param, use it to initialize
513 the stack node's missing_brace_richloc.
514 (last_init_list_comma): New decl.
515 (finish_implicit_inits): Pass last_init_list_comma to
516 pop_init_level.
517 (push_init_level): When finding missing open braces, add fix-it
518 hints to the richloc.
519 (pop_init_level): Add "insert_before" param and pass it
520 when calling pop_init_level. Add fixits about missing
521 close braces to any richloc. Use the richloc for the
522 -Wmissing-braces warning.
523 (set_designator): Pass last_init_list_comma to pop_init_level.
524 (process_init_element): Likewise.
525
aad93da1 5262017-01-01 Jakub Jelinek <jakub@redhat.com>
527
528 Update copyright years.
529
3713d2e2 5302016-12-21 Jakub Jelinek <jakub@redhat.com>
531
184fac50 532 PR bootstrap/78817
533 * c-typeck.c (build_function_call_vec): If check_function_arguments
534 returns true, set TREE_NO_WARNING on CALL_EXPR.
535
3713d2e2 536 PR c/77767
537 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
538 to *expr instead of overwriting it.
539
3e677d45 5402016-12-20 Richard Biener <rguenther@suse.de>
541
542 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
543 error recovery.
544 (c_parser_gimple_statement): Only build assigns for non-error
545 stmts.
546 (c_parser_gimple_postfix_expression_after): Improve error recovery.
547
4954efd4 5482016-12-14 Martin Jambor <mjambor@suse.cz>
549
550 * c-parser.c: Include omp-general.h and omp-offload.h instead of
551 omp-low.h.
552 (c_finish_oacc_routine): Adjusted call to
553 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
554 to use their new names.
555 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
556 use its new name.
557 (c_parser_oacc_update): Likewise.
558 (c_parser_omp_simd): Likewise.
559 (c_parser_omp_target_update): Likewise.
560 * c-typeck.c: Include omp-general.h instead of omp-low.h.
561 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
562 name.
563 (c_finish_omp_cancellation_point): Likewise.
564 * gimple-parser.c: Do not include omp-low.h
565
4c50b884 5662016-12-02 Cesar Philippidis <cesar@codesourcery.com>
567 James Norris <jnorris@codesourcery.com>
568
569 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
570 EXIT_DATA,WAIT} are not used in compound statements.
571 (c_parser_oacc_enter_exit_data): Update diagnostics.
572
f1b3e1c9 5732016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
574
575 PR c++/71973
576 * c-decl.c (diagnose_mismatched_decls): Use
577 OPT_Wbuiltin_declaration_mismatch here too.
578
adc78298 5792016-11-18 Richard Sandiford <richard.sandiford@arm.com>
f1b3e1c9 580 Alan Hayward <alan.hayward@arm.com>
581 David Sherwood <david.sherwood@arm.com>
adc78298 582
583 * c-decl.c (merge_decls): Use SET_DECL_MODE.
584 (make_label, finish_struct): Likewise.
585
b1f04d34 5862016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
a49621cf 587 Richard Biener <rguenther@suse.de>
9b8f3aa1 588
a49621cf 589 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
590 * config-lang.in (gtfiles): Add c/c-parser.h.
591 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
592 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
593 * c-parser.c (enum c_id_kind, struct c_token,
594 c_parser_next_token_is, c_parser_next_token_is_not,
595 c_parser_next_token_is_keyword,
596 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
597 Split out to ...
598 * c-parser.h: ... new header.
599 * c-parser.c: Include c-parser.h and gimple-parser.h.
b1f04d34 600 (c_parser_peek_token, c_parser_peek_2nd_token,
a49621cf 601 c_token_starts_typename, c_parser_next_token_starts_declspecs,
602 c_parser_next_tokens_start_declaration, c_parser_consume_token,
603 c_parser_error, c_parser_require, c_parser_skip_until_found,
604 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
605 c_parser_type_name): Export.
606 (c_parser_tokens_buf): New function.
607 (c_parser_error): Likewise.
608 (c_parser_set_error): Likewise.
609 (c_parser_declspecs): Handle RID_GIMPLE.
b1f04d34 610 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
611 via c_parser_parse_gimple_body.
a49621cf 612 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
613 c_token_starts_typename, c_parser_next_token_starts_declspecs,
614 c_parser_next_tokens_start_declaration, c_parser_consume_token,
615 c_parser_error, c_parser_require, c_parser_skip_until_found,
616 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
617 c_parser_type_name): Declare.
b1f04d34 618 (struct c_parser): Declare forward.
619 (c_parser_tokens_buf): Declare.
a49621cf 620 (c_parser_error): Likewise.
621 (c_parser_set_error): Likewise.
622 * gimple-parser.c: New file.
623 * gimple-parser.h: Likewise.
b1f04d34 624
9b8f3aa1 6252016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
626
627 PR c/35503
628 * c-parser.c (c_parser_postfix_expression_after_primary): Call
629 warn_for_restrict.
630
50d3ad71 6312016-09-11 Le-Chun Wu <lcwu@google.com>
632 Mark Wielaard <mjw@redhat.com>
633
634 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
635 to the given -Wshadow= variant.
636
ad7b10a2 6372016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
638
639 * c-typeck.c: Include memmodel.h.
640
8a23256f 6412016-10-13 Jakub Jelinek <jakub@redhat.com>
642
643 PR target/77957
644 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
645 instead of lhd_return_null_tree_v.
646
30ac4925 6472016-10-07 Bernd Schmidt <bschmidt@redhat.com>
648
649 PR c++/69733
650 * c-decl.c (smallest_type_quals_location): New static function.
651 (grokdeclarator): Try to find the correct location for an ignored
652 qualifier.
653
3c77f69c 6542016-09-26 Marek Polacek <polacek@redhat.com>
655
656 PR c/7652
657 * c-decl.c (pop_scope): Add gcc_fallthrough.
658
6592016-09-26 Marek Polacek <polacek@redhat.com>
660
661 PR c/7652
662 * c-parser.c (struct c_token): Add flags field.
663 (c_lex_one_token): Pass it to c_lex_with_flags.
664 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
665 into IFN_FALLTHROUGH.
666 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
667 attribute fallthrough after a case label or default label.
668 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
669
481ce481 6702016-09-24 Marek Polacek <polacek@redhat.com>
671
672 PR c/77490
673 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
674 have boolean value. Warn about ++/-- on booleans.
675
16fb756f 6762016-09-23 Jakub Jelinek <jakub@redhat.com>
677
678 * c-parser.c (incomplete_record_decls): Remove unnecessary
679 = vNULL initialization of file scope vec.
680
d80c1c6c 6812016-09-16 Marek Polacek <polacek@redhat.com>
682
683 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
684
b99cc6da 6852016-09-14 Marek Polacek <polacek@redhat.com>
686
687 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
688 (fix_array_notation_expr): Likewise.
689 * c-decl.c (finish_decl): Likewise.
690 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
691 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
692 (function_to_pointer_conversion): Use false instead of 0.
693 (convert_lvalue_to_rvalue): Likewise.
694 (parser_build_unary_op): Likewise.
695 (build_atomic_assign): Likewise.
696 (build_unary_op): Change nonconvert parameter type to bool, use
697 true/false instead of 1/0.
698 (build_binary_op): Use true instead of 1.
699
68ef907c 7002016-09-13 David Malcolm <dmalcolm@redhat.com>
701
702 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
703 of add_fixit_insert to add_fixit_insert_before.
704
89bcb5a3 7052016-09-13 Marek Polacek <polacek@redhat.com>
706
707 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
708 it.
709
7a21b590 7102016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
711
712 PR c++/77496
713 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
714 COMPOUND_EXPR to warn_for_omitted_condop.
715
3da97ff7 7162016-09-07 David Malcolm <dmalcolm@redhat.com>
717
718 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
719 c_get_substring_location for this new langhook.
720
0b80c4b2 7212016-09-02 Jakub Jelinek <jakub@redhat.com>
722
723 PR c/65467
724 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
725 flag_openmp.
726 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
727 instead of mark_exp_read on low_bound/length expression.
728 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
729 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
730 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
731 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
732 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
733 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
734 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
735 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
736 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
737 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
738 instead of mark_expr_read.
739 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
740 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
741 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
742 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
743 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
744 array section bases outside of depend clause, for depend clause
745 use convert_lvalue_to_rvalue on the base.
746 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
747 linear, aligned, map, to and from clauses.
748 (c_omp_clause_copy_ctor): New function.
749
c7afb782 7502016-09-01 Marek Polacek <polacek@redhat.com>
751
752 PR c/7652
753 * c-typeck.c (composite_type): Add FALLTHRU comment.
754
986530da 7552016-08-31 David Malcolm <dmalcolm@redhat.com>
756
757 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
758 to the insertion fixits for "struct", "union", and "enum".
759
850c2009 7602016-08-30 David Malcolm <dmalcolm@redhat.com>
761
762 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
763 rather than add_fixit_misspelled_id.
764 (undeclared_variable): Likewise.
765 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
766 now-redundant "here" params from add_fixit_insert method calls.
767 (c_parser_parameter_declaration): Likewise.
768 * c-typeck.c (build_component_ref): Remove now-redundant range
769 param from add_fixit_replace method calls.
770
c4963714 7712016-08-25 Marek Polacek <polacek@redhat.com>
772
773 * c-typeck.c (parser_build_binary_op): Pass LHS to
774 warn_logical_not_parentheses.
775
49e1f4eb 7762016-08-25 Marek Polacek <polacek@redhat.com>
777
778 PR c/77323
779 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
780 or _FloatN or _FloatNx is not supported.
781 (finish_declspecs): Set type to integer_type_node when _FloatN or
782 _FloatNx is not supported.
783
82c85aba 7842016-08-19 Joseph Myers <joseph@codesourcery.com>
785
786 PR c/32187
787 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
788 (struct c_declspecs): Add field floatn_nx_idx.
789 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
790 and _FloatNx type specifiers.
791 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
792 (c_parser_declspecs, c_parser_attribute_any_word)
793 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
794 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
795 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
796 narrower than double.
797
7175bb2a 7982016-08-12 Jakub Jelinek <jakub@redhat.com>
799 Martin Liska <mliska@suse.cz>
800
801 PR c/67410
802 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
803 % to determine val element to change. Assert that
804 wchar_bytes * charwidth fits into val array.
805
e3533433 8062016-08-12 Marek Polacek <polacek@redhat.com>
807
808 PR c/7652
809 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
810 (c_parser_postfix_expression): Likewise.
811 * c-typeck.c (build_unary_op): Adjust fall through comment.
812 (c_mark_addressable): Likewise.
813
74be5bc1 8142016-08-11 Jakub Jelinek <jakub@redhat.com>
815
816 PR c/72816
817 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
818 array member through typedef, for orig_qual_indirect == 0 clear
819 orig_qual_type.
820
7af4d06b 8212016-08-08 David Malcolm <dmalcolm@redhat.com>
822
823 PR c/64955
824 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
825 this up to selftest::run_c_tests.
826 (selftest::run_c_tests): New function.
827
5f429ee2 8282016-08-04 Thomas Schwinge <thomas@codesourcery.com>
829
1fa5d8ba 830 * c-parser.c (struct oacc_routine_data): Add error_seen and
831 fndecl_seen members.
832 (c_finish_oacc_routine): Use these.
833 (c_parser_declaration_or_fndef): Adjust.
834 (c_parser_oacc_routine): Likewise. Support more C language
835 constructs, and improve diagnostics. Move pragma context
836 checking...
837 (c_parser_pragma): ... here.
838
5f429ee2 839 * c-parser.c (struct oacc_routine_data): New.
840 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
841 Simplify code.
842 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
843 declare target" attribute.
844
f3c032a4 8452016-08-01 Jan Beulich <jbeulich@suse.com>
846
847 * c-fold.c (c_fully_fold_internal): Also emit shift count
848 warnings for vector types.
849 * c-typeck.c (build_binary_op): Likewise.
850
4ebf85be 8512016-07-29 Marek Polacek <polacek@redhat.com>
852
853 PR c/71742
854 * c-decl.c (finish_struct): Rephrase an error message.
855
9efe5be6 856 PR c/71853
857 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
858 to error node for invalid code.
859
4c4548bb 860 PR c/71573
861 * c-decl.c (implicitly_declare): Return decl early not only for
862 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
863
322d4184 8642016-07-29 Jakub Jelinek <jakub@redhat.com>
865
866 PR c/71969
867 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
868 on GNU extern inline functions.
869
35fddbd6 8702016-07-29 Marek Polacek <polacek@redhat.com>
871
872 PR c/71583
873 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
874 check expr.value.
875
59c1507a 8762016-07-22 Uros Bizjak <ubizjak@gmail.com>
877
878 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
879
d0f11d68 8802016-07-20 David Malcolm <dmalcolm@redhat.com>
881
882 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
883 spellcheck-tree.h
884 (best_macro_match): Likewise, converting from a typedef to a
885 subclass.
886 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
887 (lookup_name_fuzzy): Update for change of best_macro_match to a
888 subclass with a ctor that calls cpp_forall_identifiers.
889
d208f6e6 8902016-07-20 David Malcolm <dmalcolm@redhat.com>
891
892 * c-decl.c (implicit_decl_warning): Update for conversion of
893 return type of lookup_name_fuzzy to const char *.
894 (undeclared_variable): Likewise.
895 (lookup_name_fuzzy): Convert return type from tree to
896 const char *.
897 * c-parser.c (c_parser_declaration_or_fndef): Update for
898 conversion of return type of lookup_name_fuzzy to const char *.
899 (c_parser_parameter_declaration): Likewise.
900
0ef9358d 9012016-07-15 Cesar Philippidis <cesar@codesourcery.com>
902
903 * c-parser.c (c_parser_oacc_declare): Don't scan for
904 GOMP_MAP_POINTER.
905 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
906 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
907 zero-length subarrays.
908
0dd7db3b 9092016-07-15 Jakub Jelinek <jakub@redhat.com>
910
911 PR c/71858
912 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
913 instead of FUZZY_LOOKUP_NAME.
914 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
915 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
916
28413b15 9172016-07-14 Jakub Jelinek <jakub@redhat.com>
918
919 PR c/71858
920 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
921
e9258aee 9222016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
923
924 * c-parser.c (c_parser_generic_selection): Make type of variable
925 auto_vec.
926 (c_parser_omp_declare_simd): Likewise.
927
57f91a55 9282016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
929
930 * c-decl.c (struct c_struct_parse_info): Change member types
931 from vec to auto_vec.
932 (start_struct): Adjust.
933 (finish_struct): Likewise.
934
c364d0f3 9352016-07-02 Jakub Jelinek <jakub@redhat.com>
936
937 PR c/71719
938 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
939
44e775d8 9402016-06-29 Thomas Schwinge <thomas@codesourcery.com>
941
942 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
943 Move pragma context checking into...
944 (c_parser_omp_cancellation_point): ... here, and improve
945 diagnostic messages.
946 * c-typeck.c (c_finish_omp_cancel)
947 (c_finish_omp_cancellation_point): Improve diagnostic messages.
948
1af10ce6 9492016-06-29 Jakub Jelinek <jakub@redhat.com>
950
951 PR c/71685
952 * c-typeck.c (c_build_qualified_type): Don't clear
953 C_TYPE_INCOMPLETE_VARS for the main variant.
954
9552016-06-28 Martin Sebor <msebor@redhat.com>
9c3ffbcb 956
957 PR c/71552
958 * c-typeck.c (output_init_element): Diagnose incompatible types
959 before non-constant initializers.
960
6eb2402f 9612016-06-28 Jakub Jelinek <jakub@redhat.com>
962
963 * Make-lang.in: Don't cat ../stage_current if it does not exist.
964
b4c71cbb 9652016-06-23 Andi Kleen <ak@linux.intel.com>
966
967 * Make-lang.in: Add support for autofdo.
968
8469aece 9692016-06-22 David Malcolm <dmalcolm@redhat.com>
970
971 PR c/70339
972 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
973 (implicit_decl_warning): When issuing warnings for implicit
974 declarations, attempt to provide a suggestion via
975 lookup_name_fuzzy.
976 (undeclared_variable): Likewise when issuing errors.
977 (lookup_name_in_scope): Likewise.
978 (struct edit_distance_traits<cpp_hashnode *>): New struct.
979 (best_macro_match): New typedef.
980 (find_closest_macro_cpp_cb): New function.
981 (lookup_name_fuzzy): New function.
982 * c-parser.c: Include gcc-rich-location.h.
983 (c_token_starts_typename): Split out case CPP_KEYWORD into...
984 (c_keyword_starts_typename): ...this new function.
985 (c_parser_declaration_or_fndef): When issuing errors about
986 missing "struct" etc, add a fixit. For other kinds of errors,
987 attempt to provide a suggestion via lookup_name_fuzzy.
988 (c_parser_parms_declarator): When looking ahead to detect typos in
989 type names, also reject CPP_KEYWORD.
990 (c_parser_parameter_declaration): When issuing errors about
991 unknown type names, attempt to provide a suggestion via
992 lookup_name_fuzzy.
993 * c-tree.h (c_keyword_starts_typename): New prototype.
994
e218d07f 9952016-06-20 Joseph Myers <joseph@codesourcery.com>
996
997 PR c/71601
998 * c-typeck.c (build_conditional_expr): Return error_mark_node if
999 c_common_type returns error_mark_node.
1000
92a44a68 10012016-06-19 Martin Sebor <msebor@redhat.com>
21897f47 1002
1003 PR c/69507
1004 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
1005 __alignof__ (expression).
1006
f0d77991 10072016-06-14 David Malcolm <dmalcolm@redhat.com>
1008
1009 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
1010
2a990300 10112016-06-14 David Malcolm <dmalcolm@redhat.com>
1012
1013 * c-typeck.c (build_component_ref): Simplify fixit code by
1014 using gcc_rich_location::add_fixit_misspelled_id.
1015 (set_init_label): Likewise.
1016
527790c1 10172016-06-13 David Malcolm <dmalcolm@redhat.com>
1018
1019 * c-parser.c (c_parser_initelt): Provide location of name for new
1020 location_t param of set_init_label.
1021 * c-tree.h (set_init_label): Add location_t param.
1022 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
1023 param and use it when issuing error messages about unrecognized
1024 field names. Attempt to provide a fixit hint if appropriate,
1025 otherwise update the error message to provide the type name.
1026
ccfa030f 10272016-06-10 Thomas Schwinge <thomas@codesourcery.com>
1028
1029 PR c/71381
1030 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
1031 Loosen checking.
1032
732905bb 10332016-06-08 Martin Sebor <msebor@redhat.com>
1034 Jakub Jelinek <jakub@redhat.com>
1035
1036 PR c++/70507
1037 PR c/68120
1038 * c-typeck.c (convert_arguments): Don't promote last argument
1039 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1040
bafc7b1d 10412016-06-08 Marek Polacek <polacek@redhat.com>
1042
1043 PR c/71418
1044 * c-decl.c (grokdeclarator): Check TYPE_P.
1045
06e590e7 1046 PR c/71426
1047 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
1048 code.
1049
7cfde92a 10502016-06-07 David Malcolm <dmalcolm@redhat.com>
1051
1052 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
1053 and structure element reference, capture the location of the
1054 element name token and pass it to build_component_ref.
1055 (c_parser_postfix_expression_after_primary): Likewise for
1056 structure element dereference.
1057 (c_parser_omp_variable_list): Likewise for
1058 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1059 * c-tree.h (build_component_ref): Add location_t param.
1060 * c-typeck.c (build_component_ref): Add location_t param
1061 COMPONENT_LOC. Use it, if available, when issuing hints about
1062 mispelled member names to provide a fixit replacement hint.
1063
61f1f80c 10642016-06-06 Marek Polacek <polacek@redhat.com>
1065
1066 PR c/71362
1067 * c-parser.c (c_parser_direct_declarator): Set location.
1068
e4b92538 10692016-06-06 Marek Polacek <polacek@redhat.com>
1070
1071 * c-typeck.c (comptypes_internal): Handle comparisons of
1072 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1073 TYPE_REF_CAN_ALIAS_ALL.
1074
2234363c 10752016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1076
1077 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1078 arguments as addressable when async clause exists.
1079
b6431756 10802016-05-30 Jakub Jelinek <jakub@redhat.com>
1081
1082 PR c++/71349
1083 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1084 when combined with target construct.
1085
6feab9ce 10862016-05-26 Jakub Jelinek <jakub@redhat.com>
1087
1088 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1089 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1090
2c995da9 10912016-05-25 Marek Polacek <polacek@redhat.com>
1092
1093 PR c/71265
1094 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1095
abfbb5b5 1096 PR c/71266
1097 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1098
6d6a3fc3 10992016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1100
1101 * c-parser.c (c_parser_oacc_declare): Add support for
1102 GOMP_MAP_FIRSTPRIVATE_POINTER.
1103 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1104 argument with enum c_omp_region_type ort.
1105 (handle_omp_array_sections): Likewise. Update call to
1106 handle_omp_array_sections_1.
1107 (c_finish_omp_clauses): Add specific errors and warning messages for
1108 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1109 call to handle_omp_array_sections.
1110
c9d624bd 11112016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1112
1113 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1114
7345b977 11152016-05-24 Richard Biener <rguenther@suse.de>
1116
1117 PR middle-end/70434
1118 PR c/69504
1119 * c-typeck.c (build_array_ref): Do not complain about indexing
1120 non-lvalue vectors. Adjust for function name change.
1121
8bdfbc08 11222016-05-20 Martin Sebor <msebor@redhat.com>
1123
1124 PR c/71115
1125 * c-typeck.c (error_init): Use
1126 expansion_point_location_if_in_system_header.
1127 (warning_init): Same.
1128
97c71d71 11292016-05-19 David Malcolm <dmalcolm@redhat.com>
1130
1131 PR c/71171
1132 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1133 in error-handling.
1134 (c_parser_postfix_expression): Likewise.
1135 * c-tree.h (c_expr::set_error): New method.
1136 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1137 that result's range is initialized.
1138
e68d7b49 11392016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1140
1141 * c-typeck.c (parser_build_unary_op): Fix formatting.
1142
624115b4 11432016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1144
1145 * c-decl.c (grokdeclarator): Remove errmsg and use of
1146 targetm.invalid_return_type.
1147 (grokparms): Remove errmsg and use of
1148 targetm.invalid_parameter_type.
1149
90c88567 11502016-05-13 Joseph Myers <joseph@codesourcery.com>
1151
1152 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1153 function return type.
1154
22a3f7bd 11552016-05-12 Marek Polacek <polacek@redhat.com>
1156
1157 PR c/70756
1158 * c-decl.c (build_compound_literal): Pass LOC down to
1159 c_incomplete_type_error.
1160 * c-tree.h (require_complete_type): Adjust declaration.
1161 (c_incomplete_type_error): Likewise.
1162 * c-typeck.c (require_complete_type): Add location parameter, pass it
1163 down to c_incomplete_type_error.
1164 (c_incomplete_type_error): Add location parameter, pass it down to
1165 error_at.
1166 (build_component_ref): Pass location down to c_incomplete_type_error.
1167 (default_conversion): Pass location down to require_complete_type.
1168 (build_array_ref): Likewise.
1169 (build_function_call_vec): Likewise.
1170 (convert_arguments): Likewise.
1171 (build_unary_op): Likewise.
1172 (build_c_cast): Likewise.
1173 (build_modify_expr): Likewise.
1174 (convert_for_assignment): Likewise.
1175 (c_finish_omp_clauses): Likewise.
1176
54c4d22e 11772016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1178
1179 PR c/43651
1180 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1181 is enabled.
1182 * c-errors.c (pedwarn_c90): Return true if warned.
1183 * c-tree.h (pedwarn_c90): Change return type to bool.
1184 (enum c_declspec_word): Add new enumerator cdw_atomic.
1185
7f8012a5 11862016-05-11 Marek Polacek <polacek@redhat.com>
1187
1188 PR c++/71024
1189 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1190 diagnose_mismatched_attributes and call it.
1191
3fa82609 11922016-05-10 Marek Polacek <polacek@redhat.com>
1193
1194 PR c/70255
1195 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1196 on a declaration following the definition.
1197
871164c4 11982016-05-05 Jakub Jelinek <jakub@redhat.com>
1199
1200 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1201 parse it through to c_parser_c99_block_statement.
1202 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1203 caller.
1204
1d52c456 12052016-05-04 Marek Polacek <polacek@redhat.com>
1206
1207 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1208 OPT_Wdangling_else.
1209
a64030fe 12102016-05-04 Marek Polacek <polacek@redhat.com>
1211
1212 PR c/48778
1213 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1214 for macro expansions.
1215
5d4db8ef 12162016-05-03 Marek Polacek <polacek@redhat.com>
1217
1218 PR c/70859
1219 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1220 check_builtin_function_arguments.
1221
0bd2fc6e 12222016-05-03 Richard Biener <rguenther@suse.de>
1223
1224 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1225 the checksum from the previous stage.
1226
b5e88f74 12272016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1228
1229 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1230 c_finish_omp_clauses.
1231 (c_parser_omp_all_clauses): Likewise.
1232 (c_parser_oacc_cache): Likewise.
1233 (c_parser_oacc_loop): Likewise.
1234 (omp_split_clauses): Likewise.
1235 (c_parser_omp_declare_target): Likewise.
1236 (c_parser_cilk_all_clauses): Likewise.
1237 (c_parser_cilk_for): Likewise.
1238 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1239 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1240
dd185f6e 12412016-05-02 Marek Polacek <polacek@redhat.com>
1242
1243 PR c/70851
1244 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1245 incomplete type.
1246
4d0a8bac 12472016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1248
1249 PR middle-end/70626
1250 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1251 OACC_LOOP_CLAUSE_MASK.
1252 (c_parser_oacc_kernels_parallel): Update call to
1253 c_oacc_split_loop_clauses.
1254
d215eeca 12552016-04-28 Andrew MacLeod <amacleod@redhat.com>
1256
1257 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1258 argument to build_modify_expr in two cases.
1259
40385231 12602016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1261
1262 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1263 warn_for_memset instead of warning directly here.
1264
fa20ebd3 12652016-04-26 Marek Polacek <polacek@redhat.com>
1266
1267 PR c/67784
1268 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1269 out of ...
1270 (c_parser_for_statement): ... here.
1271 (c_parser_if_statement): Use it.
1272 (c_parser_switch_statement): Use it.
1273 (c_parser_while_statement): Use it.
1274
9db47803 1275 PR c/70791
1276 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1277
70574e60 12782016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1279
1280 PR c++/69363
1281 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1282 instead of c_finish_cilk_clauses.
1283 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1284 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1285 floating-point variables in the linear clause for Cilk Plus.
1286
5d4b30ea 12872016-04-18 Michael Matz <matz@suse.de>
1288
1289 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1290 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1291
eac243e7 12922016-04-15 Marek Polacek <polacek@redhat.com>
1293
1294 PR c/70671
1295 * c-typeck.c (build_unary_op): Pass location down to error and
1296 warning call.
1297
b4ba8358 12982016-04-15 Jakub Jelinek <jakub@redhat.com>
1299
1300 PR c/70436
1301 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1302 where needed.
1303 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1304 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1305 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1306 Adjust c_parser_pragma callers.
1307 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1308 caller.
1309 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1310 c_parser_statement.
1311 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1312 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1313 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1314 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1315 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1316 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1317 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1318 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1319 down where needed.
1320 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1321 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1322 calls.
1323
0241e4dc 13242016-04-13 Marek Polacek <polacek@redhat.com>
1325
1326 PR c/70436
1327 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1328 adjust callers.
1329 (c_parser_statement): Likewise.
1330 (c_parser_c99_block_statement): Likewise.
1331 (c_parser_while_statement): Likewise.
1332 (c_parser_for_statement): Likewise.
1333 (c_parser_if_body): Don't set IF_P here.
1334 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1335 about dangling else here.
1336 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1337 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1338 warn about dangling else here.
1339
c4f5465d 13402016-04-04 Marek Polacek <polacek@redhat.com>
1341
1342 PR c/70307
1343 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1344
7952b661 13452016-03-31 Marek Polacek <polacek@redhat.com>
1346
1347 PR c/70297
1348 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1349
5539bc70 13502016-03-18 David Malcolm <dmalcolm@redhat.com>
1351
1352 PR c/70281
1353 * c-parser.c (c_parser_postfix_expression): Set the source range
1354 for uses of "__builtin_types_compatible_p".
1355
29a514fa 13562016-03-17 Jakub Jelinek <jakub@redhat.com>
1357
1358 PR c/70280
1359 * c-typeck.c (composite_type): Don't count void_list_node
1360 into len, if the list is terminated by void_list_node, start
1361 with void_list_node instead of NULL for newargs. Stop
1362 at void_list_node.
1363
462ca422 13642016-03-16 Marek Polacek <polacek@redhat.com>
1365
1366 PR c/70093
1367 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1368 nested functions returning VM types.
1369
27dcb7a8 13702016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1371
1372 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1373 when calling c_finish_omp_clauses.
1374
2d1d2e55 13752016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1376
1377 PR c/69824
1378 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1379 for later.
1380
6560d1ad 13812016-03-04 Marek Polacek <polacek@redhat.com>
1382
1383 PR c/69798
1384 * c-parser.c (c_parser_postfix_expression): Call
1385 c_parser_cast_expression rather than c_parser_postfix_expression.
1386
40e9ce2d 13872016-03-01 Jakub Jelinek <jakub@redhat.com>
1388
1389 PR c/69796
1390 PR c/69974
1391 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1392 of incomplete decls to error_mark_node.
1393
f0ea75d1 13942016-02-24 Marek Polacek <polacek@redhat.com>
1395
1396 PR c/69819
1397 * c-decl.c (finish_decl): Don't update the copy of the type of a
1398 different decl type.
1399
d41ab738 14002016-02-23 Jakub Jelinek <jakub@redhat.com>
1401
1402 PR objc/69844
1403 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1404 in id_kind reclassification.
1405
7675e968 14062016-02-16 Jakub Jelinek <jakub@redhat.com>
1407
1408 PR c/69835
1409 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1410
28072426 14112016-02-16 James Norris <jnorris@codesourcery.com>
1412
1413 PR c/64748
1414 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1415
74a4140f 14162016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1417
7c25ed5c 1418 * c-decl.c (build_null_declspecs): Zero the entire struct.
1419
74a4140f 1420 PR c/69522
1421 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1422 callers changed. If nested_p is true, use it to call
1423 finish_implicit_inits.
1424 * c-tree.h (finish_implicit_inits): Declare.
1425 * c-typeck.c (finish_implicit_inits): New function. Move code
1426 from ...
1427 (push_init_level): ... here.
1428 (set_designator, process_init_element): Call finish_implicit_inits.
1429
40b38ace 14302016-02-11 Jakub Jelinek <jakub@redhat.com>
1431
1432 PR c/69768
1433 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1434 arguments for -Waddress warning.
1435
6b098e91 14362016-02-04 Jakub Jelinek <jakub@redhat.com>
1437
1438 PR c/69669
1439 * c-decl.c (finish_enum): When honoring mode attribute,
1440 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1441
ff5e28e9 14422016-01-29 Jakub Jelinek <jakub@redhat.com>
1443
1444 PR debug/69518
1445 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1446 all type variants, not just TYPE_MAIN_VARIANT.
1447
78e516eb 14482016-01-27 Jakub Jelinek <jakub@redhat.com>
1449
1450 PR debug/66869
1451 * c-decl.c (c_write_global_declarations_1): Warn with
1452 warn_unused_function if static prototype without definition
1453 is not C_DECL_USED.
1454
fee5e491 14552016-01-27 Marek Polacek <polacek@redhat.com>
1456
1457 PR c/68062
1458 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1459 to unsigned, if needed. Add -Wsign-compare warning.
1460
9bbfd060 14612016-01-26 Jakub Jelinek <jakub@redhat.com>
1462
1463 PR tree-optimization/69483
1464 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1465
6ebc6587 14662016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16d4186f 1467
1468 PR c/24293
1469 * c-tree.h (incomplete_record_decls): Declare.
1470 * c-parser.c (incomplete_record_decls): Define.
1471 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1472 report error if any decl has zero size.
1473 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1474 or enum type to incomplete_record_decls.
1475
4c39e3a5 14762016-01-14 Tom de Vries <tom@codesourcery.com>
1477
1478 PR tree-optimization/68773
1479 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1480 set force_output.
1481
77f35cec 14822016-01-14 Marek Polacek <polacek@redhat.com>
1483
1484 PR c/69262
1485 * c-decl.c (grokdeclarator): Provide more information for invalid
1486 array declarations.
1487
d74214f3 14882016-01-06 David Malcolm <dmalcolm@redhat.com>
1489
1490 * c-parser.c (c_parser_unary_expression): For dereferences, build
1491 a combined location before calling build_indirect_ref, so that
1492 error reports cover the full range, manually updating the c_expr
1493 src_range.
1494
be3c9981 14952016-01-06 Marek Polacek <polacek@redhat.com>
1496
1497 PR sanitizer/69099
1498 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1499 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1500 NULL.
1501
f1717362 15022016-01-04 Jakub Jelinek <jakub@redhat.com>
1503
1504 Update copyright years.
1505
d7d6a3ab 15062016-01-04 Marek Polacek <polacek@redhat.com>
1507
1508 PR c/68908
1509 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1510 optimization to use __atomic_fetch_* built-in if possible.
1511
9d5fd7c6 15122015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1513
1514 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1515 into...
1516 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1517 all users.
1518
37e2d32f 15192015-12-22 Marek Polacek <polacek@redhat.com>
1520
1521 PR c/69002
1522 * c-typeck.c (build_component_ref): Warn when acessing elements of
1523 atomic structures or unions.
1524
c0bf500c 15252015-12-21 David Malcolm <dmalcolm@redhat.com>
1526
1527 * c-typeck.c: Include "gcc-rich-location.h".
1528 (build_binary_op): In the two places that call binary_op_error,
1529 create a gcc_rich_location and populate it with the location of
1530 the binary op and its two operands.
1531
b9f9586a 15322015-12-16 David Malcolm <dmalcolm@redhat.com>
1533
1534 * c-parser.c (c_parser_statement_after_labels): When calling
1535 c_finish_return, Use the return expression's location if it has
1536 one, falling back to the location of the first token within it.
1537 * c-typeck.c (c_finish_return): When issuing warnings about
1538 the incorrect presence/absence of a return value, issue a note
1539 showing the declaration of the function.
1540
dbd79382 15412015-12-16 David Malcolm <dmalcolm@redhat.com>
1542
1543 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1544 to 4.
1545 (c_parser_peek_nth_token): New function.
1546 (c_parser_peek_conflict_marker): New function.
1547 (c_parser_error): Detect conflict markers and report them as such.
1548
e2093e02 15492015-12-16 David Malcolm <dmalcolm@redhat.com>
1550
1551 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1552 to preserve range information for the primary expression
1553 in the call to c_parser_postfix_expression_after_primary.
1554
b49f1fbb 15552015-12-16 David Malcolm <dmalcolm@redhat.com>
1556
1557 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1558 expression location, falling back on the first token location,
1559 rather than always using the latter.
1560
1d65bac2 15612015-12-16 Marek Polacek <polacek@redhat.com>
1562
1563 PR c/64637
1564 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1565 available.
1566
75e722a6 15672015-12-15 Marek Polacek <polacek@redhat.com>
1568
1569 PR c/68907
1570 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1571 artificial decl.
1572
7063d45b 15732015-12-08 David Malcolm <dmalcolm@redhat.com>
1574
1575 * c-parser.c (c_parser_alignof_expression): Capture location of
1576 closing parenthesis (if any), or of end of unary expression, and
1577 use it to build a src_range for the expression.
1578
f73b4782 15792015-12-08 David Malcolm <dmalcolm@redhat.com>
1580
1581 PR c/68757
1582 * c-parser.c (c_parser_get_builtin_args): Add
1583 "out_close_paren_loc" param, and write back to it.
1584 (c_parser_postfix_expression): Capture the closing
1585 parenthesis location for RID_CHOOSE_EXPR,
1586 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1587 RID_BUILTIN_SHUFFLE and use it to set the source range
1588 for such expressions; within RID_BUILTIN_COMPLEX set
1589 the underlying location.
1590
1b062945 15912015-12-07 Marek Polacek <polacek@redhat.com>
1592
1593 PR c/68668
1594 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1595 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1596
a4ab54ac 15972015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1598
1599 * c-tree.h (c_build_va_arg): Adjust prototype.
1600 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1601 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1602 parameter, adjust throughout and issue an error if EXPR is a component
1603 with reverse storage order.
1604
da562e32 16052015-12-02 Jason Merrill <jason@redhat.com>
1606
1607 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1608 (c_fully_fold_internal, decl_constant_value_for_optimization):
1609 Move from c-common.c.
1610 * c-tree.h: Declare decl_constant_value_for_optimization.
1611 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1612
89f16034 16132015-12-02 Joseph Myers <joseph@codesourcery.com>
1614
1615 PR c/68162
1616 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1617 following link from declarator to next declarator. Track original
1618 qualified type and pass it to c_build_qualified_type.
1619 * c-typeck.c (c_build_qualified_type): Add arguments
1620 orig_qual_type and orig_qual_indirect.
1621
2a7545d5 16222015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1623
1624 * c-parser.c (c_parser_omp_clause_name)
1625 (c_parser_oacc_all_clauses): Alphabetical sorting.
1626
ad80582d 16272015-12-02 Jakub Jelinek <jakub@redhat.com>
1628
1629 PR c/68533
1630 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1631 for diagnostics.
1632
571b3486 16332015-12-01 Julian Brown <julian@codesourcery.com>
1634 Cesar Philippidis <cesar@codesourcery.com>
1635 James Norris <James_Norris@mentor.com>
1636
1637 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1638 (c_parser_oacc_clause_use_device): New function.
1639 (c_parser_oacc_all_clauses): Add use_device support.
1640 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1641 (c_parser_oacc_host_data): New function.
1642 (c_parser_omp_construct): Add host_data support.
1643 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1644 * c-typeck.c (c_finish_oacc_host_data): New function.
1645 (c_finish_omp_clauses): Add use_device support.
1646
c4848393 16472015-11-29 Jan Hubicka <hubicka@ucw.cz>
1648
1649 PR c/67106
1650 * c-decl.c: Set TYPE_PACKED in variants.
1651
d4e328e9 16522015-11-27 Martin Liska <mliska@suse.cz>
1653
1654 PR c++/68312
1655 * c-array-notation.c (fix_builtin_array_notation_fn):
1656 Use release_vec_vec instead of vec::release.
1657 (build_array_notation_expr): Likewise.
1658 (fix_conditional_array_notations_1): Likewise.
1659 (fix_array_notation_expr): Likewise.
1660 (fix_array_notation_call_expr): Likewise.
1661
c5e4f591 16622015-11-27 Jakub Jelinek <jakub@redhat.com>
1663
1664 PR c/63326
1665 * c-parser.c (c_parser_compound_statement_nostart): If
1666 last_label is true, use pragma_stmt instead of pragma_compound
1667 as second c_parser_pragma argument.
1668 (c_parser_omp_ordered, c_parser_omp_target_update,
1669 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1670 false as second argument to c_parser_skip_to_pragma_eol after
1671 diagnosing standalone directives used in pragma_stmt context.
1672
c954a5bd 16732015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1674
1675 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1676 with "if (ENABLE_OFFLOADING)".
1677
daebf4f3 16782015-11-23 David Malcolm <dmalcolm@redhat.com>
1679
1680 PR objc/68438
1681 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1682 for various Objective-C constructs: Class.name syntax,
1683 @selector(), @protocol(), @encode(), and [] message syntax.
1684
734caf84 16852015-11-20 David Malcolm <dmalcolm@redhat.com>
1686
1687 PR 62314
1688 * c-typeck.c (should_suggest_deref_p): New function.
1689 (build_component_ref): Special-case POINTER_TYPE when
1690 generating a "not a structure of union" error message, and
1691 suggest a "->" rather than a ".", providing a fix-it hint.
1692
11d8dd6f 16932015-11-19 David Malcolm <dmalcolm@redhat.com>
1694
1695 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1696 candidate into a new function, find_closest_identifier.
1697
62efaf6b 16982015-11-19 Marek Polacek <polacek@redhat.com>
1699
1700 PR c/68412
1701 * c-typeck.c (parser_build_binary_op): Properly handle
1702 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1703
9dfffd6d 17042015-11-17 David Malcolm <dmalcolm@redhat.com>
1705
1706 * c-parser.c (set_c_expr_source_range): Bulletproof both
1707 overloaded implementations against NULL expr->value.
1708 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1709 values.
1710 (c_parser_unary_expression): Likewise when handling addresses of
1711 labels.
1712 (c_parser_postfix_expression): Likewise for statement expressions,
1713 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1714 __builtin_va_arg, and for __builtin_offset_of.
1715 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1716 src_range using the range of the braced initializer.
1717 (c_parser_transaction_expression): Set src_range for "ret" to a
1718 sane pair of values.
1719
c58a4cfd 17202015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1721
1722 * c-parser.c (c_finish_omp_declare_simd): Look for
1723 "simd" attribute as well. Update error message.
1724
5f3001a9 17252015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1726
1727 * c-parser.c (c_parser_omp_declare_target): Adjust.
1728
a9833286 17292015-11-14 Jakub Jelinek <jakub@redhat.com>
1730
1731 * c-typeck.c (c_finish_omp_clauses): Don't mark
1732 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1733
ef61516b 17342015-11-14 Marek Polacek <polacek@redhat.com>
1735
1736 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1737 * c-typeck.c: Likewise.
1738
a96cefb2 17392015-11-13 David Malcolm <dmalcolm@redhat.com>
1740
1741 * c-decl.c (warn_defaults_to): Pass line_table to
1742 rich_location ctor.
1743 * c-errors.c (pedwarn_c99): Likewise.
1744 (pedwarn_c90): Likewise.
1745 * c-parser.c (set_c_expr_source_range): New functions.
1746 (c_token::get_range): New method.
1747 (c_token::get_finish): New method.
1748 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1749 based on the range from the start of the LHS to the end of the
1750 RHS.
1751 (c_parser_conditional_expression): Likewise, based on the range
1752 from the start of the cond.value to the end of exp2.value.
1753 (c_parser_binary_expression): Call set_c_expr_source_range on
1754 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1755 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1756 based on the cast_loc through to the end of the expr.
1757 (c_parser_unary_expression): Likewise, based on the
1758 op_loc through to the end of op.
1759 (c_parser_sizeof_expression) Likewise, based on the start of the
1760 sizeof token through to either the closing paren or the end of
1761 expr.
1762 (c_parser_postfix_expression): Likewise, using the token range,
1763 or from the open paren through to the close paren for
1764 parenthesized expressions.
1765 (c_parser_postfix_expression_after_primary): Likewise, for
1766 various kinds of expression.
1767 * c-tree.h (struct c_expr): Add field "src_range".
1768 (c_expr::get_start): New method.
1769 (c_expr::get_finish): New method.
1770 (set_c_expr_source_range): New decls.
1771 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1772 on ret for prefix unary ops.
1773 (parser_build_binary_op): Likewise, running from the start of
1774 arg1.value through to the end of arg2.value.
1775
7a810b2f 17762015-11-13 Marek Polacek <polacek@redhat.com>
1777
1778 PR c/68320
1779 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1780
b67f0560 17812015-11-13 David Malcolm <dmalcolm@redhat.com>
1782
1783 * c-typeck.c: Include spellcheck.h.
1784 (lookup_field_fuzzy_find_candidates): New function.
1785 (lookup_field_fuzzy): New function.
1786 (build_component_ref): If the field was not found, try using
1787 lookup_field_fuzzy and potentially offer a suggestion.
1788
2fc5e987 17892015-11-12 James Norris <jnorris@codesourcery.com>
1790 Joseph Myers <joseph@codesourcery.com>
1791
1792 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1793 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1794 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1795 and PRAGMA_OMP_CLAUSE_LINK.
1796 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1797 and PRAGMA_OACC_CLAUSE_LINK.
1798 (OACC_DECLARE_CLAUSE_MASK): New definition.
1799 (c_parser_oacc_declare): New function.
1800
28a70e29 18012015-11-12 Marek Polacek <polacek@redhat.com>
1802
1803 PR c/67784
1804 * c-parser.c (c_parser_for_statement): Reclassify the token in
1805 a correct scope.
1806
81b1b2a8 18072015-11-11 Marek Polacek <polacek@redhat.com>
1808
1809 PR c/68107
1810 PR c++/68266
1811 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1812 checking the size of an array.
1813
6e803544 18142015-11-11 Andrew MacLeod <amacleod@redhat.com>
1815
1816 * c-array-notation.c: Remove unused header files.
1817 * c-aux-info.c: Likewise.
1818 * c-convert.c: Likewise.
1819 * c-decl.c: Likewise.
1820 * c-errors.c: Likewise.
1821 * c-lang.c: Likewise.
1822 * c-objc-common.c: Likewise.
1823 * c-parser.c: Likewise.
1824 * c-typeck.c: Likewise.
1825 * gccspec.c: Likewise.
1826
a1b7fe4b 18272015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1828 Cesar Philippidis <cesar@codesourcery.com>
1829 James Norris <jnorris@codesourcery.com>
1830 Julian Brown <julian@codesourcery.com>
1831 Nathan Sidwell <nathan@codesourcery.com>
1832
1833 c/
1834 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1835 routine arg.
1836 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1837 (c_parser_pragma): Parse 'acc routine'.
1838 (OACC_ROUTINE_CLAUSE_MARK): Define.
1839 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1840
7758d608 18412015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1842
1843 PR debug/67192
1844 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1845 location of the backward-goto to the start of the loop body.
1846
c2bf2fb2 18472015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1848
1849 PR debug/67192
1850 * c-parser.c (c_parser_while_statement): Finish the loop before
1851 parsing ahead for misleading indentation.
1852 (c_parser_for_statement): Likewise.
1853
292237f3 18542015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1855
1856 * c-decl.c (finish_struct): If the structure has reverse storage
1857 order, rewrite the type of array fields with scalar component. Call
1858 maybe_apply_pragma_scalar_storage_order on entry.
1859 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1860 errors on bit-fields and reverse SSO here and not...
1861 (c_mark_addressable): ...here.
1862 (output_init_element): Adjust call to initializer_constant_valid_p.
1863 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1864
f0479000 18652015-11-06 David Malcolm <dmalcolm@redhat.com>
1866
1867 * c-decl.c (warn_defaults_to): Update for change in signature
1868 of diagnostic_set_info.
1869 * c-errors.c (pedwarn_c99): Likewise.
1870 (pedwarn_c90): Likewise.
1871 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1872 for textinfo::set_location.
1873
ef014f95 18742015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1875 Thomas Schwinge <thomas@codesourcery.com>
1876 James Norris <jnorris@codesourcery.com>
1877
1878 * c-parser.c (c_parser_omp_clause_name): Add support for
1879 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1880 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1881 default(none) in OpenACC.
1882 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1883 arguments.
1884 (c_parser_oacc_clause_tile): New function.
1885 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1886 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1887 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1888 TILE}.
1889 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1890 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1891 FIRSTPRIVATE}.
1892 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1893 (c_parser_oacc_update): Update the error message for missing clauses.
1894 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1895 and OMP_CLAUSE_INDEPENDENT.
1896
f480ca9a 18972015-11-05 Marek Polacek <polacek@redhat.com>
1898
1899 PR c/68090
1900 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1901 deal with pre-evaluation on invalid types.
1902
9561765e 19032015-11-05 Jakub Jelinek <jakub@redhat.com>
1904 Ilya Verbin <ilya.verbin@intel.com>
1905
1906 * c-parser.c: Include context.h and gimple-expr.h.
1907 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1908 monotonic together with nonmonotonic.
1909 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1910 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1911 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1912 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1913 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1914 expressions on combined target teams before the target.
1915 (c_parser_omp_declare_target): If decl has "omp declare target" or
1916 "omp declare target link" attribute, and cgraph or varpool node already
1917 exists, then set corresponding flags. Call c_finish_omp_clauses
1918 in the parenthesized extended-list syntax case.
1919 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1920 declare target.
1921 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1922 on OMP_CLAUSE_REDUCTION array sections.
1923 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1924 into the constant offset, or for variable low-bound using
1925 POINTER_PLUS_EXPR. For structure element based array sections use
1926 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1927 (c_finish_omp_clauses): Drop generic_field_head, structure
1928 elements are now always mapped even as array section bases,
1929 diagnose same var in data sharing and mapping clauses. Diagnose if
1930 linear step on declare simd is neither a constant nor a uniform
1931 parameter. Look through POINTER_PLUS_EXPR for array section
1932 reductions. Diagnose the same var or function appearing multiple
1933 times on the same directive. Fix up wording for the to clause if t
1934 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1935 modifier on kinds other than dynamic or guided or nonmonotonic
1936 modifier together with ordered clause.
1937
9e10bfb7 19382015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1939 Chung-Lin Tang <cltang@codesourcery.com>
1940
1941 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1942
4cba6f60 19432015-10-29 Andrew MacLeod <amacleod@redhat.com>
1944
1945 * c-array-notation.c: Reorder #include's and remove duplicates.
1946 * c-aux-info.c: Likewise.
1947 * c-convert.c: Likewise.
1948 * c-decl.c: Likewise.
1949 * c-errors.c: Likewise.
1950 * c-lang.c: Likewise.
1951 * c-objc-common.c: Likewise.
1952 * c-parser.c: Likewise.
1953 * c-typeck.c: Likewise.
1954
7b15d957 19552015-10-26 Jim Wilson <jim.wilson@linaro.org>
1956
1957 PR debug/66068
1958 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1959 after calling build_qualified_type.
1960
62c48328 19612015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1962 Thomas Schwinge <thomas@codesourcery.com>
1963 James Norris <jnorris@codesourcery.com>
1964 Joseph Myers <joseph@codesourcery.com>
1965 Julian Brown <julian@codesourcery.com>
1966 Bernd Schmidt <bschmidt@redhat.com>
1967
1968 * c-parser.c (c_parser_oacc_shape_clause): New.
1969 (c_parser_oacc_simple_clause): New.
1970 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1971 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1972
2c4c8725 19732015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1974 James Norris <jnorris@codesourcery.com>
1975 Cesar Philippidis <cesar@codesourcery.com>
1976
1977 PR c/64765
1978 PR c/64880
1979 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1980 parameters, and handle these. Adjust all users.
1981 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1982 into...
1983 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1984 all users.
1985 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1986 declare functions.
1987 (c_finish_omp_construct): Declare function.
1988 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1989 Merge functions into...
1990 (c_finish_omp_construct): ... this new function.
1991
844cece0 19922015-10-22 Richard Biener <rguenther@suse.de>
1993
1994 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1995 before folding a MINUS_EXPR.
1996
5ce1b137 19972015-10-21 Marek Polacek <polacek@redhat.com>
1998
1999 PR c/68024
2000 * c-decl.c (start_function): Warn about vararg functions without
2001 a prototype.
2002
1f137e6d 20032015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
2004
2005 * c-typeck.c (build_conditional_expr): Use boolean vector
2006 type for vector comparison.
2007 (build_vec_cmp): New.
2008 (build_binary_op): Use build_vec_cmp for comparison.
2009
8523243e 20102015-10-20 Marek Polacek <polacek@redhat.com>
2011
2012 * c-parser.c (is_cilkplus_vector_p): Don't define here.
2013
3f73be3e 20142015-10-20 Marek Polacek <polacek@redhat.com>
2015
2016 PR c/67964
2017 * c-parser.c (c_parser_attributes): Break out of the loop if the
2018 token after an attribute isn't a comma.
2019
43895be5 20202015-10-13 Jakub Jelinek <jakub@redhat.com>
2021 Aldy Hernandez <aldyh@redhat.com>
2022
2023 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
2024 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
2025 (c_parser_omp_variable_list): Handle structure elements for
2026 map, to and from clauses. Handle array sections in reduction
2027 clause. Formatting fixes.
2028 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
2029 if clause modifiers.
2030 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
2031 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
2032 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
2033 c_parser_omp_clause_is_device_ptr): New functions.
2034 (c_parser_omp_clause_ordered): Parse optional parameter.
2035 (c_parser_omp_clause_reduction): Handle array reductions.
2036 (c_parser_omp_clause_schedule): Parse optional simd modifier.
2037 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
2038 functions.
2039 (c_parser_omp_clause_linear): Parse linear clause modifiers.
2040 (c_parser_omp_clause_depend_sink): New function.
2041 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
2042 (c_parser_omp_clause_map): Parse release/delete map kinds and
2043 optional always modifier.
2044 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
2045 and c_finish_omp_clauses callers.
2046 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
2047 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
2048 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
2049 (OMP_CRITICAL_CLAUSE_MASK): Define.
2050 (c_parser_omp_critical): Parse critical clauses.
2051 (c_parser_omp_for_loop): Handle doacross loops, adjust
2052 c_finish_omp_for and c_finish_omp_clauses callers.
2053 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
2054 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
2055 (OMP_FOR_CLAUSE_MASK): Add linear clause.
2056 (c_parser_omp_for): Disallow ordered clause when combined with
2057 distribute. Disallow linear clause when combined with distribute
2058 and not combined with simd.
2059 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2060 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2061 parse clauses and if depend clause is found, don't parse a body.
2062 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2063 Allow target parallel without for after it.
2064 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2065 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2066 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2067 invalid kinds.
2068 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2069 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2070 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2071 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2072 functions.
2073 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2074 defaultmap and is_device_ptr clauses.
2075 (c_parser_omp_target): Parse target parallel and target simd. Set
2076 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2077 and target exit data. Diagnose invalid map kinds.
2078 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2079 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2080 construct.
2081 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2082 &omp_priv.
2083 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2084 (c_parser_omp_taskloop): New function.
2085 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2086 handle PRAGMA_OMP_TASKLOOP.
2087 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2088 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2089 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2090 Add IS_OMP argument, handle structure element bases, diagnose
2091 bitfields, pass IS_OMP recursively, diagnose known zero length
2092 array sections in depend clauses, handle array sections in reduction
2093 clause, diagnose negative length even for pointers.
2094 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2095 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2096 array sections in reduction clause, set
2097 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2098 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2099 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2100 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2101
789fbb51 21022015-10-06 Marek Polacek <polacek@redhat.com>
2103
2104 * c-parser.c (c_parser_statement_after_labels): Use
2105 protected_set_expr_location.
2106 (c_parser_omp_clause_num_gangs): Likewise.
2107 (c_parser_omp_clause_num_threads): Likewise.
2108 (c_parser_omp_clause_num_workers): Likewise.
2109 (c_parser_omp_clause_vector_length): Likewise.
2110 (c_parser_omp_clause_num_teams): Likewise.
2111 (c_parser_omp_clause_thread_limit): Likewise.
2112 * c-typeck.c (build_c_cast): Likewise.
2113 (c_cast_expr): Likewise.
2114
20cb53c9 21152015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2116
2117 * c-typeck.c (c_tree_equal): Use real_equal instead of
2118 REAL_VALUES_EQUAL.
2119
6d02e6b2 21202015-10-04 Jason Merrill <jason@redhat.com>
2121
2122 * c-parser.c (c_lex_one_token): Handle @synchronized.
2123 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2124 can change whether the function is transaction_safe.
2125
802c32cd 21262015-10-02 Marek Polacek <polacek@redhat.com>
2127
2128 PR c/67730
2129 * c-typeck.c (convert_for_assignment): Use the expansion point
2130 location throughout.
2131
ef17a71a 21322015-10-02 Marek Polacek <polacek@redhat.com>
2133
2134 PR c/64249
2135 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2136 and pass it down to c_parser_if_statement.
2137 (c_parser_else_body): Add CHAIN parameter and pass it down to
2138 c_parser_statement_after_labels.
2139 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2140 duplicated if-else-if conditions.
2141
7e93eb1a 21422015-10-01 Marek Polacek <polacek@redhat.com>
2143
2144 * c-typeck.c (convert_for_assignment): Improve commentary.
2145
ab4c803c 21462015-09-30 Marek Polacek <polacek@redhat.com>
2147
2148 PR c/67730
2149 * c-typeck.c (c_finish_return): Use the expansion point location for
2150 certain "return with value" warnings.
2151
ed536208 21522015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2153
2154 * c-parser.c (pragma_lex): Add loc argument.
2155
03e8b174 21562015-09-15 Marek Polacek <polacek@redhat.com>
2157
2158 PR c/67580
2159 * c-decl.c (tag_exists_p): New function.
2160 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2161 struct/union/enum keywords are missing.
2162 * c-tree.h (tag_exists_p): Declare.
2163
a39b4dc0 21642015-09-15 Marek Polacek <polacek@redhat.com>
2165
2166 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2167 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2168 Return NULL_TREE instead of 0.
2169 (lookup_name): Return NULL_TREE instead of 0.
2170 (lookup_name_in_scope): Likewise.
2171 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2172 (parser_xref_tag): Use false instead of 0.
2173 (start_struct): Use true instead of 1.
2174 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2175
85f5e2ee 21762015-09-14 Marek Polacek <polacek@redhat.com>
2177
2178 * c-typeck.c (set_nonincremental_init_from_string): Use
2179 HOST_WIDE_INT_M1U when shifting a negative value.
2180
739237d5 21812015-09-09 Mark Wielaard <mjw@redhat.com>
2182
2183 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2184 parm against NULL.
2185
d2b2788c 21862015-09-10 Jakub Jelinek <jakub@redhat.com>
2187
2188 PR c/67502
2189 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2190 into OMP_FOR_PRE_BODY rather than before the loop.
2191
deef87db 21922015-09-09 Jakub Jelinek <jakub@redhat.com>
2193
c43f93d7 2194 PR c/67501
2195 * c-parser.c (c_parser_oacc_all_clauses,
2196 c_parser_omp_all_clauses): Remove invalid clause from
2197 list of clauses even if parser->error is set.
2198
0fdcfb93 2199 PR c/67500
2200 * c-parser.c (c_parser_omp_clause_aligned,
2201 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2202 test for errors.
2203 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2204 error_mark_node.
2205
deef87db 2206 PR c/67495
2207 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2208 instead of c_parser_unary_expression. If the result is !lvalue_p,
2209 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2210
e96292e9 22112015-09-04 Marek Polacek <polacek@redhat.com>
2212
2213 PR sanitizer/67279
2214 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2215
547c6b1f 22162015-09-03 Martin Sebor <msebor@redhat.com>
2217
2218 PR c/66516
6ccd7236 2219 * c-typeck.c (convert_arguments, parser_build_unary_op,
2220 build_conditional_expr, c_cast_expr, convert_for_assignment,
2221 build_binary_op, _objc_common_truthvalue_conversion): Call
547c6b1f 2222 reject_gcc_builtin.
2223 (c_decl_implicit): Define.
2224
bd66724c 22252015-09-02 Marek Polacek <polacek@redhat.com>
2226
2227 PR c/67432
2228 * c-parser.c (c_parser_enum_specifier): Give a better error for
2229 an empty enum.
2230
6dc50383 22312015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2232
2233 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2234
7ad1d78d 22352015-08-12 Marek Polacek <polacek@redhat.com>
2236
2237 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2238 LOC to it.
2239
c9099388 22402015-08-03 Marek Polacek <polacek@redhat.com>
2241
2242 PR c/67088
2243 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2244 Use it.
2245 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2246
9255be07 22472015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2248
2249 * c-parser.c (c_parser_if_body): Take token_indent_info
2250 argument. Call warn_for_misleading_indentation even when the
2251 body is a semicolon. Extract token_indent_infos corresponding
2252 to the guard, body and next tokens. Adjust call to
2253 warn_for_misleading_indentation accordingly.
2254 (c_parser_else_body): Likewise.
2255 (c_parser_if_statement): Likewise.
2256 (c_parser_while_statement): Likewise.
2257 (c_parser_for_statement): Likewise.
2258
dbbd4c6d 22592015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2260 Manuel López-Ibáñez <manu@gcc.gnu.org>
2261
2262 * c-decl.c (get_parm_info): Remove static var. Update warning
2263 message.
2264
6784a472 22652015-07-27 Marek Polacek <polacek@redhat.com>
2266
2267 PR c++/66555
2268 PR c/54979
2269 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2270
8d669e79 22712015-07-20 Marek Polacek <polacek@redhat.com>
2272
2273 PR c++/55095
2274 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2275 (build_binary_op): Warn about left shift overflows.
2276
1eacc14a 22772015-07-09 Andrew MacLeod <amacleod@redhat.com>
2278
2279 * c-array-notation.c: Adjust includes for flags.h changes.
2280 * c-objc-common.c: Likewise.
2281
9ef16211 22822015-07-07 Andrew MacLeod <amacleod@redhat.com>
2283
2284 * c-array-notation.c: Adjust includes.
2285 * c-aux-info.c: Likewise.
2286 * c-convert.c: Likewise.
2287 * c-decl.c: Likewise.
2288 * c-errors.c: Likewise.
2289 * c-lang.c: Likewise.
2290 * c-objc-common.c: Likewise.
2291 * c-parser.c: Likewise.
2292 * c-typeck.c: Likewise.
2293
0949f227 22942015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2295
2296 PR fortran/66605
2297 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2298
be23b16f 22992015-06-29 Marek Polacek <polacek@redhat.com>
2300
2301 PR c/66322
2302 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2303 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2304 about -Wswitch-bool here.
2305 (do_case): Update c_add_case_label call.
2306 (c_finish_case): Update c_do_switch_warnings call.
2307
6290f0db 23082015-06-27 Marek Polacek <polacek@redhat.com>
2309
2310 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2311
aa3e402e 23122015-06-26 Marek Polacek <polacek@redhat.com>
2313
2314 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2315 INDIRECT_REF_P.
2316 * c-typeck.c (array_to_pointer_conversion): Likewise.
2317 (build_unary_op): Likewise.
2318 (c_finish_return): Likewise.
2319
ec2e0095 23202015-06-25 Andrew MacLeod <amacleod@redhat.com>
2321
2322 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2323 * c-parser.c: Likewise.
2324
770ff93b 23252015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2326
2327 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2328 instead of pointer_hash.
2329 (detect_field_duplicates): Likewise.
2330
f48c7f4a 23312015-06-25 Marek Polacek <polacek@redhat.com>
2332
2333 * c-array-notation.c: Use VAR_P throughout.
2334 * c-decl.c: Likewise.
2335 * c-objc-common.c: Likewise.
2336 * c-parser.c: Likewise.
2337 * c-typeck.c: Likewise.
2338
ce41e81a 23392015-06-25 Marek Polacek <polacek@redhat.com>
2340
2341 * c-decl.c: Use is_global_var throughout.
2342 * c-parser.c: Likewise.
2343 * c-typeck.c: Likewise.
2344
f2ab3bac 23452015-06-17 Andrew MacLeod <amacleod@redhat.com>
2346
2347 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2348 * c-aux-info.c: Likewise.
2349 * c-convert.c: Likewise.
2350 * c-decl.c: Likewise.
2351 * c-errors.c: Likewise.
2352 * c-lang.c: Likewise.
2353 * c-objc-common.c: Likewise.
2354 * c-parser.c: Likewise.
2355 * c-typeck.c: Likewise.
2356
647730ab 23572015-06-11 Jan Hubicka <hubicka@ucw.cz>
2358
2359 PR middle-end/66325
2360 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2361 variants.
2362
dd4b0a0d 23632015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2364
2365 * c-decl.c (pop_scope): Register the main translation unit
2366 through the new debug hook.
2367
64486212 23682015-06-08 Andrew MacLeod <amacleod@redhat.com>
2369
2370 * c-array-notation.c : Adjust include files.
2371 * c-aux-info.c : Likewise.
2372 * c-convert.c : Likewise.
2373 * c-decl.c : Likewise.
2374 * c-errors.c : Likewise.
2375 * c-lang.c : Likewise.
2376 * c-lang.h : Likewise.
2377 * c-objc-common.c : Likewise.
2378 * c-parser.c : Likewise.
2379 * c-typeck.c : Likewise.
2380
3a1c9df2 23812015-06-05 Aldy Hernandez <aldyh@redhat.com>
2382
2383 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2384 immediately clobber it.
2385 (c_write_global_declarations_1): Remove call to
2386 check_global_declaration_1.
2387 (c_write_global_declarations_2): Remove.
2388 (c_write_final_cleanups): Rename from c_write_global_declarations.
2389 Remove call to finalize_compilation_unit.
2390 Remove calls to debugging hooks.
2391 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2392 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2393 * c-tree.h: Remove c_write_global_declarations.
2394
f77c0292 23952015-06-04 Andrew MacLeod <amacleod@redhat.com>
2396
2397 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2398 * c-aux-info.c: Likewise.
2399 * c-convert.c: Likewise.
2400 * c-decl.c: Likewise.
2401 * c-errors.c: Likewise.
2402 * c-lang.c: Likewise.
2403 * c-objc-common.c: Likewise.
2404 * c-parser.c: Likewise.
2405 * c-typeck.c: Likewise.
2406
b44134dc 24072015-06-04 Marek Polacek <polacek@redhat.com>
2408
2409 PR c/66341
2410 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2411 it is a lvalue.
2412
d1df0bfc 24132015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2414
2415 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2416 Warn for empty struct.
2417 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2418
f8363c5d 24192015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2420
2421 * c-decl.c (start_function): Call plugin before parsing.
2422 (finish_function): Call plugin after parsing.
2423
5b9761f5 24242015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2425
2426 PR c/49551
2427 * c-decl.c (merge_decls): Merge DECL_COMMON.
2428
eeec71b4 24292015-05-22 Jim Wilson <jim.wilson@linaro.org>
2430
2431 * Make-lang.in (check_gcc_pallelize): Define.
2432
5a4c69dd 24332015-05-22 Marek Polacek <polacek@redhat.com>
2434
2435 PR c/47043
2436 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2437 attributes.
2438
5650b4ff 24392015-05-21 Marek Polacek <polacek@redhat.com>
2440
2441 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2442 DECL_BUILT_IN.
2443
b443c459 24442015-05-20 Marek Polacek <polacek@redhat.com>
2445
2446 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2447 * c-typeck.c: Likewise.
2448
9e73638f 24492015-05-19 Marek Polacek <polacek@redhat.com>
2450
2451 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2452
d7729e26 24532015-05-19 Jakub Jelinek <jakub@redhat.com>
2454
2455 PR middle-end/66199
2456 * c-parser.c (c_parser_omp_for_loop): Don't add
2457 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2458 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2459 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2460 constructs.
2461
dfcf26a5 24622015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2463
2464 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
9e73638f 2465 swaps.
dfcf26a5 2466
09172322 24672015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2468
2469 PR fortran/44054
2470 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2471 accessor function.
2472
aac24642 24732015-05-14 Marek Polacek <polacek@redhat.com>
2474
2475 PR c/66066
2476 PR c/66127
2477 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2478 rather than with 0.
2479
e5f01cba 24802015-05-12 David Malcolm <dmalcolm@redhat.com>
2481
2482 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2483 to add a call to warn_for_misleading_indentation.
2484 (c_parser_else_body): Likewise, adding param "else_loc".
2485 (c_parser_if_statement): Check for misleading indentation.
2486 (c_parser_while_statement): Likewise.
2487 (c_parser_for_statement): Likewise.
2488
dc5945dc 24892015-05-08 Marek Polacek <polacek@redhat.com>
2490
2491 PR c/64918
2492 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2493 (output_init_element): Likewise.
2494
cdc64059 24952015-05-07 Marek Polacek <polacek@redhat.com>
2496
2497 PR c/65179
2498 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2499 value.
2500
6fa7118e 25012015-04-30 Marek Polacek <polacek@redhat.com>
2502
2503 * c-typeck.c (set_init_label): Call error_at instead of error and
2504 pass LOC to it.
2505
98f44804 2506 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2507 the type of a decl.
2508
2cd7caae 2509 * c-typeck.c (c_build_va_arg): Clarify the error message.
2510
95cfd391 25112015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2512
2513 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2514 OMP_STANDALONE_CLAUSES.
2515
e65e39f8 25162015-04-28 Marek Polacek <polacek@redhat.com>
2517
2518 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2519
5580bf42 25202015-04-28 Marek Polacek <polacek@redhat.com>
2521
2522 PR c/65901
2523 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2524
c3468fc2 25252015-04-25 Marek Polacek <polacek@redhat.com>
2526
2527 PR c/52085
2528 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2529 attribute.
2530
0cd6b1b4 25312015-04-23 Marek Polacek <polacek@redhat.com>
2532
2533 PR c/65345
2534 * c-decl.c (set_labels_context_r): New function.
2535 (store_parm_decls): Call it via walk_tree_without_duplicates.
2536 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2537 instead of create_tmp_var. Build TARGET_EXPR instead of
2538 COMPOUND_EXPR.
2539 (build_atomic_assign): Use create_tmp_var_raw instead of
2540 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2541
05a827ce 25422015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2543
2544 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2545 (c_parser_omp_target_update): Add missed %> to error_at ().
2546
de801c28 25472015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2548
2549 PR target/55143
2550 * c-decl.c (c_default_pointer_mode): Remove definition.
2551 * c-tree.h (c_default_pointer_mode): Remove declaration.
2552
c3b1dca4 25532015-03-27 Tobias Burnus <burnus@net-b.de>
2554
2555 PR c/65586
2556 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2557 error out.
2558 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2559 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2560 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2561
1443772f 25622015-03-19 Jakub Jelinek <jakub@redhat.com>
2563
2564 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2565 attribute for DECL_EXTERNAL VAR_DECLs.
2566
76738f56 25672015-03-11 Jakub Jelinek <jakub@redhat.com>
2568
2569 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2570 argument.
2571
16f958b3 25722015-03-10 Jakub Jelinek <jakub@redhat.com>
2573
2574 PR c/65120
2575 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2576 before preparing arguments to warn_logical_not_parentheses.
2577
6054103a 25782015-03-09 Jakub Jelinek <jakub@redhat.com>
2579
2580 PR c/65120
2581 * c-typeck.c (parser_build_binary_op): Don't warn for
2582 !!x == y or !b == y where b is _Bool.
2583
de3a1e03 25842015-03-09 Marek Polacek <polacek@redhat.com>
2585
2586 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2587 * c-decl.c (grokdeclarator): Likewise.
2588 * c-typeck.c (build_binary_op): Likewise.
2589
084e6bf0 25902015-02-27 Marek Polacek <polacek@redhat.com>
2591
2592 PR c/65228
2593 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2594
4d7c4134 25952015-02-14 Marek Polacek <polacek@redhat.com>
2596
2597 PR c/64768
2598 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2599 declared through a typedef name.
2600
b1380826 26012015-02-13 Marek Polacek <polacek@redhat.com>
2602
2603 PR c/65050
2604 * c-decl.c (grokdeclarator): Print also the type when giving
2605 the error message about array's incomplete element type.
2606
35ff54b5 26072015-02-11 Jakub Jelinek <jakub@redhat.com>
2608
2609 PR c/64824
2610 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2611 check in the POP macro.
2612
46861609 26132015-02-09 Marek Polacek <polacek@redhat.com>
2614
2615 PR c/64856
2616 * c-typeck.c (process_init_element): Don't always wrap
2617 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2618 initializing a range of elements.
2619
bbf8fbec 26202015-02-04 Jakub Jelinek <jakub@redhat.com>
2621
2622 PR c/64824
2623 PR c/64868
2624 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2625
46861609 26262015-02-02 Bruno Loff <bruno.loff@gmail.com>
1f0ce3ac 2627
2628 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2629 processing enum declaration.
2630
70279be9 26312015-01-29 Marek Polacek <polacek@redhat.com>
2632
2633 PR c/64709
2634 * c-typeck.c (pop_init_level): If constructor_elements has
2635 exactly one element with integer_zerop value, set constructor_zeroinit
2636 to 1. Remove braces around warning_init call.
2637
591970b4 26382015-01-27 Jakub Jelinek <jakub@redhat.com>
2639
2640 PR c/64766
2641 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2642 of FUNCTION_DECLs with error_mark_node.
2643
87778dc4 26442015-01-26 Jakub Jelinek <jakub@redhat.com>
2645
2646 PR c/64778
2647 * c-typeck.c (convert_arguments): Return -1 if there are
2648 error_args, even if we've diagnosed too many arguments.
2649
cffdfb3d 26502015-01-21 Richard Biener <rguenther@suse.de>
2651
2652 PR middle-end/64313
2653 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2654 for builtins the user declared correctly.
2655
ca4c3545 26562015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2657 Bernd Schmidt <bernds@codesourcery.com>
2658 Cesar Philippidis <cesar@codesourcery.com>
2659 James Norris <jnorris@codesourcery.com>
2660 Jakub Jelinek <jakub@redhat.com>
2661 Ilmir Usmanov <i.usmanov@samsung.com>
2662
2663 * c-parser.c: Include "gomp-constants.h".
2664 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2665 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2666 Use OMP_CLAUSE_SET_MAP_KIND.
2667 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2668 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2669 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2670 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2671 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2672 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2673 "copyout", "create", "delete", "deviceptr", "gang", "host",
2674 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2675 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2676 "present_or_create", "pcreate", "seq", "self", "vector",
2677 "vector_length", "wait", "worker".
2678 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2679 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2680 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2681 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2682 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2683 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2684 (c_parser_oacc_data_clause_deviceptr)
2685 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2686 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2687 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2688 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2689 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2690 (c_parser_oacc_parallel, c_parser_oacc_update)
2691 (c_parser_oacc_wait): New functions.
2692 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2693 (c_finish_oacc_data): New prototypes.
2694 * c-typeck.c: Include "gomp-constants.h".
2695 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2696 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2697 OMP_CLAUSE_SET_MAP_KIND.
2698 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2699 (c_finish_oacc_data): New functions.
2700 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2701 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2702 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2703 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2704 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2705 GOMP_MAP_FORCE_DEVICEPTR.
2706
1f78217c 27072015-01-09 Michael Collison <michael.collison@linaro.org>
2708
2709 * c-array-notation.c: Include hash-set.h, machmode.h,
2710 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2711 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2712 * c-aux-info.c: Ditto.
2713 * c-convert.c: Ditto.
2714 * c-decl.c: Ditto.
2715 * c-errors.c: Ditto.
2716 * c-lang.c: Dittoxs.
2717 * c-objc-common.c: Ditto.
2718 * c-parser.c: Ditto.
2719 * c-typeck.c: Include hash-set.h, machmode.h,
2720 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2721 fold-const.h, wide-int.h, inchash.h, real.h and
2722 fixed-value.h due to flattening of tree.h.
2723
15e18a8c 27242015-01-07 Marek Polacek <polacek@redhat.com>
2725
2726 PR c/64417
2727 * c-typeck.c (process_init_element): Disallow initialization of
2728 a flexible array member with a string constant if the structure
2729 is in an array.
2730
d353bf18 27312015-01-05 Jakub Jelinek <jakub@redhat.com>
2732
823a9dd4 2733 PR sanitizer/64344
2734 * c-typeck.c (convert_for_assignment, c_finish_return): For
2735 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2736 types also set in_late_binary_op around convert call.
2737 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2738 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2739 result on expr as last argument to ubsan_instrument_float_cast,
2740 if in_late_binary_op, don't use c_save_expr but save_expr.
2741
d353bf18 2742 Update copyright years.
2743
92b63884 27442015-01-05 Marek Polacek <polacek@redhat.com>
2745
2746 PR c/64423
2747 * c-typeck.c (build_array_ref): Pass loc down to
2748 warn_array_subscript_with_type_char.
2749
92a44a68 27502014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
8a8211df 2751
2752 * c-typeck.c: New behavious for pointers to arrays with qualifiers
a49621cf 2753 (common-pointer-type): For pointers to arrays take qualifiers from
8a8211df 2754 element type.
a49621cf 2755 (build_conditional_expr): Add warnings for lost qualifiers.
8a8211df 2756 (comp-target-types): Allow pointers to arrays with different qualifiers.
a49621cf 2757 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
8a8211df 2758 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
a49621cf 2759 to PEDWARN_FOR_QUALIFIERS.
8a8211df 2760
35ea0139 27612014-12-17 Jakub Jelinek <jakub@redhat.com>
2762
2763 PR sanitizer/64289
2764 * c-convert.c: Include ubsan.h.
2765 (convert): For real -> integral casts and
2766 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2767 instead instrument the float cast directly.
2768
f9e245b2 27692014-11-29 Jakub Jelinek <jakub@redhat.com>
2770
2771 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2772 c_finish_stmt_expr): Remove NULL last argument from
2773 create_tmp_var_raw and create_tmp_var calls.
2774 * c-array-notation.c (fix_builtin_array_notation_fn,
2775 build_array_notation_expr, fix_conditional_array_notations_1,
2776 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2777
fce2dbd1 27782014-11-28 Marek Polacek <polacek@redhat.com>
2779
2780 PR c/63862
2781 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2782 convert the right operand to integer type.
2783
396c36b7 27842014-11-25 Marek Polacek <polacek@redhat.com>
2785
2786 PR c/63877
2787 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2788 for inline functions.
2789
c61ef207 27902014-11-21 Jakub Jelinek <jakub@redhat.com>
2791
2792 PR target/63764
2793 * c-typeck.c (build_array_ref): Adjust
2794 convert_vector_to_pointer_for_subscript caller. If it returns true,
2795 call non_lvalue_loc on the result.
2796
565353e8 27972014-11-11 Richard Biener <rguenther@suse.de>
2798
2799 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2800 to true.
2801
fdd735a7 28022014-11-10 Andi Kleen <ak@linux.intel.com>
2803
2804 PR c/60804
2805 * c-parser.c (c_parser_statement_after_labels): Call
2806 check_no_cilk.
2807 (c_parser_if_statement): Dito.
2808 (c_parser_switch_statement): Dito.
2809 (c_parser_while_statement): Dito.
2810 (c_parser_do_statement): Dito.
2811 (c_parser_for_statement): Dito.
2812 * c-typeck.c (c_finish_loop): Dito.
2813
0feb4de1 28142014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2815
2816 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2817 OPT_Wshift_count_overflow in the warnings.
2818
a3fec48a 28192014-10-30 Marek Polacek <polacek@redhat.com>
2820
2821 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2822 print the stripped version as well, if they're not the same.
2823
3754d046 28242014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2825
2826 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2827 machine_mode.
2828
1140c305 28292014-10-28 Andrew MacLeod <amacleod@redhat.com>
2830
2831 * c-decl.c: Adjust include files.
2832 * c-parser.c: Ditto.
2833
ab103e33 28342014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2835 Tom Tromey <tromey@redhat.com>
2836
2837 * c-tree.h (enum c_oracle_request): New.
2838 (c_binding_oracle_function): New typedef.
2839 (c_binding_oracle, c_pushtag, c_bind): Declare.
2840 * c-decl.c (c_binding_oracle): New global.
2841 (I_SYMBOL_CHECKED): New macro.
2842 (i_symbol_binding): New function.
2843 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2844 (I_TAG_CHECKED): New macro.
2845 (i_tag_binding): New function.
2846 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2847 (I_LABEL_CHECKED): New macro.
2848 (i_label_binding): New function.
2849 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2850 (c_print_identifier): Save and restore c_binding_oracle.
2851 (c_pushtag, c_bind): New functions.
2852
94ea8568 28532014-10-27 Andrew MacLeod <amacleod@redhat.com>
2854
2855 * c-typeck.c: Adjust include files.
2856
32ecf960 28572014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2858
2859 PR c++/53061
2860 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2861 initialization here...
2862 (c_initialize_diagnostics): ... but here. Set defaults after
2863 building pretty-printer.
2864
2981340f 28652014-10-23 Marek Polacek <polacek@redhat.com>
2866
2867 PR c/63626
2868 * c-decl.c (pop_scope): Don't print warning in external_scope.
2869
d303aeaf 28702014-10-19 Marek Polacek <polacek@redhat.com>
2871
2872 PR c/63567
2873 * c-typeck.c (output_init_element): Allow initializing objects with
2874 static storage duration with compound literals even in C99 and add
2875 pedwarn for it.
2876
bccf97da 28772014-10-17 Marek Polacek <polacek@redhat.com>
2878
2879 PR c/63567
2880 * c-typeck.c (digest_init): Allow initializing objects with static
2881 storage duration with compound literals even in C99 and add pedwarn
2882 for it.
2883
d9c77450 28842014-10-17 Marek Polacek <polacek@redhat.com>
2885
2886 PR c/63543
2887 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2888 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2889 error multiple times. Print the type.
2890
a2bbd0a7 28912014-10-17 Marek Polacek <polacek@redhat.com>
2892
2893 PR c/63549
2894 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2895 type.
2896
e610d2b2 28972014-10-17 Marek Polacek <polacek@redhat.com>
2898
2899 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2900 (start_function): Use OPT_Wimplicit_int instead of 0.
2901 (store_parm_decls_oldstyle): Likewise.
2902
6b6e56b6 29032014-10-17 Alan Modra <amodra@gmail.com>
2904
2905 PR middle-end/61848
2906 * c-decl.c (merge_decls): Don't merge section name or tls model
2907 to newdecl symtab node, instead merge to olddecl. Override
2908 existing olddecl section name. Set tls_model for all thread-local
2909 vars, not just OMP thread-private ones. Remove incorrect comment.
2910
a3020f2f 29112014-10-16 Andrew MacLeod <amacleod@redhat.com>
2912
2913 * c-decl.c: Adjust include files.
2914
9f75f026 29152014-10-14 DJ Delorie <dj@redhat.com>
2916
2917 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2918 (c_token_starts_typename): Check all __intN, not just __int128.
2919 (c_token_starts_declspecs): Likewise.
2920 (c_parser_declspecs): Likewise.
2921 (c_parser_attribute_any_word): Likewise.
2922 (c_parser_objc_selector): Likewise.
2923 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2924 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2925 is specified.
2926 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2927 __int128.
2928 (finish_declspecs): Likewise.
2929
4f284d4a 29302014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2931
a49621cf 2932 * c-parser.c (c_parser_all_labels): New function to replace
4f284d4a 2933 the duplicate code.
a49621cf 2934 (c_parser_statement): Call the new function.
4f284d4a 2935
61a892dc 29362014-10-09 Marek Polacek <polacek@redhat.com>
2937
2938 PR c/63480
2939 * c-typeck.c (pop_init_level): Don't warn about initializing
2940 with { }.
2941
4e888fd9 29422014-10-07 Marek Polacek <polacek@redhat.com>
2943
2944 PR c/59717
2945 * c-decl.c (header_for_builtin_fn): New function.
2946 (implicitly_declare): Suggest which header to include.
2947
224bdd51 29482014-10-07 Marek Polacek <polacek@redhat.com>
2949
2950 * c-convert.c (convert): Use error_operand_p.
2951 * c-typeck.c (require_complete_type): Likewise.
2952 (really_atomic_lvalue): Likewise.
2953 (digest_init): Likewise.
2954 (handle_omp_array_sections_1): Likewise.
2955
a2bc79db 29562014-10-03 Marek Polacek <polacek@redhat.com>
2957
2958 PR c/63453
2959 * c-decl.c (pop_scope): Don't warn about "inline function declared
2960 but never defined" for functions marked with gnu_inline attribute.
2961
4fc4088b 29622014-09-25 Jakub Jelinek <jakub@redhat.com>
2963
2964 PR c++/63249
2965 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2966 on low_bound and length.
2967
5213d6c9 29682014-09-24 Marek Polacek <polacek@redhat.com>
2969
2970 PR c/61405
2971 PR c/53874
2972 * c-parser.c: Don't define CPP_KEYWORD.
2973 (c_parser_switch_statement): Pass original type to c_finish_case.
2974 * c-tree.h (c_finish_case): Update declaration.
2975 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2976 conditionally to c_do_switch_warnings.
2977
6ea2b1bc 29782014-09-03 Marek Polacek <polacek@redhat.com>
2979
2980 PR c/62024
2981 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2982 conversions.
2983
40750995 29842014-09-02 Jakub Jelinek <jakub@redhat.com>
2985 Balaji V. Iyer <balaji.v.iyer@intel.com>
2986 Igor Zamyatin <igor.zamyatin@intel.com>
2987
2988 * c-parser.c (c_parser_cilk_for): New function.
2989 (c_parser_cilk_grainsize): Likewise.
2990 (c_get_temp_regvar): Likewise.
2991 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2992 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2993 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2994 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2995 case.
2996
8c583613 29972014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2998
2999 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
3000 with using HOST_WIDE_INT without truncation to 'int'
3001
dc6229e8 30022014-08-22 Marek Polacek <polacek@redhat.com>
3003
3004 PR c++/62199
3005 * c-typeck.c (parser_build_binary_op): Adjust call to
3006 warn_logical_not_parentheses.
3007
5fdda74b 30082014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
3009
3010 PR other/62008
3011 * c-parser.c (c_parser_array_notation): Check for correct
3012 type of an array added.
3013
78bf4156 30142014-08-19 Marek Polacek <polacek@redhat.com>
3015
3016 PR c++/62153
3017 * c-typeck.c (build_binary_op): If either operand of a comparison
3018 is a boolean expression, call maybe_warn_bool_compare.
3019
005b8fe7 30202014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
3021
3022 PR c/45584
3023 * c-typeck.c (build_c_cast): Do a conversion even when the
3024 TYPE_MAIN_VARIANTs are the same.
3025
508ea33a 30262014-08-19 Marek Polacek <polacek@redhat.com>
3027
3028 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
3029 pedwarn_c99 instead of pedwarn.
3030 (grokfield): Likewise.
3031 (warn_defaults_to): New function.
3032 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
3033 Unconditionally call pedwarn_c99 instead of pedwarn.
3034 (start_function): Call warn_defaults_to instead of pedwarn_c99.
3035 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
3036 check flag_isoc11 before.
3037 * c-errors.c (pedwarn_c99): Change the return type to bool.
3038 Handle -Wc99-c11-compat.
3039 * c-parser.c (disable_extension_diagnostics): Handle
3040 warn_c99_c11_compat.
3041 (restore_extension_diagnostics): Likewise.
3042 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
3043 instead of pedwarn, don't check flag_isoc11 before.
3044 (c_parser_declspecs): Likewise.
3045 (c_parser_alignas_specifier): Likewise.
3046 (c_parser_alignof_expression): Likewise.
3047 (c_parser_generic_selection): Likewise.
3048 * c-tree.h (pedwarn_c99): Update declaration.
3049 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
3050 of pedwarn_c99.
3051
806fe15e 30522014-08-19 Marek Polacek <polacek@redhat.com>
3053
3054 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
3055 to pedwarn_c90.
3056 * c-errors.c: Include "opts.h".
3057 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3058 * c-parser.c (disable_extension_diagnostics): Handle negative value
3059 of warn_c90_c99_compat, too.
3060 (restore_extension_diagnostics): Likewise.
3061 (c_parser_compound_statement_nostart): Pass
3062 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3063
89868e45 30642014-08-12 Marek Polacek <polacek@redhat.com>
3065
3066 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3067 Add pedwarn.
3068 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3069 Likewise.
3070 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3071
92a44a68 30722014-08-10 Marek Polacek <polacek@redhat.com>
890c2e2f 3073
3074 PR c/51849
3075 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3076 Call pedwarn_c90 instead of pedwarn.
3077 (check_bitfield_type_and_width): Likewise.
3078 (declspecs_add_qual): Likewise.
3079 (declspecs_add_type): Likewise.
3080 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3081 Adjust to only call pedwarn_c90.
3082 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3083 pedwarn_c90 instead of pedwarn.
3084 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3085 * c-parser.c (disable_extension_diagnostics): Handle
3086 warn_c90_c99_compat.
3087 (restore_extension_diagnostics): Likewise.
3088 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3089 pedwarn_c90 instead of pedwarn.
3090 (c_parser_initelt): Likewise.
3091 (c_parser_postfix_expression): Likewise.
3092 (c_parser_postfix_expression_after_paren_type): Likewise.
3093 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3094 * c-tree.h: Fix formatting.
3095 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3096 pedwarn_c90 instead of pedwarn.
3097
7149db5f 30982014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3099
3100 * c-typeck.c: Remove include of pointer-set.h.
3101
1c75251e 31022014-08-07 Marek Polacek <polacek@redhat.com>
3103
3104 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3105
06ecf488 31062014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3107
3108 * c-typeck.c: Use hash_map instead of pointer_map.
3109
431205b7 31102014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3111
3112 * c-decl.c: Use hash_set instead of pointer_set.
3113
3394c80c 31142014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3115
3116 PR middle-end/61455
3117 * c-array-notation.c (expand_array_notations): Handling
3118 of DECL_EXPR added.
3119
f22a2cb7 31202014-07-31 Marc Glisse <marc.glisse@inria.fr>
3121
3122 PR c++/60517
3123 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3124 a local variable.
3125
74691f46 31262014-07-30 Tom Tromey <tromey@redhat.com>
3127
3128 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3129 field.
3130 (really_start_incremental_init, push_init_level): Initialize
3131 designator_depth.
3132 (pop_init_level): Set global designator_depth.
3133 (process_init_element): Check for designated_init attribute.
3134
f9767fb6 31352014-07-20 Marek Polacek <polacek@redhat.com>
3136
3137 PR c/61852
3138 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3139 (implicitly_declare): Pass location to implicit_decl_warning.
3140
305d96bc 31412014-07-14 Jakub Jelinek <jakub@redhat.com>
3142
3143 PR middle-end/61294
3144 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3145 If non-NULL, call c_parser_check_literal_zero.
3146 (c_parser_check_literal_zero): New function.
3147 (c_parser_postfix_expression_after_primary): Adjust
3148 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3149
87d59e72 31502014-07-06 Marek Polacek <polacek@redhat.com>
3151
3152 PR c/6940
3153 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3154 * c-tree.h (C_ARRAY_PARAMETER): Define.
3155 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3156 function parameter.
3157
752098c8 31582014-07-02 Jan Hubicka <hubicka@ucw.cz>
92a44a68 3159 Chen Gang <gang.chen.5i5j@gmail.com>
752098c8 3160
3161 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3162 releasing symbol.
3163
1207866e 31642014-07-01 Marek Polacek <polacek@redhat.com>
3165
3166 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3167 instead of 0 to WARN_FOR_ASSIGNMENT.
3168
7a6bbb76 31692014-07-01 Marek Polacek <polacek@redhat.com>
3170
3171 PR c/58286
3172 * c-typeck.c (convert_for_assignment): Pass
3173 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3174
70575064 31752014-06-30 Marek Polacek <polacek@redhat.com>
3176
3177 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3178 has no_sanitize_undefined attribute.
3179
4879e4cf 31802014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3181
3182 PR middle-end/57541
3183 * c-array-notation.c (fix_builtin_array_notation_fn):
3184 Check for 0 arguments in builtin call. Check that bultin argument is
3185 correct.
3186 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3187 index.
3188
45c5b823 31892014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3190
3191 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3192 qualifiers in __auto_type for atomic types.
3193 (c_parser_typeof_specifier): Discard all type qualifiers in
3194 __typeof__ for atomic types.
3195
430b73ee 31962014-06-25 Marek Polacek <polacek@redhat.com>
3197
3198 PR c/61162
3199 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3200 the return expression to c_finish_return.
3201
9580cb79 32022014-06-25 Jakub Jelinek <jakub@redhat.com>
3203
3204 * c-typeck.c (c_finish_omp_clauses): Make sure
3205 OMP_CLAUSE_LINEAR_STEP has correct type.
3206
c1f445d2 32072014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3208
3209 * c-decl.c: Adjust.
3210
e471cc6f 32112014-06-24 Jakub Jelinek <jakub@redhat.com>
3212
3213 * c-parser.c (c_parser_omp_for_loop): For
3214 #pragma omp parallel for simd move lastprivate clause from parallel
3215 to for rather than simd.
3216
499b7390 32172014-06-23 Marek Polacek <polacek@redhat.com>
3218
3219 * c-typeck.c (parser_build_binary_op): Don't call
3220 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3221
5e68df57 32222014-06-15 Jan Hubicka <hubicka@ucw.cz>
3223
3224 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3225 * c-decl.c (merge_decls): Likewise.
3226
064b0d02 32272014-06-09 Marek Polacek <polacek@redhat.com>
3228
3229 PR c/36446
3230 * c-typeck.c (error_init): Call inform instead of error_at.
3231 (pedwarn_init): Call inform instead of pedwarn.
3232 (warning_init): Call inform instead of warning_at.
3233
71e19e54 32342014-06-07 Jan Hubicka <hubicka@ucw.cz>
3235
3236 * c-decl.c (merge_decls): Use set_decl_section_name.
3237 (duplicate_decls): Remove node if it exists.
3238
95cdf3fd 32392014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3240
3241 PR c/53119
3242 * c-typeck.c (push_init_level, process_init_element,
3243 pop_init_level): Correct check for zero initialization, move
3244 missing brace warning to respect zero initialization.
3245
a07f86a6 32462014-06-05 Marek Polacek <polacek@redhat.com>
3247
3248 PR c/56724
3249 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3250
32dc1512 32512014-06-05 Marek Polacek <polacek@redhat.com>
3252
3253 PR c/49706
3254 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3255 on the left hand side operand of a comparison.
3256
64cf1262 32572014-06-05 Marek Polacek <polacek@redhat.com>
3258
3259 PR c/48062
3260 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3261 Print note only if the warning was printed.
3262
071f6d39 32632014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3264
3265 PR c/58942
3266 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3267 with a pointer.
3268
c69ec07d 32692014-06-03 Marek Polacek <polacek@redhat.com>
3270
3271 PR c/60439
3272 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3273 c_start_case.
3274 * c-tree.h (c_start_case): Update.
3275 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3276 switch condition has boolean value.
3277
f7715905 32782014-06-02 Andrew MacLeod <amacleod@redhat.com>
3279
3280 * c-decl.c: Include builtins.h.
3281 * c-parser.c: Likewise.
3282
dcfff6f9 32832014-05-27 Marek Polacek <polacek@redhat.com>
3284
3285 PR c/56724
3286 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3287 error and warning calls to error_at and warning_at. Pass location of
3288 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3289 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3290 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3291
c048c42c 32922014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3293
3294 PR c/61191
3295 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3296 function parameters.
3297
8c016392 32982014-05-23 Jan Hubicka <hubicka@ucw.cz>
3299
3300 * c-decl.c (merge_decls): Preserve symtab node pointers.
3301 (duplicate_decls): Free new decl.
3302
184a718f 33032014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3304
6ce915ef 3305 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3306 initialization.
3307
184a718f 3308 * c-parser.c (c_parser_omp_target): Return bool values.
3309
22ac3f78 33102014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3311
3312 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3313 num_teams_loc variable to num_thread_limit_loc.
3314
3ab4693e 33152014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3316
3317 * c-array-notation.c (expand_array_notations): Use void_node
3318 instead of void_zero_node.
3319
25a27413 33202014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3321
3322 * c-decl.c (finish_struct): Adjust.
3323 (finish_enum): Likewise.
3324 (bind): Adjust.
3325 (record_inline_static): Likewise.
3326 (push_scope): Likewise.
3327 (make_label): Likewise.
3328 (lookup_label_for_goto): Likewise.
3329 (finish_struct): Likewise.
3330 (finish_enum): Likewise.
3331 (store_parm_decls): Likewise.
3332 (c_push_function_context): Likewise.
3333 * c-lang.h: Remove usage of variable_size gty attribute.
3334 * c-parser.c (c_parse_init): Adjust.
3335 (c_parse_file): Likewise.
3336
172b8440 33372014-05-13 Marek Polacek <polacek@redhat.com>
3338
3339 PR c/61162
3340 * c-typeck.c (convert_for_assignment): Pass location to
3341 WARN_FOR_ASSIGNMENT instead of input_location.
3342
c9e51d25 33432014-05-10 Marek Polacek <polacek@redhat.com>
3344
3345 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3346 maybe_warn_string_init.
3347 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3348 maybe_warn_string_init.
3349 * c-tree.h (maybe_warn_string_init): Update declaration.
3350 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3351 Call pedwarn_init with loc instead of with input_location.
3352 (digest_init): Pass init_loc to maybe_warn_string_init.
3353 (pop_init_level): Call pedwarn_init with loc instead of with
3354 input_location.
3355 (set_init_index): Likewise.
3356 (process_init_element): Likewise.
3357
53de1631 33582014-05-09 Marek Polacek <polacek@redhat.com>
3359
3360 PR c/61096
3361 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3362 (c_parser_initelt): Pass location to set_init_label. Pass array index
3363 location to set_init_index.
3364 * c-tree.h (push_init_level): Update declaration.
3365 (pop_init_level): Likewise.
3366 (set_init_index): Likewise.
3367 (set_init_label): Likewise.
3368 * c-typeck.c (error_init): Add location parameter. Call error_at
3369 instead of error.
3370 (digest_init): Pass init_loc to error_init.
3371 (really_start_incremental_init):
3372 (push_init_level): Add location parameter. Pass loc to pop_init_level
3373 and error_init.
3374 (pop_init_level): Likewise.
3375 (set_designator): Add location parameter. Pass loc to pop_init_level,
3376 push_init_level, and error_init.
3377 (set_init_index): Add location parameter. Pass loc to error_init and
3378 set_designator.
3379 (set_init_label): Likewise.
3380 (output_init_element): Pass loc to error_init.
3381 (process_init_element): Pass loc to error_init, pop_init_level,
3382 pedwarn_init, and push_init_level.
3383
3e5a8b00 33842014-05-09 Marek Polacek <polacek@redhat.com>
3385
3386 PR c/50459
3387 * c-parser.c (c_parser_attributes): Parse the arguments as an
3388 expression-list if the attribute takes identifier.
3389
c2c4ae8d 33902014-05-08 Marek Polacek <polacek@redhat.com>
3391
3392 PR c/61053
3393 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3394 TYPE_ALIGN_UNIT.
3395
2026249a 33962014-05-08 Marek Polacek <polacek@redhat.com>
3397
3398 PR c/61077
3399 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3400 of main.
3401
960d5a55 34022014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3403 Mike Stump <mikestump@comcast.net>
3404 Richard Sandiford <rdsandiford@googlemail.com>
3405
3406 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3407 (finish_enum): Use wide-int interfaces.
3408 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3409 * c-typeck.c (build_c_cast): Likewise.
3410 (set_nonincremental_init_from_string): Likewise.
3411 (c_tree_equal): Likewise.
3412
e0e14cbd 34132014-05-02 Marek Polacek <polacek@redhat.com>
3414
3415 PR c/25801
3416 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3417 Return size_one_node when the type is not complete.
3418 (pointer_diff): Remove comment.
3419 (build_unary_op): Improve error messages.
3420
27ff10cb 34212014-05-02 Marek Polacek <polacek@redhat.com>
3422
3423 * c-typeck.c (c_finish_return): Separate warning_at calls.
3424
68410ce9 34252014-05-02 Marek Polacek <polacek@redhat.com>
3426
3427 * c-tree.h (error_init): Remove declaration.
3428 (pedwarn_init): Likewise.
3429 * c-typeck.c (error_init): Make static and move above.
3430 (pedwarn_init): Likewise.
3431 (warning_init): Move above.
3432 (maybe_warn_string_init): Likewise.
3433
e8e27117 34342014-05-01 Jeff Law <law@redhat.com>
3435
3436 Revert:
3437
3438 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3439 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3440 avoid goto.
3441
971df357 34422014-05-02 Marek Polacek <polacek@redhat.com>
3443
3444 PR c/60784
3445 * c-typeck.c (push_init_level): Set constructor_designated to
3446 p->designated for structures.
3447
de548fe5 34482014-05-01 Marek Polacek <polacek@redhat.com>
3449
3450 PR c/60915
3451 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3452 function-definition has an attribute after the declarator.
3453
053a0ded 34542014-05-01 Marek Polacek <polacek@redhat.com>
3455
3456 PR c/60257
3457 * c-typeck.c (warning_init): Add location_t parameter. Call
3458 warning_at instead of warning.
3459 (push_init_level): Pass input_location to warning_init.
3460 (add_pending_init): Add location_t parameter. Pass loc to
3461 warning_init.
3462 (set_nonincremental_init): Pass input_location to add_pending_init.
3463 (set_nonincremental_init_from_string): Likewise.
3464 (output_init_element): Pass loc to warning_init and to
3465 add_pending_init.
3466
694296f2 34672014-05-01 Marek Polacek <polacek@redhat.com>
3468
3469 PR c/43395
3470 * c-typeck.c (c_finish_return): Distinguish between label and variable
3471 when warning about returning local address.
3472
86bbd7f9 34732014-05-01 Marek Polacek <polacek@redhat.com>
3474
3475 PR c/29467
3476 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3477 in C89 mode.
3478
e4ab2ef3 34792014-05-01 Marek Polacek <polacek@redhat.com>
3480
3481 PR c/43245
3482 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3483 instead of 0 to WARN_FOR_QUALIFIERS.
3484
ca3999cb 34852014-05-01 Marek Polacek <polacek@redhat.com>
3486
3487 PR c/56989
3488 * c-typeck.c (default_conversion): Use better location for
3489 error call.
3490
52cc0072 34912014-04-30 Marek Polacek <polacek@redhat.com>
3492
3493 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3494 also when SANITIZE_FLOAT_DIVIDE is on.
3495
af379dd3 34962014-04-30 Marek Polacek <polacek@redhat.com>
3497
3498 PR c/60139
3499 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3500 and pedwarn_init. Use loc insted of input_location.
3501
b069c2a0 35022014-04-30 Marek Polacek <polacek@redhat.com>
3503
3504 PR c/60351
3505 * c-typeck.c (build_binary_op): Use location when warning about
3506 shift count.
3507
4a026b48 35082014-04-25 Marek Polacek <polacek@redhat.com>
3509
3510 PR c/18079
3511 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3512 always_inline/noinline and hot/cold attributes.
3513
adc93f31 35142014-04-25 Marek Polacek <polacek@redhat.com>
3515
3516 PR c/60114
3517 * c-parser.c (c_parser_initelt): Pass input_location to
3518 process_init_element.
3519 (c_parser_initval): Pass loc to process_init_element.
3520 * c-tree.h (process_init_element): Adjust declaration.
3521 * c-typeck.c (push_init_level): Pass input_location to
3522 process_init_element.
3523 (pop_init_level): Likewise.
3524 (set_designator): Likewise.
3525 (output_init_element): Add location_t parameter. Pass loc to
3526 digest_init.
3527 (output_pending_init_elements): Pass input_location to
3528 output_init_element.
3529 (process_init_element): Add location_t parameter. Pass loc to
3530 output_init_element.
3531
e1029911 35322014-04-24 Jakub Jelinek <jakub@redhat.com>
3533
3534 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3535 atomic-clause, allow comma in between atomic-clause and
3536 seq_cst.
3537
9f0a7bc6 35382014-04-22 Jakub Jelinek <jakub@redhat.com>
3539
3540 PR c/59073
3541 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3542 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3543
094da06d 35442014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3545
3546 PR middle-end/60469
3547 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3548 create_tmp_var instead build_decl for creating temps.
3549 (build_array_notation_expr): Likewise.
3550 (fix_conditional_array_notations_1): Likewise.
3551 (fix_array_notation_expr): Likewise.
3552 (fix_array_notation_call_expr): Likewise.
3553
5a672e62 35542014-03-28 Jakub Jelinek <jakub@redhat.com>
3555
3556 PR c++/60689
3557 * c-tree.h (c_build_function_call_vec): New prototype.
3558 * c-typeck.c (build_function_call_vec): Don't call
3559 resolve_overloaded_builtin here.
3560 (c_build_function_call_vec): New wrapper function around
3561 build_function_call_vec. Call resolve_overloaded_builtin here.
3562 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3563 Call c_build_function_call_vec instead of build_function_call_vec.
3564 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3565 * c-decl.c (finish_decl): Likewise.
3566
f40f5e0e 35672014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3568
3569 PR c/55383
3570 * c-typeck.c: Use correct format string in cast-qual warning
3571
9ec099a3 35722014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3573
3574 * c-decl.c (c_decl_attributes): Use
3575 lang_hooks.types.omp_mappable_type.
3576 * c-typeck.c (c_finish_omp_clauses): Likewise.
3577
3bfdc94f 35782014-03-06 Marek Polacek <polacek@redhat.com>
3579
3580 PR c/60197
3581 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3582 of checking tree code.
3583
8f1128f8 35842014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3585
3586 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3587 (c_parser_parameter_declaration): Likewise.
3588
977b1853 35892014-02-19 Marek Polacek <polacek@redhat.com>
3590
3591 PR c/60195
3592 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3593 Call mark_exp_read on exp.value.
3594 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3595 TREE_ADDRESSABLE on old instead of val.
3596 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3597
825cd6ef 35982014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3599
3600 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3601 C_EXPR_APPEND by vec_safe_push.
3602 * c-tree.h (C_EXPR_APPEND): Remove.
3603
ec761d5a 36042014-01-31 Marek Polacek <polacek@redhat.com>
3605
3606 PR c/59963
3607 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3608 build_function_call_vec.
3609 (build_function_call): Likewise.
3610 (build_atomic_assign): Likewise.
3611 (build_function_call_vec): Add arg_loc parameter. Use it.
3612 (convert_arguments): Likewise.
3613 (convert_for_assignment): Rename rhs_loc to expr_loc.
3614 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3615 (c_parser_objc_keywordexpr): Likewise.
3616 (c_parser_postfix_expression_after_primary): Call
3617 build_function_call_vec with expr_loc rather than op_loc.
3618 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3619 build_function_call_vec.
3620 (c_parser_expr_list): Add locations parameter. Fill it with locations
3621 of function arguments.
3622 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3623
22a75734 36242014-01-30 Marek Polacek <polacek@redhat.com>
3625
3626 PR c/59940
3627 * c-typeck.c (build_function_call_vec): Use loc parameter.
3628 (convert_arguments): Add location parameter. Use it.
3629 (ep_convert_and_check): Likewise.
3630 (build_atomic_assign): Adjust convert_for_assignment call.
3631 (build_modify_expr): Likewise.
3632 (digest_init): Likewise.
3633 (c_finish_return): Likewise.
3634 (build_conditional_expr): Adjust ep_convert_and_check calls.
3635 (convert_for_assignment): Add rhs_loc parameter. Use it.
3636 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3637 calls.
3638
29f580ac 36392014-01-30 Richard Biener <rguenther@suse.de>
3640
3641 PR c/59905
3642 * c-typeck.c (build_function_call_vec): Do not replace calls
3643 to a function via an incompatible type with a runtime abort.
3644
a89e6c15 36452014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3646
3647 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3648 flag_enable_cilkplus with flag_cilkplus.
3649 (c_parser_direct_declarator_inner): Likewise.
3650 (c_parser_attribute_any_word): Likewise.
3651 (c_parser_attributes): Likewise.
3652 (c_parser_compound_statement): Likewise.
3653 (c_parser_statement_after_labels): Likewise.
3654 (c_parser_if_statement): Likewise.
3655 (c_parser_switch_statement): Likewise.
3656 (c_parser_do_statement): Likewise.
3657 (c_parser_for_statement): Likewise.
3658 (c_parser_unary_expression): Likewise.
3659 (c_parser_postfix_expression): Likewise.
3660 (c_parser_postfix_expression_after_primary): Likewise.
3661 (c_parser_postfix_expression_after_primary): Likewise.
3662 (c_parser_omp_clause_name): Likewise.
3663 (c_finish_omp_declare_simd): Likewise.
3664 (c_parser_cilk_verify_simd): Likewise.
3665 * c-typeck.c (build_array_ref): Likewise.
3666 (build_function_call_vec): Likewise.
3667 (convert_arguments): Likewise.
3668 (build_compound_expr): Likewise.
3669 (c_finish_return): Likewise.
3670 (c_finish_if_stmt): Likewise.
3671 (c_finish_loop): Likewise.
3672 (build_binary_op): Likewise.
3673
2623625f 36742014-01-23 Marek Polacek <polacek@redhat.com>
3675
3676 PR c/59846
3677 * c-typeck.c (parser_build_binary_op): Use location instead of
3678 input_location.
3679 (build_binary_op): Pass location to shorten_compare.
3680
46da3601 36812014-01-23 Marek Polacek <polacek@redhat.com>
3682
3683 PR c/58346
3684 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3685 an empty aggregate.
3686
9a9db3c1 36872014-01-23 Marek Polacek <polacek@redhat.com>
3688
3689 PR c/59871
3690 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3691 of a comma expression.
3692 (emit_side_effect_warnings): Likewise.
3693
69c9b607 36942014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3695
3696 PR c/59825
3697 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3698 function to use walk_tree and moved a lot of its functionality to
3699 expand_array_notations.
3700 (expand_array_notations): New function.
3701
7e005ab5 37022014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3703
3704 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3705 attribute an attribute without value.
3706
d6779b5f 37072014-01-23 Jakub Jelinek <jakub@redhat.com>
3708
3709 PR middle-end/58809
3710 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3711 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3712
ec431042 37132014-01-22 Marek Polacek <polacek@redhat.com>
3714
3715 PR c/59891
3716 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3717 of remove_c_maybe_const_expr on op1 and op2.
3718
1248c663 37192014-01-15 Jakub Jelinek <jakub@redhat.com>
3720
3721 PR c/58943
3722 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3723 effects, preevaluate rhs using SAVE_EXPR first.
3724
0bc789fc 37252014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3726
3727 PR c++/59631
3728 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3729 statements with if-elseif statements.
3730
6685d11c 37312014-01-06 Marek Polacek <polacek@redhat.com>
3732
3733 PR c/57773
3734 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3735 defined bit-field types only in ISO C.
3736
3aea1f79 37372014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3738
3739 Update copyright years
3740
e4f22041 37412014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3742
3743 * c-array-notation.c: Use the standard form for the copyright notice.
3744
74acc703 37452013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3746
3747 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3748 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3749 field in parser is not empty. If not-empty, call the function
3750 c_parser_finish_omp_declare_simd.
3751 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3752 between SIMD-enabled functions and #pragma simd. Added new parameter.
3753 (c_parser_cilk_all_clauses): Modified the usage of the function
3754 c_parser_cilk_clause_vectorlength as mentioned above.
3755 (c_parser_cilk_simd_fn_vector_attrs): New function.
3756 (c_finish_cilk_simd_fn_tokens): Likewise.
3757 (is_cilkplus_vector_p): Likewise.
3758 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3759 "nomask," and "mask" strings in clause name.
3760 (c_parser_omp_all_clauses): Added 3 new case statements:
3761 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3762 PRAGMA_CILK_CLAUSE_NOMASK.
3763 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3764 check for vector attribute and if so call the function
3765 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3766 called the function c_finish_cilk_simd_fn_tokens.
3767 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3768 parser field is non-empty. If so, parse them as you would parse
3769 the omp declare simd pragma.
3770 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3771 Added a check when step is a parameter and flag it as error.
3772 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3773 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3774 pragma_omp_clause.
3775
395dc01c 37762013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3777
3778 * c-parser.c (c_parser_omp_parallel): Fix description.
3779
433e804e 37802013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3781
3782 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3783 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3784 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3785 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3786
a179a7dc 37872013-12-04 Joseph Myers <joseph@codesourcery.com>
3788
3789 PR c/52023
3790 * c-parser.c (c_parser_alignas_specifier): Use
3791 c_sizeof_or_alignof_type instead of c_alignof.
3792 (c_parser_alignof_expression): Likewise, with min_alignof
3793 parameter depending on alignof spelling used.
3794
bdf1e3c7 37952013-12-04 Marek Polacek <polacek@redhat.com>
3796
3797 PR c/54113
3798 * c-decl.c (start_function): Don't warn for missing prototype for
3799 inline functions.
3800
05e8f674 38012013-12-03 Marek Polacek <polacek@redhat.com>
3802
3803 PR c/59351
3804 * c-decl.c (build_compound_literal): Allow compound literals with
3805 empty initial value.
3806
39f74d66 38072013-12-02 Joseph Myers <joseph@codesourcery.com>
3808
3809 PR c/58235
3810 * c-typeck.c (build_modify_expr): Diagnose assignment to
3811 expression with array type.
3812
f221adca 38132013-11-29 Joseph Myers <joseph@codesourcery.com>
3814
3815 PR c/42262
3816 * c-typeck.c (process_init_element): Do not treat a string as
3817 initializing a whole array when used with a designator for an
3818 individual element.
3819
75bce827 38202013-11-29 Joseph Myers <joseph@codesourcery.com>
3821
3822 PR c/57574
3823 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3824 an inline function following a static declaration.
3825
dc133326 38262013-11-28 Jakub Jelinek <jakub@redhat.com>
3827
3828 PR c/59310
3829 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3830 to p_name before calling c_parser_omp_teams instead of after.
3831 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3832 argument. Remove unused p_name variable.
3833
d09768a4 38342013-11-27 Aldy Hernandez <aldyh@redhat.com>
3835 Jakub Jelinek <jakub@redhat.com>
3836
3837 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3838 external_scope is NULL.
3839
73fd9cbe 38402013-11-27 Tom de Vries <tom@codesourcery.com>
3841 Marc Glisse <marc.glisse@inria.fr>
3842
3843 PR c++/59032
3844 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3845
bc61cadb 38462013-11-22 Andrew MacLeod <amacleod@redhat.com>
3847
3848 * c-typeck.c: Add required include files from gimple.h.
3849
3df42822 38502013-11-22 David Malcolm <dmalcolm@redhat.com>
3851
3852 * c-decl.c (define_label, shadow_tag_warned)
3853 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3854 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3855 (declspecs_add_type): Remove use of in_system_header macro.
3856 * c-parser.c (c_parser_unary_expression): Likewise.
3857 * c-typeck.c (store_init_value, process_init_element)
3858 (c_start_case): Likewise.
3859
3860 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3861 macro.
3862
3863 * c-parser.c (c_parser_set_source_position_from_token): Remove
3864 reference to in_system_header from comment.
3865
08f817b3 38662013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3867
3868 * c-decl.c (grokdeclarator): Update comment to refer to
3869 tree_to_[su]hwi rather than tree_low_cst.
3870
6a0712d4 38712013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3872
3873 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3874 tree_to_uhwi throughout.
3875
fcb97e84 38762013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3877
3878 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3879 throughout.
3880
35ec552a 38812013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3882
3883 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3884 throughout.
3885
f2697631 38862013-11-15 Aldy Hernandez <aldyh@redhat.com>
3887
3888 * c-parser.c (c_parser_cilk_simd): New.
3889 (c_parser_cilk_verify_simd): New.
3890 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3891 (c_parser_omp_for_loop): Add case for NE_EXPR.
3892 Set c_break_label for CILK_SIMD.
3893 (c_parser_cilk_clause_vectorlength): New.
3894 (c_parser_cilk_clause_linear): New.
3895 (c_parser_cilk_clause_name): New.
3896 (c_parser_cilk_all_clauses): New.
3897 * c-typeck.c (build_unary_op): Pass location argument to
3898 readonly_error.
3899 (build_modify_expr): Same.
3900 (build_asm_expr): Same.
3901 (c_finish_bc_stmt): Error on break/continue in loops.
3902
e795d6e1 39032013-11-14 Andrew MacLeod <amacleod@redhat.com>
3904
3905 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3906
9ed99284 39072013-11-14 Diego Novillo <dnovillo@google.com>
3908
3909 * c-decl.c: Include print-tree.h.
3910 Include stor-layout.h.
3911 Include varasm.h.
3912 Include attribs.h.
3913 Include stringpool.h.
3914 * c-lang.c: Include fold-const.h.
3915 * c-parser.c: Include stringpool.h.
3916 Include attribs.h.
3917 Include stor-layout.h.
3918 Include varasm.h.
3919 Include trans-mem.h.
3920 * c-typeck.c: Include stor-layout.h.
3921 Include trans-mem.h.
3922 Include varasm.h.
3923 Include stmt.h.
3924
4fba5eb9 39252013-11-13 Joseph Myers <joseph@codesourcery.com>
3926
3927 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3928 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3929 __auto_type.
3930 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3931 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3932 RID_AUTO_TYPE.
3933 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3934 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3935 (c_parser_declarator, c_parser_direct_declarator_inner)
3936 (c_parser_parameter_declaration, c_parser_type_name): All callers
3937 changed.
3938 (c_parser_declaration_or_fndef): Handle declarations with type
3939 determined from the initializer.
3940
a8783bee 39412013-11-12 Andrew MacLeod <amacleod@redhat.com>
3942
e795d6e1 3943 * c-typeck.c: Include gimplify.h.
a8783bee 3944
d184e0c0 39452013-11-12 Joseph Myers <joseph@codesourcery.com>
3946
3947 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3948 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3949 comment.
3950 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3951 or _Thread_local as appropriate in diagnostics.
3952 (build_null_declspecs): Initialize ret->thread_gnu_p.
3953 (declspecs_add_scspec): Handle either __thread or _Thread_local
3954 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3955 pedantic. Do not disallow _Thread_local extern and _Thread_local
3956 static.
3957
b560fabd 39582013-11-07 Joseph Myers <joseph@codesourcery.com>
3959 Andrew MacLeod <amacleod@redhat.com>
3960
3961 * c-aux-info.c (gen_type): Handle atomic qualifier.
3962 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3963 qualifiers when compating types.
3964 (shadow_tag_warned): Handle atomic_p in declspecs.
3965 (quals_from_declspecs): Likewise.
3966 (start_decl): Use c_type_promotes_to when promoting argument
3967 types.
3968 (grokdeclarator): Handle _Atomic.
3969 (get_parm_info): Diagnose any qualifier on "void" as only
3970 parameter.
3971 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3972 comparing types. Use c_type_promotes_to when promoting argument
3973 types.
3974 (finish_function): Use c_type_promotes_to when promoting argument
3975 types.
3976 (build_null_declspecs): Handle atomic_p in declspecs.
3977 (declspecs_add_qual): Handle RID_ATOMIC.
3978 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3979 (c_token_starts_declspecs): Handle RID_ATOMIC.
3980 (c_parser_declspecs): Handle atomic type specifiers and
3981 qualifiers.
3982 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3983 from types of expressions with atomic type.
3984 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3985 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3986 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3987 (c_parser_statement_after_labels, c_parser_switch_statement)
3988 (c_parser_for_statement, c_parser_expr_no_commas)
3989 (c_parser_conditional_expression, c_parser_binary_expression)
3990 (c_parser_cast_expression, c_parser_unary_expression)
3991 (c_parser_postfix_expression)
3992 (c_parser_postfix_expression_after_primary, c_parser_expression):
3993 Use convert_lvalue_to_rvalue.
3994 (c_parser_expression_conv, c_parser_expr_list): Document
3995 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3996 (c_parser_objc_synchronized_statement): Use
3997 convert_lvalue_to_rvalue.
3998 (c_parser_objc_selector): Handle RID_ATOMIC.
3999 (c_parser_objc_receiver, c_parser_array_notation): Use
4000 convert_lvalue_to_rvalue.
4001 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
4002 _Atomic (type-name).
4003 (struct c_declspecs): Add atomic_p field.
4004 (convert_lvalue_to_rvalue): Declare.
4005 * c-typeck.c (c_type_promotes_to): Promote atomic types to
4006 corresponding atomic types.
4007 (qualify_type): Don't add _Atomic qualifiers from second argument.
4008 (comp_target_types): Do not allow _Atomic mismatches.
4009 (type_lists_compatible_p): Do not remove atomic qualifiers when
4010 comparing types.
4011 (really_atomic_lvalue, convert_lvalue_to_rvalue)
4012 (build_atomic_assign): New functions.
4013 (build_unary_op): Use build_atomic_assign for atomic increment and
4014 decrement.
4015 (build_conditional_expr): Do not treat _Atomic void as a qualified
4016 version of void.
4017 (build_modify_expr): Use build_atomic_assign for atomic LHS.
4018 (find_anonymous_field_with_type, convert_to_anonymous_field)
4019 (convert_for_assignment): Do not remove atomic qualifiers when
4020 comparing types.
4021 (digest_init): Do not accept initialization of arrays of atomic
4022 elements by string constants.
4023 (build_asm_expr): Use convert_lvalue_to_rvalue.
4024 (build_binary_op): Do not treat _Atomic void as a qualified
4025 version of void.
4026
8b023e7c 40272013-11-06 DJ Delorie <dj@redhat.com>
4028
4029 * c-decl.c (locate_old_decl): If a previous conflicting decl is
4030 both explicit and builtin, print the location of the explicit one.
4031
c630ef93 40322013-11-05 Tobias Burnus <burnus@net-b.de>
4033
4034 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
4035 c_parser_omp_distribute, c_parser_omp_teams,
4036 c_parser_omp_target, c_parser_omp_declare): Handle
4037 -fopenmp-simd.
4038
2c4c3477 40392013-11-03 Marek Polacek <polacek@redhat.com>
4040
4041 * c-decl.c (grokdeclarator): Add VLA instrumentation.
4042
df205251 40432013-11-01 Jakub Jelinek <jakub@redhat.com>
4044
4045 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
4046 check_dup_generic at the end, unless remove is true.
4047 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
4048 remove = true;.
4049 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
4050
23871d0c 40512013-10-31 Jakub Jelinek <jakub@redhat.com>
4052
4053 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
4054 with decl that is not pointer nor array.
4055
d037099f 40562013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4057
4058 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4059 a spawning function is found.
4060 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4061 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4062 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4063 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4064 case.
4065 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4066 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4067 expr.
4068 (c_finish_return): Added a check to reject _Cilk_spawn in return
4069 expression.
4070 (build_cilk_spawn): New function.
4071 (build_cilk_sync): Likewise.
4072 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4073
4c90c04c 40742013-10-27 Tobias Burnus <burnus@net-b.de>
4075
4076 PR other/33426
4077 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4078 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4079 (c_parser_statement_after_labels): Update calls.
4080
48a972c8 40812013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 4082
4083 PR other/33426
4084 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4085 Handle PRAGMA_IVDEP.
4086 (c_parser_statement_after_labels): Update call.
4087
12f86df0 40882013-10-24 Marek Polacek <polacek@redhat.com>
4089
4090 * c-parser.c (c_parser_struct_declaration): Add a comment.
4091 (c_parser_declarator): Don't allow _Alignas here.
4092
7740abd8 40932013-10-17 Andrew MacLeod <amacleod@redhat.com>
4094
4095 * c-parser.c: Include omp-low.h.
4096 * c-typeck.c: Likewise.
4097
43d03c23 40982013-10-17 Marek Polacek <polacek@redhat.com>
4099
4100 PR c/58267
4101 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4102 Document syntax of the array-declarator.
4103 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4104 are not permitted.
4105 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4106 (c_parser_struct_declaration): Likewise.
4107 (c_parser_declarator): Likewise.
4108 (c_parser_direct_declarator_inner): Likewise.
4109 (c_parser_parameter_declaration): Likewise.
4110 (c_parser_type_name): Likewise.
4111
bc7bff74 41122013-10-11 Jakub Jelinek <jakub@redhat.com>
4113
4114 * c-lang.h (current_omp_declare_target_attribute): New extern
4115 decl.
4116 * c-parser.c: Include c-lang.h.
4117 (struct c_parser): Change tokens to c_token *.
4118 Add tokens_buf field. Change tokens_avail type to unsigned int.
4119 (c_parser_consume_token): If parser->tokens isn't
4120 &parser->tokens_buf[0], increment parser->tokens.
4121 (c_parser_consume_pragma): Likewise.
4122 (enum pragma_context): Add pragma_struct and pragma_param.
4123 (c_parser_external_declaration): Adjust
4124 c_parser_declaration_or_fndef caller.
4125 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4126 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4127 Adjust recursive call.
4128 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4129 of pragma_external.
4130 (c_parser_parameter_declaration): Use pragma_param instead of
4131 pragma_external.
4132 (c_parser_compound_statement_nostart, c_parser_label,
4133 c_parser_for_statement): Adjust
4134 c_parser_declaration_or_fndef callers.
4135 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4136 it through to c_parser_conditional_expression.
4137 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4138 pass it through to c_parser_binary_expression. Adjust recursive
4139 call.
4140 (c_parser_binary_expression): Remove prec argument, add
4141 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4142 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4143 binop matches it, use build2 instead of parser_build_binary_op.
4144 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4145 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4146 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4147 Handle pragma_struct and pragma_param the same as pragma_external.
4148 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4149 (c_parser_omp_variable_list): Parse array sections for
4150 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4151 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4152 (c_parser_omp_clause_reduction): Handle user defined reductions.
4153 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4154 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4155 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4156 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4157 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4158 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4159 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4160 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4161 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4162 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4163 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4164 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4165 (c_parser_omp_for_loop): Add CODE argument, pass it through
4166 to c_finish_omp_for. Change last argument to cclauses,
4167 and adjust uses to grab parallel clauses from the array of all
4168 the split clauses. Adjust c_parser_binary_expression,
4169 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4170 (omp_split_clauses): New function.
4171 (c_parser_omp_simd): New function.
4172 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4173 Allow the function to be called also when parsing combined constructs,
4174 and call c_parser_omp_simd when parsing for simd.
4175 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4176 #pragma omp section, require exactly one structured-block instead of
4177 sequence of statements.
4178 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4179 Allow the function to be called also when parsing combined constructs.
4180 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4181 Allow the function to be called also when parsing combined
4182 constructs.
4183 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4184 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4185 c_parser_omp_teams, c_parser_omp_target_data,
4186 c_parser_omp_target_update, c_parser_omp_target,
4187 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4188 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4189 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4190 (c_parser_omp_construct): Add p_name and mask vars. Handle
4191 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4192 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4193 and c_parser_omp_sections callers.
4194 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4195 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4196 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4197 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4198 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4199 OMP_CLAUSE_DEPEND.
4200 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4201 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4202 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4203 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4204 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4205 * c-typeck.c: Include tree-inline.h.
4206 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4207 handle_omp_array_sections_1, handle_omp_array_sections,
4208 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4209 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4210 user defined reductions.
4211 (c_tree_equal): New function.
4212 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4213 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4214 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4215 c_check_omp_declare_reduction_r): New prototypes.
4216 * c-decl.c (current_omp_declare_target_attribute): New variable.
4217 (c_decl_attributes): New function.
4218 (start_decl, start_function): Use it instead of decl_attributes.
4219 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4220 c_omp_reduction_decl, c_omp_reduction_lookup,
4221 c_check_omp_declare_reduction_r): New functions.
4222
3ce7d1bd 42232013-09-25 Tom Tromey <tromey@redhat.com>
4224
4225 * Make-lang.in (c/gccspec.o): Remove.
4226 (CFLAGS-c/gccspec.o): New variable.
4227 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4228 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4229 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4230
96da1c1d 42312013-09-25 Tom Tromey <tromey@redhat.com>
4232
4233 * Make-lang.in (c/gccspec.o): Don't use subshell.
4234
1b309377 42352013-09-18 Marek Polacek <polacek@redhat.com>
4236
4237 PR sanitize/58443
4238 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4239 Remove unnecessary check.
4240
05f893e1 42412013-09-18 Marek Polacek <polacek@redhat.com>
4242
4243 PR sanitizer/58411
4244 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4245 no_sanitize_undefined attribute.
4246
bda0b9d2 42472013-09-13 Kai Tietz <ktietz@redhat.com>
4248
4249 PR target/57848
4250 * c-decl.c (c_builtin_function_ext_scope): Remove
4251 wrong assumption that it is never called on prexisting
4252 symbol.
4253
73437615 42542013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4255
4256 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4257
eaab24b9 42582013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4259
4260 * c-objc-common.c (c_tree_printer): Tidy.
4261
9e46467d 42622013-08-30 Marek Polacek <polacek@redhat.com>
4263
4264 * c-typeck.c (build_binary_op): Add division by zero and shift
4265 instrumentation.
4266
f8234178 42672013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
f9086116 4268 Joseph Myers <joseph@codesourcery.com>
f8234178 4269
c90a7d10 4270 PR c/35649
f8234178 4271 * c-typeck.c (c_common_type): Prefer double_type_node over
4272 other REAL_TYPE types with the same precision.
4273 (convert_arguments): Likewise.
4274
6f07f480 42752013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4276
4277 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4278 (c_initialize_diagnostics): Call a destructor for the early printer.
4279
eed6bc21 42802013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4281
4282 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4283 printer initialization.
4284
57717943 42852013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
eed6bc21 4286
57717943 4287 PR c/57490
4288 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4289 check for truth values.
4290 (expand_array_notation_exprs): Added truth values case. Removed an
4291 unwanted else. Added for-loop to walk through subtrees in default
4292 case.
4293
a94db6b0 42942013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4295
4296 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4297
e76163a9 42982013-07-23 Joseph Myers <joseph@codesourcery.com>
4299
4300 * c-parser.c (struct c_generic_association): Fix typo.
4301
7aa04c8d 43022013-07-23 Tom Tromey <tromey@redhat.com>
4303 Joseph Myers <joseph@codesourcery.com>
4304
4305 * c-parser.c (struct c_generic_association): New.
4306 (c_generic_association_d): New typedef.
4307 (c_parser_generic_selection): New function.
4308 (c_parser_postfix_expression): Handle RID_GENERIC.
4309
76bbe4ca 43102013-07-13 Jason Merrill <jason@redhat.com>
4311
4312 PR c++/57793
4313 * c-decl.c (finish_struct): Check for too-large class.
4314
21ebaa24 43152013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 4316
4317 PR c/57821
4318 * c-typeck.c (set_init_index): When folding, check for index overflow.
4319
936c3081 43202013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4321
4322 * c-parser.c (c_parser_array_notation): Removed rejection of array
4323 notations in an array of function pointers.
4324
50acebe0 43252013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4326
4327 * c-array-notation.c (make_triplet_val_inv): New function.
4328 (create_cmp_incr): Likewise.
4329 (create_array_refs): Likewise.
4330 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4331 Also modularized common parts between functions and called the function.
4332 (build_array_notation_expr): Likewise.
4333 (fix_conditional_array_notations_1): Likewise.
4334 (fix_array_notation_expr): Likewise.
4335 (fix_array_notation_call_expr): Likewise.
4336
01e6cdb4 43372013-06-18 Marek Polacek <polacek@redhat.com>
4338
4339 PR c/57630
4340 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4341
6a3adac6 43422013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4343
4344 * c-array-notation.c (build_array_notation_expr): Reject array notation
4345 mismatch between LHS and RHS even inside a call_expr. Also, removed
4346 a couple while statements that were dead code.
4347
62aab3f3 43482013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4349
4350 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4351 excessive precision expressions in function parameters. Also removed
4352 couple unwanted while statements.
4353
bfc83720 43542013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4355
4356 * c-array-notation.c (expand_array_notation_exprs): Added
4357 ARRAY_NOTATION_REF case.
4358
09970d67 43592013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4360
4361 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4362 function to c-family/array-notation-common.c.
4363 (is_cilkplus_reduce_builtin): Likewise.
4364 (find_rank): Likewise.
4365 (extract_array_notation_exprs): Likewise.
4366 (replace_array_notations): Likewise.
4367 (find_inv_trees): Likewise.
4368 (replace_inv_trees): Likewise.
4369 (contains_array_notation_expr): Likewise.
4370 (find_correct_array_notation_type): Likewise.
4371 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4372 (struct inv_list): Moved this to c-family/array-notation-common.c.
4373 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4374
6e13bc01 43752013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4376
4377 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4378 reduction functions outside the for-loop. Added a check if the fundecl
4379 is non-NULL. Finally, removed an unwanted if-statement, and made the
4380 body unconditional.
4381
cc92dddc 43822013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4383
4384 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4385 condition of the if-statement matches the rank of else-block and then-
4386 block when array notations are used.
4387 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4388 expression after the entire function body is parsed.
4389 (c_parser_expr_no_commas): Delayed creating array notation expressions
4390 to the end of function parsing.
4391 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4392 whole if-statement instead of just the condition.
4393 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4394
eddc63fd 43952013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4396
4397 PR c/57474
4398 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4399 array to NULL_TREE if they are unused. Also added a check for the
4400 field to be NULL before its fields are used in future.
4401
a2115a4a 44022013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4403
4404 PR bootstrap/57450
4405 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4406 (build_array_notation_expr): Likewise.
4407
3c6d4197 44082013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4409
4410 * c-typeck.c (build_array_ref): Added a check to see if array's
4411 index is greater than one. If true, then emit an error.
4412 (build_function_call_vec): Exclude error reporting and checking
4413 for builtin array-notation functions.
4414 (convert_arguments): Likewise.
4415 (c_finish_return): Added a check for array notations as a return
4416 expression. If true, then emit an error.
4417 (c_finish_loop): Added a check for array notations in a loop
4418 condition. If true then emit an error.
4419 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4420 (build_binary_op): Added a check for array notation expr inside
4421 op1 and op0. If present, we call another function to find correct
4422 type.
4423 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4424 * c-parser.c (c_parser_compound_statement): Check if array
4425 notation code is used in tree, if so, then transform them into
4426 appropriate C code.
4427 (c_parser_expr_no_commas): Check if array notation is used in LHS
4428 or RHS, if so, then build array notation expression instead of
4429 regular modify.
4430 (c_parser_postfix_expression_after_primary): Added a check for
4431 colon(s) after square braces, if so then handle it like an array
4432 notation. Also, break up array notations in unary op if found.
4433 (c_parser_direct_declarator_inner): Added a check for array
4434 notation.
4435 (c_parser_compound_statement): Added a check for array notation in
4436 a stmt. If one is present, then expand array notation expr.
4437 (c_parser_if_statement): Likewise.
4438 (c_parser_switch_statement): Added a check for array notations in
4439 a switch statement's condition. If true, then output an error.
4440 (c_parser_while_statement): Similarly, but for a while.
4441 (c_parser_do_statement): Similarly, but for a do-while.
4442 (c_parser_for_statement): Similarly, but for a for-loop.
4443 (c_parser_unary_expression): Check if array notation is used in a
4444 pre-increment or pre-decrement expression. If true, then expand
4445 them.
4446 (c_parser_array_notation): New function.
4447 * c-array-notation.c: New file.
4448 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4449
2c1c8a2c 44502013-05-23 Mike Stump <mikestump@comcast.net>
4451
4452 * c-typeck.c (convert_for_assignment): Handle references to memory
4453 spaces better.
4454
be5f9e46 44552013-05-16 Jason Merrill <jason@redhat.com>
4456
4457 * Make-lang.in (cc1$(exeext)): Use link mutex.
4458
9205a6cc 44592013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4460
4461 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4462 to simply use OPT_Wpointer_arith.
4463 (build_unary_op): Likewise.
4464
0b049e15 44652013-04-03 Jakub Jelinek <jakub@redhat.com>
4466
4467 PR c/19449
4468 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4469 argument. If set, or it temporarily for parsing of the first
4470 argument into force_folding_builtin_constant_p.
4471 (c_parser_postfix_expression): Adjust callers.
4472
8e966116 44732013-03-21 Richard Biener <rguenther@suse.de>
4474
4475 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4476 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4477
b862f263 44782013-02-12 Marek Polacek <polacek@redhat.com>
4479
4480 PR c/44938
4481 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4482 origtypes to NULL.
4483
54550ecb 44842013-01-24 Jakub Jelinek <jakub@redhat.com>
4485
4486 PR c/56078
4487 * c-typeck.c (set_nonincremental_init_from_string): If
4488 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4489 returned false.
4490 (process_init_element): Likewise.
4491
035b65e2 44922012-12-20 Jakub Jelinek <jakub@redhat.com>
4493
4494 PR c++/55619
4495 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4496 argument, don't call default_function_array_conversion
4497 nor c_fully_fold here.
4498 (c_parser_asm_statement): Adjust callers.
4499 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4500 and outputs here, and call default_function_array_conversion
4501 on inputs that don't need to be addressable.
4502
7cbb7f1a 45032012-12-18 Jakub Jelinek <jakub@redhat.com>
4504
4505 PR c/39464
4506 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4507 warning require that both c_common_unsigned_type as well as
4508 c_common_signed_type is the same for both mvl and mvr types.
4509
f1f41a6c 45102012-11-16 Diego Novillo <dnovillo@google.com>
4511
4512 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4513
4514 * c-common.c: Use new vec API in vec.h.
4515 * c-common.h: Likewise.
4516 * c-gimplify.c: Likewise.
4517 * c-pragma.c: Likewise.
4518 * c-pretty-print.c: Likewise.
4519 * c-pretty-print.h: Likewise.
4520 * c-semantics.c: Likewise.
4521 * c-decl.c: Likewise.
4522 * c-parser.c: Likewise.
4523 * c-tree.h: Likewise.
4524 * c-typeck.c: Likewise.
4525
8b447d3f 45262012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4527
4528 PR c++/54930
4529 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4530
08fc5390 45312012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4532
4533 PR c/53066
4534 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4535 shadows a function, unless the variable is a function or a
4536 pointer-to-function.
4537
57f872a2 45382012-10-12 Jakub Jelinek <jakub@redhat.com>
4539
4540 PR c/54381
4541 * c-parser.c (struct c_tree_loc_pair): Removed.
4542 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4543 add location_t * and tree * arguments, fill in array of 3
4544 sizeof_arg trees and corresponding locs.
4545 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4546 c_parser_expr_list callers.
4547 (c_parser_postfix_expression_after_primary): Likewise. Pass
4548 array of 3 sizeof_arg trees and locs (corresponding to first
4549 3 arguments) to sizeof_pointer_memaccess_warning.
4550
d1455aa3 45512012-10-09 Lawrence Crowl <crowl@google.com>
4552
4553 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4554 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4555 hash table.
4556
b0e7825e 45572012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4558
4559 PR c++/54194
4560 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4561 call.
4562
41ed701a 45632012-10-09 Marc Glisse <marc.glisse@inria.fr>
4564
4565 PR c++/54427
4566 * c-typeck.c: Include c-common.h.
4567 (enum stv_conv): Moved to c-common.h.
4568 (scalar_to_vector): Moved to c-common.c.
4569 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4570 * Make-lang.in: c-typeck.c depends on c-common.h.
4571
ef34afc1 45722012-10-04 Arnaud Charlet <charlet@adacore.com>
4573
4574 * c-decl.c (c_write_global_declarations): Fix handling of
4575 -fdump-ada-spec*.
4576
7bd765d4 45772012-09-30 Sharad Singhai <singhai@google.com>
4578
4579 * c-decl.c (c_write_global_declarations): Use a different method
4580 to determine if the dump has ben initialized.
4581
c4b1a13a 45822012-09-14 Joseph Myers <joseph@codesourcery.com>
4583
4584 PR c/54552
4585 * c-typeck.c (c_cast_expr): When casting to a type requiring
4586 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4587 c_fully_fold first.
4588
bb554051 45892012-09-14 Joseph Myers <joseph@codesourcery.com>
4590
4591 PR c/54103
4592 * c-typeck.c (build_unary_op): Pass original argument of
4593 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4594 any C_MAYBE_CONST_EXPR, if it has integer operands.
4595 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4596 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4597 to c_objc_common_truthvalue_conversion, then remove any
4598 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4599 c_objc_common_truthvalue_conversion not
4600 c_common_truthvalue_conversion.
4601 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4602 call note_integer_operands for arguments with integer operands
4603 that are not integer constants.
4604
c708c6ef 46052012-09-13 Jakub Jelinek <jakub@redhat.com>
4606
4607 PR c/54559
4608 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4609 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4610
cce20430 46112012-08-31 Jakub Jelinek <jakub@redhat.com>
4612
4613 PR c/54428
4614 * c-convert.c (convert): Don't call fold_convert_loc if
4615 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4616 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4617 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4618
a90d57ed 46192012-08-24 Jakub Jelinek <jakub@redhat.com>
4620
4621 PR c/54355
4622 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4623 for nested and empty_ok arguments in the call to
4624 c_parser_declaration_or_fndef.
4625
f003f5dc 46262012-08-17 Jakub Jelinek <jakub@redhat.com>
4627
4628 * c-tree.h (c_last_sizeof_arg): Declare.
4629 * c-parser.c (struct c_tree_loc_pair): New type.
4630 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4631 non-NULL.
4632 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4633 (c_parser_postfix_expression_after_primary): Likewise. Call
4634 sizeof_pointer_memaccess_warning if needed.
4635 (sizeof_ptr_memacc_comptypes): New function.
4636 * c-typeck.c (c_last_sizeof_arg): New global variable.
4637 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4638
a5656b73 46392012-07-24 Uros Bizjak <ubizjak@gmail.com>
4640
4641 * c-lang.h (lang_decl): Add variable_size GTY option.
4642
b9ed1410 46432012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4644
4645 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4646 * Make-lang.in: Fix dependencies.
4647
e53d55e7 46482012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4649
4650 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4651 and add language Makefile hooks.
4652 * config-lang.in: New file.
4653 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4654 add the required "normal" config-lang.in rules.
4655 * c-lang.h: Moved from gcc/ to here.
4656 * c-tree.h: Likewise.
4657 * c-objc-common.c: Likewise.
4658 * c-objc-common.h: Likewise.
4659 * c-typeck.c: Likewise.
4660 * c-convert.c: Likewise.
4661 * c-lang.c: Likewise.
4662 * c-aux-info.c: Likewise.
4663 * c-errors.c: Likewise.
4664 * gccspec.c: Likewise.
4665 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4666 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4667\f
aad93da1 4668Copyright (C) 2012-2017 Free Software Foundation, Inc.
e53d55e7 4669
4670Copying and distribution of this file, with or without modification,
4671are permitted in any medium without royalty provided the copyright
4672notice and this notice are preserved.