]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
update-copyright.py (GCCCmdLine): Add include, libcc1, libiberty, libssp, libvtv...
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
cbe34bb5
JJ
12017-01-01 Jakub Jelinek <jakub@redhat.com>
2
3 Update copyright years.
4
d17680f3
JJ
52016-12-21 Jakub Jelinek <jakub@redhat.com>
6
0dba7960
JJ
7 PR bootstrap/78817
8 * c-typeck.c (build_function_call_vec): If check_function_arguments
9 returns true, set TREE_NO_WARNING on CALL_EXPR.
10
d17680f3
JJ
11 PR c/77767
12 * c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
13 to *expr instead of overwriting it.
14
aa90531e
RB
152016-12-20 Richard Biener <rguenther@suse.de>
16
17 * gimple-parser.c (c_parser_gimple_compound_statement): Improve
18 error recovery.
19 (c_parser_gimple_statement): Only build assigns for non-error
20 stmts.
21 (c_parser_gimple_postfix_expression_after): Improve error recovery.
22
629b3d75
MJ
232016-12-14 Martin Jambor <mjambor@suse.cz>
24
25 * c-parser.c: Include omp-general.h and omp-offload.h instead of
26 omp-low.h.
27 (c_finish_oacc_routine): Adjusted call to
28 get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
29 to use their new names.
30 (c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
31 use its new name.
32 (c_parser_oacc_update): Likewise.
33 (c_parser_omp_simd): Likewise.
34 (c_parser_omp_target_update): Likewise.
35 * c-typeck.c: Include omp-general.h instead of omp-low.h.
36 (c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
37 name.
38 (c_finish_omp_cancellation_point): Likewise.
39 * gimple-parser.c: Do not include omp-low.h
40
c5af52eb
CP
412016-12-02 Cesar Philippidis <cesar@codesourcery.com>
42 James Norris <jnorris@codesourcery.com>
43
44 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
45 EXIT_DATA,WAIT} are not used in compound statements.
46 (c_parser_oacc_enter_exit_data): Update diagnostics.
47
48330c93
BE
482016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
49
50 PR c++/71973
51 * c-decl.c (diagnose_mismatched_decls): Use
52 OPT_Wbuiltin_declaration_mismatch here too.
53
899ca90e 542016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
55 Alan Hayward <alan.hayward@arm.com>
56 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
57
58 * c-decl.c (merge_decls): Use SET_DECL_MODE.
59 (make_label, finish_struct): Likewise.
60
1ee62b92 612016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 62 Richard Biener <rguenther@suse.de>
22b15758 63
8e745a17
JJ
64 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
65 * config-lang.in (gtfiles): Add c/c-parser.h.
66 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
67 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
68 * c-parser.c (enum c_id_kind, struct c_token,
69 c_parser_next_token_is, c_parser_next_token_is_not,
70 c_parser_next_token_is_keyword,
71 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
72 Split out to ...
73 * c-parser.h: ... new header.
74 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 75 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
76 c_token_starts_typename, c_parser_next_token_starts_declspecs,
77 c_parser_next_tokens_start_declaration, c_parser_consume_token,
78 c_parser_error, c_parser_require, c_parser_skip_until_found,
79 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
80 c_parser_type_name): Export.
81 (c_parser_tokens_buf): New function.
82 (c_parser_error): Likewise.
83 (c_parser_set_error): Likewise.
84 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
85 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
86 via c_parser_parse_gimple_body.
8e745a17
JJ
87 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
88 c_token_starts_typename, c_parser_next_token_starts_declspecs,
89 c_parser_next_tokens_start_declaration, c_parser_consume_token,
90 c_parser_error, c_parser_require, c_parser_skip_until_found,
91 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
92 c_parser_type_name): Declare.
1ee62b92
PG
93 (struct c_parser): Declare forward.
94 (c_parser_tokens_buf): Declare.
8e745a17
JJ
95 (c_parser_error): Likewise.
96 (c_parser_set_error): Likewise.
97 * gimple-parser.c: New file.
98 * gimple-parser.h: Likewise.
1ee62b92 99
22b15758
UB
1002016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
101
102 PR c/35503
103 * c-parser.c (c_parser_postfix_expression_after_primary): Call
104 warn_for_restrict.
105
84ff4775
LCW
1062016-09-11 Le-Chun Wu <lcwu@google.com>
107 Mark Wielaard <mjw@redhat.com>
108
109 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
110 to the given -Wshadow= variant.
111
4d0cdd0c
TP
1122016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
113
114 * c-typeck.c: Include memmodel.h.
115
1202f33e
JJ
1162016-10-13 Jakub Jelinek <jakub@redhat.com>
117
118 PR target/77957
119 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
120 instead of lhd_return_null_tree_v.
121
8a14afd0
BS
1222016-10-07 Bernd Schmidt <bschmidt@redhat.com>
123
124 PR c++/69733
125 * c-decl.c (smallest_type_quals_location): New static function.
126 (grokdeclarator): Try to find the correct location for an ignored
127 qualifier.
128
81fea426
MP
1292016-09-26 Marek Polacek <polacek@redhat.com>
130
131 PR c/7652
132 * c-decl.c (pop_scope): Add gcc_fallthrough.
133
1342016-09-26 Marek Polacek <polacek@redhat.com>
135
136 PR c/7652
137 * c-parser.c (struct c_token): Add flags field.
138 (c_lex_one_token): Pass it to c_lex_with_flags.
139 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
140 into IFN_FALLTHROUGH.
141 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
142 attribute fallthrough after a case label or default label.
143 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
144
9a2300e9
MP
1452016-09-24 Marek Polacek <polacek@redhat.com>
146
147 PR c/77490
148 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
149 have boolean value. Warn about ++/-- on booleans.
150
7de76362
JJ
1512016-09-23 Jakub Jelinek <jakub@redhat.com>
152
153 * c-parser.c (incomplete_record_decls): Remove unnecessary
154 = vNULL initialization of file scope vec.
155
5b73d2ab
MP
1562016-09-16 Marek Polacek <polacek@redhat.com>
157
158 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
159
e51fbec3
MP
1602016-09-14 Marek Polacek <polacek@redhat.com>
161
162 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
163 (fix_array_notation_expr): Likewise.
164 * c-decl.c (finish_decl): Likewise.
165 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
166 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
167 (function_to_pointer_conversion): Use false instead of 0.
168 (convert_lvalue_to_rvalue): Likewise.
169 (parser_build_unary_op): Likewise.
170 (build_atomic_assign): Likewise.
171 (build_unary_op): Change nonconvert parameter type to bool, use
172 true/false instead of 1/0.
173 (build_binary_op): Use true instead of 1.
174
254830ba
DM
1752016-09-13 David Malcolm <dmalcolm@redhat.com>
176
177 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
178 of add_fixit_insert to add_fixit_insert_before.
179
4c13ba17
MP
1802016-09-13 Marek Polacek <polacek@redhat.com>
181
182 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
183 it.
184
54dcdb88
BE
1852016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
186
187 PR c++/77496
188 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
189 COMPOUND_EXPR to warn_for_omitted_condop.
190
e5106e27
DM
1912016-09-07 David Malcolm <dmalcolm@redhat.com>
192
193 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
194 c_get_substring_location for this new langhook.
195
9dc5773f
JJ
1962016-09-02 Jakub Jelinek <jakub@redhat.com>
197
198 PR c/65467
199 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
200 flag_openmp.
201 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
202 instead of mark_exp_read on low_bound/length expression.
203 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
204 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
205 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
206 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
207 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
208 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
209 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
210 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
211 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
212 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
213 instead of mark_expr_read.
214 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
215 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
216 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
217 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
218 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
219 array section bases outside of depend clause, for depend clause
220 use convert_lvalue_to_rvalue on the base.
221 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
222 linear, aligned, map, to and from clauses.
223 (c_omp_clause_copy_ctor): New function.
224
295844f6
MP
2252016-09-01 Marek Polacek <polacek@redhat.com>
226
227 PR c/7652
228 * c-typeck.c (composite_type): Add FALLTHRU comment.
229
089af25c
DM
2302016-08-31 David Malcolm <dmalcolm@redhat.com>
231
232 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
233 to the insertion fixits for "struct", "union", and "enum".
234
f9087798
DM
2352016-08-30 David Malcolm <dmalcolm@redhat.com>
236
237 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
238 rather than add_fixit_misspelled_id.
239 (undeclared_variable): Likewise.
240 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
241 now-redundant "here" params from add_fixit_insert method calls.
242 (c_parser_parameter_declaration): Likewise.
243 * c-typeck.c (build_component_ref): Remove now-redundant range
244 param from add_fixit_replace method calls.
245
ebef225f
MP
2462016-08-25 Marek Polacek <polacek@redhat.com>
247
248 * c-typeck.c (parser_build_binary_op): Pass LHS to
249 warn_logical_not_parentheses.
250
fe377a48
MP
2512016-08-25 Marek Polacek <polacek@redhat.com>
252
253 PR c/77323
254 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
255 or _FloatN or _FloatNx is not supported.
256 (finish_declspecs): Set type to integer_type_node when _FloatN or
257 _FloatNx is not supported.
258
c65699ef
JM
2592016-08-19 Joseph Myers <joseph@codesourcery.com>
260
261 PR c/32187
262 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
263 (struct c_declspecs): Add field floatn_nx_idx.
264 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
265 and _FloatNx type specifiers.
266 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
267 (c_parser_declspecs, c_parser_attribute_any_word)
268 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
269 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
270 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
271 narrower than double.
272
2f1364c2
JJ
2732016-08-12 Jakub Jelinek <jakub@redhat.com>
274 Martin Liska <mliska@suse.cz>
275
276 PR c/67410
277 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
278 % to determine val element to change. Assert that
279 wchar_bytes * charwidth fits into val array.
280
191816a3
MP
2812016-08-12 Marek Polacek <polacek@redhat.com>
282
283 PR c/7652
284 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
285 (c_parser_postfix_expression): Likewise.
286 * c-typeck.c (build_unary_op): Adjust fall through comment.
287 (c_mark_addressable): Likewise.
288
b95a64bb
JJ
2892016-08-11 Jakub Jelinek <jakub@redhat.com>
290
291 PR c/72816
292 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
293 array member through typedef, for orig_qual_indirect == 0 clear
294 orig_qual_type.
295
895aa8e1
DM
2962016-08-08 David Malcolm <dmalcolm@redhat.com>
297
298 PR c/64955
299 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
300 this up to selftest::run_c_tests.
301 (selftest::run_c_tests): New function.
302
0b212d8c
TS
3032016-08-04 Thomas Schwinge <thomas@codesourcery.com>
304
ae9281fc
TS
305 * c-parser.c (struct oacc_routine_data): Add error_seen and
306 fndecl_seen members.
307 (c_finish_oacc_routine): Use these.
308 (c_parser_declaration_or_fndef): Adjust.
309 (c_parser_oacc_routine): Likewise. Support more C language
310 constructs, and improve diagnostics. Move pragma context
311 checking...
312 (c_parser_pragma): ... here.
313
0b212d8c
TS
314 * c-parser.c (struct oacc_routine_data): New.
315 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
316 Simplify code.
317 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
318 declare target" attribute.
319
76e2c821
JB
3202016-08-01 Jan Beulich <jbeulich@suse.com>
321
322 * c-fold.c (c_fully_fold_internal): Also emit shift count
323 warnings for vector types.
324 * c-typeck.c (build_binary_op): Likewise.
325
f618a472
MP
3262016-07-29 Marek Polacek <polacek@redhat.com>
327
328 PR c/71742
329 * c-decl.c (finish_struct): Rephrase an error message.
330
efd0786f
MP
331 PR c/71853
332 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
333 to error node for invalid code.
334
e00dceaf
MP
335 PR c/71573
336 * c-decl.c (implicitly_declare): Return decl early not only for
337 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
338
673a107a
JJ
3392016-07-29 Jakub Jelinek <jakub@redhat.com>
340
341 PR c/71969
342 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
343 on GNU extern inline functions.
344
a5b5c8b6
MP
3452016-07-29 Marek Polacek <polacek@redhat.com>
346
347 PR c/71583
348 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
349 check expr.value.
350
e3fe09c1
UB
3512016-07-22 Uros Bizjak <ubizjak@gmail.com>
352
353 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
354
7c8f7eaa
DM
3552016-07-20 David Malcolm <dmalcolm@redhat.com>
356
357 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
358 spellcheck-tree.h
359 (best_macro_match): Likewise, converting from a typedef to a
360 subclass.
361 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
362 (lookup_name_fuzzy): Update for change of best_macro_match to a
363 subclass with a ctor that calls cpp_forall_identifiers.
364
de6a69ee
DM
3652016-07-20 David Malcolm <dmalcolm@redhat.com>
366
367 * c-decl.c (implicit_decl_warning): Update for conversion of
368 return type of lookup_name_fuzzy to const char *.
369 (undeclared_variable): Likewise.
370 (lookup_name_fuzzy): Convert return type from tree to
371 const char *.
372 * c-parser.c (c_parser_declaration_or_fndef): Update for
373 conversion of return type of lookup_name_fuzzy to const char *.
374 (c_parser_parameter_declaration): Likewise.
375
b1c9c068
CP
3762016-07-15 Cesar Philippidis <cesar@codesourcery.com>
377
378 * c-parser.c (c_parser_oacc_declare): Don't scan for
379 GOMP_MAP_POINTER.
380 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
381 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
382 zero-length subarrays.
383
ddbbcb19
JJ
3842016-07-15 Jakub Jelinek <jakub@redhat.com>
385
386 PR c/71858
387 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
388 instead of FUZZY_LOOKUP_NAME.
389 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
390 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
391
dd36b877
JJ
3922016-07-14 Jakub Jelinek <jakub@redhat.com>
393
394 PR c/71858
395 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
396
8c681247
TS
3972016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
398
399 * c-parser.c (c_parser_generic_selection): Make type of variable
400 auto_vec.
401 (c_parser_omp_declare_simd): Likewise.
402
bf4fa671
TS
4032016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
404
405 * c-decl.c (struct c_struct_parse_info): Change member types
406 from vec to auto_vec.
407 (start_struct): Adjust.
408 (finish_struct): Likewise.
409
557e8c49
JJ
4102016-07-02 Jakub Jelinek <jakub@redhat.com>
411
412 PR c/71719
413 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
414
54d19c3b
TS
4152016-06-29 Thomas Schwinge <thomas@codesourcery.com>
416
417 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
418 Move pragma context checking into...
419 (c_parser_omp_cancellation_point): ... here, and improve
420 diagnostic messages.
421 * c-typeck.c (c_finish_omp_cancel)
422 (c_finish_omp_cancellation_point): Improve diagnostic messages.
423
152ef731
JJ
4242016-06-29 Jakub Jelinek <jakub@redhat.com>
425
426 PR c/71685
427 * c-typeck.c (c_build_qualified_type): Don't clear
428 C_TYPE_INCOMPLETE_VARS for the main variant.
429
4302016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
431
432 PR c/71552
433 * c-typeck.c (output_init_element): Diagnose incompatible types
434 before non-constant initializers.
435
e9ac1f86
JJ
4362016-06-28 Jakub Jelinek <jakub@redhat.com>
437
438 * Make-lang.in: Don't cat ../stage_current if it does not exist.
439
277d7ee0
AK
4402016-06-23 Andi Kleen <ak@linux.intel.com>
441
442 * Make-lang.in: Add support for autofdo.
443
1a4f11c8
DM
4442016-06-22 David Malcolm <dmalcolm@redhat.com>
445
446 PR c/70339
447 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
448 (implicit_decl_warning): When issuing warnings for implicit
449 declarations, attempt to provide a suggestion via
450 lookup_name_fuzzy.
451 (undeclared_variable): Likewise when issuing errors.
452 (lookup_name_in_scope): Likewise.
453 (struct edit_distance_traits<cpp_hashnode *>): New struct.
454 (best_macro_match): New typedef.
455 (find_closest_macro_cpp_cb): New function.
456 (lookup_name_fuzzy): New function.
457 * c-parser.c: Include gcc-rich-location.h.
458 (c_token_starts_typename): Split out case CPP_KEYWORD into...
459 (c_keyword_starts_typename): ...this new function.
460 (c_parser_declaration_or_fndef): When issuing errors about
461 missing "struct" etc, add a fixit. For other kinds of errors,
462 attempt to provide a suggestion via lookup_name_fuzzy.
463 (c_parser_parms_declarator): When looking ahead to detect typos in
464 type names, also reject CPP_KEYWORD.
465 (c_parser_parameter_declaration): When issuing errors about
466 unknown type names, attempt to provide a suggestion via
467 lookup_name_fuzzy.
468 * c-tree.h (c_keyword_starts_typename): New prototype.
469
5a578671
JM
4702016-06-20 Joseph Myers <joseph@codesourcery.com>
471
472 PR c/71601
473 * c-typeck.c (build_conditional_expr): Return error_mark_node if
474 c_common_type returns error_mark_node.
475
3f8257db 4762016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
477
478 PR c/69507
479 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
480 __alignof__ (expression).
481
6a3f203c
DM
4822016-06-14 David Malcolm <dmalcolm@redhat.com>
483
484 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
485
264757fb
DM
4862016-06-14 David Malcolm <dmalcolm@redhat.com>
487
488 * c-typeck.c (build_component_ref): Simplify fixit code by
489 using gcc_rich_location::add_fixit_misspelled_id.
490 (set_init_label): Likewise.
491
f7e4f2e3
DM
4922016-06-13 David Malcolm <dmalcolm@redhat.com>
493
494 * c-parser.c (c_parser_initelt): Provide location of name for new
495 location_t param of set_init_label.
496 * c-tree.h (set_init_label): Add location_t param.
497 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
498 param and use it when issuing error messages about unrecognized
499 field names. Attempt to provide a fixit hint if appropriate,
500 otherwise update the error message to provide the type name.
501
4b1ffdb1
TS
5022016-06-10 Thomas Schwinge <thomas@codesourcery.com>
503
504 PR c/71381
505 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
506 Loosen checking.
507
44a845ca
MS
5082016-06-08 Martin Sebor <msebor@redhat.com>
509 Jakub Jelinek <jakub@redhat.com>
510
511 PR c++/70507
512 PR c/68120
513 * c-typeck.c (convert_arguments): Don't promote last argument
514 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
515
92a5f2ba
MP
5162016-06-08 Marek Polacek <polacek@redhat.com>
517
518 PR c/71418
519 * c-decl.c (grokdeclarator): Check TYPE_P.
520
08203f73
MP
521 PR c/71426
522 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
523 code.
524
6ffd47b7
DM
5252016-06-07 David Malcolm <dmalcolm@redhat.com>
526
527 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
528 and structure element reference, capture the location of the
529 element name token and pass it to build_component_ref.
530 (c_parser_postfix_expression_after_primary): Likewise for
531 structure element dereference.
532 (c_parser_omp_variable_list): Likewise for
533 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
534 * c-tree.h (build_component_ref): Add location_t param.
535 * c-typeck.c (build_component_ref): Add location_t param
536 COMPONENT_LOC. Use it, if available, when issuing hints about
537 mispelled member names to provide a fixit replacement hint.
538
1f40cff3
MP
5392016-06-06 Marek Polacek <polacek@redhat.com>
540
541 PR c/71362
542 * c-parser.c (c_parser_direct_declarator): Set location.
543
5545a907
MP
5442016-06-06 Marek Polacek <polacek@redhat.com>
545
546 * c-typeck.c (comptypes_internal): Handle comparisons of
547 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
548 TYPE_REF_CAN_ALIAS_ALL.
549
b605f663
CLT
5502016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
551
552 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
553 arguments as addressable when async clause exists.
554
00631022
JJ
5552016-05-30 Jakub Jelinek <jakub@redhat.com>
556
557 PR c++/71349
558 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
559 when combined with target construct.
560
7211a097
JJ
5612016-05-26 Jakub Jelinek <jakub@redhat.com>
562
563 * c-parser.c (c_parser_omp_clause_schedule): Warn if
564 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
565
95efe6b6
MP
5662016-05-25 Marek Polacek <polacek@redhat.com>
567
568 PR c/71265
569 * c-decl.c (c_make_fname_decl): Don't check seen_error.
570
a23faf7a
MP
571 PR c/71266
572 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
573
e46c7770
CP
5742016-05-24 Cesar Philippidis <cesar@codesourcery.com>
575
576 * c-parser.c (c_parser_oacc_declare): Add support for
577 GOMP_MAP_FIRSTPRIVATE_POINTER.
578 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
579 argument with enum c_omp_region_type ort.
580 (handle_omp_array_sections): Likewise. Update call to
581 handle_omp_array_sections_1.
582 (c_finish_omp_clauses): Add specific errors and warning messages for
583 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
584 call to handle_omp_array_sections.
585
a04e69c0
TS
5862016-05-24 Thomas Schwinge <thomas@codesourcery.com>
587
588 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
589
f17a223d
RB
5902016-05-24 Richard Biener <rguenther@suse.de>
591
592 PR middle-end/70434
593 PR c/69504
594 * c-typeck.c (build_array_ref): Do not complain about indexing
595 non-lvalue vectors. Adjust for function name change.
596
79063edd
MS
5972016-05-20 Martin Sebor <msebor@redhat.com>
598
599 PR c/71115
600 * c-typeck.c (error_init): Use
601 expansion_point_location_if_in_system_header.
602 (warning_init): Same.
603
8a40fef3
DM
6042016-05-19 David Malcolm <dmalcolm@redhat.com>
605
606 PR c/71171
607 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
608 in error-handling.
609 (c_parser_postfix_expression): Likewise.
610 * c-tree.h (c_expr::set_error): New method.
611 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
612 that result's range is initialized.
613
e9892350
JG
6142016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
615
616 * c-typeck.c (parser_build_unary_op): Fix formatting.
617
8fad45f5
MW
6182016-05-16 Matthew Wahab <matthew.wahab@arm.com>
619
620 * c-decl.c (grokdeclarator): Remove errmsg and use of
621 targetm.invalid_return_type.
622 (grokparms): Remove errmsg and use of
623 targetm.invalid_parameter_type.
624
aa4b467b
JM
6252016-05-13 Joseph Myers <joseph@codesourcery.com>
626
627 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
628 function return type.
629
4f2e1536
MP
6302016-05-12 Marek Polacek <polacek@redhat.com>
631
632 PR c/70756
633 * c-decl.c (build_compound_literal): Pass LOC down to
634 c_incomplete_type_error.
635 * c-tree.h (require_complete_type): Adjust declaration.
636 (c_incomplete_type_error): Likewise.
637 * c-typeck.c (require_complete_type): Add location parameter, pass it
638 down to c_incomplete_type_error.
639 (c_incomplete_type_error): Add location parameter, pass it down to
640 error_at.
641 (build_component_ref): Pass location down to c_incomplete_type_error.
642 (default_conversion): Pass location down to require_complete_type.
643 (build_array_ref): Likewise.
644 (build_function_call_vec): Likewise.
645 (convert_arguments): Likewise.
646 (build_unary_op): Likewise.
647 (build_c_cast): Likewise.
648 (build_modify_expr): Likewise.
649 (convert_for_assignment): Likewise.
650 (c_finish_omp_clauses): Likewise.
651
d6e83a8d
MM
6522016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
653
654 PR c/43651
655 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
656 is enabled.
657 * c-errors.c (pedwarn_c90): Return true if warned.
658 * c-tree.h (pedwarn_c90): Change return type to bool.
659 (enum c_declspec_word): Add new enumerator cdw_atomic.
660
5c3a10fb
MP
6612016-05-11 Marek Polacek <polacek@redhat.com>
662
663 PR c++/71024
664 * c-decl.c (diagnose_mismatched_decls): Factor out code to
665 diagnose_mismatched_attributes and call it.
666
cf68d92c
MP
6672016-05-10 Marek Polacek <polacek@redhat.com>
668
669 PR c/70255
670 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
671 on a declaration following the definition.
672
351f85c5
JJ
6732016-05-05 Jakub Jelinek <jakub@redhat.com>
674
675 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
676 parse it through to c_parser_c99_block_statement.
677 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
678 caller.
679
deef7113
MP
6802016-05-04 Marek Polacek <polacek@redhat.com>
681
682 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
683 OPT_Wdangling_else.
684
de55efd5
MP
6852016-05-04 Marek Polacek <polacek@redhat.com>
686
687 PR c/48778
688 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
689 for macro expansions.
690
79ce98bc
MP
6912016-05-03 Marek Polacek <polacek@redhat.com>
692
693 PR c/70859
694 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
695 check_builtin_function_arguments.
696
fb2647aa
RB
6972016-05-03 Richard Biener <rguenther@suse.de>
698
699 * Make-lang.in (cc1-checksum.c): For stage-final re-use
700 the checksum from the previous stage.
701
77886428
CP
7022016-05-02 Cesar Philippidis <cesar@codesourcery.com>
703
704 * c-parser.c (c_parser_oacc_all_clauses): Update call to
705 c_finish_omp_clauses.
706 (c_parser_omp_all_clauses): Likewise.
707 (c_parser_oacc_cache): Likewise.
708 (c_parser_oacc_loop): Likewise.
709 (omp_split_clauses): Likewise.
710 (c_parser_omp_declare_target): Likewise.
711 (c_parser_cilk_all_clauses): Likewise.
712 (c_parser_cilk_for): Likewise.
713 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
714 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
715
7176a4a0
MP
7162016-05-02 Marek Polacek <polacek@redhat.com>
717
718 PR c/70851
719 * c-decl.c (grokdeclarator): Diagnose when array's size has an
720 incomplete type.
721
e7ff0319
CP
7222016-04-29 Cesar Philippidis <cesar@codesourcery.com>
723
724 PR middle-end/70626
725 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
726 OACC_LOOP_CLAUSE_MASK.
727 (c_parser_oacc_kernels_parallel): Update call to
728 c_oacc_split_loop_clauses.
729
9f405ce1
AM
7302016-04-28 Andrew MacLeod <amacleod@redhat.com>
731
732 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
733 argument to build_modify_expr in two cases.
734
c1e1f433
BS
7352016-04-27 Bernd Schmidt <bschmidt@redhat.com>
736
737 * c-parser.c (c_parser_postfix_expression_after_primary): Call
738 warn_for_memset instead of warning directly here.
739
2448a956
MP
7402016-04-26 Marek Polacek <polacek@redhat.com>
741
742 PR c/67784
743 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
744 out of ...
745 (c_parser_for_statement): ... here.
746 (c_parser_if_statement): Use it.
747 (c_parser_switch_statement): Use it.
748 (c_parser_while_statement): Use it.
749
b02a5e26
MP
750 PR c/70791
751 * c-decl.c (pushdecl): Pass LOCUS down to warning.
752
477d4906
IV
7532016-04-20 Ilya Verbin <ilya.verbin@intel.com>
754
755 PR c++/69363
756 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
757 instead of c_finish_cilk_clauses.
758 * c-tree.h (c_finish_omp_clauses): Add new default argument.
759 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
760 floating-point variables in the linear clause for Cilk Plus.
761
fe37c7af
MM
7622016-04-18 Michael Matz <matz@suse.de>
763
764 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
765 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
766
949505a9
MP
7672016-04-15 Marek Polacek <polacek@redhat.com>
768
769 PR c/70671
770 * c-typeck.c (build_unary_op): Pass location down to error and
771 warning call.
772
dda1bf61
JJ
7732016-04-15 Jakub Jelinek <jakub@redhat.com>
774
775 PR c/70436
776 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
777 where needed.
778 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
779 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
780 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
781 Adjust c_parser_pragma callers.
782 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
783 caller.
784 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
785 c_parser_statement.
786 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
787 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
788 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
789 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
790 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
791 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
792 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
793 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
794 down where needed.
795 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
796 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
797 calls.
798
99cd9857
MP
7992016-04-13 Marek Polacek <polacek@redhat.com>
800
801 PR c/70436
802 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
803 adjust callers.
804 (c_parser_statement): Likewise.
805 (c_parser_c99_block_statement): Likewise.
806 (c_parser_while_statement): Likewise.
807 (c_parser_for_statement): Likewise.
808 (c_parser_if_body): Don't set IF_P here.
809 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
810 about dangling else here.
811 * c-tree.h (c_finish_if_stmt): Adjust declaration.
812 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
813 warn about dangling else here.
814
f13355da
MP
8152016-04-04 Marek Polacek <polacek@redhat.com>
816
817 PR c/70307
818 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
819
5fde6a45
MP
8202016-03-31 Marek Polacek <polacek@redhat.com>
821
822 PR c/70297
823 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
824
4bbf545b
DM
8252016-03-18 David Malcolm <dmalcolm@redhat.com>
826
827 PR c/70281
828 * c-parser.c (c_parser_postfix_expression): Set the source range
829 for uses of "__builtin_types_compatible_p".
830
fcc2b74f
JJ
8312016-03-17 Jakub Jelinek <jakub@redhat.com>
832
833 PR c/70280
834 * c-typeck.c (composite_type): Don't count void_list_node
835 into len, if the list is terminated by void_list_node, start
836 with void_list_node instead of NULL for newargs. Stop
837 at void_list_node.
838
ab4c578f
MP
8392016-03-16 Marek Polacek <polacek@redhat.com>
840
841 PR c/70093
842 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
843 nested functions returning VM types.
844
96b3c82d
CP
8452016-03-09 Cesar Philippidis <cesar@codesourcery.com>
846
847 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
848 when calling c_finish_omp_clauses.
849
29b9828f
BS
8502016-03-04 Bernd Schmidt <bschmidt@redhat.com>
851
852 PR c/69824
853 * c-decl.c (get_parm_info): Don't queue implicit function declarations
854 for later.
855
7ff6ca38
MP
8562016-03-04 Marek Polacek <polacek@redhat.com>
857
858 PR c/69798
859 * c-parser.c (c_parser_postfix_expression): Call
860 c_parser_cast_expression rather than c_parser_postfix_expression.
861
686e2237
JJ
8622016-03-01 Jakub Jelinek <jakub@redhat.com>
863
864 PR c/69796
865 PR c/69974
866 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
867 of incomplete decls to error_mark_node.
868
0b05329b
MP
8692016-02-24 Marek Polacek <polacek@redhat.com>
870
871 PR c/69819
872 * c-decl.c (finish_decl): Don't update the copy of the type of a
873 different decl type.
874
067fbd8b
JJ
8752016-02-23 Jakub Jelinek <jakub@redhat.com>
876
877 PR objc/69844
878 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
879 in id_kind reclassification.
880
bf14eba2
JJ
8812016-02-16 Jakub Jelinek <jakub@redhat.com>
882
883 PR c/69835
884 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
885
ba539195
JN
8862016-02-16 James Norris <jnorris@codesourcery.com>
887
888 PR c/64748
889 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
890
16595a1f
BS
8912016-02-12 Bernd Schmidt <bschmidt@redhat.com>
892
f48dfe98
BS
893 * c-decl.c (build_null_declspecs): Zero the entire struct.
894
16595a1f
BS
895 PR c/69522
896 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
897 callers changed. If nested_p is true, use it to call
898 finish_implicit_inits.
899 * c-tree.h (finish_implicit_inits): Declare.
900 * c-typeck.c (finish_implicit_inits): New function. Move code
901 from ...
902 (push_init_level): ... here.
903 (set_designator, process_init_element): Call finish_implicit_inits.
904
66756373
JJ
9052016-02-11 Jakub Jelinek <jakub@redhat.com>
906
907 PR c/69768
908 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
909 arguments for -Waddress warning.
910
1066e9b5
JJ
9112016-02-04 Jakub Jelinek <jakub@redhat.com>
912
913 PR c/69669
914 * c-decl.c (finish_enum): When honoring mode attribute,
915 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
916
3a5d2ba4
JJ
9172016-01-29 Jakub Jelinek <jakub@redhat.com>
918
919 PR debug/69518
920 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
921 all type variants, not just TYPE_MAIN_VARIANT.
922
cbdd8ae0
JJ
9232016-01-27 Jakub Jelinek <jakub@redhat.com>
924
925 PR debug/66869
926 * c-decl.c (c_write_global_declarations_1): Warn with
927 warn_unused_function if static prototype without definition
928 is not C_DECL_USED.
929
fa74a4bc
MP
9302016-01-27 Marek Polacek <polacek@redhat.com>
931
932 PR c/68062
933 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
934 to unsigned, if needed. Add -Wsign-compare warning.
935
13f92e8d
JJ
9362016-01-26 Jakub Jelinek <jakub@redhat.com>
937
938 PR tree-optimization/69483
939 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
940
cd8e73dc 9412016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
942
943 PR c/24293
944 * c-tree.h (incomplete_record_decls): Declare.
945 * c-parser.c (incomplete_record_decls): Define.
946 (c_parser_translation_unit): Iterate through incomplete_record_decls and
947 report error if any decl has zero size.
948 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
949 or enum type to incomplete_record_decls.
950
e6d6ec9e
TV
9512016-01-14 Tom de Vries <tom@codesourcery.com>
952
953 PR tree-optimization/68773
954 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
955 set force_output.
956
00083992
MP
9572016-01-14 Marek Polacek <polacek@redhat.com>
958
959 PR c/69262
960 * c-decl.c (grokdeclarator): Provide more information for invalid
961 array declarations.
962
7443cf13
DM
9632016-01-06 David Malcolm <dmalcolm@redhat.com>
964
965 * c-parser.c (c_parser_unary_expression): For dereferences, build
966 a combined location before calling build_indirect_ref, so that
967 error reports cover the full range, manually updating the c_expr
968 src_range.
969
6b131d5b
MP
9702016-01-06 Marek Polacek <polacek@redhat.com>
971
972 PR sanitizer/69099
973 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
974 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
975 NULL.
976
818ab71a
JJ
9772016-01-04 Jakub Jelinek <jakub@redhat.com>
978
979 Update copyright years.
980
2fe0a208
MP
9812016-01-04 Marek Polacek <polacek@redhat.com>
982
983 PR c/68908
984 * c-typeck.c (build_atomic_assign): Improve commentary. Add
985 optimization to use __atomic_fetch_* built-in if possible.
986
c7b48c8a
TS
9872015-12-23 Thomas Schwinge <thomas@codesourcery.com>
988
989 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
990 into...
991 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
992 all users.
993
fda5652f
MP
9942015-12-22 Marek Polacek <polacek@redhat.com>
995
996 PR c/69002
997 * c-typeck.c (build_component_ref): Warn when acessing elements of
998 atomic structures or unions.
999
745e411d
DM
10002015-12-21 David Malcolm <dmalcolm@redhat.com>
1001
1002 * c-typeck.c: Include "gcc-rich-location.h".
1003 (build_binary_op): In the two places that call binary_op_error,
1004 create a gcc_rich_location and populate it with the location of
1005 the binary op and its two operands.
1006
94c40e19
DM
10072015-12-16 David Malcolm <dmalcolm@redhat.com>
1008
1009 * c-parser.c (c_parser_statement_after_labels): When calling
1010 c_finish_return, Use the return expression's location if it has
1011 one, falling back to the location of the first token within it.
1012 * c-typeck.c (c_finish_return): When issuing warnings about
1013 the incorrect presence/absence of a return value, issue a note
1014 showing the declaration of the function.
1015
de67c4c3
DM
10162015-12-16 David Malcolm <dmalcolm@redhat.com>
1017
1018 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
1019 to 4.
1020 (c_parser_peek_nth_token): New function.
1021 (c_parser_peek_conflict_marker): New function.
1022 (c_parser_error): Detect conflict markers and report them as such.
1023
a10704e1
DM
10242015-12-16 David Malcolm <dmalcolm@redhat.com>
1025
1026 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
1027 to preserve range information for the primary expression
1028 in the call to c_parser_postfix_expression_after_primary.
1029
8062bca6
DM
10302015-12-16 David Malcolm <dmalcolm@redhat.com>
1031
1032 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
1033 expression location, falling back on the first token location,
1034 rather than always using the latter.
1035
d06f8b75
MP
10362015-12-16 Marek Polacek <polacek@redhat.com>
1037
1038 PR c/64637
1039 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1040 available.
1041
2994fb91
MP
10422015-12-15 Marek Polacek <polacek@redhat.com>
1043
1044 PR c/68907
1045 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1046 artificial decl.
1047
a1b93f8d
DM
10482015-12-08 David Malcolm <dmalcolm@redhat.com>
1049
1050 * c-parser.c (c_parser_alignof_expression): Capture location of
1051 closing parenthesis (if any), or of end of unary expression, and
1052 use it to build a src_range for the expression.
1053
46c6e1e2
DM
10542015-12-08 David Malcolm <dmalcolm@redhat.com>
1055
1056 PR c/68757
1057 * c-parser.c (c_parser_get_builtin_args): Add
1058 "out_close_paren_loc" param, and write back to it.
1059 (c_parser_postfix_expression): Capture the closing
1060 parenthesis location for RID_CHOOSE_EXPR,
1061 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1062 RID_BUILTIN_SHUFFLE and use it to set the source range
1063 for such expressions; within RID_BUILTIN_COMPLEX set
1064 the underlying location.
1065
66189108
MP
10662015-12-07 Marek Polacek <polacek@redhat.com>
1067
1068 PR c/68668
1069 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1070 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1071
f187980b
EB
10722015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1073
1074 * c-tree.h (c_build_va_arg): Adjust prototype.
1075 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1076 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1077 parameter, adjust throughout and issue an error if EXPR is a component
1078 with reverse storage order.
1079
4250754e
JM
10802015-12-02 Jason Merrill <jason@redhat.com>
1081
1082 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1083 (c_fully_fold_internal, decl_constant_value_for_optimization):
1084 Move from c-common.c.
1085 * c-tree.h: Declare decl_constant_value_for_optimization.
1086 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1087
e9e32ee6
JM
10882015-12-02 Joseph Myers <joseph@codesourcery.com>
1089
1090 PR c/68162
1091 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1092 following link from declarator to next declarator. Track original
1093 qualified type and pass it to c_build_qualified_type.
1094 * c-typeck.c (c_build_qualified_type): Add arguments
1095 orig_qual_type and orig_qual_indirect.
1096
ff7a55bf
TS
10972015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1098
1099 * c-parser.c (c_parser_omp_clause_name)
1100 (c_parser_oacc_all_clauses): Alphabetical sorting.
1101
657e4e47
JJ
11022015-12-02 Jakub Jelinek <jakub@redhat.com>
1103
1104 PR c/68533
1105 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1106 for diagnostics.
1107
37d5ad46
JB
11082015-12-01 Julian Brown <julian@codesourcery.com>
1109 Cesar Philippidis <cesar@codesourcery.com>
1110 James Norris <James_Norris@mentor.com>
1111
1112 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1113 (c_parser_oacc_clause_use_device): New function.
1114 (c_parser_oacc_all_clauses): Add use_device support.
1115 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1116 (c_parser_oacc_host_data): New function.
1117 (c_parser_omp_construct): Add host_data support.
1118 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1119 * c-typeck.c (c_finish_oacc_host_data): New function.
1120 (c_finish_omp_clauses): Add use_device support.
1121
a4850ce9
JH
11222015-11-29 Jan Hubicka <hubicka@ucw.cz>
1123
1124 PR c/67106
1125 * c-decl.c: Set TYPE_PACKED in variants.
1126
b58d3df2
ML
11272015-11-27 Martin Liska <mliska@suse.cz>
1128
1129 PR c++/68312
1130 * c-array-notation.c (fix_builtin_array_notation_fn):
1131 Use release_vec_vec instead of vec::release.
1132 (build_array_notation_expr): Likewise.
1133 (fix_conditional_array_notations_1): Likewise.
1134 (fix_array_notation_expr): Likewise.
1135 (fix_array_notation_call_expr): Likewise.
1136
aec17bfe
JJ
11372015-11-27 Jakub Jelinek <jakub@redhat.com>
1138
1139 PR c/63326
1140 * c-parser.c (c_parser_compound_statement_nostart): If
1141 last_label is true, use pragma_stmt instead of pragma_compound
1142 as second c_parser_pragma argument.
1143 (c_parser_omp_ordered, c_parser_omp_target_update,
1144 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1145 false as second argument to c_parser_skip_to_pragma_eol after
1146 diagnosing standalone directives used in pragma_stmt context.
1147
688c4de0
IV
11482015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1149
1150 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1151 with "if (ENABLE_OFFLOADING)".
1152
cbd03aee
DM
11532015-11-23 David Malcolm <dmalcolm@redhat.com>
1154
1155 PR objc/68438
1156 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1157 for various Objective-C constructs: Class.name syntax,
1158 @selector(), @protocol(), @encode(), and [] message syntax.
1159
a87a86e1
DM
11602015-11-20 David Malcolm <dmalcolm@redhat.com>
1161
1162 PR 62314
1163 * c-typeck.c (should_suggest_deref_p): New function.
1164 (build_component_ref): Special-case POINTER_TYPE when
1165 generating a "not a structure of union" error message, and
1166 suggest a "->" rather than a ".", providing a fix-it hint.
1167
8ece8dfb
DM
11682015-11-19 David Malcolm <dmalcolm@redhat.com>
1169
1170 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1171 candidate into a new function, find_closest_identifier.
1172
433068cc
MP
11732015-11-19 Marek Polacek <polacek@redhat.com>
1174
1175 PR c/68412
1176 * c-typeck.c (parser_build_binary_op): Properly handle
1177 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1178
bef08b71
DM
11792015-11-17 David Malcolm <dmalcolm@redhat.com>
1180
1181 * c-parser.c (set_c_expr_source_range): Bulletproof both
1182 overloaded implementations against NULL expr->value.
1183 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1184 values.
1185 (c_parser_unary_expression): Likewise when handling addresses of
1186 labels.
1187 (c_parser_postfix_expression): Likewise for statement expressions,
1188 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1189 __builtin_va_arg, and for __builtin_offset_of.
1190 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1191 src_range using the range of the braced initializer.
1192 (c_parser_transaction_expression): Set src_range for "ret" to a
1193 sane pair of values.
1194
fff77217
KY
11952015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1196
1197 * c-parser.c (c_finish_omp_declare_simd): Look for
1198 "simd" attribute as well. Update error message.
1199
1d899da2
TS
12002015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1201
1202 * c-parser.c (c_parser_omp_declare_target): Adjust.
1203
e4606348
JJ
12042015-11-14 Jakub Jelinek <jakub@redhat.com>
1205
1206 * c-typeck.c (c_finish_omp_clauses): Don't mark
1207 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1208
3e636daf
MP
12092015-11-14 Marek Polacek <polacek@redhat.com>
1210
1211 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1212 * c-typeck.c: Likewise.
1213
ebedc9a3
DM
12142015-11-13 David Malcolm <dmalcolm@redhat.com>
1215
1216 * c-decl.c (warn_defaults_to): Pass line_table to
1217 rich_location ctor.
1218 * c-errors.c (pedwarn_c99): Likewise.
1219 (pedwarn_c90): Likewise.
1220 * c-parser.c (set_c_expr_source_range): New functions.
1221 (c_token::get_range): New method.
1222 (c_token::get_finish): New method.
1223 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1224 based on the range from the start of the LHS to the end of the
1225 RHS.
1226 (c_parser_conditional_expression): Likewise, based on the range
1227 from the start of the cond.value to the end of exp2.value.
1228 (c_parser_binary_expression): Call set_c_expr_source_range on
1229 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1230 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1231 based on the cast_loc through to the end of the expr.
1232 (c_parser_unary_expression): Likewise, based on the
1233 op_loc through to the end of op.
1234 (c_parser_sizeof_expression) Likewise, based on the start of the
1235 sizeof token through to either the closing paren or the end of
1236 expr.
1237 (c_parser_postfix_expression): Likewise, using the token range,
1238 or from the open paren through to the close paren for
1239 parenthesized expressions.
1240 (c_parser_postfix_expression_after_primary): Likewise, for
1241 various kinds of expression.
1242 * c-tree.h (struct c_expr): Add field "src_range".
1243 (c_expr::get_start): New method.
1244 (c_expr::get_finish): New method.
1245 (set_c_expr_source_range): New decls.
1246 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1247 on ret for prefix unary ops.
1248 (parser_build_binary_op): Likewise, running from the start of
1249 arg1.value through to the end of arg2.value.
1250
ec8b536f
MP
12512015-11-13 Marek Polacek <polacek@redhat.com>
1252
1253 PR c/68320
1254 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1255
277fe616
DM
12562015-11-13 David Malcolm <dmalcolm@redhat.com>
1257
1258 * c-typeck.c: Include spellcheck.h.
1259 (lookup_field_fuzzy_find_candidates): New function.
1260 (lookup_field_fuzzy): New function.
1261 (build_component_ref): If the field was not found, try using
1262 lookup_field_fuzzy and potentially offer a suggestion.
1263
6e232ba4
JN
12642015-11-12 James Norris <jnorris@codesourcery.com>
1265 Joseph Myers <joseph@codesourcery.com>
1266
1267 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1268 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1269 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1270 and PRAGMA_OMP_CLAUSE_LINK.
1271 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1272 and PRAGMA_OACC_CLAUSE_LINK.
1273 (OACC_DECLARE_CLAUSE_MASK): New definition.
1274 (c_parser_oacc_declare): New function.
1275
9be4f715
MP
12762015-11-12 Marek Polacek <polacek@redhat.com>
1277
1278 PR c/67784
1279 * c-parser.c (c_parser_for_statement): Reclassify the token in
1280 a correct scope.
1281
e78bede6
MP
12822015-11-11 Marek Polacek <polacek@redhat.com>
1283
1284 PR c/68107
1285 PR c++/68266
1286 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1287 checking the size of an array.
1288
69f293c9
AM
12892015-11-11 Andrew MacLeod <amacleod@redhat.com>
1290
1291 * c-array-notation.c: Remove unused header files.
1292 * c-aux-info.c: Likewise.
1293 * c-convert.c: Likewise.
1294 * c-decl.c: Likewise.
1295 * c-errors.c: Likewise.
1296 * c-lang.c: Likewise.
1297 * c-objc-common.c: Likewise.
1298 * c-parser.c: Likewise.
1299 * c-typeck.c: Likewise.
1300 * gccspec.c: Likewise.
1301
3a40d81d
NS
13022015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1303 Cesar Philippidis <cesar@codesourcery.com>
1304 James Norris <jnorris@codesourcery.com>
1305 Julian Brown <julian@codesourcery.com>
1306 Nathan Sidwell <nathan@codesourcery.com>
1307
1308 c/
1309 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1310 routine arg.
1311 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1312 (c_parser_pragma): Parse 'acc routine'.
1313 (OACC_ROUTINE_CLAUSE_MARK): Define.
1314 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1315
fc402eec
AA
13162015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1317
1318 PR debug/67192
1319 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1320 location of the backward-goto to the start of the loop body.
1321
f6b0b3db
AA
13222015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1323
1324 PR debug/67192
1325 * c-parser.c (c_parser_while_statement): Finish the loop before
1326 parsing ahead for misleading indentation.
1327 (c_parser_for_statement): Likewise.
1328
ee45a32d
EB
13292015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1330
1331 * c-decl.c (finish_struct): If the structure has reverse storage
1332 order, rewrite the type of array fields with scalar component. Call
1333 maybe_apply_pragma_scalar_storage_order on entry.
1334 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1335 errors on bit-fields and reverse SSO here and not...
1336 (c_mark_addressable): ...here.
1337 (output_init_element): Adjust call to initializer_constant_valid_p.
1338 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1339
8a645150
DM
13402015-11-06 David Malcolm <dmalcolm@redhat.com>
1341
1342 * c-decl.c (warn_defaults_to): Update for change in signature
1343 of diagnostic_set_info.
1344 * c-errors.c (pedwarn_c99): Likewise.
1345 (pedwarn_c90): Likewise.
1346 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1347 for textinfo::set_location.
1348
7a5e4956
CP
13492015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1350 Thomas Schwinge <thomas@codesourcery.com>
1351 James Norris <jnorris@codesourcery.com>
1352
1353 * c-parser.c (c_parser_omp_clause_name): Add support for
1354 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1355 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1356 default(none) in OpenACC.
1357 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1358 arguments.
1359 (c_parser_oacc_clause_tile): New function.
1360 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1361 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1362 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1363 TILE}.
1364 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1365 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1366 FIRSTPRIVATE}.
1367 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1368 (c_parser_oacc_update): Update the error message for missing clauses.
1369 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1370 and OMP_CLAUSE_INDEPENDENT.
1371
bfcfbfa0
MP
13722015-11-05 Marek Polacek <polacek@redhat.com>
1373
1374 PR c/68090
1375 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1376 deal with pre-evaluation on invalid types.
1377
e01d41e5
JJ
13782015-11-05 Jakub Jelinek <jakub@redhat.com>
1379 Ilya Verbin <ilya.verbin@intel.com>
1380
1381 * c-parser.c: Include context.h and gimple-expr.h.
1382 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1383 monotonic together with nonmonotonic.
1384 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1385 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1386 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1387 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1388 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1389 expressions on combined target teams before the target.
1390 (c_parser_omp_declare_target): If decl has "omp declare target" or
1391 "omp declare target link" attribute, and cgraph or varpool node already
1392 exists, then set corresponding flags. Call c_finish_omp_clauses
1393 in the parenthesized extended-list syntax case.
1394 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1395 declare target.
1396 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1397 on OMP_CLAUSE_REDUCTION array sections.
1398 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1399 into the constant offset, or for variable low-bound using
1400 POINTER_PLUS_EXPR. For structure element based array sections use
1401 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1402 (c_finish_omp_clauses): Drop generic_field_head, structure
1403 elements are now always mapped even as array section bases,
1404 diagnose same var in data sharing and mapping clauses. Diagnose if
1405 linear step on declare simd is neither a constant nor a uniform
1406 parameter. Look through POINTER_PLUS_EXPR for array section
1407 reductions. Diagnose the same var or function appearing multiple
1408 times on the same directive. Fix up wording for the to clause if t
1409 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1410 modifier on kinds other than dynamic or guided or nonmonotonic
1411 modifier together with ordered clause.
1412
4bf9e5a8
TS
14132015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1414 Chung-Lin Tang <cltang@codesourcery.com>
1415
1416 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1417
2adfab87
AM
14182015-10-29 Andrew MacLeod <amacleod@redhat.com>
1419
1420 * c-array-notation.c: Reorder #include's and remove duplicates.
1421 * c-aux-info.c: Likewise.
1422 * c-convert.c: Likewise.
1423 * c-decl.c: Likewise.
1424 * c-errors.c: Likewise.
1425 * c-lang.c: Likewise.
1426 * c-objc-common.c: Likewise.
1427 * c-parser.c: Likewise.
1428 * c-typeck.c: Likewise.
1429
e922069e
JW
14302015-10-26 Jim Wilson <jim.wilson@linaro.org>
1431
1432 PR debug/66068
1433 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1434 after calling build_qualified_type.
1435
765dd391
CP
14362015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1437 Thomas Schwinge <thomas@codesourcery.com>
1438 James Norris <jnorris@codesourcery.com>
1439 Joseph Myers <joseph@codesourcery.com>
1440 Julian Brown <julian@codesourcery.com>
1441 Bernd Schmidt <bschmidt@redhat.com>
1442
1443 * c-parser.c (c_parser_oacc_shape_clause): New.
1444 (c_parser_oacc_simple_clause): New.
1445 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1446 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1447
88bae6f4
TS
14482015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1449 James Norris <jnorris@codesourcery.com>
1450 Cesar Philippidis <cesar@codesourcery.com>
1451
1452 PR c/64765
1453 PR c/64880
1454 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1455 parameters, and handle these. Adjust all users.
1456 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1457 into...
1458 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1459 all users.
1460 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1461 declare functions.
1462 (c_finish_omp_construct): Declare function.
1463 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1464 Merge functions into...
1465 (c_finish_omp_construct): ... this new function.
1466
a8fc2579
RB
14672015-10-22 Richard Biener <rguenther@suse.de>
1468
1469 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1470 before folding a MINUS_EXPR.
1471
e9122ef6
MP
14722015-10-21 Marek Polacek <polacek@redhat.com>
1473
1474 PR c/68024
1475 * c-decl.c (start_function): Warn about vararg functions without
1476 a prototype.
1477
9f47c7e5
IE
14782015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1479
1480 * c-typeck.c (build_conditional_expr): Use boolean vector
1481 type for vector comparison.
1482 (build_vec_cmp): New.
1483 (build_binary_op): Use build_vec_cmp for comparison.
1484
fa60eeb9
MP
14852015-10-20 Marek Polacek <polacek@redhat.com>
1486
1487 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1488
2c7020eb
MP
14892015-10-20 Marek Polacek <polacek@redhat.com>
1490
1491 PR c/67964
1492 * c-parser.c (c_parser_attributes): Break out of the loop if the
1493 token after an attribute isn't a comma.
1494
d9a6bd32
JJ
14952015-10-13 Jakub Jelinek <jakub@redhat.com>
1496 Aldy Hernandez <aldyh@redhat.com>
1497
1498 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1499 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1500 (c_parser_omp_variable_list): Handle structure elements for
1501 map, to and from clauses. Handle array sections in reduction
1502 clause. Formatting fixes.
1503 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1504 if clause modifiers.
1505 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1506 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1507 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1508 c_parser_omp_clause_is_device_ptr): New functions.
1509 (c_parser_omp_clause_ordered): Parse optional parameter.
1510 (c_parser_omp_clause_reduction): Handle array reductions.
1511 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1512 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1513 functions.
1514 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1515 (c_parser_omp_clause_depend_sink): New function.
1516 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1517 (c_parser_omp_clause_map): Parse release/delete map kinds and
1518 optional always modifier.
1519 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1520 and c_finish_omp_clauses callers.
1521 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1522 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1523 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1524 (OMP_CRITICAL_CLAUSE_MASK): Define.
1525 (c_parser_omp_critical): Parse critical clauses.
1526 (c_parser_omp_for_loop): Handle doacross loops, adjust
1527 c_finish_omp_for and c_finish_omp_clauses callers.
1528 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1529 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1530 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1531 (c_parser_omp_for): Disallow ordered clause when combined with
1532 distribute. Disallow linear clause when combined with distribute
1533 and not combined with simd.
1534 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1535 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1536 parse clauses and if depend clause is found, don't parse a body.
1537 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1538 Allow target parallel without for after it.
1539 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1540 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1541 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1542 invalid kinds.
1543 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1544 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1545 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1546 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1547 functions.
1548 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1549 defaultmap and is_device_ptr clauses.
1550 (c_parser_omp_target): Parse target parallel and target simd. Set
1551 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1552 and target exit data. Diagnose invalid map kinds.
1553 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1554 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1555 construct.
1556 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1557 &omp_priv.
1558 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1559 (c_parser_omp_taskloop): New function.
1560 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1561 handle PRAGMA_OMP_TASKLOOP.
1562 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1563 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1564 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1565 Add IS_OMP argument, handle structure element bases, diagnose
1566 bitfields, pass IS_OMP recursively, diagnose known zero length
1567 array sections in depend clauses, handle array sections in reduction
1568 clause, diagnose negative length even for pointers.
1569 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1570 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1571 array sections in reduction clause, set
1572 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1573 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1574 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1575 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1576
21ba0cea
MP
15772015-10-06 Marek Polacek <polacek@redhat.com>
1578
1579 * c-parser.c (c_parser_statement_after_labels): Use
1580 protected_set_expr_location.
1581 (c_parser_omp_clause_num_gangs): Likewise.
1582 (c_parser_omp_clause_num_threads): Likewise.
1583 (c_parser_omp_clause_num_workers): Likewise.
1584 (c_parser_omp_clause_vector_length): Likewise.
1585 (c_parser_omp_clause_num_teams): Likewise.
1586 (c_parser_omp_clause_thread_limit): Likewise.
1587 * c-typeck.c (build_c_cast): Likewise.
1588 (c_cast_expr): Likewise.
1589
624d31fe
RS
15902015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1591
1592 * c-typeck.c (c_tree_equal): Use real_equal instead of
1593 REAL_VALUES_EQUAL.
1594
b8fd7909
JM
15952015-10-04 Jason Merrill <jason@redhat.com>
1596
1597 * c-parser.c (c_lex_one_token): Handle @synchronized.
1598 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1599 can change whether the function is transaction_safe.
1600
1c7485af
MP
16012015-10-02 Marek Polacek <polacek@redhat.com>
1602
1603 PR c/67730
1604 * c-typeck.c (convert_for_assignment): Use the expansion point
1605 location throughout.
1606
3e3b8d63
MP
16072015-10-02 Marek Polacek <polacek@redhat.com>
1608
1609 PR c/64249
1610 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1611 and pass it down to c_parser_if_statement.
1612 (c_parser_else_body): Add CHAIN parameter and pass it down to
1613 c_parser_statement_after_labels.
1614 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1615 duplicated if-else-if conditions.
1616
aabef2de
MP
16172015-10-01 Marek Polacek <polacek@redhat.com>
1618
1619 * c-typeck.c (convert_for_assignment): Improve commentary.
1620
de8ddd5f
MP
16212015-09-30 Marek Polacek <polacek@redhat.com>
1622
1623 PR c/67730
1624 * c-typeck.c (c_finish_return): Use the expansion point location for
1625 certain "return with value" warnings.
1626
c4914de6
MLI
16272015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1628
1629 * c-parser.c (pragma_lex): Add loc argument.
1630
0e36f5c7
MP
16312015-09-15 Marek Polacek <polacek@redhat.com>
1632
1633 PR c/67580
1634 * c-decl.c (tag_exists_p): New function.
1635 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1636 struct/union/enum keywords are missing.
1637 * c-tree.h (tag_exists_p): Declare.
1638
2f3bb934
MP
16392015-09-15 Marek Polacek <polacek@redhat.com>
1640
1641 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1642 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1643 Return NULL_TREE instead of 0.
1644 (lookup_name): Return NULL_TREE instead of 0.
1645 (lookup_name_in_scope): Likewise.
1646 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1647 (parser_xref_tag): Use false instead of 0.
1648 (start_struct): Use true instead of 1.
1649 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1650
aa256c4a
MP
16512015-09-14 Marek Polacek <polacek@redhat.com>
1652
1653 * c-typeck.c (set_nonincremental_init_from_string): Use
1654 HOST_WIDE_INT_M1U when shifting a negative value.
1655
dbb68221
MW
16562015-09-09 Mark Wielaard <mjw@redhat.com>
1657
1658 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1659 parm against NULL.
1660
a8a098ac
JJ
16612015-09-10 Jakub Jelinek <jakub@redhat.com>
1662
1663 PR c/67502
1664 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1665 into OMP_FOR_PRE_BODY rather than before the loop.
1666
f4b189d5
JJ
16672015-09-09 Jakub Jelinek <jakub@redhat.com>
1668
0bb99c11
JJ
1669 PR c/67501
1670 * c-parser.c (c_parser_oacc_all_clauses,
1671 c_parser_omp_all_clauses): Remove invalid clause from
1672 list of clauses even if parser->error is set.
1673
fce5e5e3
JJ
1674 PR c/67500
1675 * c-parser.c (c_parser_omp_clause_aligned,
1676 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1677 test for errors.
1678 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1679 error_mark_node.
1680
f4b189d5
JJ
1681 PR c/67495
1682 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1683 instead of c_parser_unary_expression. If the result is !lvalue_p,
1684 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1685
b2aaf235
MP
16862015-09-04 Marek Polacek <polacek@redhat.com>
1687
1688 PR sanitizer/67279
1689 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1690
1807ffc1
MS
16912015-09-03 Martin Sebor <msebor@redhat.com>
1692
1693 PR c/66516
8b652e65
JJ
1694 * c-typeck.c (convert_arguments, parser_build_unary_op,
1695 build_conditional_expr, c_cast_expr, convert_for_assignment,
1696 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1697 reject_gcc_builtin.
1698 (c_decl_implicit): Define.
1699
d04ff417
MP
17002015-09-02 Marek Polacek <polacek@redhat.com>
1701
1702 PR c/67432
1703 * c-parser.c (c_parser_enum_specifier): Give a better error for
1704 an empty enum.
1705
a79683d5
TS
17062015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1707
1708 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1709
191a6b94
MP
17102015-08-12 Marek Polacek <polacek@redhat.com>
1711
1712 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1713 LOC to it.
1714
420a9d9b
MP
17152015-08-03 Marek Polacek <polacek@redhat.com>
1716
1717 PR c/67088
1718 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1719 Use it.
1720 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1721
992118a1
PP
17222015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1723
1724 * c-parser.c (c_parser_if_body): Take token_indent_info
1725 argument. Call warn_for_misleading_indentation even when the
1726 body is a semicolon. Extract token_indent_infos corresponding
1727 to the guard, body and next tokens. Adjust call to
1728 warn_for_misleading_indentation accordingly.
1729 (c_parser_else_body): Likewise.
1730 (c_parser_if_statement): Likewise.
1731 (c_parser_while_statement): Likewise.
1732 (c_parser_for_statement): Likewise.
1733
46308474
LFSM
17342015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1735 Manuel López-Ibáñez <manu@gcc.gnu.org>
1736
1737 * c-decl.c (get_parm_info): Remove static var. Update warning
1738 message.
1739
05b28fd6
MP
17402015-07-27 Marek Polacek <polacek@redhat.com>
1741
1742 PR c++/66555
1743 PR c/54979
1744 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1745
451b5e48
MP
17462015-07-20 Marek Polacek <polacek@redhat.com>
1747
1748 PR c++/55095
1749 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1750 (build_binary_op): Warn about left shift overflows.
1751
1916bcb5
AM
17522015-07-09 Andrew MacLeod <amacleod@redhat.com>
1753
1754 * c-array-notation.c: Adjust includes for flags.h changes.
1755 * c-objc-common.c: Likewise.
1756
c7131fb2
AM
17572015-07-07 Andrew MacLeod <amacleod@redhat.com>
1758
1759 * c-array-notation.c: Adjust includes.
1760 * c-aux-info.c: Likewise.
1761 * c-convert.c: Likewise.
1762 * c-decl.c: Likewise.
1763 * c-errors.c: Likewise.
1764 * c-lang.c: Likewise.
1765 * c-objc-common.c: Likewise.
1766 * c-parser.c: Likewise.
1767 * c-typeck.c: Likewise.
1768
da2e71c9
MLI
17692015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1770
1771 PR fortran/66605
1772 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1773
b155cfd9
MP
17742015-06-29 Marek Polacek <polacek@redhat.com>
1775
1776 PR c/66322
1777 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1778 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1779 about -Wswitch-bool here.
1780 (do_case): Update c_add_case_label call.
1781 (c_finish_case): Update c_do_switch_warnings call.
1782
31521951
MP
17832015-06-27 Marek Polacek <polacek@redhat.com>
1784
1785 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1786
22d03525
MP
17872015-06-26 Marek Polacek <polacek@redhat.com>
1788
1789 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1790 INDIRECT_REF_P.
1791 * c-typeck.c (array_to_pointer_conversion): Likewise.
1792 (build_unary_op): Likewise.
1793 (c_finish_return): Likewise.
1794
f0889939
AM
17952015-06-25 Andrew MacLeod <amacleod@redhat.com>
1796
1797 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1798 * c-parser.c: Likewise.
1799
8d67ee55
RS
18002015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1801
1802 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1803 instead of pointer_hash.
1804 (detect_field_duplicates): Likewise.
1805
0ae9bd27
MP
18062015-06-25 Marek Polacek <polacek@redhat.com>
1807
1808 * c-array-notation.c: Use VAR_P throughout.
1809 * c-decl.c: Likewise.
1810 * c-objc-common.c: Likewise.
1811 * c-parser.c: Likewise.
1812 * c-typeck.c: Likewise.
1813
62f9079a
MP
18142015-06-25 Marek Polacek <polacek@redhat.com>
1815
1816 * c-decl.c: Use is_global_var throughout.
1817 * c-parser.c: Likewise.
1818 * c-typeck.c: Likewise.
1819
abb226c9
AM
18202015-06-17 Andrew MacLeod <amacleod@redhat.com>
1821
1822 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1823 * c-aux-info.c: Likewise.
1824 * c-convert.c: Likewise.
1825 * c-decl.c: Likewise.
1826 * c-errors.c: Likewise.
1827 * c-lang.c: Likewise.
1828 * c-objc-common.c: Likewise.
1829 * c-parser.c: Likewise.
1830 * c-typeck.c: Likewise.
1831
8cbababc
JH
18322015-06-11 Jan Hubicka <hubicka@ucw.cz>
1833
1834 PR middle-end/66325
1835 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1836 variants.
1837
a0349665
PMR
18382015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1839
1840 * c-decl.c (pop_scope): Register the main translation unit
1841 through the new debug hook.
1842
13fdf2e2
AM
18432015-06-08 Andrew MacLeod <amacleod@redhat.com>
1844
1845 * c-array-notation.c : Adjust include files.
1846 * c-aux-info.c : Likewise.
1847 * c-convert.c : Likewise.
1848 * c-decl.c : Likewise.
1849 * c-errors.c : Likewise.
1850 * c-lang.c : Likewise.
1851 * c-lang.h : Likewise.
1852 * c-objc-common.c : Likewise.
1853 * c-parser.c : Likewise.
1854 * c-typeck.c : Likewise.
1855
d7438551
AH
18562015-06-05 Aldy Hernandez <aldyh@redhat.com>
1857
1858 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1859 immediately clobber it.
1860 (c_write_global_declarations_1): Remove call to
1861 check_global_declaration_1.
1862 (c_write_global_declarations_2): Remove.
1863 (c_write_final_cleanups): Rename from c_write_global_declarations.
1864 Remove call to finalize_compilation_unit.
1865 Remove calls to debugging hooks.
1866 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1867 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1868 * c-tree.h: Remove c_write_global_declarations.
1869
ecb9f223
AM
18702015-06-04 Andrew MacLeod <amacleod@redhat.com>
1871
1872 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1873 * c-aux-info.c: Likewise.
1874 * c-convert.c: Likewise.
1875 * c-decl.c: Likewise.
1876 * c-errors.c: Likewise.
1877 * c-lang.c: Likewise.
1878 * c-objc-common.c: Likewise.
1879 * c-parser.c: Likewise.
1880 * c-typeck.c: Likewise.
1881
9482b620
MP
18822015-06-04 Marek Polacek <polacek@redhat.com>
1883
1884 PR c/66341
1885 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1886 it is a lvalue.
1887
bc51ace3
PK
18882015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1889
1890 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1891 Warn for empty struct.
1892 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1893
ea5b45b6
AT
18942015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1895
1896 * c-decl.c (start_function): Call plugin before parsing.
1897 (finish_function): Call plugin after parsing.
1898
c2d47482
PK
18992015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1900
1901 PR c/49551
1902 * c-decl.c (merge_decls): Merge DECL_COMMON.
1903
a95492ab
JW
19042015-05-22 Jim Wilson <jim.wilson@linaro.org>
1905
1906 * Make-lang.in (check_gcc_pallelize): Define.
1907
fd5c817a
MP
19082015-05-22 Marek Polacek <polacek@redhat.com>
1909
1910 PR c/47043
1911 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1912 attributes.
1913
c7b70a3c
MP
19142015-05-21 Marek Polacek <polacek@redhat.com>
1915
1916 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1917 DECL_BUILT_IN.
1918
21b634ae
MP
19192015-05-20 Marek Polacek <polacek@redhat.com>
1920
1921 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1922 * c-typeck.c: Likewise.
1923
296a8c2f
MP
19242015-05-19 Marek Polacek <polacek@redhat.com>
1925
1926 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1927
41b37d5e
JJ
19282015-05-19 Jakub Jelinek <jakub@redhat.com>
1929
1930 PR middle-end/66199
1931 * c-parser.c (c_parser_omp_for_loop): Don't add
1932 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1933 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1934 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1935 constructs.
1936
fab27f52
MM
19372015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1938
1939 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 1940 swaps.
fab27f52 1941
40de31cf
MLI
19422015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1943
1944 PR fortran/44054
1945 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1946 accessor function.
1947
3aa3c9fc
MP
19482015-05-14 Marek Polacek <polacek@redhat.com>
1949
1950 PR c/66066
1951 PR c/66127
1952 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1953 rather than with 0.
1954
c3388e62
DM
19552015-05-12 David Malcolm <dmalcolm@redhat.com>
1956
1957 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1958 to add a call to warn_for_misleading_indentation.
1959 (c_parser_else_body): Likewise, adding param "else_loc".
1960 (c_parser_if_statement): Check for misleading indentation.
1961 (c_parser_while_statement): Likewise.
1962 (c_parser_for_statement): Likewise.
1963
755e528f
MP
19642015-05-08 Marek Polacek <polacek@redhat.com>
1965
1966 PR c/64918
1967 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1968 (output_init_element): Likewise.
1969
0173bd2a
MP
19702015-05-07 Marek Polacek <polacek@redhat.com>
1971
1972 PR c/65179
1973 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1974 value.
1975
9babc352
MP
19762015-04-30 Marek Polacek <polacek@redhat.com>
1977
1978 * c-typeck.c (set_init_label): Call error_at instead of error and
1979 pass LOC to it.
1980
ac9f18db
MP
1981 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1982 the type of a decl.
1983
ec3fba51
MP
1984 * c-typeck.c (c_build_va_arg): Clarify the error message.
1985
b811915d
TS
19862015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1987
1988 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1989 OMP_STANDALONE_CLAUSES.
1990
f3075008
MP
19912015-04-28 Marek Polacek <polacek@redhat.com>
1992
1993 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1994
4e81b788
MP
19952015-04-28 Marek Polacek <polacek@redhat.com>
1996
1997 PR c/65901
1998 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1999
6c1db78e
MP
20002015-04-25 Marek Polacek <polacek@redhat.com>
2001
2002 PR c/52085
2003 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
2004 attribute.
2005
5c4abbb8
MP
20062015-04-23 Marek Polacek <polacek@redhat.com>
2007
2008 PR c/65345
2009 * c-decl.c (set_labels_context_r): New function.
2010 (store_parm_decls): Call it via walk_tree_without_duplicates.
2011 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
2012 instead of create_tmp_var. Build TARGET_EXPR instead of
2013 COMPOUND_EXPR.
2014 (build_atomic_assign): Use create_tmp_var_raw instead of
2015 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
2016
06aca1d5
IV
20172015-04-20 Ilya Verbin <ilya.verbin@intel.com>
2018
2019 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
2020 (c_parser_omp_target_update): Add missed %> to error_at ().
2021
8fba1830
BRF
20222015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
2023
2024 PR target/55143
2025 * c-decl.c (c_default_pointer_mode): Remove definition.
2026 * c-tree.h (c_default_pointer_mode): Remove declaration.
2027
62021f64
TB
20282015-03-27 Tobias Burnus <burnus@net-b.de>
2029
2030 PR c/65586
2031 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
2032 error out.
2033 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
2034 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
2035 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
2036
9b65e171
JJ
20372015-03-19 Jakub Jelinek <jakub@redhat.com>
2038
2039 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2040 attribute for DECL_EXTERNAL VAR_DECLs.
2041
17958621
JJ
20422015-03-11 Jakub Jelinek <jakub@redhat.com>
2043
2044 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2045 argument.
2046
7ccb1a11
JJ
20472015-03-10 Jakub Jelinek <jakub@redhat.com>
2048
2049 PR c/65120
2050 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2051 before preparing arguments to warn_logical_not_parentheses.
2052
01177669
JJ
20532015-03-09 Jakub Jelinek <jakub@redhat.com>
2054
2055 PR c/65120
2056 * c-typeck.c (parser_build_binary_op): Don't warn for
2057 !!x == y or !b == y where b is _Bool.
2058
802ac282
MP
20592015-03-09 Marek Polacek <polacek@redhat.com>
2060
2061 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2062 * c-decl.c (grokdeclarator): Likewise.
2063 * c-typeck.c (build_binary_op): Likewise.
2064
e5165b60
MP
20652015-02-27 Marek Polacek <polacek@redhat.com>
2066
2067 PR c/65228
2068 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2069
065d214c
MP
20702015-02-14 Marek Polacek <polacek@redhat.com>
2071
2072 PR c/64768
2073 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2074 declared through a typedef name.
2075
e5d9235b
MP
20762015-02-13 Marek Polacek <polacek@redhat.com>
2077
2078 PR c/65050
2079 * c-decl.c (grokdeclarator): Print also the type when giving
2080 the error message about array's incomplete element type.
2081
fa01ffcc
JJ
20822015-02-11 Jakub Jelinek <jakub@redhat.com>
2083
2084 PR c/64824
2085 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2086 check in the POP macro.
2087
c3e38a03
MP
20882015-02-09 Marek Polacek <polacek@redhat.com>
2089
2090 PR c/64856
2091 * c-typeck.c (process_init_element): Don't always wrap
2092 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2093 initializing a range of elements.
2094
4886ec8e
JJ
20952015-02-04 Jakub Jelinek <jakub@redhat.com>
2096
2097 PR c/64824
2098 PR c/64868
2099 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2100
c3e38a03 21012015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2102
2103 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2104 processing enum declaration.
2105
7b33f0c8
MP
21062015-01-29 Marek Polacek <polacek@redhat.com>
2107
2108 PR c/64709
2109 * c-typeck.c (pop_init_level): If constructor_elements has
2110 exactly one element with integer_zerop value, set constructor_zeroinit
2111 to 1. Remove braces around warning_init call.
2112
dea63e49
JJ
21132015-01-27 Jakub Jelinek <jakub@redhat.com>
2114
2115 PR c/64766
2116 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2117 of FUNCTION_DECLs with error_mark_node.
2118
d38f7dce
JJ
21192015-01-26 Jakub Jelinek <jakub@redhat.com>
2120
2121 PR c/64778
2122 * c-typeck.c (convert_arguments): Return -1 if there are
2123 error_args, even if we've diagnosed too many arguments.
2124
cbf5d0e7
RB
21252015-01-21 Richard Biener <rguenther@suse.de>
2126
2127 PR middle-end/64313
2128 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2129 for builtins the user declared correctly.
2130
41dbbb37
TS
21312015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2132 Bernd Schmidt <bernds@codesourcery.com>
2133 Cesar Philippidis <cesar@codesourcery.com>
2134 James Norris <jnorris@codesourcery.com>
2135 Jakub Jelinek <jakub@redhat.com>
2136 Ilmir Usmanov <i.usmanov@samsung.com>
2137
2138 * c-parser.c: Include "gomp-constants.h".
2139 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2140 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2141 Use OMP_CLAUSE_SET_MAP_KIND.
2142 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2143 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2144 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2145 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2146 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2147 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2148 "copyout", "create", "delete", "deviceptr", "gang", "host",
2149 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2150 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2151 "present_or_create", "pcreate", "seq", "self", "vector",
2152 "vector_length", "wait", "worker".
2153 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2154 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2155 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2156 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2157 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2158 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2159 (c_parser_oacc_data_clause_deviceptr)
2160 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2161 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2162 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2163 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2164 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2165 (c_parser_oacc_parallel, c_parser_oacc_update)
2166 (c_parser_oacc_wait): New functions.
2167 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2168 (c_finish_oacc_data): New prototypes.
2169 * c-typeck.c: Include "gomp-constants.h".
2170 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2171 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2172 OMP_CLAUSE_SET_MAP_KIND.
2173 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2174 (c_finish_oacc_data): New functions.
2175 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2176 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2177 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2178 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2179 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2180 GOMP_MAP_FORCE_DEVICEPTR.
2181
adfac8df
JJ
21822015-01-09 Michael Collison <michael.collison@linaro.org>
2183
2184 * c-array-notation.c: Include hash-set.h, machmode.h,
2185 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2186 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2187 * c-aux-info.c: Ditto.
2188 * c-convert.c: Ditto.
2189 * c-decl.c: Ditto.
2190 * c-errors.c: Ditto.
2191 * c-lang.c: Dittoxs.
2192 * c-objc-common.c: Ditto.
2193 * c-parser.c: Ditto.
2194 * c-typeck.c: Include hash-set.h, machmode.h,
2195 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2196 fold-const.h, wide-int.h, inchash.h, real.h and
2197 fixed-value.h due to flattening of tree.h.
2198
2cc901dc
MP
21992015-01-07 Marek Polacek <polacek@redhat.com>
2200
2201 PR c/64417
2202 * c-typeck.c (process_init_element): Disallow initialization of
2203 a flexible array member with a string constant if the structure
2204 is in an array.
2205
5624e564
JJ
22062015-01-05 Jakub Jelinek <jakub@redhat.com>
2207
e5341100
JJ
2208 PR sanitizer/64344
2209 * c-typeck.c (convert_for_assignment, c_finish_return): For
2210 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2211 types also set in_late_binary_op around convert call.
2212 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2213 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2214 result on expr as last argument to ubsan_instrument_float_cast,
2215 if in_late_binary_op, don't use c_save_expr but save_expr.
2216
5624e564
JJ
2217 Update copyright years.
2218
5bd012f8
MP
22192015-01-05 Marek Polacek <polacek@redhat.com>
2220
2221 PR c/64423
2222 * c-typeck.c (build_array_ref): Pass loc down to
2223 warn_array_subscript_with_type_char.
2224
3f8257db 22252014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2226
2227 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2228 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2229 element type.
8e745a17 2230 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2231 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2232 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2233 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2234 to PEDWARN_FOR_QUALIFIERS.
768952be 2235
8f94a8c4
JJ
22362014-12-17 Jakub Jelinek <jakub@redhat.com>
2237
2238 PR sanitizer/64289
2239 * c-convert.c: Include ubsan.h.
2240 (convert): For real -> integral casts and
2241 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2242 instead instrument the float cast directly.
2243
b731b390
JJ
22442014-11-29 Jakub Jelinek <jakub@redhat.com>
2245
2246 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2247 c_finish_stmt_expr): Remove NULL last argument from
2248 create_tmp_var_raw and create_tmp_var calls.
2249 * c-array-notation.c (fix_builtin_array_notation_fn,
2250 build_array_notation_expr, fix_conditional_array_notations_1,
2251 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2252
541e35a6
MP
22532014-11-28 Marek Polacek <polacek@redhat.com>
2254
2255 PR c/63862
2256 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2257 convert the right operand to integer type.
2258
b286be94
MP
22592014-11-25 Marek Polacek <polacek@redhat.com>
2260
2261 PR c/63877
2262 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2263 for inline functions.
2264
aa7da51a
JJ
22652014-11-21 Jakub Jelinek <jakub@redhat.com>
2266
2267 PR target/63764
2268 * c-typeck.c (build_array_ref): Adjust
2269 convert_vector_to_pointer_for_subscript caller. If it returns true,
2270 call non_lvalue_loc on the result.
2271
d876207f
RB
22722014-11-11 Richard Biener <rguenther@suse.de>
2273
2274 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2275 to true.
2276
e5e44252
AK
22772014-11-10 Andi Kleen <ak@linux.intel.com>
2278
2279 PR c/60804
2280 * c-parser.c (c_parser_statement_after_labels): Call
2281 check_no_cilk.
2282 (c_parser_if_statement): Dito.
2283 (c_parser_switch_statement): Dito.
2284 (c_parser_while_statement): Dito.
2285 (c_parser_do_statement): Dito.
2286 (c_parser_for_statement): Dito.
2287 * c-typeck.c (c_finish_loop): Dito.
2288
13c21655
PC
22892014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2290
2291 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2292 OPT_Wshift_count_overflow in the warnings.
2293
2d51fcef
MP
22942014-10-30 Marek Polacek <polacek@redhat.com>
2295
2296 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2297 print the stripped version as well, if they're not the same.
2298
ef4bddc2
RS
22992014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2300
2301 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2302 machine_mode.
2303
c582198b
AM
23042014-10-28 Andrew MacLeod <amacleod@redhat.com>
2305
2306 * c-decl.c: Adjust include files.
2307 * c-parser.c: Ditto.
2308
ddc8de03
PM
23092014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2310 Tom Tromey <tromey@redhat.com>
2311
2312 * c-tree.h (enum c_oracle_request): New.
2313 (c_binding_oracle_function): New typedef.
2314 (c_binding_oracle, c_pushtag, c_bind): Declare.
2315 * c-decl.c (c_binding_oracle): New global.
2316 (I_SYMBOL_CHECKED): New macro.
2317 (i_symbol_binding): New function.
2318 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2319 (I_TAG_CHECKED): New macro.
2320 (i_tag_binding): New function.
2321 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2322 (I_LABEL_CHECKED): New macro.
2323 (i_label_binding): New function.
2324 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2325 (c_print_identifier): Save and restore c_binding_oracle.
2326 (c_pushtag, c_bind): New functions.
2327
60393bbc
AM
23282014-10-27 Andrew MacLeod <amacleod@redhat.com>
2329
2330 * c-typeck.c: Adjust include files.
2331
d723bb7c
MLI
23322014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2333
2334 PR c++/53061
2335 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2336 initialization here...
2337 (c_initialize_diagnostics): ... but here. Set defaults after
2338 building pretty-printer.
2339
1bc5a451
MP
23402014-10-23 Marek Polacek <polacek@redhat.com>
2341
2342 PR c/63626
2343 * c-decl.c (pop_scope): Don't print warning in external_scope.
2344
4435bb92
MP
23452014-10-19 Marek Polacek <polacek@redhat.com>
2346
2347 PR c/63567
2348 * c-typeck.c (output_init_element): Allow initializing objects with
2349 static storage duration with compound literals even in C99 and add
2350 pedwarn for it.
2351
7278465e
MP
23522014-10-17 Marek Polacek <polacek@redhat.com>
2353
2354 PR c/63567
2355 * c-typeck.c (digest_init): Allow initializing objects with static
2356 storage duration with compound literals even in C99 and add pedwarn
2357 for it.
2358
d9b7be2e
MP
23592014-10-17 Marek Polacek <polacek@redhat.com>
2360
2361 PR c/63543
2362 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2363 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2364 error multiple times. Print the type.
2365
f406ae1f
MP
23662014-10-17 Marek Polacek <polacek@redhat.com>
2367
2368 PR c/63549
2369 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2370 type.
2371
92574c7c
MP
23722014-10-17 Marek Polacek <polacek@redhat.com>
2373
2374 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2375 (start_function): Use OPT_Wimplicit_int instead of 0.
2376 (store_parm_decls_oldstyle): Likewise.
2377
1bc4a978
MT
23782014-10-17 Alan Modra <amodra@gmail.com>
2379
2380 PR middle-end/61848
2381 * c-decl.c (merge_decls): Don't merge section name or tls model
2382 to newdecl symtab node, instead merge to olddecl. Override
2383 existing olddecl section name. Set tls_model for all thread-local
2384 vars, not just OMP thread-private ones. Remove incorrect comment.
2385
83685514
AM
23862014-10-16 Andrew MacLeod <amacleod@redhat.com>
2387
2388 * c-decl.c: Adjust include files.
2389
78a7c317
DD
23902014-10-14 DJ Delorie <dj@redhat.com>
2391
2392 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2393 (c_token_starts_typename): Check all __intN, not just __int128.
2394 (c_token_starts_declspecs): Likewise.
2395 (c_parser_declspecs): Likewise.
2396 (c_parser_attribute_any_word): Likewise.
2397 (c_parser_objc_selector): Likewise.
2398 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2399 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2400 is specified.
2401 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2402 __int128.
2403 (finish_declspecs): Likewise.
2404
74d98c1e
AB
24052014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2406
8e745a17 2407 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 2408 the duplicate code.
8e745a17 2409 (c_parser_statement): Call the new function.
74d98c1e 2410
84937de2
MP
24112014-10-09 Marek Polacek <polacek@redhat.com>
2412
2413 PR c/63480
2414 * c-typeck.c (pop_init_level): Don't warn about initializing
2415 with { }.
2416
0382aaa0
MP
24172014-10-07 Marek Polacek <polacek@redhat.com>
2418
2419 PR c/59717
2420 * c-decl.c (header_for_builtin_fn): New function.
2421 (implicitly_declare): Suggest which header to include.
2422
7a0ca710
MP
24232014-10-07 Marek Polacek <polacek@redhat.com>
2424
2425 * c-convert.c (convert): Use error_operand_p.
2426 * c-typeck.c (require_complete_type): Likewise.
2427 (really_atomic_lvalue): Likewise.
2428 (digest_init): Likewise.
2429 (handle_omp_array_sections_1): Likewise.
2430
6bc8a126
MP
24312014-10-03 Marek Polacek <polacek@redhat.com>
2432
2433 PR c/63453
2434 * c-decl.c (pop_scope): Don't warn about "inline function declared
2435 but never defined" for functions marked with gnu_inline attribute.
2436
d90c0a59
JJ
24372014-09-25 Jakub Jelinek <jakub@redhat.com>
2438
2439 PR c++/63249
2440 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2441 on low_bound and length.
2442
083e891e
MP
24432014-09-24 Marek Polacek <polacek@redhat.com>
2444
2445 PR c/61405
2446 PR c/53874
2447 * c-parser.c: Don't define CPP_KEYWORD.
2448 (c_parser_switch_statement): Pass original type to c_finish_case.
2449 * c-tree.h (c_finish_case): Update declaration.
2450 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2451 conditionally to c_do_switch_warnings.
2452
8d95fe25
MP
24532014-09-03 Marek Polacek <polacek@redhat.com>
2454
2455 PR c/62024
2456 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2457 conversions.
2458
9a771876
JJ
24592014-09-02 Jakub Jelinek <jakub@redhat.com>
2460 Balaji V. Iyer <balaji.v.iyer@intel.com>
2461 Igor Zamyatin <igor.zamyatin@intel.com>
2462
2463 * c-parser.c (c_parser_cilk_for): New function.
2464 (c_parser_cilk_grainsize): Likewise.
2465 (c_get_temp_regvar): Likewise.
2466 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2467 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2468 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2469 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2470 case.
2471
b7679d96
CG
24722014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2473
2474 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2475 with using HOST_WIDE_INT without truncation to 'int'
2476
59ea0364
MP
24772014-08-22 Marek Polacek <polacek@redhat.com>
2478
2479 PR c++/62199
2480 * c-typeck.c (parser_build_binary_op): Adjust call to
2481 warn_logical_not_parentheses.
2482
671a475e
IZ
24832014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2484
2485 PR other/62008
2486 * c-parser.c (c_parser_array_notation): Check for correct
2487 type of an array added.
2488
04159acf
MP
24892014-08-19 Marek Polacek <polacek@redhat.com>
2490
2491 PR c++/62153
2492 * c-typeck.c (build_binary_op): If either operand of a comparison
2493 is a boolean expression, call maybe_warn_bool_compare.
2494
c77935ee
PP
24952014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2496
2497 PR c/45584
2498 * c-typeck.c (build_c_cast): Do a conversion even when the
2499 TYPE_MAIN_VARIANTs are the same.
2500
35aff4fb
MP
25012014-08-19 Marek Polacek <polacek@redhat.com>
2502
2503 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2504 pedwarn_c99 instead of pedwarn.
2505 (grokfield): Likewise.
2506 (warn_defaults_to): New function.
2507 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2508 Unconditionally call pedwarn_c99 instead of pedwarn.
2509 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2510 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2511 check flag_isoc11 before.
2512 * c-errors.c (pedwarn_c99): Change the return type to bool.
2513 Handle -Wc99-c11-compat.
2514 * c-parser.c (disable_extension_diagnostics): Handle
2515 warn_c99_c11_compat.
2516 (restore_extension_diagnostics): Likewise.
2517 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2518 instead of pedwarn, don't check flag_isoc11 before.
2519 (c_parser_declspecs): Likewise.
2520 (c_parser_alignas_specifier): Likewise.
2521 (c_parser_alignof_expression): Likewise.
2522 (c_parser_generic_selection): Likewise.
2523 * c-tree.h (pedwarn_c99): Update declaration.
2524 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2525 of pedwarn_c99.
2526
177cce46
MP
25272014-08-19 Marek Polacek <polacek@redhat.com>
2528
2529 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2530 to pedwarn_c90.
2531 * c-errors.c: Include "opts.h".
2532 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2533 * c-parser.c (disable_extension_diagnostics): Handle negative value
2534 of warn_c90_c99_compat, too.
2535 (restore_extension_diagnostics): Likewise.
2536 (c_parser_compound_statement_nostart): Pass
2537 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2538
6dc99c33
MP
25392014-08-12 Marek Polacek <polacek@redhat.com>
2540
2541 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2542 Add pedwarn.
2543 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2544 Likewise.
2545 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2546
3f8257db 25472014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
2548
2549 PR c/51849
2550 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2551 Call pedwarn_c90 instead of pedwarn.
2552 (check_bitfield_type_and_width): Likewise.
2553 (declspecs_add_qual): Likewise.
2554 (declspecs_add_type): Likewise.
2555 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2556 Adjust to only call pedwarn_c90.
2557 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2558 pedwarn_c90 instead of pedwarn.
2559 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2560 * c-parser.c (disable_extension_diagnostics): Handle
2561 warn_c90_c99_compat.
2562 (restore_extension_diagnostics): Likewise.
2563 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2564 pedwarn_c90 instead of pedwarn.
2565 (c_parser_initelt): Likewise.
2566 (c_parser_postfix_expression): Likewise.
2567 (c_parser_postfix_expression_after_paren_type): Likewise.
2568 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2569 * c-tree.h: Fix formatting.
2570 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2571 pedwarn_c90 instead of pedwarn.
2572
9f25a338
TS
25732014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2574
2575 * c-typeck.c: Remove include of pointer-set.h.
2576
044331a8
MP
25772014-08-07 Marek Polacek <polacek@redhat.com>
2578
2579 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2580
b787e7a2
TS
25812014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2582
2583 * c-typeck.c: Use hash_map instead of pointer_map.
2584
6e2830c3
TS
25852014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2586
2587 * c-decl.c: Use hash_set instead of pointer_set.
2588
a7ee52fb
IZ
25892014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2590
2591 PR middle-end/61455
2592 * c-array-notation.c (expand_array_notations): Handling
2593 of DECL_EXPR added.
2594
b4dfdc11
MG
25952014-07-31 Marc Glisse <marc.glisse@inria.fr>
2596
2597 PR c++/60517
2598 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2599 a local variable.
2600
976d5a22
TT
26012014-07-30 Tom Tromey <tromey@redhat.com>
2602
2603 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2604 field.
2605 (really_start_incremental_init, push_init_level): Initialize
2606 designator_depth.
2607 (pop_init_level): Set global designator_depth.
2608 (process_init_element): Check for designated_init attribute.
2609
30281de2
MP
26102014-07-20 Marek Polacek <polacek@redhat.com>
2611
2612 PR c/61852
2613 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2614 (implicitly_declare): Pass location to implicit_decl_warning.
2615
b108f48f
JJ
26162014-07-14 Jakub Jelinek <jakub@redhat.com>
2617
2618 PR middle-end/61294
2619 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2620 If non-NULL, call c_parser_check_literal_zero.
2621 (c_parser_check_literal_zero): New function.
2622 (c_parser_postfix_expression_after_primary): Adjust
2623 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2624
773ec47f
MP
26252014-07-06 Marek Polacek <polacek@redhat.com>
2626
2627 PR c/6940
2628 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2629 * c-tree.h (C_ARRAY_PARAMETER): Define.
2630 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2631 function parameter.
2632
22e1cf1c 26332014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 2634 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
2635
2636 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2637 releasing symbol.
2638
52ec0ea3
MP
26392014-07-01 Marek Polacek <polacek@redhat.com>
2640
2641 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2642 instead of 0 to WARN_FOR_ASSIGNMENT.
2643
d5c3d343
MP
26442014-07-01 Marek Polacek <polacek@redhat.com>
2645
2646 PR c/58286
2647 * c-typeck.c (convert_for_assignment): Pass
2648 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2649
6a7253a4
MP
26502014-06-30 Marek Polacek <polacek@redhat.com>
2651
2652 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2653 has no_sanitize_undefined attribute.
2654
5e88a8f4
IZ
26552014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2656
2657 PR middle-end/57541
2658 * c-array-notation.c (fix_builtin_array_notation_fn):
2659 Check for 0 arguments in builtin call. Check that bultin argument is
2660 correct.
2661 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2662 index.
2663
9698b078
SH
26642014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2665
2666 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2667 qualifiers in __auto_type for atomic types.
2668 (c_parser_typeof_specifier): Discard all type qualifiers in
2669 __typeof__ for atomic types.
2670
6e07c515
MP
26712014-06-25 Marek Polacek <polacek@redhat.com>
2672
2673 PR c/61162
2674 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2675 the return expression to c_finish_return.
2676
da6f124d
JJ
26772014-06-25 Jakub Jelinek <jakub@redhat.com>
2678
2679 * c-typeck.c (c_finish_omp_clauses): Make sure
2680 OMP_CLAUSE_LINEAR_STEP has correct type.
2681
c203e8a7
TS
26822014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2683
2684 * c-decl.c: Adjust.
2685
56ad0e38
JJ
26862014-06-24 Jakub Jelinek <jakub@redhat.com>
2687
2688 * c-parser.c (c_parser_omp_for_loop): For
2689 #pragma omp parallel for simd move lastprivate clause from parallel
2690 to for rather than simd.
2691
47c2554f
MP
26922014-06-23 Marek Polacek <polacek@redhat.com>
2693
2694 * c-typeck.c (parser_build_binary_op): Don't call
2695 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2696
56363ffd
JH
26972014-06-15 Jan Hubicka <hubicka@ucw.cz>
2698
2699 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2700 * c-decl.c (merge_decls): Likewise.
2701
d7ff7ae5
MP
27022014-06-09 Marek Polacek <polacek@redhat.com>
2703
2704 PR c/36446
2705 * c-typeck.c (error_init): Call inform instead of error_at.
2706 (pedwarn_init): Call inform instead of pedwarn.
2707 (warning_init): Call inform instead of warning_at.
2708
24d047a3
JH
27092014-06-07 Jan Hubicka <hubicka@ucw.cz>
2710
2711 * c-decl.c (merge_decls): Use set_decl_section_name.
2712 (duplicate_decls): Remove node if it exists.
2713
9bac5cbb
G
27142014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2715
2716 PR c/53119
2717 * c-typeck.c (push_init_level, process_init_element,
2718 pop_init_level): Correct check for zero initialization, move
2719 missing brace warning to respect zero initialization.
2720
8ffcdea8
MP
27212014-06-05 Marek Polacek <polacek@redhat.com>
2722
2723 PR c/56724
2724 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2725
742938c9
MP
27262014-06-05 Marek Polacek <polacek@redhat.com>
2727
2728 PR c/49706
2729 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2730 on the left hand side operand of a comparison.
2731
6447c55d
MP
27322014-06-05 Marek Polacek <polacek@redhat.com>
2733
2734 PR c/48062
2735 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2736 Print note only if the warning was printed.
2737
9dc7743c
IZ
27382014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2739
2740 PR c/58942
2741 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2742 with a pointer.
2743
fedfecef
MP
27442014-06-03 Marek Polacek <polacek@redhat.com>
2745
2746 PR c/60439
2747 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2748 c_start_case.
2749 * c-tree.h (c_start_case): Update.
2750 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2751 switch condition has boolean value.
2752
9b2b7279
AM
27532014-06-02 Andrew MacLeod <amacleod@redhat.com>
2754
2755 * c-decl.c: Include builtins.h.
2756 * c-parser.c: Likewise.
2757
5c1bc275
MP
27582014-05-27 Marek Polacek <polacek@redhat.com>
2759
2760 PR c/56724
2761 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2762 error and warning calls to error_at and warning_at. Pass location of
2763 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2764 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2765 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2766
97563bc8
IZ
27672014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2768
2769 PR c/61191
2770 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2771 function parameters.
2772
aede2c10
JH
27732014-05-23 Jan Hubicka <hubicka@ucw.cz>
2774
2775 * c-decl.c (merge_decls): Preserve symtab node pointers.
2776 (duplicate_decls): Free new decl.
2777
edbba2ce
TS
27782014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2779
f3316c6d
TS
2780 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2781 initialization.
2782
edbba2ce
TS
2783 * c-parser.c (c_parser_omp_target): Return bool values.
2784
68c81f24
TS
27852014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2786
2787 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2788 num_teams_loc variable to num_thread_limit_loc.
2789
632f2871
RS
27902014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2791
2792 * c-array-notation.c (expand_array_notations): Use void_node
2793 instead of void_zero_node.
2794
766090c2
TS
27952014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2796
2797 * c-decl.c (finish_struct): Adjust.
2798 (finish_enum): Likewise.
2799 (bind): Adjust.
2800 (record_inline_static): Likewise.
2801 (push_scope): Likewise.
2802 (make_label): Likewise.
2803 (lookup_label_for_goto): Likewise.
2804 (finish_struct): Likewise.
2805 (finish_enum): Likewise.
2806 (store_parm_decls): Likewise.
2807 (c_push_function_context): Likewise.
2808 * c-lang.h: Remove usage of variable_size gty attribute.
2809 * c-parser.c (c_parse_init): Adjust.
2810 (c_parse_file): Likewise.
2811
2b107f6b
MP
28122014-05-13 Marek Polacek <polacek@redhat.com>
2813
2814 PR c/61162
2815 * c-typeck.c (convert_for_assignment): Pass location to
2816 WARN_FOR_ASSIGNMENT instead of input_location.
2817
d033409e
MP
28182014-05-10 Marek Polacek <polacek@redhat.com>
2819
2820 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2821 maybe_warn_string_init.
2822 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2823 maybe_warn_string_init.
2824 * c-tree.h (maybe_warn_string_init): Update declaration.
2825 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2826 Call pedwarn_init with loc instead of with input_location.
2827 (digest_init): Pass init_loc to maybe_warn_string_init.
2828 (pop_init_level): Call pedwarn_init with loc instead of with
2829 input_location.
2830 (set_init_index): Likewise.
2831 (process_init_element): Likewise.
2832
ea58ef42
MP
28332014-05-09 Marek Polacek <polacek@redhat.com>
2834
2835 PR c/61096
2836 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2837 (c_parser_initelt): Pass location to set_init_label. Pass array index
2838 location to set_init_index.
2839 * c-tree.h (push_init_level): Update declaration.
2840 (pop_init_level): Likewise.
2841 (set_init_index): Likewise.
2842 (set_init_label): Likewise.
2843 * c-typeck.c (error_init): Add location parameter. Call error_at
2844 instead of error.
2845 (digest_init): Pass init_loc to error_init.
2846 (really_start_incremental_init):
2847 (push_init_level): Add location parameter. Pass loc to pop_init_level
2848 and error_init.
2849 (pop_init_level): Likewise.
2850 (set_designator): Add location parameter. Pass loc to pop_init_level,
2851 push_init_level, and error_init.
2852 (set_init_index): Add location parameter. Pass loc to error_init and
2853 set_designator.
2854 (set_init_label): Likewise.
2855 (output_init_element): Pass loc to error_init.
2856 (process_init_element): Pass loc to error_init, pop_init_level,
2857 pedwarn_init, and push_init_level.
2858
661a0813
MP
28592014-05-09 Marek Polacek <polacek@redhat.com>
2860
2861 PR c/50459
2862 * c-parser.c (c_parser_attributes): Parse the arguments as an
2863 expression-list if the attribute takes identifier.
2864
2793eeab
MP
28652014-05-08 Marek Polacek <polacek@redhat.com>
2866
2867 PR c/61053
2868 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2869 TYPE_ALIGN_UNIT.
2870
f827930a
MP
28712014-05-08 Marek Polacek <polacek@redhat.com>
2872
2873 PR c/61077
2874 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2875 of main.
2876
1d60af08
KZ
28772014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2878 Mike Stump <mikestump@comcast.net>
2879 Richard Sandiford <rdsandiford@googlemail.com>
2880
2881 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2882 (finish_enum): Use wide-int interfaces.
2883 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2884 * c-typeck.c (build_c_cast): Likewise.
2885 (set_nonincremental_init_from_string): Likewise.
2886 (c_tree_equal): Likewise.
2887
a0e24419
MP
28882014-05-02 Marek Polacek <polacek@redhat.com>
2889
2890 PR c/25801
2891 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2892 Return size_one_node when the type is not complete.
2893 (pointer_diff): Remove comment.
2894 (build_unary_op): Improve error messages.
2895
19fc9faa
MP
28962014-05-02 Marek Polacek <polacek@redhat.com>
2897
2898 * c-typeck.c (c_finish_return): Separate warning_at calls.
2899
63bc4e87
MP
29002014-05-02 Marek Polacek <polacek@redhat.com>
2901
2902 * c-tree.h (error_init): Remove declaration.
2903 (pedwarn_init): Likewise.
2904 * c-typeck.c (error_init): Make static and move above.
2905 (pedwarn_init): Likewise.
2906 (warning_init): Move above.
2907 (maybe_warn_string_init): Likewise.
2908
4bd2511b
JL
29092014-05-01 Jeff Law <law@redhat.com>
2910
2911 Revert:
2912
2913 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2914 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2915 avoid goto.
2916
6a358dcb
MP
29172014-05-02 Marek Polacek <polacek@redhat.com>
2918
2919 PR c/60784
2920 * c-typeck.c (push_init_level): Set constructor_designated to
2921 p->designated for structures.
2922
ae5ebda4
MP
29232014-05-01 Marek Polacek <polacek@redhat.com>
2924
2925 PR c/60915
2926 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2927 function-definition has an attribute after the declarator.
2928
96b40f8d
MP
29292014-05-01 Marek Polacek <polacek@redhat.com>
2930
2931 PR c/60257
2932 * c-typeck.c (warning_init): Add location_t parameter. Call
2933 warning_at instead of warning.
2934 (push_init_level): Pass input_location to warning_init.
2935 (add_pending_init): Add location_t parameter. Pass loc to
2936 warning_init.
2937 (set_nonincremental_init): Pass input_location to add_pending_init.
2938 (set_nonincremental_init_from_string): Likewise.
2939 (output_init_element): Pass loc to warning_init and to
2940 add_pending_init.
2941
32e00768
MP
29422014-05-01 Marek Polacek <polacek@redhat.com>
2943
2944 PR c/43395
2945 * c-typeck.c (c_finish_return): Distinguish between label and variable
2946 when warning about returning local address.
2947
c9379ce2
MP
29482014-05-01 Marek Polacek <polacek@redhat.com>
2949
2950 PR c/29467
2951 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2952 in C89 mode.
2953
d00887e8
MP
29542014-05-01 Marek Polacek <polacek@redhat.com>
2955
2956 PR c/43245
2957 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2958 instead of 0 to WARN_FOR_QUALIFIERS.
2959
5436fa2e
MP
29602014-05-01 Marek Polacek <polacek@redhat.com>
2961
2962 PR c/56989
2963 * c-typeck.c (default_conversion): Use better location for
2964 error call.
2965
f8ed5150
MP
29662014-04-30 Marek Polacek <polacek@redhat.com>
2967
2968 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2969 also when SANITIZE_FLOAT_DIVIDE is on.
2970
8337d1db
MP
29712014-04-30 Marek Polacek <polacek@redhat.com>
2972
2973 PR c/60139
2974 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2975 and pedwarn_init. Use loc insted of input_location.
2976
c4bdc42f
MP
29772014-04-30 Marek Polacek <polacek@redhat.com>
2978
2979 PR c/60351
2980 * c-typeck.c (build_binary_op): Use location when warning about
2981 shift count.
2982
45484dcf
MP
29832014-04-25 Marek Polacek <polacek@redhat.com>
2984
2985 PR c/18079
2986 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2987 always_inline/noinline and hot/cold attributes.
2988
34cf811f
MP
29892014-04-25 Marek Polacek <polacek@redhat.com>
2990
2991 PR c/60114
2992 * c-parser.c (c_parser_initelt): Pass input_location to
2993 process_init_element.
2994 (c_parser_initval): Pass loc to process_init_element.
2995 * c-tree.h (process_init_element): Adjust declaration.
2996 * c-typeck.c (push_init_level): Pass input_location to
2997 process_init_element.
2998 (pop_init_level): Likewise.
2999 (set_designator): Likewise.
3000 (output_init_element): Add location_t parameter. Pass loc to
3001 digest_init.
3002 (output_pending_init_elements): Pass input_location to
3003 output_init_element.
3004 (process_init_element): Add location_t parameter. Pass loc to
3005 output_init_element.
3006
42056eac
JJ
30072014-04-24 Jakub Jelinek <jakub@redhat.com>
3008
3009 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
3010 atomic-clause, allow comma in between atomic-clause and
3011 seq_cst.
3012
e162a134
JJ
30132014-04-22 Jakub Jelinek <jakub@redhat.com>
3014
3015 PR c/59073
3016 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
3017 fails, don't set OM_PARALLEL_COMBINED and return NULL.
3018
2f6babac
IZ
30192014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
3020
3021 PR middle-end/60469
3022 * c-array-notation.c (fix_builtin_array_notation_fn): Use
3023 create_tmp_var instead build_decl for creating temps.
3024 (build_array_notation_expr): Likewise.
3025 (fix_conditional_array_notations_1): Likewise.
3026 (fix_array_notation_expr): Likewise.
3027 (fix_array_notation_call_expr): Likewise.
3028
8edbfaa6
JJ
30292014-03-28 Jakub Jelinek <jakub@redhat.com>
3030
3031 PR c++/60689
3032 * c-tree.h (c_build_function_call_vec): New prototype.
3033 * c-typeck.c (build_function_call_vec): Don't call
3034 resolve_overloaded_builtin here.
3035 (c_build_function_call_vec): New wrapper function around
3036 build_function_call_vec. Call resolve_overloaded_builtin here.
3037 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
3038 Call c_build_function_call_vec instead of build_function_call_vec.
3039 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3040 * c-decl.c (finish_decl): Likewise.
3041
7485aeea
MLI
30422014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3043
3044 PR c/55383
3045 * c-typeck.c: Use correct format string in cast-qual warning
3046
b17a8b07
TS
30472014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3048
3049 * c-decl.c (c_decl_attributes): Use
3050 lang_hooks.types.omp_mappable_type.
3051 * c-typeck.c (c_finish_omp_clauses): Likewise.
3052
3af9c5e9
MP
30532014-03-06 Marek Polacek <polacek@redhat.com>
3054
3055 PR c/60197
3056 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3057 of checking tree code.
3058
1c9f5f33
PK
30592014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3060
3061 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3062 (c_parser_parameter_declaration): Likewise.
3063
cc28fc7f
MP
30642014-02-19 Marek Polacek <polacek@redhat.com>
3065
3066 PR c/60195
3067 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3068 Call mark_exp_read on exp.value.
3069 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3070 TREE_ADDRESSABLE on old instead of val.
3071 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3072
b581c05c
PK
30732014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3074
3075 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3076 C_EXPR_APPEND by vec_safe_push.
3077 * c-tree.h (C_EXPR_APPEND): Remove.
3078
81e5eca8
MP
30792014-01-31 Marek Polacek <polacek@redhat.com>
3080
3081 PR c/59963
3082 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3083 build_function_call_vec.
3084 (build_function_call): Likewise.
3085 (build_atomic_assign): Likewise.
3086 (build_function_call_vec): Add arg_loc parameter. Use it.
3087 (convert_arguments): Likewise.
3088 (convert_for_assignment): Rename rhs_loc to expr_loc.
3089 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3090 (c_parser_objc_keywordexpr): Likewise.
3091 (c_parser_postfix_expression_after_primary): Call
3092 build_function_call_vec with expr_loc rather than op_loc.
3093 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3094 build_function_call_vec.
3095 (c_parser_expr_list): Add locations parameter. Fill it with locations
3096 of function arguments.
3097 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3098
68fca595
MP
30992014-01-30 Marek Polacek <polacek@redhat.com>
3100
3101 PR c/59940
3102 * c-typeck.c (build_function_call_vec): Use loc parameter.
3103 (convert_arguments): Add location parameter. Use it.
3104 (ep_convert_and_check): Likewise.
3105 (build_atomic_assign): Adjust convert_for_assignment call.
3106 (build_modify_expr): Likewise.
3107 (digest_init): Likewise.
3108 (c_finish_return): Likewise.
3109 (build_conditional_expr): Adjust ep_convert_and_check calls.
3110 (convert_for_assignment): Add rhs_loc parameter. Use it.
3111 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3112 calls.
3113
fa337f3a
RB
31142014-01-30 Richard Biener <rguenther@suse.de>
3115
3116 PR c/59905
3117 * c-typeck.c (build_function_call_vec): Do not replace calls
3118 to a function via an incompatible type with a runtime abort.
3119
b72271b9
BI
31202014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3121
3122 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3123 flag_enable_cilkplus with flag_cilkplus.
3124 (c_parser_direct_declarator_inner): Likewise.
3125 (c_parser_attribute_any_word): Likewise.
3126 (c_parser_attributes): Likewise.
3127 (c_parser_compound_statement): Likewise.
3128 (c_parser_statement_after_labels): Likewise.
3129 (c_parser_if_statement): Likewise.
3130 (c_parser_switch_statement): Likewise.
3131 (c_parser_do_statement): Likewise.
3132 (c_parser_for_statement): Likewise.
3133 (c_parser_unary_expression): Likewise.
3134 (c_parser_postfix_expression): Likewise.
3135 (c_parser_postfix_expression_after_primary): Likewise.
3136 (c_parser_postfix_expression_after_primary): Likewise.
3137 (c_parser_omp_clause_name): Likewise.
3138 (c_finish_omp_declare_simd): Likewise.
3139 (c_parser_cilk_verify_simd): Likewise.
3140 * c-typeck.c (build_array_ref): Likewise.
3141 (build_function_call_vec): Likewise.
3142 (convert_arguments): Likewise.
3143 (build_compound_expr): Likewise.
3144 (c_finish_return): Likewise.
3145 (c_finish_if_stmt): Likewise.
3146 (c_finish_loop): Likewise.
3147 (build_binary_op): Likewise.
3148
393e8e8b
MP
31492014-01-23 Marek Polacek <polacek@redhat.com>
3150
3151 PR c/59846
3152 * c-typeck.c (parser_build_binary_op): Use location instead of
3153 input_location.
3154 (build_binary_op): Pass location to shorten_compare.
3155
f04dda30
MP
31562014-01-23 Marek Polacek <polacek@redhat.com>
3157
3158 PR c/58346
3159 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3160 an empty aggregate.
3161
789eadcd
MP
31622014-01-23 Marek Polacek <polacek@redhat.com>
3163
3164 PR c/59871
3165 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3166 of a comma expression.
3167 (emit_side_effect_warnings): Likewise.
3168
40f14e9f
BI
31692014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3170
3171 PR c/59825
3172 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3173 function to use walk_tree and moved a lot of its functionality to
3174 expand_array_notations.
3175 (expand_array_notations): New function.
3176
74558dd9
BI
31772014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3178
3179 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3180 attribute an attribute without value.
3181
652fea39
JJ
31822014-01-23 Jakub Jelinek <jakub@redhat.com>
3183
3184 PR middle-end/58809
3185 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3186 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3187
f34f1c87
MP
31882014-01-22 Marek Polacek <polacek@redhat.com>
3189
3190 PR c/59891
3191 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3192 of remove_c_maybe_const_expr on op1 and op2.
3193
241f845a
JJ
31942014-01-15 Jakub Jelinek <jakub@redhat.com>
3195
3196 PR c/58943
3197 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3198 effects, preevaluate rhs using SAVE_EXPR first.
3199
9a74f20c
BI
32002014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3201
3202 PR c++/59631
3203 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3204 statements with if-elseif statements.
3205
96066ce1
MP
32062014-01-06 Marek Polacek <polacek@redhat.com>
3207
3208 PR c/57773
3209 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3210 defined bit-field types only in ISO C.
3211
23a5b65a
RS
32122014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3213
3214 Update copyright years
3215
f9030485
RS
32162014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3217
3218 * c-array-notation.c: Use the standard form for the copyright notice.
3219
41958c28
BI
32202013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3221
3222 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3223 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3224 field in parser is not empty. If not-empty, call the function
3225 c_parser_finish_omp_declare_simd.
3226 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3227 between SIMD-enabled functions and #pragma simd. Added new parameter.
3228 (c_parser_cilk_all_clauses): Modified the usage of the function
3229 c_parser_cilk_clause_vectorlength as mentioned above.
3230 (c_parser_cilk_simd_fn_vector_attrs): New function.
3231 (c_finish_cilk_simd_fn_tokens): Likewise.
3232 (is_cilkplus_vector_p): Likewise.
3233 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3234 "nomask," and "mask" strings in clause name.
3235 (c_parser_omp_all_clauses): Added 3 new case statements:
3236 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3237 PRAGMA_CILK_CLAUSE_NOMASK.
3238 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3239 check for vector attribute and if so call the function
3240 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3241 called the function c_finish_cilk_simd_fn_tokens.
3242 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3243 parser field is non-empty. If so, parse them as you would parse
3244 the omp declare simd pragma.
3245 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3246 Added a check when step is a parameter and flag it as error.
3247 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3248 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3249 pragma_omp_clause.
3250
cef0fd0e
TS
32512013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3252
3253 * c-parser.c (c_parser_omp_parallel): Fix description.
3254
12893402
BI
32552013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3256
3257 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3258 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3259 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3260 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3261
296674db
JM
32622013-12-04 Joseph Myers <joseph@codesourcery.com>
3263
3264 PR c/52023
3265 * c-parser.c (c_parser_alignas_specifier): Use
3266 c_sizeof_or_alignof_type instead of c_alignof.
3267 (c_parser_alignof_expression): Likewise, with min_alignof
3268 parameter depending on alignof spelling used.
3269
edd28054
MP
32702013-12-04 Marek Polacek <polacek@redhat.com>
3271
3272 PR c/54113
3273 * c-decl.c (start_function): Don't warn for missing prototype for
3274 inline functions.
3275
da0fc454
MP
32762013-12-03 Marek Polacek <polacek@redhat.com>
3277
3278 PR c/59351
3279 * c-decl.c (build_compound_literal): Allow compound literals with
3280 empty initial value.
3281
4c2ecab0
JM
32822013-12-02 Joseph Myers <joseph@codesourcery.com>
3283
3284 PR c/58235
3285 * c-typeck.c (build_modify_expr): Diagnose assignment to
3286 expression with array type.
3287
340baef7
JM
32882013-11-29 Joseph Myers <joseph@codesourcery.com>
3289
3290 PR c/42262
3291 * c-typeck.c (process_init_element): Do not treat a string as
3292 initializing a whole array when used with a designator for an
3293 individual element.
3294
6763b9f7
JM
32952013-11-29 Joseph Myers <joseph@codesourcery.com>
3296
3297 PR c/57574
3298 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3299 an inline function following a static declaration.
3300
e7bd1de1
JJ
33012013-11-28 Jakub Jelinek <jakub@redhat.com>
3302
3303 PR c/59310
3304 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3305 to p_name before calling c_parser_omp_teams instead of after.
3306 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3307 argument. Remove unused p_name variable.
3308
0136f8f0
AH
33092013-11-27 Aldy Hernandez <aldyh@redhat.com>
3310 Jakub Jelinek <jakub@redhat.com>
3311
3312 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3313 external_scope is NULL.
3314
241b71bb
TV
33152013-11-27 Tom de Vries <tom@codesourcery.com>
3316 Marc Glisse <marc.glisse@inria.fr>
3317
3318 PR c++/59032
3319 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3320
2fb9a547
AM
33212013-11-22 Andrew MacLeod <amacleod@redhat.com>
3322
3323 * c-typeck.c: Add required include files from gimple.h.
3324
8400e75e
DM
33252013-11-22 David Malcolm <dmalcolm@redhat.com>
3326
3327 * c-decl.c (define_label, shadow_tag_warned)
3328 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3329 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3330 (declspecs_add_type): Remove use of in_system_header macro.
3331 * c-parser.c (c_parser_unary_expression): Likewise.
3332 * c-typeck.c (store_init_value, process_init_element)
3333 (c_start_case): Likewise.
3334
3335 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3336 macro.
3337
3338 * c-parser.c (c_parser_set_source_position_from_token): Remove
3339 reference to in_system_header from comment.
3340
386b1f1f
RS
33412013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3342
3343 * c-decl.c (grokdeclarator): Update comment to refer to
3344 tree_to_[su]hwi rather than tree_low_cst.
3345
ae7e9ddd
RS
33462013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3347
3348 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3349 tree_to_uhwi throughout.
3350
9439e9a1
RS
33512013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3352
3353 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3354 throughout.
3355
9541ffee
RS
33562013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3357
3358 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3359 throughout.
3360
c02065fc
AH
33612013-11-15 Aldy Hernandez <aldyh@redhat.com>
3362
3363 * c-parser.c (c_parser_cilk_simd): New.
3364 (c_parser_cilk_verify_simd): New.
3365 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3366 (c_parser_omp_for_loop): Add case for NE_EXPR.
3367 Set c_break_label for CILK_SIMD.
3368 (c_parser_cilk_clause_vectorlength): New.
3369 (c_parser_cilk_clause_linear): New.
3370 (c_parser_cilk_clause_name): New.
3371 (c_parser_cilk_all_clauses): New.
3372 * c-typeck.c (build_unary_op): Pass location argument to
3373 readonly_error.
3374 (build_modify_expr): Same.
3375 (build_asm_expr): Same.
3376 (c_finish_bc_stmt): Error on break/continue in loops.
3377
18f429e2
AM
33782013-11-14 Andrew MacLeod <amacleod@redhat.com>
3379
3380 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3381
d8a2d370
DN
33822013-11-14 Diego Novillo <dnovillo@google.com>
3383
3384 * c-decl.c: Include print-tree.h.
3385 Include stor-layout.h.
3386 Include varasm.h.
3387 Include attribs.h.
3388 Include stringpool.h.
3389 * c-lang.c: Include fold-const.h.
3390 * c-parser.c: Include stringpool.h.
3391 Include attribs.h.
3392 Include stor-layout.h.
3393 Include varasm.h.
3394 Include trans-mem.h.
3395 * c-typeck.c: Include stor-layout.h.
3396 Include trans-mem.h.
3397 Include varasm.h.
3398 Include stmt.h.
3399
38b7bc7f
JM
34002013-11-13 Joseph Myers <joseph@codesourcery.com>
3401
3402 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3403 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3404 __auto_type.
3405 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3406 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3407 RID_AUTO_TYPE.
3408 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3409 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3410 (c_parser_declarator, c_parser_direct_declarator_inner)
3411 (c_parser_parameter_declaration, c_parser_type_name): All callers
3412 changed.
3413 (c_parser_declaration_or_fndef): Handle declarations with type
3414 determined from the initializer.
3415
45b0be94
AM
34162013-11-12 Andrew MacLeod <amacleod@redhat.com>
3417
18f429e2 3418 * c-typeck.c: Include gimplify.h.
45b0be94 3419
582d9b50
JM
34202013-11-12 Joseph Myers <joseph@codesourcery.com>
3421
3422 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3423 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3424 comment.
3425 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3426 or _Thread_local as appropriate in diagnostics.
3427 (build_null_declspecs): Initialize ret->thread_gnu_p.
3428 (declspecs_add_scspec): Handle either __thread or _Thread_local
3429 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3430 pedantic. Do not disallow _Thread_local extern and _Thread_local
3431 static.
3432
267bac10
JM
34332013-11-07 Joseph Myers <joseph@codesourcery.com>
3434 Andrew MacLeod <amacleod@redhat.com>
3435
3436 * c-aux-info.c (gen_type): Handle atomic qualifier.
3437 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3438 qualifiers when compating types.
3439 (shadow_tag_warned): Handle atomic_p in declspecs.
3440 (quals_from_declspecs): Likewise.
3441 (start_decl): Use c_type_promotes_to when promoting argument
3442 types.
3443 (grokdeclarator): Handle _Atomic.
3444 (get_parm_info): Diagnose any qualifier on "void" as only
3445 parameter.
3446 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3447 comparing types. Use c_type_promotes_to when promoting argument
3448 types.
3449 (finish_function): Use c_type_promotes_to when promoting argument
3450 types.
3451 (build_null_declspecs): Handle atomic_p in declspecs.
3452 (declspecs_add_qual): Handle RID_ATOMIC.
3453 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3454 (c_token_starts_declspecs): Handle RID_ATOMIC.
3455 (c_parser_declspecs): Handle atomic type specifiers and
3456 qualifiers.
3457 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3458 from types of expressions with atomic type.
3459 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3460 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3461 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3462 (c_parser_statement_after_labels, c_parser_switch_statement)
3463 (c_parser_for_statement, c_parser_expr_no_commas)
3464 (c_parser_conditional_expression, c_parser_binary_expression)
3465 (c_parser_cast_expression, c_parser_unary_expression)
3466 (c_parser_postfix_expression)
3467 (c_parser_postfix_expression_after_primary, c_parser_expression):
3468 Use convert_lvalue_to_rvalue.
3469 (c_parser_expression_conv, c_parser_expr_list): Document
3470 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3471 (c_parser_objc_synchronized_statement): Use
3472 convert_lvalue_to_rvalue.
3473 (c_parser_objc_selector): Handle RID_ATOMIC.
3474 (c_parser_objc_receiver, c_parser_array_notation): Use
3475 convert_lvalue_to_rvalue.
3476 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3477 _Atomic (type-name).
3478 (struct c_declspecs): Add atomic_p field.
3479 (convert_lvalue_to_rvalue): Declare.
3480 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3481 corresponding atomic types.
3482 (qualify_type): Don't add _Atomic qualifiers from second argument.
3483 (comp_target_types): Do not allow _Atomic mismatches.
3484 (type_lists_compatible_p): Do not remove atomic qualifiers when
3485 comparing types.
3486 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3487 (build_atomic_assign): New functions.
3488 (build_unary_op): Use build_atomic_assign for atomic increment and
3489 decrement.
3490 (build_conditional_expr): Do not treat _Atomic void as a qualified
3491 version of void.
3492 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3493 (find_anonymous_field_with_type, convert_to_anonymous_field)
3494 (convert_for_assignment): Do not remove atomic qualifiers when
3495 comparing types.
3496 (digest_init): Do not accept initialization of arrays of atomic
3497 elements by string constants.
3498 (build_asm_expr): Use convert_lvalue_to_rvalue.
3499 (build_binary_op): Do not treat _Atomic void as a qualified
3500 version of void.
3501
0c249d4b
DD
35022013-11-06 DJ Delorie <dj@redhat.com>
3503
3504 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3505 both explicit and builtin, print the location of the explicit one.
3506
6d7f7e0a
TB
35072013-11-05 Tobias Burnus <burnus@net-b.de>
3508
3509 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3510 c_parser_omp_distribute, c_parser_omp_teams,
3511 c_parser_omp_target, c_parser_omp_declare): Handle
3512 -fopenmp-simd.
3513
b906f4ca
MP
35142013-11-03 Marek Polacek <polacek@redhat.com>
3515
3516 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3517
ee1d5a02
JJ
35182013-11-01 Jakub Jelinek <jakub@redhat.com>
3519
3520 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3521 check_dup_generic at the end, unless remove is true.
3522 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3523 remove = true;.
3524 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3525
5a9785fb
JJ
35262013-10-31 Jakub Jelinek <jakub@redhat.com>
3527
3528 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3529 with decl that is not pointer nor array.
3530
939b37da
BI
35312013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3532
3533 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3534 a spawning function is found.
3535 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3536 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3537 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3538 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3539 case.
3540 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3541 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3542 expr.
3543 (c_finish_return): Added a check to reject _Cilk_spawn in return
3544 expression.
3545 (build_cilk_spawn): New function.
3546 (build_cilk_sync): Likewise.
3547 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3548
d4af74d4
TB
35492013-10-27 Tobias Burnus <burnus@net-b.de>
3550
3551 PR other/33426
3552 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3553 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3554 (c_parser_statement_after_labels): Update calls.
3555
d73749df 35562013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3557
3558 PR other/33426
3559 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3560 Handle PRAGMA_IVDEP.
3561 (c_parser_statement_after_labels): Update call.
3562
f28aa681
MP
35632013-10-24 Marek Polacek <polacek@redhat.com>
3564
3565 * c-parser.c (c_parser_struct_declaration): Add a comment.
3566 (c_parser_declarator): Don't allow _Alignas here.
3567
0645c1a2
AM
35682013-10-17 Andrew MacLeod <amacleod@redhat.com>
3569
3570 * c-parser.c: Include omp-low.h.
3571 * c-typeck.c: Likewise.
3572
568a31f2
MP
35732013-10-17 Marek Polacek <polacek@redhat.com>
3574
3575 PR c/58267
3576 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3577 Document syntax of the array-declarator.
3578 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3579 are not permitted.
3580 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3581 (c_parser_struct_declaration): Likewise.
3582 (c_parser_declarator): Likewise.
3583 (c_parser_direct_declarator_inner): Likewise.
3584 (c_parser_parameter_declaration): Likewise.
3585 (c_parser_type_name): Likewise.
3586
acf0174b
JJ
35872013-10-11 Jakub Jelinek <jakub@redhat.com>
3588
3589 * c-lang.h (current_omp_declare_target_attribute): New extern
3590 decl.
3591 * c-parser.c: Include c-lang.h.
3592 (struct c_parser): Change tokens to c_token *.
3593 Add tokens_buf field. Change tokens_avail type to unsigned int.
3594 (c_parser_consume_token): If parser->tokens isn't
3595 &parser->tokens_buf[0], increment parser->tokens.
3596 (c_parser_consume_pragma): Likewise.
3597 (enum pragma_context): Add pragma_struct and pragma_param.
3598 (c_parser_external_declaration): Adjust
3599 c_parser_declaration_or_fndef caller.
3600 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3601 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3602 Adjust recursive call.
3603 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3604 of pragma_external.
3605 (c_parser_parameter_declaration): Use pragma_param instead of
3606 pragma_external.
3607 (c_parser_compound_statement_nostart, c_parser_label,
3608 c_parser_for_statement): Adjust
3609 c_parser_declaration_or_fndef callers.
3610 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3611 it through to c_parser_conditional_expression.
3612 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3613 pass it through to c_parser_binary_expression. Adjust recursive
3614 call.
3615 (c_parser_binary_expression): Remove prec argument, add
3616 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3617 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3618 binop matches it, use build2 instead of parser_build_binary_op.
3619 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3620 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3621 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3622 Handle pragma_struct and pragma_param the same as pragma_external.
3623 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3624 (c_parser_omp_variable_list): Parse array sections for
3625 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3626 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3627 (c_parser_omp_clause_reduction): Handle user defined reductions.
3628 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3629 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3630 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3631 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3632 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3633 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3634 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3635 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3636 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3637 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3638 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3639 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3640 (c_parser_omp_for_loop): Add CODE argument, pass it through
3641 to c_finish_omp_for. Change last argument to cclauses,
3642 and adjust uses to grab parallel clauses from the array of all
3643 the split clauses. Adjust c_parser_binary_expression,
3644 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3645 (omp_split_clauses): New function.
3646 (c_parser_omp_simd): New function.
3647 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3648 Allow the function to be called also when parsing combined constructs,
3649 and call c_parser_omp_simd when parsing for simd.
3650 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3651 #pragma omp section, require exactly one structured-block instead of
3652 sequence of statements.
3653 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3654 Allow the function to be called also when parsing combined constructs.
3655 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3656 Allow the function to be called also when parsing combined
3657 constructs.
3658 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3659 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3660 c_parser_omp_teams, c_parser_omp_target_data,
3661 c_parser_omp_target_update, c_parser_omp_target,
3662 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3663 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3664 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3665 (c_parser_omp_construct): Add p_name and mask vars. Handle
3666 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3667 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3668 and c_parser_omp_sections callers.
3669 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3670 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3671 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3672 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3673 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3674 OMP_CLAUSE_DEPEND.
3675 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3676 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3677 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3678 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3679 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3680 * c-typeck.c: Include tree-inline.h.
3681 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3682 handle_omp_array_sections_1, handle_omp_array_sections,
3683 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3684 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3685 user defined reductions.
3686 (c_tree_equal): New function.
3687 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3688 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3689 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3690 c_check_omp_declare_reduction_r): New prototypes.
3691 * c-decl.c (current_omp_declare_target_attribute): New variable.
3692 (c_decl_attributes): New function.
3693 (start_decl, start_function): Use it instead of decl_attributes.
3694 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3695 c_omp_reduction_decl, c_omp_reduction_lookup,
3696 c_check_omp_declare_reduction_r): New functions.
3697
0a6c2227
TT
36982013-09-25 Tom Tromey <tromey@redhat.com>
3699
3700 * Make-lang.in (c/gccspec.o): Remove.
3701 (CFLAGS-c/gccspec.o): New variable.
3702 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3703 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3704 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3705
f3bc55f0
TT
37062013-09-25 Tom Tromey <tromey@redhat.com>
3707
3708 * Make-lang.in (c/gccspec.o): Don't use subshell.
3709
a24d975c
MP
37102013-09-18 Marek Polacek <polacek@redhat.com>
3711
3712 PR sanitize/58443
3713 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3714 Remove unnecessary check.
3715
ce6923c5
MP
37162013-09-18 Marek Polacek <polacek@redhat.com>
3717
3718 PR sanitizer/58411
3719 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3720 no_sanitize_undefined attribute.
3721
a1e51df9
KT
37222013-09-13 Kai Tietz <ktietz@redhat.com>
3723
3724 PR target/57848
3725 * c-decl.c (c_builtin_function_ext_scope): Remove
3726 wrong assumption that it is never called on prexisting
3727 symbol.
3728
0af94e6f
JR
37292013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3730
3731 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3732
20059c8b
GDR
37332013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3734
3735 * c-objc-common.c (c_tree_printer): Tidy.
3736
de5a5fa1
MP
37372013-08-30 Marek Polacek <polacek@redhat.com>
3738
3739 * c-typeck.c (build_binary_op): Add division by zero and shift
3740 instrumentation.
3741
2531a1d9 37422013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 3743 Joseph Myers <joseph@codesourcery.com>
2531a1d9 3744
6e2bcc98 3745 PR c/35649
2531a1d9
JR
3746 * c-typeck.c (c_common_type): Prefer double_type_node over
3747 other REAL_TYPE types with the same precision.
3748 (convert_arguments): Likewise.
3749
025311c4
GDR
37502013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3751
3752 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3753 (c_initialize_diagnostics): Call a destructor for the early printer.
3754
da6ca2b5
GDR
37552013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3756
3757 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3758 printer initialization.
3759
318cda85 37602013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 3761
318cda85
BI
3762 PR c/57490
3763 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3764 check for truth values.
3765 (expand_array_notation_exprs): Added truth values case. Removed an
3766 unwanted else. Added for-loop to walk through subtrees in default
3767 case.
3768
b066401f
GDR
37692013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3770
3771 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3772
fb48aadc
JM
37732013-07-23 Joseph Myers <joseph@codesourcery.com>
3774
3775 * c-parser.c (struct c_generic_association): Fix typo.
3776
433cc7b0
TT
37772013-07-23 Tom Tromey <tromey@redhat.com>
3778 Joseph Myers <joseph@codesourcery.com>
3779
3780 * c-parser.c (struct c_generic_association): New.
3781 (c_generic_association_d): New typedef.
3782 (c_parser_generic_selection): New function.
3783 (c_parser_postfix_expression): Handle RID_GENERIC.
3784
26d40c3d
JM
37852013-07-13 Jason Merrill <jason@redhat.com>
3786
3787 PR c++/57793
3788 * c-decl.c (finish_struct): Check for too-large class.
3789
ecdbd01a 37902013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
3791
3792 PR c/57821
3793 * c-typeck.c (set_init_index): When folding, check for index overflow.
3794
1141ed3f
BI
37952013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3796
3797 * c-parser.c (c_parser_array_notation): Removed rejection of array
3798 notations in an array of function pointers.
3799
713b46fa
BI
38002013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3801
3802 * c-array-notation.c (make_triplet_val_inv): New function.
3803 (create_cmp_incr): Likewise.
3804 (create_array_refs): Likewise.
3805 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3806 Also modularized common parts between functions and called the function.
3807 (build_array_notation_expr): Likewise.
3808 (fix_conditional_array_notations_1): Likewise.
3809 (fix_array_notation_expr): Likewise.
3810 (fix_array_notation_call_expr): Likewise.
3811
92f20202
MP
38122013-06-18 Marek Polacek <polacek@redhat.com>
3813
3814 PR c/57630
3815 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3816
73a23b06
BI
38172013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3818
3819 * c-array-notation.c (build_array_notation_expr): Reject array notation
3820 mismatch between LHS and RHS even inside a call_expr. Also, removed
3821 a couple while statements that were dead code.
3822
00b8517d
BI
38232013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3824
3825 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3826 excessive precision expressions in function parameters. Also removed
3827 couple unwanted while statements.
3828
1509bdda
BI
38292013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3830
3831 * c-array-notation.c (expand_array_notation_exprs): Added
3832 ARRAY_NOTATION_REF case.
3833
d60f1706
BI
38342013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3835
3836 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3837 function to c-family/array-notation-common.c.
3838 (is_cilkplus_reduce_builtin): Likewise.
3839 (find_rank): Likewise.
3840 (extract_array_notation_exprs): Likewise.
3841 (replace_array_notations): Likewise.
3842 (find_inv_trees): Likewise.
3843 (replace_inv_trees): Likewise.
3844 (contains_array_notation_expr): Likewise.
3845 (find_correct_array_notation_type): Likewise.
3846 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3847 (struct inv_list): Moved this to c-family/array-notation-common.c.
3848 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3849
6d6efbb3
BI
38502013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3851
3852 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3853 reduction functions outside the for-loop. Added a check if the fundecl
3854 is non-NULL. Finally, removed an unwanted if-statement, and made the
3855 body unconditional.
3856
25c22937
BI
38572013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3858
3859 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3860 condition of the if-statement matches the rank of else-block and then-
3861 block when array notations are used.
3862 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3863 expression after the entire function body is parsed.
3864 (c_parser_expr_no_commas): Delayed creating array notation expressions
3865 to the end of function parsing.
3866 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3867 whole if-statement instead of just the condition.
3868 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3869
edd25645
BI
38702013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3871
3872 PR c/57474
3873 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3874 array to NULL_TREE if they are unused. Also added a check for the
3875 field to be NULL before its fields are used in future.
3876
065ce7f1
RO
38772013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3878
3879 PR bootstrap/57450
3880 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3881 (build_array_notation_expr): Likewise.
3882
36536d79
BI
38832013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3884
3885 * c-typeck.c (build_array_ref): Added a check to see if array's
3886 index is greater than one. If true, then emit an error.
3887 (build_function_call_vec): Exclude error reporting and checking
3888 for builtin array-notation functions.
3889 (convert_arguments): Likewise.
3890 (c_finish_return): Added a check for array notations as a return
3891 expression. If true, then emit an error.
3892 (c_finish_loop): Added a check for array notations in a loop
3893 condition. If true then emit an error.
3894 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3895 (build_binary_op): Added a check for array notation expr inside
3896 op1 and op0. If present, we call another function to find correct
3897 type.
3898 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3899 * c-parser.c (c_parser_compound_statement): Check if array
3900 notation code is used in tree, if so, then transform them into
3901 appropriate C code.
3902 (c_parser_expr_no_commas): Check if array notation is used in LHS
3903 or RHS, if so, then build array notation expression instead of
3904 regular modify.
3905 (c_parser_postfix_expression_after_primary): Added a check for
3906 colon(s) after square braces, if so then handle it like an array
3907 notation. Also, break up array notations in unary op if found.
3908 (c_parser_direct_declarator_inner): Added a check for array
3909 notation.
3910 (c_parser_compound_statement): Added a check for array notation in
3911 a stmt. If one is present, then expand array notation expr.
3912 (c_parser_if_statement): Likewise.
3913 (c_parser_switch_statement): Added a check for array notations in
3914 a switch statement's condition. If true, then output an error.
3915 (c_parser_while_statement): Similarly, but for a while.
3916 (c_parser_do_statement): Similarly, but for a do-while.
3917 (c_parser_for_statement): Similarly, but for a for-loop.
3918 (c_parser_unary_expression): Check if array notation is used in a
3919 pre-increment or pre-decrement expression. If true, then expand
3920 them.
3921 (c_parser_array_notation): New function.
3922 * c-array-notation.c: New file.
3923 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3924
cd192ccc
MS
39252013-05-23 Mike Stump <mikestump@comcast.net>
3926
3927 * c-typeck.c (convert_for_assignment): Handle references to memory
3928 spaces better.
3929
427b248d
JM
39302013-05-16 Jason Merrill <jason@redhat.com>
3931
3932 * Make-lang.in (cc1$(exeext)): Use link mutex.
3933
44d90fe1
PC
39342013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3935
3936 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3937 to simply use OPT_Wpointer_arith.
3938 (build_unary_op): Likewise.
3939
4e7d7b3d
JJ
39402013-04-03 Jakub Jelinek <jakub@redhat.com>
3941
3942 PR c/19449
3943 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3944 argument. If set, or it temporarily for parsing of the first
3945 argument into force_folding_builtin_constant_p.
3946 (c_parser_postfix_expression): Adjust callers.
3947
839b422f
RB
39482013-03-21 Richard Biener <rguenther@suse.de>
3949
3950 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3951 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3952
2ee028f1
MP
39532013-02-12 Marek Polacek <polacek@redhat.com>
3954
3955 PR c/44938
3956 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3957 origtypes to NULL.
3958
8824edff
JJ
39592013-01-24 Jakub Jelinek <jakub@redhat.com>
3960
3961 PR c/56078
3962 * c-typeck.c (set_nonincremental_init_from_string): If
3963 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3964 returned false.
3965 (process_init_element): Likewise.
3966
eadd3d0d
JJ
39672012-12-20 Jakub Jelinek <jakub@redhat.com>
3968
3969 PR c++/55619
3970 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3971 argument, don't call default_function_array_conversion
3972 nor c_fully_fold here.
3973 (c_parser_asm_statement): Adjust callers.
3974 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3975 and outputs here, and call default_function_array_conversion
3976 on inputs that don't need to be addressable.
3977
f8a93a2e
JJ
39782012-12-18 Jakub Jelinek <jakub@redhat.com>
3979
3980 PR c/39464
3981 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3982 warning require that both c_common_unsigned_type as well as
3983 c_common_signed_type is the same for both mvl and mvr types.
3984
9771b263
DN
39852012-11-16 Diego Novillo <dnovillo@google.com>
3986
3987 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3988
3989 * c-common.c: Use new vec API in vec.h.
3990 * c-common.h: Likewise.
3991 * c-gimplify.c: Likewise.
3992 * c-pragma.c: Likewise.
3993 * c-pretty-print.c: Likewise.
3994 * c-pretty-print.h: Likewise.
3995 * c-semantics.c: Likewise.
3996 * c-decl.c: Likewise.
3997 * c-parser.c: Likewise.
3998 * c-tree.h: Likewise.
3999 * c-typeck.c: Likewise.
4000
880661a4
JW
40012012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
4002
4003 PR c++/54930
4004 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
4005
077d1abe
MLI
40062012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4007
4008 PR c/53066
4009 * c-decl.c (warn_if_shadowing): Do not warn if a variable
4010 shadows a function, unless the variable is a function or a
4011 pointer-to-function.
4012
3a785c97
JJ
40132012-10-12 Jakub Jelinek <jakub@redhat.com>
4014
4015 PR c/54381
4016 * c-parser.c (struct c_tree_loc_pair): Removed.
4017 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
4018 add location_t * and tree * arguments, fill in array of 3
4019 sizeof_arg trees and corresponding locs.
4020 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
4021 c_parser_expr_list callers.
4022 (c_parser_postfix_expression_after_primary): Likewise. Pass
4023 array of 3 sizeof_arg trees and locs (corresponding to first
4024 3 arguments) to sizeof_pointer_memaccess_warning.
4025
703c8606
LC
40262012-10-09 Lawrence Crowl <crowl@google.com>
4027
4028 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
4029 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
4030 hash table.
4031
5d9de0d0
PC
40322012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
4033
4034 PR c++/54194
4035 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
4036 call.
4037
a212e43f
MG
40382012-10-09 Marc Glisse <marc.glisse@inria.fr>
4039
4040 PR c++/54427
4041 * c-typeck.c: Include c-common.h.
4042 (enum stv_conv): Moved to c-common.h.
4043 (scalar_to_vector): Moved to c-common.c.
4044 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4045 * Make-lang.in: c-typeck.c depends on c-common.h.
4046
3b78de56
AC
40472012-10-04 Arnaud Charlet <charlet@adacore.com>
4048
4049 * c-decl.c (c_write_global_declarations): Fix handling of
4050 -fdump-ada-spec*.
4051
78c60e3d
SS
40522012-09-30 Sharad Singhai <singhai@google.com>
4053
4054 * c-decl.c (c_write_global_declarations): Use a different method
4055 to determine if the dump has ben initialized.
4056
9f33203d
JM
40572012-09-14 Joseph Myers <joseph@codesourcery.com>
4058
4059 PR c/54552
4060 * c-typeck.c (c_cast_expr): When casting to a type requiring
4061 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4062 c_fully_fold first.
4063
a27d595d
JM
40642012-09-14 Joseph Myers <joseph@codesourcery.com>
4065
4066 PR c/54103
4067 * c-typeck.c (build_unary_op): Pass original argument of
4068 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4069 any C_MAYBE_CONST_EXPR, if it has integer operands.
4070 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4071 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4072 to c_objc_common_truthvalue_conversion, then remove any
4073 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4074 c_objc_common_truthvalue_conversion not
4075 c_common_truthvalue_conversion.
4076 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4077 call note_integer_operands for arguments with integer operands
4078 that are not integer constants.
4079
9feb29df
JJ
40802012-09-13 Jakub Jelinek <jakub@redhat.com>
4081
4082 PR c/54559
4083 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4084 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4085
d409320c
JJ
40862012-08-31 Jakub Jelinek <jakub@redhat.com>
4087
4088 PR c/54428
4089 * c-convert.c (convert): Don't call fold_convert_loc if
4090 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4091 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4092 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4093
6265d07c
JJ
40942012-08-24 Jakub Jelinek <jakub@redhat.com>
4095
4096 PR c/54355
4097 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4098 for nested and empty_ok arguments in the call to
4099 c_parser_declaration_or_fndef.
4100
1a4049e7
JJ
41012012-08-17 Jakub Jelinek <jakub@redhat.com>
4102
4103 * c-tree.h (c_last_sizeof_arg): Declare.
4104 * c-parser.c (struct c_tree_loc_pair): New type.
4105 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4106 non-NULL.
4107 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4108 (c_parser_postfix_expression_after_primary): Likewise. Call
4109 sizeof_pointer_memaccess_warning if needed.
4110 (sizeof_ptr_memacc_comptypes): New function.
4111 * c-typeck.c (c_last_sizeof_arg): New global variable.
4112 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4113
0229aee9
UB
41142012-07-24 Uros Bizjak <ubizjak@gmail.com>
4115
4116 * c-lang.h (lang_decl): Add variable_size GTY option.
4117
7ee2468b
SB
41182012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4119
4120 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4121 * Make-lang.in: Fix dependencies.
4122
d4a10d0a
SB
41232012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4124
4125 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4126 and add language Makefile hooks.
4127 * config-lang.in: New file.
4128 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4129 add the required "normal" config-lang.in rules.
4130 * c-lang.h: Moved from gcc/ to here.
4131 * c-tree.h: Likewise.
4132 * c-objc-common.c: Likewise.
4133 * c-objc-common.h: Likewise.
4134 * c-typeck.c: Likewise.
4135 * c-convert.c: Likewise.
4136 * c-lang.c: Likewise.
4137 * c-aux-info.c: Likewise.
4138 * c-errors.c: Likewise.
4139 * gccspec.c: Likewise.
4140 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4141 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4142\f
cbe34bb5 4143Copyright (C) 2012-2017 Free Software Foundation, Inc.
d4a10d0a
SB
4144
4145Copying and distribution of this file, with or without modification,
4146are permitted in any medium without royalty provided the copyright
4147notice and this notice are preserved.