]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
9fc5e7a4
MM
12017-05-31 Mikhail Maltsev <maltsevm@gmail.com>
2
3 PR testsuite/80580
4 * gimple-parser.c (c_parser_gimple_if_stmt): Check for empty labels.
5
f012c8ef
DM
62017-05-30 David Malcolm <dmalcolm@redhat.com>
7
8 * c-objc-common.c (c_tree_printer): Gain bool and const char **
9 parameters.
10
3cd211af
MS
112017-05-24 Martin Sebor <msebor@redhat.com>
12
13 PR c/80731
14 * c-fold.c (c_fully_fold_internal): Adjust.
15 * c-typeck.c (parser_build_unary_op): Adjust.
16
fd71a9a2
TS
172017-05-23 Thomas Schwinge <thomas@codesourcery.com>
18
19 * c-parser.c (OACC_KERNELS_CLAUSE_MASK): Add
20 "PRAGMA_OACC_CLAUSE_NUM_GANGS", "PRAGMA_OACC_CLAUSE_NUM_WORKERS",
21 "VECTOR_LENGTH".
22
92fa0f9e
MP
232017-05-23 Marek Polacek <polacek@redhat.com>
24
25 * c-parser.c (c_parser_compound_statement_nostart): Remove redundant
26 quotes.
27
d11c168a
JJ
282017-05-22 Jakub Jelinek <jakub@redhat.com>
29
30 * c-fold.c (c_fully_fold_internal): Save the c_fully_fold_internal
31 result for SAVE_EXPR operand and set SAVE_EXPR_FOLDED_P even if
32 it returned invariant. Call tree_invariant_p unconditionally
33 afterwards to decide whether to return expr or op0.
34
58aca9d9
NS
352017-05-22 Nathan Sidwell <nathan@acm.org>
36
37 * c-decl.c (c_parse_final_cleanups): Drop TDI_tu handling.
38
7fd549d2
TS
392017-05-19 Thomas Schwinge <thomas@codesourcery.com>
40
41 * c-parser.c (c_parser_omp_clause_default): Handle
42 "OMP_CLAUSE_DEFAULT_PRESENT".
43
6ecd2339
BE
442017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
45
46 * config-lang.in (gtfiles): Add c-family/c-format.c.
47
8a57ecff
NS
482017-05-18 Nathan Sidwell <nathan@acm.org>
49
50 * c-decl.c (pushdecl_top_level): Delete unused function.
51
6574d78e
MP
522017-05-18 Marek Polacek <polacek@redhat.com>
53
54 * c-decl.c (match_builtin_function_types): Use NULL_TREE instead of 0.
55 (check_earlier_gotos): Likewise.
56 (define_label): Likewise.
57 (pending_xref_error): Likewise.
58 (smallest_type_quals_location): Likewise.
59 (grokdeclarator): Likewise.
60 (grokparms): Likewise.
61 (identifier_global_value): Likewise.
62 * c-typeck.c (set_nonincremental_init_from_string): Likewise.
63 (find_init_member): Likewise.
64
e3455240
MP
652017-05-18 Marek Polacek <polacek@redhat.com>
66
67 * c-decl.c (start_decl): Use false/true instead of 0/1.
68 (grokdeclarator): Likewise.
69 (finish_struct): Likewise.
70 (start_function): Change the return type to bool. Use false/true
71 instead of 0/1.
72 (declspecs_add_qual): Use UNKNOWN_LOCATION instead of 0.
73 * c-tree.h (start_function): Update.
74 * c-typeck.c (same_translation_unit_p): Change the return type to bool.
75 (set_designator): Change the return type to bool. Use false/true
76 instead of 0/1.
77
3fa8871b
MP
782017-05-17 Marek Polacek <polacek@redhat.com>
79
80 * c-decl.c: Use NULL_TREE instead of 0 where appropriate.
81 * c-typeck.c: Likewise.
82
142473df
MP
832017-05-17 Marek Polacek <polacek@redhat.com>
84
85 PR sanitizer/80659
86 * c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
87 DECL_IGNORED_P even for non-static compound literals.
88
1a817418
ML
892017-05-17 Martin Liska <mliska@suse.cz>
90
91 * c-decl.c (c_parse_final_cleanups): Introduce dump_flags_t type and
92 use it instead of int type.
93
b2fa0a8b
MP
942017-05-17 Marek Polacek <polacek@redhat.com>
95
96 * c-convert.c (convert): Replace c_save_expr with save_expr. Don't
97 call c_fully_fold.
98 (convert) <case COMPLEX_TYPE>: Remove special handling of COMPLEX_TYPEs.
99 * c-decl.c (grokdeclarator): Replace c_save_expr with save_expr.
100 * c-fold.c (c_fully_fold_internal): Handle SAVE_EXPR.
101 * c-parser.c (c_parser_declaration_or_fndef): Replace c_save_expr with
102 save_expr.
103 (c_parser_conditional_expression): Likewise.
104 * c-tree.h (SAVE_EXPR_FOLDED_P): Define.
105 * c-typeck.c (build_modify_expr): Replace c_save_expr with save_expr.
106 (process_init_element): Likewise.
107 (build_binary_op): Likewise.
108 (handle_omp_array_sections_1): Likewise.
109
1e47f02b
TS
1102017-05-12 Thomas Schwinge <thomas@codesourcery.com>
111
112 * c-parser.c (c_parser_omp_clause_num_gangs)
113 (c_parser_omp_clause_num_workers)
114 (c_parser_omp_clause_vector_length): Merge functions into...
115 (c_parser_oacc_single_int_clause): ... this new function. Adjust
116 all users.
117
c24e924f
NS
1182017-05-11 Nathan Sidwell <nathan@acm.org>
119
120 * gimple-parser.c: Don't #include tree-dump.h.
121
c587104e
MM
1222017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
123
124 PR testsuite/80580
125 * gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.
126
67ac9a9d
MM
1272017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
128
129 PR testsuite/80580
130 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
131 incorrect __MEM syntax.
132
ac4eb40f
MM
1332017-05-11 Mikhail Maltsev <maltsevm@gmail.com>
134
135 PR testsuite/80580
136 * gimple-parser.c (c_parser_gimple_unary_expression): Check argument
137 type of unary '*'.
138
641da50a
NS
1392017-05-09 Nathan Sidwell <nathan@acm.org>
140
141 * c-tree.h (pushdecl): Declare.
142
56d35585
DM
1432017-05-05 David Malcolm <dmalcolm@redhat.com>
144
145 * c-decl.c (warn_defaults_to): Replace report_diagnostic
146 with diagnostic_report_diagnostic.
147 * c-errors.c (pedwarn_c99): Likewise.
148 (pedwarn_c90): Likewise.
149
815d9cc6
XR
1502017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
151
152 PR c++/80038
153 * c-gimplify.c (c_gimplify_expr): Remove calls to
154 cilk_gimplifY_call_params_in_spawned_fn.
155
1c4ea66f
DM
1562017-04-25 David Malcolm <dmalcolm@redhat.com>
157
158 * c-parser.c (c_parser_struct_or_union_specifier): Add fix-it
159 hint for removing extra semicolon.
160
666f7903
JJ
1612017-04-21 Jakub Jelinek <jakub@redhat.com>
162
163 PR c/80468
164 * c-decl.c (finish_declspecs) <case cts_int_n>: If int_n_idx is not
165 enabled, set specs->type to integer_type_node.
166
5764ee3c
JW
1672017-04-03 Jonathan Wakely <jwakely@redhat.com>
168
169 * c-array-notation.c: Fix typo in comment.
170
10fa8dfb
MP
1712017-03-29 Marek Polacek <polacek@redhat.com>
172
173 PR c/79730
174 * c-decl.c (finish_decl): Check VAR_P.
175
a9e4a1a5
JJ
1762017-03-27 Jakub Jelinek <jakub@redhat.com>
177
178 PR middle-end/80162
179 * c-tree.h (c_mark_addressable): Add array_ref_p argument.
180 * c-typeck.c (c_mark_addressable): Likewise. Look through
181 VIEW_CONVERT_EXPR unless array_ref_p and VCE is from VECTOR_TYPE
182 to ARRAY_TYPE.
183 (build_array_ref): Pass true as array_ref_p to c_mark_addressable.
184
ee3ff394
MP
1852017-03-23 Marek Polacek <polacek@redhat.com>
186
187 * c-tree.h: Remove a C_RID_YYCODE reference.
188
4d1b8e70
JJ
1892017-03-21 Jakub Jelinek <jakub@redhat.com>
190
191 PR c/80097
192 * c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
193 optional COMPOUND_EXPR with ubsan instrumentation.
194
31dc71a8
MP
1952017-03-17 Marek Polacek <polacek@redhat.com>
196
197 * c-parser.c: Add C11 references.
198
d579c385
MP
1992017-03-15 Marek Polacek <polacek@redhat.com>
200
201 * c-parser.c (c_parser_enum_specifier): Remove redundant line.
202
85059a38
MP
2032017-03-11 Marek Polacek <polacek@redhat.com>
204
205 * c-decl.c (implicit_decl_warning): Add a comment. Fix formatting.
206
2f6f187a
DM
2072017-03-10 David Malcolm <dmalcolm@redhat.com>
208
209 PR translation/79848
210 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
211 "%qs".
212 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
213
36618428
MP
2142017-03-09 Marek Polacek <polacek@redhat.com>
215
216 PR sanitizer/79757
217 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
218 parameter declarations with initializers.
219
01e5af5a
JJ
2202017-03-09 Jakub Jelinek <jakub@redhat.com>
221
222 PR c/79969
223 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
224 TYPE_STUB_DECL.
225
a71dbc63
JJ
2262017-03-07 Jakub Jelinek <jakub@redhat.com>
227
228 PR c/79834
229 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
230 for "may only be used in compound statements" diagnostics, change it
231 such that the same translatable string is used for all pragmas. For
232 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
233 diagnostics.
234 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
235 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
236 "may only be used in compound statements" diagnostics, such that the
237 same translatable string is used for all pragmas.
238
1ff4bae6
MP
2392017-03-04 Marek Polacek <polacek@redhat.com>
240
241 PR c/79847
242 * c-decl.c (implicit_decl_warning): Add missing space.
243
7f5a7d78
MP
2442017-03-03 Marek Polacek <polacek@redhat.com>
245
246 PR c/79758
247 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
248 current_function_prototype_arg_types is error_mark_node. Fix
249 formatting. Use TREE_VALUE instead of TREE_TYPE.
250
883c8f06
JJ
2512017-03-03 Jakub Jelinek <jakub@redhat.com>
252
79c9b7a8
JJ
253 PR c/79837
254 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
255 %<min%> or %<max%> in the diagnostics, instead mention identifier.
256 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
257 diagnostics.
258
883c8f06
JJ
259 PR c/79836
260 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
261 instead of %<_Generic>.
262 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
263 (c_parser_omp_target_exit_data): Use %<release%> instead of
264 %<release>.
265
324ff1a0
JJ
2662017-02-28 Jakub Jelinek <jakub@redhat.com>
267
268 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
269 instead of just cond ? "..." : "...".
270 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
271 for "enter"/"exit" keyword.
272 (c_finish_oacc_routine): Don't use %s to supply portions of the
273 message.
274
4227c9ad
JJ
2752017-02-24 Jakub Jelinek <jakub@redhat.com>
276
277 PR c++/79588
278 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
279 handle -Wrestrict here.
280 * c-typeck.c (build_function_call_vec): Adjust
281 check_function_arguments caller.
282
5d972e66
RB
2832017-02-23 Richard Biener <rguenther@suse.de>
284
285 PR c/79684
286 * gimple-parser.c (c_parser_gimple_statement): Use set_error
287 to initialize c_exprs to return.
288 (c_parser_gimple_binary_expression): Likewise.
289 (c_parser_gimple_unary_expression): Likewise.
290 (c_parser_gimple_postfix_expression): Likewise.
291
61ac5ebe
MP
2922017-02-22 Marek Polacek <polacek@redhat.com>
293
294 PR c/79662
295 * c-typeck.c (convert_arguments): Handle error_mark_node.
296
41d1b0b1
PK
2972017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
298
299 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
300 value of c_parser_parse_ssa_name against error_mark_node and emit
301 error if ssa name is anonymous and written as default definition.
302
eab1f169
PK
3032017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
304
305 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
306 FMA_EXPR.
307
bcac0b4d
JJ
3082017-02-16 Jakub Jelinek <jakub@redhat.com>
309
310 PR c++/79512
311 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
312 ignore #pragma omp target even when not followed by identifier.
313
1be33173
PK
3142017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
315
316 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
317 (c_parser_gimple_unary_expression): Likewise.
318
aa326bfb
JJ
3192017-02-13 Jakub Jelinek <jakub@redhat.com>
320
321 * c-parser.c (c_parser_oacc_declare): Add missing space in
322 diagnostics.
323
8a398bc5
PK
3242017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
325
326 PR c/79478
327 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
328 set_c_expr_source_range when parsing ssa-name.
329
3dcde5ef
PG
3302017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
331 Richard Biener <rguenther@suse.de>
332
333 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
334 building IL when arguments are error_mark_node.
335 (c_parser_gimple_unary_expression): Likewise.
336 (c_parser_gimple_if_stmt): Likewise.
337 (c_parser_gimple_switch_stmt): Likewise.
338 (c_parser_gimple_return_stmt): Likewise.
339 (c_parser_parse_ssa_name): When name lookup fails do not build
340 an SSA name. Use undeclared rather than not declared in error
341 reporting.
342
192b048b
MP
3432017-02-09 Marek Polacek <polacek@redhat.com>
344
345 PR c/79428
346 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
347 instead of c_parser_skip_until_found.
348
56f71478
JJ
3492017-02-09 Jakub Jelinek <jakub@redhat.com>
350
351 PR c/79431
352 * c-parser.c (c_parser_omp_declare_target): Don't invoke
353 symtab_node::get on automatic variables.
354
02889d23
CLT
3552016-02-09 Nathan Sidwell <nathan@codesourcery.com>
356 Chung-Lin Tang <cltang@codesourcery.com>
357
358 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
359 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
360 semantic checking.
361 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
362
7af4b20d
RB
3632017-02-07 Richard Biener <rguenther@suse.de>
364
365 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
366 (c_parser_gimple_postfix_expression_after_primary):
367 Do not use c_build_function_call_vec to avoid folding and promotion.
368 Simplify.
369
e5e391d6
MO
3702017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
371
372 PR lto/79061
373 * c-decl.c (pop_scope): Pass main_input_filename to
374 build_translation_unit_decl.
375
c2e84327
DM
3762017-01-24 David Malcolm <dmalcolm@redhat.com>
377
378 * c-parser.c: Include "read-rtl-function.h" and
379 "run-rtl-passes.h".
380 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
381 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
382 production. Update for renaming of field "gimple_pass" to
383 "gimple_or_rtl_pass". If __RTL was seen, call
384 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
385 to an auto_timevar, to cope with early exit.
386 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
387 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
388 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
389 Handle RID_RTL.
390 (c_parser_parse_rtl_body): New function.
391 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
392 (struct c_declspecs): Rename field "gimple_pass" to
393 "gimple_or_rtl_pass". Add field "rtl_p".
394 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
395 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
396 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
397 (c_parser_gimple_or_rtl_pass_list): ...this.
398
2ebd93e1
MP
3992017-01-20 Marek Polacek <polacek@redhat.com>
400
401 PR c/64279
402 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
403
b1c95bb5
RB
4042017-01-13 Richard Biener <rguenther@suse.de>
405
406 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
407 nops.
408
25329913
RB
4092017-01-13 Richard Biener <rguenther@suse.de>
410
411 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
412 _Literal ( type-name ) number.
413
6bb4ea5c
RB
4142017-01-12 Richard Biener <rguenther@suse.de>
415
416 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
417 __MEM.
418
6b5b4e9c
JJ
4192017-01-11 Jakub Jelinek <jakub@redhat.com>
420
421 PR c++/72813
422 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
423 PCH file.
424
e3252775
RB
4252017-01-11 Richard Biener <rguenther@suse.de>
426
427 PR bootstrap/79052
428 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
429 returns on parse errors.
430
a9342885
MP
4312017-01-04 Marek Polacek <polacek@redhat.com>
432
433 PR c++/64767
434 * c-parser.c (c_parser_postfix_expression): Mark zero character
435 constants by setting original_type in c_expr.
436 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
437 with a zero character constant.
438 (char_type_p): New function.
439
5dd9a9d0
DM
4402017-01-04 David Malcolm <dmalcolm@redhat.com>
441
442 * c-parser.c (c_parser_declaration_or_fndef): Create a
443 rich_location at init_loc and parse it to start_init.
444 (last_init_list_comma): New global.
445 (c_parser_braced_init): Update last_init_list_comma when parsing
446 commas. Pass it to pop_init_level. Pass location of closing
447 brace to pop_init_level.
448 (c_parser_postfix_expression_after_paren_type): Create a
449 rich_location at type_loc and parse it to start_init.
450 (c_parser_omp_declare_reduction): Likewise for loc.
451 * c-tree.h (start_init): Add rich_location * param.
452 (pop_init_level): Add location_t param.
453 * c-typeck.c (struct initializer_stack): Add field
454 "missing_brace_richloc".
455 (start_init): Add richloc param, use it to initialize
456 the stack node's missing_brace_richloc.
457 (last_init_list_comma): New decl.
458 (finish_implicit_inits): Pass last_init_list_comma to
459 pop_init_level.
460 (push_init_level): When finding missing open braces, add fix-it
461 hints to the richloc.
462 (pop_init_level): Add "insert_before" param and pass it
463 when calling pop_init_level. Add fixits about missing
464 close braces to any richloc. Use the richloc for the
465 -Wmissing-braces warning.
466 (set_designator): Pass last_init_list_comma to pop_init_level.
467 (process_init_element): Likewise.
468
cbe34bb5
JJ
4692017-01-01 Jakub Jelinek <jakub@redhat.com>
470
471 Update copyright years.
472
d17680f3
JJ
4732016-12-21 Jakub Jelinek <jakub@redhat.com>
474
0dba7960
JJ
475 PR bootstrap/78817
476 * c-typeck.c (build_function_call_vec): If check_function_arguments
477 returns true, set TREE_NO_WARNING on CALL_EXPR.
478
d17680f3
JJ
479 PR c/77767
480 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
481 to *expr instead of overwriting it.
482
aa90531e
RB
4832016-12-20 Richard Biener <rguenther@suse.de>
484
485 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
486 error recovery.
487 (c_parser_gimple_statement): Only build assigns for non-error
488 stmts.
489 (c_parser_gimple_postfix_expression_after): Improve error recovery.
490
629b3d75
MJ
4912016-12-14 Martin Jambor <mjambor@suse.cz>
492
493 * c-parser.c: Include omp-general.h and omp-offload.h instead of
494 omp-low.h.
495 (c_finish_oacc_routine): Adjusted call to
496 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
497 to use their new names.
498 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
499 use its new name.
500 (c_parser_oacc_update): Likewise.
501 (c_parser_omp_simd): Likewise.
502 (c_parser_omp_target_update): Likewise.
503 * c-typeck.c: Include omp-general.h instead of omp-low.h.
504 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
505 name.
506 (c_finish_omp_cancellation_point): Likewise.
507 * gimple-parser.c: Do not include omp-low.h
508
c5af52eb
CP
5092016-12-02 Cesar Philippidis <cesar@codesourcery.com>
510 James Norris <jnorris@codesourcery.com>
511
512 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
513 EXIT_DATA,WAIT} are not used in compound statements.
514 (c_parser_oacc_enter_exit_data): Update diagnostics.
515
48330c93
BE
5162016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
517
518 PR c++/71973
519 * c-decl.c (diagnose_mismatched_decls): Use
520 OPT_Wbuiltin_declaration_mismatch here too.
521
899ca90e 5222016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
523 Alan Hayward <alan.hayward@arm.com>
524 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
525
526 * c-decl.c (merge_decls): Use SET_DECL_MODE.
527 (make_label, finish_struct): Likewise.
528
1ee62b92 5292016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 530 Richard Biener <rguenther@suse.de>
22b15758 531
8e745a17
JJ
532 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
533 * config-lang.in (gtfiles): Add c/c-parser.h.
534 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
535 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
536 * c-parser.c (enum c_id_kind, struct c_token,
537 c_parser_next_token_is, c_parser_next_token_is_not,
538 c_parser_next_token_is_keyword,
539 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
540 Split out to ...
541 * c-parser.h: ... new header.
542 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 543 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
544 c_token_starts_typename, c_parser_next_token_starts_declspecs,
545 c_parser_next_tokens_start_declaration, c_parser_consume_token,
546 c_parser_error, c_parser_require, c_parser_skip_until_found,
547 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
548 c_parser_type_name): Export.
549 (c_parser_tokens_buf): New function.
550 (c_parser_error): Likewise.
551 (c_parser_set_error): Likewise.
552 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
553 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
554 via c_parser_parse_gimple_body.
8e745a17
JJ
555 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
556 c_token_starts_typename, c_parser_next_token_starts_declspecs,
557 c_parser_next_tokens_start_declaration, c_parser_consume_token,
558 c_parser_error, c_parser_require, c_parser_skip_until_found,
559 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
560 c_parser_type_name): Declare.
1ee62b92
PG
561 (struct c_parser): Declare forward.
562 (c_parser_tokens_buf): Declare.
8e745a17
JJ
563 (c_parser_error): Likewise.
564 (c_parser_set_error): Likewise.
565 * gimple-parser.c: New file.
566 * gimple-parser.h: Likewise.
1ee62b92 567
22b15758
UB
5682016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
569
570 PR c/35503
571 * c-parser.c (c_parser_postfix_expression_after_primary): Call
572 warn_for_restrict.
573
84ff4775
LCW
5742016-09-11 Le-Chun Wu <lcwu@google.com>
575 Mark Wielaard <mjw@redhat.com>
576
577 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
578 to the given -Wshadow= variant.
579
4d0cdd0c
TP
5802016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
581
582 * c-typeck.c: Include memmodel.h.
583
1202f33e
JJ
5842016-10-13 Jakub Jelinek <jakub@redhat.com>
585
586 PR target/77957
587 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
588 instead of lhd_return_null_tree_v.
589
8a14afd0
BS
5902016-10-07 Bernd Schmidt <bschmidt@redhat.com>
591
592 PR c++/69733
593 * c-decl.c (smallest_type_quals_location): New static function.
594 (grokdeclarator): Try to find the correct location for an ignored
595 qualifier.
596
81fea426
MP
5972016-09-26 Marek Polacek <polacek@redhat.com>
598
599 PR c/7652
600 * c-decl.c (pop_scope): Add gcc_fallthrough.
601
6022016-09-26 Marek Polacek <polacek@redhat.com>
603
604 PR c/7652
605 * c-parser.c (struct c_token): Add flags field.
606 (c_lex_one_token): Pass it to c_lex_with_flags.
607 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
608 into IFN_FALLTHROUGH.
609 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
610 attribute fallthrough after a case label or default label.
611 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
612
9a2300e9
MP
6132016-09-24 Marek Polacek <polacek@redhat.com>
614
615 PR c/77490
616 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
617 have boolean value. Warn about ++/-- on booleans.
618
7de76362
JJ
6192016-09-23 Jakub Jelinek <jakub@redhat.com>
620
621 * c-parser.c (incomplete_record_decls): Remove unnecessary
622 = vNULL initialization of file scope vec.
623
5b73d2ab
MP
6242016-09-16 Marek Polacek <polacek@redhat.com>
625
626 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
627
e51fbec3
MP
6282016-09-14 Marek Polacek <polacek@redhat.com>
629
630 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
631 (fix_array_notation_expr): Likewise.
632 * c-decl.c (finish_decl): Likewise.
633 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
634 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
635 (function_to_pointer_conversion): Use false instead of 0.
636 (convert_lvalue_to_rvalue): Likewise.
637 (parser_build_unary_op): Likewise.
638 (build_atomic_assign): Likewise.
639 (build_unary_op): Change nonconvert parameter type to bool, use
640 true/false instead of 1/0.
641 (build_binary_op): Use true instead of 1.
642
254830ba
DM
6432016-09-13 David Malcolm <dmalcolm@redhat.com>
644
645 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
646 of add_fixit_insert to add_fixit_insert_before.
647
4c13ba17
MP
6482016-09-13 Marek Polacek <polacek@redhat.com>
649
650 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
651 it.
652
54dcdb88
BE
6532016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
654
655 PR c++/77496
656 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
657 COMPOUND_EXPR to warn_for_omitted_condop.
658
e5106e27
DM
6592016-09-07 David Malcolm <dmalcolm@redhat.com>
660
661 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
662 c_get_substring_location for this new langhook.
663
9dc5773f
JJ
6642016-09-02 Jakub Jelinek <jakub@redhat.com>
665
666 PR c/65467
667 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
668 flag_openmp.
669 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
670 instead of mark_exp_read on low_bound/length expression.
671 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
672 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
673 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
674 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
675 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
676 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
677 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
678 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
679 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
680 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
681 instead of mark_expr_read.
682 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
683 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
684 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
685 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
686 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
687 array section bases outside of depend clause, for depend clause
688 use convert_lvalue_to_rvalue on the base.
689 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
690 linear, aligned, map, to and from clauses.
691 (c_omp_clause_copy_ctor): New function.
692
295844f6
MP
6932016-09-01 Marek Polacek <polacek@redhat.com>
694
695 PR c/7652
696 * c-typeck.c (composite_type): Add FALLTHRU comment.
697
089af25c
DM
6982016-08-31 David Malcolm <dmalcolm@redhat.com>
699
700 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
701 to the insertion fixits for "struct", "union", and "enum".
702
f9087798
DM
7032016-08-30 David Malcolm <dmalcolm@redhat.com>
704
705 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
706 rather than add_fixit_misspelled_id.
707 (undeclared_variable): Likewise.
708 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
709 now-redundant "here" params from add_fixit_insert method calls.
710 (c_parser_parameter_declaration): Likewise.
711 * c-typeck.c (build_component_ref): Remove now-redundant range
712 param from add_fixit_replace method calls.
713
ebef225f
MP
7142016-08-25 Marek Polacek <polacek@redhat.com>
715
716 * c-typeck.c (parser_build_binary_op): Pass LHS to
717 warn_logical_not_parentheses.
718
fe377a48
MP
7192016-08-25 Marek Polacek <polacek@redhat.com>
720
721 PR c/77323
722 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
723 or _FloatN or _FloatNx is not supported.
724 (finish_declspecs): Set type to integer_type_node when _FloatN or
725 _FloatNx is not supported.
726
c65699ef
JM
7272016-08-19 Joseph Myers <joseph@codesourcery.com>
728
729 PR c/32187
730 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
731 (struct c_declspecs): Add field floatn_nx_idx.
732 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
733 and _FloatNx type specifiers.
734 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
735 (c_parser_declspecs, c_parser_attribute_any_word)
736 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
737 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
738 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
739 narrower than double.
740
2f1364c2
JJ
7412016-08-12 Jakub Jelinek <jakub@redhat.com>
742 Martin Liska <mliska@suse.cz>
743
744 PR c/67410
745 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
746 % to determine val element to change. Assert that
747 wchar_bytes * charwidth fits into val array.
748
191816a3
MP
7492016-08-12 Marek Polacek <polacek@redhat.com>
750
751 PR c/7652
752 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
753 (c_parser_postfix_expression): Likewise.
754 * c-typeck.c (build_unary_op): Adjust fall through comment.
755 (c_mark_addressable): Likewise.
756
b95a64bb
JJ
7572016-08-11 Jakub Jelinek <jakub@redhat.com>
758
759 PR c/72816
760 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
761 array member through typedef, for orig_qual_indirect == 0 clear
762 orig_qual_type.
763
895aa8e1
DM
7642016-08-08 David Malcolm <dmalcolm@redhat.com>
765
766 PR c/64955
767 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
768 this up to selftest::run_c_tests.
769 (selftest::run_c_tests): New function.
770
0b212d8c
TS
7712016-08-04 Thomas Schwinge <thomas@codesourcery.com>
772
ae9281fc
TS
773 * c-parser.c (struct oacc_routine_data): Add error_seen and
774 fndecl_seen members.
775 (c_finish_oacc_routine): Use these.
776 (c_parser_declaration_or_fndef): Adjust.
777 (c_parser_oacc_routine): Likewise. Support more C language
778 constructs, and improve diagnostics. Move pragma context
779 checking...
780 (c_parser_pragma): ... here.
781
0b212d8c
TS
782 * c-parser.c (struct oacc_routine_data): New.
783 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
784 Simplify code.
785 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
786 declare target" attribute.
787
76e2c821
JB
7882016-08-01 Jan Beulich <jbeulich@suse.com>
789
790 * c-fold.c (c_fully_fold_internal): Also emit shift count
791 warnings for vector types.
792 * c-typeck.c (build_binary_op): Likewise.
793
f618a472
MP
7942016-07-29 Marek Polacek <polacek@redhat.com>
795
796 PR c/71742
797 * c-decl.c (finish_struct): Rephrase an error message.
798
efd0786f
MP
799 PR c/71853
800 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
801 to error node for invalid code.
802
e00dceaf
MP
803 PR c/71573
804 * c-decl.c (implicitly_declare): Return decl early not only for
805 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
806
673a107a
JJ
8072016-07-29 Jakub Jelinek <jakub@redhat.com>
808
809 PR c/71969
810 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
811 on GNU extern inline functions.
812
a5b5c8b6
MP
8132016-07-29 Marek Polacek <polacek@redhat.com>
814
815 PR c/71583
816 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
817 check expr.value.
818
e3fe09c1
UB
8192016-07-22 Uros Bizjak <ubizjak@gmail.com>
820
821 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
822
7c8f7eaa
DM
8232016-07-20 David Malcolm <dmalcolm@redhat.com>
824
825 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
826 spellcheck-tree.h
827 (best_macro_match): Likewise, converting from a typedef to a
828 subclass.
829 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
830 (lookup_name_fuzzy): Update for change of best_macro_match to a
831 subclass with a ctor that calls cpp_forall_identifiers.
832
de6a69ee
DM
8332016-07-20 David Malcolm <dmalcolm@redhat.com>
834
835 * c-decl.c (implicit_decl_warning): Update for conversion of
836 return type of lookup_name_fuzzy to const char *.
837 (undeclared_variable): Likewise.
838 (lookup_name_fuzzy): Convert return type from tree to
839 const char *.
840 * c-parser.c (c_parser_declaration_or_fndef): Update for
841 conversion of return type of lookup_name_fuzzy to const char *.
842 (c_parser_parameter_declaration): Likewise.
843
b1c9c068
CP
8442016-07-15 Cesar Philippidis <cesar@codesourcery.com>
845
846 * c-parser.c (c_parser_oacc_declare): Don't scan for
847 GOMP_MAP_POINTER.
848 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
849 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
850 zero-length subarrays.
851
ddbbcb19
JJ
8522016-07-15 Jakub Jelinek <jakub@redhat.com>
853
854 PR c/71858
855 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
856 instead of FUZZY_LOOKUP_NAME.
857 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
858 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
859
dd36b877
JJ
8602016-07-14 Jakub Jelinek <jakub@redhat.com>
861
862 PR c/71858
863 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
864
8c681247
TS
8652016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
866
867 * c-parser.c (c_parser_generic_selection): Make type of variable
868 auto_vec.
869 (c_parser_omp_declare_simd): Likewise.
870
bf4fa671
TS
8712016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
872
873 * c-decl.c (struct c_struct_parse_info): Change member types
874 from vec to auto_vec.
875 (start_struct): Adjust.
876 (finish_struct): Likewise.
877
557e8c49
JJ
8782016-07-02 Jakub Jelinek <jakub@redhat.com>
879
880 PR c/71719
881 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
882
54d19c3b
TS
8832016-06-29 Thomas Schwinge <thomas@codesourcery.com>
884
885 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
886 Move pragma context checking into...
887 (c_parser_omp_cancellation_point): ... here, and improve
888 diagnostic messages.
889 * c-typeck.c (c_finish_omp_cancel)
890 (c_finish_omp_cancellation_point): Improve diagnostic messages.
891
152ef731
JJ
8922016-06-29 Jakub Jelinek <jakub@redhat.com>
893
894 PR c/71685
895 * c-typeck.c (c_build_qualified_type): Don't clear
896 C_TYPE_INCOMPLETE_VARS for the main variant.
897
8982016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
899
900 PR c/71552
901 * c-typeck.c (output_init_element): Diagnose incompatible types
902 before non-constant initializers.
903
e9ac1f86
JJ
9042016-06-28 Jakub Jelinek <jakub@redhat.com>
905
906 * Make-lang.in: Don't cat ../stage_current if it does not exist.
907
277d7ee0
AK
9082016-06-23 Andi Kleen <ak@linux.intel.com>
909
910 * Make-lang.in: Add support for autofdo.
911
1a4f11c8
DM
9122016-06-22 David Malcolm <dmalcolm@redhat.com>
913
914 PR c/70339
915 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
916 (implicit_decl_warning): When issuing warnings for implicit
917 declarations, attempt to provide a suggestion via
918 lookup_name_fuzzy.
919 (undeclared_variable): Likewise when issuing errors.
920 (lookup_name_in_scope): Likewise.
921 (struct edit_distance_traits<cpp_hashnode *>): New struct.
922 (best_macro_match): New typedef.
923 (find_closest_macro_cpp_cb): New function.
924 (lookup_name_fuzzy): New function.
925 * c-parser.c: Include gcc-rich-location.h.
926 (c_token_starts_typename): Split out case CPP_KEYWORD into...
927 (c_keyword_starts_typename): ...this new function.
928 (c_parser_declaration_or_fndef): When issuing errors about
929 missing "struct" etc, add a fixit. For other kinds of errors,
930 attempt to provide a suggestion via lookup_name_fuzzy.
931 (c_parser_parms_declarator): When looking ahead to detect typos in
932 type names, also reject CPP_KEYWORD.
933 (c_parser_parameter_declaration): When issuing errors about
934 unknown type names, attempt to provide a suggestion via
935 lookup_name_fuzzy.
936 * c-tree.h (c_keyword_starts_typename): New prototype.
937
5a578671
JM
9382016-06-20 Joseph Myers <joseph@codesourcery.com>
939
940 PR c/71601
941 * c-typeck.c (build_conditional_expr): Return error_mark_node if
942 c_common_type returns error_mark_node.
943
3f8257db 9442016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
945
946 PR c/69507
947 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
948 __alignof__ (expression).
949
6a3f203c
DM
9502016-06-14 David Malcolm <dmalcolm@redhat.com>
951
952 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
953
264757fb
DM
9542016-06-14 David Malcolm <dmalcolm@redhat.com>
955
956 * c-typeck.c (build_component_ref): Simplify fixit code by
957 using gcc_rich_location::add_fixit_misspelled_id.
958 (set_init_label): Likewise.
959
f7e4f2e3
DM
9602016-06-13 David Malcolm <dmalcolm@redhat.com>
961
962 * c-parser.c (c_parser_initelt): Provide location of name for new
963 location_t param of set_init_label.
964 * c-tree.h (set_init_label): Add location_t param.
965 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
966 param and use it when issuing error messages about unrecognized
967 field names. Attempt to provide a fixit hint if appropriate,
968 otherwise update the error message to provide the type name.
969
4b1ffdb1
TS
9702016-06-10 Thomas Schwinge <thomas@codesourcery.com>
971
972 PR c/71381
973 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
974 Loosen checking.
975
44a845ca
MS
9762016-06-08 Martin Sebor <msebor@redhat.com>
977 Jakub Jelinek <jakub@redhat.com>
978
979 PR c++/70507
980 PR c/68120
981 * c-typeck.c (convert_arguments): Don't promote last argument
982 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
983
92a5f2ba
MP
9842016-06-08 Marek Polacek <polacek@redhat.com>
985
986 PR c/71418
987 * c-decl.c (grokdeclarator): Check TYPE_P.
988
08203f73
MP
989 PR c/71426
990 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
991 code.
992
6ffd47b7
DM
9932016-06-07 David Malcolm <dmalcolm@redhat.com>
994
995 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
996 and structure element reference, capture the location of the
997 element name token and pass it to build_component_ref.
998 (c_parser_postfix_expression_after_primary): Likewise for
999 structure element dereference.
1000 (c_parser_omp_variable_list): Likewise for
1001 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
1002 * c-tree.h (build_component_ref): Add location_t param.
1003 * c-typeck.c (build_component_ref): Add location_t param
1004 COMPONENT_LOC. Use it, if available, when issuing hints about
1005 mispelled member names to provide a fixit replacement hint.
1006
1f40cff3
MP
10072016-06-06 Marek Polacek <polacek@redhat.com>
1008
1009 PR c/71362
1010 * c-parser.c (c_parser_direct_declarator): Set location.
1011
5545a907
MP
10122016-06-06 Marek Polacek <polacek@redhat.com>
1013
1014 * c-typeck.c (comptypes_internal): Handle comparisons of
1015 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
1016 TYPE_REF_CAN_ALIAS_ALL.
1017
b605f663
CLT
10182016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
1019
1020 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
1021 arguments as addressable when async clause exists.
1022
00631022
JJ
10232016-05-30 Jakub Jelinek <jakub@redhat.com>
1024
1025 PR c++/71349
1026 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
1027 when combined with target construct.
1028
7211a097
JJ
10292016-05-26 Jakub Jelinek <jakub@redhat.com>
1030
1031 * c-parser.c (c_parser_omp_clause_schedule): Warn if
1032 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
1033
95efe6b6
MP
10342016-05-25 Marek Polacek <polacek@redhat.com>
1035
1036 PR c/71265
1037 * c-decl.c (c_make_fname_decl): Don't check seen_error.
1038
a23faf7a
MP
1039 PR c/71266
1040 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
1041
e46c7770
CP
10422016-05-24 Cesar Philippidis <cesar@codesourcery.com>
1043
1044 * c-parser.c (c_parser_oacc_declare): Add support for
1045 GOMP_MAP_FIRSTPRIVATE_POINTER.
1046 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
1047 argument with enum c_omp_region_type ort.
1048 (handle_omp_array_sections): Likewise. Update call to
1049 handle_omp_array_sections_1.
1050 (c_finish_omp_clauses): Add specific errors and warning messages for
1051 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
1052 call to handle_omp_array_sections.
1053
a04e69c0
TS
10542016-05-24 Thomas Schwinge <thomas@codesourcery.com>
1055
1056 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
1057
f17a223d
RB
10582016-05-24 Richard Biener <rguenther@suse.de>
1059
1060 PR middle-end/70434
1061 PR c/69504
1062 * c-typeck.c (build_array_ref): Do not complain about indexing
1063 non-lvalue vectors. Adjust for function name change.
1064
79063edd
MS
10652016-05-20 Martin Sebor <msebor@redhat.com>
1066
1067 PR c/71115
1068 * c-typeck.c (error_init): Use
1069 expansion_point_location_if_in_system_header.
1070 (warning_init): Same.
1071
8a40fef3
DM
10722016-05-19 David Malcolm <dmalcolm@redhat.com>
1073
1074 PR c/71171
1075 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
1076 in error-handling.
1077 (c_parser_postfix_expression): Likewise.
1078 * c-tree.h (c_expr::set_error): New method.
1079 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
1080 that result's range is initialized.
1081
e9892350
JG
10822016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1083
1084 * c-typeck.c (parser_build_unary_op): Fix formatting.
1085
8fad45f5
MW
10862016-05-16 Matthew Wahab <matthew.wahab@arm.com>
1087
1088 * c-decl.c (grokdeclarator): Remove errmsg and use of
1089 targetm.invalid_return_type.
1090 (grokparms): Remove errmsg and use of
1091 targetm.invalid_parameter_type.
1092
aa4b467b
JM
10932016-05-13 Joseph Myers <joseph@codesourcery.com>
1094
1095 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
1096 function return type.
1097
4f2e1536
MP
10982016-05-12 Marek Polacek <polacek@redhat.com>
1099
1100 PR c/70756
1101 * c-decl.c (build_compound_literal): Pass LOC down to
1102 c_incomplete_type_error.
1103 * c-tree.h (require_complete_type): Adjust declaration.
1104 (c_incomplete_type_error): Likewise.
1105 * c-typeck.c (require_complete_type): Add location parameter, pass it
1106 down to c_incomplete_type_error.
1107 (c_incomplete_type_error): Add location parameter, pass it down to
1108 error_at.
1109 (build_component_ref): Pass location down to c_incomplete_type_error.
1110 (default_conversion): Pass location down to require_complete_type.
1111 (build_array_ref): Likewise.
1112 (build_function_call_vec): Likewise.
1113 (convert_arguments): Likewise.
1114 (build_unary_op): Likewise.
1115 (build_c_cast): Likewise.
1116 (build_modify_expr): Likewise.
1117 (convert_for_assignment): Likewise.
1118 (c_finish_omp_clauses): Likewise.
1119
d6e83a8d
MM
11202016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1121
1122 PR c/43651
1123 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
1124 is enabled.
1125 * c-errors.c (pedwarn_c90): Return true if warned.
1126 * c-tree.h (pedwarn_c90): Change return type to bool.
1127 (enum c_declspec_word): Add new enumerator cdw_atomic.
1128
5c3a10fb
MP
11292016-05-11 Marek Polacek <polacek@redhat.com>
1130
1131 PR c++/71024
1132 * c-decl.c (diagnose_mismatched_decls): Factor out code to
1133 diagnose_mismatched_attributes and call it.
1134
cf68d92c
MP
11352016-05-10 Marek Polacek <polacek@redhat.com>
1136
1137 PR c/70255
1138 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
1139 on a declaration following the definition.
1140
351f85c5
JJ
11412016-05-05 Jakub Jelinek <jakub@redhat.com>
1142
1143 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
1144 parse it through to c_parser_c99_block_statement.
1145 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
1146 caller.
1147
deef7113
MP
11482016-05-04 Marek Polacek <polacek@redhat.com>
1149
1150 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
1151 OPT_Wdangling_else.
1152
de55efd5
MP
11532016-05-04 Marek Polacek <polacek@redhat.com>
1154
1155 PR c/48778
1156 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
1157 for macro expansions.
1158
79ce98bc
MP
11592016-05-03 Marek Polacek <polacek@redhat.com>
1160
1161 PR c/70859
1162 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
1163 check_builtin_function_arguments.
1164
fb2647aa
RB
11652016-05-03 Richard Biener <rguenther@suse.de>
1166
1167 * Make-lang.in (cc1-checksum.c): For stage-final re-use
1168 the checksum from the previous stage.
1169
77886428
CP
11702016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1171
1172 * c-parser.c (c_parser_oacc_all_clauses): Update call to
1173 c_finish_omp_clauses.
1174 (c_parser_omp_all_clauses): Likewise.
1175 (c_parser_oacc_cache): Likewise.
1176 (c_parser_oacc_loop): Likewise.
1177 (omp_split_clauses): Likewise.
1178 (c_parser_omp_declare_target): Likewise.
1179 (c_parser_cilk_all_clauses): Likewise.
1180 (c_parser_cilk_for): Likewise.
1181 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
1182 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
1183
7176a4a0
MP
11842016-05-02 Marek Polacek <polacek@redhat.com>
1185
1186 PR c/70851
1187 * c-decl.c (grokdeclarator): Diagnose when array's size has an
1188 incomplete type.
1189
e7ff0319
CP
11902016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1191
1192 PR middle-end/70626
1193 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
1194 OACC_LOOP_CLAUSE_MASK.
1195 (c_parser_oacc_kernels_parallel): Update call to
1196 c_oacc_split_loop_clauses.
1197
9f405ce1
AM
11982016-04-28 Andrew MacLeod <amacleod@redhat.com>
1199
1200 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
1201 argument to build_modify_expr in two cases.
1202
c1e1f433
BS
12032016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1204
1205 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1206 warn_for_memset instead of warning directly here.
1207
2448a956
MP
12082016-04-26 Marek Polacek <polacek@redhat.com>
1209
1210 PR c/67784
1211 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1212 out of ...
1213 (c_parser_for_statement): ... here.
1214 (c_parser_if_statement): Use it.
1215 (c_parser_switch_statement): Use it.
1216 (c_parser_while_statement): Use it.
1217
b02a5e26
MP
1218 PR c/70791
1219 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1220
477d4906
IV
12212016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1222
1223 PR c++/69363
1224 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1225 instead of c_finish_cilk_clauses.
1226 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1227 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1228 floating-point variables in the linear clause for Cilk Plus.
1229
fe37c7af
MM
12302016-04-18 Michael Matz <matz@suse.de>
1231
1232 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1233 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1234
949505a9
MP
12352016-04-15 Marek Polacek <polacek@redhat.com>
1236
1237 PR c/70671
1238 * c-typeck.c (build_unary_op): Pass location down to error and
1239 warning call.
1240
dda1bf61
JJ
12412016-04-15 Jakub Jelinek <jakub@redhat.com>
1242
1243 PR c/70436
1244 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1245 where needed.
1246 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1247 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1248 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1249 Adjust c_parser_pragma callers.
1250 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1251 caller.
1252 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1253 c_parser_statement.
1254 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1255 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1256 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1257 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1258 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1259 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1260 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1261 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1262 down where needed.
1263 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1264 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1265 calls.
1266
99cd9857
MP
12672016-04-13 Marek Polacek <polacek@redhat.com>
1268
1269 PR c/70436
1270 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1271 adjust callers.
1272 (c_parser_statement): Likewise.
1273 (c_parser_c99_block_statement): Likewise.
1274 (c_parser_while_statement): Likewise.
1275 (c_parser_for_statement): Likewise.
1276 (c_parser_if_body): Don't set IF_P here.
1277 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1278 about dangling else here.
1279 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1280 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1281 warn about dangling else here.
1282
f13355da
MP
12832016-04-04 Marek Polacek <polacek@redhat.com>
1284
1285 PR c/70307
1286 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1287
5fde6a45
MP
12882016-03-31 Marek Polacek <polacek@redhat.com>
1289
1290 PR c/70297
1291 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1292
4bbf545b
DM
12932016-03-18 David Malcolm <dmalcolm@redhat.com>
1294
1295 PR c/70281
1296 * c-parser.c (c_parser_postfix_expression): Set the source range
1297 for uses of "__builtin_types_compatible_p".
1298
fcc2b74f
JJ
12992016-03-17 Jakub Jelinek <jakub@redhat.com>
1300
1301 PR c/70280
1302 * c-typeck.c (composite_type): Don't count void_list_node
1303 into len, if the list is terminated by void_list_node, start
1304 with void_list_node instead of NULL for newargs. Stop
1305 at void_list_node.
1306
ab4c578f
MP
13072016-03-16 Marek Polacek <polacek@redhat.com>
1308
1309 PR c/70093
1310 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1311 nested functions returning VM types.
1312
96b3c82d
CP
13132016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1314
1315 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1316 when calling c_finish_omp_clauses.
1317
29b9828f
BS
13182016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1319
1320 PR c/69824
1321 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1322 for later.
1323
7ff6ca38
MP
13242016-03-04 Marek Polacek <polacek@redhat.com>
1325
1326 PR c/69798
1327 * c-parser.c (c_parser_postfix_expression): Call
1328 c_parser_cast_expression rather than c_parser_postfix_expression.
1329
686e2237
JJ
13302016-03-01 Jakub Jelinek <jakub@redhat.com>
1331
1332 PR c/69796
1333 PR c/69974
1334 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1335 of incomplete decls to error_mark_node.
1336
0b05329b
MP
13372016-02-24 Marek Polacek <polacek@redhat.com>
1338
1339 PR c/69819
1340 * c-decl.c (finish_decl): Don't update the copy of the type of a
1341 different decl type.
1342
067fbd8b
JJ
13432016-02-23 Jakub Jelinek <jakub@redhat.com>
1344
1345 PR objc/69844
1346 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1347 in id_kind reclassification.
1348
bf14eba2
JJ
13492016-02-16 Jakub Jelinek <jakub@redhat.com>
1350
1351 PR c/69835
1352 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1353
ba539195
JN
13542016-02-16 James Norris <jnorris@codesourcery.com>
1355
1356 PR c/64748
1357 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1358
16595a1f
BS
13592016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1360
f48dfe98
BS
1361 * c-decl.c (build_null_declspecs): Zero the entire struct.
1362
16595a1f
BS
1363 PR c/69522
1364 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1365 callers changed. If nested_p is true, use it to call
1366 finish_implicit_inits.
1367 * c-tree.h (finish_implicit_inits): Declare.
1368 * c-typeck.c (finish_implicit_inits): New function. Move code
1369 from ...
1370 (push_init_level): ... here.
1371 (set_designator, process_init_element): Call finish_implicit_inits.
1372
66756373
JJ
13732016-02-11 Jakub Jelinek <jakub@redhat.com>
1374
1375 PR c/69768
1376 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1377 arguments for -Waddress warning.
1378
1066e9b5
JJ
13792016-02-04 Jakub Jelinek <jakub@redhat.com>
1380
1381 PR c/69669
1382 * c-decl.c (finish_enum): When honoring mode attribute,
1383 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1384
3a5d2ba4
JJ
13852016-01-29 Jakub Jelinek <jakub@redhat.com>
1386
1387 PR debug/69518
1388 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1389 all type variants, not just TYPE_MAIN_VARIANT.
1390
cbdd8ae0
JJ
13912016-01-27 Jakub Jelinek <jakub@redhat.com>
1392
1393 PR debug/66869
1394 * c-decl.c (c_write_global_declarations_1): Warn with
1395 warn_unused_function if static prototype without definition
1396 is not C_DECL_USED.
1397
fa74a4bc
MP
13982016-01-27 Marek Polacek <polacek@redhat.com>
1399
1400 PR c/68062
1401 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1402 to unsigned, if needed. Add -Wsign-compare warning.
1403
13f92e8d
JJ
14042016-01-26 Jakub Jelinek <jakub@redhat.com>
1405
1406 PR tree-optimization/69483
1407 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1408
cd8e73dc 14092016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1410
1411 PR c/24293
1412 * c-tree.h (incomplete_record_decls): Declare.
1413 * c-parser.c (incomplete_record_decls): Define.
1414 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1415 report error if any decl has zero size.
1416 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1417 or enum type to incomplete_record_decls.
1418
e6d6ec9e
TV
14192016-01-14 Tom de Vries <tom@codesourcery.com>
1420
1421 PR tree-optimization/68773
1422 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1423 set force_output.
1424
00083992
MP
14252016-01-14 Marek Polacek <polacek@redhat.com>
1426
1427 PR c/69262
1428 * c-decl.c (grokdeclarator): Provide more information for invalid
1429 array declarations.
1430
7443cf13
DM
14312016-01-06 David Malcolm <dmalcolm@redhat.com>
1432
1433 * c-parser.c (c_parser_unary_expression): For dereferences, build
1434 a combined location before calling build_indirect_ref, so that
1435 error reports cover the full range, manually updating the c_expr
1436 src_range.
1437
6b131d5b
MP
14382016-01-06 Marek Polacek <polacek@redhat.com>
1439
1440 PR sanitizer/69099
1441 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1442 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1443 NULL.
1444
818ab71a
JJ
14452016-01-04 Jakub Jelinek <jakub@redhat.com>
1446
1447 Update copyright years.
1448
2fe0a208
MP
14492016-01-04 Marek Polacek <polacek@redhat.com>
1450
1451 PR c/68908
1452 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1453 optimization to use __atomic_fetch_* built-in if possible.
1454
c7b48c8a
TS
14552015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1456
1457 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1458 into...
1459 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1460 all users.
1461
fda5652f
MP
14622015-12-22 Marek Polacek <polacek@redhat.com>
1463
1464 PR c/69002
1465 * c-typeck.c (build_component_ref): Warn when acessing elements of
1466 atomic structures or unions.
1467
745e411d
DM
14682015-12-21 David Malcolm <dmalcolm@redhat.com>
1469
1470 * c-typeck.c: Include "gcc-rich-location.h".
1471 (build_binary_op): In the two places that call binary_op_error,
1472 create a gcc_rich_location and populate it with the location of
1473 the binary op and its two operands.
1474
94c40e19
DM
14752015-12-16 David Malcolm <dmalcolm@redhat.com>
1476
1477 * c-parser.c (c_parser_statement_after_labels): When calling
1478 c_finish_return, Use the return expression's location if it has
1479 one, falling back to the location of the first token within it.
1480 * c-typeck.c (c_finish_return): When issuing warnings about
1481 the incorrect presence/absence of a return value, issue a note
1482 showing the declaration of the function.
1483
de67c4c3
DM
14842015-12-16 David Malcolm <dmalcolm@redhat.com>
1485
1486 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1487 to 4.
1488 (c_parser_peek_nth_token): New function.
1489 (c_parser_peek_conflict_marker): New function.
1490 (c_parser_error): Detect conflict markers and report them as such.
1491
a10704e1
DM
14922015-12-16 David Malcolm <dmalcolm@redhat.com>
1493
1494 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1495 to preserve range information for the primary expression
1496 in the call to c_parser_postfix_expression_after_primary.
1497
8062bca6
DM
14982015-12-16 David Malcolm <dmalcolm@redhat.com>
1499
1500 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1501 expression location, falling back on the first token location,
1502 rather than always using the latter.
1503
d06f8b75
MP
15042015-12-16 Marek Polacek <polacek@redhat.com>
1505
1506 PR c/64637
1507 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1508 available.
1509
2994fb91
MP
15102015-12-15 Marek Polacek <polacek@redhat.com>
1511
1512 PR c/68907
1513 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1514 artificial decl.
1515
a1b93f8d
DM
15162015-12-08 David Malcolm <dmalcolm@redhat.com>
1517
1518 * c-parser.c (c_parser_alignof_expression): Capture location of
1519 closing parenthesis (if any), or of end of unary expression, and
1520 use it to build a src_range for the expression.
1521
46c6e1e2
DM
15222015-12-08 David Malcolm <dmalcolm@redhat.com>
1523
1524 PR c/68757
1525 * c-parser.c (c_parser_get_builtin_args): Add
1526 "out_close_paren_loc" param, and write back to it.
1527 (c_parser_postfix_expression): Capture the closing
1528 parenthesis location for RID_CHOOSE_EXPR,
1529 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1530 RID_BUILTIN_SHUFFLE and use it to set the source range
1531 for such expressions; within RID_BUILTIN_COMPLEX set
1532 the underlying location.
1533
66189108
MP
15342015-12-07 Marek Polacek <polacek@redhat.com>
1535
1536 PR c/68668
1537 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1538 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1539
f187980b
EB
15402015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1541
1542 * c-tree.h (c_build_va_arg): Adjust prototype.
1543 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1544 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1545 parameter, adjust throughout and issue an error if EXPR is a component
1546 with reverse storage order.
1547
4250754e
JM
15482015-12-02 Jason Merrill <jason@redhat.com>
1549
1550 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1551 (c_fully_fold_internal, decl_constant_value_for_optimization):
1552 Move from c-common.c.
1553 * c-tree.h: Declare decl_constant_value_for_optimization.
1554 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1555
e9e32ee6
JM
15562015-12-02 Joseph Myers <joseph@codesourcery.com>
1557
1558 PR c/68162
1559 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1560 following link from declarator to next declarator. Track original
1561 qualified type and pass it to c_build_qualified_type.
1562 * c-typeck.c (c_build_qualified_type): Add arguments
1563 orig_qual_type and orig_qual_indirect.
1564
ff7a55bf
TS
15652015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1566
1567 * c-parser.c (c_parser_omp_clause_name)
1568 (c_parser_oacc_all_clauses): Alphabetical sorting.
1569
657e4e47
JJ
15702015-12-02 Jakub Jelinek <jakub@redhat.com>
1571
1572 PR c/68533
1573 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1574 for diagnostics.
1575
37d5ad46
JB
15762015-12-01 Julian Brown <julian@codesourcery.com>
1577 Cesar Philippidis <cesar@codesourcery.com>
1578 James Norris <James_Norris@mentor.com>
1579
1580 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1581 (c_parser_oacc_clause_use_device): New function.
1582 (c_parser_oacc_all_clauses): Add use_device support.
1583 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1584 (c_parser_oacc_host_data): New function.
1585 (c_parser_omp_construct): Add host_data support.
1586 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1587 * c-typeck.c (c_finish_oacc_host_data): New function.
1588 (c_finish_omp_clauses): Add use_device support.
1589
a4850ce9
JH
15902015-11-29 Jan Hubicka <hubicka@ucw.cz>
1591
1592 PR c/67106
1593 * c-decl.c: Set TYPE_PACKED in variants.
1594
b58d3df2
ML
15952015-11-27 Martin Liska <mliska@suse.cz>
1596
1597 PR c++/68312
1598 * c-array-notation.c (fix_builtin_array_notation_fn):
1599 Use release_vec_vec instead of vec::release.
1600 (build_array_notation_expr): Likewise.
1601 (fix_conditional_array_notations_1): Likewise.
1602 (fix_array_notation_expr): Likewise.
1603 (fix_array_notation_call_expr): Likewise.
1604
aec17bfe
JJ
16052015-11-27 Jakub Jelinek <jakub@redhat.com>
1606
1607 PR c/63326
1608 * c-parser.c (c_parser_compound_statement_nostart): If
1609 last_label is true, use pragma_stmt instead of pragma_compound
1610 as second c_parser_pragma argument.
1611 (c_parser_omp_ordered, c_parser_omp_target_update,
1612 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1613 false as second argument to c_parser_skip_to_pragma_eol after
1614 diagnosing standalone directives used in pragma_stmt context.
1615
688c4de0
IV
16162015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1617
1618 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1619 with "if (ENABLE_OFFLOADING)".
1620
cbd03aee
DM
16212015-11-23 David Malcolm <dmalcolm@redhat.com>
1622
1623 PR objc/68438
1624 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1625 for various Objective-C constructs: Class.name syntax,
1626 @selector(), @protocol(), @encode(), and [] message syntax.
1627
a87a86e1
DM
16282015-11-20 David Malcolm <dmalcolm@redhat.com>
1629
1630 PR 62314
1631 * c-typeck.c (should_suggest_deref_p): New function.
1632 (build_component_ref): Special-case POINTER_TYPE when
1633 generating a "not a structure of union" error message, and
1634 suggest a "->" rather than a ".", providing a fix-it hint.
1635
8ece8dfb
DM
16362015-11-19 David Malcolm <dmalcolm@redhat.com>
1637
1638 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1639 candidate into a new function, find_closest_identifier.
1640
433068cc
MP
16412015-11-19 Marek Polacek <polacek@redhat.com>
1642
1643 PR c/68412
1644 * c-typeck.c (parser_build_binary_op): Properly handle
1645 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1646
bef08b71
DM
16472015-11-17 David Malcolm <dmalcolm@redhat.com>
1648
1649 * c-parser.c (set_c_expr_source_range): Bulletproof both
1650 overloaded implementations against NULL expr->value.
1651 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1652 values.
1653 (c_parser_unary_expression): Likewise when handling addresses of
1654 labels.
1655 (c_parser_postfix_expression): Likewise for statement expressions,
1656 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1657 __builtin_va_arg, and for __builtin_offset_of.
1658 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1659 src_range using the range of the braced initializer.
1660 (c_parser_transaction_expression): Set src_range for "ret" to a
1661 sane pair of values.
1662
fff77217
KY
16632015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1664
1665 * c-parser.c (c_finish_omp_declare_simd): Look for
1666 "simd" attribute as well. Update error message.
1667
1d899da2
TS
16682015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1669
1670 * c-parser.c (c_parser_omp_declare_target): Adjust.
1671
e4606348
JJ
16722015-11-14 Jakub Jelinek <jakub@redhat.com>
1673
1674 * c-typeck.c (c_finish_omp_clauses): Don't mark
1675 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1676
3e636daf
MP
16772015-11-14 Marek Polacek <polacek@redhat.com>
1678
1679 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1680 * c-typeck.c: Likewise.
1681
ebedc9a3
DM
16822015-11-13 David Malcolm <dmalcolm@redhat.com>
1683
1684 * c-decl.c (warn_defaults_to): Pass line_table to
1685 rich_location ctor.
1686 * c-errors.c (pedwarn_c99): Likewise.
1687 (pedwarn_c90): Likewise.
1688 * c-parser.c (set_c_expr_source_range): New functions.
1689 (c_token::get_range): New method.
1690 (c_token::get_finish): New method.
1691 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1692 based on the range from the start of the LHS to the end of the
1693 RHS.
1694 (c_parser_conditional_expression): Likewise, based on the range
1695 from the start of the cond.value to the end of exp2.value.
1696 (c_parser_binary_expression): Call set_c_expr_source_range on
1697 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1698 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1699 based on the cast_loc through to the end of the expr.
1700 (c_parser_unary_expression): Likewise, based on the
1701 op_loc through to the end of op.
1702 (c_parser_sizeof_expression) Likewise, based on the start of the
1703 sizeof token through to either the closing paren or the end of
1704 expr.
1705 (c_parser_postfix_expression): Likewise, using the token range,
1706 or from the open paren through to the close paren for
1707 parenthesized expressions.
1708 (c_parser_postfix_expression_after_primary): Likewise, for
1709 various kinds of expression.
1710 * c-tree.h (struct c_expr): Add field "src_range".
1711 (c_expr::get_start): New method.
1712 (c_expr::get_finish): New method.
1713 (set_c_expr_source_range): New decls.
1714 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1715 on ret for prefix unary ops.
1716 (parser_build_binary_op): Likewise, running from the start of
1717 arg1.value through to the end of arg2.value.
1718
ec8b536f
MP
17192015-11-13 Marek Polacek <polacek@redhat.com>
1720
1721 PR c/68320
1722 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1723
277fe616
DM
17242015-11-13 David Malcolm <dmalcolm@redhat.com>
1725
1726 * c-typeck.c: Include spellcheck.h.
1727 (lookup_field_fuzzy_find_candidates): New function.
1728 (lookup_field_fuzzy): New function.
1729 (build_component_ref): If the field was not found, try using
1730 lookup_field_fuzzy and potentially offer a suggestion.
1731
6e232ba4
JN
17322015-11-12 James Norris <jnorris@codesourcery.com>
1733 Joseph Myers <joseph@codesourcery.com>
1734
1735 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1736 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1737 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1738 and PRAGMA_OMP_CLAUSE_LINK.
1739 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1740 and PRAGMA_OACC_CLAUSE_LINK.
1741 (OACC_DECLARE_CLAUSE_MASK): New definition.
1742 (c_parser_oacc_declare): New function.
1743
9be4f715
MP
17442015-11-12 Marek Polacek <polacek@redhat.com>
1745
1746 PR c/67784
1747 * c-parser.c (c_parser_for_statement): Reclassify the token in
1748 a correct scope.
1749
e78bede6
MP
17502015-11-11 Marek Polacek <polacek@redhat.com>
1751
1752 PR c/68107
1753 PR c++/68266
1754 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1755 checking the size of an array.
1756
69f293c9
AM
17572015-11-11 Andrew MacLeod <amacleod@redhat.com>
1758
1759 * c-array-notation.c: Remove unused header files.
1760 * c-aux-info.c: Likewise.
1761 * c-convert.c: Likewise.
1762 * c-decl.c: Likewise.
1763 * c-errors.c: Likewise.
1764 * c-lang.c: Likewise.
1765 * c-objc-common.c: Likewise.
1766 * c-parser.c: Likewise.
1767 * c-typeck.c: Likewise.
1768 * gccspec.c: Likewise.
1769
3a40d81d
NS
17702015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1771 Cesar Philippidis <cesar@codesourcery.com>
1772 James Norris <jnorris@codesourcery.com>
1773 Julian Brown <julian@codesourcery.com>
1774 Nathan Sidwell <nathan@codesourcery.com>
1775
1776 c/
1777 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1778 routine arg.
1779 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1780 (c_parser_pragma): Parse 'acc routine'.
1781 (OACC_ROUTINE_CLAUSE_MARK): Define.
1782 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1783
fc402eec
AA
17842015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1785
1786 PR debug/67192
1787 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1788 location of the backward-goto to the start of the loop body.
1789
f6b0b3db
AA
17902015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1791
1792 PR debug/67192
1793 * c-parser.c (c_parser_while_statement): Finish the loop before
1794 parsing ahead for misleading indentation.
1795 (c_parser_for_statement): Likewise.
1796
ee45a32d
EB
17972015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1798
1799 * c-decl.c (finish_struct): If the structure has reverse storage
1800 order, rewrite the type of array fields with scalar component. Call
1801 maybe_apply_pragma_scalar_storage_order on entry.
1802 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1803 errors on bit-fields and reverse SSO here and not...
1804 (c_mark_addressable): ...here.
1805 (output_init_element): Adjust call to initializer_constant_valid_p.
1806 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1807
8a645150
DM
18082015-11-06 David Malcolm <dmalcolm@redhat.com>
1809
1810 * c-decl.c (warn_defaults_to): Update for change in signature
1811 of diagnostic_set_info.
1812 * c-errors.c (pedwarn_c99): Likewise.
1813 (pedwarn_c90): Likewise.
1814 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1815 for textinfo::set_location.
1816
7a5e4956
CP
18172015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1818 Thomas Schwinge <thomas@codesourcery.com>
1819 James Norris <jnorris@codesourcery.com>
1820
1821 * c-parser.c (c_parser_omp_clause_name): Add support for
1822 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1823 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1824 default(none) in OpenACC.
1825 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1826 arguments.
1827 (c_parser_oacc_clause_tile): New function.
1828 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1829 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1830 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1831 TILE}.
1832 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1833 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1834 FIRSTPRIVATE}.
1835 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1836 (c_parser_oacc_update): Update the error message for missing clauses.
1837 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1838 and OMP_CLAUSE_INDEPENDENT.
1839
bfcfbfa0
MP
18402015-11-05 Marek Polacek <polacek@redhat.com>
1841
1842 PR c/68090
1843 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1844 deal with pre-evaluation on invalid types.
1845
e01d41e5
JJ
18462015-11-05 Jakub Jelinek <jakub@redhat.com>
1847 Ilya Verbin <ilya.verbin@intel.com>
1848
1849 * c-parser.c: Include context.h and gimple-expr.h.
1850 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1851 monotonic together with nonmonotonic.
1852 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1853 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1854 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1855 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1856 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1857 expressions on combined target teams before the target.
1858 (c_parser_omp_declare_target): If decl has "omp declare target" or
1859 "omp declare target link" attribute, and cgraph or varpool node already
1860 exists, then set corresponding flags. Call c_finish_omp_clauses
1861 in the parenthesized extended-list syntax case.
1862 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1863 declare target.
1864 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1865 on OMP_CLAUSE_REDUCTION array sections.
1866 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1867 into the constant offset, or for variable low-bound using
1868 POINTER_PLUS_EXPR. For structure element based array sections use
1869 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1870 (c_finish_omp_clauses): Drop generic_field_head, structure
1871 elements are now always mapped even as array section bases,
1872 diagnose same var in data sharing and mapping clauses. Diagnose if
1873 linear step on declare simd is neither a constant nor a uniform
1874 parameter. Look through POINTER_PLUS_EXPR for array section
1875 reductions. Diagnose the same var or function appearing multiple
1876 times on the same directive. Fix up wording for the to clause if t
1877 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1878 modifier on kinds other than dynamic or guided or nonmonotonic
1879 modifier together with ordered clause.
1880
4bf9e5a8
TS
18812015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1882 Chung-Lin Tang <cltang@codesourcery.com>
1883
1884 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1885
2adfab87
AM
18862015-10-29 Andrew MacLeod <amacleod@redhat.com>
1887
1888 * c-array-notation.c: Reorder #include's and remove duplicates.
1889 * c-aux-info.c: Likewise.
1890 * c-convert.c: Likewise.
1891 * c-decl.c: Likewise.
1892 * c-errors.c: Likewise.
1893 * c-lang.c: Likewise.
1894 * c-objc-common.c: Likewise.
1895 * c-parser.c: Likewise.
1896 * c-typeck.c: Likewise.
1897
e922069e
JW
18982015-10-26 Jim Wilson <jim.wilson@linaro.org>
1899
1900 PR debug/66068
1901 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1902 after calling build_qualified_type.
1903
765dd391
CP
19042015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1905 Thomas Schwinge <thomas@codesourcery.com>
1906 James Norris <jnorris@codesourcery.com>
1907 Joseph Myers <joseph@codesourcery.com>
1908 Julian Brown <julian@codesourcery.com>
1909 Bernd Schmidt <bschmidt@redhat.com>
1910
1911 * c-parser.c (c_parser_oacc_shape_clause): New.
1912 (c_parser_oacc_simple_clause): New.
1913 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1914 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1915
88bae6f4
TS
19162015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1917 James Norris <jnorris@codesourcery.com>
1918 Cesar Philippidis <cesar@codesourcery.com>
1919
1920 PR c/64765
1921 PR c/64880
1922 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1923 parameters, and handle these. Adjust all users.
1924 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1925 into...
1926 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1927 all users.
1928 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1929 declare functions.
1930 (c_finish_omp_construct): Declare function.
1931 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1932 Merge functions into...
1933 (c_finish_omp_construct): ... this new function.
1934
a8fc2579
RB
19352015-10-22 Richard Biener <rguenther@suse.de>
1936
1937 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1938 before folding a MINUS_EXPR.
1939
e9122ef6
MP
19402015-10-21 Marek Polacek <polacek@redhat.com>
1941
1942 PR c/68024
1943 * c-decl.c (start_function): Warn about vararg functions without
1944 a prototype.
1945
9f47c7e5
IE
19462015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1947
1948 * c-typeck.c (build_conditional_expr): Use boolean vector
1949 type for vector comparison.
1950 (build_vec_cmp): New.
1951 (build_binary_op): Use build_vec_cmp for comparison.
1952
fa60eeb9
MP
19532015-10-20 Marek Polacek <polacek@redhat.com>
1954
1955 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1956
2c7020eb
MP
19572015-10-20 Marek Polacek <polacek@redhat.com>
1958
1959 PR c/67964
1960 * c-parser.c (c_parser_attributes): Break out of the loop if the
1961 token after an attribute isn't a comma.
1962
d9a6bd32
JJ
19632015-10-13 Jakub Jelinek <jakub@redhat.com>
1964 Aldy Hernandez <aldyh@redhat.com>
1965
1966 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1967 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1968 (c_parser_omp_variable_list): Handle structure elements for
1969 map, to and from clauses. Handle array sections in reduction
1970 clause. Formatting fixes.
1971 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1972 if clause modifiers.
1973 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1974 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1975 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1976 c_parser_omp_clause_is_device_ptr): New functions.
1977 (c_parser_omp_clause_ordered): Parse optional parameter.
1978 (c_parser_omp_clause_reduction): Handle array reductions.
1979 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1980 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1981 functions.
1982 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1983 (c_parser_omp_clause_depend_sink): New function.
1984 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1985 (c_parser_omp_clause_map): Parse release/delete map kinds and
1986 optional always modifier.
1987 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1988 and c_finish_omp_clauses callers.
1989 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1990 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1991 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1992 (OMP_CRITICAL_CLAUSE_MASK): Define.
1993 (c_parser_omp_critical): Parse critical clauses.
1994 (c_parser_omp_for_loop): Handle doacross loops, adjust
1995 c_finish_omp_for and c_finish_omp_clauses callers.
1996 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1997 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1998 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1999 (c_parser_omp_for): Disallow ordered clause when combined with
2000 distribute. Disallow linear clause when combined with distribute
2001 and not combined with simd.
2002 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
2003 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
2004 parse clauses and if depend clause is found, don't parse a body.
2005 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
2006 Allow target parallel without for after it.
2007 (OMP_TASK_CLAUSE_MASK): Add priority clause.
2008 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
2009 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
2010 invalid kinds.
2011 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
2012 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
2013 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
2014 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
2015 functions.
2016 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
2017 defaultmap and is_device_ptr clauses.
2018 (c_parser_omp_target): Parse target parallel and target simd. Set
2019 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
2020 and target exit data. Diagnose invalid map kinds.
2021 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
2022 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
2023 construct.
2024 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
2025 &omp_priv.
2026 (OMP_TASKLOOP_CLAUSE_MASK): Define.
2027 (c_parser_omp_taskloop): New function.
2028 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
2029 handle PRAGMA_OMP_TASKLOOP.
2030 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
2031 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
2032 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
2033 Add IS_OMP argument, handle structure element bases, diagnose
2034 bitfields, pass IS_OMP recursively, diagnose known zero length
2035 array sections in depend clauses, handle array sections in reduction
2036 clause, diagnose negative length even for pointers.
2037 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
2038 types, pass IS_OMP down to handle_omp_array_sections_1, handle
2039 array sections in reduction clause, set
2040 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
2041 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
2042 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
2043 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
2044
21ba0cea
MP
20452015-10-06 Marek Polacek <polacek@redhat.com>
2046
2047 * c-parser.c (c_parser_statement_after_labels): Use
2048 protected_set_expr_location.
2049 (c_parser_omp_clause_num_gangs): Likewise.
2050 (c_parser_omp_clause_num_threads): Likewise.
2051 (c_parser_omp_clause_num_workers): Likewise.
2052 (c_parser_omp_clause_vector_length): Likewise.
2053 (c_parser_omp_clause_num_teams): Likewise.
2054 (c_parser_omp_clause_thread_limit): Likewise.
2055 * c-typeck.c (build_c_cast): Likewise.
2056 (c_cast_expr): Likewise.
2057
624d31fe
RS
20582015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2059
2060 * c-typeck.c (c_tree_equal): Use real_equal instead of
2061 REAL_VALUES_EQUAL.
2062
b8fd7909
JM
20632015-10-04 Jason Merrill <jason@redhat.com>
2064
2065 * c-parser.c (c_lex_one_token): Handle @synchronized.
2066 * c-decl.c (match_builtin_function_types): A declaration of a built-in
2067 can change whether the function is transaction_safe.
2068
1c7485af
MP
20692015-10-02 Marek Polacek <polacek@redhat.com>
2070
2071 PR c/67730
2072 * c-typeck.c (convert_for_assignment): Use the expansion point
2073 location throughout.
2074
3e3b8d63
MP
20752015-10-02 Marek Polacek <polacek@redhat.com>
2076
2077 PR c/64249
2078 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
2079 and pass it down to c_parser_if_statement.
2080 (c_parser_else_body): Add CHAIN parameter and pass it down to
2081 c_parser_statement_after_labels.
2082 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
2083 duplicated if-else-if conditions.
2084
aabef2de
MP
20852015-10-01 Marek Polacek <polacek@redhat.com>
2086
2087 * c-typeck.c (convert_for_assignment): Improve commentary.
2088
de8ddd5f
MP
20892015-09-30 Marek Polacek <polacek@redhat.com>
2090
2091 PR c/67730
2092 * c-typeck.c (c_finish_return): Use the expansion point location for
2093 certain "return with value" warnings.
2094
c4914de6
MLI
20952015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2096
2097 * c-parser.c (pragma_lex): Add loc argument.
2098
0e36f5c7
MP
20992015-09-15 Marek Polacek <polacek@redhat.com>
2100
2101 PR c/67580
2102 * c-decl.c (tag_exists_p): New function.
2103 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
2104 struct/union/enum keywords are missing.
2105 * c-tree.h (tag_exists_p): Declare.
2106
2f3bb934
MP
21072015-09-15 Marek Polacek <polacek@redhat.com>
2108
2109 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
2110 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
2111 Return NULL_TREE instead of 0.
2112 (lookup_name): Return NULL_TREE instead of 0.
2113 (lookup_name_in_scope): Likewise.
2114 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
2115 (parser_xref_tag): Use false instead of 0.
2116 (start_struct): Use true instead of 1.
2117 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
2118
aa256c4a
MP
21192015-09-14 Marek Polacek <polacek@redhat.com>
2120
2121 * c-typeck.c (set_nonincremental_init_from_string): Use
2122 HOST_WIDE_INT_M1U when shifting a negative value.
2123
dbb68221
MW
21242015-09-09 Mark Wielaard <mjw@redhat.com>
2125
2126 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
2127 parm against NULL.
2128
a8a098ac
JJ
21292015-09-10 Jakub Jelinek <jakub@redhat.com>
2130
2131 PR c/67502
2132 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
2133 into OMP_FOR_PRE_BODY rather than before the loop.
2134
f4b189d5
JJ
21352015-09-09 Jakub Jelinek <jakub@redhat.com>
2136
0bb99c11
JJ
2137 PR c/67501
2138 * c-parser.c (c_parser_oacc_all_clauses,
2139 c_parser_omp_all_clauses): Remove invalid clause from
2140 list of clauses even if parser->error is set.
2141
fce5e5e3
JJ
2142 PR c/67500
2143 * c-parser.c (c_parser_omp_clause_aligned,
2144 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
2145 test for errors.
2146 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
2147 error_mark_node.
2148
f4b189d5
JJ
2149 PR c/67495
2150 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
2151 instead of c_parser_unary_expression. If the result is !lvalue_p,
2152 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
2153
b2aaf235
MP
21542015-09-04 Marek Polacek <polacek@redhat.com>
2155
2156 PR sanitizer/67279
2157 * c-typeck.c (build_binary_op): Don't instrument static initializers.
2158
1807ffc1
MS
21592015-09-03 Martin Sebor <msebor@redhat.com>
2160
2161 PR c/66516
8b652e65
JJ
2162 * c-typeck.c (convert_arguments, parser_build_unary_op,
2163 build_conditional_expr, c_cast_expr, convert_for_assignment,
2164 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
2165 reject_gcc_builtin.
2166 (c_decl_implicit): Define.
2167
d04ff417
MP
21682015-09-02 Marek Polacek <polacek@redhat.com>
2169
2170 PR c/67432
2171 * c-parser.c (c_parser_enum_specifier): Give a better error for
2172 an empty enum.
2173
a79683d5
TS
21742015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2175
2176 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
2177
191a6b94
MP
21782015-08-12 Marek Polacek <polacek@redhat.com>
2179
2180 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
2181 LOC to it.
2182
420a9d9b
MP
21832015-08-03 Marek Polacek <polacek@redhat.com>
2184
2185 PR c/67088
2186 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
2187 Use it.
2188 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
2189
992118a1
PP
21902015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2191
2192 * c-parser.c (c_parser_if_body): Take token_indent_info
2193 argument. Call warn_for_misleading_indentation even when the
2194 body is a semicolon. Extract token_indent_infos corresponding
2195 to the guard, body and next tokens. Adjust call to
2196 warn_for_misleading_indentation accordingly.
2197 (c_parser_else_body): Likewise.
2198 (c_parser_if_statement): Likewise.
2199 (c_parser_while_statement): Likewise.
2200 (c_parser_for_statement): Likewise.
2201
46308474
LFSM
22022015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
2203 Manuel López-Ibáñez <manu@gcc.gnu.org>
2204
2205 * c-decl.c (get_parm_info): Remove static var. Update warning
2206 message.
2207
05b28fd6
MP
22082015-07-27 Marek Polacek <polacek@redhat.com>
2209
2210 PR c++/66555
2211 PR c/54979
2212 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2213
451b5e48
MP
22142015-07-20 Marek Polacek <polacek@redhat.com>
2215
2216 PR c++/55095
2217 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2218 (build_binary_op): Warn about left shift overflows.
2219
1916bcb5
AM
22202015-07-09 Andrew MacLeod <amacleod@redhat.com>
2221
2222 * c-array-notation.c: Adjust includes for flags.h changes.
2223 * c-objc-common.c: Likewise.
2224
c7131fb2
AM
22252015-07-07 Andrew MacLeod <amacleod@redhat.com>
2226
2227 * c-array-notation.c: Adjust includes.
2228 * c-aux-info.c: Likewise.
2229 * c-convert.c: Likewise.
2230 * c-decl.c: Likewise.
2231 * c-errors.c: Likewise.
2232 * c-lang.c: Likewise.
2233 * c-objc-common.c: Likewise.
2234 * c-parser.c: Likewise.
2235 * c-typeck.c: Likewise.
2236
da2e71c9
MLI
22372015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2238
2239 PR fortran/66605
2240 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2241
b155cfd9
MP
22422015-06-29 Marek Polacek <polacek@redhat.com>
2243
2244 PR c/66322
2245 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2246 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2247 about -Wswitch-bool here.
2248 (do_case): Update c_add_case_label call.
2249 (c_finish_case): Update c_do_switch_warnings call.
2250
31521951
MP
22512015-06-27 Marek Polacek <polacek@redhat.com>
2252
2253 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2254
22d03525
MP
22552015-06-26 Marek Polacek <polacek@redhat.com>
2256
2257 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2258 INDIRECT_REF_P.
2259 * c-typeck.c (array_to_pointer_conversion): Likewise.
2260 (build_unary_op): Likewise.
2261 (c_finish_return): Likewise.
2262
f0889939
AM
22632015-06-25 Andrew MacLeod <amacleod@redhat.com>
2264
2265 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2266 * c-parser.c: Likewise.
2267
8d67ee55
RS
22682015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2269
2270 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2271 instead of pointer_hash.
2272 (detect_field_duplicates): Likewise.
2273
0ae9bd27
MP
22742015-06-25 Marek Polacek <polacek@redhat.com>
2275
2276 * c-array-notation.c: Use VAR_P throughout.
2277 * c-decl.c: Likewise.
2278 * c-objc-common.c: Likewise.
2279 * c-parser.c: Likewise.
2280 * c-typeck.c: Likewise.
2281
62f9079a
MP
22822015-06-25 Marek Polacek <polacek@redhat.com>
2283
2284 * c-decl.c: Use is_global_var throughout.
2285 * c-parser.c: Likewise.
2286 * c-typeck.c: Likewise.
2287
abb226c9
AM
22882015-06-17 Andrew MacLeod <amacleod@redhat.com>
2289
2290 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2291 * c-aux-info.c: Likewise.
2292 * c-convert.c: Likewise.
2293 * c-decl.c: Likewise.
2294 * c-errors.c: Likewise.
2295 * c-lang.c: Likewise.
2296 * c-objc-common.c: Likewise.
2297 * c-parser.c: Likewise.
2298 * c-typeck.c: Likewise.
2299
8cbababc
JH
23002015-06-11 Jan Hubicka <hubicka@ucw.cz>
2301
2302 PR middle-end/66325
2303 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2304 variants.
2305
a0349665
PMR
23062015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2307
2308 * c-decl.c (pop_scope): Register the main translation unit
2309 through the new debug hook.
2310
13fdf2e2
AM
23112015-06-08 Andrew MacLeod <amacleod@redhat.com>
2312
2313 * c-array-notation.c : Adjust include files.
2314 * c-aux-info.c : Likewise.
2315 * c-convert.c : Likewise.
2316 * c-decl.c : Likewise.
2317 * c-errors.c : Likewise.
2318 * c-lang.c : Likewise.
2319 * c-lang.h : Likewise.
2320 * c-objc-common.c : Likewise.
2321 * c-parser.c : Likewise.
2322 * c-typeck.c : Likewise.
2323
d7438551
AH
23242015-06-05 Aldy Hernandez <aldyh@redhat.com>
2325
2326 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2327 immediately clobber it.
2328 (c_write_global_declarations_1): Remove call to
2329 check_global_declaration_1.
2330 (c_write_global_declarations_2): Remove.
2331 (c_write_final_cleanups): Rename from c_write_global_declarations.
2332 Remove call to finalize_compilation_unit.
2333 Remove calls to debugging hooks.
2334 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2335 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2336 * c-tree.h: Remove c_write_global_declarations.
2337
ecb9f223
AM
23382015-06-04 Andrew MacLeod <amacleod@redhat.com>
2339
2340 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2341 * c-aux-info.c: Likewise.
2342 * c-convert.c: Likewise.
2343 * c-decl.c: Likewise.
2344 * c-errors.c: Likewise.
2345 * c-lang.c: Likewise.
2346 * c-objc-common.c: Likewise.
2347 * c-parser.c: Likewise.
2348 * c-typeck.c: Likewise.
2349
9482b620
MP
23502015-06-04 Marek Polacek <polacek@redhat.com>
2351
2352 PR c/66341
2353 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2354 it is a lvalue.
2355
bc51ace3
PK
23562015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2357
2358 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2359 Warn for empty struct.
2360 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2361
ea5b45b6
AT
23622015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2363
2364 * c-decl.c (start_function): Call plugin before parsing.
2365 (finish_function): Call plugin after parsing.
2366
c2d47482
PK
23672015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2368
2369 PR c/49551
2370 * c-decl.c (merge_decls): Merge DECL_COMMON.
2371
a95492ab
JW
23722015-05-22 Jim Wilson <jim.wilson@linaro.org>
2373
2374 * Make-lang.in (check_gcc_pallelize): Define.
2375
fd5c817a
MP
23762015-05-22 Marek Polacek <polacek@redhat.com>
2377
2378 PR c/47043
2379 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2380 attributes.
2381
c7b70a3c
MP
23822015-05-21 Marek Polacek <polacek@redhat.com>
2383
2384 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2385 DECL_BUILT_IN.
2386
21b634ae
MP
23872015-05-20 Marek Polacek <polacek@redhat.com>
2388
2389 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2390 * c-typeck.c: Likewise.
2391
296a8c2f
MP
23922015-05-19 Marek Polacek <polacek@redhat.com>
2393
2394 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2395
41b37d5e
JJ
23962015-05-19 Jakub Jelinek <jakub@redhat.com>
2397
2398 PR middle-end/66199
2399 * c-parser.c (c_parser_omp_for_loop): Don't add
2400 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2401 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2402 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2403 constructs.
2404
fab27f52
MM
24052015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2406
2407 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2408 swaps.
fab27f52 2409
40de31cf
MLI
24102015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2411
2412 PR fortran/44054
2413 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2414 accessor function.
2415
3aa3c9fc
MP
24162015-05-14 Marek Polacek <polacek@redhat.com>
2417
2418 PR c/66066
2419 PR c/66127
2420 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2421 rather than with 0.
2422
c3388e62
DM
24232015-05-12 David Malcolm <dmalcolm@redhat.com>
2424
2425 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2426 to add a call to warn_for_misleading_indentation.
2427 (c_parser_else_body): Likewise, adding param "else_loc".
2428 (c_parser_if_statement): Check for misleading indentation.
2429 (c_parser_while_statement): Likewise.
2430 (c_parser_for_statement): Likewise.
2431
755e528f
MP
24322015-05-08 Marek Polacek <polacek@redhat.com>
2433
2434 PR c/64918
2435 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2436 (output_init_element): Likewise.
2437
0173bd2a
MP
24382015-05-07 Marek Polacek <polacek@redhat.com>
2439
2440 PR c/65179
2441 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2442 value.
2443
9babc352
MP
24442015-04-30 Marek Polacek <polacek@redhat.com>
2445
2446 * c-typeck.c (set_init_label): Call error_at instead of error and
2447 pass LOC to it.
2448
ac9f18db
MP
2449 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2450 the type of a decl.
2451
ec3fba51
MP
2452 * c-typeck.c (c_build_va_arg): Clarify the error message.
2453
b811915d
TS
24542015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2455
2456 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2457 OMP_STANDALONE_CLAUSES.
2458
f3075008
MP
24592015-04-28 Marek Polacek <polacek@redhat.com>
2460
2461 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2462
4e81b788
MP
24632015-04-28 Marek Polacek <polacek@redhat.com>
2464
2465 PR c/65901
2466 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2467
6c1db78e
MP
24682015-04-25 Marek Polacek <polacek@redhat.com>
2469
2470 PR c/52085
2471 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2472 attribute.
2473
5c4abbb8
MP
24742015-04-23 Marek Polacek <polacek@redhat.com>
2475
2476 PR c/65345
2477 * c-decl.c (set_labels_context_r): New function.
2478 (store_parm_decls): Call it via walk_tree_without_duplicates.
2479 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2480 instead of create_tmp_var. Build TARGET_EXPR instead of
2481 COMPOUND_EXPR.
2482 (build_atomic_assign): Use create_tmp_var_raw instead of
2483 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2484
06aca1d5
IV
24852015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2486
2487 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2488 (c_parser_omp_target_update): Add missed %> to error_at ().
2489
8fba1830
BRF
24902015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2491
2492 PR target/55143
2493 * c-decl.c (c_default_pointer_mode): Remove definition.
2494 * c-tree.h (c_default_pointer_mode): Remove declaration.
2495
62021f64
TB
24962015-03-27 Tobias Burnus <burnus@net-b.de>
2497
2498 PR c/65586
2499 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2500 error out.
2501 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2502 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2503 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2504
9b65e171
JJ
25052015-03-19 Jakub Jelinek <jakub@redhat.com>
2506
2507 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2508 attribute for DECL_EXTERNAL VAR_DECLs.
2509
17958621
JJ
25102015-03-11 Jakub Jelinek <jakub@redhat.com>
2511
2512 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2513 argument.
2514
7ccb1a11
JJ
25152015-03-10 Jakub Jelinek <jakub@redhat.com>
2516
2517 PR c/65120
2518 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2519 before preparing arguments to warn_logical_not_parentheses.
2520
01177669
JJ
25212015-03-09 Jakub Jelinek <jakub@redhat.com>
2522
2523 PR c/65120
2524 * c-typeck.c (parser_build_binary_op): Don't warn for
2525 !!x == y or !b == y where b is _Bool.
2526
802ac282
MP
25272015-03-09 Marek Polacek <polacek@redhat.com>
2528
2529 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2530 * c-decl.c (grokdeclarator): Likewise.
2531 * c-typeck.c (build_binary_op): Likewise.
2532
e5165b60
MP
25332015-02-27 Marek Polacek <polacek@redhat.com>
2534
2535 PR c/65228
2536 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2537
065d214c
MP
25382015-02-14 Marek Polacek <polacek@redhat.com>
2539
2540 PR c/64768
2541 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2542 declared through a typedef name.
2543
e5d9235b
MP
25442015-02-13 Marek Polacek <polacek@redhat.com>
2545
2546 PR c/65050
2547 * c-decl.c (grokdeclarator): Print also the type when giving
2548 the error message about array's incomplete element type.
2549
fa01ffcc
JJ
25502015-02-11 Jakub Jelinek <jakub@redhat.com>
2551
2552 PR c/64824
2553 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2554 check in the POP macro.
2555
c3e38a03
MP
25562015-02-09 Marek Polacek <polacek@redhat.com>
2557
2558 PR c/64856
2559 * c-typeck.c (process_init_element): Don't always wrap
2560 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2561 initializing a range of elements.
2562
4886ec8e
JJ
25632015-02-04 Jakub Jelinek <jakub@redhat.com>
2564
2565 PR c/64824
2566 PR c/64868
2567 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2568
c3e38a03 25692015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2570
2571 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2572 processing enum declaration.
2573
7b33f0c8
MP
25742015-01-29 Marek Polacek <polacek@redhat.com>
2575
2576 PR c/64709
2577 * c-typeck.c (pop_init_level): If constructor_elements has
2578 exactly one element with integer_zerop value, set constructor_zeroinit
2579 to 1. Remove braces around warning_init call.
2580
dea63e49
JJ
25812015-01-27 Jakub Jelinek <jakub@redhat.com>
2582
2583 PR c/64766
2584 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2585 of FUNCTION_DECLs with error_mark_node.
2586
d38f7dce
JJ
25872015-01-26 Jakub Jelinek <jakub@redhat.com>
2588
2589 PR c/64778
2590 * c-typeck.c (convert_arguments): Return -1 if there are
2591 error_args, even if we've diagnosed too many arguments.
2592
cbf5d0e7
RB
25932015-01-21 Richard Biener <rguenther@suse.de>
2594
2595 PR middle-end/64313
2596 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2597 for builtins the user declared correctly.
2598
41dbbb37
TS
25992015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2600 Bernd Schmidt <bernds@codesourcery.com>
2601 Cesar Philippidis <cesar@codesourcery.com>
2602 James Norris <jnorris@codesourcery.com>
2603 Jakub Jelinek <jakub@redhat.com>
2604 Ilmir Usmanov <i.usmanov@samsung.com>
2605
2606 * c-parser.c: Include "gomp-constants.h".
2607 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2608 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2609 Use OMP_CLAUSE_SET_MAP_KIND.
2610 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2611 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2612 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2613 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2614 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2615 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2616 "copyout", "create", "delete", "deviceptr", "gang", "host",
2617 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2618 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2619 "present_or_create", "pcreate", "seq", "self", "vector",
2620 "vector_length", "wait", "worker".
2621 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2622 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2623 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2624 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2625 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2626 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2627 (c_parser_oacc_data_clause_deviceptr)
2628 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2629 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2630 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2631 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2632 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2633 (c_parser_oacc_parallel, c_parser_oacc_update)
2634 (c_parser_oacc_wait): New functions.
2635 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2636 (c_finish_oacc_data): New prototypes.
2637 * c-typeck.c: Include "gomp-constants.h".
2638 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2639 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2640 OMP_CLAUSE_SET_MAP_KIND.
2641 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2642 (c_finish_oacc_data): New functions.
2643 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2644 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2645 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2646 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2647 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2648 GOMP_MAP_FORCE_DEVICEPTR.
2649
adfac8df
JJ
26502015-01-09 Michael Collison <michael.collison@linaro.org>
2651
2652 * c-array-notation.c: Include hash-set.h, machmode.h,
2653 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2654 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2655 * c-aux-info.c: Ditto.
2656 * c-convert.c: Ditto.
2657 * c-decl.c: Ditto.
2658 * c-errors.c: Ditto.
2659 * c-lang.c: Dittoxs.
2660 * c-objc-common.c: Ditto.
2661 * c-parser.c: Ditto.
2662 * c-typeck.c: Include hash-set.h, machmode.h,
2663 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2664 fold-const.h, wide-int.h, inchash.h, real.h and
2665 fixed-value.h due to flattening of tree.h.
2666
2cc901dc
MP
26672015-01-07 Marek Polacek <polacek@redhat.com>
2668
2669 PR c/64417
2670 * c-typeck.c (process_init_element): Disallow initialization of
2671 a flexible array member with a string constant if the structure
2672 is in an array.
2673
5624e564
JJ
26742015-01-05 Jakub Jelinek <jakub@redhat.com>
2675
e5341100
JJ
2676 PR sanitizer/64344
2677 * c-typeck.c (convert_for_assignment, c_finish_return): For
2678 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2679 types also set in_late_binary_op around convert call.
2680 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2681 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2682 result on expr as last argument to ubsan_instrument_float_cast,
2683 if in_late_binary_op, don't use c_save_expr but save_expr.
2684
5624e564
JJ
2685 Update copyright years.
2686
5bd012f8
MP
26872015-01-05 Marek Polacek <polacek@redhat.com>
2688
2689 PR c/64423
2690 * c-typeck.c (build_array_ref): Pass loc down to
2691 warn_array_subscript_with_type_char.
2692
3f8257db 26932014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2694
2695 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2696 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2697 element type.
8e745a17 2698 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2699 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2700 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2701 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2702 to PEDWARN_FOR_QUALIFIERS.
768952be 2703
8f94a8c4
JJ
27042014-12-17 Jakub Jelinek <jakub@redhat.com>
2705
2706 PR sanitizer/64289
2707 * c-convert.c: Include ubsan.h.
2708 (convert): For real -> integral casts and
2709 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2710 instead instrument the float cast directly.
2711
b731b390
JJ
27122014-11-29 Jakub Jelinek <jakub@redhat.com>
2713
2714 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2715 c_finish_stmt_expr): Remove NULL last argument from
2716 create_tmp_var_raw and create_tmp_var calls.
2717 * c-array-notation.c (fix_builtin_array_notation_fn,
2718 build_array_notation_expr, fix_conditional_array_notations_1,
2719 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2720
541e35a6
MP
27212014-11-28 Marek Polacek <polacek@redhat.com>
2722
2723 PR c/63862
2724 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2725 convert the right operand to integer type.
2726
b286be94
MP
27272014-11-25 Marek Polacek <polacek@redhat.com>
2728
2729 PR c/63877
2730 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2731 for inline functions.
2732
aa7da51a
JJ
27332014-11-21 Jakub Jelinek <jakub@redhat.com>
2734
2735 PR target/63764
2736 * c-typeck.c (build_array_ref): Adjust
2737 convert_vector_to_pointer_for_subscript caller. If it returns true,
2738 call non_lvalue_loc on the result.
2739
d876207f
RB
27402014-11-11 Richard Biener <rguenther@suse.de>
2741
2742 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2743 to true.
2744
e5e44252
AK
27452014-11-10 Andi Kleen <ak@linux.intel.com>
2746
2747 PR c/60804
2748 * c-parser.c (c_parser_statement_after_labels): Call
2749 check_no_cilk.
2750 (c_parser_if_statement): Dito.
2751 (c_parser_switch_statement): Dito.
2752 (c_parser_while_statement): Dito.
2753 (c_parser_do_statement): Dito.
2754 (c_parser_for_statement): Dito.
2755 * c-typeck.c (c_finish_loop): Dito.
2756
13c21655
PC
27572014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2758
2759 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2760 OPT_Wshift_count_overflow in the warnings.
2761
2d51fcef
MP
27622014-10-30 Marek Polacek <polacek@redhat.com>
2763
2764 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2765 print the stripped version as well, if they're not the same.
2766
ef4bddc2
RS
27672014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2768
2769 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2770 machine_mode.
2771
c582198b
AM
27722014-10-28 Andrew MacLeod <amacleod@redhat.com>
2773
2774 * c-decl.c: Adjust include files.
2775 * c-parser.c: Ditto.
2776
ddc8de03
PM
27772014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2778 Tom Tromey <tromey@redhat.com>
2779
2780 * c-tree.h (enum c_oracle_request): New.
2781 (c_binding_oracle_function): New typedef.
2782 (c_binding_oracle, c_pushtag, c_bind): Declare.
2783 * c-decl.c (c_binding_oracle): New global.
2784 (I_SYMBOL_CHECKED): New macro.
2785 (i_symbol_binding): New function.
2786 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2787 (I_TAG_CHECKED): New macro.
2788 (i_tag_binding): New function.
2789 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2790 (I_LABEL_CHECKED): New macro.
2791 (i_label_binding): New function.
2792 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2793 (c_print_identifier): Save and restore c_binding_oracle.
2794 (c_pushtag, c_bind): New functions.
2795
60393bbc
AM
27962014-10-27 Andrew MacLeod <amacleod@redhat.com>
2797
2798 * c-typeck.c: Adjust include files.
2799
d723bb7c
MLI
28002014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2801
2802 PR c++/53061
2803 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2804 initialization here...
2805 (c_initialize_diagnostics): ... but here. Set defaults after
2806 building pretty-printer.
2807
1bc5a451
MP
28082014-10-23 Marek Polacek <polacek@redhat.com>
2809
2810 PR c/63626
2811 * c-decl.c (pop_scope): Don't print warning in external_scope.
2812
4435bb92
MP
28132014-10-19 Marek Polacek <polacek@redhat.com>
2814
2815 PR c/63567
2816 * c-typeck.c (output_init_element): Allow initializing objects with
2817 static storage duration with compound literals even in C99 and add
2818 pedwarn for it.
2819
7278465e
MP
28202014-10-17 Marek Polacek <polacek@redhat.com>
2821
2822 PR c/63567
2823 * c-typeck.c (digest_init): Allow initializing objects with static
2824 storage duration with compound literals even in C99 and add pedwarn
2825 for it.
2826
d9b7be2e
MP
28272014-10-17 Marek Polacek <polacek@redhat.com>
2828
2829 PR c/63543
2830 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2831 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2832 error multiple times. Print the type.
2833
f406ae1f
MP
28342014-10-17 Marek Polacek <polacek@redhat.com>
2835
2836 PR c/63549
2837 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2838 type.
2839
92574c7c
MP
28402014-10-17 Marek Polacek <polacek@redhat.com>
2841
2842 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2843 (start_function): Use OPT_Wimplicit_int instead of 0.
2844 (store_parm_decls_oldstyle): Likewise.
2845
1bc4a978
MT
28462014-10-17 Alan Modra <amodra@gmail.com>
2847
2848 PR middle-end/61848
2849 * c-decl.c (merge_decls): Don't merge section name or tls model
2850 to newdecl symtab node, instead merge to olddecl. Override
2851 existing olddecl section name. Set tls_model for all thread-local
2852 vars, not just OMP thread-private ones. Remove incorrect comment.
2853
83685514
AM
28542014-10-16 Andrew MacLeod <amacleod@redhat.com>
2855
2856 * c-decl.c: Adjust include files.
2857
78a7c317
DD
28582014-10-14 DJ Delorie <dj@redhat.com>
2859
2860 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2861 (c_token_starts_typename): Check all __intN, not just __int128.
2862 (c_token_starts_declspecs): Likewise.
2863 (c_parser_declspecs): Likewise.
2864 (c_parser_attribute_any_word): Likewise.
2865 (c_parser_objc_selector): Likewise.
2866 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2867 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2868 is specified.
2869 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2870 __int128.
2871 (finish_declspecs): Likewise.
2872
74d98c1e
AB
28732014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2874
8e745a17 2875 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 2876 the duplicate code.
8e745a17 2877 (c_parser_statement): Call the new function.
74d98c1e 2878
84937de2
MP
28792014-10-09 Marek Polacek <polacek@redhat.com>
2880
2881 PR c/63480
2882 * c-typeck.c (pop_init_level): Don't warn about initializing
2883 with { }.
2884
0382aaa0
MP
28852014-10-07 Marek Polacek <polacek@redhat.com>
2886
2887 PR c/59717
2888 * c-decl.c (header_for_builtin_fn): New function.
2889 (implicitly_declare): Suggest which header to include.
2890
7a0ca710
MP
28912014-10-07 Marek Polacek <polacek@redhat.com>
2892
2893 * c-convert.c (convert): Use error_operand_p.
2894 * c-typeck.c (require_complete_type): Likewise.
2895 (really_atomic_lvalue): Likewise.
2896 (digest_init): Likewise.
2897 (handle_omp_array_sections_1): Likewise.
2898
6bc8a126
MP
28992014-10-03 Marek Polacek <polacek@redhat.com>
2900
2901 PR c/63453
2902 * c-decl.c (pop_scope): Don't warn about "inline function declared
2903 but never defined" for functions marked with gnu_inline attribute.
2904
d90c0a59
JJ
29052014-09-25 Jakub Jelinek <jakub@redhat.com>
2906
2907 PR c++/63249
2908 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2909 on low_bound and length.
2910
083e891e
MP
29112014-09-24 Marek Polacek <polacek@redhat.com>
2912
2913 PR c/61405
2914 PR c/53874
2915 * c-parser.c: Don't define CPP_KEYWORD.
2916 (c_parser_switch_statement): Pass original type to c_finish_case.
2917 * c-tree.h (c_finish_case): Update declaration.
2918 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2919 conditionally to c_do_switch_warnings.
2920
8d95fe25
MP
29212014-09-03 Marek Polacek <polacek@redhat.com>
2922
2923 PR c/62024
2924 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2925 conversions.
2926
9a771876
JJ
29272014-09-02 Jakub Jelinek <jakub@redhat.com>
2928 Balaji V. Iyer <balaji.v.iyer@intel.com>
2929 Igor Zamyatin <igor.zamyatin@intel.com>
2930
2931 * c-parser.c (c_parser_cilk_for): New function.
2932 (c_parser_cilk_grainsize): Likewise.
2933 (c_get_temp_regvar): Likewise.
2934 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2935 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2936 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2937 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2938 case.
2939
b7679d96
CG
29402014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2941
2942 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2943 with using HOST_WIDE_INT without truncation to 'int'
2944
59ea0364
MP
29452014-08-22 Marek Polacek <polacek@redhat.com>
2946
2947 PR c++/62199
2948 * c-typeck.c (parser_build_binary_op): Adjust call to
2949 warn_logical_not_parentheses.
2950
671a475e
IZ
29512014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2952
2953 PR other/62008
2954 * c-parser.c (c_parser_array_notation): Check for correct
2955 type of an array added.
2956
04159acf
MP
29572014-08-19 Marek Polacek <polacek@redhat.com>
2958
2959 PR c++/62153
2960 * c-typeck.c (build_binary_op): If either operand of a comparison
2961 is a boolean expression, call maybe_warn_bool_compare.
2962
c77935ee
PP
29632014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2964
2965 PR c/45584
2966 * c-typeck.c (build_c_cast): Do a conversion even when the
2967 TYPE_MAIN_VARIANTs are the same.
2968
35aff4fb
MP
29692014-08-19 Marek Polacek <polacek@redhat.com>
2970
2971 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2972 pedwarn_c99 instead of pedwarn.
2973 (grokfield): Likewise.
2974 (warn_defaults_to): New function.
2975 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2976 Unconditionally call pedwarn_c99 instead of pedwarn.
2977 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2978 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2979 check flag_isoc11 before.
2980 * c-errors.c (pedwarn_c99): Change the return type to bool.
2981 Handle -Wc99-c11-compat.
2982 * c-parser.c (disable_extension_diagnostics): Handle
2983 warn_c99_c11_compat.
2984 (restore_extension_diagnostics): Likewise.
2985 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2986 instead of pedwarn, don't check flag_isoc11 before.
2987 (c_parser_declspecs): Likewise.
2988 (c_parser_alignas_specifier): Likewise.
2989 (c_parser_alignof_expression): Likewise.
2990 (c_parser_generic_selection): Likewise.
2991 * c-tree.h (pedwarn_c99): Update declaration.
2992 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2993 of pedwarn_c99.
2994
177cce46
MP
29952014-08-19 Marek Polacek <polacek@redhat.com>
2996
2997 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2998 to pedwarn_c90.
2999 * c-errors.c: Include "opts.h".
3000 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
3001 * c-parser.c (disable_extension_diagnostics): Handle negative value
3002 of warn_c90_c99_compat, too.
3003 (restore_extension_diagnostics): Likewise.
3004 (c_parser_compound_statement_nostart): Pass
3005 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
3006
6dc99c33
MP
30072014-08-12 Marek Polacek <polacek@redhat.com>
3008
3009 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
3010 Add pedwarn.
3011 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
3012 Likewise.
3013 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
3014
3f8257db 30152014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
3016
3017 PR c/51849
3018 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
3019 Call pedwarn_c90 instead of pedwarn.
3020 (check_bitfield_type_and_width): Likewise.
3021 (declspecs_add_qual): Likewise.
3022 (declspecs_add_type): Likewise.
3023 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
3024 Adjust to only call pedwarn_c90.
3025 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
3026 pedwarn_c90 instead of pedwarn.
3027 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
3028 * c-parser.c (disable_extension_diagnostics): Handle
3029 warn_c90_c99_compat.
3030 (restore_extension_diagnostics): Likewise.
3031 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
3032 pedwarn_c90 instead of pedwarn.
3033 (c_parser_initelt): Likewise.
3034 (c_parser_postfix_expression): Likewise.
3035 (c_parser_postfix_expression_after_paren_type): Likewise.
3036 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
3037 * c-tree.h: Fix formatting.
3038 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
3039 pedwarn_c90 instead of pedwarn.
3040
9f25a338
TS
30412014-08-07 Trevor Saunders <tsaunders@mozilla.com>
3042
3043 * c-typeck.c: Remove include of pointer-set.h.
3044
044331a8
MP
30452014-08-07 Marek Polacek <polacek@redhat.com>
3046
3047 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
3048
b787e7a2
TS
30492014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3050
3051 * c-typeck.c: Use hash_map instead of pointer_map.
3052
6e2830c3
TS
30532014-08-02 Trevor Saunders <tsaunders@mozilla.com>
3054
3055 * c-decl.c: Use hash_set instead of pointer_set.
3056
a7ee52fb
IZ
30572014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
3058
3059 PR middle-end/61455
3060 * c-array-notation.c (expand_array_notations): Handling
3061 of DECL_EXPR added.
3062
b4dfdc11
MG
30632014-07-31 Marc Glisse <marc.glisse@inria.fr>
3064
3065 PR c++/60517
3066 * c-typeck.c (c_finish_return): Return 0 instead of the address of
3067 a local variable.
3068
976d5a22
TT
30692014-07-30 Tom Tromey <tromey@redhat.com>
3070
3071 * c-typeck.c (struct constructor_stack) <designator_depth>: New
3072 field.
3073 (really_start_incremental_init, push_init_level): Initialize
3074 designator_depth.
3075 (pop_init_level): Set global designator_depth.
3076 (process_init_element): Check for designated_init attribute.
3077
30281de2
MP
30782014-07-20 Marek Polacek <polacek@redhat.com>
3079
3080 PR c/61852
3081 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
3082 (implicitly_declare): Pass location to implicit_decl_warning.
3083
b108f48f
JJ
30842014-07-14 Jakub Jelinek <jakub@redhat.com>
3085
3086 PR middle-end/61294
3087 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
3088 If non-NULL, call c_parser_check_literal_zero.
3089 (c_parser_check_literal_zero): New function.
3090 (c_parser_postfix_expression_after_primary): Adjust
3091 c_parser_expr_list caller, handle -Wmemset-transposed-args.
3092
773ec47f
MP
30932014-07-06 Marek Polacek <polacek@redhat.com>
3094
3095 PR c/6940
3096 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
3097 * c-tree.h (C_ARRAY_PARAMETER): Define.
3098 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
3099 function parameter.
3100
22e1cf1c 31012014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 3102 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
3103
3104 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
3105 releasing symbol.
3106
52ec0ea3
MP
31072014-07-01 Marek Polacek <polacek@redhat.com>
3108
3109 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
3110 instead of 0 to WARN_FOR_ASSIGNMENT.
3111
d5c3d343
MP
31122014-07-01 Marek Polacek <polacek@redhat.com>
3113
3114 PR c/58286
3115 * c-typeck.c (convert_for_assignment): Pass
3116 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
3117
6a7253a4
MP
31182014-06-30 Marek Polacek <polacek@redhat.com>
3119
3120 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
3121 has no_sanitize_undefined attribute.
3122
5e88a8f4
IZ
31232014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
3124
3125 PR middle-end/57541
3126 * c-array-notation.c (fix_builtin_array_notation_fn):
3127 Check for 0 arguments in builtin call. Check that bultin argument is
3128 correct.
3129 * c-parser.c (c_parser_array_notation): Check for incorrect initial
3130 index.
3131
9698b078
SH
31322014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
3133
3134 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
3135 qualifiers in __auto_type for atomic types.
3136 (c_parser_typeof_specifier): Discard all type qualifiers in
3137 __typeof__ for atomic types.
3138
6e07c515
MP
31392014-06-25 Marek Polacek <polacek@redhat.com>
3140
3141 PR c/61162
3142 * c-parser.c (c_parser_statement_after_labels): Pass the location of
3143 the return expression to c_finish_return.
3144
da6f124d
JJ
31452014-06-25 Jakub Jelinek <jakub@redhat.com>
3146
3147 * c-typeck.c (c_finish_omp_clauses): Make sure
3148 OMP_CLAUSE_LINEAR_STEP has correct type.
3149
c203e8a7
TS
31502014-06-24 Trevor Saunders <tsaunders@mozilla.com>
3151
3152 * c-decl.c: Adjust.
3153
56ad0e38
JJ
31542014-06-24 Jakub Jelinek <jakub@redhat.com>
3155
3156 * c-parser.c (c_parser_omp_for_loop): For
3157 #pragma omp parallel for simd move lastprivate clause from parallel
3158 to for rather than simd.
3159
47c2554f
MP
31602014-06-23 Marek Polacek <polacek@redhat.com>
3161
3162 * c-typeck.c (parser_build_binary_op): Don't call
3163 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
3164
56363ffd
JH
31652014-06-15 Jan Hubicka <hubicka@ucw.cz>
3166
3167 * c-parser.c (c_parser_omp_threadprivate): Likewise.
3168 * c-decl.c (merge_decls): Likewise.
3169
d7ff7ae5
MP
31702014-06-09 Marek Polacek <polacek@redhat.com>
3171
3172 PR c/36446
3173 * c-typeck.c (error_init): Call inform instead of error_at.
3174 (pedwarn_init): Call inform instead of pedwarn.
3175 (warning_init): Call inform instead of warning_at.
3176
24d047a3
JH
31772014-06-07 Jan Hubicka <hubicka@ucw.cz>
3178
3179 * c-decl.c (merge_decls): Use set_decl_section_name.
3180 (duplicate_decls): Remove node if it exists.
3181
9bac5cbb
G
31822014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
3183
3184 PR c/53119
3185 * c-typeck.c (push_init_level, process_init_element,
3186 pop_init_level): Correct check for zero initialization, move
3187 missing brace warning to respect zero initialization.
3188
8ffcdea8
MP
31892014-06-05 Marek Polacek <polacek@redhat.com>
3190
3191 PR c/56724
3192 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
3193
742938c9
MP
31942014-06-05 Marek Polacek <polacek@redhat.com>
3195
3196 PR c/49706
3197 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
3198 on the left hand side operand of a comparison.
3199
6447c55d
MP
32002014-06-05 Marek Polacek <polacek@redhat.com>
3201
3202 PR c/48062
3203 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
3204 Print note only if the warning was printed.
3205
9dc7743c
IZ
32062014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3207
3208 PR c/58942
3209 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3210 with a pointer.
3211
fedfecef
MP
32122014-06-03 Marek Polacek <polacek@redhat.com>
3213
3214 PR c/60439
3215 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3216 c_start_case.
3217 * c-tree.h (c_start_case): Update.
3218 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3219 switch condition has boolean value.
3220
9b2b7279
AM
32212014-06-02 Andrew MacLeod <amacleod@redhat.com>
3222
3223 * c-decl.c: Include builtins.h.
3224 * c-parser.c: Likewise.
3225
5c1bc275
MP
32262014-05-27 Marek Polacek <polacek@redhat.com>
3227
3228 PR c/56724
3229 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3230 error and warning calls to error_at and warning_at. Pass location of
3231 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3232 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3233 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3234
97563bc8
IZ
32352014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3236
3237 PR c/61191
3238 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3239 function parameters.
3240
aede2c10
JH
32412014-05-23 Jan Hubicka <hubicka@ucw.cz>
3242
3243 * c-decl.c (merge_decls): Preserve symtab node pointers.
3244 (duplicate_decls): Free new decl.
3245
edbba2ce
TS
32462014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3247
f3316c6d
TS
3248 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3249 initialization.
3250
edbba2ce
TS
3251 * c-parser.c (c_parser_omp_target): Return bool values.
3252
68c81f24
TS
32532014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3254
3255 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3256 num_teams_loc variable to num_thread_limit_loc.
3257
632f2871
RS
32582014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3259
3260 * c-array-notation.c (expand_array_notations): Use void_node
3261 instead of void_zero_node.
3262
766090c2
TS
32632014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3264
3265 * c-decl.c (finish_struct): Adjust.
3266 (finish_enum): Likewise.
3267 (bind): Adjust.
3268 (record_inline_static): Likewise.
3269 (push_scope): Likewise.
3270 (make_label): Likewise.
3271 (lookup_label_for_goto): Likewise.
3272 (finish_struct): Likewise.
3273 (finish_enum): Likewise.
3274 (store_parm_decls): Likewise.
3275 (c_push_function_context): Likewise.
3276 * c-lang.h: Remove usage of variable_size gty attribute.
3277 * c-parser.c (c_parse_init): Adjust.
3278 (c_parse_file): Likewise.
3279
2b107f6b
MP
32802014-05-13 Marek Polacek <polacek@redhat.com>
3281
3282 PR c/61162
3283 * c-typeck.c (convert_for_assignment): Pass location to
3284 WARN_FOR_ASSIGNMENT instead of input_location.
3285
d033409e
MP
32862014-05-10 Marek Polacek <polacek@redhat.com>
3287
3288 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3289 maybe_warn_string_init.
3290 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3291 maybe_warn_string_init.
3292 * c-tree.h (maybe_warn_string_init): Update declaration.
3293 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3294 Call pedwarn_init with loc instead of with input_location.
3295 (digest_init): Pass init_loc to maybe_warn_string_init.
3296 (pop_init_level): Call pedwarn_init with loc instead of with
3297 input_location.
3298 (set_init_index): Likewise.
3299 (process_init_element): Likewise.
3300
ea58ef42
MP
33012014-05-09 Marek Polacek <polacek@redhat.com>
3302
3303 PR c/61096
3304 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3305 (c_parser_initelt): Pass location to set_init_label. Pass array index
3306 location to set_init_index.
3307 * c-tree.h (push_init_level): Update declaration.
3308 (pop_init_level): Likewise.
3309 (set_init_index): Likewise.
3310 (set_init_label): Likewise.
3311 * c-typeck.c (error_init): Add location parameter. Call error_at
3312 instead of error.
3313 (digest_init): Pass init_loc to error_init.
3314 (really_start_incremental_init):
3315 (push_init_level): Add location parameter. Pass loc to pop_init_level
3316 and error_init.
3317 (pop_init_level): Likewise.
3318 (set_designator): Add location parameter. Pass loc to pop_init_level,
3319 push_init_level, and error_init.
3320 (set_init_index): Add location parameter. Pass loc to error_init and
3321 set_designator.
3322 (set_init_label): Likewise.
3323 (output_init_element): Pass loc to error_init.
3324 (process_init_element): Pass loc to error_init, pop_init_level,
3325 pedwarn_init, and push_init_level.
3326
661a0813
MP
33272014-05-09 Marek Polacek <polacek@redhat.com>
3328
3329 PR c/50459
3330 * c-parser.c (c_parser_attributes): Parse the arguments as an
3331 expression-list if the attribute takes identifier.
3332
2793eeab
MP
33332014-05-08 Marek Polacek <polacek@redhat.com>
3334
3335 PR c/61053
3336 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3337 TYPE_ALIGN_UNIT.
3338
f827930a
MP
33392014-05-08 Marek Polacek <polacek@redhat.com>
3340
3341 PR c/61077
3342 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3343 of main.
3344
1d60af08
KZ
33452014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3346 Mike Stump <mikestump@comcast.net>
3347 Richard Sandiford <rdsandiford@googlemail.com>
3348
3349 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3350 (finish_enum): Use wide-int interfaces.
3351 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3352 * c-typeck.c (build_c_cast): Likewise.
3353 (set_nonincremental_init_from_string): Likewise.
3354 (c_tree_equal): Likewise.
3355
a0e24419
MP
33562014-05-02 Marek Polacek <polacek@redhat.com>
3357
3358 PR c/25801
3359 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3360 Return size_one_node when the type is not complete.
3361 (pointer_diff): Remove comment.
3362 (build_unary_op): Improve error messages.
3363
19fc9faa
MP
33642014-05-02 Marek Polacek <polacek@redhat.com>
3365
3366 * c-typeck.c (c_finish_return): Separate warning_at calls.
3367
63bc4e87
MP
33682014-05-02 Marek Polacek <polacek@redhat.com>
3369
3370 * c-tree.h (error_init): Remove declaration.
3371 (pedwarn_init): Likewise.
3372 * c-typeck.c (error_init): Make static and move above.
3373 (pedwarn_init): Likewise.
3374 (warning_init): Move above.
3375 (maybe_warn_string_init): Likewise.
3376
4bd2511b
JL
33772014-05-01 Jeff Law <law@redhat.com>
3378
3379 Revert:
3380
3381 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3382 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3383 avoid goto.
3384
6a358dcb
MP
33852014-05-02 Marek Polacek <polacek@redhat.com>
3386
3387 PR c/60784
3388 * c-typeck.c (push_init_level): Set constructor_designated to
3389 p->designated for structures.
3390
ae5ebda4
MP
33912014-05-01 Marek Polacek <polacek@redhat.com>
3392
3393 PR c/60915
3394 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3395 function-definition has an attribute after the declarator.
3396
96b40f8d
MP
33972014-05-01 Marek Polacek <polacek@redhat.com>
3398
3399 PR c/60257
3400 * c-typeck.c (warning_init): Add location_t parameter. Call
3401 warning_at instead of warning.
3402 (push_init_level): Pass input_location to warning_init.
3403 (add_pending_init): Add location_t parameter. Pass loc to
3404 warning_init.
3405 (set_nonincremental_init): Pass input_location to add_pending_init.
3406 (set_nonincremental_init_from_string): Likewise.
3407 (output_init_element): Pass loc to warning_init and to
3408 add_pending_init.
3409
32e00768
MP
34102014-05-01 Marek Polacek <polacek@redhat.com>
3411
3412 PR c/43395
3413 * c-typeck.c (c_finish_return): Distinguish between label and variable
3414 when warning about returning local address.
3415
c9379ce2
MP
34162014-05-01 Marek Polacek <polacek@redhat.com>
3417
3418 PR c/29467
3419 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3420 in C89 mode.
3421
d00887e8
MP
34222014-05-01 Marek Polacek <polacek@redhat.com>
3423
3424 PR c/43245
3425 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3426 instead of 0 to WARN_FOR_QUALIFIERS.
3427
5436fa2e
MP
34282014-05-01 Marek Polacek <polacek@redhat.com>
3429
3430 PR c/56989
3431 * c-typeck.c (default_conversion): Use better location for
3432 error call.
3433
f8ed5150
MP
34342014-04-30 Marek Polacek <polacek@redhat.com>
3435
3436 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3437 also when SANITIZE_FLOAT_DIVIDE is on.
3438
8337d1db
MP
34392014-04-30 Marek Polacek <polacek@redhat.com>
3440
3441 PR c/60139
3442 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3443 and pedwarn_init. Use loc insted of input_location.
3444
c4bdc42f
MP
34452014-04-30 Marek Polacek <polacek@redhat.com>
3446
3447 PR c/60351
3448 * c-typeck.c (build_binary_op): Use location when warning about
3449 shift count.
3450
45484dcf
MP
34512014-04-25 Marek Polacek <polacek@redhat.com>
3452
3453 PR c/18079
3454 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3455 always_inline/noinline and hot/cold attributes.
3456
34cf811f
MP
34572014-04-25 Marek Polacek <polacek@redhat.com>
3458
3459 PR c/60114
3460 * c-parser.c (c_parser_initelt): Pass input_location to
3461 process_init_element.
3462 (c_parser_initval): Pass loc to process_init_element.
3463 * c-tree.h (process_init_element): Adjust declaration.
3464 * c-typeck.c (push_init_level): Pass input_location to
3465 process_init_element.
3466 (pop_init_level): Likewise.
3467 (set_designator): Likewise.
3468 (output_init_element): Add location_t parameter. Pass loc to
3469 digest_init.
3470 (output_pending_init_elements): Pass input_location to
3471 output_init_element.
3472 (process_init_element): Add location_t parameter. Pass loc to
3473 output_init_element.
3474
42056eac
JJ
34752014-04-24 Jakub Jelinek <jakub@redhat.com>
3476
3477 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3478 atomic-clause, allow comma in between atomic-clause and
3479 seq_cst.
3480
e162a134
JJ
34812014-04-22 Jakub Jelinek <jakub@redhat.com>
3482
3483 PR c/59073
3484 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3485 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3486
2f6babac
IZ
34872014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3488
3489 PR middle-end/60469
3490 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3491 create_tmp_var instead build_decl for creating temps.
3492 (build_array_notation_expr): Likewise.
3493 (fix_conditional_array_notations_1): Likewise.
3494 (fix_array_notation_expr): Likewise.
3495 (fix_array_notation_call_expr): Likewise.
3496
8edbfaa6
JJ
34972014-03-28 Jakub Jelinek <jakub@redhat.com>
3498
3499 PR c++/60689
3500 * c-tree.h (c_build_function_call_vec): New prototype.
3501 * c-typeck.c (build_function_call_vec): Don't call
3502 resolve_overloaded_builtin here.
3503 (c_build_function_call_vec): New wrapper function around
3504 build_function_call_vec. Call resolve_overloaded_builtin here.
3505 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3506 Call c_build_function_call_vec instead of build_function_call_vec.
3507 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3508 * c-decl.c (finish_decl): Likewise.
3509
7485aeea
MLI
35102014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3511
3512 PR c/55383
3513 * c-typeck.c: Use correct format string in cast-qual warning
3514
b17a8b07
TS
35152014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3516
3517 * c-decl.c (c_decl_attributes): Use
3518 lang_hooks.types.omp_mappable_type.
3519 * c-typeck.c (c_finish_omp_clauses): Likewise.
3520
3af9c5e9
MP
35212014-03-06 Marek Polacek <polacek@redhat.com>
3522
3523 PR c/60197
3524 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3525 of checking tree code.
3526
1c9f5f33
PK
35272014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3528
3529 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3530 (c_parser_parameter_declaration): Likewise.
3531
cc28fc7f
MP
35322014-02-19 Marek Polacek <polacek@redhat.com>
3533
3534 PR c/60195
3535 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3536 Call mark_exp_read on exp.value.
3537 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3538 TREE_ADDRESSABLE on old instead of val.
3539 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3540
b581c05c
PK
35412014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3542
3543 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3544 C_EXPR_APPEND by vec_safe_push.
3545 * c-tree.h (C_EXPR_APPEND): Remove.
3546
81e5eca8
MP
35472014-01-31 Marek Polacek <polacek@redhat.com>
3548
3549 PR c/59963
3550 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3551 build_function_call_vec.
3552 (build_function_call): Likewise.
3553 (build_atomic_assign): Likewise.
3554 (build_function_call_vec): Add arg_loc parameter. Use it.
3555 (convert_arguments): Likewise.
3556 (convert_for_assignment): Rename rhs_loc to expr_loc.
3557 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3558 (c_parser_objc_keywordexpr): Likewise.
3559 (c_parser_postfix_expression_after_primary): Call
3560 build_function_call_vec with expr_loc rather than op_loc.
3561 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3562 build_function_call_vec.
3563 (c_parser_expr_list): Add locations parameter. Fill it with locations
3564 of function arguments.
3565 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3566
68fca595
MP
35672014-01-30 Marek Polacek <polacek@redhat.com>
3568
3569 PR c/59940
3570 * c-typeck.c (build_function_call_vec): Use loc parameter.
3571 (convert_arguments): Add location parameter. Use it.
3572 (ep_convert_and_check): Likewise.
3573 (build_atomic_assign): Adjust convert_for_assignment call.
3574 (build_modify_expr): Likewise.
3575 (digest_init): Likewise.
3576 (c_finish_return): Likewise.
3577 (build_conditional_expr): Adjust ep_convert_and_check calls.
3578 (convert_for_assignment): Add rhs_loc parameter. Use it.
3579 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3580 calls.
3581
fa337f3a
RB
35822014-01-30 Richard Biener <rguenther@suse.de>
3583
3584 PR c/59905
3585 * c-typeck.c (build_function_call_vec): Do not replace calls
3586 to a function via an incompatible type with a runtime abort.
3587
b72271b9
BI
35882014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3589
3590 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3591 flag_enable_cilkplus with flag_cilkplus.
3592 (c_parser_direct_declarator_inner): Likewise.
3593 (c_parser_attribute_any_word): Likewise.
3594 (c_parser_attributes): Likewise.
3595 (c_parser_compound_statement): Likewise.
3596 (c_parser_statement_after_labels): Likewise.
3597 (c_parser_if_statement): Likewise.
3598 (c_parser_switch_statement): Likewise.
3599 (c_parser_do_statement): Likewise.
3600 (c_parser_for_statement): Likewise.
3601 (c_parser_unary_expression): Likewise.
3602 (c_parser_postfix_expression): Likewise.
3603 (c_parser_postfix_expression_after_primary): Likewise.
3604 (c_parser_postfix_expression_after_primary): Likewise.
3605 (c_parser_omp_clause_name): Likewise.
3606 (c_finish_omp_declare_simd): Likewise.
3607 (c_parser_cilk_verify_simd): Likewise.
3608 * c-typeck.c (build_array_ref): Likewise.
3609 (build_function_call_vec): Likewise.
3610 (convert_arguments): Likewise.
3611 (build_compound_expr): Likewise.
3612 (c_finish_return): Likewise.
3613 (c_finish_if_stmt): Likewise.
3614 (c_finish_loop): Likewise.
3615 (build_binary_op): Likewise.
3616
393e8e8b
MP
36172014-01-23 Marek Polacek <polacek@redhat.com>
3618
3619 PR c/59846
3620 * c-typeck.c (parser_build_binary_op): Use location instead of
3621 input_location.
3622 (build_binary_op): Pass location to shorten_compare.
3623
f04dda30
MP
36242014-01-23 Marek Polacek <polacek@redhat.com>
3625
3626 PR c/58346
3627 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3628 an empty aggregate.
3629
789eadcd
MP
36302014-01-23 Marek Polacek <polacek@redhat.com>
3631
3632 PR c/59871
3633 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3634 of a comma expression.
3635 (emit_side_effect_warnings): Likewise.
3636
40f14e9f
BI
36372014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3638
3639 PR c/59825
3640 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3641 function to use walk_tree and moved a lot of its functionality to
3642 expand_array_notations.
3643 (expand_array_notations): New function.
3644
74558dd9
BI
36452014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3646
3647 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3648 attribute an attribute without value.
3649
652fea39
JJ
36502014-01-23 Jakub Jelinek <jakub@redhat.com>
3651
3652 PR middle-end/58809
3653 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3654 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3655
f34f1c87
MP
36562014-01-22 Marek Polacek <polacek@redhat.com>
3657
3658 PR c/59891
3659 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3660 of remove_c_maybe_const_expr on op1 and op2.
3661
241f845a
JJ
36622014-01-15 Jakub Jelinek <jakub@redhat.com>
3663
3664 PR c/58943
3665 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3666 effects, preevaluate rhs using SAVE_EXPR first.
3667
9a74f20c
BI
36682014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3669
3670 PR c++/59631
3671 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3672 statements with if-elseif statements.
3673
96066ce1
MP
36742014-01-06 Marek Polacek <polacek@redhat.com>
3675
3676 PR c/57773
3677 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3678 defined bit-field types only in ISO C.
3679
23a5b65a
RS
36802014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3681
3682 Update copyright years
3683
f9030485
RS
36842014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3685
3686 * c-array-notation.c: Use the standard form for the copyright notice.
3687
41958c28
BI
36882013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3689
3690 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3691 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3692 field in parser is not empty. If not-empty, call the function
3693 c_parser_finish_omp_declare_simd.
3694 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3695 between SIMD-enabled functions and #pragma simd. Added new parameter.
3696 (c_parser_cilk_all_clauses): Modified the usage of the function
3697 c_parser_cilk_clause_vectorlength as mentioned above.
3698 (c_parser_cilk_simd_fn_vector_attrs): New function.
3699 (c_finish_cilk_simd_fn_tokens): Likewise.
3700 (is_cilkplus_vector_p): Likewise.
3701 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3702 "nomask," and "mask" strings in clause name.
3703 (c_parser_omp_all_clauses): Added 3 new case statements:
3704 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3705 PRAGMA_CILK_CLAUSE_NOMASK.
3706 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3707 check for vector attribute and if so call the function
3708 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3709 called the function c_finish_cilk_simd_fn_tokens.
3710 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3711 parser field is non-empty. If so, parse them as you would parse
3712 the omp declare simd pragma.
3713 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3714 Added a check when step is a parameter and flag it as error.
3715 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3716 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3717 pragma_omp_clause.
3718
cef0fd0e
TS
37192013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3720
3721 * c-parser.c (c_parser_omp_parallel): Fix description.
3722
12893402
BI
37232013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3724
3725 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3726 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3727 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3728 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3729
296674db
JM
37302013-12-04 Joseph Myers <joseph@codesourcery.com>
3731
3732 PR c/52023
3733 * c-parser.c (c_parser_alignas_specifier): Use
3734 c_sizeof_or_alignof_type instead of c_alignof.
3735 (c_parser_alignof_expression): Likewise, with min_alignof
3736 parameter depending on alignof spelling used.
3737
edd28054
MP
37382013-12-04 Marek Polacek <polacek@redhat.com>
3739
3740 PR c/54113
3741 * c-decl.c (start_function): Don't warn for missing prototype for
3742 inline functions.
3743
da0fc454
MP
37442013-12-03 Marek Polacek <polacek@redhat.com>
3745
3746 PR c/59351
3747 * c-decl.c (build_compound_literal): Allow compound literals with
3748 empty initial value.
3749
4c2ecab0
JM
37502013-12-02 Joseph Myers <joseph@codesourcery.com>
3751
3752 PR c/58235
3753 * c-typeck.c (build_modify_expr): Diagnose assignment to
3754 expression with array type.
3755
340baef7
JM
37562013-11-29 Joseph Myers <joseph@codesourcery.com>
3757
3758 PR c/42262
3759 * c-typeck.c (process_init_element): Do not treat a string as
3760 initializing a whole array when used with a designator for an
3761 individual element.
3762
6763b9f7
JM
37632013-11-29 Joseph Myers <joseph@codesourcery.com>
3764
3765 PR c/57574
3766 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3767 an inline function following a static declaration.
3768
e7bd1de1
JJ
37692013-11-28 Jakub Jelinek <jakub@redhat.com>
3770
3771 PR c/59310
3772 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3773 to p_name before calling c_parser_omp_teams instead of after.
3774 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3775 argument. Remove unused p_name variable.
3776
0136f8f0
AH
37772013-11-27 Aldy Hernandez <aldyh@redhat.com>
3778 Jakub Jelinek <jakub@redhat.com>
3779
3780 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3781 external_scope is NULL.
3782
241b71bb
TV
37832013-11-27 Tom de Vries <tom@codesourcery.com>
3784 Marc Glisse <marc.glisse@inria.fr>
3785
3786 PR c++/59032
3787 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3788
2fb9a547
AM
37892013-11-22 Andrew MacLeod <amacleod@redhat.com>
3790
3791 * c-typeck.c: Add required include files from gimple.h.
3792
8400e75e
DM
37932013-11-22 David Malcolm <dmalcolm@redhat.com>
3794
3795 * c-decl.c (define_label, shadow_tag_warned)
3796 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3797 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3798 (declspecs_add_type): Remove use of in_system_header macro.
3799 * c-parser.c (c_parser_unary_expression): Likewise.
3800 * c-typeck.c (store_init_value, process_init_element)
3801 (c_start_case): Likewise.
3802
3803 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3804 macro.
3805
3806 * c-parser.c (c_parser_set_source_position_from_token): Remove
3807 reference to in_system_header from comment.
3808
386b1f1f
RS
38092013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3810
3811 * c-decl.c (grokdeclarator): Update comment to refer to
3812 tree_to_[su]hwi rather than tree_low_cst.
3813
ae7e9ddd
RS
38142013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3815
3816 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3817 tree_to_uhwi throughout.
3818
9439e9a1
RS
38192013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3820
3821 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3822 throughout.
3823
9541ffee
RS
38242013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3825
3826 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3827 throughout.
3828
c02065fc
AH
38292013-11-15 Aldy Hernandez <aldyh@redhat.com>
3830
3831 * c-parser.c (c_parser_cilk_simd): New.
3832 (c_parser_cilk_verify_simd): New.
3833 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3834 (c_parser_omp_for_loop): Add case for NE_EXPR.
3835 Set c_break_label for CILK_SIMD.
3836 (c_parser_cilk_clause_vectorlength): New.
3837 (c_parser_cilk_clause_linear): New.
3838 (c_parser_cilk_clause_name): New.
3839 (c_parser_cilk_all_clauses): New.
3840 * c-typeck.c (build_unary_op): Pass location argument to
3841 readonly_error.
3842 (build_modify_expr): Same.
3843 (build_asm_expr): Same.
3844 (c_finish_bc_stmt): Error on break/continue in loops.
3845
18f429e2
AM
38462013-11-14 Andrew MacLeod <amacleod@redhat.com>
3847
3848 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3849
d8a2d370
DN
38502013-11-14 Diego Novillo <dnovillo@google.com>
3851
3852 * c-decl.c: Include print-tree.h.
3853 Include stor-layout.h.
3854 Include varasm.h.
3855 Include attribs.h.
3856 Include stringpool.h.
3857 * c-lang.c: Include fold-const.h.
3858 * c-parser.c: Include stringpool.h.
3859 Include attribs.h.
3860 Include stor-layout.h.
3861 Include varasm.h.
3862 Include trans-mem.h.
3863 * c-typeck.c: Include stor-layout.h.
3864 Include trans-mem.h.
3865 Include varasm.h.
3866 Include stmt.h.
3867
38b7bc7f
JM
38682013-11-13 Joseph Myers <joseph@codesourcery.com>
3869
3870 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3871 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3872 __auto_type.
3873 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3874 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3875 RID_AUTO_TYPE.
3876 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3877 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3878 (c_parser_declarator, c_parser_direct_declarator_inner)
3879 (c_parser_parameter_declaration, c_parser_type_name): All callers
3880 changed.
3881 (c_parser_declaration_or_fndef): Handle declarations with type
3882 determined from the initializer.
3883
45b0be94
AM
38842013-11-12 Andrew MacLeod <amacleod@redhat.com>
3885
18f429e2 3886 * c-typeck.c: Include gimplify.h.
45b0be94 3887
582d9b50
JM
38882013-11-12 Joseph Myers <joseph@codesourcery.com>
3889
3890 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3891 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3892 comment.
3893 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3894 or _Thread_local as appropriate in diagnostics.
3895 (build_null_declspecs): Initialize ret->thread_gnu_p.
3896 (declspecs_add_scspec): Handle either __thread or _Thread_local
3897 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3898 pedantic. Do not disallow _Thread_local extern and _Thread_local
3899 static.
3900
267bac10
JM
39012013-11-07 Joseph Myers <joseph@codesourcery.com>
3902 Andrew MacLeod <amacleod@redhat.com>
3903
3904 * c-aux-info.c (gen_type): Handle atomic qualifier.
3905 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3906 qualifiers when compating types.
3907 (shadow_tag_warned): Handle atomic_p in declspecs.
3908 (quals_from_declspecs): Likewise.
3909 (start_decl): Use c_type_promotes_to when promoting argument
3910 types.
3911 (grokdeclarator): Handle _Atomic.
3912 (get_parm_info): Diagnose any qualifier on "void" as only
3913 parameter.
3914 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3915 comparing types. Use c_type_promotes_to when promoting argument
3916 types.
3917 (finish_function): Use c_type_promotes_to when promoting argument
3918 types.
3919 (build_null_declspecs): Handle atomic_p in declspecs.
3920 (declspecs_add_qual): Handle RID_ATOMIC.
3921 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3922 (c_token_starts_declspecs): Handle RID_ATOMIC.
3923 (c_parser_declspecs): Handle atomic type specifiers and
3924 qualifiers.
3925 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3926 from types of expressions with atomic type.
3927 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3928 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3929 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3930 (c_parser_statement_after_labels, c_parser_switch_statement)
3931 (c_parser_for_statement, c_parser_expr_no_commas)
3932 (c_parser_conditional_expression, c_parser_binary_expression)
3933 (c_parser_cast_expression, c_parser_unary_expression)
3934 (c_parser_postfix_expression)
3935 (c_parser_postfix_expression_after_primary, c_parser_expression):
3936 Use convert_lvalue_to_rvalue.
3937 (c_parser_expression_conv, c_parser_expr_list): Document
3938 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3939 (c_parser_objc_synchronized_statement): Use
3940 convert_lvalue_to_rvalue.
3941 (c_parser_objc_selector): Handle RID_ATOMIC.
3942 (c_parser_objc_receiver, c_parser_array_notation): Use
3943 convert_lvalue_to_rvalue.
3944 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3945 _Atomic (type-name).
3946 (struct c_declspecs): Add atomic_p field.
3947 (convert_lvalue_to_rvalue): Declare.
3948 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3949 corresponding atomic types.
3950 (qualify_type): Don't add _Atomic qualifiers from second argument.
3951 (comp_target_types): Do not allow _Atomic mismatches.
3952 (type_lists_compatible_p): Do not remove atomic qualifiers when
3953 comparing types.
3954 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3955 (build_atomic_assign): New functions.
3956 (build_unary_op): Use build_atomic_assign for atomic increment and
3957 decrement.
3958 (build_conditional_expr): Do not treat _Atomic void as a qualified
3959 version of void.
3960 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3961 (find_anonymous_field_with_type, convert_to_anonymous_field)
3962 (convert_for_assignment): Do not remove atomic qualifiers when
3963 comparing types.
3964 (digest_init): Do not accept initialization of arrays of atomic
3965 elements by string constants.
3966 (build_asm_expr): Use convert_lvalue_to_rvalue.
3967 (build_binary_op): Do not treat _Atomic void as a qualified
3968 version of void.
3969
0c249d4b
DD
39702013-11-06 DJ Delorie <dj@redhat.com>
3971
3972 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3973 both explicit and builtin, print the location of the explicit one.
3974
6d7f7e0a
TB
39752013-11-05 Tobias Burnus <burnus@net-b.de>
3976
3977 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3978 c_parser_omp_distribute, c_parser_omp_teams,
3979 c_parser_omp_target, c_parser_omp_declare): Handle
3980 -fopenmp-simd.
3981
b906f4ca
MP
39822013-11-03 Marek Polacek <polacek@redhat.com>
3983
3984 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3985
ee1d5a02
JJ
39862013-11-01 Jakub Jelinek <jakub@redhat.com>
3987
3988 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3989 check_dup_generic at the end, unless remove is true.
3990 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3991 remove = true;.
3992 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3993
5a9785fb
JJ
39942013-10-31 Jakub Jelinek <jakub@redhat.com>
3995
3996 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3997 with decl that is not pointer nor array.
3998
939b37da
BI
39992013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
4000
4001 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
4002 a spawning function is found.
4003 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
4004 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
4005 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
4006 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
4007 case.
4008 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
4009 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
4010 expr.
4011 (c_finish_return): Added a check to reject _Cilk_spawn in return
4012 expression.
4013 (build_cilk_spawn): New function.
4014 (build_cilk_sync): Likewise.
4015 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
4016
d4af74d4
TB
40172013-10-27 Tobias Burnus <burnus@net-b.de>
4018
4019 PR other/33426
4020 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
4021 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
4022 (c_parser_statement_after_labels): Update calls.
4023
d73749df 40242013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
4025
4026 PR other/33426
4027 * c-parser.c (c_parser_pragma, c_parser_for_statement):
4028 Handle PRAGMA_IVDEP.
4029 (c_parser_statement_after_labels): Update call.
4030
f28aa681
MP
40312013-10-24 Marek Polacek <polacek@redhat.com>
4032
4033 * c-parser.c (c_parser_struct_declaration): Add a comment.
4034 (c_parser_declarator): Don't allow _Alignas here.
4035
0645c1a2
AM
40362013-10-17 Andrew MacLeod <amacleod@redhat.com>
4037
4038 * c-parser.c: Include omp-low.h.
4039 * c-typeck.c: Likewise.
4040
568a31f2
MP
40412013-10-17 Marek Polacek <polacek@redhat.com>
4042
4043 PR c/58267
4044 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
4045 Document syntax of the array-declarator.
4046 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
4047 are not permitted.
4048 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
4049 (c_parser_struct_declaration): Likewise.
4050 (c_parser_declarator): Likewise.
4051 (c_parser_direct_declarator_inner): Likewise.
4052 (c_parser_parameter_declaration): Likewise.
4053 (c_parser_type_name): Likewise.
4054
acf0174b
JJ
40552013-10-11 Jakub Jelinek <jakub@redhat.com>
4056
4057 * c-lang.h (current_omp_declare_target_attribute): New extern
4058 decl.
4059 * c-parser.c: Include c-lang.h.
4060 (struct c_parser): Change tokens to c_token *.
4061 Add tokens_buf field. Change tokens_avail type to unsigned int.
4062 (c_parser_consume_token): If parser->tokens isn't
4063 &parser->tokens_buf[0], increment parser->tokens.
4064 (c_parser_consume_pragma): Likewise.
4065 (enum pragma_context): Add pragma_struct and pragma_param.
4066 (c_parser_external_declaration): Adjust
4067 c_parser_declaration_or_fndef caller.
4068 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
4069 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
4070 Adjust recursive call.
4071 (c_parser_struct_or_union_specifier): Use pragma_struct instead
4072 of pragma_external.
4073 (c_parser_parameter_declaration): Use pragma_param instead of
4074 pragma_external.
4075 (c_parser_compound_statement_nostart, c_parser_label,
4076 c_parser_for_statement): Adjust
4077 c_parser_declaration_or_fndef callers.
4078 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
4079 it through to c_parser_conditional_expression.
4080 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
4081 pass it through to c_parser_binary_expression. Adjust recursive
4082 call.
4083 (c_parser_binary_expression): Remove prec argument, add
4084 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
4085 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
4086 binop matches it, use build2 instead of parser_build_binary_op.
4087 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
4088 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
4089 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
4090 Handle pragma_struct and pragma_param the same as pragma_external.
4091 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
4092 (c_parser_omp_variable_list): Parse array sections for
4093 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
4094 (c_parser_omp_clause_collapse): Fully fold collapse expression.
4095 (c_parser_omp_clause_reduction): Handle user defined reductions.
4096 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
4097 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
4098 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
4099 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
4100 c_parser_omp_clause_depend, c_parser_omp_clause_map,
4101 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
4102 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
4103 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
4104 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
4105 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
4106 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
4107 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
4108 (c_parser_omp_for_loop): Add CODE argument, pass it through
4109 to c_finish_omp_for. Change last argument to cclauses,
4110 and adjust uses to grab parallel clauses from the array of all
4111 the split clauses. Adjust c_parser_binary_expression,
4112 c_parser_declaration_or_fndef and c_finish_omp_for callers.
4113 (omp_split_clauses): New function.
4114 (c_parser_omp_simd): New function.
4115 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
4116 Allow the function to be called also when parsing combined constructs,
4117 and call c_parser_omp_simd when parsing for simd.
4118 (c_parser_omp_sections_scope): If section-sequence doesn't start with
4119 #pragma omp section, require exactly one structured-block instead of
4120 sequence of statements.
4121 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
4122 Allow the function to be called also when parsing combined constructs.
4123 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
4124 Allow the function to be called also when parsing combined
4125 constructs.
4126 (c_parser_omp_taskgroup, c_parser_omp_cancel,
4127 c_parser_omp_cancellation_point, c_parser_omp_distribute,
4128 c_parser_omp_teams, c_parser_omp_target_data,
4129 c_parser_omp_target_update, c_parser_omp_target,
4130 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
4131 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
4132 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
4133 (c_parser_omp_construct): Add p_name and mask vars. Handle
4134 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
4135 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
4136 and c_parser_omp_sections callers.
4137 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
4138 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
4139 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
4140 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
4141 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
4142 OMP_CLAUSE_DEPEND.
4143 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
4144 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
4145 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
4146 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
4147 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
4148 * c-typeck.c: Include tree-inline.h.
4149 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
4150 handle_omp_array_sections_1, handle_omp_array_sections,
4151 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
4152 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
4153 user defined reductions.
4154 (c_tree_equal): New function.
4155 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
4156 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
4157 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
4158 c_check_omp_declare_reduction_r): New prototypes.
4159 * c-decl.c (current_omp_declare_target_attribute): New variable.
4160 (c_decl_attributes): New function.
4161 (start_decl, start_function): Use it instead of decl_attributes.
4162 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
4163 c_omp_reduction_decl, c_omp_reduction_lookup,
4164 c_check_omp_declare_reduction_r): New functions.
4165
0a6c2227
TT
41662013-09-25 Tom Tromey <tromey@redhat.com>
4167
4168 * Make-lang.in (c/gccspec.o): Remove.
4169 (CFLAGS-c/gccspec.o): New variable.
4170 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
4171 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
4172 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
4173
f3bc55f0
TT
41742013-09-25 Tom Tromey <tromey@redhat.com>
4175
4176 * Make-lang.in (c/gccspec.o): Don't use subshell.
4177
a24d975c
MP
41782013-09-18 Marek Polacek <polacek@redhat.com>
4179
4180 PR sanitize/58443
4181 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
4182 Remove unnecessary check.
4183
ce6923c5
MP
41842013-09-18 Marek Polacek <polacek@redhat.com>
4185
4186 PR sanitizer/58411
4187 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
4188 no_sanitize_undefined attribute.
4189
a1e51df9
KT
41902013-09-13 Kai Tietz <ktietz@redhat.com>
4191
4192 PR target/57848
4193 * c-decl.c (c_builtin_function_ext_scope): Remove
4194 wrong assumption that it is never called on prexisting
4195 symbol.
4196
0af94e6f
JR
41972013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
4198
4199 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
4200
20059c8b
GDR
42012013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
4202
4203 * c-objc-common.c (c_tree_printer): Tidy.
4204
de5a5fa1
MP
42052013-08-30 Marek Polacek <polacek@redhat.com>
4206
4207 * c-typeck.c (build_binary_op): Add division by zero and shift
4208 instrumentation.
4209
2531a1d9 42102013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4211 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4212
6e2bcc98 4213 PR c/35649
2531a1d9
JR
4214 * c-typeck.c (c_common_type): Prefer double_type_node over
4215 other REAL_TYPE types with the same precision.
4216 (convert_arguments): Likewise.
4217
025311c4
GDR
42182013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4219
4220 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4221 (c_initialize_diagnostics): Call a destructor for the early printer.
4222
da6ca2b5
GDR
42232013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4224
4225 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4226 printer initialization.
4227
318cda85 42282013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4229
318cda85
BI
4230 PR c/57490
4231 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4232 check for truth values.
4233 (expand_array_notation_exprs): Added truth values case. Removed an
4234 unwanted else. Added for-loop to walk through subtrees in default
4235 case.
4236
b066401f
GDR
42372013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4238
4239 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4240
fb48aadc
JM
42412013-07-23 Joseph Myers <joseph@codesourcery.com>
4242
4243 * c-parser.c (struct c_generic_association): Fix typo.
4244
433cc7b0
TT
42452013-07-23 Tom Tromey <tromey@redhat.com>
4246 Joseph Myers <joseph@codesourcery.com>
4247
4248 * c-parser.c (struct c_generic_association): New.
4249 (c_generic_association_d): New typedef.
4250 (c_parser_generic_selection): New function.
4251 (c_parser_postfix_expression): Handle RID_GENERIC.
4252
26d40c3d
JM
42532013-07-13 Jason Merrill <jason@redhat.com>
4254
4255 PR c++/57793
4256 * c-decl.c (finish_struct): Check for too-large class.
4257
ecdbd01a 42582013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4259
4260 PR c/57821
4261 * c-typeck.c (set_init_index): When folding, check for index overflow.
4262
1141ed3f
BI
42632013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4264
4265 * c-parser.c (c_parser_array_notation): Removed rejection of array
4266 notations in an array of function pointers.
4267
713b46fa
BI
42682013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4269
4270 * c-array-notation.c (make_triplet_val_inv): New function.
4271 (create_cmp_incr): Likewise.
4272 (create_array_refs): Likewise.
4273 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4274 Also modularized common parts between functions and called the function.
4275 (build_array_notation_expr): Likewise.
4276 (fix_conditional_array_notations_1): Likewise.
4277 (fix_array_notation_expr): Likewise.
4278 (fix_array_notation_call_expr): Likewise.
4279
92f20202
MP
42802013-06-18 Marek Polacek <polacek@redhat.com>
4281
4282 PR c/57630
4283 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4284
73a23b06
BI
42852013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4286
4287 * c-array-notation.c (build_array_notation_expr): Reject array notation
4288 mismatch between LHS and RHS even inside a call_expr. Also, removed
4289 a couple while statements that were dead code.
4290
00b8517d
BI
42912013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4292
4293 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4294 excessive precision expressions in function parameters. Also removed
4295 couple unwanted while statements.
4296
1509bdda
BI
42972013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4298
4299 * c-array-notation.c (expand_array_notation_exprs): Added
4300 ARRAY_NOTATION_REF case.
4301
d60f1706
BI
43022013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4303
4304 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4305 function to c-family/array-notation-common.c.
4306 (is_cilkplus_reduce_builtin): Likewise.
4307 (find_rank): Likewise.
4308 (extract_array_notation_exprs): Likewise.
4309 (replace_array_notations): Likewise.
4310 (find_inv_trees): Likewise.
4311 (replace_inv_trees): Likewise.
4312 (contains_array_notation_expr): Likewise.
4313 (find_correct_array_notation_type): Likewise.
4314 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4315 (struct inv_list): Moved this to c-family/array-notation-common.c.
4316 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4317
6d6efbb3
BI
43182013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4319
4320 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4321 reduction functions outside the for-loop. Added a check if the fundecl
4322 is non-NULL. Finally, removed an unwanted if-statement, and made the
4323 body unconditional.
4324
25c22937
BI
43252013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4326
4327 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4328 condition of the if-statement matches the rank of else-block and then-
4329 block when array notations are used.
4330 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4331 expression after the entire function body is parsed.
4332 (c_parser_expr_no_commas): Delayed creating array notation expressions
4333 to the end of function parsing.
4334 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4335 whole if-statement instead of just the condition.
4336 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4337
edd25645
BI
43382013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4339
4340 PR c/57474
4341 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4342 array to NULL_TREE if they are unused. Also added a check for the
4343 field to be NULL before its fields are used in future.
4344
065ce7f1
RO
43452013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4346
4347 PR bootstrap/57450
4348 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4349 (build_array_notation_expr): Likewise.
4350
36536d79
BI
43512013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4352
4353 * c-typeck.c (build_array_ref): Added a check to see if array's
4354 index is greater than one. If true, then emit an error.
4355 (build_function_call_vec): Exclude error reporting and checking
4356 for builtin array-notation functions.
4357 (convert_arguments): Likewise.
4358 (c_finish_return): Added a check for array notations as a return
4359 expression. If true, then emit an error.
4360 (c_finish_loop): Added a check for array notations in a loop
4361 condition. If true then emit an error.
4362 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4363 (build_binary_op): Added a check for array notation expr inside
4364 op1 and op0. If present, we call another function to find correct
4365 type.
4366 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4367 * c-parser.c (c_parser_compound_statement): Check if array
4368 notation code is used in tree, if so, then transform them into
4369 appropriate C code.
4370 (c_parser_expr_no_commas): Check if array notation is used in LHS
4371 or RHS, if so, then build array notation expression instead of
4372 regular modify.
4373 (c_parser_postfix_expression_after_primary): Added a check for
4374 colon(s) after square braces, if so then handle it like an array
4375 notation. Also, break up array notations in unary op if found.
4376 (c_parser_direct_declarator_inner): Added a check for array
4377 notation.
4378 (c_parser_compound_statement): Added a check for array notation in
4379 a stmt. If one is present, then expand array notation expr.
4380 (c_parser_if_statement): Likewise.
4381 (c_parser_switch_statement): Added a check for array notations in
4382 a switch statement's condition. If true, then output an error.
4383 (c_parser_while_statement): Similarly, but for a while.
4384 (c_parser_do_statement): Similarly, but for a do-while.
4385 (c_parser_for_statement): Similarly, but for a for-loop.
4386 (c_parser_unary_expression): Check if array notation is used in a
4387 pre-increment or pre-decrement expression. If true, then expand
4388 them.
4389 (c_parser_array_notation): New function.
4390 * c-array-notation.c: New file.
4391 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4392
cd192ccc
MS
43932013-05-23 Mike Stump <mikestump@comcast.net>
4394
4395 * c-typeck.c (convert_for_assignment): Handle references to memory
4396 spaces better.
4397
427b248d
JM
43982013-05-16 Jason Merrill <jason@redhat.com>
4399
4400 * Make-lang.in (cc1$(exeext)): Use link mutex.
4401
44d90fe1
PC
44022013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4403
4404 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4405 to simply use OPT_Wpointer_arith.
4406 (build_unary_op): Likewise.
4407
4e7d7b3d
JJ
44082013-04-03 Jakub Jelinek <jakub@redhat.com>
4409
4410 PR c/19449
4411 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4412 argument. If set, or it temporarily for parsing of the first
4413 argument into force_folding_builtin_constant_p.
4414 (c_parser_postfix_expression): Adjust callers.
4415
839b422f
RB
44162013-03-21 Richard Biener <rguenther@suse.de>
4417
4418 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4419 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4420
2ee028f1
MP
44212013-02-12 Marek Polacek <polacek@redhat.com>
4422
4423 PR c/44938
4424 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4425 origtypes to NULL.
4426
8824edff
JJ
44272013-01-24 Jakub Jelinek <jakub@redhat.com>
4428
4429 PR c/56078
4430 * c-typeck.c (set_nonincremental_init_from_string): If
4431 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4432 returned false.
4433 (process_init_element): Likewise.
4434
eadd3d0d
JJ
44352012-12-20 Jakub Jelinek <jakub@redhat.com>
4436
4437 PR c++/55619
4438 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4439 argument, don't call default_function_array_conversion
4440 nor c_fully_fold here.
4441 (c_parser_asm_statement): Adjust callers.
4442 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4443 and outputs here, and call default_function_array_conversion
4444 on inputs that don't need to be addressable.
4445
f8a93a2e
JJ
44462012-12-18 Jakub Jelinek <jakub@redhat.com>
4447
4448 PR c/39464
4449 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4450 warning require that both c_common_unsigned_type as well as
4451 c_common_signed_type is the same for both mvl and mvr types.
4452
9771b263
DN
44532012-11-16 Diego Novillo <dnovillo@google.com>
4454
4455 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4456
4457 * c-common.c: Use new vec API in vec.h.
4458 * c-common.h: Likewise.
4459 * c-gimplify.c: Likewise.
4460 * c-pragma.c: Likewise.
4461 * c-pretty-print.c: Likewise.
4462 * c-pretty-print.h: Likewise.
4463 * c-semantics.c: Likewise.
4464 * c-decl.c: Likewise.
4465 * c-parser.c: Likewise.
4466 * c-tree.h: Likewise.
4467 * c-typeck.c: Likewise.
4468
880661a4
JW
44692012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4470
4471 PR c++/54930
4472 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4473
077d1abe
MLI
44742012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4475
4476 PR c/53066
4477 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4478 shadows a function, unless the variable is a function or a
4479 pointer-to-function.
4480
3a785c97
JJ
44812012-10-12 Jakub Jelinek <jakub@redhat.com>
4482
4483 PR c/54381
4484 * c-parser.c (struct c_tree_loc_pair): Removed.
4485 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4486 add location_t * and tree * arguments, fill in array of 3
4487 sizeof_arg trees and corresponding locs.
4488 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4489 c_parser_expr_list callers.
4490 (c_parser_postfix_expression_after_primary): Likewise. Pass
4491 array of 3 sizeof_arg trees and locs (corresponding to first
4492 3 arguments) to sizeof_pointer_memaccess_warning.
4493
703c8606
LC
44942012-10-09 Lawrence Crowl <crowl@google.com>
4495
4496 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4497 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4498 hash table.
4499
5d9de0d0
PC
45002012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4501
4502 PR c++/54194
4503 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4504 call.
4505
a212e43f
MG
45062012-10-09 Marc Glisse <marc.glisse@inria.fr>
4507
4508 PR c++/54427
4509 * c-typeck.c: Include c-common.h.
4510 (enum stv_conv): Moved to c-common.h.
4511 (scalar_to_vector): Moved to c-common.c.
4512 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4513 * Make-lang.in: c-typeck.c depends on c-common.h.
4514
3b78de56
AC
45152012-10-04 Arnaud Charlet <charlet@adacore.com>
4516
4517 * c-decl.c (c_write_global_declarations): Fix handling of
4518 -fdump-ada-spec*.
4519
78c60e3d
SS
45202012-09-30 Sharad Singhai <singhai@google.com>
4521
4522 * c-decl.c (c_write_global_declarations): Use a different method
4523 to determine if the dump has ben initialized.
4524
9f33203d
JM
45252012-09-14 Joseph Myers <joseph@codesourcery.com>
4526
4527 PR c/54552
4528 * c-typeck.c (c_cast_expr): When casting to a type requiring
4529 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4530 c_fully_fold first.
4531
a27d595d
JM
45322012-09-14 Joseph Myers <joseph@codesourcery.com>
4533
4534 PR c/54103
4535 * c-typeck.c (build_unary_op): Pass original argument of
4536 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4537 any C_MAYBE_CONST_EXPR, if it has integer operands.
4538 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4539 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4540 to c_objc_common_truthvalue_conversion, then remove any
4541 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4542 c_objc_common_truthvalue_conversion not
4543 c_common_truthvalue_conversion.
4544 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4545 call note_integer_operands for arguments with integer operands
4546 that are not integer constants.
4547
9feb29df
JJ
45482012-09-13 Jakub Jelinek <jakub@redhat.com>
4549
4550 PR c/54559
4551 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4552 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4553
d409320c
JJ
45542012-08-31 Jakub Jelinek <jakub@redhat.com>
4555
4556 PR c/54428
4557 * c-convert.c (convert): Don't call fold_convert_loc if
4558 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4559 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4560 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4561
6265d07c
JJ
45622012-08-24 Jakub Jelinek <jakub@redhat.com>
4563
4564 PR c/54355
4565 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4566 for nested and empty_ok arguments in the call to
4567 c_parser_declaration_or_fndef.
4568
1a4049e7
JJ
45692012-08-17 Jakub Jelinek <jakub@redhat.com>
4570
4571 * c-tree.h (c_last_sizeof_arg): Declare.
4572 * c-parser.c (struct c_tree_loc_pair): New type.
4573 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4574 non-NULL.
4575 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4576 (c_parser_postfix_expression_after_primary): Likewise. Call
4577 sizeof_pointer_memaccess_warning if needed.
4578 (sizeof_ptr_memacc_comptypes): New function.
4579 * c-typeck.c (c_last_sizeof_arg): New global variable.
4580 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4581
0229aee9
UB
45822012-07-24 Uros Bizjak <ubizjak@gmail.com>
4583
4584 * c-lang.h (lang_decl): Add variable_size GTY option.
4585
7ee2468b
SB
45862012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4587
4588 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4589 * Make-lang.in: Fix dependencies.
4590
d4a10d0a
SB
45912012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4592
4593 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4594 and add language Makefile hooks.
4595 * config-lang.in: New file.
4596 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4597 add the required "normal" config-lang.in rules.
4598 * c-lang.h: Moved from gcc/ to here.
4599 * c-tree.h: Likewise.
4600 * c-objc-common.c: Likewise.
4601 * c-objc-common.h: Likewise.
4602 * c-typeck.c: Likewise.
4603 * c-convert.c: Likewise.
4604 * c-lang.c: Likewise.
4605 * c-aux-info.c: Likewise.
4606 * c-errors.c: Likewise.
4607 * gccspec.c: Likewise.
4608 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4609 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4610\f
cbe34bb5 4611Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4612
4613Copying and distribution of this file, with or without modification,
4614are permitted in any medium without royalty provided the copyright
4615notice and this notice are preserved.