]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
microblaze.h (ASM_FORMAT_PRIVATE_NAME): Increase buffer size.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
2ebd93e1
MP
12017-01-20 Marek Polacek <polacek@redhat.com>
2
3 PR c/64279
4 * c-typeck.c (build_conditional_expr): Warn about duplicated branches.
5
b1c95bb5
RB
62017-01-13 Richard Biener <rguenther@suse.de>
7
8 * gimple-parser.c (c_parser_gimple_compound_statement): Handle
9 nops.
10
25329913
RB
112017-01-13 Richard Biener <rguenther@suse.de>
12
13 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
14 _Literal ( type-name ) number.
15
6bb4ea5c
RB
162017-01-12 Richard Biener <rguenther@suse.de>
17
18 * gimple-parser.c (c_parser_gimple_postfix_expression): Parse
19 __MEM.
20
6b5b4e9c
JJ
212017-01-11 Jakub Jelinek <jakub@redhat.com>
22
23 PR c++/72813
24 * c-decl.c (pop_file_scope): Set flag_syntax_only to 1 after writing
25 PCH file.
26
e3252775
RB
272017-01-11 Richard Biener <rguenther@suse.de>
28
29 PR bootstrap/79052
30 * gimple-parser.c (c_parser_gimple_switch_stmt): Add missing
31 returns on parse errors.
32
a9342885
MP
332017-01-04 Marek Polacek <polacek@redhat.com>
34
35 PR c++/64767
36 * c-parser.c (c_parser_postfix_expression): Mark zero character
37 constants by setting original_type in c_expr.
38 * c-typeck.c (parser_build_binary_op): Warn when a pointer is compared
39 with a zero character constant.
40 (char_type_p): New function.
41
5dd9a9d0
DM
422017-01-04 David Malcolm <dmalcolm@redhat.com>
43
44 * c-parser.c (c_parser_declaration_or_fndef): Create a
45 rich_location at init_loc and parse it to start_init.
46 (last_init_list_comma): New global.
47 (c_parser_braced_init): Update last_init_list_comma when parsing
48 commas. Pass it to pop_init_level. Pass location of closing
49 brace to pop_init_level.
50 (c_parser_postfix_expression_after_paren_type): Create a
51 rich_location at type_loc and parse it to start_init.
52 (c_parser_omp_declare_reduction): Likewise for loc.
53 * c-tree.h (start_init): Add rich_location * param.
54 (pop_init_level): Add location_t param.
55 * c-typeck.c (struct initializer_stack): Add field
56 "missing_brace_richloc".
57 (start_init): Add richloc param, use it to initialize
58 the stack node's missing_brace_richloc.
59 (last_init_list_comma): New decl.
60 (finish_implicit_inits): Pass last_init_list_comma to
61 pop_init_level.
62 (push_init_level): When finding missing open braces, add fix-it
63 hints to the richloc.
64 (pop_init_level): Add "insert_before" param and pass it
65 when calling pop_init_level. Add fixits about missing
66 close braces to any richloc. Use the richloc for the
67 -Wmissing-braces warning.
68 (set_designator): Pass last_init_list_comma to pop_init_level.
69 (process_init_element): Likewise.
70
cbe34bb5
JJ
712017-01-01 Jakub Jelinek <jakub@redhat.com>
72
73 Update copyright years.
74
d17680f3
JJ
752016-12-21 Jakub Jelinek <jakub@redhat.com>
76
0dba7960
JJ
77 PR bootstrap/78817
78 * c-typeck.c (build_function_call_vec): If check_function_arguments
79 returns true, set TREE_NO_WARNING on CALL_EXPR.
80
d17680f3
JJ
81 PR c/77767
82 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
83 to *expr instead of overwriting it.
84
aa90531e
RB
852016-12-20 Richard Biener <rguenther@suse.de>
86
87 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
88 error recovery.
89 (c_parser_gimple_statement): Only build assigns for non-error
90 stmts.
91 (c_parser_gimple_postfix_expression_after): Improve error recovery.
92
629b3d75
MJ
932016-12-14 Martin Jambor <mjambor@suse.cz>
94
95 * c-parser.c: Include omp-general.h and omp-offload.h instead of
96 omp-low.h.
97 (c_finish_oacc_routine): Adjusted call to
98 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
99 to use their new names.
100 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
101 use its new name.
102 (c_parser_oacc_update): Likewise.
103 (c_parser_omp_simd): Likewise.
104 (c_parser_omp_target_update): Likewise.
105 * c-typeck.c: Include omp-general.h instead of omp-low.h.
106 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
107 name.
108 (c_finish_omp_cancellation_point): Likewise.
109 * gimple-parser.c: Do not include omp-low.h
110
c5af52eb
CP
1112016-12-02 Cesar Philippidis <cesar@codesourcery.com>
112 James Norris <jnorris@codesourcery.com>
113
114 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
115 EXIT_DATA,WAIT} are not used in compound statements.
116 (c_parser_oacc_enter_exit_data): Update diagnostics.
117
48330c93
BE
1182016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
119
120 PR c++/71973
121 * c-decl.c (diagnose_mismatched_decls): Use
122 OPT_Wbuiltin_declaration_mismatch here too.
123
899ca90e 1242016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
125 Alan Hayward <alan.hayward@arm.com>
126 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
127
128 * c-decl.c (merge_decls): Use SET_DECL_MODE.
129 (make_label, finish_struct): Likewise.
130
1ee62b92 1312016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 132 Richard Biener <rguenther@suse.de>
22b15758 133
8e745a17
JJ
134 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
135 * config-lang.in (gtfiles): Add c/c-parser.h.
136 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
137 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
138 * c-parser.c (enum c_id_kind, struct c_token,
139 c_parser_next_token_is, c_parser_next_token_is_not,
140 c_parser_next_token_is_keyword,
141 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
142 Split out to ...
143 * c-parser.h: ... new header.
144 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 145 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
146 c_token_starts_typename, c_parser_next_token_starts_declspecs,
147 c_parser_next_tokens_start_declaration, c_parser_consume_token,
148 c_parser_error, c_parser_require, c_parser_skip_until_found,
149 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
150 c_parser_type_name): Export.
151 (c_parser_tokens_buf): New function.
152 (c_parser_error): Likewise.
153 (c_parser_set_error): Likewise.
154 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
155 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
156 via c_parser_parse_gimple_body.
8e745a17
JJ
157 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
158 c_token_starts_typename, c_parser_next_token_starts_declspecs,
159 c_parser_next_tokens_start_declaration, c_parser_consume_token,
160 c_parser_error, c_parser_require, c_parser_skip_until_found,
161 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
162 c_parser_type_name): Declare.
1ee62b92
PG
163 (struct c_parser): Declare forward.
164 (c_parser_tokens_buf): Declare.
8e745a17
JJ
165 (c_parser_error): Likewise.
166 (c_parser_set_error): Likewise.
167 * gimple-parser.c: New file.
168 * gimple-parser.h: Likewise.
1ee62b92 169
22b15758
UB
1702016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
171
172 PR c/35503
173 * c-parser.c (c_parser_postfix_expression_after_primary): Call
174 warn_for_restrict.
175
84ff4775
LCW
1762016-09-11 Le-Chun Wu <lcwu@google.com>
177 Mark Wielaard <mjw@redhat.com>
178
179 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
180 to the given -Wshadow= variant.
181
4d0cdd0c
TP
1822016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
183
184 * c-typeck.c: Include memmodel.h.
185
1202f33e
JJ
1862016-10-13 Jakub Jelinek <jakub@redhat.com>
187
188 PR target/77957
189 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
190 instead of lhd_return_null_tree_v.
191
8a14afd0
BS
1922016-10-07 Bernd Schmidt <bschmidt@redhat.com>
193
194 PR c++/69733
195 * c-decl.c (smallest_type_quals_location): New static function.
196 (grokdeclarator): Try to find the correct location for an ignored
197 qualifier.
198
81fea426
MP
1992016-09-26 Marek Polacek <polacek@redhat.com>
200
201 PR c/7652
202 * c-decl.c (pop_scope): Add gcc_fallthrough.
203
2042016-09-26 Marek Polacek <polacek@redhat.com>
205
206 PR c/7652
207 * c-parser.c (struct c_token): Add flags field.
208 (c_lex_one_token): Pass it to c_lex_with_flags.
209 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
210 into IFN_FALLTHROUGH.
211 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
212 attribute fallthrough after a case label or default label.
213 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
214
9a2300e9
MP
2152016-09-24 Marek Polacek <polacek@redhat.com>
216
217 PR c/77490
218 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
219 have boolean value. Warn about ++/-- on booleans.
220
7de76362
JJ
2212016-09-23 Jakub Jelinek <jakub@redhat.com>
222
223 * c-parser.c (incomplete_record_decls): Remove unnecessary
224 = vNULL initialization of file scope vec.
225
5b73d2ab
MP
2262016-09-16 Marek Polacek <polacek@redhat.com>
227
228 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
229
e51fbec3
MP
2302016-09-14 Marek Polacek <polacek@redhat.com>
231
232 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
233 (fix_array_notation_expr): Likewise.
234 * c-decl.c (finish_decl): Likewise.
235 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
236 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
237 (function_to_pointer_conversion): Use false instead of 0.
238 (convert_lvalue_to_rvalue): Likewise.
239 (parser_build_unary_op): Likewise.
240 (build_atomic_assign): Likewise.
241 (build_unary_op): Change nonconvert parameter type to bool, use
242 true/false instead of 1/0.
243 (build_binary_op): Use true instead of 1.
244
254830ba
DM
2452016-09-13 David Malcolm <dmalcolm@redhat.com>
246
247 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
248 of add_fixit_insert to add_fixit_insert_before.
249
4c13ba17
MP
2502016-09-13 Marek Polacek <polacek@redhat.com>
251
252 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
253 it.
254
54dcdb88
BE
2552016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
256
257 PR c++/77496
258 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
259 COMPOUND_EXPR to warn_for_omitted_condop.
260
e5106e27
DM
2612016-09-07 David Malcolm <dmalcolm@redhat.com>
262
263 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
264 c_get_substring_location for this new langhook.
265
9dc5773f
JJ
2662016-09-02 Jakub Jelinek <jakub@redhat.com>
267
268 PR c/65467
269 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
270 flag_openmp.
271 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
272 instead of mark_exp_read on low_bound/length expression.
273 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
274 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
275 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
276 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
277 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
278 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
279 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
280 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
281 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
282 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
283 instead of mark_expr_read.
284 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
285 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
286 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
287 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
288 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
289 array section bases outside of depend clause, for depend clause
290 use convert_lvalue_to_rvalue on the base.
291 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
292 linear, aligned, map, to and from clauses.
293 (c_omp_clause_copy_ctor): New function.
294
295844f6
MP
2952016-09-01 Marek Polacek <polacek@redhat.com>
296
297 PR c/7652
298 * c-typeck.c (composite_type): Add FALLTHRU comment.
299
089af25c
DM
3002016-08-31 David Malcolm <dmalcolm@redhat.com>
301
302 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
303 to the insertion fixits for "struct", "union", and "enum".
304
f9087798
DM
3052016-08-30 David Malcolm <dmalcolm@redhat.com>
306
307 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
308 rather than add_fixit_misspelled_id.
309 (undeclared_variable): Likewise.
310 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
311 now-redundant "here" params from add_fixit_insert method calls.
312 (c_parser_parameter_declaration): Likewise.
313 * c-typeck.c (build_component_ref): Remove now-redundant range
314 param from add_fixit_replace method calls.
315
ebef225f
MP
3162016-08-25 Marek Polacek <polacek@redhat.com>
317
318 * c-typeck.c (parser_build_binary_op): Pass LHS to
319 warn_logical_not_parentheses.
320
fe377a48
MP
3212016-08-25 Marek Polacek <polacek@redhat.com>
322
323 PR c/77323
324 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
325 or _FloatN or _FloatNx is not supported.
326 (finish_declspecs): Set type to integer_type_node when _FloatN or
327 _FloatNx is not supported.
328
c65699ef
JM
3292016-08-19 Joseph Myers <joseph@codesourcery.com>
330
331 PR c/32187
332 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
333 (struct c_declspecs): Add field floatn_nx_idx.
334 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
335 and _FloatNx type specifiers.
336 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
337 (c_parser_declspecs, c_parser_attribute_any_word)
338 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
339 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
340 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
341 narrower than double.
342
2f1364c2
JJ
3432016-08-12 Jakub Jelinek <jakub@redhat.com>
344 Martin Liska <mliska@suse.cz>
345
346 PR c/67410
347 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
348 % to determine val element to change. Assert that
349 wchar_bytes * charwidth fits into val array.
350
191816a3
MP
3512016-08-12 Marek Polacek <polacek@redhat.com>
352
353 PR c/7652
354 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
355 (c_parser_postfix_expression): Likewise.
356 * c-typeck.c (build_unary_op): Adjust fall through comment.
357 (c_mark_addressable): Likewise.
358
b95a64bb
JJ
3592016-08-11 Jakub Jelinek <jakub@redhat.com>
360
361 PR c/72816
362 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
363 array member through typedef, for orig_qual_indirect == 0 clear
364 orig_qual_type.
365
895aa8e1
DM
3662016-08-08 David Malcolm <dmalcolm@redhat.com>
367
368 PR c/64955
369 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
370 this up to selftest::run_c_tests.
371 (selftest::run_c_tests): New function.
372
0b212d8c
TS
3732016-08-04 Thomas Schwinge <thomas@codesourcery.com>
374
ae9281fc
TS
375 * c-parser.c (struct oacc_routine_data): Add error_seen and
376 fndecl_seen members.
377 (c_finish_oacc_routine): Use these.
378 (c_parser_declaration_or_fndef): Adjust.
379 (c_parser_oacc_routine): Likewise. Support more C language
380 constructs, and improve diagnostics. Move pragma context
381 checking...
382 (c_parser_pragma): ... here.
383
0b212d8c
TS
384 * c-parser.c (struct oacc_routine_data): New.
385 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
386 Simplify code.
387 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
388 declare target" attribute.
389
76e2c821
JB
3902016-08-01 Jan Beulich <jbeulich@suse.com>
391
392 * c-fold.c (c_fully_fold_internal): Also emit shift count
393 warnings for vector types.
394 * c-typeck.c (build_binary_op): Likewise.
395
f618a472
MP
3962016-07-29 Marek Polacek <polacek@redhat.com>
397
398 PR c/71742
399 * c-decl.c (finish_struct): Rephrase an error message.
400
efd0786f
MP
401 PR c/71853
402 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
403 to error node for invalid code.
404
e00dceaf
MP
405 PR c/71573
406 * c-decl.c (implicitly_declare): Return decl early not only for
407 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
408
673a107a
JJ
4092016-07-29 Jakub Jelinek <jakub@redhat.com>
410
411 PR c/71969
412 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
413 on GNU extern inline functions.
414
a5b5c8b6
MP
4152016-07-29 Marek Polacek <polacek@redhat.com>
416
417 PR c/71583
418 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
419 check expr.value.
420
e3fe09c1
UB
4212016-07-22 Uros Bizjak <ubizjak@gmail.com>
422
423 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
424
7c8f7eaa
DM
4252016-07-20 David Malcolm <dmalcolm@redhat.com>
426
427 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
428 spellcheck-tree.h
429 (best_macro_match): Likewise, converting from a typedef to a
430 subclass.
431 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
432 (lookup_name_fuzzy): Update for change of best_macro_match to a
433 subclass with a ctor that calls cpp_forall_identifiers.
434
de6a69ee
DM
4352016-07-20 David Malcolm <dmalcolm@redhat.com>
436
437 * c-decl.c (implicit_decl_warning): Update for conversion of
438 return type of lookup_name_fuzzy to const char *.
439 (undeclared_variable): Likewise.
440 (lookup_name_fuzzy): Convert return type from tree to
441 const char *.
442 * c-parser.c (c_parser_declaration_or_fndef): Update for
443 conversion of return type of lookup_name_fuzzy to const char *.
444 (c_parser_parameter_declaration): Likewise.
445
b1c9c068
CP
4462016-07-15 Cesar Philippidis <cesar@codesourcery.com>
447
448 * c-parser.c (c_parser_oacc_declare): Don't scan for
449 GOMP_MAP_POINTER.
450 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
451 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
452 zero-length subarrays.
453
ddbbcb19
JJ
4542016-07-15 Jakub Jelinek <jakub@redhat.com>
455
456 PR c/71858
457 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
458 instead of FUZZY_LOOKUP_NAME.
459 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
460 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
461
dd36b877
JJ
4622016-07-14 Jakub Jelinek <jakub@redhat.com>
463
464 PR c/71858
465 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
466
8c681247
TS
4672016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
468
469 * c-parser.c (c_parser_generic_selection): Make type of variable
470 auto_vec.
471 (c_parser_omp_declare_simd): Likewise.
472
bf4fa671
TS
4732016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
474
475 * c-decl.c (struct c_struct_parse_info): Change member types
476 from vec to auto_vec.
477 (start_struct): Adjust.
478 (finish_struct): Likewise.
479
557e8c49
JJ
4802016-07-02 Jakub Jelinek <jakub@redhat.com>
481
482 PR c/71719
483 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
484
54d19c3b
TS
4852016-06-29 Thomas Schwinge <thomas@codesourcery.com>
486
487 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
488 Move pragma context checking into...
489 (c_parser_omp_cancellation_point): ... here, and improve
490 diagnostic messages.
491 * c-typeck.c (c_finish_omp_cancel)
492 (c_finish_omp_cancellation_point): Improve diagnostic messages.
493
152ef731
JJ
4942016-06-29 Jakub Jelinek <jakub@redhat.com>
495
496 PR c/71685
497 * c-typeck.c (c_build_qualified_type): Don't clear
498 C_TYPE_INCOMPLETE_VARS for the main variant.
499
5002016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
501
502 PR c/71552
503 * c-typeck.c (output_init_element): Diagnose incompatible types
504 before non-constant initializers.
505
e9ac1f86
JJ
5062016-06-28 Jakub Jelinek <jakub@redhat.com>
507
508 * Make-lang.in: Don't cat ../stage_current if it does not exist.
509
277d7ee0
AK
5102016-06-23 Andi Kleen <ak@linux.intel.com>
511
512 * Make-lang.in: Add support for autofdo.
513
1a4f11c8
DM
5142016-06-22 David Malcolm <dmalcolm@redhat.com>
515
516 PR c/70339
517 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
518 (implicit_decl_warning): When issuing warnings for implicit
519 declarations, attempt to provide a suggestion via
520 lookup_name_fuzzy.
521 (undeclared_variable): Likewise when issuing errors.
522 (lookup_name_in_scope): Likewise.
523 (struct edit_distance_traits<cpp_hashnode *>): New struct.
524 (best_macro_match): New typedef.
525 (find_closest_macro_cpp_cb): New function.
526 (lookup_name_fuzzy): New function.
527 * c-parser.c: Include gcc-rich-location.h.
528 (c_token_starts_typename): Split out case CPP_KEYWORD into...
529 (c_keyword_starts_typename): ...this new function.
530 (c_parser_declaration_or_fndef): When issuing errors about
531 missing "struct" etc, add a fixit. For other kinds of errors,
532 attempt to provide a suggestion via lookup_name_fuzzy.
533 (c_parser_parms_declarator): When looking ahead to detect typos in
534 type names, also reject CPP_KEYWORD.
535 (c_parser_parameter_declaration): When issuing errors about
536 unknown type names, attempt to provide a suggestion via
537 lookup_name_fuzzy.
538 * c-tree.h (c_keyword_starts_typename): New prototype.
539
5a578671
JM
5402016-06-20 Joseph Myers <joseph@codesourcery.com>
541
542 PR c/71601
543 * c-typeck.c (build_conditional_expr): Return error_mark_node if
544 c_common_type returns error_mark_node.
545
3f8257db 5462016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
547
548 PR c/69507
549 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
550 __alignof__ (expression).
551
6a3f203c
DM
5522016-06-14 David Malcolm <dmalcolm@redhat.com>
553
554 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
555
264757fb
DM
5562016-06-14 David Malcolm <dmalcolm@redhat.com>
557
558 * c-typeck.c (build_component_ref): Simplify fixit code by
559 using gcc_rich_location::add_fixit_misspelled_id.
560 (set_init_label): Likewise.
561
f7e4f2e3
DM
5622016-06-13 David Malcolm <dmalcolm@redhat.com>
563
564 * c-parser.c (c_parser_initelt): Provide location of name for new
565 location_t param of set_init_label.
566 * c-tree.h (set_init_label): Add location_t param.
567 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
568 param and use it when issuing error messages about unrecognized
569 field names. Attempt to provide a fixit hint if appropriate,
570 otherwise update the error message to provide the type name.
571
4b1ffdb1
TS
5722016-06-10 Thomas Schwinge <thomas@codesourcery.com>
573
574 PR c/71381
575 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
576 Loosen checking.
577
44a845ca
MS
5782016-06-08 Martin Sebor <msebor@redhat.com>
579 Jakub Jelinek <jakub@redhat.com>
580
581 PR c++/70507
582 PR c/68120
583 * c-typeck.c (convert_arguments): Don't promote last argument
584 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
585
92a5f2ba
MP
5862016-06-08 Marek Polacek <polacek@redhat.com>
587
588 PR c/71418
589 * c-decl.c (grokdeclarator): Check TYPE_P.
590
08203f73
MP
591 PR c/71426
592 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
593 code.
594
6ffd47b7
DM
5952016-06-07 David Malcolm <dmalcolm@redhat.com>
596
597 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
598 and structure element reference, capture the location of the
599 element name token and pass it to build_component_ref.
600 (c_parser_postfix_expression_after_primary): Likewise for
601 structure element dereference.
602 (c_parser_omp_variable_list): Likewise for
603 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
604 * c-tree.h (build_component_ref): Add location_t param.
605 * c-typeck.c (build_component_ref): Add location_t param
606 COMPONENT_LOC. Use it, if available, when issuing hints about
607 mispelled member names to provide a fixit replacement hint.
608
1f40cff3
MP
6092016-06-06 Marek Polacek <polacek@redhat.com>
610
611 PR c/71362
612 * c-parser.c (c_parser_direct_declarator): Set location.
613
5545a907
MP
6142016-06-06 Marek Polacek <polacek@redhat.com>
615
616 * c-typeck.c (comptypes_internal): Handle comparisons of
617 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
618 TYPE_REF_CAN_ALIAS_ALL.
619
b605f663
CLT
6202016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
621
622 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
623 arguments as addressable when async clause exists.
624
00631022
JJ
6252016-05-30 Jakub Jelinek <jakub@redhat.com>
626
627 PR c++/71349
628 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
629 when combined with target construct.
630
7211a097
JJ
6312016-05-26 Jakub Jelinek <jakub@redhat.com>
632
633 * c-parser.c (c_parser_omp_clause_schedule): Warn if
634 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
635
95efe6b6
MP
6362016-05-25 Marek Polacek <polacek@redhat.com>
637
638 PR c/71265
639 * c-decl.c (c_make_fname_decl): Don't check seen_error.
640
a23faf7a
MP
641 PR c/71266
642 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
643
e46c7770
CP
6442016-05-24 Cesar Philippidis <cesar@codesourcery.com>
645
646 * c-parser.c (c_parser_oacc_declare): Add support for
647 GOMP_MAP_FIRSTPRIVATE_POINTER.
648 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
649 argument with enum c_omp_region_type ort.
650 (handle_omp_array_sections): Likewise. Update call to
651 handle_omp_array_sections_1.
652 (c_finish_omp_clauses): Add specific errors and warning messages for
653 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
654 call to handle_omp_array_sections.
655
a04e69c0
TS
6562016-05-24 Thomas Schwinge <thomas@codesourcery.com>
657
658 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
659
f17a223d
RB
6602016-05-24 Richard Biener <rguenther@suse.de>
661
662 PR middle-end/70434
663 PR c/69504
664 * c-typeck.c (build_array_ref): Do not complain about indexing
665 non-lvalue vectors. Adjust for function name change.
666
79063edd
MS
6672016-05-20 Martin Sebor <msebor@redhat.com>
668
669 PR c/71115
670 * c-typeck.c (error_init): Use
671 expansion_point_location_if_in_system_header.
672 (warning_init): Same.
673
8a40fef3
DM
6742016-05-19 David Malcolm <dmalcolm@redhat.com>
675
676 PR c/71171
677 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
678 in error-handling.
679 (c_parser_postfix_expression): Likewise.
680 * c-tree.h (c_expr::set_error): New method.
681 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
682 that result's range is initialized.
683
e9892350
JG
6842016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
685
686 * c-typeck.c (parser_build_unary_op): Fix formatting.
687
8fad45f5
MW
6882016-05-16 Matthew Wahab <matthew.wahab@arm.com>
689
690 * c-decl.c (grokdeclarator): Remove errmsg and use of
691 targetm.invalid_return_type.
692 (grokparms): Remove errmsg and use of
693 targetm.invalid_parameter_type.
694
aa4b467b
JM
6952016-05-13 Joseph Myers <joseph@codesourcery.com>
696
697 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
698 function return type.
699
4f2e1536
MP
7002016-05-12 Marek Polacek <polacek@redhat.com>
701
702 PR c/70756
703 * c-decl.c (build_compound_literal): Pass LOC down to
704 c_incomplete_type_error.
705 * c-tree.h (require_complete_type): Adjust declaration.
706 (c_incomplete_type_error): Likewise.
707 * c-typeck.c (require_complete_type): Add location parameter, pass it
708 down to c_incomplete_type_error.
709 (c_incomplete_type_error): Add location parameter, pass it down to
710 error_at.
711 (build_component_ref): Pass location down to c_incomplete_type_error.
712 (default_conversion): Pass location down to require_complete_type.
713 (build_array_ref): Likewise.
714 (build_function_call_vec): Likewise.
715 (convert_arguments): Likewise.
716 (build_unary_op): Likewise.
717 (build_c_cast): Likewise.
718 (build_modify_expr): Likewise.
719 (convert_for_assignment): Likewise.
720 (c_finish_omp_clauses): Likewise.
721
d6e83a8d
MM
7222016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
723
724 PR c/43651
725 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
726 is enabled.
727 * c-errors.c (pedwarn_c90): Return true if warned.
728 * c-tree.h (pedwarn_c90): Change return type to bool.
729 (enum c_declspec_word): Add new enumerator cdw_atomic.
730
5c3a10fb
MP
7312016-05-11 Marek Polacek <polacek@redhat.com>
732
733 PR c++/71024
734 * c-decl.c (diagnose_mismatched_decls): Factor out code to
735 diagnose_mismatched_attributes and call it.
736
cf68d92c
MP
7372016-05-10 Marek Polacek <polacek@redhat.com>
738
739 PR c/70255
740 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
741 on a declaration following the definition.
742
351f85c5
JJ
7432016-05-05 Jakub Jelinek <jakub@redhat.com>
744
745 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
746 parse it through to c_parser_c99_block_statement.
747 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
748 caller.
749
deef7113
MP
7502016-05-04 Marek Polacek <polacek@redhat.com>
751
752 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
753 OPT_Wdangling_else.
754
de55efd5
MP
7552016-05-04 Marek Polacek <polacek@redhat.com>
756
757 PR c/48778
758 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
759 for macro expansions.
760
79ce98bc
MP
7612016-05-03 Marek Polacek <polacek@redhat.com>
762
763 PR c/70859
764 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
765 check_builtin_function_arguments.
766
fb2647aa
RB
7672016-05-03 Richard Biener <rguenther@suse.de>
768
769 * Make-lang.in (cc1-checksum.c): For stage-final re-use
770 the checksum from the previous stage.
771
77886428
CP
7722016-05-02 Cesar Philippidis <cesar@codesourcery.com>
773
774 * c-parser.c (c_parser_oacc_all_clauses): Update call to
775 c_finish_omp_clauses.
776 (c_parser_omp_all_clauses): Likewise.
777 (c_parser_oacc_cache): Likewise.
778 (c_parser_oacc_loop): Likewise.
779 (omp_split_clauses): Likewise.
780 (c_parser_omp_declare_target): Likewise.
781 (c_parser_cilk_all_clauses): Likewise.
782 (c_parser_cilk_for): Likewise.
783 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
784 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
785
7176a4a0
MP
7862016-05-02 Marek Polacek <polacek@redhat.com>
787
788 PR c/70851
789 * c-decl.c (grokdeclarator): Diagnose when array's size has an
790 incomplete type.
791
e7ff0319
CP
7922016-04-29 Cesar Philippidis <cesar@codesourcery.com>
793
794 PR middle-end/70626
795 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
796 OACC_LOOP_CLAUSE_MASK.
797 (c_parser_oacc_kernels_parallel): Update call to
798 c_oacc_split_loop_clauses.
799
9f405ce1
AM
8002016-04-28 Andrew MacLeod <amacleod@redhat.com>
801
802 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
803 argument to build_modify_expr in two cases.
804
c1e1f433
BS
8052016-04-27 Bernd Schmidt <bschmidt@redhat.com>
806
807 * c-parser.c (c_parser_postfix_expression_after_primary): Call
808 warn_for_memset instead of warning directly here.
809
2448a956
MP
8102016-04-26 Marek Polacek <polacek@redhat.com>
811
812 PR c/67784
813 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
814 out of ...
815 (c_parser_for_statement): ... here.
816 (c_parser_if_statement): Use it.
817 (c_parser_switch_statement): Use it.
818 (c_parser_while_statement): Use it.
819
b02a5e26
MP
820 PR c/70791
821 * c-decl.c (pushdecl): Pass LOCUS down to warning.
822
477d4906
IV
8232016-04-20 Ilya Verbin <ilya.verbin@intel.com>
824
825 PR c++/69363
826 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
827 instead of c_finish_cilk_clauses.
828 * c-tree.h (c_finish_omp_clauses): Add new default argument.
829 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
830 floating-point variables in the linear clause for Cilk Plus.
831
fe37c7af
MM
8322016-04-18 Michael Matz <matz@suse.de>
833
834 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
835 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
836
949505a9
MP
8372016-04-15 Marek Polacek <polacek@redhat.com>
838
839 PR c/70671
840 * c-typeck.c (build_unary_op): Pass location down to error and
841 warning call.
842
dda1bf61
JJ
8432016-04-15 Jakub Jelinek <jakub@redhat.com>
844
845 PR c/70436
846 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
847 where needed.
848 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
849 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
850 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
851 Adjust c_parser_pragma callers.
852 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
853 caller.
854 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
855 c_parser_statement.
856 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
857 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
858 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
859 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
860 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
861 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
862 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
863 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
864 down where needed.
865 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
866 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
867 calls.
868
99cd9857
MP
8692016-04-13 Marek Polacek <polacek@redhat.com>
870
871 PR c/70436
872 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
873 adjust callers.
874 (c_parser_statement): Likewise.
875 (c_parser_c99_block_statement): Likewise.
876 (c_parser_while_statement): Likewise.
877 (c_parser_for_statement): Likewise.
878 (c_parser_if_body): Don't set IF_P here.
879 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
880 about dangling else here.
881 * c-tree.h (c_finish_if_stmt): Adjust declaration.
882 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
883 warn about dangling else here.
884
f13355da
MP
8852016-04-04 Marek Polacek <polacek@redhat.com>
886
887 PR c/70307
888 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
889
5fde6a45
MP
8902016-03-31 Marek Polacek <polacek@redhat.com>
891
892 PR c/70297
893 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
894
4bbf545b
DM
8952016-03-18 David Malcolm <dmalcolm@redhat.com>
896
897 PR c/70281
898 * c-parser.c (c_parser_postfix_expression): Set the source range
899 for uses of "__builtin_types_compatible_p".
900
fcc2b74f
JJ
9012016-03-17 Jakub Jelinek <jakub@redhat.com>
902
903 PR c/70280
904 * c-typeck.c (composite_type): Don't count void_list_node
905 into len, if the list is terminated by void_list_node, start
906 with void_list_node instead of NULL for newargs. Stop
907 at void_list_node.
908
ab4c578f
MP
9092016-03-16 Marek Polacek <polacek@redhat.com>
910
911 PR c/70093
912 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
913 nested functions returning VM types.
914
96b3c82d
CP
9152016-03-09 Cesar Philippidis <cesar@codesourcery.com>
916
917 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
918 when calling c_finish_omp_clauses.
919
29b9828f
BS
9202016-03-04 Bernd Schmidt <bschmidt@redhat.com>
921
922 PR c/69824
923 * c-decl.c (get_parm_info): Don't queue implicit function declarations
924 for later.
925
7ff6ca38
MP
9262016-03-04 Marek Polacek <polacek@redhat.com>
927
928 PR c/69798
929 * c-parser.c (c_parser_postfix_expression): Call
930 c_parser_cast_expression rather than c_parser_postfix_expression.
931
686e2237
JJ
9322016-03-01 Jakub Jelinek <jakub@redhat.com>
933
934 PR c/69796
935 PR c/69974
936 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
937 of incomplete decls to error_mark_node.
938
0b05329b
MP
9392016-02-24 Marek Polacek <polacek@redhat.com>
940
941 PR c/69819
942 * c-decl.c (finish_decl): Don't update the copy of the type of a
943 different decl type.
944
067fbd8b
JJ
9452016-02-23 Jakub Jelinek <jakub@redhat.com>
946
947 PR objc/69844
948 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
949 in id_kind reclassification.
950
bf14eba2
JJ
9512016-02-16 Jakub Jelinek <jakub@redhat.com>
952
953 PR c/69835
954 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
955
ba539195
JN
9562016-02-16 James Norris <jnorris@codesourcery.com>
957
958 PR c/64748
959 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
960
16595a1f
BS
9612016-02-12 Bernd Schmidt <bschmidt@redhat.com>
962
f48dfe98
BS
963 * c-decl.c (build_null_declspecs): Zero the entire struct.
964
16595a1f
BS
965 PR c/69522
966 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
967 callers changed. If nested_p is true, use it to call
968 finish_implicit_inits.
969 * c-tree.h (finish_implicit_inits): Declare.
970 * c-typeck.c (finish_implicit_inits): New function. Move code
971 from ...
972 (push_init_level): ... here.
973 (set_designator, process_init_element): Call finish_implicit_inits.
974
66756373
JJ
9752016-02-11 Jakub Jelinek <jakub@redhat.com>
976
977 PR c/69768
978 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
979 arguments for -Waddress warning.
980
1066e9b5
JJ
9812016-02-04 Jakub Jelinek <jakub@redhat.com>
982
983 PR c/69669
984 * c-decl.c (finish_enum): When honoring mode attribute,
985 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
986
3a5d2ba4
JJ
9872016-01-29 Jakub Jelinek <jakub@redhat.com>
988
989 PR debug/69518
990 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
991 all type variants, not just TYPE_MAIN_VARIANT.
992
cbdd8ae0
JJ
9932016-01-27 Jakub Jelinek <jakub@redhat.com>
994
995 PR debug/66869
996 * c-decl.c (c_write_global_declarations_1): Warn with
997 warn_unused_function if static prototype without definition
998 is not C_DECL_USED.
999
fa74a4bc
MP
10002016-01-27 Marek Polacek <polacek@redhat.com>
1001
1002 PR c/68062
1003 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
1004 to unsigned, if needed. Add -Wsign-compare warning.
1005
13f92e8d
JJ
10062016-01-26 Jakub Jelinek <jakub@redhat.com>
1007
1008 PR tree-optimization/69483
1009 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
1010
cd8e73dc 10112016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
1012
1013 PR c/24293
1014 * c-tree.h (incomplete_record_decls): Declare.
1015 * c-parser.c (incomplete_record_decls): Define.
1016 (c_parser_translation_unit): Iterate through incomplete_record_decls and
1017 report error if any decl has zero size.
1018 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
1019 or enum type to incomplete_record_decls.
1020
e6d6ec9e
TV
10212016-01-14 Tom de Vries <tom@codesourcery.com>
1022
1023 PR tree-optimization/68773
1024 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
1025 set force_output.
1026
00083992
MP
10272016-01-14 Marek Polacek <polacek@redhat.com>
1028
1029 PR c/69262
1030 * c-decl.c (grokdeclarator): Provide more information for invalid
1031 array declarations.
1032
7443cf13
DM
10332016-01-06 David Malcolm <dmalcolm@redhat.com>
1034
1035 * c-parser.c (c_parser_unary_expression): For dereferences, build
1036 a combined location before calling build_indirect_ref, so that
1037 error reports cover the full range, manually updating the c_expr
1038 src_range.
1039
6b131d5b
MP
10402016-01-06 Marek Polacek <polacek@redhat.com>
1041
1042 PR sanitizer/69099
1043 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
1044 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
1045 NULL.
1046
818ab71a
JJ
10472016-01-04 Jakub Jelinek <jakub@redhat.com>
1048
1049 Update copyright years.
1050
2fe0a208
MP
10512016-01-04 Marek Polacek <polacek@redhat.com>
1052
1053 PR c/68908
1054 * c-typeck.c (build_atomic_assign): Improve commentary. Add
1055 optimization to use __atomic_fetch_* built-in if possible.
1056
c7b48c8a
TS
10572015-12-23 Thomas Schwinge <thomas@codesourcery.com>
1058
1059 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
1060 into...
1061 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
1062 all users.
1063
fda5652f
MP
10642015-12-22 Marek Polacek <polacek@redhat.com>
1065
1066 PR c/69002
1067 * c-typeck.c (build_component_ref): Warn when acessing elements of
1068 atomic structures or unions.
1069
745e411d
DM
10702015-12-21 David Malcolm <dmalcolm@redhat.com>
1071
1072 * c-typeck.c: Include "gcc-rich-location.h".
1073 (build_binary_op): In the two places that call binary_op_error,
1074 create a gcc_rich_location and populate it with the location of
1075 the binary op and its two operands.
1076
94c40e19
DM
10772015-12-16 David Malcolm <dmalcolm@redhat.com>
1078
1079 * c-parser.c (c_parser_statement_after_labels): When calling
1080 c_finish_return, Use the return expression's location if it has
1081 one, falling back to the location of the first token within it.
1082 * c-typeck.c (c_finish_return): When issuing warnings about
1083 the incorrect presence/absence of a return value, issue a note
1084 showing the declaration of the function.
1085
de67c4c3
DM
10862015-12-16 David Malcolm <dmalcolm@redhat.com>
1087
1088 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1089 to 4.
1090 (c_parser_peek_nth_token): New function.
1091 (c_parser_peek_conflict_marker): New function.
1092 (c_parser_error): Detect conflict markers and report them as such.
1093
a10704e1
DM
10942015-12-16 David Malcolm <dmalcolm@redhat.com>
1095
1096 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1097 to preserve range information for the primary expression
1098 in the call to c_parser_postfix_expression_after_primary.
1099
8062bca6
DM
11002015-12-16 David Malcolm <dmalcolm@redhat.com>
1101
1102 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1103 expression location, falling back on the first token location,
1104 rather than always using the latter.
1105
d06f8b75
MP
11062015-12-16 Marek Polacek <polacek@redhat.com>
1107
1108 PR c/64637
1109 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1110 available.
1111
2994fb91
MP
11122015-12-15 Marek Polacek <polacek@redhat.com>
1113
1114 PR c/68907
1115 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1116 artificial decl.
1117
a1b93f8d
DM
11182015-12-08 David Malcolm <dmalcolm@redhat.com>
1119
1120 * c-parser.c (c_parser_alignof_expression): Capture location of
1121 closing parenthesis (if any), or of end of unary expression, and
1122 use it to build a src_range for the expression.
1123
46c6e1e2
DM
11242015-12-08 David Malcolm <dmalcolm@redhat.com>
1125
1126 PR c/68757
1127 * c-parser.c (c_parser_get_builtin_args): Add
1128 "out_close_paren_loc" param, and write back to it.
1129 (c_parser_postfix_expression): Capture the closing
1130 parenthesis location for RID_CHOOSE_EXPR,
1131 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1132 RID_BUILTIN_SHUFFLE and use it to set the source range
1133 for such expressions; within RID_BUILTIN_COMPLEX set
1134 the underlying location.
1135
66189108
MP
11362015-12-07 Marek Polacek <polacek@redhat.com>
1137
1138 PR c/68668
1139 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1140 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1141
f187980b
EB
11422015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1143
1144 * c-tree.h (c_build_va_arg): Adjust prototype.
1145 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1146 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1147 parameter, adjust throughout and issue an error if EXPR is a component
1148 with reverse storage order.
1149
4250754e
JM
11502015-12-02 Jason Merrill <jason@redhat.com>
1151
1152 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1153 (c_fully_fold_internal, decl_constant_value_for_optimization):
1154 Move from c-common.c.
1155 * c-tree.h: Declare decl_constant_value_for_optimization.
1156 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1157
e9e32ee6
JM
11582015-12-02 Joseph Myers <joseph@codesourcery.com>
1159
1160 PR c/68162
1161 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1162 following link from declarator to next declarator. Track original
1163 qualified type and pass it to c_build_qualified_type.
1164 * c-typeck.c (c_build_qualified_type): Add arguments
1165 orig_qual_type and orig_qual_indirect.
1166
ff7a55bf
TS
11672015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1168
1169 * c-parser.c (c_parser_omp_clause_name)
1170 (c_parser_oacc_all_clauses): Alphabetical sorting.
1171
657e4e47
JJ
11722015-12-02 Jakub Jelinek <jakub@redhat.com>
1173
1174 PR c/68533
1175 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1176 for diagnostics.
1177
37d5ad46
JB
11782015-12-01 Julian Brown <julian@codesourcery.com>
1179 Cesar Philippidis <cesar@codesourcery.com>
1180 James Norris <James_Norris@mentor.com>
1181
1182 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1183 (c_parser_oacc_clause_use_device): New function.
1184 (c_parser_oacc_all_clauses): Add use_device support.
1185 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1186 (c_parser_oacc_host_data): New function.
1187 (c_parser_omp_construct): Add host_data support.
1188 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1189 * c-typeck.c (c_finish_oacc_host_data): New function.
1190 (c_finish_omp_clauses): Add use_device support.
1191
a4850ce9
JH
11922015-11-29 Jan Hubicka <hubicka@ucw.cz>
1193
1194 PR c/67106
1195 * c-decl.c: Set TYPE_PACKED in variants.
1196
b58d3df2
ML
11972015-11-27 Martin Liska <mliska@suse.cz>
1198
1199 PR c++/68312
1200 * c-array-notation.c (fix_builtin_array_notation_fn):
1201 Use release_vec_vec instead of vec::release.
1202 (build_array_notation_expr): Likewise.
1203 (fix_conditional_array_notations_1): Likewise.
1204 (fix_array_notation_expr): Likewise.
1205 (fix_array_notation_call_expr): Likewise.
1206
aec17bfe
JJ
12072015-11-27 Jakub Jelinek <jakub@redhat.com>
1208
1209 PR c/63326
1210 * c-parser.c (c_parser_compound_statement_nostart): If
1211 last_label is true, use pragma_stmt instead of pragma_compound
1212 as second c_parser_pragma argument.
1213 (c_parser_omp_ordered, c_parser_omp_target_update,
1214 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1215 false as second argument to c_parser_skip_to_pragma_eol after
1216 diagnosing standalone directives used in pragma_stmt context.
1217
688c4de0
IV
12182015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1219
1220 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1221 with "if (ENABLE_OFFLOADING)".
1222
cbd03aee
DM
12232015-11-23 David Malcolm <dmalcolm@redhat.com>
1224
1225 PR objc/68438
1226 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1227 for various Objective-C constructs: Class.name syntax,
1228 @selector(), @protocol(), @encode(), and [] message syntax.
1229
a87a86e1
DM
12302015-11-20 David Malcolm <dmalcolm@redhat.com>
1231
1232 PR 62314
1233 * c-typeck.c (should_suggest_deref_p): New function.
1234 (build_component_ref): Special-case POINTER_TYPE when
1235 generating a "not a structure of union" error message, and
1236 suggest a "->" rather than a ".", providing a fix-it hint.
1237
8ece8dfb
DM
12382015-11-19 David Malcolm <dmalcolm@redhat.com>
1239
1240 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1241 candidate into a new function, find_closest_identifier.
1242
433068cc
MP
12432015-11-19 Marek Polacek <polacek@redhat.com>
1244
1245 PR c/68412
1246 * c-typeck.c (parser_build_binary_op): Properly handle
1247 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1248
bef08b71
DM
12492015-11-17 David Malcolm <dmalcolm@redhat.com>
1250
1251 * c-parser.c (set_c_expr_source_range): Bulletproof both
1252 overloaded implementations against NULL expr->value.
1253 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1254 values.
1255 (c_parser_unary_expression): Likewise when handling addresses of
1256 labels.
1257 (c_parser_postfix_expression): Likewise for statement expressions,
1258 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1259 __builtin_va_arg, and for __builtin_offset_of.
1260 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1261 src_range using the range of the braced initializer.
1262 (c_parser_transaction_expression): Set src_range for "ret" to a
1263 sane pair of values.
1264
fff77217
KY
12652015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1266
1267 * c-parser.c (c_finish_omp_declare_simd): Look for
1268 "simd" attribute as well. Update error message.
1269
1d899da2
TS
12702015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1271
1272 * c-parser.c (c_parser_omp_declare_target): Adjust.
1273
e4606348
JJ
12742015-11-14 Jakub Jelinek <jakub@redhat.com>
1275
1276 * c-typeck.c (c_finish_omp_clauses): Don't mark
1277 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1278
3e636daf
MP
12792015-11-14 Marek Polacek <polacek@redhat.com>
1280
1281 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1282 * c-typeck.c: Likewise.
1283
ebedc9a3
DM
12842015-11-13 David Malcolm <dmalcolm@redhat.com>
1285
1286 * c-decl.c (warn_defaults_to): Pass line_table to
1287 rich_location ctor.
1288 * c-errors.c (pedwarn_c99): Likewise.
1289 (pedwarn_c90): Likewise.
1290 * c-parser.c (set_c_expr_source_range): New functions.
1291 (c_token::get_range): New method.
1292 (c_token::get_finish): New method.
1293 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1294 based on the range from the start of the LHS to the end of the
1295 RHS.
1296 (c_parser_conditional_expression): Likewise, based on the range
1297 from the start of the cond.value to the end of exp2.value.
1298 (c_parser_binary_expression): Call set_c_expr_source_range on
1299 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1300 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1301 based on the cast_loc through to the end of the expr.
1302 (c_parser_unary_expression): Likewise, based on the
1303 op_loc through to the end of op.
1304 (c_parser_sizeof_expression) Likewise, based on the start of the
1305 sizeof token through to either the closing paren or the end of
1306 expr.
1307 (c_parser_postfix_expression): Likewise, using the token range,
1308 or from the open paren through to the close paren for
1309 parenthesized expressions.
1310 (c_parser_postfix_expression_after_primary): Likewise, for
1311 various kinds of expression.
1312 * c-tree.h (struct c_expr): Add field "src_range".
1313 (c_expr::get_start): New method.
1314 (c_expr::get_finish): New method.
1315 (set_c_expr_source_range): New decls.
1316 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1317 on ret for prefix unary ops.
1318 (parser_build_binary_op): Likewise, running from the start of
1319 arg1.value through to the end of arg2.value.
1320
ec8b536f
MP
13212015-11-13 Marek Polacek <polacek@redhat.com>
1322
1323 PR c/68320
1324 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1325
277fe616
DM
13262015-11-13 David Malcolm <dmalcolm@redhat.com>
1327
1328 * c-typeck.c: Include spellcheck.h.
1329 (lookup_field_fuzzy_find_candidates): New function.
1330 (lookup_field_fuzzy): New function.
1331 (build_component_ref): If the field was not found, try using
1332 lookup_field_fuzzy and potentially offer a suggestion.
1333
6e232ba4
JN
13342015-11-12 James Norris <jnorris@codesourcery.com>
1335 Joseph Myers <joseph@codesourcery.com>
1336
1337 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1338 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1339 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1340 and PRAGMA_OMP_CLAUSE_LINK.
1341 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1342 and PRAGMA_OACC_CLAUSE_LINK.
1343 (OACC_DECLARE_CLAUSE_MASK): New definition.
1344 (c_parser_oacc_declare): New function.
1345
9be4f715
MP
13462015-11-12 Marek Polacek <polacek@redhat.com>
1347
1348 PR c/67784
1349 * c-parser.c (c_parser_for_statement): Reclassify the token in
1350 a correct scope.
1351
e78bede6
MP
13522015-11-11 Marek Polacek <polacek@redhat.com>
1353
1354 PR c/68107
1355 PR c++/68266
1356 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1357 checking the size of an array.
1358
69f293c9
AM
13592015-11-11 Andrew MacLeod <amacleod@redhat.com>
1360
1361 * c-array-notation.c: Remove unused header files.
1362 * c-aux-info.c: Likewise.
1363 * c-convert.c: Likewise.
1364 * c-decl.c: Likewise.
1365 * c-errors.c: Likewise.
1366 * c-lang.c: Likewise.
1367 * c-objc-common.c: Likewise.
1368 * c-parser.c: Likewise.
1369 * c-typeck.c: Likewise.
1370 * gccspec.c: Likewise.
1371
3a40d81d
NS
13722015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1373 Cesar Philippidis <cesar@codesourcery.com>
1374 James Norris <jnorris@codesourcery.com>
1375 Julian Brown <julian@codesourcery.com>
1376 Nathan Sidwell <nathan@codesourcery.com>
1377
1378 c/
1379 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1380 routine arg.
1381 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1382 (c_parser_pragma): Parse 'acc routine'.
1383 (OACC_ROUTINE_CLAUSE_MARK): Define.
1384 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1385
fc402eec
AA
13862015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1387
1388 PR debug/67192
1389 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1390 location of the backward-goto to the start of the loop body.
1391
f6b0b3db
AA
13922015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1393
1394 PR debug/67192
1395 * c-parser.c (c_parser_while_statement): Finish the loop before
1396 parsing ahead for misleading indentation.
1397 (c_parser_for_statement): Likewise.
1398
ee45a32d
EB
13992015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1400
1401 * c-decl.c (finish_struct): If the structure has reverse storage
1402 order, rewrite the type of array fields with scalar component. Call
1403 maybe_apply_pragma_scalar_storage_order on entry.
1404 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1405 errors on bit-fields and reverse SSO here and not...
1406 (c_mark_addressable): ...here.
1407 (output_init_element): Adjust call to initializer_constant_valid_p.
1408 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1409
8a645150
DM
14102015-11-06 David Malcolm <dmalcolm@redhat.com>
1411
1412 * c-decl.c (warn_defaults_to): Update for change in signature
1413 of diagnostic_set_info.
1414 * c-errors.c (pedwarn_c99): Likewise.
1415 (pedwarn_c90): Likewise.
1416 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1417 for textinfo::set_location.
1418
7a5e4956
CP
14192015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1420 Thomas Schwinge <thomas@codesourcery.com>
1421 James Norris <jnorris@codesourcery.com>
1422
1423 * c-parser.c (c_parser_omp_clause_name): Add support for
1424 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1425 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1426 default(none) in OpenACC.
1427 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1428 arguments.
1429 (c_parser_oacc_clause_tile): New function.
1430 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1431 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1432 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1433 TILE}.
1434 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1435 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1436 FIRSTPRIVATE}.
1437 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1438 (c_parser_oacc_update): Update the error message for missing clauses.
1439 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1440 and OMP_CLAUSE_INDEPENDENT.
1441
bfcfbfa0
MP
14422015-11-05 Marek Polacek <polacek@redhat.com>
1443
1444 PR c/68090
1445 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1446 deal with pre-evaluation on invalid types.
1447
e01d41e5
JJ
14482015-11-05 Jakub Jelinek <jakub@redhat.com>
1449 Ilya Verbin <ilya.verbin@intel.com>
1450
1451 * c-parser.c: Include context.h and gimple-expr.h.
1452 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1453 monotonic together with nonmonotonic.
1454 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1455 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1456 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1457 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1458 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1459 expressions on combined target teams before the target.
1460 (c_parser_omp_declare_target): If decl has "omp declare target" or
1461 "omp declare target link" attribute, and cgraph or varpool node already
1462 exists, then set corresponding flags. Call c_finish_omp_clauses
1463 in the parenthesized extended-list syntax case.
1464 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1465 declare target.
1466 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1467 on OMP_CLAUSE_REDUCTION array sections.
1468 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1469 into the constant offset, or for variable low-bound using
1470 POINTER_PLUS_EXPR. For structure element based array sections use
1471 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1472 (c_finish_omp_clauses): Drop generic_field_head, structure
1473 elements are now always mapped even as array section bases,
1474 diagnose same var in data sharing and mapping clauses. Diagnose if
1475 linear step on declare simd is neither a constant nor a uniform
1476 parameter. Look through POINTER_PLUS_EXPR for array section
1477 reductions. Diagnose the same var or function appearing multiple
1478 times on the same directive. Fix up wording for the to clause if t
1479 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1480 modifier on kinds other than dynamic or guided or nonmonotonic
1481 modifier together with ordered clause.
1482
4bf9e5a8
TS
14832015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1484 Chung-Lin Tang <cltang@codesourcery.com>
1485
1486 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1487
2adfab87
AM
14882015-10-29 Andrew MacLeod <amacleod@redhat.com>
1489
1490 * c-array-notation.c: Reorder #include's and remove duplicates.
1491 * c-aux-info.c: Likewise.
1492 * c-convert.c: Likewise.
1493 * c-decl.c: Likewise.
1494 * c-errors.c: Likewise.
1495 * c-lang.c: Likewise.
1496 * c-objc-common.c: Likewise.
1497 * c-parser.c: Likewise.
1498 * c-typeck.c: Likewise.
1499
e922069e
JW
15002015-10-26 Jim Wilson <jim.wilson@linaro.org>
1501
1502 PR debug/66068
1503 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1504 after calling build_qualified_type.
1505
765dd391
CP
15062015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1507 Thomas Schwinge <thomas@codesourcery.com>
1508 James Norris <jnorris@codesourcery.com>
1509 Joseph Myers <joseph@codesourcery.com>
1510 Julian Brown <julian@codesourcery.com>
1511 Bernd Schmidt <bschmidt@redhat.com>
1512
1513 * c-parser.c (c_parser_oacc_shape_clause): New.
1514 (c_parser_oacc_simple_clause): New.
1515 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1516 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1517
88bae6f4
TS
15182015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1519 James Norris <jnorris@codesourcery.com>
1520 Cesar Philippidis <cesar@codesourcery.com>
1521
1522 PR c/64765
1523 PR c/64880
1524 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1525 parameters, and handle these. Adjust all users.
1526 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1527 into...
1528 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1529 all users.
1530 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1531 declare functions.
1532 (c_finish_omp_construct): Declare function.
1533 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1534 Merge functions into...
1535 (c_finish_omp_construct): ... this new function.
1536
a8fc2579
RB
15372015-10-22 Richard Biener <rguenther@suse.de>
1538
1539 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1540 before folding a MINUS_EXPR.
1541
e9122ef6
MP
15422015-10-21 Marek Polacek <polacek@redhat.com>
1543
1544 PR c/68024
1545 * c-decl.c (start_function): Warn about vararg functions without
1546 a prototype.
1547
9f47c7e5
IE
15482015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1549
1550 * c-typeck.c (build_conditional_expr): Use boolean vector
1551 type for vector comparison.
1552 (build_vec_cmp): New.
1553 (build_binary_op): Use build_vec_cmp for comparison.
1554
fa60eeb9
MP
15552015-10-20 Marek Polacek <polacek@redhat.com>
1556
1557 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1558
2c7020eb
MP
15592015-10-20 Marek Polacek <polacek@redhat.com>
1560
1561 PR c/67964
1562 * c-parser.c (c_parser_attributes): Break out of the loop if the
1563 token after an attribute isn't a comma.
1564
d9a6bd32
JJ
15652015-10-13 Jakub Jelinek <jakub@redhat.com>
1566 Aldy Hernandez <aldyh@redhat.com>
1567
1568 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1569 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1570 (c_parser_omp_variable_list): Handle structure elements for
1571 map, to and from clauses. Handle array sections in reduction
1572 clause. Formatting fixes.
1573 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1574 if clause modifiers.
1575 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1576 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1577 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1578 c_parser_omp_clause_is_device_ptr): New functions.
1579 (c_parser_omp_clause_ordered): Parse optional parameter.
1580 (c_parser_omp_clause_reduction): Handle array reductions.
1581 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1582 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1583 functions.
1584 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1585 (c_parser_omp_clause_depend_sink): New function.
1586 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1587 (c_parser_omp_clause_map): Parse release/delete map kinds and
1588 optional always modifier.
1589 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1590 and c_finish_omp_clauses callers.
1591 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1592 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1593 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1594 (OMP_CRITICAL_CLAUSE_MASK): Define.
1595 (c_parser_omp_critical): Parse critical clauses.
1596 (c_parser_omp_for_loop): Handle doacross loops, adjust
1597 c_finish_omp_for and c_finish_omp_clauses callers.
1598 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1599 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1600 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1601 (c_parser_omp_for): Disallow ordered clause when combined with
1602 distribute. Disallow linear clause when combined with distribute
1603 and not combined with simd.
1604 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1605 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1606 parse clauses and if depend clause is found, don't parse a body.
1607 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1608 Allow target parallel without for after it.
1609 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1610 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1611 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1612 invalid kinds.
1613 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1614 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1615 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1616 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1617 functions.
1618 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1619 defaultmap and is_device_ptr clauses.
1620 (c_parser_omp_target): Parse target parallel and target simd. Set
1621 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1622 and target exit data. Diagnose invalid map kinds.
1623 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1624 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1625 construct.
1626 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1627 &omp_priv.
1628 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1629 (c_parser_omp_taskloop): New function.
1630 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1631 handle PRAGMA_OMP_TASKLOOP.
1632 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1633 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1634 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1635 Add IS_OMP argument, handle structure element bases, diagnose
1636 bitfields, pass IS_OMP recursively, diagnose known zero length
1637 array sections in depend clauses, handle array sections in reduction
1638 clause, diagnose negative length even for pointers.
1639 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1640 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1641 array sections in reduction clause, set
1642 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1643 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1644 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1645 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1646
21ba0cea
MP
16472015-10-06 Marek Polacek <polacek@redhat.com>
1648
1649 * c-parser.c (c_parser_statement_after_labels): Use
1650 protected_set_expr_location.
1651 (c_parser_omp_clause_num_gangs): Likewise.
1652 (c_parser_omp_clause_num_threads): Likewise.
1653 (c_parser_omp_clause_num_workers): Likewise.
1654 (c_parser_omp_clause_vector_length): Likewise.
1655 (c_parser_omp_clause_num_teams): Likewise.
1656 (c_parser_omp_clause_thread_limit): Likewise.
1657 * c-typeck.c (build_c_cast): Likewise.
1658 (c_cast_expr): Likewise.
1659
624d31fe
RS
16602015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1661
1662 * c-typeck.c (c_tree_equal): Use real_equal instead of
1663 REAL_VALUES_EQUAL.
1664
b8fd7909
JM
16652015-10-04 Jason Merrill <jason@redhat.com>
1666
1667 * c-parser.c (c_lex_one_token): Handle @synchronized.
1668 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1669 can change whether the function is transaction_safe.
1670
1c7485af
MP
16712015-10-02 Marek Polacek <polacek@redhat.com>
1672
1673 PR c/67730
1674 * c-typeck.c (convert_for_assignment): Use the expansion point
1675 location throughout.
1676
3e3b8d63
MP
16772015-10-02 Marek Polacek <polacek@redhat.com>
1678
1679 PR c/64249
1680 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1681 and pass it down to c_parser_if_statement.
1682 (c_parser_else_body): Add CHAIN parameter and pass it down to
1683 c_parser_statement_after_labels.
1684 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1685 duplicated if-else-if conditions.
1686
aabef2de
MP
16872015-10-01 Marek Polacek <polacek@redhat.com>
1688
1689 * c-typeck.c (convert_for_assignment): Improve commentary.
1690
de8ddd5f
MP
16912015-09-30 Marek Polacek <polacek@redhat.com>
1692
1693 PR c/67730
1694 * c-typeck.c (c_finish_return): Use the expansion point location for
1695 certain "return with value" warnings.
1696
c4914de6
MLI
16972015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1698
1699 * c-parser.c (pragma_lex): Add loc argument.
1700
0e36f5c7
MP
17012015-09-15 Marek Polacek <polacek@redhat.com>
1702
1703 PR c/67580
1704 * c-decl.c (tag_exists_p): New function.
1705 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1706 struct/union/enum keywords are missing.
1707 * c-tree.h (tag_exists_p): Declare.
1708
2f3bb934
MP
17092015-09-15 Marek Polacek <polacek@redhat.com>
1710
1711 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1712 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1713 Return NULL_TREE instead of 0.
1714 (lookup_name): Return NULL_TREE instead of 0.
1715 (lookup_name_in_scope): Likewise.
1716 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1717 (parser_xref_tag): Use false instead of 0.
1718 (start_struct): Use true instead of 1.
1719 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1720
aa256c4a
MP
17212015-09-14 Marek Polacek <polacek@redhat.com>
1722
1723 * c-typeck.c (set_nonincremental_init_from_string): Use
1724 HOST_WIDE_INT_M1U when shifting a negative value.
1725
dbb68221
MW
17262015-09-09 Mark Wielaard <mjw@redhat.com>
1727
1728 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1729 parm against NULL.
1730
a8a098ac
JJ
17312015-09-10 Jakub Jelinek <jakub@redhat.com>
1732
1733 PR c/67502
1734 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1735 into OMP_FOR_PRE_BODY rather than before the loop.
1736
f4b189d5
JJ
17372015-09-09 Jakub Jelinek <jakub@redhat.com>
1738
0bb99c11
JJ
1739 PR c/67501
1740 * c-parser.c (c_parser_oacc_all_clauses,
1741 c_parser_omp_all_clauses): Remove invalid clause from
1742 list of clauses even if parser->error is set.
1743
fce5e5e3
JJ
1744 PR c/67500
1745 * c-parser.c (c_parser_omp_clause_aligned,
1746 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1747 test for errors.
1748 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1749 error_mark_node.
1750
f4b189d5
JJ
1751 PR c/67495
1752 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1753 instead of c_parser_unary_expression. If the result is !lvalue_p,
1754 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1755
b2aaf235
MP
17562015-09-04 Marek Polacek <polacek@redhat.com>
1757
1758 PR sanitizer/67279
1759 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1760
1807ffc1
MS
17612015-09-03 Martin Sebor <msebor@redhat.com>
1762
1763 PR c/66516
8b652e65
JJ
1764 * c-typeck.c (convert_arguments, parser_build_unary_op,
1765 build_conditional_expr, c_cast_expr, convert_for_assignment,
1766 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1767 reject_gcc_builtin.
1768 (c_decl_implicit): Define.
1769
d04ff417
MP
17702015-09-02 Marek Polacek <polacek@redhat.com>
1771
1772 PR c/67432
1773 * c-parser.c (c_parser_enum_specifier): Give a better error for
1774 an empty enum.
1775
a79683d5
TS
17762015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1777
1778 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1779
191a6b94
MP
17802015-08-12 Marek Polacek <polacek@redhat.com>
1781
1782 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1783 LOC to it.
1784
420a9d9b
MP
17852015-08-03 Marek Polacek <polacek@redhat.com>
1786
1787 PR c/67088
1788 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1789 Use it.
1790 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1791
992118a1
PP
17922015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1793
1794 * c-parser.c (c_parser_if_body): Take token_indent_info
1795 argument. Call warn_for_misleading_indentation even when the
1796 body is a semicolon. Extract token_indent_infos corresponding
1797 to the guard, body and next tokens. Adjust call to
1798 warn_for_misleading_indentation accordingly.
1799 (c_parser_else_body): Likewise.
1800 (c_parser_if_statement): Likewise.
1801 (c_parser_while_statement): Likewise.
1802 (c_parser_for_statement): Likewise.
1803
46308474
LFSM
18042015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1805 Manuel López-Ibáñez <manu@gcc.gnu.org>
1806
1807 * c-decl.c (get_parm_info): Remove static var. Update warning
1808 message.
1809
05b28fd6
MP
18102015-07-27 Marek Polacek <polacek@redhat.com>
1811
1812 PR c++/66555
1813 PR c/54979
1814 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1815
451b5e48
MP
18162015-07-20 Marek Polacek <polacek@redhat.com>
1817
1818 PR c++/55095
1819 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1820 (build_binary_op): Warn about left shift overflows.
1821
1916bcb5
AM
18222015-07-09 Andrew MacLeod <amacleod@redhat.com>
1823
1824 * c-array-notation.c: Adjust includes for flags.h changes.
1825 * c-objc-common.c: Likewise.
1826
c7131fb2
AM
18272015-07-07 Andrew MacLeod <amacleod@redhat.com>
1828
1829 * c-array-notation.c: Adjust includes.
1830 * c-aux-info.c: Likewise.
1831 * c-convert.c: Likewise.
1832 * c-decl.c: Likewise.
1833 * c-errors.c: Likewise.
1834 * c-lang.c: Likewise.
1835 * c-objc-common.c: Likewise.
1836 * c-parser.c: Likewise.
1837 * c-typeck.c: Likewise.
1838
da2e71c9
MLI
18392015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1840
1841 PR fortran/66605
1842 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1843
b155cfd9
MP
18442015-06-29 Marek Polacek <polacek@redhat.com>
1845
1846 PR c/66322
1847 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1848 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1849 about -Wswitch-bool here.
1850 (do_case): Update c_add_case_label call.
1851 (c_finish_case): Update c_do_switch_warnings call.
1852
31521951
MP
18532015-06-27 Marek Polacek <polacek@redhat.com>
1854
1855 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1856
22d03525
MP
18572015-06-26 Marek Polacek <polacek@redhat.com>
1858
1859 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1860 INDIRECT_REF_P.
1861 * c-typeck.c (array_to_pointer_conversion): Likewise.
1862 (build_unary_op): Likewise.
1863 (c_finish_return): Likewise.
1864
f0889939
AM
18652015-06-25 Andrew MacLeod <amacleod@redhat.com>
1866
1867 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1868 * c-parser.c: Likewise.
1869
8d67ee55
RS
18702015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1871
1872 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1873 instead of pointer_hash.
1874 (detect_field_duplicates): Likewise.
1875
0ae9bd27
MP
18762015-06-25 Marek Polacek <polacek@redhat.com>
1877
1878 * c-array-notation.c: Use VAR_P throughout.
1879 * c-decl.c: Likewise.
1880 * c-objc-common.c: Likewise.
1881 * c-parser.c: Likewise.
1882 * c-typeck.c: Likewise.
1883
62f9079a
MP
18842015-06-25 Marek Polacek <polacek@redhat.com>
1885
1886 * c-decl.c: Use is_global_var throughout.
1887 * c-parser.c: Likewise.
1888 * c-typeck.c: Likewise.
1889
abb226c9
AM
18902015-06-17 Andrew MacLeod <amacleod@redhat.com>
1891
1892 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1893 * c-aux-info.c: Likewise.
1894 * c-convert.c: Likewise.
1895 * c-decl.c: Likewise.
1896 * c-errors.c: Likewise.
1897 * c-lang.c: Likewise.
1898 * c-objc-common.c: Likewise.
1899 * c-parser.c: Likewise.
1900 * c-typeck.c: Likewise.
1901
8cbababc
JH
19022015-06-11 Jan Hubicka <hubicka@ucw.cz>
1903
1904 PR middle-end/66325
1905 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1906 variants.
1907
a0349665
PMR
19082015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1909
1910 * c-decl.c (pop_scope): Register the main translation unit
1911 through the new debug hook.
1912
13fdf2e2
AM
19132015-06-08 Andrew MacLeod <amacleod@redhat.com>
1914
1915 * c-array-notation.c : Adjust include files.
1916 * c-aux-info.c : Likewise.
1917 * c-convert.c : Likewise.
1918 * c-decl.c : Likewise.
1919 * c-errors.c : Likewise.
1920 * c-lang.c : Likewise.
1921 * c-lang.h : Likewise.
1922 * c-objc-common.c : Likewise.
1923 * c-parser.c : Likewise.
1924 * c-typeck.c : Likewise.
1925
d7438551
AH
19262015-06-05 Aldy Hernandez <aldyh@redhat.com>
1927
1928 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1929 immediately clobber it.
1930 (c_write_global_declarations_1): Remove call to
1931 check_global_declaration_1.
1932 (c_write_global_declarations_2): Remove.
1933 (c_write_final_cleanups): Rename from c_write_global_declarations.
1934 Remove call to finalize_compilation_unit.
1935 Remove calls to debugging hooks.
1936 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1937 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1938 * c-tree.h: Remove c_write_global_declarations.
1939
ecb9f223
AM
19402015-06-04 Andrew MacLeod <amacleod@redhat.com>
1941
1942 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1943 * c-aux-info.c: Likewise.
1944 * c-convert.c: Likewise.
1945 * c-decl.c: Likewise.
1946 * c-errors.c: Likewise.
1947 * c-lang.c: Likewise.
1948 * c-objc-common.c: Likewise.
1949 * c-parser.c: Likewise.
1950 * c-typeck.c: Likewise.
1951
9482b620
MP
19522015-06-04 Marek Polacek <polacek@redhat.com>
1953
1954 PR c/66341
1955 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1956 it is a lvalue.
1957
bc51ace3
PK
19582015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1959
1960 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1961 Warn for empty struct.
1962 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1963
ea5b45b6
AT
19642015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1965
1966 * c-decl.c (start_function): Call plugin before parsing.
1967 (finish_function): Call plugin after parsing.
1968
c2d47482
PK
19692015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1970
1971 PR c/49551
1972 * c-decl.c (merge_decls): Merge DECL_COMMON.
1973
a95492ab
JW
19742015-05-22 Jim Wilson <jim.wilson@linaro.org>
1975
1976 * Make-lang.in (check_gcc_pallelize): Define.
1977
fd5c817a
MP
19782015-05-22 Marek Polacek <polacek@redhat.com>
1979
1980 PR c/47043
1981 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1982 attributes.
1983
c7b70a3c
MP
19842015-05-21 Marek Polacek <polacek@redhat.com>
1985
1986 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1987 DECL_BUILT_IN.
1988
21b634ae
MP
19892015-05-20 Marek Polacek <polacek@redhat.com>
1990
1991 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1992 * c-typeck.c: Likewise.
1993
296a8c2f
MP
19942015-05-19 Marek Polacek <polacek@redhat.com>
1995
1996 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1997
41b37d5e
JJ
19982015-05-19 Jakub Jelinek <jakub@redhat.com>
1999
2000 PR middle-end/66199
2001 * c-parser.c (c_parser_omp_for_loop): Don't add
2002 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
2003 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
2004 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
2005 constructs.
2006
fab27f52
MM
20072015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
2008
2009 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 2010 swaps.
fab27f52 2011
40de31cf
MLI
20122015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2013
2014 PR fortran/44054
2015 * c-objc-common.c (c_tree_printer): Replace locus pointer with
2016 accessor function.
2017
3aa3c9fc
MP
20182015-05-14 Marek Polacek <polacek@redhat.com>
2019
2020 PR c/66066
2021 PR c/66127
2022 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
2023 rather than with 0.
2024
c3388e62
DM
20252015-05-12 David Malcolm <dmalcolm@redhat.com>
2026
2027 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
2028 to add a call to warn_for_misleading_indentation.
2029 (c_parser_else_body): Likewise, adding param "else_loc".
2030 (c_parser_if_statement): Check for misleading indentation.
2031 (c_parser_while_statement): Likewise.
2032 (c_parser_for_statement): Likewise.
2033
755e528f
MP
20342015-05-08 Marek Polacek <polacek@redhat.com>
2035
2036 PR c/64918
2037 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
2038 (output_init_element): Likewise.
2039
0173bd2a
MP
20402015-05-07 Marek Polacek <polacek@redhat.com>
2041
2042 PR c/65179
2043 * c-typeck.c (build_binary_op): Warn when left shifting a negative
2044 value.
2045
9babc352
MP
20462015-04-30 Marek Polacek <polacek@redhat.com>
2047
2048 * c-typeck.c (set_init_label): Call error_at instead of error and
2049 pass LOC to it.
2050
ac9f18db
MP
2051 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
2052 the type of a decl.
2053
ec3fba51
MP
2054 * c-typeck.c (c_build_va_arg): Clarify the error message.
2055
b811915d
TS
20562015-04-29 Thomas Schwinge <thomas@codesourcery.com>
2057
2058 * c-parser.c (c_parser_oacc_enter_exit_data): Use
2059 OMP_STANDALONE_CLAUSES.
2060
f3075008
MP
20612015-04-28 Marek Polacek <polacek@redhat.com>
2062
2063 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
2064
4e81b788
MP
20652015-04-28 Marek Polacek <polacek@redhat.com>
2066
2067 PR c/65901
2068 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
2069
6c1db78e
MP
20702015-04-25 Marek Polacek <polacek@redhat.com>
2071
2072 PR c/52085
2073 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2074 attribute.
2075
5c4abbb8
MP
20762015-04-23 Marek Polacek <polacek@redhat.com>
2077
2078 PR c/65345
2079 * c-decl.c (set_labels_context_r): New function.
2080 (store_parm_decls): Call it via walk_tree_without_duplicates.
2081 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2082 instead of create_tmp_var. Build TARGET_EXPR instead of
2083 COMPOUND_EXPR.
2084 (build_atomic_assign): Use create_tmp_var_raw instead of
2085 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2086
06aca1d5
IV
20872015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2088
2089 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2090 (c_parser_omp_target_update): Add missed %> to error_at ().
2091
8fba1830
BRF
20922015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2093
2094 PR target/55143
2095 * c-decl.c (c_default_pointer_mode): Remove definition.
2096 * c-tree.h (c_default_pointer_mode): Remove declaration.
2097
62021f64
TB
20982015-03-27 Tobias Burnus <burnus@net-b.de>
2099
2100 PR c/65586
2101 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2102 error out.
2103 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2104 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2105 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2106
9b65e171
JJ
21072015-03-19 Jakub Jelinek <jakub@redhat.com>
2108
2109 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2110 attribute for DECL_EXTERNAL VAR_DECLs.
2111
17958621
JJ
21122015-03-11 Jakub Jelinek <jakub@redhat.com>
2113
2114 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2115 argument.
2116
7ccb1a11
JJ
21172015-03-10 Jakub Jelinek <jakub@redhat.com>
2118
2119 PR c/65120
2120 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2121 before preparing arguments to warn_logical_not_parentheses.
2122
01177669
JJ
21232015-03-09 Jakub Jelinek <jakub@redhat.com>
2124
2125 PR c/65120
2126 * c-typeck.c (parser_build_binary_op): Don't warn for
2127 !!x == y or !b == y where b is _Bool.
2128
802ac282
MP
21292015-03-09 Marek Polacek <polacek@redhat.com>
2130
2131 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2132 * c-decl.c (grokdeclarator): Likewise.
2133 * c-typeck.c (build_binary_op): Likewise.
2134
e5165b60
MP
21352015-02-27 Marek Polacek <polacek@redhat.com>
2136
2137 PR c/65228
2138 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2139
065d214c
MP
21402015-02-14 Marek Polacek <polacek@redhat.com>
2141
2142 PR c/64768
2143 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2144 declared through a typedef name.
2145
e5d9235b
MP
21462015-02-13 Marek Polacek <polacek@redhat.com>
2147
2148 PR c/65050
2149 * c-decl.c (grokdeclarator): Print also the type when giving
2150 the error message about array's incomplete element type.
2151
fa01ffcc
JJ
21522015-02-11 Jakub Jelinek <jakub@redhat.com>
2153
2154 PR c/64824
2155 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2156 check in the POP macro.
2157
c3e38a03
MP
21582015-02-09 Marek Polacek <polacek@redhat.com>
2159
2160 PR c/64856
2161 * c-typeck.c (process_init_element): Don't always wrap
2162 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2163 initializing a range of elements.
2164
4886ec8e
JJ
21652015-02-04 Jakub Jelinek <jakub@redhat.com>
2166
2167 PR c/64824
2168 PR c/64868
2169 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2170
c3e38a03 21712015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2172
2173 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2174 processing enum declaration.
2175
7b33f0c8
MP
21762015-01-29 Marek Polacek <polacek@redhat.com>
2177
2178 PR c/64709
2179 * c-typeck.c (pop_init_level): If constructor_elements has
2180 exactly one element with integer_zerop value, set constructor_zeroinit
2181 to 1. Remove braces around warning_init call.
2182
dea63e49
JJ
21832015-01-27 Jakub Jelinek <jakub@redhat.com>
2184
2185 PR c/64766
2186 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2187 of FUNCTION_DECLs with error_mark_node.
2188
d38f7dce
JJ
21892015-01-26 Jakub Jelinek <jakub@redhat.com>
2190
2191 PR c/64778
2192 * c-typeck.c (convert_arguments): Return -1 if there are
2193 error_args, even if we've diagnosed too many arguments.
2194
cbf5d0e7
RB
21952015-01-21 Richard Biener <rguenther@suse.de>
2196
2197 PR middle-end/64313
2198 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2199 for builtins the user declared correctly.
2200
41dbbb37
TS
22012015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2202 Bernd Schmidt <bernds@codesourcery.com>
2203 Cesar Philippidis <cesar@codesourcery.com>
2204 James Norris <jnorris@codesourcery.com>
2205 Jakub Jelinek <jakub@redhat.com>
2206 Ilmir Usmanov <i.usmanov@samsung.com>
2207
2208 * c-parser.c: Include "gomp-constants.h".
2209 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2210 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2211 Use OMP_CLAUSE_SET_MAP_KIND.
2212 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2213 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2214 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2215 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2216 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2217 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2218 "copyout", "create", "delete", "deviceptr", "gang", "host",
2219 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2220 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2221 "present_or_create", "pcreate", "seq", "self", "vector",
2222 "vector_length", "wait", "worker".
2223 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2224 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2225 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2226 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2227 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2228 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2229 (c_parser_oacc_data_clause_deviceptr)
2230 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2231 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2232 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2233 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2234 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2235 (c_parser_oacc_parallel, c_parser_oacc_update)
2236 (c_parser_oacc_wait): New functions.
2237 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2238 (c_finish_oacc_data): New prototypes.
2239 * c-typeck.c: Include "gomp-constants.h".
2240 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2241 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2242 OMP_CLAUSE_SET_MAP_KIND.
2243 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2244 (c_finish_oacc_data): New functions.
2245 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2246 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2247 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2248 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2249 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2250 GOMP_MAP_FORCE_DEVICEPTR.
2251
adfac8df
JJ
22522015-01-09 Michael Collison <michael.collison@linaro.org>
2253
2254 * c-array-notation.c: Include hash-set.h, machmode.h,
2255 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2256 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2257 * c-aux-info.c: Ditto.
2258 * c-convert.c: Ditto.
2259 * c-decl.c: Ditto.
2260 * c-errors.c: Ditto.
2261 * c-lang.c: Dittoxs.
2262 * c-objc-common.c: Ditto.
2263 * c-parser.c: Ditto.
2264 * c-typeck.c: Include hash-set.h, machmode.h,
2265 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2266 fold-const.h, wide-int.h, inchash.h, real.h and
2267 fixed-value.h due to flattening of tree.h.
2268
2cc901dc
MP
22692015-01-07 Marek Polacek <polacek@redhat.com>
2270
2271 PR c/64417
2272 * c-typeck.c (process_init_element): Disallow initialization of
2273 a flexible array member with a string constant if the structure
2274 is in an array.
2275
5624e564
JJ
22762015-01-05 Jakub Jelinek <jakub@redhat.com>
2277
e5341100
JJ
2278 PR sanitizer/64344
2279 * c-typeck.c (convert_for_assignment, c_finish_return): For
2280 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2281 types also set in_late_binary_op around convert call.
2282 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2283 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2284 result on expr as last argument to ubsan_instrument_float_cast,
2285 if in_late_binary_op, don't use c_save_expr but save_expr.
2286
5624e564
JJ
2287 Update copyright years.
2288
5bd012f8
MP
22892015-01-05 Marek Polacek <polacek@redhat.com>
2290
2291 PR c/64423
2292 * c-typeck.c (build_array_ref): Pass loc down to
2293 warn_array_subscript_with_type_char.
2294
3f8257db 22952014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2296
2297 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2298 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2299 element type.
8e745a17 2300 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2301 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2302 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2303 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2304 to PEDWARN_FOR_QUALIFIERS.
768952be 2305
8f94a8c4
JJ
23062014-12-17 Jakub Jelinek <jakub@redhat.com>
2307
2308 PR sanitizer/64289
2309 * c-convert.c: Include ubsan.h.
2310 (convert): For real -> integral casts and
2311 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2312 instead instrument the float cast directly.
2313
b731b390
JJ
23142014-11-29 Jakub Jelinek <jakub@redhat.com>
2315
2316 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2317 c_finish_stmt_expr): Remove NULL last argument from
2318 create_tmp_var_raw and create_tmp_var calls.
2319 * c-array-notation.c (fix_builtin_array_notation_fn,
2320 build_array_notation_expr, fix_conditional_array_notations_1,
2321 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2322
541e35a6
MP
23232014-11-28 Marek Polacek <polacek@redhat.com>
2324
2325 PR c/63862
2326 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2327 convert the right operand to integer type.
2328
b286be94
MP
23292014-11-25 Marek Polacek <polacek@redhat.com>
2330
2331 PR c/63877
2332 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2333 for inline functions.
2334
aa7da51a
JJ
23352014-11-21 Jakub Jelinek <jakub@redhat.com>
2336
2337 PR target/63764
2338 * c-typeck.c (build_array_ref): Adjust
2339 convert_vector_to_pointer_for_subscript caller. If it returns true,
2340 call non_lvalue_loc on the result.
2341
d876207f
RB
23422014-11-11 Richard Biener <rguenther@suse.de>
2343
2344 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2345 to true.
2346
e5e44252
AK
23472014-11-10 Andi Kleen <ak@linux.intel.com>
2348
2349 PR c/60804
2350 * c-parser.c (c_parser_statement_after_labels): Call
2351 check_no_cilk.
2352 (c_parser_if_statement): Dito.
2353 (c_parser_switch_statement): Dito.
2354 (c_parser_while_statement): Dito.
2355 (c_parser_do_statement): Dito.
2356 (c_parser_for_statement): Dito.
2357 * c-typeck.c (c_finish_loop): Dito.
2358
13c21655
PC
23592014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2360
2361 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2362 OPT_Wshift_count_overflow in the warnings.
2363
2d51fcef
MP
23642014-10-30 Marek Polacek <polacek@redhat.com>
2365
2366 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2367 print the stripped version as well, if they're not the same.
2368
ef4bddc2
RS
23692014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2370
2371 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2372 machine_mode.
2373
c582198b
AM
23742014-10-28 Andrew MacLeod <amacleod@redhat.com>
2375
2376 * c-decl.c: Adjust include files.
2377 * c-parser.c: Ditto.
2378
ddc8de03
PM
23792014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2380 Tom Tromey <tromey@redhat.com>
2381
2382 * c-tree.h (enum c_oracle_request): New.
2383 (c_binding_oracle_function): New typedef.
2384 (c_binding_oracle, c_pushtag, c_bind): Declare.
2385 * c-decl.c (c_binding_oracle): New global.
2386 (I_SYMBOL_CHECKED): New macro.
2387 (i_symbol_binding): New function.
2388 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2389 (I_TAG_CHECKED): New macro.
2390 (i_tag_binding): New function.
2391 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2392 (I_LABEL_CHECKED): New macro.
2393 (i_label_binding): New function.
2394 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2395 (c_print_identifier): Save and restore c_binding_oracle.
2396 (c_pushtag, c_bind): New functions.
2397
60393bbc
AM
23982014-10-27 Andrew MacLeod <amacleod@redhat.com>
2399
2400 * c-typeck.c: Adjust include files.
2401
d723bb7c
MLI
24022014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2403
2404 PR c++/53061
2405 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2406 initialization here...
2407 (c_initialize_diagnostics): ... but here. Set defaults after
2408 building pretty-printer.
2409
1bc5a451
MP
24102014-10-23 Marek Polacek <polacek@redhat.com>
2411
2412 PR c/63626
2413 * c-decl.c (pop_scope): Don't print warning in external_scope.
2414
4435bb92
MP
24152014-10-19 Marek Polacek <polacek@redhat.com>
2416
2417 PR c/63567
2418 * c-typeck.c (output_init_element): Allow initializing objects with
2419 static storage duration with compound literals even in C99 and add
2420 pedwarn for it.
2421
7278465e
MP
24222014-10-17 Marek Polacek <polacek@redhat.com>
2423
2424 PR c/63567
2425 * c-typeck.c (digest_init): Allow initializing objects with static
2426 storage duration with compound literals even in C99 and add pedwarn
2427 for it.
2428
d9b7be2e
MP
24292014-10-17 Marek Polacek <polacek@redhat.com>
2430
2431 PR c/63543
2432 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2433 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2434 error multiple times. Print the type.
2435
f406ae1f
MP
24362014-10-17 Marek Polacek <polacek@redhat.com>
2437
2438 PR c/63549
2439 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2440 type.
2441
92574c7c
MP
24422014-10-17 Marek Polacek <polacek@redhat.com>
2443
2444 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2445 (start_function): Use OPT_Wimplicit_int instead of 0.
2446 (store_parm_decls_oldstyle): Likewise.
2447
1bc4a978
MT
24482014-10-17 Alan Modra <amodra@gmail.com>
2449
2450 PR middle-end/61848
2451 * c-decl.c (merge_decls): Don't merge section name or tls model
2452 to newdecl symtab node, instead merge to olddecl. Override
2453 existing olddecl section name. Set tls_model for all thread-local
2454 vars, not just OMP thread-private ones. Remove incorrect comment.
2455
83685514
AM
24562014-10-16 Andrew MacLeod <amacleod@redhat.com>
2457
2458 * c-decl.c: Adjust include files.
2459
78a7c317
DD
24602014-10-14 DJ Delorie <dj@redhat.com>
2461
2462 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2463 (c_token_starts_typename): Check all __intN, not just __int128.
2464 (c_token_starts_declspecs): Likewise.
2465 (c_parser_declspecs): Likewise.
2466 (c_parser_attribute_any_word): Likewise.
2467 (c_parser_objc_selector): Likewise.
2468 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2469 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2470 is specified.
2471 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2472 __int128.
2473 (finish_declspecs): Likewise.
2474
74d98c1e
AB
24752014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2476
8e745a17 2477 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 2478 the duplicate code.
8e745a17 2479 (c_parser_statement): Call the new function.
74d98c1e 2480
84937de2
MP
24812014-10-09 Marek Polacek <polacek@redhat.com>
2482
2483 PR c/63480
2484 * c-typeck.c (pop_init_level): Don't warn about initializing
2485 with { }.
2486
0382aaa0
MP
24872014-10-07 Marek Polacek <polacek@redhat.com>
2488
2489 PR c/59717
2490 * c-decl.c (header_for_builtin_fn): New function.
2491 (implicitly_declare): Suggest which header to include.
2492
7a0ca710
MP
24932014-10-07 Marek Polacek <polacek@redhat.com>
2494
2495 * c-convert.c (convert): Use error_operand_p.
2496 * c-typeck.c (require_complete_type): Likewise.
2497 (really_atomic_lvalue): Likewise.
2498 (digest_init): Likewise.
2499 (handle_omp_array_sections_1): Likewise.
2500
6bc8a126
MP
25012014-10-03 Marek Polacek <polacek@redhat.com>
2502
2503 PR c/63453
2504 * c-decl.c (pop_scope): Don't warn about "inline function declared
2505 but never defined" for functions marked with gnu_inline attribute.
2506
d90c0a59
JJ
25072014-09-25 Jakub Jelinek <jakub@redhat.com>
2508
2509 PR c++/63249
2510 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2511 on low_bound and length.
2512
083e891e
MP
25132014-09-24 Marek Polacek <polacek@redhat.com>
2514
2515 PR c/61405
2516 PR c/53874
2517 * c-parser.c: Don't define CPP_KEYWORD.
2518 (c_parser_switch_statement): Pass original type to c_finish_case.
2519 * c-tree.h (c_finish_case): Update declaration.
2520 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2521 conditionally to c_do_switch_warnings.
2522
8d95fe25
MP
25232014-09-03 Marek Polacek <polacek@redhat.com>
2524
2525 PR c/62024
2526 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2527 conversions.
2528
9a771876
JJ
25292014-09-02 Jakub Jelinek <jakub@redhat.com>
2530 Balaji V. Iyer <balaji.v.iyer@intel.com>
2531 Igor Zamyatin <igor.zamyatin@intel.com>
2532
2533 * c-parser.c (c_parser_cilk_for): New function.
2534 (c_parser_cilk_grainsize): Likewise.
2535 (c_get_temp_regvar): Likewise.
2536 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2537 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2538 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2539 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2540 case.
2541
b7679d96
CG
25422014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2543
2544 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2545 with using HOST_WIDE_INT without truncation to 'int'
2546
59ea0364
MP
25472014-08-22 Marek Polacek <polacek@redhat.com>
2548
2549 PR c++/62199
2550 * c-typeck.c (parser_build_binary_op): Adjust call to
2551 warn_logical_not_parentheses.
2552
671a475e
IZ
25532014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2554
2555 PR other/62008
2556 * c-parser.c (c_parser_array_notation): Check for correct
2557 type of an array added.
2558
04159acf
MP
25592014-08-19 Marek Polacek <polacek@redhat.com>
2560
2561 PR c++/62153
2562 * c-typeck.c (build_binary_op): If either operand of a comparison
2563 is a boolean expression, call maybe_warn_bool_compare.
2564
c77935ee
PP
25652014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2566
2567 PR c/45584
2568 * c-typeck.c (build_c_cast): Do a conversion even when the
2569 TYPE_MAIN_VARIANTs are the same.
2570
35aff4fb
MP
25712014-08-19 Marek Polacek <polacek@redhat.com>
2572
2573 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2574 pedwarn_c99 instead of pedwarn.
2575 (grokfield): Likewise.
2576 (warn_defaults_to): New function.
2577 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2578 Unconditionally call pedwarn_c99 instead of pedwarn.
2579 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2580 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2581 check flag_isoc11 before.
2582 * c-errors.c (pedwarn_c99): Change the return type to bool.
2583 Handle -Wc99-c11-compat.
2584 * c-parser.c (disable_extension_diagnostics): Handle
2585 warn_c99_c11_compat.
2586 (restore_extension_diagnostics): Likewise.
2587 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2588 instead of pedwarn, don't check flag_isoc11 before.
2589 (c_parser_declspecs): Likewise.
2590 (c_parser_alignas_specifier): Likewise.
2591 (c_parser_alignof_expression): Likewise.
2592 (c_parser_generic_selection): Likewise.
2593 * c-tree.h (pedwarn_c99): Update declaration.
2594 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2595 of pedwarn_c99.
2596
177cce46
MP
25972014-08-19 Marek Polacek <polacek@redhat.com>
2598
2599 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2600 to pedwarn_c90.
2601 * c-errors.c: Include "opts.h".
2602 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2603 * c-parser.c (disable_extension_diagnostics): Handle negative value
2604 of warn_c90_c99_compat, too.
2605 (restore_extension_diagnostics): Likewise.
2606 (c_parser_compound_statement_nostart): Pass
2607 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2608
6dc99c33
MP
26092014-08-12 Marek Polacek <polacek@redhat.com>
2610
2611 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2612 Add pedwarn.
2613 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2614 Likewise.
2615 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2616
3f8257db 26172014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
2618
2619 PR c/51849
2620 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2621 Call pedwarn_c90 instead of pedwarn.
2622 (check_bitfield_type_and_width): Likewise.
2623 (declspecs_add_qual): Likewise.
2624 (declspecs_add_type): Likewise.
2625 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2626 Adjust to only call pedwarn_c90.
2627 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2628 pedwarn_c90 instead of pedwarn.
2629 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2630 * c-parser.c (disable_extension_diagnostics): Handle
2631 warn_c90_c99_compat.
2632 (restore_extension_diagnostics): Likewise.
2633 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2634 pedwarn_c90 instead of pedwarn.
2635 (c_parser_initelt): Likewise.
2636 (c_parser_postfix_expression): Likewise.
2637 (c_parser_postfix_expression_after_paren_type): Likewise.
2638 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2639 * c-tree.h: Fix formatting.
2640 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2641 pedwarn_c90 instead of pedwarn.
2642
9f25a338
TS
26432014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2644
2645 * c-typeck.c: Remove include of pointer-set.h.
2646
044331a8
MP
26472014-08-07 Marek Polacek <polacek@redhat.com>
2648
2649 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2650
b787e7a2
TS
26512014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2652
2653 * c-typeck.c: Use hash_map instead of pointer_map.
2654
6e2830c3
TS
26552014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2656
2657 * c-decl.c: Use hash_set instead of pointer_set.
2658
a7ee52fb
IZ
26592014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2660
2661 PR middle-end/61455
2662 * c-array-notation.c (expand_array_notations): Handling
2663 of DECL_EXPR added.
2664
b4dfdc11
MG
26652014-07-31 Marc Glisse <marc.glisse@inria.fr>
2666
2667 PR c++/60517
2668 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2669 a local variable.
2670
976d5a22
TT
26712014-07-30 Tom Tromey <tromey@redhat.com>
2672
2673 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2674 field.
2675 (really_start_incremental_init, push_init_level): Initialize
2676 designator_depth.
2677 (pop_init_level): Set global designator_depth.
2678 (process_init_element): Check for designated_init attribute.
2679
30281de2
MP
26802014-07-20 Marek Polacek <polacek@redhat.com>
2681
2682 PR c/61852
2683 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2684 (implicitly_declare): Pass location to implicit_decl_warning.
2685
b108f48f
JJ
26862014-07-14 Jakub Jelinek <jakub@redhat.com>
2687
2688 PR middle-end/61294
2689 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2690 If non-NULL, call c_parser_check_literal_zero.
2691 (c_parser_check_literal_zero): New function.
2692 (c_parser_postfix_expression_after_primary): Adjust
2693 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2694
773ec47f
MP
26952014-07-06 Marek Polacek <polacek@redhat.com>
2696
2697 PR c/6940
2698 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2699 * c-tree.h (C_ARRAY_PARAMETER): Define.
2700 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2701 function parameter.
2702
22e1cf1c 27032014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 2704 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
2705
2706 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2707 releasing symbol.
2708
52ec0ea3
MP
27092014-07-01 Marek Polacek <polacek@redhat.com>
2710
2711 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2712 instead of 0 to WARN_FOR_ASSIGNMENT.
2713
d5c3d343
MP
27142014-07-01 Marek Polacek <polacek@redhat.com>
2715
2716 PR c/58286
2717 * c-typeck.c (convert_for_assignment): Pass
2718 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2719
6a7253a4
MP
27202014-06-30 Marek Polacek <polacek@redhat.com>
2721
2722 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2723 has no_sanitize_undefined attribute.
2724
5e88a8f4
IZ
27252014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2726
2727 PR middle-end/57541
2728 * c-array-notation.c (fix_builtin_array_notation_fn):
2729 Check for 0 arguments in builtin call. Check that bultin argument is
2730 correct.
2731 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2732 index.
2733
9698b078
SH
27342014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2735
2736 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2737 qualifiers in __auto_type for atomic types.
2738 (c_parser_typeof_specifier): Discard all type qualifiers in
2739 __typeof__ for atomic types.
2740
6e07c515
MP
27412014-06-25 Marek Polacek <polacek@redhat.com>
2742
2743 PR c/61162
2744 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2745 the return expression to c_finish_return.
2746
da6f124d
JJ
27472014-06-25 Jakub Jelinek <jakub@redhat.com>
2748
2749 * c-typeck.c (c_finish_omp_clauses): Make sure
2750 OMP_CLAUSE_LINEAR_STEP has correct type.
2751
c203e8a7
TS
27522014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2753
2754 * c-decl.c: Adjust.
2755
56ad0e38
JJ
27562014-06-24 Jakub Jelinek <jakub@redhat.com>
2757
2758 * c-parser.c (c_parser_omp_for_loop): For
2759 #pragma omp parallel for simd move lastprivate clause from parallel
2760 to for rather than simd.
2761
47c2554f
MP
27622014-06-23 Marek Polacek <polacek@redhat.com>
2763
2764 * c-typeck.c (parser_build_binary_op): Don't call
2765 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2766
56363ffd
JH
27672014-06-15 Jan Hubicka <hubicka@ucw.cz>
2768
2769 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2770 * c-decl.c (merge_decls): Likewise.
2771
d7ff7ae5
MP
27722014-06-09 Marek Polacek <polacek@redhat.com>
2773
2774 PR c/36446
2775 * c-typeck.c (error_init): Call inform instead of error_at.
2776 (pedwarn_init): Call inform instead of pedwarn.
2777 (warning_init): Call inform instead of warning_at.
2778
24d047a3
JH
27792014-06-07 Jan Hubicka <hubicka@ucw.cz>
2780
2781 * c-decl.c (merge_decls): Use set_decl_section_name.
2782 (duplicate_decls): Remove node if it exists.
2783
9bac5cbb
G
27842014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2785
2786 PR c/53119
2787 * c-typeck.c (push_init_level, process_init_element,
2788 pop_init_level): Correct check for zero initialization, move
2789 missing brace warning to respect zero initialization.
2790
8ffcdea8
MP
27912014-06-05 Marek Polacek <polacek@redhat.com>
2792
2793 PR c/56724
2794 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2795
742938c9
MP
27962014-06-05 Marek Polacek <polacek@redhat.com>
2797
2798 PR c/49706
2799 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2800 on the left hand side operand of a comparison.
2801
6447c55d
MP
28022014-06-05 Marek Polacek <polacek@redhat.com>
2803
2804 PR c/48062
2805 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2806 Print note only if the warning was printed.
2807
9dc7743c
IZ
28082014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2809
2810 PR c/58942
2811 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2812 with a pointer.
2813
fedfecef
MP
28142014-06-03 Marek Polacek <polacek@redhat.com>
2815
2816 PR c/60439
2817 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2818 c_start_case.
2819 * c-tree.h (c_start_case): Update.
2820 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2821 switch condition has boolean value.
2822
9b2b7279
AM
28232014-06-02 Andrew MacLeod <amacleod@redhat.com>
2824
2825 * c-decl.c: Include builtins.h.
2826 * c-parser.c: Likewise.
2827
5c1bc275
MP
28282014-05-27 Marek Polacek <polacek@redhat.com>
2829
2830 PR c/56724
2831 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2832 error and warning calls to error_at and warning_at. Pass location of
2833 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2834 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2835 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2836
97563bc8
IZ
28372014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2838
2839 PR c/61191
2840 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2841 function parameters.
2842
aede2c10
JH
28432014-05-23 Jan Hubicka <hubicka@ucw.cz>
2844
2845 * c-decl.c (merge_decls): Preserve symtab node pointers.
2846 (duplicate_decls): Free new decl.
2847
edbba2ce
TS
28482014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2849
f3316c6d
TS
2850 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2851 initialization.
2852
edbba2ce
TS
2853 * c-parser.c (c_parser_omp_target): Return bool values.
2854
68c81f24
TS
28552014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2856
2857 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2858 num_teams_loc variable to num_thread_limit_loc.
2859
632f2871
RS
28602014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2861
2862 * c-array-notation.c (expand_array_notations): Use void_node
2863 instead of void_zero_node.
2864
766090c2
TS
28652014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2866
2867 * c-decl.c (finish_struct): Adjust.
2868 (finish_enum): Likewise.
2869 (bind): Adjust.
2870 (record_inline_static): Likewise.
2871 (push_scope): Likewise.
2872 (make_label): Likewise.
2873 (lookup_label_for_goto): Likewise.
2874 (finish_struct): Likewise.
2875 (finish_enum): Likewise.
2876 (store_parm_decls): Likewise.
2877 (c_push_function_context): Likewise.
2878 * c-lang.h: Remove usage of variable_size gty attribute.
2879 * c-parser.c (c_parse_init): Adjust.
2880 (c_parse_file): Likewise.
2881
2b107f6b
MP
28822014-05-13 Marek Polacek <polacek@redhat.com>
2883
2884 PR c/61162
2885 * c-typeck.c (convert_for_assignment): Pass location to
2886 WARN_FOR_ASSIGNMENT instead of input_location.
2887
d033409e
MP
28882014-05-10 Marek Polacek <polacek@redhat.com>
2889
2890 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2891 maybe_warn_string_init.
2892 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2893 maybe_warn_string_init.
2894 * c-tree.h (maybe_warn_string_init): Update declaration.
2895 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2896 Call pedwarn_init with loc instead of with input_location.
2897 (digest_init): Pass init_loc to maybe_warn_string_init.
2898 (pop_init_level): Call pedwarn_init with loc instead of with
2899 input_location.
2900 (set_init_index): Likewise.
2901 (process_init_element): Likewise.
2902
ea58ef42
MP
29032014-05-09 Marek Polacek <polacek@redhat.com>
2904
2905 PR c/61096
2906 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2907 (c_parser_initelt): Pass location to set_init_label. Pass array index
2908 location to set_init_index.
2909 * c-tree.h (push_init_level): Update declaration.
2910 (pop_init_level): Likewise.
2911 (set_init_index): Likewise.
2912 (set_init_label): Likewise.
2913 * c-typeck.c (error_init): Add location parameter. Call error_at
2914 instead of error.
2915 (digest_init): Pass init_loc to error_init.
2916 (really_start_incremental_init):
2917 (push_init_level): Add location parameter. Pass loc to pop_init_level
2918 and error_init.
2919 (pop_init_level): Likewise.
2920 (set_designator): Add location parameter. Pass loc to pop_init_level,
2921 push_init_level, and error_init.
2922 (set_init_index): Add location parameter. Pass loc to error_init and
2923 set_designator.
2924 (set_init_label): Likewise.
2925 (output_init_element): Pass loc to error_init.
2926 (process_init_element): Pass loc to error_init, pop_init_level,
2927 pedwarn_init, and push_init_level.
2928
661a0813
MP
29292014-05-09 Marek Polacek <polacek@redhat.com>
2930
2931 PR c/50459
2932 * c-parser.c (c_parser_attributes): Parse the arguments as an
2933 expression-list if the attribute takes identifier.
2934
2793eeab
MP
29352014-05-08 Marek Polacek <polacek@redhat.com>
2936
2937 PR c/61053
2938 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2939 TYPE_ALIGN_UNIT.
2940
f827930a
MP
29412014-05-08 Marek Polacek <polacek@redhat.com>
2942
2943 PR c/61077
2944 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2945 of main.
2946
1d60af08
KZ
29472014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2948 Mike Stump <mikestump@comcast.net>
2949 Richard Sandiford <rdsandiford@googlemail.com>
2950
2951 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2952 (finish_enum): Use wide-int interfaces.
2953 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2954 * c-typeck.c (build_c_cast): Likewise.
2955 (set_nonincremental_init_from_string): Likewise.
2956 (c_tree_equal): Likewise.
2957
a0e24419
MP
29582014-05-02 Marek Polacek <polacek@redhat.com>
2959
2960 PR c/25801
2961 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2962 Return size_one_node when the type is not complete.
2963 (pointer_diff): Remove comment.
2964 (build_unary_op): Improve error messages.
2965
19fc9faa
MP
29662014-05-02 Marek Polacek <polacek@redhat.com>
2967
2968 * c-typeck.c (c_finish_return): Separate warning_at calls.
2969
63bc4e87
MP
29702014-05-02 Marek Polacek <polacek@redhat.com>
2971
2972 * c-tree.h (error_init): Remove declaration.
2973 (pedwarn_init): Likewise.
2974 * c-typeck.c (error_init): Make static and move above.
2975 (pedwarn_init): Likewise.
2976 (warning_init): Move above.
2977 (maybe_warn_string_init): Likewise.
2978
4bd2511b
JL
29792014-05-01 Jeff Law <law@redhat.com>
2980
2981 Revert:
2982
2983 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2984 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2985 avoid goto.
2986
6a358dcb
MP
29872014-05-02 Marek Polacek <polacek@redhat.com>
2988
2989 PR c/60784
2990 * c-typeck.c (push_init_level): Set constructor_designated to
2991 p->designated for structures.
2992
ae5ebda4
MP
29932014-05-01 Marek Polacek <polacek@redhat.com>
2994
2995 PR c/60915
2996 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2997 function-definition has an attribute after the declarator.
2998
96b40f8d
MP
29992014-05-01 Marek Polacek <polacek@redhat.com>
3000
3001 PR c/60257
3002 * c-typeck.c (warning_init): Add location_t parameter. Call
3003 warning_at instead of warning.
3004 (push_init_level): Pass input_location to warning_init.
3005 (add_pending_init): Add location_t parameter. Pass loc to
3006 warning_init.
3007 (set_nonincremental_init): Pass input_location to add_pending_init.
3008 (set_nonincremental_init_from_string): Likewise.
3009 (output_init_element): Pass loc to warning_init and to
3010 add_pending_init.
3011
32e00768
MP
30122014-05-01 Marek Polacek <polacek@redhat.com>
3013
3014 PR c/43395
3015 * c-typeck.c (c_finish_return): Distinguish between label and variable
3016 when warning about returning local address.
3017
c9379ce2
MP
30182014-05-01 Marek Polacek <polacek@redhat.com>
3019
3020 PR c/29467
3021 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
3022 in C89 mode.
3023
d00887e8
MP
30242014-05-01 Marek Polacek <polacek@redhat.com>
3025
3026 PR c/43245
3027 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
3028 instead of 0 to WARN_FOR_QUALIFIERS.
3029
5436fa2e
MP
30302014-05-01 Marek Polacek <polacek@redhat.com>
3031
3032 PR c/56989
3033 * c-typeck.c (default_conversion): Use better location for
3034 error call.
3035
f8ed5150
MP
30362014-04-30 Marek Polacek <polacek@redhat.com>
3037
3038 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
3039 also when SANITIZE_FLOAT_DIVIDE is on.
3040
8337d1db
MP
30412014-04-30 Marek Polacek <polacek@redhat.com>
3042
3043 PR c/60139
3044 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
3045 and pedwarn_init. Use loc insted of input_location.
3046
c4bdc42f
MP
30472014-04-30 Marek Polacek <polacek@redhat.com>
3048
3049 PR c/60351
3050 * c-typeck.c (build_binary_op): Use location when warning about
3051 shift count.
3052
45484dcf
MP
30532014-04-25 Marek Polacek <polacek@redhat.com>
3054
3055 PR c/18079
3056 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
3057 always_inline/noinline and hot/cold attributes.
3058
34cf811f
MP
30592014-04-25 Marek Polacek <polacek@redhat.com>
3060
3061 PR c/60114
3062 * c-parser.c (c_parser_initelt): Pass input_location to
3063 process_init_element.
3064 (c_parser_initval): Pass loc to process_init_element.
3065 * c-tree.h (process_init_element): Adjust declaration.
3066 * c-typeck.c (push_init_level): Pass input_location to
3067 process_init_element.
3068 (pop_init_level): Likewise.
3069 (set_designator): Likewise.
3070 (output_init_element): Add location_t parameter. Pass loc to
3071 digest_init.
3072 (output_pending_init_elements): Pass input_location to
3073 output_init_element.
3074 (process_init_element): Add location_t parameter. Pass loc to
3075 output_init_element.
3076
42056eac
JJ
30772014-04-24 Jakub Jelinek <jakub@redhat.com>
3078
3079 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3080 atomic-clause, allow comma in between atomic-clause and
3081 seq_cst.
3082
e162a134
JJ
30832014-04-22 Jakub Jelinek <jakub@redhat.com>
3084
3085 PR c/59073
3086 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3087 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3088
2f6babac
IZ
30892014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3090
3091 PR middle-end/60469
3092 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3093 create_tmp_var instead build_decl for creating temps.
3094 (build_array_notation_expr): Likewise.
3095 (fix_conditional_array_notations_1): Likewise.
3096 (fix_array_notation_expr): Likewise.
3097 (fix_array_notation_call_expr): Likewise.
3098
8edbfaa6
JJ
30992014-03-28 Jakub Jelinek <jakub@redhat.com>
3100
3101 PR c++/60689
3102 * c-tree.h (c_build_function_call_vec): New prototype.
3103 * c-typeck.c (build_function_call_vec): Don't call
3104 resolve_overloaded_builtin here.
3105 (c_build_function_call_vec): New wrapper function around
3106 build_function_call_vec. Call resolve_overloaded_builtin here.
3107 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3108 Call c_build_function_call_vec instead of build_function_call_vec.
3109 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3110 * c-decl.c (finish_decl): Likewise.
3111
7485aeea
MLI
31122014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3113
3114 PR c/55383
3115 * c-typeck.c: Use correct format string in cast-qual warning
3116
b17a8b07
TS
31172014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3118
3119 * c-decl.c (c_decl_attributes): Use
3120 lang_hooks.types.omp_mappable_type.
3121 * c-typeck.c (c_finish_omp_clauses): Likewise.
3122
3af9c5e9
MP
31232014-03-06 Marek Polacek <polacek@redhat.com>
3124
3125 PR c/60197
3126 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3127 of checking tree code.
3128
1c9f5f33
PK
31292014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3130
3131 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3132 (c_parser_parameter_declaration): Likewise.
3133
cc28fc7f
MP
31342014-02-19 Marek Polacek <polacek@redhat.com>
3135
3136 PR c/60195
3137 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3138 Call mark_exp_read on exp.value.
3139 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3140 TREE_ADDRESSABLE on old instead of val.
3141 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3142
b581c05c
PK
31432014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3144
3145 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3146 C_EXPR_APPEND by vec_safe_push.
3147 * c-tree.h (C_EXPR_APPEND): Remove.
3148
81e5eca8
MP
31492014-01-31 Marek Polacek <polacek@redhat.com>
3150
3151 PR c/59963
3152 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3153 build_function_call_vec.
3154 (build_function_call): Likewise.
3155 (build_atomic_assign): Likewise.
3156 (build_function_call_vec): Add arg_loc parameter. Use it.
3157 (convert_arguments): Likewise.
3158 (convert_for_assignment): Rename rhs_loc to expr_loc.
3159 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3160 (c_parser_objc_keywordexpr): Likewise.
3161 (c_parser_postfix_expression_after_primary): Call
3162 build_function_call_vec with expr_loc rather than op_loc.
3163 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3164 build_function_call_vec.
3165 (c_parser_expr_list): Add locations parameter. Fill it with locations
3166 of function arguments.
3167 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3168
68fca595
MP
31692014-01-30 Marek Polacek <polacek@redhat.com>
3170
3171 PR c/59940
3172 * c-typeck.c (build_function_call_vec): Use loc parameter.
3173 (convert_arguments): Add location parameter. Use it.
3174 (ep_convert_and_check): Likewise.
3175 (build_atomic_assign): Adjust convert_for_assignment call.
3176 (build_modify_expr): Likewise.
3177 (digest_init): Likewise.
3178 (c_finish_return): Likewise.
3179 (build_conditional_expr): Adjust ep_convert_and_check calls.
3180 (convert_for_assignment): Add rhs_loc parameter. Use it.
3181 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3182 calls.
3183
fa337f3a
RB
31842014-01-30 Richard Biener <rguenther@suse.de>
3185
3186 PR c/59905
3187 * c-typeck.c (build_function_call_vec): Do not replace calls
3188 to a function via an incompatible type with a runtime abort.
3189
b72271b9
BI
31902014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3191
3192 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3193 flag_enable_cilkplus with flag_cilkplus.
3194 (c_parser_direct_declarator_inner): Likewise.
3195 (c_parser_attribute_any_word): Likewise.
3196 (c_parser_attributes): Likewise.
3197 (c_parser_compound_statement): Likewise.
3198 (c_parser_statement_after_labels): Likewise.
3199 (c_parser_if_statement): Likewise.
3200 (c_parser_switch_statement): Likewise.
3201 (c_parser_do_statement): Likewise.
3202 (c_parser_for_statement): Likewise.
3203 (c_parser_unary_expression): Likewise.
3204 (c_parser_postfix_expression): Likewise.
3205 (c_parser_postfix_expression_after_primary): Likewise.
3206 (c_parser_postfix_expression_after_primary): Likewise.
3207 (c_parser_omp_clause_name): Likewise.
3208 (c_finish_omp_declare_simd): Likewise.
3209 (c_parser_cilk_verify_simd): Likewise.
3210 * c-typeck.c (build_array_ref): Likewise.
3211 (build_function_call_vec): Likewise.
3212 (convert_arguments): Likewise.
3213 (build_compound_expr): Likewise.
3214 (c_finish_return): Likewise.
3215 (c_finish_if_stmt): Likewise.
3216 (c_finish_loop): Likewise.
3217 (build_binary_op): Likewise.
3218
393e8e8b
MP
32192014-01-23 Marek Polacek <polacek@redhat.com>
3220
3221 PR c/59846
3222 * c-typeck.c (parser_build_binary_op): Use location instead of
3223 input_location.
3224 (build_binary_op): Pass location to shorten_compare.
3225
f04dda30
MP
32262014-01-23 Marek Polacek <polacek@redhat.com>
3227
3228 PR c/58346
3229 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3230 an empty aggregate.
3231
789eadcd
MP
32322014-01-23 Marek Polacek <polacek@redhat.com>
3233
3234 PR c/59871
3235 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3236 of a comma expression.
3237 (emit_side_effect_warnings): Likewise.
3238
40f14e9f
BI
32392014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3240
3241 PR c/59825
3242 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3243 function to use walk_tree and moved a lot of its functionality to
3244 expand_array_notations.
3245 (expand_array_notations): New function.
3246
74558dd9
BI
32472014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3248
3249 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3250 attribute an attribute without value.
3251
652fea39
JJ
32522014-01-23 Jakub Jelinek <jakub@redhat.com>
3253
3254 PR middle-end/58809
3255 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3256 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3257
f34f1c87
MP
32582014-01-22 Marek Polacek <polacek@redhat.com>
3259
3260 PR c/59891
3261 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3262 of remove_c_maybe_const_expr on op1 and op2.
3263
241f845a
JJ
32642014-01-15 Jakub Jelinek <jakub@redhat.com>
3265
3266 PR c/58943
3267 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3268 effects, preevaluate rhs using SAVE_EXPR first.
3269
9a74f20c
BI
32702014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3271
3272 PR c++/59631
3273 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3274 statements with if-elseif statements.
3275
96066ce1
MP
32762014-01-06 Marek Polacek <polacek@redhat.com>
3277
3278 PR c/57773
3279 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3280 defined bit-field types only in ISO C.
3281
23a5b65a
RS
32822014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3283
3284 Update copyright years
3285
f9030485
RS
32862014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3287
3288 * c-array-notation.c: Use the standard form for the copyright notice.
3289
41958c28
BI
32902013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3291
3292 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3293 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3294 field in parser is not empty. If not-empty, call the function
3295 c_parser_finish_omp_declare_simd.
3296 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3297 between SIMD-enabled functions and #pragma simd. Added new parameter.
3298 (c_parser_cilk_all_clauses): Modified the usage of the function
3299 c_parser_cilk_clause_vectorlength as mentioned above.
3300 (c_parser_cilk_simd_fn_vector_attrs): New function.
3301 (c_finish_cilk_simd_fn_tokens): Likewise.
3302 (is_cilkplus_vector_p): Likewise.
3303 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3304 "nomask," and "mask" strings in clause name.
3305 (c_parser_omp_all_clauses): Added 3 new case statements:
3306 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3307 PRAGMA_CILK_CLAUSE_NOMASK.
3308 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3309 check for vector attribute and if so call the function
3310 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3311 called the function c_finish_cilk_simd_fn_tokens.
3312 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3313 parser field is non-empty. If so, parse them as you would parse
3314 the omp declare simd pragma.
3315 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3316 Added a check when step is a parameter and flag it as error.
3317 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3318 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3319 pragma_omp_clause.
3320
cef0fd0e
TS
33212013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3322
3323 * c-parser.c (c_parser_omp_parallel): Fix description.
3324
12893402
BI
33252013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3326
3327 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3328 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3329 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3330 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3331
296674db
JM
33322013-12-04 Joseph Myers <joseph@codesourcery.com>
3333
3334 PR c/52023
3335 * c-parser.c (c_parser_alignas_specifier): Use
3336 c_sizeof_or_alignof_type instead of c_alignof.
3337 (c_parser_alignof_expression): Likewise, with min_alignof
3338 parameter depending on alignof spelling used.
3339
edd28054
MP
33402013-12-04 Marek Polacek <polacek@redhat.com>
3341
3342 PR c/54113
3343 * c-decl.c (start_function): Don't warn for missing prototype for
3344 inline functions.
3345
da0fc454
MP
33462013-12-03 Marek Polacek <polacek@redhat.com>
3347
3348 PR c/59351
3349 * c-decl.c (build_compound_literal): Allow compound literals with
3350 empty initial value.
3351
4c2ecab0
JM
33522013-12-02 Joseph Myers <joseph@codesourcery.com>
3353
3354 PR c/58235
3355 * c-typeck.c (build_modify_expr): Diagnose assignment to
3356 expression with array type.
3357
340baef7
JM
33582013-11-29 Joseph Myers <joseph@codesourcery.com>
3359
3360 PR c/42262
3361 * c-typeck.c (process_init_element): Do not treat a string as
3362 initializing a whole array when used with a designator for an
3363 individual element.
3364
6763b9f7
JM
33652013-11-29 Joseph Myers <joseph@codesourcery.com>
3366
3367 PR c/57574
3368 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3369 an inline function following a static declaration.
3370
e7bd1de1
JJ
33712013-11-28 Jakub Jelinek <jakub@redhat.com>
3372
3373 PR c/59310
3374 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3375 to p_name before calling c_parser_omp_teams instead of after.
3376 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3377 argument. Remove unused p_name variable.
3378
0136f8f0
AH
33792013-11-27 Aldy Hernandez <aldyh@redhat.com>
3380 Jakub Jelinek <jakub@redhat.com>
3381
3382 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3383 external_scope is NULL.
3384
241b71bb
TV
33852013-11-27 Tom de Vries <tom@codesourcery.com>
3386 Marc Glisse <marc.glisse@inria.fr>
3387
3388 PR c++/59032
3389 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3390
2fb9a547
AM
33912013-11-22 Andrew MacLeod <amacleod@redhat.com>
3392
3393 * c-typeck.c: Add required include files from gimple.h.
3394
8400e75e
DM
33952013-11-22 David Malcolm <dmalcolm@redhat.com>
3396
3397 * c-decl.c (define_label, shadow_tag_warned)
3398 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3399 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3400 (declspecs_add_type): Remove use of in_system_header macro.
3401 * c-parser.c (c_parser_unary_expression): Likewise.
3402 * c-typeck.c (store_init_value, process_init_element)
3403 (c_start_case): Likewise.
3404
3405 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3406 macro.
3407
3408 * c-parser.c (c_parser_set_source_position_from_token): Remove
3409 reference to in_system_header from comment.
3410
386b1f1f
RS
34112013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3412
3413 * c-decl.c (grokdeclarator): Update comment to refer to
3414 tree_to_[su]hwi rather than tree_low_cst.
3415
ae7e9ddd
RS
34162013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3417
3418 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3419 tree_to_uhwi throughout.
3420
9439e9a1
RS
34212013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3422
3423 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3424 throughout.
3425
9541ffee
RS
34262013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3427
3428 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3429 throughout.
3430
c02065fc
AH
34312013-11-15 Aldy Hernandez <aldyh@redhat.com>
3432
3433 * c-parser.c (c_parser_cilk_simd): New.
3434 (c_parser_cilk_verify_simd): New.
3435 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3436 (c_parser_omp_for_loop): Add case for NE_EXPR.
3437 Set c_break_label for CILK_SIMD.
3438 (c_parser_cilk_clause_vectorlength): New.
3439 (c_parser_cilk_clause_linear): New.
3440 (c_parser_cilk_clause_name): New.
3441 (c_parser_cilk_all_clauses): New.
3442 * c-typeck.c (build_unary_op): Pass location argument to
3443 readonly_error.
3444 (build_modify_expr): Same.
3445 (build_asm_expr): Same.
3446 (c_finish_bc_stmt): Error on break/continue in loops.
3447
18f429e2
AM
34482013-11-14 Andrew MacLeod <amacleod@redhat.com>
3449
3450 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3451
d8a2d370
DN
34522013-11-14 Diego Novillo <dnovillo@google.com>
3453
3454 * c-decl.c: Include print-tree.h.
3455 Include stor-layout.h.
3456 Include varasm.h.
3457 Include attribs.h.
3458 Include stringpool.h.
3459 * c-lang.c: Include fold-const.h.
3460 * c-parser.c: Include stringpool.h.
3461 Include attribs.h.
3462 Include stor-layout.h.
3463 Include varasm.h.
3464 Include trans-mem.h.
3465 * c-typeck.c: Include stor-layout.h.
3466 Include trans-mem.h.
3467 Include varasm.h.
3468 Include stmt.h.
3469
38b7bc7f
JM
34702013-11-13 Joseph Myers <joseph@codesourcery.com>
3471
3472 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3473 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3474 __auto_type.
3475 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3476 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3477 RID_AUTO_TYPE.
3478 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3479 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3480 (c_parser_declarator, c_parser_direct_declarator_inner)
3481 (c_parser_parameter_declaration, c_parser_type_name): All callers
3482 changed.
3483 (c_parser_declaration_or_fndef): Handle declarations with type
3484 determined from the initializer.
3485
45b0be94
AM
34862013-11-12 Andrew MacLeod <amacleod@redhat.com>
3487
18f429e2 3488 * c-typeck.c: Include gimplify.h.
45b0be94 3489
582d9b50
JM
34902013-11-12 Joseph Myers <joseph@codesourcery.com>
3491
3492 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3493 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3494 comment.
3495 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3496 or _Thread_local as appropriate in diagnostics.
3497 (build_null_declspecs): Initialize ret->thread_gnu_p.
3498 (declspecs_add_scspec): Handle either __thread or _Thread_local
3499 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3500 pedantic. Do not disallow _Thread_local extern and _Thread_local
3501 static.
3502
267bac10
JM
35032013-11-07 Joseph Myers <joseph@codesourcery.com>
3504 Andrew MacLeod <amacleod@redhat.com>
3505
3506 * c-aux-info.c (gen_type): Handle atomic qualifier.
3507 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3508 qualifiers when compating types.
3509 (shadow_tag_warned): Handle atomic_p in declspecs.
3510 (quals_from_declspecs): Likewise.
3511 (start_decl): Use c_type_promotes_to when promoting argument
3512 types.
3513 (grokdeclarator): Handle _Atomic.
3514 (get_parm_info): Diagnose any qualifier on "void" as only
3515 parameter.
3516 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3517 comparing types. Use c_type_promotes_to when promoting argument
3518 types.
3519 (finish_function): Use c_type_promotes_to when promoting argument
3520 types.
3521 (build_null_declspecs): Handle atomic_p in declspecs.
3522 (declspecs_add_qual): Handle RID_ATOMIC.
3523 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3524 (c_token_starts_declspecs): Handle RID_ATOMIC.
3525 (c_parser_declspecs): Handle atomic type specifiers and
3526 qualifiers.
3527 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3528 from types of expressions with atomic type.
3529 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3530 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3531 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3532 (c_parser_statement_after_labels, c_parser_switch_statement)
3533 (c_parser_for_statement, c_parser_expr_no_commas)
3534 (c_parser_conditional_expression, c_parser_binary_expression)
3535 (c_parser_cast_expression, c_parser_unary_expression)
3536 (c_parser_postfix_expression)
3537 (c_parser_postfix_expression_after_primary, c_parser_expression):
3538 Use convert_lvalue_to_rvalue.
3539 (c_parser_expression_conv, c_parser_expr_list): Document
3540 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3541 (c_parser_objc_synchronized_statement): Use
3542 convert_lvalue_to_rvalue.
3543 (c_parser_objc_selector): Handle RID_ATOMIC.
3544 (c_parser_objc_receiver, c_parser_array_notation): Use
3545 convert_lvalue_to_rvalue.
3546 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3547 _Atomic (type-name).
3548 (struct c_declspecs): Add atomic_p field.
3549 (convert_lvalue_to_rvalue): Declare.
3550 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3551 corresponding atomic types.
3552 (qualify_type): Don't add _Atomic qualifiers from second argument.
3553 (comp_target_types): Do not allow _Atomic mismatches.
3554 (type_lists_compatible_p): Do not remove atomic qualifiers when
3555 comparing types.
3556 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3557 (build_atomic_assign): New functions.
3558 (build_unary_op): Use build_atomic_assign for atomic increment and
3559 decrement.
3560 (build_conditional_expr): Do not treat _Atomic void as a qualified
3561 version of void.
3562 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3563 (find_anonymous_field_with_type, convert_to_anonymous_field)
3564 (convert_for_assignment): Do not remove atomic qualifiers when
3565 comparing types.
3566 (digest_init): Do not accept initialization of arrays of atomic
3567 elements by string constants.
3568 (build_asm_expr): Use convert_lvalue_to_rvalue.
3569 (build_binary_op): Do not treat _Atomic void as a qualified
3570 version of void.
3571
0c249d4b
DD
35722013-11-06 DJ Delorie <dj@redhat.com>
3573
3574 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3575 both explicit and builtin, print the location of the explicit one.
3576
6d7f7e0a
TB
35772013-11-05 Tobias Burnus <burnus@net-b.de>
3578
3579 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3580 c_parser_omp_distribute, c_parser_omp_teams,
3581 c_parser_omp_target, c_parser_omp_declare): Handle
3582 -fopenmp-simd.
3583
b906f4ca
MP
35842013-11-03 Marek Polacek <polacek@redhat.com>
3585
3586 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3587
ee1d5a02
JJ
35882013-11-01 Jakub Jelinek <jakub@redhat.com>
3589
3590 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3591 check_dup_generic at the end, unless remove is true.
3592 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3593 remove = true;.
3594 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3595
5a9785fb
JJ
35962013-10-31 Jakub Jelinek <jakub@redhat.com>
3597
3598 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3599 with decl that is not pointer nor array.
3600
939b37da
BI
36012013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3602
3603 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3604 a spawning function is found.
3605 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3606 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3607 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3608 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3609 case.
3610 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3611 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3612 expr.
3613 (c_finish_return): Added a check to reject _Cilk_spawn in return
3614 expression.
3615 (build_cilk_spawn): New function.
3616 (build_cilk_sync): Likewise.
3617 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3618
d4af74d4
TB
36192013-10-27 Tobias Burnus <burnus@net-b.de>
3620
3621 PR other/33426
3622 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3623 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3624 (c_parser_statement_after_labels): Update calls.
3625
d73749df 36262013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3627
3628 PR other/33426
3629 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3630 Handle PRAGMA_IVDEP.
3631 (c_parser_statement_after_labels): Update call.
3632
f28aa681
MP
36332013-10-24 Marek Polacek <polacek@redhat.com>
3634
3635 * c-parser.c (c_parser_struct_declaration): Add a comment.
3636 (c_parser_declarator): Don't allow _Alignas here.
3637
0645c1a2
AM
36382013-10-17 Andrew MacLeod <amacleod@redhat.com>
3639
3640 * c-parser.c: Include omp-low.h.
3641 * c-typeck.c: Likewise.
3642
568a31f2
MP
36432013-10-17 Marek Polacek <polacek@redhat.com>
3644
3645 PR c/58267
3646 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3647 Document syntax of the array-declarator.
3648 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3649 are not permitted.
3650 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3651 (c_parser_struct_declaration): Likewise.
3652 (c_parser_declarator): Likewise.
3653 (c_parser_direct_declarator_inner): Likewise.
3654 (c_parser_parameter_declaration): Likewise.
3655 (c_parser_type_name): Likewise.
3656
acf0174b
JJ
36572013-10-11 Jakub Jelinek <jakub@redhat.com>
3658
3659 * c-lang.h (current_omp_declare_target_attribute): New extern
3660 decl.
3661 * c-parser.c: Include c-lang.h.
3662 (struct c_parser): Change tokens to c_token *.
3663 Add tokens_buf field. Change tokens_avail type to unsigned int.
3664 (c_parser_consume_token): If parser->tokens isn't
3665 &parser->tokens_buf[0], increment parser->tokens.
3666 (c_parser_consume_pragma): Likewise.
3667 (enum pragma_context): Add pragma_struct and pragma_param.
3668 (c_parser_external_declaration): Adjust
3669 c_parser_declaration_or_fndef caller.
3670 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3671 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3672 Adjust recursive call.
3673 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3674 of pragma_external.
3675 (c_parser_parameter_declaration): Use pragma_param instead of
3676 pragma_external.
3677 (c_parser_compound_statement_nostart, c_parser_label,
3678 c_parser_for_statement): Adjust
3679 c_parser_declaration_or_fndef callers.
3680 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3681 it through to c_parser_conditional_expression.
3682 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3683 pass it through to c_parser_binary_expression. Adjust recursive
3684 call.
3685 (c_parser_binary_expression): Remove prec argument, add
3686 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3687 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3688 binop matches it, use build2 instead of parser_build_binary_op.
3689 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3690 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3691 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3692 Handle pragma_struct and pragma_param the same as pragma_external.
3693 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3694 (c_parser_omp_variable_list): Parse array sections for
3695 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3696 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3697 (c_parser_omp_clause_reduction): Handle user defined reductions.
3698 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3699 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3700 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3701 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3702 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3703 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3704 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3705 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3706 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3707 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3708 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3709 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3710 (c_parser_omp_for_loop): Add CODE argument, pass it through
3711 to c_finish_omp_for. Change last argument to cclauses,
3712 and adjust uses to grab parallel clauses from the array of all
3713 the split clauses. Adjust c_parser_binary_expression,
3714 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3715 (omp_split_clauses): New function.
3716 (c_parser_omp_simd): New function.
3717 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3718 Allow the function to be called also when parsing combined constructs,
3719 and call c_parser_omp_simd when parsing for simd.
3720 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3721 #pragma omp section, require exactly one structured-block instead of
3722 sequence of statements.
3723 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3724 Allow the function to be called also when parsing combined constructs.
3725 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3726 Allow the function to be called also when parsing combined
3727 constructs.
3728 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3729 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3730 c_parser_omp_teams, c_parser_omp_target_data,
3731 c_parser_omp_target_update, c_parser_omp_target,
3732 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3733 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3734 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3735 (c_parser_omp_construct): Add p_name and mask vars. Handle
3736 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3737 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3738 and c_parser_omp_sections callers.
3739 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3740 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3741 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3742 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3743 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3744 OMP_CLAUSE_DEPEND.
3745 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3746 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3747 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3748 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3749 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3750 * c-typeck.c: Include tree-inline.h.
3751 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3752 handle_omp_array_sections_1, handle_omp_array_sections,
3753 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3754 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3755 user defined reductions.
3756 (c_tree_equal): New function.
3757 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3758 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3759 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3760 c_check_omp_declare_reduction_r): New prototypes.
3761 * c-decl.c (current_omp_declare_target_attribute): New variable.
3762 (c_decl_attributes): New function.
3763 (start_decl, start_function): Use it instead of decl_attributes.
3764 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3765 c_omp_reduction_decl, c_omp_reduction_lookup,
3766 c_check_omp_declare_reduction_r): New functions.
3767
0a6c2227
TT
37682013-09-25 Tom Tromey <tromey@redhat.com>
3769
3770 * Make-lang.in (c/gccspec.o): Remove.
3771 (CFLAGS-c/gccspec.o): New variable.
3772 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3773 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3774 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3775
f3bc55f0
TT
37762013-09-25 Tom Tromey <tromey@redhat.com>
3777
3778 * Make-lang.in (c/gccspec.o): Don't use subshell.
3779
a24d975c
MP
37802013-09-18 Marek Polacek <polacek@redhat.com>
3781
3782 PR sanitize/58443
3783 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3784 Remove unnecessary check.
3785
ce6923c5
MP
37862013-09-18 Marek Polacek <polacek@redhat.com>
3787
3788 PR sanitizer/58411
3789 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3790 no_sanitize_undefined attribute.
3791
a1e51df9
KT
37922013-09-13 Kai Tietz <ktietz@redhat.com>
3793
3794 PR target/57848
3795 * c-decl.c (c_builtin_function_ext_scope): Remove
3796 wrong assumption that it is never called on prexisting
3797 symbol.
3798
0af94e6f
JR
37992013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3800
3801 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3802
20059c8b
GDR
38032013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3804
3805 * c-objc-common.c (c_tree_printer): Tidy.
3806
de5a5fa1
MP
38072013-08-30 Marek Polacek <polacek@redhat.com>
3808
3809 * c-typeck.c (build_binary_op): Add division by zero and shift
3810 instrumentation.
3811
2531a1d9 38122013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 3813 Joseph Myers <joseph@codesourcery.com>
2531a1d9 3814
6e2bcc98 3815 PR c/35649
2531a1d9
JR
3816 * c-typeck.c (c_common_type): Prefer double_type_node over
3817 other REAL_TYPE types with the same precision.
3818 (convert_arguments): Likewise.
3819
025311c4
GDR
38202013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3821
3822 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3823 (c_initialize_diagnostics): Call a destructor for the early printer.
3824
da6ca2b5
GDR
38252013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3826
3827 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3828 printer initialization.
3829
318cda85 38302013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 3831
318cda85
BI
3832 PR c/57490
3833 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3834 check for truth values.
3835 (expand_array_notation_exprs): Added truth values case. Removed an
3836 unwanted else. Added for-loop to walk through subtrees in default
3837 case.
3838
b066401f
GDR
38392013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3840
3841 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3842
fb48aadc
JM
38432013-07-23 Joseph Myers <joseph@codesourcery.com>
3844
3845 * c-parser.c (struct c_generic_association): Fix typo.
3846
433cc7b0
TT
38472013-07-23 Tom Tromey <tromey@redhat.com>
3848 Joseph Myers <joseph@codesourcery.com>
3849
3850 * c-parser.c (struct c_generic_association): New.
3851 (c_generic_association_d): New typedef.
3852 (c_parser_generic_selection): New function.
3853 (c_parser_postfix_expression): Handle RID_GENERIC.
3854
26d40c3d
JM
38552013-07-13 Jason Merrill <jason@redhat.com>
3856
3857 PR c++/57793
3858 * c-decl.c (finish_struct): Check for too-large class.
3859
ecdbd01a 38602013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
3861
3862 PR c/57821
3863 * c-typeck.c (set_init_index): When folding, check for index overflow.
3864
1141ed3f
BI
38652013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3866
3867 * c-parser.c (c_parser_array_notation): Removed rejection of array
3868 notations in an array of function pointers.
3869
713b46fa
BI
38702013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3871
3872 * c-array-notation.c (make_triplet_val_inv): New function.
3873 (create_cmp_incr): Likewise.
3874 (create_array_refs): Likewise.
3875 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3876 Also modularized common parts between functions and called the function.
3877 (build_array_notation_expr): Likewise.
3878 (fix_conditional_array_notations_1): Likewise.
3879 (fix_array_notation_expr): Likewise.
3880 (fix_array_notation_call_expr): Likewise.
3881
92f20202
MP
38822013-06-18 Marek Polacek <polacek@redhat.com>
3883
3884 PR c/57630
3885 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3886
73a23b06
BI
38872013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3888
3889 * c-array-notation.c (build_array_notation_expr): Reject array notation
3890 mismatch between LHS and RHS even inside a call_expr. Also, removed
3891 a couple while statements that were dead code.
3892
00b8517d
BI
38932013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3894
3895 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3896 excessive precision expressions in function parameters. Also removed
3897 couple unwanted while statements.
3898
1509bdda
BI
38992013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3900
3901 * c-array-notation.c (expand_array_notation_exprs): Added
3902 ARRAY_NOTATION_REF case.
3903
d60f1706
BI
39042013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3905
3906 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3907 function to c-family/array-notation-common.c.
3908 (is_cilkplus_reduce_builtin): Likewise.
3909 (find_rank): Likewise.
3910 (extract_array_notation_exprs): Likewise.
3911 (replace_array_notations): Likewise.
3912 (find_inv_trees): Likewise.
3913 (replace_inv_trees): Likewise.
3914 (contains_array_notation_expr): Likewise.
3915 (find_correct_array_notation_type): Likewise.
3916 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3917 (struct inv_list): Moved this to c-family/array-notation-common.c.
3918 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3919
6d6efbb3
BI
39202013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3921
3922 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3923 reduction functions outside the for-loop. Added a check if the fundecl
3924 is non-NULL. Finally, removed an unwanted if-statement, and made the
3925 body unconditional.
3926
25c22937
BI
39272013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3928
3929 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3930 condition of the if-statement matches the rank of else-block and then-
3931 block when array notations are used.
3932 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3933 expression after the entire function body is parsed.
3934 (c_parser_expr_no_commas): Delayed creating array notation expressions
3935 to the end of function parsing.
3936 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3937 whole if-statement instead of just the condition.
3938 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3939
edd25645
BI
39402013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3941
3942 PR c/57474
3943 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3944 array to NULL_TREE if they are unused. Also added a check for the
3945 field to be NULL before its fields are used in future.
3946
065ce7f1
RO
39472013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3948
3949 PR bootstrap/57450
3950 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3951 (build_array_notation_expr): Likewise.
3952
36536d79
BI
39532013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3954
3955 * c-typeck.c (build_array_ref): Added a check to see if array's
3956 index is greater than one. If true, then emit an error.
3957 (build_function_call_vec): Exclude error reporting and checking
3958 for builtin array-notation functions.
3959 (convert_arguments): Likewise.
3960 (c_finish_return): Added a check for array notations as a return
3961 expression. If true, then emit an error.
3962 (c_finish_loop): Added a check for array notations in a loop
3963 condition. If true then emit an error.
3964 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3965 (build_binary_op): Added a check for array notation expr inside
3966 op1 and op0. If present, we call another function to find correct
3967 type.
3968 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3969 * c-parser.c (c_parser_compound_statement): Check if array
3970 notation code is used in tree, if so, then transform them into
3971 appropriate C code.
3972 (c_parser_expr_no_commas): Check if array notation is used in LHS
3973 or RHS, if so, then build array notation expression instead of
3974 regular modify.
3975 (c_parser_postfix_expression_after_primary): Added a check for
3976 colon(s) after square braces, if so then handle it like an array
3977 notation. Also, break up array notations in unary op if found.
3978 (c_parser_direct_declarator_inner): Added a check for array
3979 notation.
3980 (c_parser_compound_statement): Added a check for array notation in
3981 a stmt. If one is present, then expand array notation expr.
3982 (c_parser_if_statement): Likewise.
3983 (c_parser_switch_statement): Added a check for array notations in
3984 a switch statement's condition. If true, then output an error.
3985 (c_parser_while_statement): Similarly, but for a while.
3986 (c_parser_do_statement): Similarly, but for a do-while.
3987 (c_parser_for_statement): Similarly, but for a for-loop.
3988 (c_parser_unary_expression): Check if array notation is used in a
3989 pre-increment or pre-decrement expression. If true, then expand
3990 them.
3991 (c_parser_array_notation): New function.
3992 * c-array-notation.c: New file.
3993 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3994
cd192ccc
MS
39952013-05-23 Mike Stump <mikestump@comcast.net>
3996
3997 * c-typeck.c (convert_for_assignment): Handle references to memory
3998 spaces better.
3999
427b248d
JM
40002013-05-16 Jason Merrill <jason@redhat.com>
4001
4002 * Make-lang.in (cc1$(exeext)): Use link mutex.
4003
44d90fe1
PC
40042013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
4005
4006 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
4007 to simply use OPT_Wpointer_arith.
4008 (build_unary_op): Likewise.
4009
4e7d7b3d
JJ
40102013-04-03 Jakub Jelinek <jakub@redhat.com>
4011
4012 PR c/19449
4013 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
4014 argument. If set, or it temporarily for parsing of the first
4015 argument into force_folding_builtin_constant_p.
4016 (c_parser_postfix_expression): Adjust callers.
4017
839b422f
RB
40182013-03-21 Richard Biener <rguenther@suse.de>
4019
4020 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
4021 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
4022
2ee028f1
MP
40232013-02-12 Marek Polacek <polacek@redhat.com>
4024
4025 PR c/44938
4026 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
4027 origtypes to NULL.
4028
8824edff
JJ
40292013-01-24 Jakub Jelinek <jakub@redhat.com>
4030
4031 PR c/56078
4032 * c-typeck.c (set_nonincremental_init_from_string): If
4033 constructor_max_index is NULL, treat it as if tree_int_cst_lt
4034 returned false.
4035 (process_init_element): Likewise.
4036
eadd3d0d
JJ
40372012-12-20 Jakub Jelinek <jakub@redhat.com>
4038
4039 PR c++/55619
4040 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
4041 argument, don't call default_function_array_conversion
4042 nor c_fully_fold here.
4043 (c_parser_asm_statement): Adjust callers.
4044 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
4045 and outputs here, and call default_function_array_conversion
4046 on inputs that don't need to be addressable.
4047
f8a93a2e
JJ
40482012-12-18 Jakub Jelinek <jakub@redhat.com>
4049
4050 PR c/39464
4051 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
4052 warning require that both c_common_unsigned_type as well as
4053 c_common_signed_type is the same for both mvl and mvr types.
4054
9771b263
DN
40552012-11-16 Diego Novillo <dnovillo@google.com>
4056
4057 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
4058
4059 * c-common.c: Use new vec API in vec.h.
4060 * c-common.h: Likewise.
4061 * c-gimplify.c: Likewise.
4062 * c-pragma.c: Likewise.
4063 * c-pretty-print.c: Likewise.
4064 * c-pretty-print.h: Likewise.
4065 * c-semantics.c: Likewise.
4066 * c-decl.c: Likewise.
4067 * c-parser.c: Likewise.
4068 * c-tree.h: Likewise.
4069 * c-typeck.c: Likewise.
4070
880661a4
JW
40712012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4072
4073 PR c++/54930
4074 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4075
077d1abe
MLI
40762012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4077
4078 PR c/53066
4079 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4080 shadows a function, unless the variable is a function or a
4081 pointer-to-function.
4082
3a785c97
JJ
40832012-10-12 Jakub Jelinek <jakub@redhat.com>
4084
4085 PR c/54381
4086 * c-parser.c (struct c_tree_loc_pair): Removed.
4087 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4088 add location_t * and tree * arguments, fill in array of 3
4089 sizeof_arg trees and corresponding locs.
4090 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4091 c_parser_expr_list callers.
4092 (c_parser_postfix_expression_after_primary): Likewise. Pass
4093 array of 3 sizeof_arg trees and locs (corresponding to first
4094 3 arguments) to sizeof_pointer_memaccess_warning.
4095
703c8606
LC
40962012-10-09 Lawrence Crowl <crowl@google.com>
4097
4098 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4099 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4100 hash table.
4101
5d9de0d0
PC
41022012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4103
4104 PR c++/54194
4105 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4106 call.
4107
a212e43f
MG
41082012-10-09 Marc Glisse <marc.glisse@inria.fr>
4109
4110 PR c++/54427
4111 * c-typeck.c: Include c-common.h.
4112 (enum stv_conv): Moved to c-common.h.
4113 (scalar_to_vector): Moved to c-common.c.
4114 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4115 * Make-lang.in: c-typeck.c depends on c-common.h.
4116
3b78de56
AC
41172012-10-04 Arnaud Charlet <charlet@adacore.com>
4118
4119 * c-decl.c (c_write_global_declarations): Fix handling of
4120 -fdump-ada-spec*.
4121
78c60e3d
SS
41222012-09-30 Sharad Singhai <singhai@google.com>
4123
4124 * c-decl.c (c_write_global_declarations): Use a different method
4125 to determine if the dump has ben initialized.
4126
9f33203d
JM
41272012-09-14 Joseph Myers <joseph@codesourcery.com>
4128
4129 PR c/54552
4130 * c-typeck.c (c_cast_expr): When casting to a type requiring
4131 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4132 c_fully_fold first.
4133
a27d595d
JM
41342012-09-14 Joseph Myers <joseph@codesourcery.com>
4135
4136 PR c/54103
4137 * c-typeck.c (build_unary_op): Pass original argument of
4138 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4139 any C_MAYBE_CONST_EXPR, if it has integer operands.
4140 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4141 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4142 to c_objc_common_truthvalue_conversion, then remove any
4143 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4144 c_objc_common_truthvalue_conversion not
4145 c_common_truthvalue_conversion.
4146 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4147 call note_integer_operands for arguments with integer operands
4148 that are not integer constants.
4149
9feb29df
JJ
41502012-09-13 Jakub Jelinek <jakub@redhat.com>
4151
4152 PR c/54559
4153 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4154 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4155
d409320c
JJ
41562012-08-31 Jakub Jelinek <jakub@redhat.com>
4157
4158 PR c/54428
4159 * c-convert.c (convert): Don't call fold_convert_loc if
4160 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4161 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4162 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4163
6265d07c
JJ
41642012-08-24 Jakub Jelinek <jakub@redhat.com>
4165
4166 PR c/54355
4167 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4168 for nested and empty_ok arguments in the call to
4169 c_parser_declaration_or_fndef.
4170
1a4049e7
JJ
41712012-08-17 Jakub Jelinek <jakub@redhat.com>
4172
4173 * c-tree.h (c_last_sizeof_arg): Declare.
4174 * c-parser.c (struct c_tree_loc_pair): New type.
4175 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4176 non-NULL.
4177 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4178 (c_parser_postfix_expression_after_primary): Likewise. Call
4179 sizeof_pointer_memaccess_warning if needed.
4180 (sizeof_ptr_memacc_comptypes): New function.
4181 * c-typeck.c (c_last_sizeof_arg): New global variable.
4182 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4183
0229aee9
UB
41842012-07-24 Uros Bizjak <ubizjak@gmail.com>
4185
4186 * c-lang.h (lang_decl): Add variable_size GTY option.
4187
7ee2468b
SB
41882012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4189
4190 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4191 * Make-lang.in: Fix dependencies.
4192
d4a10d0a
SB
41932012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4194
4195 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4196 and add language Makefile hooks.
4197 * config-lang.in: New file.
4198 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4199 add the required "normal" config-lang.in rules.
4200 * c-lang.h: Moved from gcc/ to here.
4201 * c-tree.h: Likewise.
4202 * c-objc-common.c: Likewise.
4203 * c-objc-common.h: Likewise.
4204 * c-typeck.c: Likewise.
4205 * c-convert.c: Likewise.
4206 * c-lang.c: Likewise.
4207 * c-aux-info.c: Likewise.
4208 * c-errors.c: Likewise.
4209 * gccspec.c: Likewise.
4210 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4211 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4212\f
cbe34bb5 4213Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4214
4215Copying and distribution of this file, with or without modification,
4216are permitted in any medium without royalty provided the copyright
4217notice and this notice are preserved.