]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
Simplify uses of "%<%s%>" to "%qs" (PR translation/79848)
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
2f6f187a
DM
12017-03-10 David Malcolm <dmalcolm@redhat.com>
2
3 PR translation/79848
4 * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to
5 "%qs".
6 * c-parser.c (c_parser_oacc_shape_clause): Likewise.
7
36618428
MP
82017-03-09 Marek Polacek <polacek@redhat.com>
9
10 PR sanitizer/79757
11 * c-parser.c (c_parser_declaration_or_fndef): Don't sanitize old-style
12 parameter declarations with initializers.
13
01e5af5a
JJ
142017-03-09 Jakub Jelinek <jakub@redhat.com>
15
16 PR c/79969
17 * c-decl.c (start_enum): Adjust DECL_SOURCE_LOCATION of
18 TYPE_STUB_DECL.
19
a71dbc63
JJ
202017-03-07 Jakub Jelinek <jakub@redhat.com>
21
22 PR c/79834
23 * c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
24 for "may only be used in compound statements" diagnostics, change it
25 such that the same translatable string is used for all pragmas. For
26 PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
27 diagnostics.
28 (c_parser_omp_cancellation_point, c_parser_omp_target_update,
29 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
30 "may only be used in compound statements" diagnostics, such that the
31 same translatable string is used for all pragmas.
32
1ff4bae6
MP
332017-03-04 Marek Polacek <polacek@redhat.com>
34
35 PR c/79847
36 * c-decl.c (implicit_decl_warning): Add missing space.
37
7f5a7d78
MP
382017-03-03 Marek Polacek <polacek@redhat.com>
39
40 PR c/79758
41 * c-decl.c (store_parm_decls_oldstyle): Check if the element of
42 current_function_prototype_arg_types is error_mark_node. Fix
43 formatting. Use TREE_VALUE instead of TREE_TYPE.
44
883c8f06
JJ
452017-03-03 Jakub Jelinek <jakub@redhat.com>
46
79c9b7a8
JJ
47 PR c/79837
48 * c-parser.c (c_parser_omp_clause_reduction): Don't mention
49 %<min%> or %<max%> in the diagnostics, instead mention identifier.
50 (c_parser_omp_declare_reduction): Don't mention %<min%> in the
51 diagnostics.
52
883c8f06
JJ
53 PR c/79836
54 * c-parser.c (c_parser_generic_selection): Use %<_Generic%>
55 instead of %<_Generic>.
56 (c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
57 (c_parser_omp_target_exit_data): Use %<release%> instead of
58 %<release>.
59
324ff1a0
JJ
602017-02-28 Jakub Jelinek <jakub@redhat.com>
61
62 * c-parser.c (c_parser_asm_statement): Use cond ? G_("...") : G_("...")
63 instead of just cond ? "..." : "...".
64 (c_parser_oacc_enter_exit_data): Use %s and ternary operator only
65 for "enter"/"exit" keyword.
66 (c_finish_oacc_routine): Don't use %s to supply portions of the
67 message.
68
4227c9ad
JJ
692017-02-24 Jakub Jelinek <jakub@redhat.com>
70
71 PR c++/79588
72 * c-parser.c (c_parser_postfix_expression_after_primary): Don't
73 handle -Wrestrict here.
74 * c-typeck.c (build_function_call_vec): Adjust
75 check_function_arguments caller.
76
5d972e66
RB
772017-02-23 Richard Biener <rguenther@suse.de>
78
79 PR c/79684
80 * gimple-parser.c (c_parser_gimple_statement): Use set_error
81 to initialize c_exprs to return.
82 (c_parser_gimple_binary_expression): Likewise.
83 (c_parser_gimple_unary_expression): Likewise.
84 (c_parser_gimple_postfix_expression): Likewise.
85
61ac5ebe
MP
862017-02-22 Marek Polacek <polacek@redhat.com>
87
88 PR c/79662
89 * c-typeck.c (convert_arguments): Handle error_mark_node.
90
41d1b0b1
PK
912017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
92
93 * gimple-parser.c (c_parser_gimple_postfix_expression): Check return
94 value of c_parser_parse_ssa_name against error_mark_node and emit
95 error if ssa name is anonymous and written as default definition.
96
eab1f169
PK
972017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
98
99 * gimple-parser.c (c_parser_gimple_postfix_expression): Handle
100 FMA_EXPR.
101
bcac0b4d
JJ
1022017-02-16 Jakub Jelinek <jakub@redhat.com>
103
104 PR c++/79512
105 * c-parser.c (c_parser_omp_target): For -fopenmp-simd
106 ignore #pragma omp target even when not followed by identifier.
107
1be33173
PK
1082017-02-14 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
109
110 * gimpler-parser.c (c_parser_gimple_statement): Handle ABS_EXPR.
111 (c_parser_gimple_unary_expression): Likewise.
112
aa326bfb
JJ
1132017-02-13 Jakub Jelinek <jakub@redhat.com>
114
115 * c-parser.c (c_parser_oacc_declare): Add missing space in
116 diagnostics.
117
8a398bc5
PK
1182017-02-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
119
120 PR c/79478
121 * gimple-parser.c (c_parser_gimple_postfix_expression): Call
122 set_c_expr_source_range when parsing ssa-name.
123
3dcde5ef
PG
1242017-02-10 Prasad Ghangal <prasad.ghangal@gmail.com>
125 Richard Biener <rguenther@suse.de>
126
127 * gimple-parser.c (c_parser_gimple_binary_expression): Avoid
128 building IL when arguments are error_mark_node.
129 (c_parser_gimple_unary_expression): Likewise.
130 (c_parser_gimple_if_stmt): Likewise.
131 (c_parser_gimple_switch_stmt): Likewise.
132 (c_parser_gimple_return_stmt): Likewise.
133 (c_parser_parse_ssa_name): When name lookup fails do not build
134 an SSA name. Use undeclared rather than not declared in error
135 reporting.
136
192b048b
MP
1372017-02-09 Marek Polacek <polacek@redhat.com>
138
139 PR c/79428
140 * c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
141 instead of c_parser_skip_until_found.
142
56f71478
JJ
1432017-02-09 Jakub Jelinek <jakub@redhat.com>
144
145 PR c/79431
146 * c-parser.c (c_parser_omp_declare_target): Don't invoke
147 symtab_node::get on automatic variables.
148
02889d23
CLT
1492016-02-09 Nathan Sidwell <nathan@codesourcery.com>
150 Chung-Lin Tang <cltang@codesourcery.com>
151
152 * c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
153 (c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
154 semantic checking.
155 * c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
156
7af4b20d
RB
1572017-02-07 Richard Biener <rguenther@suse.de>
158
159 * gimple-parser.c (c_parser_gimple_expr_list): Simplify.
160 (c_parser_gimple_postfix_expression_after_primary):
161 Do not use c_build_function_call_vec to avoid folding and promotion.
162 Simplify.
163
e5e391d6
MO
1642017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com>
165
166 PR lto/79061
167 * c-decl.c (pop_scope): Pass main_input_filename to
168 build_translation_unit_decl.
169
c2e84327
DM
1702017-01-24 David Malcolm <dmalcolm@redhat.com>
171
172 * c-parser.c: Include "read-rtl-function.h" and
173 "run-rtl-passes.h".
174 (c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
175 grammar to gimple-or-rtl-pass-list. Add rtl-function-definition
176 production. Update for renaming of field "gimple_pass" to
177 "gimple_or_rtl_pass". If __RTL was seen, call
178 c_parser_parse_rtl_body. Convert a timevar_push/pop pair
179 to an auto_timevar, to cope with early exit.
180 (c_parser_declspecs): Update RID_GIMPLE handling for renaming of
181 field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
182 c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
183 Handle RID_RTL.
184 (c_parser_parse_rtl_body): New function.
185 * c-tree.h (enum c_declspec_word): Add cdw_rtl.
186 (struct c_declspecs): Rename field "gimple_pass" to
187 "gimple_or_rtl_pass". Add field "rtl_p".
188 * gimple-parser.c (c_parser_gimple_pass_list): Rename to...
189 (c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
190 * gimple-parser.h (c_parser_gimple_pass_list): Rename to...
191 (c_parser_gimple_or_rtl_pass_list): ...this.
192
2ebd93e1
MP
1932017-01-20 Marek Polacek <polacek@redhat.com>
194
195 PR c/64279
196 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
197
b1c95bb5
RB
1982017-01-13 Richard Biener <rguenther@suse.de>
199
200 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
201 nops.
202
25329913
RB
2032017-01-13 Richard Biener <rguenther@suse.de>
204
205 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
206 _Literal ( type-name ) number.
207
6bb4ea5c
RB
2082017-01-12 Richard Biener <rguenther@suse.de>
209
210 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
211 __MEM.
212
6b5b4e9c
JJ
2132017-01-11 Jakub Jelinek <jakub@redhat.com>
214
215 PR c++/72813
216 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
217 PCH file.
218
e3252775
RB
2192017-01-11 Richard Biener <rguenther@suse.de>
220
221 PR bootstrap/79052
222 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
223 returns on parse errors.
224
a9342885
MP
2252017-01-04 Marek Polacek <polacek@redhat.com>
226
227 PR c++/64767
228 * c-parser.c (c_parser_postfix_expression): Mark zero character
229 constants by setting original_type in c_expr.
230 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
231 with a zero character constant.
232 (char_type_p): New function.
233
5dd9a9d0
DM
2342017-01-04 David Malcolm <dmalcolm@redhat.com>
235
236 * c-parser.c (c_parser_declaration_or_fndef): Create a
237 rich_location at init_loc and parse it to start_init.
238 (last_init_list_comma): New global.
239 (c_parser_braced_init): Update last_init_list_comma when parsing
240 commas. Pass it to pop_init_level. Pass location of closing
241 brace to pop_init_level.
242 (c_parser_postfix_expression_after_paren_type): Create a
243 rich_location at type_loc and parse it to start_init.
244 (c_parser_omp_declare_reduction): Likewise for loc.
245 * c-tree.h (start_init): Add rich_location * param.
246 (pop_init_level): Add location_t param.
247 * c-typeck.c (struct initializer_stack): Add field
248 "missing_brace_richloc".
249 (start_init): Add richloc param, use it to initialize
250 the stack node's missing_brace_richloc.
251 (last_init_list_comma): New decl.
252 (finish_implicit_inits): Pass last_init_list_comma to
253 pop_init_level.
254 (push_init_level): When finding missing open braces, add fix-it
255 hints to the richloc.
256 (pop_init_level): Add "insert_before" param and pass it
257 when calling pop_init_level. Add fixits about missing
258 close braces to any richloc. Use the richloc for the
259 -Wmissing-braces warning.
260 (set_designator): Pass last_init_list_comma to pop_init_level.
261 (process_init_element): Likewise.
262
cbe34bb5
JJ
2632017-01-01 Jakub Jelinek <jakub@redhat.com>
264
265 Update copyright years.
266
d17680f3
JJ
2672016-12-21 Jakub Jelinek <jakub@redhat.com>
268
0dba7960
JJ
269 PR bootstrap/78817
270 * c-typeck.c (build_function_call_vec): If check_function_arguments
271 returns true, set TREE_NO_WARNING on CALL_EXPR.
272
d17680f3
JJ
273 PR c/77767
274 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
275 to *expr instead of overwriting it.
276
aa90531e
RB
2772016-12-20 Richard Biener <rguenther@suse.de>
278
279 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
280 error recovery.
281 (c_parser_gimple_statement): Only build assigns for non-error
282 stmts.
283 (c_parser_gimple_postfix_expression_after): Improve error recovery.
284
629b3d75
MJ
2852016-12-14 Martin Jambor <mjambor@suse.cz>
286
287 * c-parser.c: Include omp-general.h and omp-offload.h instead of
288 omp-low.h.
289 (c_finish_oacc_routine): Adjusted call to
290 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
291 to use their new names.
292 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
293 use its new name.
294 (c_parser_oacc_update): Likewise.
295 (c_parser_omp_simd): Likewise.
296 (c_parser_omp_target_update): Likewise.
297 * c-typeck.c: Include omp-general.h instead of omp-low.h.
298 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
299 name.
300 (c_finish_omp_cancellation_point): Likewise.
301 * gimple-parser.c: Do not include omp-low.h
302
c5af52eb
CP
3032016-12-02 Cesar Philippidis <cesar@codesourcery.com>
304 James Norris <jnorris@codesourcery.com>
305
306 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
307 EXIT_DATA,WAIT} are not used in compound statements.
308 (c_parser_oacc_enter_exit_data): Update diagnostics.
309
48330c93
BE
3102016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
311
312 PR c++/71973
313 * c-decl.c (diagnose_mismatched_decls): Use
314 OPT_Wbuiltin_declaration_mismatch here too.
315
899ca90e 3162016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
317 Alan Hayward <alan.hayward@arm.com>
318 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
319
320 * c-decl.c (merge_decls): Use SET_DECL_MODE.
321 (make_label, finish_struct): Likewise.
322
1ee62b92 3232016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 324 Richard Biener <rguenther@suse.de>
22b15758 325
8e745a17
JJ
326 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
327 * config-lang.in (gtfiles): Add c/c-parser.h.
328 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
329 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
330 * c-parser.c (enum c_id_kind, struct c_token,
331 c_parser_next_token_is, c_parser_next_token_is_not,
332 c_parser_next_token_is_keyword,
333 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
334 Split out to ...
335 * c-parser.h: ... new header.
336 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 337 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
338 c_token_starts_typename, c_parser_next_token_starts_declspecs,
339 c_parser_next_tokens_start_declaration, c_parser_consume_token,
340 c_parser_error, c_parser_require, c_parser_skip_until_found,
341 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
342 c_parser_type_name): Export.
343 (c_parser_tokens_buf): New function.
344 (c_parser_error): Likewise.
345 (c_parser_set_error): Likewise.
346 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
347 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
348 via c_parser_parse_gimple_body.
8e745a17
JJ
349 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
350 c_token_starts_typename, c_parser_next_token_starts_declspecs,
351 c_parser_next_tokens_start_declaration, c_parser_consume_token,
352 c_parser_error, c_parser_require, c_parser_skip_until_found,
353 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
354 c_parser_type_name): Declare.
1ee62b92
PG
355 (struct c_parser): Declare forward.
356 (c_parser_tokens_buf): Declare.
8e745a17
JJ
357 (c_parser_error): Likewise.
358 (c_parser_set_error): Likewise.
359 * gimple-parser.c: New file.
360 * gimple-parser.h: Likewise.
1ee62b92 361
22b15758
UB
3622016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
363
364 PR c/35503
365 * c-parser.c (c_parser_postfix_expression_after_primary): Call
366 warn_for_restrict.
367
84ff4775
LCW
3682016-09-11 Le-Chun Wu <lcwu@google.com>
369 Mark Wielaard <mjw@redhat.com>
370
371 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
372 to the given -Wshadow= variant.
373
4d0cdd0c
TP
3742016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
375
376 * c-typeck.c: Include memmodel.h.
377
1202f33e
JJ
3782016-10-13 Jakub Jelinek <jakub@redhat.com>
379
380 PR target/77957
381 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
382 instead of lhd_return_null_tree_v.
383
8a14afd0
BS
3842016-10-07 Bernd Schmidt <bschmidt@redhat.com>
385
386 PR c++/69733
387 * c-decl.c (smallest_type_quals_location): New static function.
388 (grokdeclarator): Try to find the correct location for an ignored
389 qualifier.
390
81fea426
MP
3912016-09-26 Marek Polacek <polacek@redhat.com>
392
393 PR c/7652
394 * c-decl.c (pop_scope): Add gcc_fallthrough.
395
3962016-09-26 Marek Polacek <polacek@redhat.com>
397
398 PR c/7652
399 * c-parser.c (struct c_token): Add flags field.
400 (c_lex_one_token): Pass it to c_lex_with_flags.
401 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
402 into IFN_FALLTHROUGH.
403 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
404 attribute fallthrough after a case label or default label.
405 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
406
9a2300e9
MP
4072016-09-24 Marek Polacek <polacek@redhat.com>
408
409 PR c/77490
410 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
411 have boolean value. Warn about ++/-- on booleans.
412
7de76362
JJ
4132016-09-23 Jakub Jelinek <jakub@redhat.com>
414
415 * c-parser.c (incomplete_record_decls): Remove unnecessary
416 = vNULL initialization of file scope vec.
417
5b73d2ab
MP
4182016-09-16 Marek Polacek <polacek@redhat.com>
419
420 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
421
e51fbec3
MP
4222016-09-14 Marek Polacek <polacek@redhat.com>
423
424 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
425 (fix_array_notation_expr): Likewise.
426 * c-decl.c (finish_decl): Likewise.
427 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
428 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
429 (function_to_pointer_conversion): Use false instead of 0.
430 (convert_lvalue_to_rvalue): Likewise.
431 (parser_build_unary_op): Likewise.
432 (build_atomic_assign): Likewise.
433 (build_unary_op): Change nonconvert parameter type to bool, use
434 true/false instead of 1/0.
435 (build_binary_op): Use true instead of 1.
436
254830ba
DM
4372016-09-13 David Malcolm <dmalcolm@redhat.com>
438
439 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
440 of add_fixit_insert to add_fixit_insert_before.
441
4c13ba17
MP
4422016-09-13 Marek Polacek <polacek@redhat.com>
443
444 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
445 it.
446
54dcdb88
BE
4472016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
448
449 PR c++/77496
450 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
451 COMPOUND_EXPR to warn_for_omitted_condop.
452
e5106e27
DM
4532016-09-07 David Malcolm <dmalcolm@redhat.com>
454
455 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
456 c_get_substring_location for this new langhook.
457
9dc5773f
JJ
4582016-09-02 Jakub Jelinek <jakub@redhat.com>
459
460 PR c/65467
461 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
462 flag_openmp.
463 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
464 instead of mark_exp_read on low_bound/length expression.
465 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
466 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
467 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
468 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
469 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
470 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
471 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
472 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
473 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
474 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
475 instead of mark_expr_read.
476 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
477 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
478 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
479 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
480 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
481 array section bases outside of depend clause, for depend clause
482 use convert_lvalue_to_rvalue on the base.
483 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
484 linear, aligned, map, to and from clauses.
485 (c_omp_clause_copy_ctor): New function.
486
295844f6
MP
4872016-09-01 Marek Polacek <polacek@redhat.com>
488
489 PR c/7652
490 * c-typeck.c (composite_type): Add FALLTHRU comment.
491
089af25c
DM
4922016-08-31 David Malcolm <dmalcolm@redhat.com>
493
494 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
495 to the insertion fixits for "struct", "union", and "enum".
496
f9087798
DM
4972016-08-30 David Malcolm <dmalcolm@redhat.com>
498
499 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
500 rather than add_fixit_misspelled_id.
501 (undeclared_variable): Likewise.
502 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
503 now-redundant "here" params from add_fixit_insert method calls.
504 (c_parser_parameter_declaration): Likewise.
505 * c-typeck.c (build_component_ref): Remove now-redundant range
506 param from add_fixit_replace method calls.
507
ebef225f
MP
5082016-08-25 Marek Polacek <polacek@redhat.com>
509
510 * c-typeck.c (parser_build_binary_op): Pass LHS to
511 warn_logical_not_parentheses.
512
fe377a48
MP
5132016-08-25 Marek Polacek <polacek@redhat.com>
514
515 PR c/77323
516 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
517 or _FloatN or _FloatNx is not supported.
518 (finish_declspecs): Set type to integer_type_node when _FloatN or
519 _FloatNx is not supported.
520
c65699ef
JM
5212016-08-19 Joseph Myers <joseph@codesourcery.com>
522
523 PR c/32187
524 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
525 (struct c_declspecs): Add field floatn_nx_idx.
526 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
527 and _FloatNx type specifiers.
528 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
529 (c_parser_declspecs, c_parser_attribute_any_word)
530 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
531 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
532 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
533 narrower than double.
534
2f1364c2
JJ
5352016-08-12 Jakub Jelinek <jakub@redhat.com>
536 Martin Liska <mliska@suse.cz>
537
538 PR c/67410
539 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
540 % to determine val element to change. Assert that
541 wchar_bytes * charwidth fits into val array.
542
191816a3
MP
5432016-08-12 Marek Polacek <polacek@redhat.com>
544
545 PR c/7652
546 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
547 (c_parser_postfix_expression): Likewise.
548 * c-typeck.c (build_unary_op): Adjust fall through comment.
549 (c_mark_addressable): Likewise.
550
b95a64bb
JJ
5512016-08-11 Jakub Jelinek <jakub@redhat.com>
552
553 PR c/72816
554 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
555 array member through typedef, for orig_qual_indirect == 0 clear
556 orig_qual_type.
557
895aa8e1
DM
5582016-08-08 David Malcolm <dmalcolm@redhat.com>
559
560 PR c/64955
561 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
562 this up to selftest::run_c_tests.
563 (selftest::run_c_tests): New function.
564
0b212d8c
TS
5652016-08-04 Thomas Schwinge <thomas@codesourcery.com>
566
ae9281fc
TS
567 * c-parser.c (struct oacc_routine_data): Add error_seen and
568 fndecl_seen members.
569 (c_finish_oacc_routine): Use these.
570 (c_parser_declaration_or_fndef): Adjust.
571 (c_parser_oacc_routine): Likewise. Support more C language
572 constructs, and improve diagnostics. Move pragma context
573 checking...
574 (c_parser_pragma): ... here.
575
0b212d8c
TS
576 * c-parser.c (struct oacc_routine_data): New.
577 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
578 Simplify code.
579 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
580 declare target" attribute.
581
76e2c821
JB
5822016-08-01 Jan Beulich <jbeulich@suse.com>
583
584 * c-fold.c (c_fully_fold_internal): Also emit shift count
585 warnings for vector types.
586 * c-typeck.c (build_binary_op): Likewise.
587
f618a472
MP
5882016-07-29 Marek Polacek <polacek@redhat.com>
589
590 PR c/71742
591 * c-decl.c (finish_struct): Rephrase an error message.
592
efd0786f
MP
593 PR c/71853
594 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
595 to error node for invalid code.
596
e00dceaf
MP
597 PR c/71573
598 * c-decl.c (implicitly_declare): Return decl early not only for
599 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
600
673a107a
JJ
6012016-07-29 Jakub Jelinek <jakub@redhat.com>
602
603 PR c/71969
604 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
605 on GNU extern inline functions.
606
a5b5c8b6
MP
6072016-07-29 Marek Polacek <polacek@redhat.com>
608
609 PR c/71583
610 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
611 check expr.value.
612
e3fe09c1
UB
6132016-07-22 Uros Bizjak <ubizjak@gmail.com>
614
615 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
616
7c8f7eaa
DM
6172016-07-20 David Malcolm <dmalcolm@redhat.com>
618
619 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
620 spellcheck-tree.h
621 (best_macro_match): Likewise, converting from a typedef to a
622 subclass.
623 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
624 (lookup_name_fuzzy): Update for change of best_macro_match to a
625 subclass with a ctor that calls cpp_forall_identifiers.
626
de6a69ee
DM
6272016-07-20 David Malcolm <dmalcolm@redhat.com>
628
629 * c-decl.c (implicit_decl_warning): Update for conversion of
630 return type of lookup_name_fuzzy to const char *.
631 (undeclared_variable): Likewise.
632 (lookup_name_fuzzy): Convert return type from tree to
633 const char *.
634 * c-parser.c (c_parser_declaration_or_fndef): Update for
635 conversion of return type of lookup_name_fuzzy to const char *.
636 (c_parser_parameter_declaration): Likewise.
637
b1c9c068
CP
6382016-07-15 Cesar Philippidis <cesar@codesourcery.com>
639
640 * c-parser.c (c_parser_oacc_declare): Don't scan for
641 GOMP_MAP_POINTER.
642 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
643 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
644 zero-length subarrays.
645
ddbbcb19
JJ
6462016-07-15 Jakub Jelinek <jakub@redhat.com>
647
648 PR c/71858
649 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
650 instead of FUZZY_LOOKUP_NAME.
651 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
652 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
653
dd36b877
JJ
6542016-07-14 Jakub Jelinek <jakub@redhat.com>
655
656 PR c/71858
657 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
658
8c681247
TS
6592016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
660
661 * c-parser.c (c_parser_generic_selection): Make type of variable
662 auto_vec.
663 (c_parser_omp_declare_simd): Likewise.
664
bf4fa671
TS
6652016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
666
667 * c-decl.c (struct c_struct_parse_info): Change member types
668 from vec to auto_vec.
669 (start_struct): Adjust.
670 (finish_struct): Likewise.
671
557e8c49
JJ
6722016-07-02 Jakub Jelinek <jakub@redhat.com>
673
674 PR c/71719
675 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
676
54d19c3b
TS
6772016-06-29 Thomas Schwinge <thomas@codesourcery.com>
678
679 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
680 Move pragma context checking into...
681 (c_parser_omp_cancellation_point): ... here, and improve
682 diagnostic messages.
683 * c-typeck.c (c_finish_omp_cancel)
684 (c_finish_omp_cancellation_point): Improve diagnostic messages.
685
152ef731
JJ
6862016-06-29 Jakub Jelinek <jakub@redhat.com>
687
688 PR c/71685
689 * c-typeck.c (c_build_qualified_type): Don't clear
690 C_TYPE_INCOMPLETE_VARS for the main variant.
691
6922016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
693
694 PR c/71552
695 * c-typeck.c (output_init_element): Diagnose incompatible types
696 before non-constant initializers.
697
e9ac1f86
JJ
6982016-06-28 Jakub Jelinek <jakub@redhat.com>
699
700 * Make-lang.in: Don't cat ../stage_current if it does not exist.
701
277d7ee0
AK
7022016-06-23 Andi Kleen <ak@linux.intel.com>
703
704 * Make-lang.in: Add support for autofdo.
705
1a4f11c8
DM
7062016-06-22 David Malcolm <dmalcolm@redhat.com>
707
708 PR c/70339
709 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
710 (implicit_decl_warning): When issuing warnings for implicit
711 declarations, attempt to provide a suggestion via
712 lookup_name_fuzzy.
713 (undeclared_variable): Likewise when issuing errors.
714 (lookup_name_in_scope): Likewise.
715 (struct edit_distance_traits<cpp_hashnode *>): New struct.
716 (best_macro_match): New typedef.
717 (find_closest_macro_cpp_cb): New function.
718 (lookup_name_fuzzy): New function.
719 * c-parser.c: Include gcc-rich-location.h.
720 (c_token_starts_typename): Split out case CPP_KEYWORD into...
721 (c_keyword_starts_typename): ...this new function.
722 (c_parser_declaration_or_fndef): When issuing errors about
723 missing "struct" etc, add a fixit. For other kinds of errors,
724 attempt to provide a suggestion via lookup_name_fuzzy.
725 (c_parser_parms_declarator): When looking ahead to detect typos in
726 type names, also reject CPP_KEYWORD.
727 (c_parser_parameter_declaration): When issuing errors about
728 unknown type names, attempt to provide a suggestion via
729 lookup_name_fuzzy.
730 * c-tree.h (c_keyword_starts_typename): New prototype.
731
5a578671
JM
7322016-06-20 Joseph Myers <joseph@codesourcery.com>
733
734 PR c/71601
735 * c-typeck.c (build_conditional_expr): Return error_mark_node if
736 c_common_type returns error_mark_node.
737
3f8257db 7382016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
739
740 PR c/69507
741 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
742 __alignof__ (expression).
743
6a3f203c
DM
7442016-06-14 David Malcolm <dmalcolm@redhat.com>
745
746 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
747
264757fb
DM
7482016-06-14 David Malcolm <dmalcolm@redhat.com>
749
750 * c-typeck.c (build_component_ref): Simplify fixit code by
751 using gcc_rich_location::add_fixit_misspelled_id.
752 (set_init_label): Likewise.
753
f7e4f2e3
DM
7542016-06-13 David Malcolm <dmalcolm@redhat.com>
755
756 * c-parser.c (c_parser_initelt): Provide location of name for new
757 location_t param of set_init_label.
758 * c-tree.h (set_init_label): Add location_t param.
759 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
760 param and use it when issuing error messages about unrecognized
761 field names. Attempt to provide a fixit hint if appropriate,
762 otherwise update the error message to provide the type name.
763
4b1ffdb1
TS
7642016-06-10 Thomas Schwinge <thomas@codesourcery.com>
765
766 PR c/71381
767 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
768 Loosen checking.
769
44a845ca
MS
7702016-06-08 Martin Sebor <msebor@redhat.com>
771 Jakub Jelinek <jakub@redhat.com>
772
773 PR c++/70507
774 PR c/68120
775 * c-typeck.c (convert_arguments): Don't promote last argument
776 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
777
92a5f2ba
MP
7782016-06-08 Marek Polacek <polacek@redhat.com>
779
780 PR c/71418
781 * c-decl.c (grokdeclarator): Check TYPE_P.
782
08203f73
MP
783 PR c/71426
784 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
785 code.
786
6ffd47b7
DM
7872016-06-07 David Malcolm <dmalcolm@redhat.com>
788
789 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
790 and structure element reference, capture the location of the
791 element name token and pass it to build_component_ref.
792 (c_parser_postfix_expression_after_primary): Likewise for
793 structure element dereference.
794 (c_parser_omp_variable_list): Likewise for
795 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
796 * c-tree.h (build_component_ref): Add location_t param.
797 * c-typeck.c (build_component_ref): Add location_t param
798 COMPONENT_LOC. Use it, if available, when issuing hints about
799 mispelled member names to provide a fixit replacement hint.
800
1f40cff3
MP
8012016-06-06 Marek Polacek <polacek@redhat.com>
802
803 PR c/71362
804 * c-parser.c (c_parser_direct_declarator): Set location.
805
5545a907
MP
8062016-06-06 Marek Polacek <polacek@redhat.com>
807
808 * c-typeck.c (comptypes_internal): Handle comparisons of
809 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
810 TYPE_REF_CAN_ALIAS_ALL.
811
b605f663
CLT
8122016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
813
814 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
815 arguments as addressable when async clause exists.
816
00631022
JJ
8172016-05-30 Jakub Jelinek <jakub@redhat.com>
818
819 PR c++/71349
820 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
821 when combined with target construct.
822
7211a097
JJ
8232016-05-26 Jakub Jelinek <jakub@redhat.com>
824
825 * c-parser.c (c_parser_omp_clause_schedule): Warn if
826 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
827
95efe6b6
MP
8282016-05-25 Marek Polacek <polacek@redhat.com>
829
830 PR c/71265
831 * c-decl.c (c_make_fname_decl): Don't check seen_error.
832
a23faf7a
MP
833 PR c/71266
834 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
835
e46c7770
CP
8362016-05-24 Cesar Philippidis <cesar@codesourcery.com>
837
838 * c-parser.c (c_parser_oacc_declare): Add support for
839 GOMP_MAP_FIRSTPRIVATE_POINTER.
840 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
841 argument with enum c_omp_region_type ort.
842 (handle_omp_array_sections): Likewise. Update call to
843 handle_omp_array_sections_1.
844 (c_finish_omp_clauses): Add specific errors and warning messages for
845 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
846 call to handle_omp_array_sections.
847
a04e69c0
TS
8482016-05-24 Thomas Schwinge <thomas@codesourcery.com>
849
850 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
851
f17a223d
RB
8522016-05-24 Richard Biener <rguenther@suse.de>
853
854 PR middle-end/70434
855 PR c/69504
856 * c-typeck.c (build_array_ref): Do not complain about indexing
857 non-lvalue vectors. Adjust for function name change.
858
79063edd
MS
8592016-05-20 Martin Sebor <msebor@redhat.com>
860
861 PR c/71115
862 * c-typeck.c (error_init): Use
863 expansion_point_location_if_in_system_header.
864 (warning_init): Same.
865
8a40fef3
DM
8662016-05-19 David Malcolm <dmalcolm@redhat.com>
867
868 PR c/71171
869 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
870 in error-handling.
871 (c_parser_postfix_expression): Likewise.
872 * c-tree.h (c_expr::set_error): New method.
873 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
874 that result's range is initialized.
875
e9892350
JG
8762016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
877
878 * c-typeck.c (parser_build_unary_op): Fix formatting.
879
8fad45f5
MW
8802016-05-16 Matthew Wahab <matthew.wahab@arm.com>
881
882 * c-decl.c (grokdeclarator): Remove errmsg and use of
883 targetm.invalid_return_type.
884 (grokparms): Remove errmsg and use of
885 targetm.invalid_parameter_type.
886
aa4b467b
JM
8872016-05-13 Joseph Myers <joseph@codesourcery.com>
888
889 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
890 function return type.
891
4f2e1536
MP
8922016-05-12 Marek Polacek <polacek@redhat.com>
893
894 PR c/70756
895 * c-decl.c (build_compound_literal): Pass LOC down to
896 c_incomplete_type_error.
897 * c-tree.h (require_complete_type): Adjust declaration.
898 (c_incomplete_type_error): Likewise.
899 * c-typeck.c (require_complete_type): Add location parameter, pass it
900 down to c_incomplete_type_error.
901 (c_incomplete_type_error): Add location parameter, pass it down to
902 error_at.
903 (build_component_ref): Pass location down to c_incomplete_type_error.
904 (default_conversion): Pass location down to require_complete_type.
905 (build_array_ref): Likewise.
906 (build_function_call_vec): Likewise.
907 (convert_arguments): Likewise.
908 (build_unary_op): Likewise.
909 (build_c_cast): Likewise.
910 (build_modify_expr): Likewise.
911 (convert_for_assignment): Likewise.
912 (c_finish_omp_clauses): Likewise.
913
d6e83a8d
MM
9142016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
915
916 PR c/43651
917 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
918 is enabled.
919 * c-errors.c (pedwarn_c90): Return true if warned.
920 * c-tree.h (pedwarn_c90): Change return type to bool.
921 (enum c_declspec_word): Add new enumerator cdw_atomic.
922
5c3a10fb
MP
9232016-05-11 Marek Polacek <polacek@redhat.com>
924
925 PR c++/71024
926 * c-decl.c (diagnose_mismatched_decls): Factor out code to
927 diagnose_mismatched_attributes and call it.
928
cf68d92c
MP
9292016-05-10 Marek Polacek <polacek@redhat.com>
930
931 PR c/70255
932 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
933 on a declaration following the definition.
934
351f85c5
JJ
9352016-05-05 Jakub Jelinek <jakub@redhat.com>
936
937 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
938 parse it through to c_parser_c99_block_statement.
939 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
940 caller.
941
deef7113
MP
9422016-05-04 Marek Polacek <polacek@redhat.com>
943
944 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
945 OPT_Wdangling_else.
946
de55efd5
MP
9472016-05-04 Marek Polacek <polacek@redhat.com>
948
949 PR c/48778
950 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
951 for macro expansions.
952
79ce98bc
MP
9532016-05-03 Marek Polacek <polacek@redhat.com>
954
955 PR c/70859
956 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
957 check_builtin_function_arguments.
958
fb2647aa
RB
9592016-05-03 Richard Biener <rguenther@suse.de>
960
961 * Make-lang.in (cc1-checksum.c): For stage-final re-use
962 the checksum from the previous stage.
963
77886428
CP
9642016-05-02 Cesar Philippidis <cesar@codesourcery.com>
965
966 * c-parser.c (c_parser_oacc_all_clauses): Update call to
967 c_finish_omp_clauses.
968 (c_parser_omp_all_clauses): Likewise.
969 (c_parser_oacc_cache): Likewise.
970 (c_parser_oacc_loop): Likewise.
971 (omp_split_clauses): Likewise.
972 (c_parser_omp_declare_target): Likewise.
973 (c_parser_cilk_all_clauses): Likewise.
974 (c_parser_cilk_for): Likewise.
975 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
976 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
977
7176a4a0
MP
9782016-05-02 Marek Polacek <polacek@redhat.com>
979
980 PR c/70851
981 * c-decl.c (grokdeclarator): Diagnose when array's size has an
982 incomplete type.
983
e7ff0319
CP
9842016-04-29 Cesar Philippidis <cesar@codesourcery.com>
985
986 PR middle-end/70626
987 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
988 OACC_LOOP_CLAUSE_MASK.
989 (c_parser_oacc_kernels_parallel): Update call to
990 c_oacc_split_loop_clauses.
991
9f405ce1
AM
9922016-04-28 Andrew MacLeod <amacleod@redhat.com>
993
994 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
995 argument to build_modify_expr in two cases.
996
c1e1f433
BS
9972016-04-27 Bernd Schmidt <bschmidt@redhat.com>
998
999 * c-parser.c (c_parser_postfix_expression_after_primary): Call
1000 warn_for_memset instead of warning directly here.
1001
2448a956
MP
10022016-04-26 Marek Polacek <polacek@redhat.com>
1003
1004 PR c/67784
1005 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
1006 out of ...
1007 (c_parser_for_statement): ... here.
1008 (c_parser_if_statement): Use it.
1009 (c_parser_switch_statement): Use it.
1010 (c_parser_while_statement): Use it.
1011
b02a5e26
MP
1012 PR c/70791
1013 * c-decl.c (pushdecl): Pass LOCUS down to warning.
1014
477d4906
IV
10152016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1016
1017 PR c++/69363
1018 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
1019 instead of c_finish_cilk_clauses.
1020 * c-tree.h (c_finish_omp_clauses): Add new default argument.
1021 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
1022 floating-point variables in the linear clause for Cilk Plus.
1023
fe37c7af
MM
10242016-04-18 Michael Matz <matz@suse.de>
1025
1026 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
1027 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
1028
949505a9
MP
10292016-04-15 Marek Polacek <polacek@redhat.com>
1030
1031 PR c/70671
1032 * c-typeck.c (build_unary_op): Pass location down to error and
1033 warning call.
1034
dda1bf61
JJ
10352016-04-15 Jakub Jelinek <jakub@redhat.com>
1036
1037 PR c/70436
1038 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
1039 where needed.
1040 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
1041 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
1042 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
1043 Adjust c_parser_pragma callers.
1044 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
1045 caller.
1046 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
1047 c_parser_statement.
1048 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
1049 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
1050 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
1051 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
1052 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
1053 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
1054 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
1055 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
1056 down where needed.
1057 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
1058 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
1059 calls.
1060
99cd9857
MP
10612016-04-13 Marek Polacek <polacek@redhat.com>
1062
1063 PR c/70436
1064 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
1065 adjust callers.
1066 (c_parser_statement): Likewise.
1067 (c_parser_c99_block_statement): Likewise.
1068 (c_parser_while_statement): Likewise.
1069 (c_parser_for_statement): Likewise.
1070 (c_parser_if_body): Don't set IF_P here.
1071 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
1072 about dangling else here.
1073 * c-tree.h (c_finish_if_stmt): Adjust declaration.
1074 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
1075 warn about dangling else here.
1076
f13355da
MP
10772016-04-04 Marek Polacek <polacek@redhat.com>
1078
1079 PR c/70307
1080 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
1081
5fde6a45
MP
10822016-03-31 Marek Polacek <polacek@redhat.com>
1083
1084 PR c/70297
1085 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
1086
4bbf545b
DM
10872016-03-18 David Malcolm <dmalcolm@redhat.com>
1088
1089 PR c/70281
1090 * c-parser.c (c_parser_postfix_expression): Set the source range
1091 for uses of "__builtin_types_compatible_p".
1092
fcc2b74f
JJ
10932016-03-17 Jakub Jelinek <jakub@redhat.com>
1094
1095 PR c/70280
1096 * c-typeck.c (composite_type): Don't count void_list_node
1097 into len, if the list is terminated by void_list_node, start
1098 with void_list_node instead of NULL for newargs. Stop
1099 at void_list_node.
1100
ab4c578f
MP
11012016-03-16 Marek Polacek <polacek@redhat.com>
1102
1103 PR c/70093
1104 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
1105 nested functions returning VM types.
1106
96b3c82d
CP
11072016-03-09 Cesar Philippidis <cesar@codesourcery.com>
1108
1109 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
1110 when calling c_finish_omp_clauses.
1111
29b9828f
BS
11122016-03-04 Bernd Schmidt <bschmidt@redhat.com>
1113
1114 PR c/69824
1115 * c-decl.c (get_parm_info): Don't queue implicit function declarations
1116 for later.
1117
7ff6ca38
MP
11182016-03-04 Marek Polacek <polacek@redhat.com>
1119
1120 PR c/69798
1121 * c-parser.c (c_parser_postfix_expression): Call
1122 c_parser_cast_expression rather than c_parser_postfix_expression.
1123
686e2237
JJ
11242016-03-01 Jakub Jelinek <jakub@redhat.com>
1125
1126 PR c/69796
1127 PR c/69974
1128 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
1129 of incomplete decls to error_mark_node.
1130
0b05329b
MP
11312016-02-24 Marek Polacek <polacek@redhat.com>
1132
1133 PR c/69819
1134 * c-decl.c (finish_decl): Don't update the copy of the type of a
1135 different decl type.
1136
067fbd8b
JJ
11372016-02-23 Jakub Jelinek <jakub@redhat.com>
1138
1139 PR objc/69844
1140 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
1141 in id_kind reclassification.
1142
bf14eba2
JJ
11432016-02-16 Jakub Jelinek <jakub@redhat.com>
1144
1145 PR c/69835
1146 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
1147
ba539195
JN
11482016-02-16 James Norris <jnorris@codesourcery.com>
1149
1150 PR c/64748
1151 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
1152
16595a1f
BS
11532016-02-12 Bernd Schmidt <bschmidt@redhat.com>
1154
f48dfe98
BS
1155 * c-decl.c (build_null_declspecs): Zero the entire struct.
1156
16595a1f
BS
1157 PR c/69522
1158 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
1159 callers changed. If nested_p is true, use it to call
1160 finish_implicit_inits.
1161 * c-tree.h (finish_implicit_inits): Declare.
1162 * c-typeck.c (finish_implicit_inits): New function. Move code
1163 from ...
1164 (push_init_level): ... here.
1165 (set_designator, process_init_element): Call finish_implicit_inits.
1166
66756373
JJ
11672016-02-11 Jakub Jelinek <jakub@redhat.com>
1168
1169 PR c/69768
1170 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
1171 arguments for -Waddress warning.
1172
1066e9b5
JJ
11732016-02-04 Jakub Jelinek <jakub@redhat.com>
1174
1175 PR c/69669
1176 * c-decl.c (finish_enum): When honoring mode attribute,
1177 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
1178
3a5d2ba4
JJ
11792016-01-29 Jakub Jelinek <jakub@redhat.com>
1180
1181 PR debug/69518
1182 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
1183 all type variants, not just TYPE_MAIN_VARIANT.
1184
cbdd8ae0
JJ
11852016-01-27 Jakub Jelinek <jakub@redhat.com>
1186
1187 PR debug/66869
1188 * c-decl.c (c_write_global_declarations_1): Warn with
1189 warn_unused_function if static prototype without definition
1190 is not C_DECL_USED.
1191
fa74a4bc
MP
11922016-01-27 Marek Polacek <polacek@redhat.com>
1193
1194 PR c/68062
1195 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1196 to unsigned, if needed. Add -Wsign-compare warning.
1197
13f92e8d
JJ
11982016-01-26 Jakub Jelinek <jakub@redhat.com>
1199
1200 PR tree-optimization/69483
1201 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1202
cd8e73dc 12032016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1204
1205 PR c/24293
1206 * c-tree.h (incomplete_record_decls): Declare.
1207 * c-parser.c (incomplete_record_decls): Define.
1208 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1209 report error if any decl has zero size.
1210 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1211 or enum type to incomplete_record_decls.
1212
e6d6ec9e
TV
12132016-01-14 Tom de Vries <tom@codesourcery.com>
1214
1215 PR tree-optimization/68773
1216 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1217 set force_output.
1218
00083992
MP
12192016-01-14 Marek Polacek <polacek@redhat.com>
1220
1221 PR c/69262
1222 * c-decl.c (grokdeclarator): Provide more information for invalid
1223 array declarations.
1224
7443cf13
DM
12252016-01-06 David Malcolm <dmalcolm@redhat.com>
1226
1227 * c-parser.c (c_parser_unary_expression): For dereferences, build
1228 a combined location before calling build_indirect_ref, so that
1229 error reports cover the full range, manually updating the c_expr
1230 src_range.
1231
6b131d5b
MP
12322016-01-06 Marek Polacek <polacek@redhat.com>
1233
1234 PR sanitizer/69099
1235 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1236 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1237 NULL.
1238
818ab71a
JJ
12392016-01-04 Jakub Jelinek <jakub@redhat.com>
1240
1241 Update copyright years.
1242
2fe0a208
MP
12432016-01-04 Marek Polacek <polacek@redhat.com>
1244
1245 PR c/68908
1246 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1247 optimization to use __atomic_fetch_* built-in if possible.
1248
c7b48c8a
TS
12492015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1250
1251 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1252 into...
1253 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1254 all users.
1255
fda5652f
MP
12562015-12-22 Marek Polacek <polacek@redhat.com>
1257
1258 PR c/69002
1259 * c-typeck.c (build_component_ref): Warn when acessing elements of
1260 atomic structures or unions.
1261
745e411d
DM
12622015-12-21 David Malcolm <dmalcolm@redhat.com>
1263
1264 * c-typeck.c: Include "gcc-rich-location.h".
1265 (build_binary_op): In the two places that call binary_op_error,
1266 create a gcc_rich_location and populate it with the location of
1267 the binary op and its two operands.
1268
94c40e19
DM
12692015-12-16 David Malcolm <dmalcolm@redhat.com>
1270
1271 * c-parser.c (c_parser_statement_after_labels): When calling
1272 c_finish_return, Use the return expression's location if it has
1273 one, falling back to the location of the first token within it.
1274 * c-typeck.c (c_finish_return): When issuing warnings about
1275 the incorrect presence/absence of a return value, issue a note
1276 showing the declaration of the function.
1277
de67c4c3
DM
12782015-12-16 David Malcolm <dmalcolm@redhat.com>
1279
1280 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1281 to 4.
1282 (c_parser_peek_nth_token): New function.
1283 (c_parser_peek_conflict_marker): New function.
1284 (c_parser_error): Detect conflict markers and report them as such.
1285
a10704e1
DM
12862015-12-16 David Malcolm <dmalcolm@redhat.com>
1287
1288 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1289 to preserve range information for the primary expression
1290 in the call to c_parser_postfix_expression_after_primary.
1291
8062bca6
DM
12922015-12-16 David Malcolm <dmalcolm@redhat.com>
1293
1294 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1295 expression location, falling back on the first token location,
1296 rather than always using the latter.
1297
d06f8b75
MP
12982015-12-16 Marek Polacek <polacek@redhat.com>
1299
1300 PR c/64637
1301 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1302 available.
1303
2994fb91
MP
13042015-12-15 Marek Polacek <polacek@redhat.com>
1305
1306 PR c/68907
1307 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1308 artificial decl.
1309
a1b93f8d
DM
13102015-12-08 David Malcolm <dmalcolm@redhat.com>
1311
1312 * c-parser.c (c_parser_alignof_expression): Capture location of
1313 closing parenthesis (if any), or of end of unary expression, and
1314 use it to build a src_range for the expression.
1315
46c6e1e2
DM
13162015-12-08 David Malcolm <dmalcolm@redhat.com>
1317
1318 PR c/68757
1319 * c-parser.c (c_parser_get_builtin_args): Add
1320 "out_close_paren_loc" param, and write back to it.
1321 (c_parser_postfix_expression): Capture the closing
1322 parenthesis location for RID_CHOOSE_EXPR,
1323 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1324 RID_BUILTIN_SHUFFLE and use it to set the source range
1325 for such expressions; within RID_BUILTIN_COMPLEX set
1326 the underlying location.
1327
66189108
MP
13282015-12-07 Marek Polacek <polacek@redhat.com>
1329
1330 PR c/68668
1331 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1332 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1333
f187980b
EB
13342015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1335
1336 * c-tree.h (c_build_va_arg): Adjust prototype.
1337 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1338 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1339 parameter, adjust throughout and issue an error if EXPR is a component
1340 with reverse storage order.
1341
4250754e
JM
13422015-12-02 Jason Merrill <jason@redhat.com>
1343
1344 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1345 (c_fully_fold_internal, decl_constant_value_for_optimization):
1346 Move from c-common.c.
1347 * c-tree.h: Declare decl_constant_value_for_optimization.
1348 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1349
e9e32ee6
JM
13502015-12-02 Joseph Myers <joseph@codesourcery.com>
1351
1352 PR c/68162
1353 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1354 following link from declarator to next declarator. Track original
1355 qualified type and pass it to c_build_qualified_type.
1356 * c-typeck.c (c_build_qualified_type): Add arguments
1357 orig_qual_type and orig_qual_indirect.
1358
ff7a55bf
TS
13592015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1360
1361 * c-parser.c (c_parser_omp_clause_name)
1362 (c_parser_oacc_all_clauses): Alphabetical sorting.
1363
657e4e47
JJ
13642015-12-02 Jakub Jelinek <jakub@redhat.com>
1365
1366 PR c/68533
1367 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1368 for diagnostics.
1369
37d5ad46
JB
13702015-12-01 Julian Brown <julian@codesourcery.com>
1371 Cesar Philippidis <cesar@codesourcery.com>
1372 James Norris <James_Norris@mentor.com>
1373
1374 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1375 (c_parser_oacc_clause_use_device): New function.
1376 (c_parser_oacc_all_clauses): Add use_device support.
1377 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1378 (c_parser_oacc_host_data): New function.
1379 (c_parser_omp_construct): Add host_data support.
1380 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1381 * c-typeck.c (c_finish_oacc_host_data): New function.
1382 (c_finish_omp_clauses): Add use_device support.
1383
a4850ce9
JH
13842015-11-29 Jan Hubicka <hubicka@ucw.cz>
1385
1386 PR c/67106
1387 * c-decl.c: Set TYPE_PACKED in variants.
1388
b58d3df2
ML
13892015-11-27 Martin Liska <mliska@suse.cz>
1390
1391 PR c++/68312
1392 * c-array-notation.c (fix_builtin_array_notation_fn):
1393 Use release_vec_vec instead of vec::release.
1394 (build_array_notation_expr): Likewise.
1395 (fix_conditional_array_notations_1): Likewise.
1396 (fix_array_notation_expr): Likewise.
1397 (fix_array_notation_call_expr): Likewise.
1398
aec17bfe
JJ
13992015-11-27 Jakub Jelinek <jakub@redhat.com>
1400
1401 PR c/63326
1402 * c-parser.c (c_parser_compound_statement_nostart): If
1403 last_label is true, use pragma_stmt instead of pragma_compound
1404 as second c_parser_pragma argument.
1405 (c_parser_omp_ordered, c_parser_omp_target_update,
1406 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1407 false as second argument to c_parser_skip_to_pragma_eol after
1408 diagnosing standalone directives used in pragma_stmt context.
1409
688c4de0
IV
14102015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1411
1412 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1413 with "if (ENABLE_OFFLOADING)".
1414
cbd03aee
DM
14152015-11-23 David Malcolm <dmalcolm@redhat.com>
1416
1417 PR objc/68438
1418 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1419 for various Objective-C constructs: Class.name syntax,
1420 @selector(), @protocol(), @encode(), and [] message syntax.
1421
a87a86e1
DM
14222015-11-20 David Malcolm <dmalcolm@redhat.com>
1423
1424 PR 62314
1425 * c-typeck.c (should_suggest_deref_p): New function.
1426 (build_component_ref): Special-case POINTER_TYPE when
1427 generating a "not a structure of union" error message, and
1428 suggest a "->" rather than a ".", providing a fix-it hint.
1429
8ece8dfb
DM
14302015-11-19 David Malcolm <dmalcolm@redhat.com>
1431
1432 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1433 candidate into a new function, find_closest_identifier.
1434
433068cc
MP
14352015-11-19 Marek Polacek <polacek@redhat.com>
1436
1437 PR c/68412
1438 * c-typeck.c (parser_build_binary_op): Properly handle
1439 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1440
bef08b71
DM
14412015-11-17 David Malcolm <dmalcolm@redhat.com>
1442
1443 * c-parser.c (set_c_expr_source_range): Bulletproof both
1444 overloaded implementations against NULL expr->value.
1445 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1446 values.
1447 (c_parser_unary_expression): Likewise when handling addresses of
1448 labels.
1449 (c_parser_postfix_expression): Likewise for statement expressions,
1450 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1451 __builtin_va_arg, and for __builtin_offset_of.
1452 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1453 src_range using the range of the braced initializer.
1454 (c_parser_transaction_expression): Set src_range for "ret" to a
1455 sane pair of values.
1456
fff77217
KY
14572015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1458
1459 * c-parser.c (c_finish_omp_declare_simd): Look for
1460 "simd" attribute as well. Update error message.
1461
1d899da2
TS
14622015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1463
1464 * c-parser.c (c_parser_omp_declare_target): Adjust.
1465
e4606348
JJ
14662015-11-14 Jakub Jelinek <jakub@redhat.com>
1467
1468 * c-typeck.c (c_finish_omp_clauses): Don't mark
1469 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1470
3e636daf
MP
14712015-11-14 Marek Polacek <polacek@redhat.com>
1472
1473 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1474 * c-typeck.c: Likewise.
1475
ebedc9a3
DM
14762015-11-13 David Malcolm <dmalcolm@redhat.com>
1477
1478 * c-decl.c (warn_defaults_to): Pass line_table to
1479 rich_location ctor.
1480 * c-errors.c (pedwarn_c99): Likewise.
1481 (pedwarn_c90): Likewise.
1482 * c-parser.c (set_c_expr_source_range): New functions.
1483 (c_token::get_range): New method.
1484 (c_token::get_finish): New method.
1485 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1486 based on the range from the start of the LHS to the end of the
1487 RHS.
1488 (c_parser_conditional_expression): Likewise, based on the range
1489 from the start of the cond.value to the end of exp2.value.
1490 (c_parser_binary_expression): Call set_c_expr_source_range on
1491 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1492 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1493 based on the cast_loc through to the end of the expr.
1494 (c_parser_unary_expression): Likewise, based on the
1495 op_loc through to the end of op.
1496 (c_parser_sizeof_expression) Likewise, based on the start of the
1497 sizeof token through to either the closing paren or the end of
1498 expr.
1499 (c_parser_postfix_expression): Likewise, using the token range,
1500 or from the open paren through to the close paren for
1501 parenthesized expressions.
1502 (c_parser_postfix_expression_after_primary): Likewise, for
1503 various kinds of expression.
1504 * c-tree.h (struct c_expr): Add field "src_range".
1505 (c_expr::get_start): New method.
1506 (c_expr::get_finish): New method.
1507 (set_c_expr_source_range): New decls.
1508 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1509 on ret for prefix unary ops.
1510 (parser_build_binary_op): Likewise, running from the start of
1511 arg1.value through to the end of arg2.value.
1512
ec8b536f
MP
15132015-11-13 Marek Polacek <polacek@redhat.com>
1514
1515 PR c/68320
1516 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1517
277fe616
DM
15182015-11-13 David Malcolm <dmalcolm@redhat.com>
1519
1520 * c-typeck.c: Include spellcheck.h.
1521 (lookup_field_fuzzy_find_candidates): New function.
1522 (lookup_field_fuzzy): New function.
1523 (build_component_ref): If the field was not found, try using
1524 lookup_field_fuzzy and potentially offer a suggestion.
1525
6e232ba4
JN
15262015-11-12 James Norris <jnorris@codesourcery.com>
1527 Joseph Myers <joseph@codesourcery.com>
1528
1529 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1530 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1531 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1532 and PRAGMA_OMP_CLAUSE_LINK.
1533 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1534 and PRAGMA_OACC_CLAUSE_LINK.
1535 (OACC_DECLARE_CLAUSE_MASK): New definition.
1536 (c_parser_oacc_declare): New function.
1537
9be4f715
MP
15382015-11-12 Marek Polacek <polacek@redhat.com>
1539
1540 PR c/67784
1541 * c-parser.c (c_parser_for_statement): Reclassify the token in
1542 a correct scope.
1543
e78bede6
MP
15442015-11-11 Marek Polacek <polacek@redhat.com>
1545
1546 PR c/68107
1547 PR c++/68266
1548 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1549 checking the size of an array.
1550
69f293c9
AM
15512015-11-11 Andrew MacLeod <amacleod@redhat.com>
1552
1553 * c-array-notation.c: Remove unused header files.
1554 * c-aux-info.c: Likewise.
1555 * c-convert.c: Likewise.
1556 * c-decl.c: Likewise.
1557 * c-errors.c: Likewise.
1558 * c-lang.c: Likewise.
1559 * c-objc-common.c: Likewise.
1560 * c-parser.c: Likewise.
1561 * c-typeck.c: Likewise.
1562 * gccspec.c: Likewise.
1563
3a40d81d
NS
15642015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1565 Cesar Philippidis <cesar@codesourcery.com>
1566 James Norris <jnorris@codesourcery.com>
1567 Julian Brown <julian@codesourcery.com>
1568 Nathan Sidwell <nathan@codesourcery.com>
1569
1570 c/
1571 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1572 routine arg.
1573 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1574 (c_parser_pragma): Parse 'acc routine'.
1575 (OACC_ROUTINE_CLAUSE_MARK): Define.
1576 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1577
fc402eec
AA
15782015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1579
1580 PR debug/67192
1581 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1582 location of the backward-goto to the start of the loop body.
1583
f6b0b3db
AA
15842015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1585
1586 PR debug/67192
1587 * c-parser.c (c_parser_while_statement): Finish the loop before
1588 parsing ahead for misleading indentation.
1589 (c_parser_for_statement): Likewise.
1590
ee45a32d
EB
15912015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1592
1593 * c-decl.c (finish_struct): If the structure has reverse storage
1594 order, rewrite the type of array fields with scalar component. Call
1595 maybe_apply_pragma_scalar_storage_order on entry.
1596 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1597 errors on bit-fields and reverse SSO here and not...
1598 (c_mark_addressable): ...here.
1599 (output_init_element): Adjust call to initializer_constant_valid_p.
1600 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1601
8a645150
DM
16022015-11-06 David Malcolm <dmalcolm@redhat.com>
1603
1604 * c-decl.c (warn_defaults_to): Update for change in signature
1605 of diagnostic_set_info.
1606 * c-errors.c (pedwarn_c99): Likewise.
1607 (pedwarn_c90): Likewise.
1608 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1609 for textinfo::set_location.
1610
7a5e4956
CP
16112015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1612 Thomas Schwinge <thomas@codesourcery.com>
1613 James Norris <jnorris@codesourcery.com>
1614
1615 * c-parser.c (c_parser_omp_clause_name): Add support for
1616 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1617 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1618 default(none) in OpenACC.
1619 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1620 arguments.
1621 (c_parser_oacc_clause_tile): New function.
1622 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1623 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1624 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1625 TILE}.
1626 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1627 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1628 FIRSTPRIVATE}.
1629 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1630 (c_parser_oacc_update): Update the error message for missing clauses.
1631 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1632 and OMP_CLAUSE_INDEPENDENT.
1633
bfcfbfa0
MP
16342015-11-05 Marek Polacek <polacek@redhat.com>
1635
1636 PR c/68090
1637 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1638 deal with pre-evaluation on invalid types.
1639
e01d41e5
JJ
16402015-11-05 Jakub Jelinek <jakub@redhat.com>
1641 Ilya Verbin <ilya.verbin@intel.com>
1642
1643 * c-parser.c: Include context.h and gimple-expr.h.
1644 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1645 monotonic together with nonmonotonic.
1646 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1647 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1648 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1649 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1650 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1651 expressions on combined target teams before the target.
1652 (c_parser_omp_declare_target): If decl has "omp declare target" or
1653 "omp declare target link" attribute, and cgraph or varpool node already
1654 exists, then set corresponding flags. Call c_finish_omp_clauses
1655 in the parenthesized extended-list syntax case.
1656 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1657 declare target.
1658 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1659 on OMP_CLAUSE_REDUCTION array sections.
1660 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1661 into the constant offset, or for variable low-bound using
1662 POINTER_PLUS_EXPR. For structure element based array sections use
1663 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1664 (c_finish_omp_clauses): Drop generic_field_head, structure
1665 elements are now always mapped even as array section bases,
1666 diagnose same var in data sharing and mapping clauses. Diagnose if
1667 linear step on declare simd is neither a constant nor a uniform
1668 parameter. Look through POINTER_PLUS_EXPR for array section
1669 reductions. Diagnose the same var or function appearing multiple
1670 times on the same directive. Fix up wording for the to clause if t
1671 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1672 modifier on kinds other than dynamic or guided or nonmonotonic
1673 modifier together with ordered clause.
1674
4bf9e5a8
TS
16752015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1676 Chung-Lin Tang <cltang@codesourcery.com>
1677
1678 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1679
2adfab87
AM
16802015-10-29 Andrew MacLeod <amacleod@redhat.com>
1681
1682 * c-array-notation.c: Reorder #include's and remove duplicates.
1683 * c-aux-info.c: Likewise.
1684 * c-convert.c: Likewise.
1685 * c-decl.c: Likewise.
1686 * c-errors.c: Likewise.
1687 * c-lang.c: Likewise.
1688 * c-objc-common.c: Likewise.
1689 * c-parser.c: Likewise.
1690 * c-typeck.c: Likewise.
1691
e922069e
JW
16922015-10-26 Jim Wilson <jim.wilson@linaro.org>
1693
1694 PR debug/66068
1695 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1696 after calling build_qualified_type.
1697
765dd391
CP
16982015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1699 Thomas Schwinge <thomas@codesourcery.com>
1700 James Norris <jnorris@codesourcery.com>
1701 Joseph Myers <joseph@codesourcery.com>
1702 Julian Brown <julian@codesourcery.com>
1703 Bernd Schmidt <bschmidt@redhat.com>
1704
1705 * c-parser.c (c_parser_oacc_shape_clause): New.
1706 (c_parser_oacc_simple_clause): New.
1707 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1708 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1709
88bae6f4
TS
17102015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1711 James Norris <jnorris@codesourcery.com>
1712 Cesar Philippidis <cesar@codesourcery.com>
1713
1714 PR c/64765
1715 PR c/64880
1716 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1717 parameters, and handle these. Adjust all users.
1718 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1719 into...
1720 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1721 all users.
1722 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1723 declare functions.
1724 (c_finish_omp_construct): Declare function.
1725 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1726 Merge functions into...
1727 (c_finish_omp_construct): ... this new function.
1728
a8fc2579
RB
17292015-10-22 Richard Biener <rguenther@suse.de>
1730
1731 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1732 before folding a MINUS_EXPR.
1733
e9122ef6
MP
17342015-10-21 Marek Polacek <polacek@redhat.com>
1735
1736 PR c/68024
1737 * c-decl.c (start_function): Warn about vararg functions without
1738 a prototype.
1739
9f47c7e5
IE
17402015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1741
1742 * c-typeck.c (build_conditional_expr): Use boolean vector
1743 type for vector comparison.
1744 (build_vec_cmp): New.
1745 (build_binary_op): Use build_vec_cmp for comparison.
1746
fa60eeb9
MP
17472015-10-20 Marek Polacek <polacek@redhat.com>
1748
1749 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1750
2c7020eb
MP
17512015-10-20 Marek Polacek <polacek@redhat.com>
1752
1753 PR c/67964
1754 * c-parser.c (c_parser_attributes): Break out of the loop if the
1755 token after an attribute isn't a comma.
1756
d9a6bd32
JJ
17572015-10-13 Jakub Jelinek <jakub@redhat.com>
1758 Aldy Hernandez <aldyh@redhat.com>
1759
1760 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1761 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1762 (c_parser_omp_variable_list): Handle structure elements for
1763 map, to and from clauses. Handle array sections in reduction
1764 clause. Formatting fixes.
1765 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1766 if clause modifiers.
1767 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1768 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1769 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1770 c_parser_omp_clause_is_device_ptr): New functions.
1771 (c_parser_omp_clause_ordered): Parse optional parameter.
1772 (c_parser_omp_clause_reduction): Handle array reductions.
1773 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1774 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1775 functions.
1776 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1777 (c_parser_omp_clause_depend_sink): New function.
1778 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1779 (c_parser_omp_clause_map): Parse release/delete map kinds and
1780 optional always modifier.
1781 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1782 and c_finish_omp_clauses callers.
1783 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1784 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1785 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1786 (OMP_CRITICAL_CLAUSE_MASK): Define.
1787 (c_parser_omp_critical): Parse critical clauses.
1788 (c_parser_omp_for_loop): Handle doacross loops, adjust
1789 c_finish_omp_for and c_finish_omp_clauses callers.
1790 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1791 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1792 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1793 (c_parser_omp_for): Disallow ordered clause when combined with
1794 distribute. Disallow linear clause when combined with distribute
1795 and not combined with simd.
1796 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1797 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1798 parse clauses and if depend clause is found, don't parse a body.
1799 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1800 Allow target parallel without for after it.
1801 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1802 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1803 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1804 invalid kinds.
1805 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1806 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1807 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1808 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1809 functions.
1810 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1811 defaultmap and is_device_ptr clauses.
1812 (c_parser_omp_target): Parse target parallel and target simd. Set
1813 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1814 and target exit data. Diagnose invalid map kinds.
1815 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1816 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1817 construct.
1818 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1819 &omp_priv.
1820 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1821 (c_parser_omp_taskloop): New function.
1822 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1823 handle PRAGMA_OMP_TASKLOOP.
1824 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1825 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1826 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1827 Add IS_OMP argument, handle structure element bases, diagnose
1828 bitfields, pass IS_OMP recursively, diagnose known zero length
1829 array sections in depend clauses, handle array sections in reduction
1830 clause, diagnose negative length even for pointers.
1831 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1832 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1833 array sections in reduction clause, set
1834 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1835 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1836 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1837 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1838
21ba0cea
MP
18392015-10-06 Marek Polacek <polacek@redhat.com>
1840
1841 * c-parser.c (c_parser_statement_after_labels): Use
1842 protected_set_expr_location.
1843 (c_parser_omp_clause_num_gangs): Likewise.
1844 (c_parser_omp_clause_num_threads): Likewise.
1845 (c_parser_omp_clause_num_workers): Likewise.
1846 (c_parser_omp_clause_vector_length): Likewise.
1847 (c_parser_omp_clause_num_teams): Likewise.
1848 (c_parser_omp_clause_thread_limit): Likewise.
1849 * c-typeck.c (build_c_cast): Likewise.
1850 (c_cast_expr): Likewise.
1851
624d31fe
RS
18522015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1853
1854 * c-typeck.c (c_tree_equal): Use real_equal instead of
1855 REAL_VALUES_EQUAL.
1856
b8fd7909
JM
18572015-10-04 Jason Merrill <jason@redhat.com>
1858
1859 * c-parser.c (c_lex_one_token): Handle @synchronized.
1860 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1861 can change whether the function is transaction_safe.
1862
1c7485af
MP
18632015-10-02 Marek Polacek <polacek@redhat.com>
1864
1865 PR c/67730
1866 * c-typeck.c (convert_for_assignment): Use the expansion point
1867 location throughout.
1868
3e3b8d63
MP
18692015-10-02 Marek Polacek <polacek@redhat.com>
1870
1871 PR c/64249
1872 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1873 and pass it down to c_parser_if_statement.
1874 (c_parser_else_body): Add CHAIN parameter and pass it down to
1875 c_parser_statement_after_labels.
1876 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1877 duplicated if-else-if conditions.
1878
aabef2de
MP
18792015-10-01 Marek Polacek <polacek@redhat.com>
1880
1881 * c-typeck.c (convert_for_assignment): Improve commentary.
1882
de8ddd5f
MP
18832015-09-30 Marek Polacek <polacek@redhat.com>
1884
1885 PR c/67730
1886 * c-typeck.c (c_finish_return): Use the expansion point location for
1887 certain "return with value" warnings.
1888
c4914de6
MLI
18892015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1890
1891 * c-parser.c (pragma_lex): Add loc argument.
1892
0e36f5c7
MP
18932015-09-15 Marek Polacek <polacek@redhat.com>
1894
1895 PR c/67580
1896 * c-decl.c (tag_exists_p): New function.
1897 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1898 struct/union/enum keywords are missing.
1899 * c-tree.h (tag_exists_p): Declare.
1900
2f3bb934
MP
19012015-09-15 Marek Polacek <polacek@redhat.com>
1902
1903 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1904 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1905 Return NULL_TREE instead of 0.
1906 (lookup_name): Return NULL_TREE instead of 0.
1907 (lookup_name_in_scope): Likewise.
1908 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1909 (parser_xref_tag): Use false instead of 0.
1910 (start_struct): Use true instead of 1.
1911 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1912
aa256c4a
MP
19132015-09-14 Marek Polacek <polacek@redhat.com>
1914
1915 * c-typeck.c (set_nonincremental_init_from_string): Use
1916 HOST_WIDE_INT_M1U when shifting a negative value.
1917
dbb68221
MW
19182015-09-09 Mark Wielaard <mjw@redhat.com>
1919
1920 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1921 parm against NULL.
1922
a8a098ac
JJ
19232015-09-10 Jakub Jelinek <jakub@redhat.com>
1924
1925 PR c/67502
1926 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1927 into OMP_FOR_PRE_BODY rather than before the loop.
1928
f4b189d5
JJ
19292015-09-09 Jakub Jelinek <jakub@redhat.com>
1930
0bb99c11
JJ
1931 PR c/67501
1932 * c-parser.c (c_parser_oacc_all_clauses,
1933 c_parser_omp_all_clauses): Remove invalid clause from
1934 list of clauses even if parser->error is set.
1935
fce5e5e3
JJ
1936 PR c/67500
1937 * c-parser.c (c_parser_omp_clause_aligned,
1938 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1939 test for errors.
1940 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1941 error_mark_node.
1942
f4b189d5
JJ
1943 PR c/67495
1944 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1945 instead of c_parser_unary_expression. If the result is !lvalue_p,
1946 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1947
b2aaf235
MP
19482015-09-04 Marek Polacek <polacek@redhat.com>
1949
1950 PR sanitizer/67279
1951 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1952
1807ffc1
MS
19532015-09-03 Martin Sebor <msebor@redhat.com>
1954
1955 PR c/66516
8b652e65
JJ
1956 * c-typeck.c (convert_arguments, parser_build_unary_op,
1957 build_conditional_expr, c_cast_expr, convert_for_assignment,
1958 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1959 reject_gcc_builtin.
1960 (c_decl_implicit): Define.
1961
d04ff417
MP
19622015-09-02 Marek Polacek <polacek@redhat.com>
1963
1964 PR c/67432
1965 * c-parser.c (c_parser_enum_specifier): Give a better error for
1966 an empty enum.
1967
a79683d5
TS
19682015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1969
1970 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1971
191a6b94
MP
19722015-08-12 Marek Polacek <polacek@redhat.com>
1973
1974 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1975 LOC to it.
1976
420a9d9b
MP
19772015-08-03 Marek Polacek <polacek@redhat.com>
1978
1979 PR c/67088
1980 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1981 Use it.
1982 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1983
992118a1
PP
19842015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1985
1986 * c-parser.c (c_parser_if_body): Take token_indent_info
1987 argument. Call warn_for_misleading_indentation even when the
1988 body is a semicolon. Extract token_indent_infos corresponding
1989 to the guard, body and next tokens. Adjust call to
1990 warn_for_misleading_indentation accordingly.
1991 (c_parser_else_body): Likewise.
1992 (c_parser_if_statement): Likewise.
1993 (c_parser_while_statement): Likewise.
1994 (c_parser_for_statement): Likewise.
1995
46308474
LFSM
19962015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1997 Manuel López-Ibáñez <manu@gcc.gnu.org>
1998
1999 * c-decl.c (get_parm_info): Remove static var. Update warning
2000 message.
2001
05b28fd6
MP
20022015-07-27 Marek Polacek <polacek@redhat.com>
2003
2004 PR c++/66555
2005 PR c/54979
2006 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
2007
451b5e48
MP
20082015-07-20 Marek Polacek <polacek@redhat.com>
2009
2010 PR c++/55095
2011 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
2012 (build_binary_op): Warn about left shift overflows.
2013
1916bcb5
AM
20142015-07-09 Andrew MacLeod <amacleod@redhat.com>
2015
2016 * c-array-notation.c: Adjust includes for flags.h changes.
2017 * c-objc-common.c: Likewise.
2018
c7131fb2
AM
20192015-07-07 Andrew MacLeod <amacleod@redhat.com>
2020
2021 * c-array-notation.c: Adjust includes.
2022 * c-aux-info.c: Likewise.
2023 * c-convert.c: Likewise.
2024 * c-decl.c: Likewise.
2025 * c-errors.c: Likewise.
2026 * c-lang.c: Likewise.
2027 * c-objc-common.c: Likewise.
2028 * c-parser.c: Likewise.
2029 * c-typeck.c: Likewise.
2030
da2e71c9
MLI
20312015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2032
2033 PR fortran/66605
2034 * c-decl.c (finish_function): Call do_warn_unused_parameter.
2035
b155cfd9
MP
20362015-06-29 Marek Polacek <polacek@redhat.com>
2037
2038 PR c/66322
2039 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
2040 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
2041 about -Wswitch-bool here.
2042 (do_case): Update c_add_case_label call.
2043 (c_finish_case): Update c_do_switch_warnings call.
2044
31521951
MP
20452015-06-27 Marek Polacek <polacek@redhat.com>
2046
2047 * c-typeck.c: Use VECTOR_TYPE_P throughout.
2048
22d03525
MP
20492015-06-26 Marek Polacek <polacek@redhat.com>
2050
2051 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2052 INDIRECT_REF_P.
2053 * c-typeck.c (array_to_pointer_conversion): Likewise.
2054 (build_unary_op): Likewise.
2055 (c_finish_return): Likewise.
2056
f0889939
AM
20572015-06-25 Andrew MacLeod <amacleod@redhat.com>
2058
2059 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
2060 * c-parser.c: Likewise.
2061
8d67ee55
RS
20622015-06-25 Richard Sandiford <richard.sandiford@arm.com>
2063
2064 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
2065 instead of pointer_hash.
2066 (detect_field_duplicates): Likewise.
2067
0ae9bd27
MP
20682015-06-25 Marek Polacek <polacek@redhat.com>
2069
2070 * c-array-notation.c: Use VAR_P throughout.
2071 * c-decl.c: Likewise.
2072 * c-objc-common.c: Likewise.
2073 * c-parser.c: Likewise.
2074 * c-typeck.c: Likewise.
2075
62f9079a
MP
20762015-06-25 Marek Polacek <polacek@redhat.com>
2077
2078 * c-decl.c: Use is_global_var throughout.
2079 * c-parser.c: Likewise.
2080 * c-typeck.c: Likewise.
2081
abb226c9
AM
20822015-06-17 Andrew MacLeod <amacleod@redhat.com>
2083
2084 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
2085 * c-aux-info.c: Likewise.
2086 * c-convert.c: Likewise.
2087 * c-decl.c: Likewise.
2088 * c-errors.c: Likewise.
2089 * c-lang.c: Likewise.
2090 * c-objc-common.c: Likewise.
2091 * c-parser.c: Likewise.
2092 * c-typeck.c: Likewise.
2093
8cbababc
JH
20942015-06-11 Jan Hubicka <hubicka@ucw.cz>
2095
2096 PR middle-end/66325
2097 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
2098 variants.
2099
a0349665
PMR
21002015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
2101
2102 * c-decl.c (pop_scope): Register the main translation unit
2103 through the new debug hook.
2104
13fdf2e2
AM
21052015-06-08 Andrew MacLeod <amacleod@redhat.com>
2106
2107 * c-array-notation.c : Adjust include files.
2108 * c-aux-info.c : Likewise.
2109 * c-convert.c : Likewise.
2110 * c-decl.c : Likewise.
2111 * c-errors.c : Likewise.
2112 * c-lang.c : Likewise.
2113 * c-lang.h : Likewise.
2114 * c-objc-common.c : Likewise.
2115 * c-parser.c : Likewise.
2116 * c-typeck.c : Likewise.
2117
d7438551
AH
21182015-06-05 Aldy Hernandez <aldyh@redhat.com>
2119
2120 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
2121 immediately clobber it.
2122 (c_write_global_declarations_1): Remove call to
2123 check_global_declaration_1.
2124 (c_write_global_declarations_2): Remove.
2125 (c_write_final_cleanups): Rename from c_write_global_declarations.
2126 Remove call to finalize_compilation_unit.
2127 Remove calls to debugging hooks.
2128 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
2129 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
2130 * c-tree.h: Remove c_write_global_declarations.
2131
ecb9f223
AM
21322015-06-04 Andrew MacLeod <amacleod@redhat.com>
2133
2134 * c-array-notation.c: Adjust includes for restructured coretypes.h.
2135 * c-aux-info.c: Likewise.
2136 * c-convert.c: Likewise.
2137 * c-decl.c: Likewise.
2138 * c-errors.c: Likewise.
2139 * c-lang.c: Likewise.
2140 * c-objc-common.c: Likewise.
2141 * c-parser.c: Likewise.
2142 * c-typeck.c: Likewise.
2143
9482b620
MP
21442015-06-04 Marek Polacek <polacek@redhat.com>
2145
2146 PR c/66341
2147 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
2148 it is a lvalue.
2149
bc51ace3
PK
21502015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2151
2152 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
2153 Warn for empty struct.
2154 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
2155
ea5b45b6
AT
21562015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
2157
2158 * c-decl.c (start_function): Call plugin before parsing.
2159 (finish_function): Call plugin after parsing.
2160
c2d47482
PK
21612015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2162
2163 PR c/49551
2164 * c-decl.c (merge_decls): Merge DECL_COMMON.
2165
a95492ab
JW
21662015-05-22 Jim Wilson <jim.wilson@linaro.org>
2167
2168 * Make-lang.in (check_gcc_pallelize): Define.
2169
fd5c817a
MP
21702015-05-22 Marek Polacek <polacek@redhat.com>
2171
2172 PR c/47043
2173 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
2174 attributes.
2175
c7b70a3c
MP
21762015-05-21 Marek Polacek <polacek@redhat.com>
2177
2178 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
2179 DECL_BUILT_IN.
2180
21b634ae
MP
21812015-05-20 Marek Polacek <polacek@redhat.com>
2182
2183 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
2184 * c-typeck.c: Likewise.
2185
296a8c2f
MP
21862015-05-19 Marek Polacek <polacek@redhat.com>
2187
2188 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
2189
41b37d5e
JJ
21902015-05-19 Jakub Jelinek <jakub@redhat.com>
2191
2192 PR middle-end/66199
2193 * c-parser.c (c_parser_omp_for_loop): Don't add
2194 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2195 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2196 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2197 constructs.
2198
fab27f52
MM
21992015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2200
2201 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2202 swaps.
fab27f52 2203
40de31cf
MLI
22042015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2205
2206 PR fortran/44054
2207 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2208 accessor function.
2209
3aa3c9fc
MP
22102015-05-14 Marek Polacek <polacek@redhat.com>
2211
2212 PR c/66066
2213 PR c/66127
2214 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2215 rather than with 0.
2216
c3388e62
DM
22172015-05-12 David Malcolm <dmalcolm@redhat.com>
2218
2219 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2220 to add a call to warn_for_misleading_indentation.
2221 (c_parser_else_body): Likewise, adding param "else_loc".
2222 (c_parser_if_statement): Check for misleading indentation.
2223 (c_parser_while_statement): Likewise.
2224 (c_parser_for_statement): Likewise.
2225
755e528f
MP
22262015-05-08 Marek Polacek <polacek@redhat.com>
2227
2228 PR c/64918
2229 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2230 (output_init_element): Likewise.
2231
0173bd2a
MP
22322015-05-07 Marek Polacek <polacek@redhat.com>
2233
2234 PR c/65179
2235 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2236 value.
2237
9babc352
MP
22382015-04-30 Marek Polacek <polacek@redhat.com>
2239
2240 * c-typeck.c (set_init_label): Call error_at instead of error and
2241 pass LOC to it.
2242
ac9f18db
MP
2243 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2244 the type of a decl.
2245
ec3fba51
MP
2246 * c-typeck.c (c_build_va_arg): Clarify the error message.
2247
b811915d
TS
22482015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2249
2250 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2251 OMP_STANDALONE_CLAUSES.
2252
f3075008
MP
22532015-04-28 Marek Polacek <polacek@redhat.com>
2254
2255 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2256
4e81b788
MP
22572015-04-28 Marek Polacek <polacek@redhat.com>
2258
2259 PR c/65901
2260 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2261
6c1db78e
MP
22622015-04-25 Marek Polacek <polacek@redhat.com>
2263
2264 PR c/52085
2265 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2266 attribute.
2267
5c4abbb8
MP
22682015-04-23 Marek Polacek <polacek@redhat.com>
2269
2270 PR c/65345
2271 * c-decl.c (set_labels_context_r): New function.
2272 (store_parm_decls): Call it via walk_tree_without_duplicates.
2273 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2274 instead of create_tmp_var. Build TARGET_EXPR instead of
2275 COMPOUND_EXPR.
2276 (build_atomic_assign): Use create_tmp_var_raw instead of
2277 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2278
06aca1d5
IV
22792015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2280
2281 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2282 (c_parser_omp_target_update): Add missed %> to error_at ().
2283
8fba1830
BRF
22842015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2285
2286 PR target/55143
2287 * c-decl.c (c_default_pointer_mode): Remove definition.
2288 * c-tree.h (c_default_pointer_mode): Remove declaration.
2289
62021f64
TB
22902015-03-27 Tobias Burnus <burnus@net-b.de>
2291
2292 PR c/65586
2293 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2294 error out.
2295 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2296 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2297 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2298
9b65e171
JJ
22992015-03-19 Jakub Jelinek <jakub@redhat.com>
2300
2301 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2302 attribute for DECL_EXTERNAL VAR_DECLs.
2303
17958621
JJ
23042015-03-11 Jakub Jelinek <jakub@redhat.com>
2305
2306 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2307 argument.
2308
7ccb1a11
JJ
23092015-03-10 Jakub Jelinek <jakub@redhat.com>
2310
2311 PR c/65120
2312 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2313 before preparing arguments to warn_logical_not_parentheses.
2314
01177669
JJ
23152015-03-09 Jakub Jelinek <jakub@redhat.com>
2316
2317 PR c/65120
2318 * c-typeck.c (parser_build_binary_op): Don't warn for
2319 !!x == y or !b == y where b is _Bool.
2320
802ac282
MP
23212015-03-09 Marek Polacek <polacek@redhat.com>
2322
2323 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2324 * c-decl.c (grokdeclarator): Likewise.
2325 * c-typeck.c (build_binary_op): Likewise.
2326
e5165b60
MP
23272015-02-27 Marek Polacek <polacek@redhat.com>
2328
2329 PR c/65228
2330 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2331
065d214c
MP
23322015-02-14 Marek Polacek <polacek@redhat.com>
2333
2334 PR c/64768
2335 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2336 declared through a typedef name.
2337
e5d9235b
MP
23382015-02-13 Marek Polacek <polacek@redhat.com>
2339
2340 PR c/65050
2341 * c-decl.c (grokdeclarator): Print also the type when giving
2342 the error message about array's incomplete element type.
2343
fa01ffcc
JJ
23442015-02-11 Jakub Jelinek <jakub@redhat.com>
2345
2346 PR c/64824
2347 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2348 check in the POP macro.
2349
c3e38a03
MP
23502015-02-09 Marek Polacek <polacek@redhat.com>
2351
2352 PR c/64856
2353 * c-typeck.c (process_init_element): Don't always wrap
2354 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2355 initializing a range of elements.
2356
4886ec8e
JJ
23572015-02-04 Jakub Jelinek <jakub@redhat.com>
2358
2359 PR c/64824
2360 PR c/64868
2361 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2362
c3e38a03 23632015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2364
2365 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2366 processing enum declaration.
2367
7b33f0c8
MP
23682015-01-29 Marek Polacek <polacek@redhat.com>
2369
2370 PR c/64709
2371 * c-typeck.c (pop_init_level): If constructor_elements has
2372 exactly one element with integer_zerop value, set constructor_zeroinit
2373 to 1. Remove braces around warning_init call.
2374
dea63e49
JJ
23752015-01-27 Jakub Jelinek <jakub@redhat.com>
2376
2377 PR c/64766
2378 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2379 of FUNCTION_DECLs with error_mark_node.
2380
d38f7dce
JJ
23812015-01-26 Jakub Jelinek <jakub@redhat.com>
2382
2383 PR c/64778
2384 * c-typeck.c (convert_arguments): Return -1 if there are
2385 error_args, even if we've diagnosed too many arguments.
2386
cbf5d0e7
RB
23872015-01-21 Richard Biener <rguenther@suse.de>
2388
2389 PR middle-end/64313
2390 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2391 for builtins the user declared correctly.
2392
41dbbb37
TS
23932015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2394 Bernd Schmidt <bernds@codesourcery.com>
2395 Cesar Philippidis <cesar@codesourcery.com>
2396 James Norris <jnorris@codesourcery.com>
2397 Jakub Jelinek <jakub@redhat.com>
2398 Ilmir Usmanov <i.usmanov@samsung.com>
2399
2400 * c-parser.c: Include "gomp-constants.h".
2401 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2402 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2403 Use OMP_CLAUSE_SET_MAP_KIND.
2404 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2405 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2406 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2407 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2408 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2409 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2410 "copyout", "create", "delete", "deviceptr", "gang", "host",
2411 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2412 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2413 "present_or_create", "pcreate", "seq", "self", "vector",
2414 "vector_length", "wait", "worker".
2415 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2416 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2417 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2418 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2419 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2420 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2421 (c_parser_oacc_data_clause_deviceptr)
2422 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2423 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2424 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2425 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2426 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2427 (c_parser_oacc_parallel, c_parser_oacc_update)
2428 (c_parser_oacc_wait): New functions.
2429 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2430 (c_finish_oacc_data): New prototypes.
2431 * c-typeck.c: Include "gomp-constants.h".
2432 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2433 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2434 OMP_CLAUSE_SET_MAP_KIND.
2435 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2436 (c_finish_oacc_data): New functions.
2437 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2438 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2439 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2440 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2441 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2442 GOMP_MAP_FORCE_DEVICEPTR.
2443
adfac8df
JJ
24442015-01-09 Michael Collison <michael.collison@linaro.org>
2445
2446 * c-array-notation.c: Include hash-set.h, machmode.h,
2447 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2448 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2449 * c-aux-info.c: Ditto.
2450 * c-convert.c: Ditto.
2451 * c-decl.c: Ditto.
2452 * c-errors.c: Ditto.
2453 * c-lang.c: Dittoxs.
2454 * c-objc-common.c: Ditto.
2455 * c-parser.c: Ditto.
2456 * c-typeck.c: Include hash-set.h, machmode.h,
2457 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2458 fold-const.h, wide-int.h, inchash.h, real.h and
2459 fixed-value.h due to flattening of tree.h.
2460
2cc901dc
MP
24612015-01-07 Marek Polacek <polacek@redhat.com>
2462
2463 PR c/64417
2464 * c-typeck.c (process_init_element): Disallow initialization of
2465 a flexible array member with a string constant if the structure
2466 is in an array.
2467
5624e564
JJ
24682015-01-05 Jakub Jelinek <jakub@redhat.com>
2469
e5341100
JJ
2470 PR sanitizer/64344
2471 * c-typeck.c (convert_for_assignment, c_finish_return): For
2472 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2473 types also set in_late_binary_op around convert call.
2474 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2475 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2476 result on expr as last argument to ubsan_instrument_float_cast,
2477 if in_late_binary_op, don't use c_save_expr but save_expr.
2478
5624e564
JJ
2479 Update copyright years.
2480
5bd012f8
MP
24812015-01-05 Marek Polacek <polacek@redhat.com>
2482
2483 PR c/64423
2484 * c-typeck.c (build_array_ref): Pass loc down to
2485 warn_array_subscript_with_type_char.
2486
3f8257db 24872014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2488
2489 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2490 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2491 element type.
8e745a17 2492 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2493 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2494 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2495 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2496 to PEDWARN_FOR_QUALIFIERS.
768952be 2497
8f94a8c4
JJ
24982014-12-17 Jakub Jelinek <jakub@redhat.com>
2499
2500 PR sanitizer/64289
2501 * c-convert.c: Include ubsan.h.
2502 (convert): For real -> integral casts and
2503 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2504 instead instrument the float cast directly.
2505
b731b390
JJ
25062014-11-29 Jakub Jelinek <jakub@redhat.com>
2507
2508 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2509 c_finish_stmt_expr): Remove NULL last argument from
2510 create_tmp_var_raw and create_tmp_var calls.
2511 * c-array-notation.c (fix_builtin_array_notation_fn,
2512 build_array_notation_expr, fix_conditional_array_notations_1,
2513 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2514
541e35a6
MP
25152014-11-28 Marek Polacek <polacek@redhat.com>
2516
2517 PR c/63862
2518 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2519 convert the right operand to integer type.
2520
b286be94
MP
25212014-11-25 Marek Polacek <polacek@redhat.com>
2522
2523 PR c/63877
2524 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2525 for inline functions.
2526
aa7da51a
JJ
25272014-11-21 Jakub Jelinek <jakub@redhat.com>
2528
2529 PR target/63764
2530 * c-typeck.c (build_array_ref): Adjust
2531 convert_vector_to_pointer_for_subscript caller. If it returns true,
2532 call non_lvalue_loc on the result.
2533
d876207f
RB
25342014-11-11 Richard Biener <rguenther@suse.de>
2535
2536 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2537 to true.
2538
e5e44252
AK
25392014-11-10 Andi Kleen <ak@linux.intel.com>
2540
2541 PR c/60804
2542 * c-parser.c (c_parser_statement_after_labels): Call
2543 check_no_cilk.
2544 (c_parser_if_statement): Dito.
2545 (c_parser_switch_statement): Dito.
2546 (c_parser_while_statement): Dito.
2547 (c_parser_do_statement): Dito.
2548 (c_parser_for_statement): Dito.
2549 * c-typeck.c (c_finish_loop): Dito.
2550
13c21655
PC
25512014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2552
2553 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2554 OPT_Wshift_count_overflow in the warnings.
2555
2d51fcef
MP
25562014-10-30 Marek Polacek <polacek@redhat.com>
2557
2558 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2559 print the stripped version as well, if they're not the same.
2560
ef4bddc2
RS
25612014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2562
2563 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2564 machine_mode.
2565
c582198b
AM
25662014-10-28 Andrew MacLeod <amacleod@redhat.com>
2567
2568 * c-decl.c: Adjust include files.
2569 * c-parser.c: Ditto.
2570
ddc8de03
PM
25712014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2572 Tom Tromey <tromey@redhat.com>
2573
2574 * c-tree.h (enum c_oracle_request): New.
2575 (c_binding_oracle_function): New typedef.
2576 (c_binding_oracle, c_pushtag, c_bind): Declare.
2577 * c-decl.c (c_binding_oracle): New global.
2578 (I_SYMBOL_CHECKED): New macro.
2579 (i_symbol_binding): New function.
2580 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2581 (I_TAG_CHECKED): New macro.
2582 (i_tag_binding): New function.
2583 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2584 (I_LABEL_CHECKED): New macro.
2585 (i_label_binding): New function.
2586 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2587 (c_print_identifier): Save and restore c_binding_oracle.
2588 (c_pushtag, c_bind): New functions.
2589
60393bbc
AM
25902014-10-27 Andrew MacLeod <amacleod@redhat.com>
2591
2592 * c-typeck.c: Adjust include files.
2593
d723bb7c
MLI
25942014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2595
2596 PR c++/53061
2597 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2598 initialization here...
2599 (c_initialize_diagnostics): ... but here. Set defaults after
2600 building pretty-printer.
2601
1bc5a451
MP
26022014-10-23 Marek Polacek <polacek@redhat.com>
2603
2604 PR c/63626
2605 * c-decl.c (pop_scope): Don't print warning in external_scope.
2606
4435bb92
MP
26072014-10-19 Marek Polacek <polacek@redhat.com>
2608
2609 PR c/63567
2610 * c-typeck.c (output_init_element): Allow initializing objects with
2611 static storage duration with compound literals even in C99 and add
2612 pedwarn for it.
2613
7278465e
MP
26142014-10-17 Marek Polacek <polacek@redhat.com>
2615
2616 PR c/63567
2617 * c-typeck.c (digest_init): Allow initializing objects with static
2618 storage duration with compound literals even in C99 and add pedwarn
2619 for it.
2620
d9b7be2e
MP
26212014-10-17 Marek Polacek <polacek@redhat.com>
2622
2623 PR c/63543
2624 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2625 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2626 error multiple times. Print the type.
2627
f406ae1f
MP
26282014-10-17 Marek Polacek <polacek@redhat.com>
2629
2630 PR c/63549
2631 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2632 type.
2633
92574c7c
MP
26342014-10-17 Marek Polacek <polacek@redhat.com>
2635
2636 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2637 (start_function): Use OPT_Wimplicit_int instead of 0.
2638 (store_parm_decls_oldstyle): Likewise.
2639
1bc4a978
MT
26402014-10-17 Alan Modra <amodra@gmail.com>
2641
2642 PR middle-end/61848
2643 * c-decl.c (merge_decls): Don't merge section name or tls model
2644 to newdecl symtab node, instead merge to olddecl. Override
2645 existing olddecl section name. Set tls_model for all thread-local
2646 vars, not just OMP thread-private ones. Remove incorrect comment.
2647
83685514
AM
26482014-10-16 Andrew MacLeod <amacleod@redhat.com>
2649
2650 * c-decl.c: Adjust include files.
2651
78a7c317
DD
26522014-10-14 DJ Delorie <dj@redhat.com>
2653
2654 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2655 (c_token_starts_typename): Check all __intN, not just __int128.
2656 (c_token_starts_declspecs): Likewise.
2657 (c_parser_declspecs): Likewise.
2658 (c_parser_attribute_any_word): Likewise.
2659 (c_parser_objc_selector): Likewise.
2660 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2661 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2662 is specified.
2663 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2664 __int128.
2665 (finish_declspecs): Likewise.
2666
74d98c1e
AB
26672014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2668
8e745a17 2669 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 2670 the duplicate code.
8e745a17 2671 (c_parser_statement): Call the new function.
74d98c1e 2672
84937de2
MP
26732014-10-09 Marek Polacek <polacek@redhat.com>
2674
2675 PR c/63480
2676 * c-typeck.c (pop_init_level): Don't warn about initializing
2677 with { }.
2678
0382aaa0
MP
26792014-10-07 Marek Polacek <polacek@redhat.com>
2680
2681 PR c/59717
2682 * c-decl.c (header_for_builtin_fn): New function.
2683 (implicitly_declare): Suggest which header to include.
2684
7a0ca710
MP
26852014-10-07 Marek Polacek <polacek@redhat.com>
2686
2687 * c-convert.c (convert): Use error_operand_p.
2688 * c-typeck.c (require_complete_type): Likewise.
2689 (really_atomic_lvalue): Likewise.
2690 (digest_init): Likewise.
2691 (handle_omp_array_sections_1): Likewise.
2692
6bc8a126
MP
26932014-10-03 Marek Polacek <polacek@redhat.com>
2694
2695 PR c/63453
2696 * c-decl.c (pop_scope): Don't warn about "inline function declared
2697 but never defined" for functions marked with gnu_inline attribute.
2698
d90c0a59
JJ
26992014-09-25 Jakub Jelinek <jakub@redhat.com>
2700
2701 PR c++/63249
2702 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2703 on low_bound and length.
2704
083e891e
MP
27052014-09-24 Marek Polacek <polacek@redhat.com>
2706
2707 PR c/61405
2708 PR c/53874
2709 * c-parser.c: Don't define CPP_KEYWORD.
2710 (c_parser_switch_statement): Pass original type to c_finish_case.
2711 * c-tree.h (c_finish_case): Update declaration.
2712 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2713 conditionally to c_do_switch_warnings.
2714
8d95fe25
MP
27152014-09-03 Marek Polacek <polacek@redhat.com>
2716
2717 PR c/62024
2718 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2719 conversions.
2720
9a771876
JJ
27212014-09-02 Jakub Jelinek <jakub@redhat.com>
2722 Balaji V. Iyer <balaji.v.iyer@intel.com>
2723 Igor Zamyatin <igor.zamyatin@intel.com>
2724
2725 * c-parser.c (c_parser_cilk_for): New function.
2726 (c_parser_cilk_grainsize): Likewise.
2727 (c_get_temp_regvar): Likewise.
2728 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2729 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2730 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2731 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2732 case.
2733
b7679d96
CG
27342014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2735
2736 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2737 with using HOST_WIDE_INT without truncation to 'int'
2738
59ea0364
MP
27392014-08-22 Marek Polacek <polacek@redhat.com>
2740
2741 PR c++/62199
2742 * c-typeck.c (parser_build_binary_op): Adjust call to
2743 warn_logical_not_parentheses.
2744
671a475e
IZ
27452014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2746
2747 PR other/62008
2748 * c-parser.c (c_parser_array_notation): Check for correct
2749 type of an array added.
2750
04159acf
MP
27512014-08-19 Marek Polacek <polacek@redhat.com>
2752
2753 PR c++/62153
2754 * c-typeck.c (build_binary_op): If either operand of a comparison
2755 is a boolean expression, call maybe_warn_bool_compare.
2756
c77935ee
PP
27572014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2758
2759 PR c/45584
2760 * c-typeck.c (build_c_cast): Do a conversion even when the
2761 TYPE_MAIN_VARIANTs are the same.
2762
35aff4fb
MP
27632014-08-19 Marek Polacek <polacek@redhat.com>
2764
2765 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2766 pedwarn_c99 instead of pedwarn.
2767 (grokfield): Likewise.
2768 (warn_defaults_to): New function.
2769 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2770 Unconditionally call pedwarn_c99 instead of pedwarn.
2771 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2772 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2773 check flag_isoc11 before.
2774 * c-errors.c (pedwarn_c99): Change the return type to bool.
2775 Handle -Wc99-c11-compat.
2776 * c-parser.c (disable_extension_diagnostics): Handle
2777 warn_c99_c11_compat.
2778 (restore_extension_diagnostics): Likewise.
2779 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2780 instead of pedwarn, don't check flag_isoc11 before.
2781 (c_parser_declspecs): Likewise.
2782 (c_parser_alignas_specifier): Likewise.
2783 (c_parser_alignof_expression): Likewise.
2784 (c_parser_generic_selection): Likewise.
2785 * c-tree.h (pedwarn_c99): Update declaration.
2786 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2787 of pedwarn_c99.
2788
177cce46
MP
27892014-08-19 Marek Polacek <polacek@redhat.com>
2790
2791 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2792 to pedwarn_c90.
2793 * c-errors.c: Include "opts.h".
2794 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2795 * c-parser.c (disable_extension_diagnostics): Handle negative value
2796 of warn_c90_c99_compat, too.
2797 (restore_extension_diagnostics): Likewise.
2798 (c_parser_compound_statement_nostart): Pass
2799 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2800
6dc99c33
MP
28012014-08-12 Marek Polacek <polacek@redhat.com>
2802
2803 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2804 Add pedwarn.
2805 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2806 Likewise.
2807 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2808
3f8257db 28092014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
2810
2811 PR c/51849
2812 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2813 Call pedwarn_c90 instead of pedwarn.
2814 (check_bitfield_type_and_width): Likewise.
2815 (declspecs_add_qual): Likewise.
2816 (declspecs_add_type): Likewise.
2817 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2818 Adjust to only call pedwarn_c90.
2819 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2820 pedwarn_c90 instead of pedwarn.
2821 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2822 * c-parser.c (disable_extension_diagnostics): Handle
2823 warn_c90_c99_compat.
2824 (restore_extension_diagnostics): Likewise.
2825 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2826 pedwarn_c90 instead of pedwarn.
2827 (c_parser_initelt): Likewise.
2828 (c_parser_postfix_expression): Likewise.
2829 (c_parser_postfix_expression_after_paren_type): Likewise.
2830 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2831 * c-tree.h: Fix formatting.
2832 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2833 pedwarn_c90 instead of pedwarn.
2834
9f25a338
TS
28352014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2836
2837 * c-typeck.c: Remove include of pointer-set.h.
2838
044331a8
MP
28392014-08-07 Marek Polacek <polacek@redhat.com>
2840
2841 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2842
b787e7a2
TS
28432014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2844
2845 * c-typeck.c: Use hash_map instead of pointer_map.
2846
6e2830c3
TS
28472014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2848
2849 * c-decl.c: Use hash_set instead of pointer_set.
2850
a7ee52fb
IZ
28512014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2852
2853 PR middle-end/61455
2854 * c-array-notation.c (expand_array_notations): Handling
2855 of DECL_EXPR added.
2856
b4dfdc11
MG
28572014-07-31 Marc Glisse <marc.glisse@inria.fr>
2858
2859 PR c++/60517
2860 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2861 a local variable.
2862
976d5a22
TT
28632014-07-30 Tom Tromey <tromey@redhat.com>
2864
2865 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2866 field.
2867 (really_start_incremental_init, push_init_level): Initialize
2868 designator_depth.
2869 (pop_init_level): Set global designator_depth.
2870 (process_init_element): Check for designated_init attribute.
2871
30281de2
MP
28722014-07-20 Marek Polacek <polacek@redhat.com>
2873
2874 PR c/61852
2875 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2876 (implicitly_declare): Pass location to implicit_decl_warning.
2877
b108f48f
JJ
28782014-07-14 Jakub Jelinek <jakub@redhat.com>
2879
2880 PR middle-end/61294
2881 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2882 If non-NULL, call c_parser_check_literal_zero.
2883 (c_parser_check_literal_zero): New function.
2884 (c_parser_postfix_expression_after_primary): Adjust
2885 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2886
773ec47f
MP
28872014-07-06 Marek Polacek <polacek@redhat.com>
2888
2889 PR c/6940
2890 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2891 * c-tree.h (C_ARRAY_PARAMETER): Define.
2892 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2893 function parameter.
2894
22e1cf1c 28952014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 2896 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
2897
2898 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2899 releasing symbol.
2900
52ec0ea3
MP
29012014-07-01 Marek Polacek <polacek@redhat.com>
2902
2903 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2904 instead of 0 to WARN_FOR_ASSIGNMENT.
2905
d5c3d343
MP
29062014-07-01 Marek Polacek <polacek@redhat.com>
2907
2908 PR c/58286
2909 * c-typeck.c (convert_for_assignment): Pass
2910 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2911
6a7253a4
MP
29122014-06-30 Marek Polacek <polacek@redhat.com>
2913
2914 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2915 has no_sanitize_undefined attribute.
2916
5e88a8f4
IZ
29172014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2918
2919 PR middle-end/57541
2920 * c-array-notation.c (fix_builtin_array_notation_fn):
2921 Check for 0 arguments in builtin call. Check that bultin argument is
2922 correct.
2923 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2924 index.
2925
9698b078
SH
29262014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2927
2928 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2929 qualifiers in __auto_type for atomic types.
2930 (c_parser_typeof_specifier): Discard all type qualifiers in
2931 __typeof__ for atomic types.
2932
6e07c515
MP
29332014-06-25 Marek Polacek <polacek@redhat.com>
2934
2935 PR c/61162
2936 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2937 the return expression to c_finish_return.
2938
da6f124d
JJ
29392014-06-25 Jakub Jelinek <jakub@redhat.com>
2940
2941 * c-typeck.c (c_finish_omp_clauses): Make sure
2942 OMP_CLAUSE_LINEAR_STEP has correct type.
2943
c203e8a7
TS
29442014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2945
2946 * c-decl.c: Adjust.
2947
56ad0e38
JJ
29482014-06-24 Jakub Jelinek <jakub@redhat.com>
2949
2950 * c-parser.c (c_parser_omp_for_loop): For
2951 #pragma omp parallel for simd move lastprivate clause from parallel
2952 to for rather than simd.
2953
47c2554f
MP
29542014-06-23 Marek Polacek <polacek@redhat.com>
2955
2956 * c-typeck.c (parser_build_binary_op): Don't call
2957 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2958
56363ffd
JH
29592014-06-15 Jan Hubicka <hubicka@ucw.cz>
2960
2961 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2962 * c-decl.c (merge_decls): Likewise.
2963
d7ff7ae5
MP
29642014-06-09 Marek Polacek <polacek@redhat.com>
2965
2966 PR c/36446
2967 * c-typeck.c (error_init): Call inform instead of error_at.
2968 (pedwarn_init): Call inform instead of pedwarn.
2969 (warning_init): Call inform instead of warning_at.
2970
24d047a3
JH
29712014-06-07 Jan Hubicka <hubicka@ucw.cz>
2972
2973 * c-decl.c (merge_decls): Use set_decl_section_name.
2974 (duplicate_decls): Remove node if it exists.
2975
9bac5cbb
G
29762014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2977
2978 PR c/53119
2979 * c-typeck.c (push_init_level, process_init_element,
2980 pop_init_level): Correct check for zero initialization, move
2981 missing brace warning to respect zero initialization.
2982
8ffcdea8
MP
29832014-06-05 Marek Polacek <polacek@redhat.com>
2984
2985 PR c/56724
2986 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2987
742938c9
MP
29882014-06-05 Marek Polacek <polacek@redhat.com>
2989
2990 PR c/49706
2991 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2992 on the left hand side operand of a comparison.
2993
6447c55d
MP
29942014-06-05 Marek Polacek <polacek@redhat.com>
2995
2996 PR c/48062
2997 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2998 Print note only if the warning was printed.
2999
9dc7743c
IZ
30002014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
3001
3002 PR c/58942
3003 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
3004 with a pointer.
3005
fedfecef
MP
30062014-06-03 Marek Polacek <polacek@redhat.com>
3007
3008 PR c/60439
3009 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
3010 c_start_case.
3011 * c-tree.h (c_start_case): Update.
3012 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
3013 switch condition has boolean value.
3014
9b2b7279
AM
30152014-06-02 Andrew MacLeod <amacleod@redhat.com>
3016
3017 * c-decl.c: Include builtins.h.
3018 * c-parser.c: Likewise.
3019
5c1bc275
MP
30202014-05-27 Marek Polacek <polacek@redhat.com>
3021
3022 PR c/56724
3023 * c-typeck.c (convert_arguments): Get location of a parameter. Change
3024 error and warning calls to error_at and warning_at. Pass location of
3025 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
3026 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
3027 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
3028
97563bc8
IZ
30292014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
3030
3031 PR c/61191
3032 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
3033 function parameters.
3034
aede2c10
JH
30352014-05-23 Jan Hubicka <hubicka@ucw.cz>
3036
3037 * c-decl.c (merge_decls): Preserve symtab node pointers.
3038 (duplicate_decls): Free new decl.
3039
edbba2ce
TS
30402014-05-23 Thomas Schwinge <thomas@codesourcery.com>
3041
f3316c6d
TS
3042 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
3043 initialization.
3044
edbba2ce
TS
3045 * c-parser.c (c_parser_omp_target): Return bool values.
3046
68c81f24
TS
30472014-05-22 Thomas Schwinge <thomas@codesourcery.com>
3048
3049 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
3050 num_teams_loc variable to num_thread_limit_loc.
3051
632f2871
RS
30522014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
3053
3054 * c-array-notation.c (expand_array_notations): Use void_node
3055 instead of void_zero_node.
3056
766090c2
TS
30572014-05-17 Trevor Saunders <tsaunders@mozilla.com>
3058
3059 * c-decl.c (finish_struct): Adjust.
3060 (finish_enum): Likewise.
3061 (bind): Adjust.
3062 (record_inline_static): Likewise.
3063 (push_scope): Likewise.
3064 (make_label): Likewise.
3065 (lookup_label_for_goto): Likewise.
3066 (finish_struct): Likewise.
3067 (finish_enum): Likewise.
3068 (store_parm_decls): Likewise.
3069 (c_push_function_context): Likewise.
3070 * c-lang.h: Remove usage of variable_size gty attribute.
3071 * c-parser.c (c_parse_init): Adjust.
3072 (c_parse_file): Likewise.
3073
2b107f6b
MP
30742014-05-13 Marek Polacek <polacek@redhat.com>
3075
3076 PR c/61162
3077 * c-typeck.c (convert_for_assignment): Pass location to
3078 WARN_FOR_ASSIGNMENT instead of input_location.
3079
d033409e
MP
30802014-05-10 Marek Polacek <polacek@redhat.com>
3081
3082 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
3083 maybe_warn_string_init.
3084 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
3085 maybe_warn_string_init.
3086 * c-tree.h (maybe_warn_string_init): Update declaration.
3087 * c-typeck.c (maybe_warn_string_init): Add location parameter.
3088 Call pedwarn_init with loc instead of with input_location.
3089 (digest_init): Pass init_loc to maybe_warn_string_init.
3090 (pop_init_level): Call pedwarn_init with loc instead of with
3091 input_location.
3092 (set_init_index): Likewise.
3093 (process_init_element): Likewise.
3094
ea58ef42
MP
30952014-05-09 Marek Polacek <polacek@redhat.com>
3096
3097 PR c/61096
3098 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
3099 (c_parser_initelt): Pass location to set_init_label. Pass array index
3100 location to set_init_index.
3101 * c-tree.h (push_init_level): Update declaration.
3102 (pop_init_level): Likewise.
3103 (set_init_index): Likewise.
3104 (set_init_label): Likewise.
3105 * c-typeck.c (error_init): Add location parameter. Call error_at
3106 instead of error.
3107 (digest_init): Pass init_loc to error_init.
3108 (really_start_incremental_init):
3109 (push_init_level): Add location parameter. Pass loc to pop_init_level
3110 and error_init.
3111 (pop_init_level): Likewise.
3112 (set_designator): Add location parameter. Pass loc to pop_init_level,
3113 push_init_level, and error_init.
3114 (set_init_index): Add location parameter. Pass loc to error_init and
3115 set_designator.
3116 (set_init_label): Likewise.
3117 (output_init_element): Pass loc to error_init.
3118 (process_init_element): Pass loc to error_init, pop_init_level,
3119 pedwarn_init, and push_init_level.
3120
661a0813
MP
31212014-05-09 Marek Polacek <polacek@redhat.com>
3122
3123 PR c/50459
3124 * c-parser.c (c_parser_attributes): Parse the arguments as an
3125 expression-list if the attribute takes identifier.
3126
2793eeab
MP
31272014-05-08 Marek Polacek <polacek@redhat.com>
3128
3129 PR c/61053
3130 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
3131 TYPE_ALIGN_UNIT.
3132
f827930a
MP
31332014-05-08 Marek Polacek <polacek@redhat.com>
3134
3135 PR c/61077
3136 * c-decl.c (start_function): Warn for _Atomic-qualified return type
3137 of main.
3138
1d60af08
KZ
31392014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
3140 Mike Stump <mikestump@comcast.net>
3141 Richard Sandiford <rdsandiford@googlemail.com>
3142
3143 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
3144 (finish_enum): Use wide-int interfaces.
3145 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
3146 * c-typeck.c (build_c_cast): Likewise.
3147 (set_nonincremental_init_from_string): Likewise.
3148 (c_tree_equal): Likewise.
3149
a0e24419
MP
31502014-05-02 Marek Polacek <polacek@redhat.com>
3151
3152 PR c/25801
3153 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
3154 Return size_one_node when the type is not complete.
3155 (pointer_diff): Remove comment.
3156 (build_unary_op): Improve error messages.
3157
19fc9faa
MP
31582014-05-02 Marek Polacek <polacek@redhat.com>
3159
3160 * c-typeck.c (c_finish_return): Separate warning_at calls.
3161
63bc4e87
MP
31622014-05-02 Marek Polacek <polacek@redhat.com>
3163
3164 * c-tree.h (error_init): Remove declaration.
3165 (pedwarn_init): Likewise.
3166 * c-typeck.c (error_init): Make static and move above.
3167 (pedwarn_init): Likewise.
3168 (warning_init): Move above.
3169 (maybe_warn_string_init): Likewise.
3170
4bd2511b
JL
31712014-05-01 Jeff Law <law@redhat.com>
3172
3173 Revert:
3174
3175 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3176 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
3177 avoid goto.
3178
6a358dcb
MP
31792014-05-02 Marek Polacek <polacek@redhat.com>
3180
3181 PR c/60784
3182 * c-typeck.c (push_init_level): Set constructor_designated to
3183 p->designated for structures.
3184
ae5ebda4
MP
31852014-05-01 Marek Polacek <polacek@redhat.com>
3186
3187 PR c/60915
3188 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
3189 function-definition has an attribute after the declarator.
3190
96b40f8d
MP
31912014-05-01 Marek Polacek <polacek@redhat.com>
3192
3193 PR c/60257
3194 * c-typeck.c (warning_init): Add location_t parameter. Call
3195 warning_at instead of warning.
3196 (push_init_level): Pass input_location to warning_init.
3197 (add_pending_init): Add location_t parameter. Pass loc to
3198 warning_init.
3199 (set_nonincremental_init): Pass input_location to add_pending_init.
3200 (set_nonincremental_init_from_string): Likewise.
3201 (output_init_element): Pass loc to warning_init and to
3202 add_pending_init.
3203
32e00768
MP
32042014-05-01 Marek Polacek <polacek@redhat.com>
3205
3206 PR c/43395
3207 * c-typeck.c (c_finish_return): Distinguish between label and variable
3208 when warning about returning local address.
3209
c9379ce2
MP
32102014-05-01 Marek Polacek <polacek@redhat.com>
3211
3212 PR c/29467
3213 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3214 in C89 mode.
3215
d00887e8
MP
32162014-05-01 Marek Polacek <polacek@redhat.com>
3217
3218 PR c/43245
3219 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3220 instead of 0 to WARN_FOR_QUALIFIERS.
3221
5436fa2e
MP
32222014-05-01 Marek Polacek <polacek@redhat.com>
3223
3224 PR c/56989
3225 * c-typeck.c (default_conversion): Use better location for
3226 error call.
3227
f8ed5150
MP
32282014-04-30 Marek Polacek <polacek@redhat.com>
3229
3230 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3231 also when SANITIZE_FLOAT_DIVIDE is on.
3232
8337d1db
MP
32332014-04-30 Marek Polacek <polacek@redhat.com>
3234
3235 PR c/60139
3236 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3237 and pedwarn_init. Use loc insted of input_location.
3238
c4bdc42f
MP
32392014-04-30 Marek Polacek <polacek@redhat.com>
3240
3241 PR c/60351
3242 * c-typeck.c (build_binary_op): Use location when warning about
3243 shift count.
3244
45484dcf
MP
32452014-04-25 Marek Polacek <polacek@redhat.com>
3246
3247 PR c/18079
3248 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3249 always_inline/noinline and hot/cold attributes.
3250
34cf811f
MP
32512014-04-25 Marek Polacek <polacek@redhat.com>
3252
3253 PR c/60114
3254 * c-parser.c (c_parser_initelt): Pass input_location to
3255 process_init_element.
3256 (c_parser_initval): Pass loc to process_init_element.
3257 * c-tree.h (process_init_element): Adjust declaration.
3258 * c-typeck.c (push_init_level): Pass input_location to
3259 process_init_element.
3260 (pop_init_level): Likewise.
3261 (set_designator): Likewise.
3262 (output_init_element): Add location_t parameter. Pass loc to
3263 digest_init.
3264 (output_pending_init_elements): Pass input_location to
3265 output_init_element.
3266 (process_init_element): Add location_t parameter. Pass loc to
3267 output_init_element.
3268
42056eac
JJ
32692014-04-24 Jakub Jelinek <jakub@redhat.com>
3270
3271 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3272 atomic-clause, allow comma in between atomic-clause and
3273 seq_cst.
3274
e162a134
JJ
32752014-04-22 Jakub Jelinek <jakub@redhat.com>
3276
3277 PR c/59073
3278 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3279 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3280
2f6babac
IZ
32812014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3282
3283 PR middle-end/60469
3284 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3285 create_tmp_var instead build_decl for creating temps.
3286 (build_array_notation_expr): Likewise.
3287 (fix_conditional_array_notations_1): Likewise.
3288 (fix_array_notation_expr): Likewise.
3289 (fix_array_notation_call_expr): Likewise.
3290
8edbfaa6
JJ
32912014-03-28 Jakub Jelinek <jakub@redhat.com>
3292
3293 PR c++/60689
3294 * c-tree.h (c_build_function_call_vec): New prototype.
3295 * c-typeck.c (build_function_call_vec): Don't call
3296 resolve_overloaded_builtin here.
3297 (c_build_function_call_vec): New wrapper function around
3298 build_function_call_vec. Call resolve_overloaded_builtin here.
3299 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3300 Call c_build_function_call_vec instead of build_function_call_vec.
3301 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3302 * c-decl.c (finish_decl): Likewise.
3303
7485aeea
MLI
33042014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3305
3306 PR c/55383
3307 * c-typeck.c: Use correct format string in cast-qual warning
3308
b17a8b07
TS
33092014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3310
3311 * c-decl.c (c_decl_attributes): Use
3312 lang_hooks.types.omp_mappable_type.
3313 * c-typeck.c (c_finish_omp_clauses): Likewise.
3314
3af9c5e9
MP
33152014-03-06 Marek Polacek <polacek@redhat.com>
3316
3317 PR c/60197
3318 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3319 of checking tree code.
3320
1c9f5f33
PK
33212014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3322
3323 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3324 (c_parser_parameter_declaration): Likewise.
3325
cc28fc7f
MP
33262014-02-19 Marek Polacek <polacek@redhat.com>
3327
3328 PR c/60195
3329 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3330 Call mark_exp_read on exp.value.
3331 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3332 TREE_ADDRESSABLE on old instead of val.
3333 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3334
b581c05c
PK
33352014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3336
3337 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3338 C_EXPR_APPEND by vec_safe_push.
3339 * c-tree.h (C_EXPR_APPEND): Remove.
3340
81e5eca8
MP
33412014-01-31 Marek Polacek <polacek@redhat.com>
3342
3343 PR c/59963
3344 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3345 build_function_call_vec.
3346 (build_function_call): Likewise.
3347 (build_atomic_assign): Likewise.
3348 (build_function_call_vec): Add arg_loc parameter. Use it.
3349 (convert_arguments): Likewise.
3350 (convert_for_assignment): Rename rhs_loc to expr_loc.
3351 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3352 (c_parser_objc_keywordexpr): Likewise.
3353 (c_parser_postfix_expression_after_primary): Call
3354 build_function_call_vec with expr_loc rather than op_loc.
3355 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3356 build_function_call_vec.
3357 (c_parser_expr_list): Add locations parameter. Fill it with locations
3358 of function arguments.
3359 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3360
68fca595
MP
33612014-01-30 Marek Polacek <polacek@redhat.com>
3362
3363 PR c/59940
3364 * c-typeck.c (build_function_call_vec): Use loc parameter.
3365 (convert_arguments): Add location parameter. Use it.
3366 (ep_convert_and_check): Likewise.
3367 (build_atomic_assign): Adjust convert_for_assignment call.
3368 (build_modify_expr): Likewise.
3369 (digest_init): Likewise.
3370 (c_finish_return): Likewise.
3371 (build_conditional_expr): Adjust ep_convert_and_check calls.
3372 (convert_for_assignment): Add rhs_loc parameter. Use it.
3373 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3374 calls.
3375
fa337f3a
RB
33762014-01-30 Richard Biener <rguenther@suse.de>
3377
3378 PR c/59905
3379 * c-typeck.c (build_function_call_vec): Do not replace calls
3380 to a function via an incompatible type with a runtime abort.
3381
b72271b9
BI
33822014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3383
3384 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3385 flag_enable_cilkplus with flag_cilkplus.
3386 (c_parser_direct_declarator_inner): Likewise.
3387 (c_parser_attribute_any_word): Likewise.
3388 (c_parser_attributes): Likewise.
3389 (c_parser_compound_statement): Likewise.
3390 (c_parser_statement_after_labels): Likewise.
3391 (c_parser_if_statement): Likewise.
3392 (c_parser_switch_statement): Likewise.
3393 (c_parser_do_statement): Likewise.
3394 (c_parser_for_statement): Likewise.
3395 (c_parser_unary_expression): Likewise.
3396 (c_parser_postfix_expression): Likewise.
3397 (c_parser_postfix_expression_after_primary): Likewise.
3398 (c_parser_postfix_expression_after_primary): Likewise.
3399 (c_parser_omp_clause_name): Likewise.
3400 (c_finish_omp_declare_simd): Likewise.
3401 (c_parser_cilk_verify_simd): Likewise.
3402 * c-typeck.c (build_array_ref): Likewise.
3403 (build_function_call_vec): Likewise.
3404 (convert_arguments): Likewise.
3405 (build_compound_expr): Likewise.
3406 (c_finish_return): Likewise.
3407 (c_finish_if_stmt): Likewise.
3408 (c_finish_loop): Likewise.
3409 (build_binary_op): Likewise.
3410
393e8e8b
MP
34112014-01-23 Marek Polacek <polacek@redhat.com>
3412
3413 PR c/59846
3414 * c-typeck.c (parser_build_binary_op): Use location instead of
3415 input_location.
3416 (build_binary_op): Pass location to shorten_compare.
3417
f04dda30
MP
34182014-01-23 Marek Polacek <polacek@redhat.com>
3419
3420 PR c/58346
3421 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3422 an empty aggregate.
3423
789eadcd
MP
34242014-01-23 Marek Polacek <polacek@redhat.com>
3425
3426 PR c/59871
3427 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3428 of a comma expression.
3429 (emit_side_effect_warnings): Likewise.
3430
40f14e9f
BI
34312014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3432
3433 PR c/59825
3434 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3435 function to use walk_tree and moved a lot of its functionality to
3436 expand_array_notations.
3437 (expand_array_notations): New function.
3438
74558dd9
BI
34392014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3440
3441 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3442 attribute an attribute without value.
3443
652fea39
JJ
34442014-01-23 Jakub Jelinek <jakub@redhat.com>
3445
3446 PR middle-end/58809
3447 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3448 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3449
f34f1c87
MP
34502014-01-22 Marek Polacek <polacek@redhat.com>
3451
3452 PR c/59891
3453 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3454 of remove_c_maybe_const_expr on op1 and op2.
3455
241f845a
JJ
34562014-01-15 Jakub Jelinek <jakub@redhat.com>
3457
3458 PR c/58943
3459 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3460 effects, preevaluate rhs using SAVE_EXPR first.
3461
9a74f20c
BI
34622014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3463
3464 PR c++/59631
3465 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3466 statements with if-elseif statements.
3467
96066ce1
MP
34682014-01-06 Marek Polacek <polacek@redhat.com>
3469
3470 PR c/57773
3471 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3472 defined bit-field types only in ISO C.
3473
23a5b65a
RS
34742014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3475
3476 Update copyright years
3477
f9030485
RS
34782014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3479
3480 * c-array-notation.c: Use the standard form for the copyright notice.
3481
41958c28
BI
34822013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3483
3484 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3485 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3486 field in parser is not empty. If not-empty, call the function
3487 c_parser_finish_omp_declare_simd.
3488 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3489 between SIMD-enabled functions and #pragma simd. Added new parameter.
3490 (c_parser_cilk_all_clauses): Modified the usage of the function
3491 c_parser_cilk_clause_vectorlength as mentioned above.
3492 (c_parser_cilk_simd_fn_vector_attrs): New function.
3493 (c_finish_cilk_simd_fn_tokens): Likewise.
3494 (is_cilkplus_vector_p): Likewise.
3495 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3496 "nomask," and "mask" strings in clause name.
3497 (c_parser_omp_all_clauses): Added 3 new case statements:
3498 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3499 PRAGMA_CILK_CLAUSE_NOMASK.
3500 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3501 check for vector attribute and if so call the function
3502 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3503 called the function c_finish_cilk_simd_fn_tokens.
3504 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3505 parser field is non-empty. If so, parse them as you would parse
3506 the omp declare simd pragma.
3507 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3508 Added a check when step is a parameter and flag it as error.
3509 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3510 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3511 pragma_omp_clause.
3512
cef0fd0e
TS
35132013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3514
3515 * c-parser.c (c_parser_omp_parallel): Fix description.
3516
12893402
BI
35172013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3518
3519 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3520 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3521 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3522 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3523
296674db
JM
35242013-12-04 Joseph Myers <joseph@codesourcery.com>
3525
3526 PR c/52023
3527 * c-parser.c (c_parser_alignas_specifier): Use
3528 c_sizeof_or_alignof_type instead of c_alignof.
3529 (c_parser_alignof_expression): Likewise, with min_alignof
3530 parameter depending on alignof spelling used.
3531
edd28054
MP
35322013-12-04 Marek Polacek <polacek@redhat.com>
3533
3534 PR c/54113
3535 * c-decl.c (start_function): Don't warn for missing prototype for
3536 inline functions.
3537
da0fc454
MP
35382013-12-03 Marek Polacek <polacek@redhat.com>
3539
3540 PR c/59351
3541 * c-decl.c (build_compound_literal): Allow compound literals with
3542 empty initial value.
3543
4c2ecab0
JM
35442013-12-02 Joseph Myers <joseph@codesourcery.com>
3545
3546 PR c/58235
3547 * c-typeck.c (build_modify_expr): Diagnose assignment to
3548 expression with array type.
3549
340baef7
JM
35502013-11-29 Joseph Myers <joseph@codesourcery.com>
3551
3552 PR c/42262
3553 * c-typeck.c (process_init_element): Do not treat a string as
3554 initializing a whole array when used with a designator for an
3555 individual element.
3556
6763b9f7
JM
35572013-11-29 Joseph Myers <joseph@codesourcery.com>
3558
3559 PR c/57574
3560 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3561 an inline function following a static declaration.
3562
e7bd1de1
JJ
35632013-11-28 Jakub Jelinek <jakub@redhat.com>
3564
3565 PR c/59310
3566 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3567 to p_name before calling c_parser_omp_teams instead of after.
3568 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3569 argument. Remove unused p_name variable.
3570
0136f8f0
AH
35712013-11-27 Aldy Hernandez <aldyh@redhat.com>
3572 Jakub Jelinek <jakub@redhat.com>
3573
3574 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3575 external_scope is NULL.
3576
241b71bb
TV
35772013-11-27 Tom de Vries <tom@codesourcery.com>
3578 Marc Glisse <marc.glisse@inria.fr>
3579
3580 PR c++/59032
3581 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3582
2fb9a547
AM
35832013-11-22 Andrew MacLeod <amacleod@redhat.com>
3584
3585 * c-typeck.c: Add required include files from gimple.h.
3586
8400e75e
DM
35872013-11-22 David Malcolm <dmalcolm@redhat.com>
3588
3589 * c-decl.c (define_label, shadow_tag_warned)
3590 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3591 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3592 (declspecs_add_type): Remove use of in_system_header macro.
3593 * c-parser.c (c_parser_unary_expression): Likewise.
3594 * c-typeck.c (store_init_value, process_init_element)
3595 (c_start_case): Likewise.
3596
3597 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3598 macro.
3599
3600 * c-parser.c (c_parser_set_source_position_from_token): Remove
3601 reference to in_system_header from comment.
3602
386b1f1f
RS
36032013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3604
3605 * c-decl.c (grokdeclarator): Update comment to refer to
3606 tree_to_[su]hwi rather than tree_low_cst.
3607
ae7e9ddd
RS
36082013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3609
3610 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3611 tree_to_uhwi throughout.
3612
9439e9a1
RS
36132013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3614
3615 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3616 throughout.
3617
9541ffee
RS
36182013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3619
3620 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3621 throughout.
3622
c02065fc
AH
36232013-11-15 Aldy Hernandez <aldyh@redhat.com>
3624
3625 * c-parser.c (c_parser_cilk_simd): New.
3626 (c_parser_cilk_verify_simd): New.
3627 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3628 (c_parser_omp_for_loop): Add case for NE_EXPR.
3629 Set c_break_label for CILK_SIMD.
3630 (c_parser_cilk_clause_vectorlength): New.
3631 (c_parser_cilk_clause_linear): New.
3632 (c_parser_cilk_clause_name): New.
3633 (c_parser_cilk_all_clauses): New.
3634 * c-typeck.c (build_unary_op): Pass location argument to
3635 readonly_error.
3636 (build_modify_expr): Same.
3637 (build_asm_expr): Same.
3638 (c_finish_bc_stmt): Error on break/continue in loops.
3639
18f429e2
AM
36402013-11-14 Andrew MacLeod <amacleod@redhat.com>
3641
3642 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3643
d8a2d370
DN
36442013-11-14 Diego Novillo <dnovillo@google.com>
3645
3646 * c-decl.c: Include print-tree.h.
3647 Include stor-layout.h.
3648 Include varasm.h.
3649 Include attribs.h.
3650 Include stringpool.h.
3651 * c-lang.c: Include fold-const.h.
3652 * c-parser.c: Include stringpool.h.
3653 Include attribs.h.
3654 Include stor-layout.h.
3655 Include varasm.h.
3656 Include trans-mem.h.
3657 * c-typeck.c: Include stor-layout.h.
3658 Include trans-mem.h.
3659 Include varasm.h.
3660 Include stmt.h.
3661
38b7bc7f
JM
36622013-11-13 Joseph Myers <joseph@codesourcery.com>
3663
3664 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3665 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3666 __auto_type.
3667 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3668 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3669 RID_AUTO_TYPE.
3670 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3671 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3672 (c_parser_declarator, c_parser_direct_declarator_inner)
3673 (c_parser_parameter_declaration, c_parser_type_name): All callers
3674 changed.
3675 (c_parser_declaration_or_fndef): Handle declarations with type
3676 determined from the initializer.
3677
45b0be94
AM
36782013-11-12 Andrew MacLeod <amacleod@redhat.com>
3679
18f429e2 3680 * c-typeck.c: Include gimplify.h.
45b0be94 3681
582d9b50
JM
36822013-11-12 Joseph Myers <joseph@codesourcery.com>
3683
3684 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3685 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3686 comment.
3687 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3688 or _Thread_local as appropriate in diagnostics.
3689 (build_null_declspecs): Initialize ret->thread_gnu_p.
3690 (declspecs_add_scspec): Handle either __thread or _Thread_local
3691 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3692 pedantic. Do not disallow _Thread_local extern and _Thread_local
3693 static.
3694
267bac10
JM
36952013-11-07 Joseph Myers <joseph@codesourcery.com>
3696 Andrew MacLeod <amacleod@redhat.com>
3697
3698 * c-aux-info.c (gen_type): Handle atomic qualifier.
3699 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3700 qualifiers when compating types.
3701 (shadow_tag_warned): Handle atomic_p in declspecs.
3702 (quals_from_declspecs): Likewise.
3703 (start_decl): Use c_type_promotes_to when promoting argument
3704 types.
3705 (grokdeclarator): Handle _Atomic.
3706 (get_parm_info): Diagnose any qualifier on "void" as only
3707 parameter.
3708 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3709 comparing types. Use c_type_promotes_to when promoting argument
3710 types.
3711 (finish_function): Use c_type_promotes_to when promoting argument
3712 types.
3713 (build_null_declspecs): Handle atomic_p in declspecs.
3714 (declspecs_add_qual): Handle RID_ATOMIC.
3715 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3716 (c_token_starts_declspecs): Handle RID_ATOMIC.
3717 (c_parser_declspecs): Handle atomic type specifiers and
3718 qualifiers.
3719 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3720 from types of expressions with atomic type.
3721 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3722 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3723 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3724 (c_parser_statement_after_labels, c_parser_switch_statement)
3725 (c_parser_for_statement, c_parser_expr_no_commas)
3726 (c_parser_conditional_expression, c_parser_binary_expression)
3727 (c_parser_cast_expression, c_parser_unary_expression)
3728 (c_parser_postfix_expression)
3729 (c_parser_postfix_expression_after_primary, c_parser_expression):
3730 Use convert_lvalue_to_rvalue.
3731 (c_parser_expression_conv, c_parser_expr_list): Document
3732 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3733 (c_parser_objc_synchronized_statement): Use
3734 convert_lvalue_to_rvalue.
3735 (c_parser_objc_selector): Handle RID_ATOMIC.
3736 (c_parser_objc_receiver, c_parser_array_notation): Use
3737 convert_lvalue_to_rvalue.
3738 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3739 _Atomic (type-name).
3740 (struct c_declspecs): Add atomic_p field.
3741 (convert_lvalue_to_rvalue): Declare.
3742 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3743 corresponding atomic types.
3744 (qualify_type): Don't add _Atomic qualifiers from second argument.
3745 (comp_target_types): Do not allow _Atomic mismatches.
3746 (type_lists_compatible_p): Do not remove atomic qualifiers when
3747 comparing types.
3748 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3749 (build_atomic_assign): New functions.
3750 (build_unary_op): Use build_atomic_assign for atomic increment and
3751 decrement.
3752 (build_conditional_expr): Do not treat _Atomic void as a qualified
3753 version of void.
3754 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3755 (find_anonymous_field_with_type, convert_to_anonymous_field)
3756 (convert_for_assignment): Do not remove atomic qualifiers when
3757 comparing types.
3758 (digest_init): Do not accept initialization of arrays of atomic
3759 elements by string constants.
3760 (build_asm_expr): Use convert_lvalue_to_rvalue.
3761 (build_binary_op): Do not treat _Atomic void as a qualified
3762 version of void.
3763
0c249d4b
DD
37642013-11-06 DJ Delorie <dj@redhat.com>
3765
3766 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3767 both explicit and builtin, print the location of the explicit one.
3768
6d7f7e0a
TB
37692013-11-05 Tobias Burnus <burnus@net-b.de>
3770
3771 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3772 c_parser_omp_distribute, c_parser_omp_teams,
3773 c_parser_omp_target, c_parser_omp_declare): Handle
3774 -fopenmp-simd.
3775
b906f4ca
MP
37762013-11-03 Marek Polacek <polacek@redhat.com>
3777
3778 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3779
ee1d5a02
JJ
37802013-11-01 Jakub Jelinek <jakub@redhat.com>
3781
3782 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3783 check_dup_generic at the end, unless remove is true.
3784 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3785 remove = true;.
3786 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3787
5a9785fb
JJ
37882013-10-31 Jakub Jelinek <jakub@redhat.com>
3789
3790 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3791 with decl that is not pointer nor array.
3792
939b37da
BI
37932013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3794
3795 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3796 a spawning function is found.
3797 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3798 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3799 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3800 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3801 case.
3802 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3803 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3804 expr.
3805 (c_finish_return): Added a check to reject _Cilk_spawn in return
3806 expression.
3807 (build_cilk_spawn): New function.
3808 (build_cilk_sync): Likewise.
3809 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3810
d4af74d4
TB
38112013-10-27 Tobias Burnus <burnus@net-b.de>
3812
3813 PR other/33426
3814 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3815 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3816 (c_parser_statement_after_labels): Update calls.
3817
d73749df 38182013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3819
3820 PR other/33426
3821 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3822 Handle PRAGMA_IVDEP.
3823 (c_parser_statement_after_labels): Update call.
3824
f28aa681
MP
38252013-10-24 Marek Polacek <polacek@redhat.com>
3826
3827 * c-parser.c (c_parser_struct_declaration): Add a comment.
3828 (c_parser_declarator): Don't allow _Alignas here.
3829
0645c1a2
AM
38302013-10-17 Andrew MacLeod <amacleod@redhat.com>
3831
3832 * c-parser.c: Include omp-low.h.
3833 * c-typeck.c: Likewise.
3834
568a31f2
MP
38352013-10-17 Marek Polacek <polacek@redhat.com>
3836
3837 PR c/58267
3838 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3839 Document syntax of the array-declarator.
3840 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3841 are not permitted.
3842 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3843 (c_parser_struct_declaration): Likewise.
3844 (c_parser_declarator): Likewise.
3845 (c_parser_direct_declarator_inner): Likewise.
3846 (c_parser_parameter_declaration): Likewise.
3847 (c_parser_type_name): Likewise.
3848
acf0174b
JJ
38492013-10-11 Jakub Jelinek <jakub@redhat.com>
3850
3851 * c-lang.h (current_omp_declare_target_attribute): New extern
3852 decl.
3853 * c-parser.c: Include c-lang.h.
3854 (struct c_parser): Change tokens to c_token *.
3855 Add tokens_buf field. Change tokens_avail type to unsigned int.
3856 (c_parser_consume_token): If parser->tokens isn't
3857 &parser->tokens_buf[0], increment parser->tokens.
3858 (c_parser_consume_pragma): Likewise.
3859 (enum pragma_context): Add pragma_struct and pragma_param.
3860 (c_parser_external_declaration): Adjust
3861 c_parser_declaration_or_fndef caller.
3862 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3863 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3864 Adjust recursive call.
3865 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3866 of pragma_external.
3867 (c_parser_parameter_declaration): Use pragma_param instead of
3868 pragma_external.
3869 (c_parser_compound_statement_nostart, c_parser_label,
3870 c_parser_for_statement): Adjust
3871 c_parser_declaration_or_fndef callers.
3872 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3873 it through to c_parser_conditional_expression.
3874 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3875 pass it through to c_parser_binary_expression. Adjust recursive
3876 call.
3877 (c_parser_binary_expression): Remove prec argument, add
3878 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3879 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3880 binop matches it, use build2 instead of parser_build_binary_op.
3881 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3882 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3883 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3884 Handle pragma_struct and pragma_param the same as pragma_external.
3885 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3886 (c_parser_omp_variable_list): Parse array sections for
3887 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3888 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3889 (c_parser_omp_clause_reduction): Handle user defined reductions.
3890 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3891 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3892 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3893 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3894 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3895 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3896 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3897 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3898 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3899 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3900 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3901 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3902 (c_parser_omp_for_loop): Add CODE argument, pass it through
3903 to c_finish_omp_for. Change last argument to cclauses,
3904 and adjust uses to grab parallel clauses from the array of all
3905 the split clauses. Adjust c_parser_binary_expression,
3906 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3907 (omp_split_clauses): New function.
3908 (c_parser_omp_simd): New function.
3909 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3910 Allow the function to be called also when parsing combined constructs,
3911 and call c_parser_omp_simd when parsing for simd.
3912 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3913 #pragma omp section, require exactly one structured-block instead of
3914 sequence of statements.
3915 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3916 Allow the function to be called also when parsing combined constructs.
3917 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3918 Allow the function to be called also when parsing combined
3919 constructs.
3920 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3921 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3922 c_parser_omp_teams, c_parser_omp_target_data,
3923 c_parser_omp_target_update, c_parser_omp_target,
3924 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3925 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3926 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3927 (c_parser_omp_construct): Add p_name and mask vars. Handle
3928 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3929 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3930 and c_parser_omp_sections callers.
3931 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3932 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3933 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3934 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3935 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3936 OMP_CLAUSE_DEPEND.
3937 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3938 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3939 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3940 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3941 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3942 * c-typeck.c: Include tree-inline.h.
3943 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3944 handle_omp_array_sections_1, handle_omp_array_sections,
3945 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3946 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3947 user defined reductions.
3948 (c_tree_equal): New function.
3949 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3950 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3951 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3952 c_check_omp_declare_reduction_r): New prototypes.
3953 * c-decl.c (current_omp_declare_target_attribute): New variable.
3954 (c_decl_attributes): New function.
3955 (start_decl, start_function): Use it instead of decl_attributes.
3956 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3957 c_omp_reduction_decl, c_omp_reduction_lookup,
3958 c_check_omp_declare_reduction_r): New functions.
3959
0a6c2227
TT
39602013-09-25 Tom Tromey <tromey@redhat.com>
3961
3962 * Make-lang.in (c/gccspec.o): Remove.
3963 (CFLAGS-c/gccspec.o): New variable.
3964 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3965 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3966 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3967
f3bc55f0
TT
39682013-09-25 Tom Tromey <tromey@redhat.com>
3969
3970 * Make-lang.in (c/gccspec.o): Don't use subshell.
3971
a24d975c
MP
39722013-09-18 Marek Polacek <polacek@redhat.com>
3973
3974 PR sanitize/58443
3975 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3976 Remove unnecessary check.
3977
ce6923c5
MP
39782013-09-18 Marek Polacek <polacek@redhat.com>
3979
3980 PR sanitizer/58411
3981 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3982 no_sanitize_undefined attribute.
3983
a1e51df9
KT
39842013-09-13 Kai Tietz <ktietz@redhat.com>
3985
3986 PR target/57848
3987 * c-decl.c (c_builtin_function_ext_scope): Remove
3988 wrong assumption that it is never called on prexisting
3989 symbol.
3990
0af94e6f
JR
39912013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3992
3993 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3994
20059c8b
GDR
39952013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3996
3997 * c-objc-common.c (c_tree_printer): Tidy.
3998
de5a5fa1
MP
39992013-08-30 Marek Polacek <polacek@redhat.com>
4000
4001 * c-typeck.c (build_binary_op): Add division by zero and shift
4002 instrumentation.
4003
2531a1d9 40042013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 4005 Joseph Myers <joseph@codesourcery.com>
2531a1d9 4006
6e2bcc98 4007 PR c/35649
2531a1d9
JR
4008 * c-typeck.c (c_common_type): Prefer double_type_node over
4009 other REAL_TYPE types with the same precision.
4010 (convert_arguments): Likewise.
4011
025311c4
GDR
40122013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
4013
4014 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
4015 (c_initialize_diagnostics): Call a destructor for the early printer.
4016
da6ca2b5
GDR
40172013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4018
4019 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
4020 printer initialization.
4021
318cda85 40222013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 4023
318cda85
BI
4024 PR c/57490
4025 * c-array-notation.c (fix_conditional_array_notations_1): Added a
4026 check for truth values.
4027 (expand_array_notation_exprs): Added truth values case. Removed an
4028 unwanted else. Added for-loop to walk through subtrees in default
4029 case.
4030
b066401f
GDR
40312013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
4032
4033 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
4034
fb48aadc
JM
40352013-07-23 Joseph Myers <joseph@codesourcery.com>
4036
4037 * c-parser.c (struct c_generic_association): Fix typo.
4038
433cc7b0
TT
40392013-07-23 Tom Tromey <tromey@redhat.com>
4040 Joseph Myers <joseph@codesourcery.com>
4041
4042 * c-parser.c (struct c_generic_association): New.
4043 (c_generic_association_d): New typedef.
4044 (c_parser_generic_selection): New function.
4045 (c_parser_postfix_expression): Handle RID_GENERIC.
4046
26d40c3d
JM
40472013-07-13 Jason Merrill <jason@redhat.com>
4048
4049 PR c++/57793
4050 * c-decl.c (finish_struct): Check for too-large class.
4051
ecdbd01a 40522013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
4053
4054 PR c/57821
4055 * c-typeck.c (set_init_index): When folding, check for index overflow.
4056
1141ed3f
BI
40572013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4058
4059 * c-parser.c (c_parser_array_notation): Removed rejection of array
4060 notations in an array of function pointers.
4061
713b46fa
BI
40622013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
4063
4064 * c-array-notation.c (make_triplet_val_inv): New function.
4065 (create_cmp_incr): Likewise.
4066 (create_array_refs): Likewise.
4067 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
4068 Also modularized common parts between functions and called the function.
4069 (build_array_notation_expr): Likewise.
4070 (fix_conditional_array_notations_1): Likewise.
4071 (fix_array_notation_expr): Likewise.
4072 (fix_array_notation_call_expr): Likewise.
4073
92f20202
MP
40742013-06-18 Marek Polacek <polacek@redhat.com>
4075
4076 PR c/57630
4077 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
4078
73a23b06
BI
40792013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
4080
4081 * c-array-notation.c (build_array_notation_expr): Reject array notation
4082 mismatch between LHS and RHS even inside a call_expr. Also, removed
4083 a couple while statements that were dead code.
4084
00b8517d
BI
40852013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
4086
4087 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
4088 excessive precision expressions in function parameters. Also removed
4089 couple unwanted while statements.
4090
1509bdda
BI
40912013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4092
4093 * c-array-notation.c (expand_array_notation_exprs): Added
4094 ARRAY_NOTATION_REF case.
4095
d60f1706
BI
40962013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
4097
4098 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
4099 function to c-family/array-notation-common.c.
4100 (is_cilkplus_reduce_builtin): Likewise.
4101 (find_rank): Likewise.
4102 (extract_array_notation_exprs): Likewise.
4103 (replace_array_notations): Likewise.
4104 (find_inv_trees): Likewise.
4105 (replace_inv_trees): Likewise.
4106 (contains_array_notation_expr): Likewise.
4107 (find_correct_array_notation_type): Likewise.
4108 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
4109 (struct inv_list): Moved this to c-family/array-notation-common.c.
4110 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
4111
6d6efbb3
BI
41122013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
4113
4114 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
4115 reduction functions outside the for-loop. Added a check if the fundecl
4116 is non-NULL. Finally, removed an unwanted if-statement, and made the
4117 body unconditional.
4118
25c22937
BI
41192013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4120
4121 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
4122 condition of the if-statement matches the rank of else-block and then-
4123 block when array notations are used.
4124 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
4125 expression after the entire function body is parsed.
4126 (c_parser_expr_no_commas): Delayed creating array notation expressions
4127 to the end of function parsing.
4128 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
4129 whole if-statement instead of just the condition.
4130 (expand_array_notation_exprs): Added MODIFY_EXPR case.
4131
edd25645
BI
41322013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
4133
4134 PR c/57474
4135 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
4136 array to NULL_TREE if they are unused. Also added a check for the
4137 field to be NULL before its fields are used in future.
4138
065ce7f1
RO
41392013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4140
4141 PR bootstrap/57450
4142 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
4143 (build_array_notation_expr): Likewise.
4144
36536d79
BI
41452013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
4146
4147 * c-typeck.c (build_array_ref): Added a check to see if array's
4148 index is greater than one. If true, then emit an error.
4149 (build_function_call_vec): Exclude error reporting and checking
4150 for builtin array-notation functions.
4151 (convert_arguments): Likewise.
4152 (c_finish_return): Added a check for array notations as a return
4153 expression. If true, then emit an error.
4154 (c_finish_loop): Added a check for array notations in a loop
4155 condition. If true then emit an error.
4156 (lvalue_p): Added a ARRAY_NOTATION_REF case.
4157 (build_binary_op): Added a check for array notation expr inside
4158 op1 and op0. If present, we call another function to find correct
4159 type.
4160 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
4161 * c-parser.c (c_parser_compound_statement): Check if array
4162 notation code is used in tree, if so, then transform them into
4163 appropriate C code.
4164 (c_parser_expr_no_commas): Check if array notation is used in LHS
4165 or RHS, if so, then build array notation expression instead of
4166 regular modify.
4167 (c_parser_postfix_expression_after_primary): Added a check for
4168 colon(s) after square braces, if so then handle it like an array
4169 notation. Also, break up array notations in unary op if found.
4170 (c_parser_direct_declarator_inner): Added a check for array
4171 notation.
4172 (c_parser_compound_statement): Added a check for array notation in
4173 a stmt. If one is present, then expand array notation expr.
4174 (c_parser_if_statement): Likewise.
4175 (c_parser_switch_statement): Added a check for array notations in
4176 a switch statement's condition. If true, then output an error.
4177 (c_parser_while_statement): Similarly, but for a while.
4178 (c_parser_do_statement): Similarly, but for a do-while.
4179 (c_parser_for_statement): Similarly, but for a for-loop.
4180 (c_parser_unary_expression): Check if array notation is used in a
4181 pre-increment or pre-decrement expression. If true, then expand
4182 them.
4183 (c_parser_array_notation): New function.
4184 * c-array-notation.c: New file.
4185 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
4186
cd192ccc
MS
41872013-05-23 Mike Stump <mikestump@comcast.net>
4188
4189 * c-typeck.c (convert_for_assignment): Handle references to memory
4190 spaces better.
4191
427b248d
JM
41922013-05-16 Jason Merrill <jason@redhat.com>
4193
4194 * Make-lang.in (cc1$(exeext)): Use link mutex.
4195
44d90fe1
PC
41962013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4197
4198 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4199 to simply use OPT_Wpointer_arith.
4200 (build_unary_op): Likewise.
4201
4e7d7b3d
JJ
42022013-04-03 Jakub Jelinek <jakub@redhat.com>
4203
4204 PR c/19449
4205 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4206 argument. If set, or it temporarily for parsing of the first
4207 argument into force_folding_builtin_constant_p.
4208 (c_parser_postfix_expression): Adjust callers.
4209
839b422f
RB
42102013-03-21 Richard Biener <rguenther@suse.de>
4211
4212 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4213 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4214
2ee028f1
MP
42152013-02-12 Marek Polacek <polacek@redhat.com>
4216
4217 PR c/44938
4218 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4219 origtypes to NULL.
4220
8824edff
JJ
42212013-01-24 Jakub Jelinek <jakub@redhat.com>
4222
4223 PR c/56078
4224 * c-typeck.c (set_nonincremental_init_from_string): If
4225 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4226 returned false.
4227 (process_init_element): Likewise.
4228
eadd3d0d
JJ
42292012-12-20 Jakub Jelinek <jakub@redhat.com>
4230
4231 PR c++/55619
4232 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4233 argument, don't call default_function_array_conversion
4234 nor c_fully_fold here.
4235 (c_parser_asm_statement): Adjust callers.
4236 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4237 and outputs here, and call default_function_array_conversion
4238 on inputs that don't need to be addressable.
4239
f8a93a2e
JJ
42402012-12-18 Jakub Jelinek <jakub@redhat.com>
4241
4242 PR c/39464
4243 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4244 warning require that both c_common_unsigned_type as well as
4245 c_common_signed_type is the same for both mvl and mvr types.
4246
9771b263
DN
42472012-11-16 Diego Novillo <dnovillo@google.com>
4248
4249 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4250
4251 * c-common.c: Use new vec API in vec.h.
4252 * c-common.h: Likewise.
4253 * c-gimplify.c: Likewise.
4254 * c-pragma.c: Likewise.
4255 * c-pretty-print.c: Likewise.
4256 * c-pretty-print.h: Likewise.
4257 * c-semantics.c: Likewise.
4258 * c-decl.c: Likewise.
4259 * c-parser.c: Likewise.
4260 * c-tree.h: Likewise.
4261 * c-typeck.c: Likewise.
4262
880661a4
JW
42632012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4264
4265 PR c++/54930
4266 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4267
077d1abe
MLI
42682012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4269
4270 PR c/53066
4271 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4272 shadows a function, unless the variable is a function or a
4273 pointer-to-function.
4274
3a785c97
JJ
42752012-10-12 Jakub Jelinek <jakub@redhat.com>
4276
4277 PR c/54381
4278 * c-parser.c (struct c_tree_loc_pair): Removed.
4279 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4280 add location_t * and tree * arguments, fill in array of 3
4281 sizeof_arg trees and corresponding locs.
4282 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4283 c_parser_expr_list callers.
4284 (c_parser_postfix_expression_after_primary): Likewise. Pass
4285 array of 3 sizeof_arg trees and locs (corresponding to first
4286 3 arguments) to sizeof_pointer_memaccess_warning.
4287
703c8606
LC
42882012-10-09 Lawrence Crowl <crowl@google.com>
4289
4290 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4291 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4292 hash table.
4293
5d9de0d0
PC
42942012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4295
4296 PR c++/54194
4297 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4298 call.
4299
a212e43f
MG
43002012-10-09 Marc Glisse <marc.glisse@inria.fr>
4301
4302 PR c++/54427
4303 * c-typeck.c: Include c-common.h.
4304 (enum stv_conv): Moved to c-common.h.
4305 (scalar_to_vector): Moved to c-common.c.
4306 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4307 * Make-lang.in: c-typeck.c depends on c-common.h.
4308
3b78de56
AC
43092012-10-04 Arnaud Charlet <charlet@adacore.com>
4310
4311 * c-decl.c (c_write_global_declarations): Fix handling of
4312 -fdump-ada-spec*.
4313
78c60e3d
SS
43142012-09-30 Sharad Singhai <singhai@google.com>
4315
4316 * c-decl.c (c_write_global_declarations): Use a different method
4317 to determine if the dump has ben initialized.
4318
9f33203d
JM
43192012-09-14 Joseph Myers <joseph@codesourcery.com>
4320
4321 PR c/54552
4322 * c-typeck.c (c_cast_expr): When casting to a type requiring
4323 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4324 c_fully_fold first.
4325
a27d595d
JM
43262012-09-14 Joseph Myers <joseph@codesourcery.com>
4327
4328 PR c/54103
4329 * c-typeck.c (build_unary_op): Pass original argument of
4330 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4331 any C_MAYBE_CONST_EXPR, if it has integer operands.
4332 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4333 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4334 to c_objc_common_truthvalue_conversion, then remove any
4335 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4336 c_objc_common_truthvalue_conversion not
4337 c_common_truthvalue_conversion.
4338 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4339 call note_integer_operands for arguments with integer operands
4340 that are not integer constants.
4341
9feb29df
JJ
43422012-09-13 Jakub Jelinek <jakub@redhat.com>
4343
4344 PR c/54559
4345 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4346 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4347
d409320c
JJ
43482012-08-31 Jakub Jelinek <jakub@redhat.com>
4349
4350 PR c/54428
4351 * c-convert.c (convert): Don't call fold_convert_loc if
4352 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4353 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4354 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4355
6265d07c
JJ
43562012-08-24 Jakub Jelinek <jakub@redhat.com>
4357
4358 PR c/54355
4359 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4360 for nested and empty_ok arguments in the call to
4361 c_parser_declaration_or_fndef.
4362
1a4049e7
JJ
43632012-08-17 Jakub Jelinek <jakub@redhat.com>
4364
4365 * c-tree.h (c_last_sizeof_arg): Declare.
4366 * c-parser.c (struct c_tree_loc_pair): New type.
4367 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4368 non-NULL.
4369 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4370 (c_parser_postfix_expression_after_primary): Likewise. Call
4371 sizeof_pointer_memaccess_warning if needed.
4372 (sizeof_ptr_memacc_comptypes): New function.
4373 * c-typeck.c (c_last_sizeof_arg): New global variable.
4374 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4375
0229aee9
UB
43762012-07-24 Uros Bizjak <ubizjak@gmail.com>
4377
4378 * c-lang.h (lang_decl): Add variable_size GTY option.
4379
7ee2468b
SB
43802012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4381
4382 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4383 * Make-lang.in: Fix dependencies.
4384
d4a10d0a
SB
43852012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4386
4387 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4388 and add language Makefile hooks.
4389 * config-lang.in: New file.
4390 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4391 add the required "normal" config-lang.in rules.
4392 * c-lang.h: Moved from gcc/ to here.
4393 * c-tree.h: Likewise.
4394 * c-objc-common.c: Likewise.
4395 * c-objc-common.h: Likewise.
4396 * c-typeck.c: Likewise.
4397 * c-convert.c: Likewise.
4398 * c-lang.c: Likewise.
4399 * c-aux-info.c: Likewise.
4400 * c-errors.c: Likewise.
4401 * gccspec.c: Likewise.
4402 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4403 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4404\f
cbe34bb5 4405Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4406
4407Copying and distribution of this file, with or without modification,
4408are permitted in any medium without royalty provided the copyright
4409notice and this notice are preserved.