]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
PR middle-end/78786 - GCC hangs/out of memory calling sprintf with large precision
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
c5af52eb
CP
12016-12-02 Cesar Philippidis <cesar@codesourcery.com>
2 James Norris <jnorris@codesourcery.com>
3
4 * c-parser.c (c_parser_pragma): Error when PRAGMA_OACC_{ENTER_DATA,
5 EXIT_DATA,WAIT} are not used in compound statements.
6 (c_parser_oacc_enter_exit_data): Update diagnostics.
7
48330c93
BE
82016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
9
10 PR c++/71973
11 * c-decl.c (diagnose_mismatched_decls): Use
12 OPT_Wbuiltin_declaration_mismatch here too.
13
899ca90e 142016-11-18 Richard Sandiford <richard.sandiford@arm.com>
48330c93
BE
15 Alan Hayward <alan.hayward@arm.com>
16 David Sherwood <david.sherwood@arm.com>
899ca90e
RS
17
18 * c-decl.c (merge_decls): Use SET_DECL_MODE.
19 (make_label, finish_struct): Likewise.
20
1ee62b92 212016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17 22 Richard Biener <rguenther@suse.de>
22b15758 23
8e745a17
JJ
24 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
25 * config-lang.in (gtfiles): Add c/c-parser.h.
26 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
27 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
28 * c-parser.c (enum c_id_kind, struct c_token,
29 c_parser_next_token_is, c_parser_next_token_is_not,
30 c_parser_next_token_is_keyword,
31 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
32 Split out to ...
33 * c-parser.h: ... new header.
34 * c-parser.c: Include c-parser.h and gimple-parser.h.
1ee62b92 35 (c_parser_peek_token, c_parser_peek_2nd_token,
8e745a17
JJ
36 c_token_starts_typename, c_parser_next_token_starts_declspecs,
37 c_parser_next_tokens_start_declaration, c_parser_consume_token,
38 c_parser_error, c_parser_require, c_parser_skip_until_found,
39 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
40 c_parser_type_name): Export.
41 (c_parser_tokens_buf): New function.
42 (c_parser_error): Likewise.
43 (c_parser_set_error): Likewise.
44 (c_parser_declspecs): Handle RID_GIMPLE.
1ee62b92
PG
45 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
46 via c_parser_parse_gimple_body.
8e745a17
JJ
47 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
48 c_token_starts_typename, c_parser_next_token_starts_declspecs,
49 c_parser_next_tokens_start_declaration, c_parser_consume_token,
50 c_parser_error, c_parser_require, c_parser_skip_until_found,
51 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
52 c_parser_type_name): Declare.
1ee62b92
PG
53 (struct c_parser): Declare forward.
54 (c_parser_tokens_buf): Declare.
8e745a17
JJ
55 (c_parser_error): Likewise.
56 (c_parser_set_error): Likewise.
57 * gimple-parser.c: New file.
58 * gimple-parser.h: Likewise.
1ee62b92 59
22b15758
UB
602016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
61
62 PR c/35503
63 * c-parser.c (c_parser_postfix_expression_after_primary): Call
64 warn_for_restrict.
65
84ff4775
LCW
662016-09-11 Le-Chun Wu <lcwu@google.com>
67 Mark Wielaard <mjw@redhat.com>
68
69 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
70 to the given -Wshadow= variant.
71
4d0cdd0c
TP
722016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
73
74 * c-typeck.c: Include memmodel.h.
75
1202f33e
JJ
762016-10-13 Jakub Jelinek <jakub@redhat.com>
77
78 PR target/77957
79 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
80 instead of lhd_return_null_tree_v.
81
8a14afd0
BS
822016-10-07 Bernd Schmidt <bschmidt@redhat.com>
83
84 PR c++/69733
85 * c-decl.c (smallest_type_quals_location): New static function.
86 (grokdeclarator): Try to find the correct location for an ignored
87 qualifier.
88
81fea426
MP
892016-09-26 Marek Polacek <polacek@redhat.com>
90
91 PR c/7652
92 * c-decl.c (pop_scope): Add gcc_fallthrough.
93
942016-09-26 Marek Polacek <polacek@redhat.com>
95
96 PR c/7652
97 * c-parser.c (struct c_token): Add flags field.
98 (c_lex_one_token): Pass it to c_lex_with_flags.
99 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
100 into IFN_FALLTHROUGH.
101 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
102 attribute fallthrough after a case label or default label.
103 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
104
9a2300e9
MP
1052016-09-24 Marek Polacek <polacek@redhat.com>
106
107 PR c/77490
108 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
109 have boolean value. Warn about ++/-- on booleans.
110
7de76362
JJ
1112016-09-23 Jakub Jelinek <jakub@redhat.com>
112
113 * c-parser.c (incomplete_record_decls): Remove unnecessary
114 = vNULL initialization of file scope vec.
115
5b73d2ab
MP
1162016-09-16 Marek Polacek <polacek@redhat.com>
117
118 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
119
e51fbec3
MP
1202016-09-14 Marek Polacek <polacek@redhat.com>
121
122 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
123 (fix_array_notation_expr): Likewise.
124 * c-decl.c (finish_decl): Likewise.
125 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
126 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
127 (function_to_pointer_conversion): Use false instead of 0.
128 (convert_lvalue_to_rvalue): Likewise.
129 (parser_build_unary_op): Likewise.
130 (build_atomic_assign): Likewise.
131 (build_unary_op): Change nonconvert parameter type to bool, use
132 true/false instead of 1/0.
133 (build_binary_op): Use true instead of 1.
134
254830ba
DM
1352016-09-13 David Malcolm <dmalcolm@redhat.com>
136
137 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
138 of add_fixit_insert to add_fixit_insert_before.
139
4c13ba17
MP
1402016-09-13 Marek Polacek <polacek@redhat.com>
141
142 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
143 it.
144
54dcdb88
BE
1452016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
146
147 PR c++/77496
148 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
149 COMPOUND_EXPR to warn_for_omitted_condop.
150
e5106e27
DM
1512016-09-07 David Malcolm <dmalcolm@redhat.com>
152
153 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
154 c_get_substring_location for this new langhook.
155
9dc5773f
JJ
1562016-09-02 Jakub Jelinek <jakub@redhat.com>
157
158 PR c/65467
159 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
160 flag_openmp.
161 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
162 instead of mark_exp_read on low_bound/length expression.
163 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
164 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
165 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
166 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
167 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
168 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
169 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
170 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
171 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
172 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
173 instead of mark_expr_read.
174 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
175 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
176 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
177 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
178 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
179 array section bases outside of depend clause, for depend clause
180 use convert_lvalue_to_rvalue on the base.
181 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
182 linear, aligned, map, to and from clauses.
183 (c_omp_clause_copy_ctor): New function.
184
295844f6
MP
1852016-09-01 Marek Polacek <polacek@redhat.com>
186
187 PR c/7652
188 * c-typeck.c (composite_type): Add FALLTHRU comment.
189
089af25c
DM
1902016-08-31 David Malcolm <dmalcolm@redhat.com>
191
192 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
193 to the insertion fixits for "struct", "union", and "enum".
194
f9087798
DM
1952016-08-30 David Malcolm <dmalcolm@redhat.com>
196
197 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
198 rather than add_fixit_misspelled_id.
199 (undeclared_variable): Likewise.
200 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
201 now-redundant "here" params from add_fixit_insert method calls.
202 (c_parser_parameter_declaration): Likewise.
203 * c-typeck.c (build_component_ref): Remove now-redundant range
204 param from add_fixit_replace method calls.
205
ebef225f
MP
2062016-08-25 Marek Polacek <polacek@redhat.com>
207
208 * c-typeck.c (parser_build_binary_op): Pass LHS to
209 warn_logical_not_parentheses.
210
fe377a48
MP
2112016-08-25 Marek Polacek <polacek@redhat.com>
212
213 PR c/77323
214 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
215 or _FloatN or _FloatNx is not supported.
216 (finish_declspecs): Set type to integer_type_node when _FloatN or
217 _FloatNx is not supported.
218
c65699ef
JM
2192016-08-19 Joseph Myers <joseph@codesourcery.com>
220
221 PR c/32187
222 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
223 (struct c_declspecs): Add field floatn_nx_idx.
224 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
225 and _FloatNx type specifiers.
226 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
227 (c_parser_declspecs, c_parser_attribute_any_word)
228 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
229 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
230 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
231 narrower than double.
232
2f1364c2
JJ
2332016-08-12 Jakub Jelinek <jakub@redhat.com>
234 Martin Liska <mliska@suse.cz>
235
236 PR c/67410
237 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
238 % to determine val element to change. Assert that
239 wchar_bytes * charwidth fits into val array.
240
191816a3
MP
2412016-08-12 Marek Polacek <polacek@redhat.com>
242
243 PR c/7652
244 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
245 (c_parser_postfix_expression): Likewise.
246 * c-typeck.c (build_unary_op): Adjust fall through comment.
247 (c_mark_addressable): Likewise.
248
b95a64bb
JJ
2492016-08-11 Jakub Jelinek <jakub@redhat.com>
250
251 PR c/72816
252 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
253 array member through typedef, for orig_qual_indirect == 0 clear
254 orig_qual_type.
255
895aa8e1
DM
2562016-08-08 David Malcolm <dmalcolm@redhat.com>
257
258 PR c/64955
259 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
260 this up to selftest::run_c_tests.
261 (selftest::run_c_tests): New function.
262
0b212d8c
TS
2632016-08-04 Thomas Schwinge <thomas@codesourcery.com>
264
ae9281fc
TS
265 * c-parser.c (struct oacc_routine_data): Add error_seen and
266 fndecl_seen members.
267 (c_finish_oacc_routine): Use these.
268 (c_parser_declaration_or_fndef): Adjust.
269 (c_parser_oacc_routine): Likewise. Support more C language
270 constructs, and improve diagnostics. Move pragma context
271 checking...
272 (c_parser_pragma): ... here.
273
0b212d8c
TS
274 * c-parser.c (struct oacc_routine_data): New.
275 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
276 Simplify code.
277 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
278 declare target" attribute.
279
76e2c821
JB
2802016-08-01 Jan Beulich <jbeulich@suse.com>
281
282 * c-fold.c (c_fully_fold_internal): Also emit shift count
283 warnings for vector types.
284 * c-typeck.c (build_binary_op): Likewise.
285
f618a472
MP
2862016-07-29 Marek Polacek <polacek@redhat.com>
287
288 PR c/71742
289 * c-decl.c (finish_struct): Rephrase an error message.
290
efd0786f
MP
291 PR c/71853
292 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
293 to error node for invalid code.
294
e00dceaf
MP
295 PR c/71573
296 * c-decl.c (implicitly_declare): Return decl early not only for
297 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
298
673a107a
JJ
2992016-07-29 Jakub Jelinek <jakub@redhat.com>
300
301 PR c/71969
302 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
303 on GNU extern inline functions.
304
a5b5c8b6
MP
3052016-07-29 Marek Polacek <polacek@redhat.com>
306
307 PR c/71583
308 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
309 check expr.value.
310
e3fe09c1
UB
3112016-07-22 Uros Bizjak <ubizjak@gmail.com>
312
313 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
314
7c8f7eaa
DM
3152016-07-20 David Malcolm <dmalcolm@redhat.com>
316
317 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
318 spellcheck-tree.h
319 (best_macro_match): Likewise, converting from a typedef to a
320 subclass.
321 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
322 (lookup_name_fuzzy): Update for change of best_macro_match to a
323 subclass with a ctor that calls cpp_forall_identifiers.
324
de6a69ee
DM
3252016-07-20 David Malcolm <dmalcolm@redhat.com>
326
327 * c-decl.c (implicit_decl_warning): Update for conversion of
328 return type of lookup_name_fuzzy to const char *.
329 (undeclared_variable): Likewise.
330 (lookup_name_fuzzy): Convert return type from tree to
331 const char *.
332 * c-parser.c (c_parser_declaration_or_fndef): Update for
333 conversion of return type of lookup_name_fuzzy to const char *.
334 (c_parser_parameter_declaration): Likewise.
335
b1c9c068
CP
3362016-07-15 Cesar Philippidis <cesar@codesourcery.com>
337
338 * c-parser.c (c_parser_oacc_declare): Don't scan for
339 GOMP_MAP_POINTER.
340 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
341 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
342 zero-length subarrays.
343
ddbbcb19
JJ
3442016-07-15 Jakub Jelinek <jakub@redhat.com>
345
346 PR c/71858
347 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
348 instead of FUZZY_LOOKUP_NAME.
349 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
350 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
351
dd36b877
JJ
3522016-07-14 Jakub Jelinek <jakub@redhat.com>
353
354 PR c/71858
355 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
356
8c681247
TS
3572016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
358
359 * c-parser.c (c_parser_generic_selection): Make type of variable
360 auto_vec.
361 (c_parser_omp_declare_simd): Likewise.
362
bf4fa671
TS
3632016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
364
365 * c-decl.c (struct c_struct_parse_info): Change member types
366 from vec to auto_vec.
367 (start_struct): Adjust.
368 (finish_struct): Likewise.
369
557e8c49
JJ
3702016-07-02 Jakub Jelinek <jakub@redhat.com>
371
372 PR c/71719
373 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
374
54d19c3b
TS
3752016-06-29 Thomas Schwinge <thomas@codesourcery.com>
376
377 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
378 Move pragma context checking into...
379 (c_parser_omp_cancellation_point): ... here, and improve
380 diagnostic messages.
381 * c-typeck.c (c_finish_omp_cancel)
382 (c_finish_omp_cancellation_point): Improve diagnostic messages.
383
152ef731
JJ
3842016-06-29 Jakub Jelinek <jakub@redhat.com>
385
386 PR c/71685
387 * c-typeck.c (c_build_qualified_type): Don't clear
388 C_TYPE_INCOMPLETE_VARS for the main variant.
389
3902016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
391
392 PR c/71552
393 * c-typeck.c (output_init_element): Diagnose incompatible types
394 before non-constant initializers.
395
e9ac1f86
JJ
3962016-06-28 Jakub Jelinek <jakub@redhat.com>
397
398 * Make-lang.in: Don't cat ../stage_current if it does not exist.
399
277d7ee0
AK
4002016-06-23 Andi Kleen <ak@linux.intel.com>
401
402 * Make-lang.in: Add support for autofdo.
403
1a4f11c8
DM
4042016-06-22 David Malcolm <dmalcolm@redhat.com>
405
406 PR c/70339
407 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
408 (implicit_decl_warning): When issuing warnings for implicit
409 declarations, attempt to provide a suggestion via
410 lookup_name_fuzzy.
411 (undeclared_variable): Likewise when issuing errors.
412 (lookup_name_in_scope): Likewise.
413 (struct edit_distance_traits<cpp_hashnode *>): New struct.
414 (best_macro_match): New typedef.
415 (find_closest_macro_cpp_cb): New function.
416 (lookup_name_fuzzy): New function.
417 * c-parser.c: Include gcc-rich-location.h.
418 (c_token_starts_typename): Split out case CPP_KEYWORD into...
419 (c_keyword_starts_typename): ...this new function.
420 (c_parser_declaration_or_fndef): When issuing errors about
421 missing "struct" etc, add a fixit. For other kinds of errors,
422 attempt to provide a suggestion via lookup_name_fuzzy.
423 (c_parser_parms_declarator): When looking ahead to detect typos in
424 type names, also reject CPP_KEYWORD.
425 (c_parser_parameter_declaration): When issuing errors about
426 unknown type names, attempt to provide a suggestion via
427 lookup_name_fuzzy.
428 * c-tree.h (c_keyword_starts_typename): New prototype.
429
5a578671
JM
4302016-06-20 Joseph Myers <joseph@codesourcery.com>
431
432 PR c/71601
433 * c-typeck.c (build_conditional_expr): Return error_mark_node if
434 c_common_type returns error_mark_node.
435
3f8257db 4362016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
437
438 PR c/69507
439 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
440 __alignof__ (expression).
441
6a3f203c
DM
4422016-06-14 David Malcolm <dmalcolm@redhat.com>
443
444 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
445
264757fb
DM
4462016-06-14 David Malcolm <dmalcolm@redhat.com>
447
448 * c-typeck.c (build_component_ref): Simplify fixit code by
449 using gcc_rich_location::add_fixit_misspelled_id.
450 (set_init_label): Likewise.
451
f7e4f2e3
DM
4522016-06-13 David Malcolm <dmalcolm@redhat.com>
453
454 * c-parser.c (c_parser_initelt): Provide location of name for new
455 location_t param of set_init_label.
456 * c-tree.h (set_init_label): Add location_t param.
457 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
458 param and use it when issuing error messages about unrecognized
459 field names. Attempt to provide a fixit hint if appropriate,
460 otherwise update the error message to provide the type name.
461
4b1ffdb1
TS
4622016-06-10 Thomas Schwinge <thomas@codesourcery.com>
463
464 PR c/71381
465 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
466 Loosen checking.
467
44a845ca
MS
4682016-06-08 Martin Sebor <msebor@redhat.com>
469 Jakub Jelinek <jakub@redhat.com>
470
471 PR c++/70507
472 PR c/68120
473 * c-typeck.c (convert_arguments): Don't promote last argument
474 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
475
92a5f2ba
MP
4762016-06-08 Marek Polacek <polacek@redhat.com>
477
478 PR c/71418
479 * c-decl.c (grokdeclarator): Check TYPE_P.
480
08203f73
MP
481 PR c/71426
482 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
483 code.
484
6ffd47b7
DM
4852016-06-07 David Malcolm <dmalcolm@redhat.com>
486
487 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
488 and structure element reference, capture the location of the
489 element name token and pass it to build_component_ref.
490 (c_parser_postfix_expression_after_primary): Likewise for
491 structure element dereference.
492 (c_parser_omp_variable_list): Likewise for
493 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
494 * c-tree.h (build_component_ref): Add location_t param.
495 * c-typeck.c (build_component_ref): Add location_t param
496 COMPONENT_LOC. Use it, if available, when issuing hints about
497 mispelled member names to provide a fixit replacement hint.
498
1f40cff3
MP
4992016-06-06 Marek Polacek <polacek@redhat.com>
500
501 PR c/71362
502 * c-parser.c (c_parser_direct_declarator): Set location.
503
5545a907
MP
5042016-06-06 Marek Polacek <polacek@redhat.com>
505
506 * c-typeck.c (comptypes_internal): Handle comparisons of
507 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
508 TYPE_REF_CAN_ALIAS_ALL.
509
b605f663
CLT
5102016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
511
512 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
513 arguments as addressable when async clause exists.
514
00631022
JJ
5152016-05-30 Jakub Jelinek <jakub@redhat.com>
516
517 PR c++/71349
518 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
519 when combined with target construct.
520
7211a097
JJ
5212016-05-26 Jakub Jelinek <jakub@redhat.com>
522
523 * c-parser.c (c_parser_omp_clause_schedule): Warn if
524 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
525
95efe6b6
MP
5262016-05-25 Marek Polacek <polacek@redhat.com>
527
528 PR c/71265
529 * c-decl.c (c_make_fname_decl): Don't check seen_error.
530
a23faf7a
MP
531 PR c/71266
532 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
533
e46c7770
CP
5342016-05-24 Cesar Philippidis <cesar@codesourcery.com>
535
536 * c-parser.c (c_parser_oacc_declare): Add support for
537 GOMP_MAP_FIRSTPRIVATE_POINTER.
538 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
539 argument with enum c_omp_region_type ort.
540 (handle_omp_array_sections): Likewise. Update call to
541 handle_omp_array_sections_1.
542 (c_finish_omp_clauses): Add specific errors and warning messages for
543 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
544 call to handle_omp_array_sections.
545
a04e69c0
TS
5462016-05-24 Thomas Schwinge <thomas@codesourcery.com>
547
548 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
549
f17a223d
RB
5502016-05-24 Richard Biener <rguenther@suse.de>
551
552 PR middle-end/70434
553 PR c/69504
554 * c-typeck.c (build_array_ref): Do not complain about indexing
555 non-lvalue vectors. Adjust for function name change.
556
79063edd
MS
5572016-05-20 Martin Sebor <msebor@redhat.com>
558
559 PR c/71115
560 * c-typeck.c (error_init): Use
561 expansion_point_location_if_in_system_header.
562 (warning_init): Same.
563
8a40fef3
DM
5642016-05-19 David Malcolm <dmalcolm@redhat.com>
565
566 PR c/71171
567 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
568 in error-handling.
569 (c_parser_postfix_expression): Likewise.
570 * c-tree.h (c_expr::set_error): New method.
571 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
572 that result's range is initialized.
573
e9892350
JG
5742016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
575
576 * c-typeck.c (parser_build_unary_op): Fix formatting.
577
8fad45f5
MW
5782016-05-16 Matthew Wahab <matthew.wahab@arm.com>
579
580 * c-decl.c (grokdeclarator): Remove errmsg and use of
581 targetm.invalid_return_type.
582 (grokparms): Remove errmsg and use of
583 targetm.invalid_parameter_type.
584
aa4b467b
JM
5852016-05-13 Joseph Myers <joseph@codesourcery.com>
586
587 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
588 function return type.
589
4f2e1536
MP
5902016-05-12 Marek Polacek <polacek@redhat.com>
591
592 PR c/70756
593 * c-decl.c (build_compound_literal): Pass LOC down to
594 c_incomplete_type_error.
595 * c-tree.h (require_complete_type): Adjust declaration.
596 (c_incomplete_type_error): Likewise.
597 * c-typeck.c (require_complete_type): Add location parameter, pass it
598 down to c_incomplete_type_error.
599 (c_incomplete_type_error): Add location parameter, pass it down to
600 error_at.
601 (build_component_ref): Pass location down to c_incomplete_type_error.
602 (default_conversion): Pass location down to require_complete_type.
603 (build_array_ref): Likewise.
604 (build_function_call_vec): Likewise.
605 (convert_arguments): Likewise.
606 (build_unary_op): Likewise.
607 (build_c_cast): Likewise.
608 (build_modify_expr): Likewise.
609 (convert_for_assignment): Likewise.
610 (c_finish_omp_clauses): Likewise.
611
d6e83a8d
MM
6122016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
613
614 PR c/43651
615 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
616 is enabled.
617 * c-errors.c (pedwarn_c90): Return true if warned.
618 * c-tree.h (pedwarn_c90): Change return type to bool.
619 (enum c_declspec_word): Add new enumerator cdw_atomic.
620
5c3a10fb
MP
6212016-05-11 Marek Polacek <polacek@redhat.com>
622
623 PR c++/71024
624 * c-decl.c (diagnose_mismatched_decls): Factor out code to
625 diagnose_mismatched_attributes and call it.
626
cf68d92c
MP
6272016-05-10 Marek Polacek <polacek@redhat.com>
628
629 PR c/70255
630 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
631 on a declaration following the definition.
632
351f85c5
JJ
6332016-05-05 Jakub Jelinek <jakub@redhat.com>
634
635 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
636 parse it through to c_parser_c99_block_statement.
637 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
638 caller.
639
deef7113
MP
6402016-05-04 Marek Polacek <polacek@redhat.com>
641
642 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
643 OPT_Wdangling_else.
644
de55efd5
MP
6452016-05-04 Marek Polacek <polacek@redhat.com>
646
647 PR c/48778
648 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
649 for macro expansions.
650
79ce98bc
MP
6512016-05-03 Marek Polacek <polacek@redhat.com>
652
653 PR c/70859
654 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
655 check_builtin_function_arguments.
656
fb2647aa
RB
6572016-05-03 Richard Biener <rguenther@suse.de>
658
659 * Make-lang.in (cc1-checksum.c): For stage-final re-use
660 the checksum from the previous stage.
661
77886428
CP
6622016-05-02 Cesar Philippidis <cesar@codesourcery.com>
663
664 * c-parser.c (c_parser_oacc_all_clauses): Update call to
665 c_finish_omp_clauses.
666 (c_parser_omp_all_clauses): Likewise.
667 (c_parser_oacc_cache): Likewise.
668 (c_parser_oacc_loop): Likewise.
669 (omp_split_clauses): Likewise.
670 (c_parser_omp_declare_target): Likewise.
671 (c_parser_cilk_all_clauses): Likewise.
672 (c_parser_cilk_for): Likewise.
673 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
674 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
675
7176a4a0
MP
6762016-05-02 Marek Polacek <polacek@redhat.com>
677
678 PR c/70851
679 * c-decl.c (grokdeclarator): Diagnose when array's size has an
680 incomplete type.
681
e7ff0319
CP
6822016-04-29 Cesar Philippidis <cesar@codesourcery.com>
683
684 PR middle-end/70626
685 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
686 OACC_LOOP_CLAUSE_MASK.
687 (c_parser_oacc_kernels_parallel): Update call to
688 c_oacc_split_loop_clauses.
689
9f405ce1
AM
6902016-04-28 Andrew MacLeod <amacleod@redhat.com>
691
692 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
693 argument to build_modify_expr in two cases.
694
c1e1f433
BS
6952016-04-27 Bernd Schmidt <bschmidt@redhat.com>
696
697 * c-parser.c (c_parser_postfix_expression_after_primary): Call
698 warn_for_memset instead of warning directly here.
699
2448a956
MP
7002016-04-26 Marek Polacek <polacek@redhat.com>
701
702 PR c/67784
703 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
704 out of ...
705 (c_parser_for_statement): ... here.
706 (c_parser_if_statement): Use it.
707 (c_parser_switch_statement): Use it.
708 (c_parser_while_statement): Use it.
709
b02a5e26
MP
710 PR c/70791
711 * c-decl.c (pushdecl): Pass LOCUS down to warning.
712
477d4906
IV
7132016-04-20 Ilya Verbin <ilya.verbin@intel.com>
714
715 PR c++/69363
716 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
717 instead of c_finish_cilk_clauses.
718 * c-tree.h (c_finish_omp_clauses): Add new default argument.
719 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
720 floating-point variables in the linear clause for Cilk Plus.
721
fe37c7af
MM
7222016-04-18 Michael Matz <matz@suse.de>
723
724 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
725 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
726
949505a9
MP
7272016-04-15 Marek Polacek <polacek@redhat.com>
728
729 PR c/70671
730 * c-typeck.c (build_unary_op): Pass location down to error and
731 warning call.
732
dda1bf61
JJ
7332016-04-15 Jakub Jelinek <jakub@redhat.com>
734
735 PR c/70436
736 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
737 where needed.
738 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
739 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
740 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
741 Adjust c_parser_pragma callers.
742 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
743 caller.
744 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
745 c_parser_statement.
746 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
747 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
748 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
749 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
750 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
751 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
752 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
753 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
754 down where needed.
755 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
756 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
757 calls.
758
99cd9857
MP
7592016-04-13 Marek Polacek <polacek@redhat.com>
760
761 PR c/70436
762 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
763 adjust callers.
764 (c_parser_statement): Likewise.
765 (c_parser_c99_block_statement): Likewise.
766 (c_parser_while_statement): Likewise.
767 (c_parser_for_statement): Likewise.
768 (c_parser_if_body): Don't set IF_P here.
769 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
770 about dangling else here.
771 * c-tree.h (c_finish_if_stmt): Adjust declaration.
772 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
773 warn about dangling else here.
774
f13355da
MP
7752016-04-04 Marek Polacek <polacek@redhat.com>
776
777 PR c/70307
778 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
779
5fde6a45
MP
7802016-03-31 Marek Polacek <polacek@redhat.com>
781
782 PR c/70297
783 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
784
4bbf545b
DM
7852016-03-18 David Malcolm <dmalcolm@redhat.com>
786
787 PR c/70281
788 * c-parser.c (c_parser_postfix_expression): Set the source range
789 for uses of "__builtin_types_compatible_p".
790
fcc2b74f
JJ
7912016-03-17 Jakub Jelinek <jakub@redhat.com>
792
793 PR c/70280
794 * c-typeck.c (composite_type): Don't count void_list_node
795 into len, if the list is terminated by void_list_node, start
796 with void_list_node instead of NULL for newargs. Stop
797 at void_list_node.
798
ab4c578f
MP
7992016-03-16 Marek Polacek <polacek@redhat.com>
800
801 PR c/70093
802 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
803 nested functions returning VM types.
804
96b3c82d
CP
8052016-03-09 Cesar Philippidis <cesar@codesourcery.com>
806
807 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
808 when calling c_finish_omp_clauses.
809
29b9828f
BS
8102016-03-04 Bernd Schmidt <bschmidt@redhat.com>
811
812 PR c/69824
813 * c-decl.c (get_parm_info): Don't queue implicit function declarations
814 for later.
815
7ff6ca38
MP
8162016-03-04 Marek Polacek <polacek@redhat.com>
817
818 PR c/69798
819 * c-parser.c (c_parser_postfix_expression): Call
820 c_parser_cast_expression rather than c_parser_postfix_expression.
821
686e2237
JJ
8222016-03-01 Jakub Jelinek <jakub@redhat.com>
823
824 PR c/69796
825 PR c/69974
826 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
827 of incomplete decls to error_mark_node.
828
0b05329b
MP
8292016-02-24 Marek Polacek <polacek@redhat.com>
830
831 PR c/69819
832 * c-decl.c (finish_decl): Don't update the copy of the type of a
833 different decl type.
834
067fbd8b
JJ
8352016-02-23 Jakub Jelinek <jakub@redhat.com>
836
837 PR objc/69844
838 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
839 in id_kind reclassification.
840
bf14eba2
JJ
8412016-02-16 Jakub Jelinek <jakub@redhat.com>
842
843 PR c/69835
844 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
845
ba539195
JN
8462016-02-16 James Norris <jnorris@codesourcery.com>
847
848 PR c/64748
849 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
850
16595a1f
BS
8512016-02-12 Bernd Schmidt <bschmidt@redhat.com>
852
f48dfe98
BS
853 * c-decl.c (build_null_declspecs): Zero the entire struct.
854
16595a1f
BS
855 PR c/69522
856 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
857 callers changed. If nested_p is true, use it to call
858 finish_implicit_inits.
859 * c-tree.h (finish_implicit_inits): Declare.
860 * c-typeck.c (finish_implicit_inits): New function. Move code
861 from ...
862 (push_init_level): ... here.
863 (set_designator, process_init_element): Call finish_implicit_inits.
864
66756373
JJ
8652016-02-11 Jakub Jelinek <jakub@redhat.com>
866
867 PR c/69768
868 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
869 arguments for -Waddress warning.
870
1066e9b5
JJ
8712016-02-04 Jakub Jelinek <jakub@redhat.com>
872
873 PR c/69669
874 * c-decl.c (finish_enum): When honoring mode attribute,
875 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
876
3a5d2ba4
JJ
8772016-01-29 Jakub Jelinek <jakub@redhat.com>
878
879 PR debug/69518
880 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
881 all type variants, not just TYPE_MAIN_VARIANT.
882
cbdd8ae0
JJ
8832016-01-27 Jakub Jelinek <jakub@redhat.com>
884
885 PR debug/66869
886 * c-decl.c (c_write_global_declarations_1): Warn with
887 warn_unused_function if static prototype without definition
888 is not C_DECL_USED.
889
fa74a4bc
MP
8902016-01-27 Marek Polacek <polacek@redhat.com>
891
892 PR c/68062
893 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
894 to unsigned, if needed. Add -Wsign-compare warning.
895
13f92e8d
JJ
8962016-01-26 Jakub Jelinek <jakub@redhat.com>
897
898 PR tree-optimization/69483
899 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
900
cd8e73dc 9012016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
902
903 PR c/24293
904 * c-tree.h (incomplete_record_decls): Declare.
905 * c-parser.c (incomplete_record_decls): Define.
906 (c_parser_translation_unit): Iterate through incomplete_record_decls and
907 report error if any decl has zero size.
908 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
909 or enum type to incomplete_record_decls.
910
e6d6ec9e
TV
9112016-01-14 Tom de Vries <tom@codesourcery.com>
912
913 PR tree-optimization/68773
914 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
915 set force_output.
916
00083992
MP
9172016-01-14 Marek Polacek <polacek@redhat.com>
918
919 PR c/69262
920 * c-decl.c (grokdeclarator): Provide more information for invalid
921 array declarations.
922
7443cf13
DM
9232016-01-06 David Malcolm <dmalcolm@redhat.com>
924
925 * c-parser.c (c_parser_unary_expression): For dereferences, build
926 a combined location before calling build_indirect_ref, so that
927 error reports cover the full range, manually updating the c_expr
928 src_range.
929
6b131d5b
MP
9302016-01-06 Marek Polacek <polacek@redhat.com>
931
932 PR sanitizer/69099
933 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
934 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
935 NULL.
936
818ab71a
JJ
9372016-01-04 Jakub Jelinek <jakub@redhat.com>
938
939 Update copyright years.
940
2fe0a208
MP
9412016-01-04 Marek Polacek <polacek@redhat.com>
942
943 PR c/68908
944 * c-typeck.c (build_atomic_assign): Improve commentary. Add
945 optimization to use __atomic_fetch_* built-in if possible.
946
c7b48c8a
TS
9472015-12-23 Thomas Schwinge <thomas@codesourcery.com>
948
949 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
950 into...
951 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
952 all users.
953
fda5652f
MP
9542015-12-22 Marek Polacek <polacek@redhat.com>
955
956 PR c/69002
957 * c-typeck.c (build_component_ref): Warn when acessing elements of
958 atomic structures or unions.
959
745e411d
DM
9602015-12-21 David Malcolm <dmalcolm@redhat.com>
961
962 * c-typeck.c: Include "gcc-rich-location.h".
963 (build_binary_op): In the two places that call binary_op_error,
964 create a gcc_rich_location and populate it with the location of
965 the binary op and its two operands.
966
94c40e19
DM
9672015-12-16 David Malcolm <dmalcolm@redhat.com>
968
969 * c-parser.c (c_parser_statement_after_labels): When calling
970 c_finish_return, Use the return expression's location if it has
971 one, falling back to the location of the first token within it.
972 * c-typeck.c (c_finish_return): When issuing warnings about
973 the incorrect presence/absence of a return value, issue a note
974 showing the declaration of the function.
975
de67c4c3
DM
9762015-12-16 David Malcolm <dmalcolm@redhat.com>
977
978 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
979 to 4.
980 (c_parser_peek_nth_token): New function.
981 (c_parser_peek_conflict_marker): New function.
982 (c_parser_error): Detect conflict markers and report them as such.
983
a10704e1
DM
9842015-12-16 David Malcolm <dmalcolm@redhat.com>
985
986 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
987 to preserve range information for the primary expression
988 in the call to c_parser_postfix_expression_after_primary.
989
8062bca6
DM
9902015-12-16 David Malcolm <dmalcolm@redhat.com>
991
992 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
993 expression location, falling back on the first token location,
994 rather than always using the latter.
995
d06f8b75
MP
9962015-12-16 Marek Polacek <polacek@redhat.com>
997
998 PR c/64637
999 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
1000 available.
1001
2994fb91
MP
10022015-12-15 Marek Polacek <polacek@redhat.com>
1003
1004 PR c/68907
1005 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
1006 artificial decl.
1007
a1b93f8d
DM
10082015-12-08 David Malcolm <dmalcolm@redhat.com>
1009
1010 * c-parser.c (c_parser_alignof_expression): Capture location of
1011 closing parenthesis (if any), or of end of unary expression, and
1012 use it to build a src_range for the expression.
1013
46c6e1e2
DM
10142015-12-08 David Malcolm <dmalcolm@redhat.com>
1015
1016 PR c/68757
1017 * c-parser.c (c_parser_get_builtin_args): Add
1018 "out_close_paren_loc" param, and write back to it.
1019 (c_parser_postfix_expression): Capture the closing
1020 parenthesis location for RID_CHOOSE_EXPR,
1021 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
1022 RID_BUILTIN_SHUFFLE and use it to set the source range
1023 for such expressions; within RID_BUILTIN_COMPLEX set
1024 the underlying location.
1025
66189108
MP
10262015-12-07 Marek Polacek <polacek@redhat.com>
1027
1028 PR c/68668
1029 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1030 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1031
f187980b
EB
10322015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1033
1034 * c-tree.h (c_build_va_arg): Adjust prototype.
1035 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1036 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1037 parameter, adjust throughout and issue an error if EXPR is a component
1038 with reverse storage order.
1039
4250754e
JM
10402015-12-02 Jason Merrill <jason@redhat.com>
1041
1042 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1043 (c_fully_fold_internal, decl_constant_value_for_optimization):
1044 Move from c-common.c.
1045 * c-tree.h: Declare decl_constant_value_for_optimization.
1046 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1047
e9e32ee6
JM
10482015-12-02 Joseph Myers <joseph@codesourcery.com>
1049
1050 PR c/68162
1051 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1052 following link from declarator to next declarator. Track original
1053 qualified type and pass it to c_build_qualified_type.
1054 * c-typeck.c (c_build_qualified_type): Add arguments
1055 orig_qual_type and orig_qual_indirect.
1056
ff7a55bf
TS
10572015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1058
1059 * c-parser.c (c_parser_omp_clause_name)
1060 (c_parser_oacc_all_clauses): Alphabetical sorting.
1061
657e4e47
JJ
10622015-12-02 Jakub Jelinek <jakub@redhat.com>
1063
1064 PR c/68533
1065 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1066 for diagnostics.
1067
37d5ad46
JB
10682015-12-01 Julian Brown <julian@codesourcery.com>
1069 Cesar Philippidis <cesar@codesourcery.com>
1070 James Norris <James_Norris@mentor.com>
1071
1072 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1073 (c_parser_oacc_clause_use_device): New function.
1074 (c_parser_oacc_all_clauses): Add use_device support.
1075 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1076 (c_parser_oacc_host_data): New function.
1077 (c_parser_omp_construct): Add host_data support.
1078 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1079 * c-typeck.c (c_finish_oacc_host_data): New function.
1080 (c_finish_omp_clauses): Add use_device support.
1081
a4850ce9
JH
10822015-11-29 Jan Hubicka <hubicka@ucw.cz>
1083
1084 PR c/67106
1085 * c-decl.c: Set TYPE_PACKED in variants.
1086
b58d3df2
ML
10872015-11-27 Martin Liska <mliska@suse.cz>
1088
1089 PR c++/68312
1090 * c-array-notation.c (fix_builtin_array_notation_fn):
1091 Use release_vec_vec instead of vec::release.
1092 (build_array_notation_expr): Likewise.
1093 (fix_conditional_array_notations_1): Likewise.
1094 (fix_array_notation_expr): Likewise.
1095 (fix_array_notation_call_expr): Likewise.
1096
aec17bfe
JJ
10972015-11-27 Jakub Jelinek <jakub@redhat.com>
1098
1099 PR c/63326
1100 * c-parser.c (c_parser_compound_statement_nostart): If
1101 last_label is true, use pragma_stmt instead of pragma_compound
1102 as second c_parser_pragma argument.
1103 (c_parser_omp_ordered, c_parser_omp_target_update,
1104 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1105 false as second argument to c_parser_skip_to_pragma_eol after
1106 diagnosing standalone directives used in pragma_stmt context.
1107
688c4de0
IV
11082015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1109
1110 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1111 with "if (ENABLE_OFFLOADING)".
1112
cbd03aee
DM
11132015-11-23 David Malcolm <dmalcolm@redhat.com>
1114
1115 PR objc/68438
1116 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1117 for various Objective-C constructs: Class.name syntax,
1118 @selector(), @protocol(), @encode(), and [] message syntax.
1119
a87a86e1
DM
11202015-11-20 David Malcolm <dmalcolm@redhat.com>
1121
1122 PR 62314
1123 * c-typeck.c (should_suggest_deref_p): New function.
1124 (build_component_ref): Special-case POINTER_TYPE when
1125 generating a "not a structure of union" error message, and
1126 suggest a "->" rather than a ".", providing a fix-it hint.
1127
8ece8dfb
DM
11282015-11-19 David Malcolm <dmalcolm@redhat.com>
1129
1130 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1131 candidate into a new function, find_closest_identifier.
1132
433068cc
MP
11332015-11-19 Marek Polacek <polacek@redhat.com>
1134
1135 PR c/68412
1136 * c-typeck.c (parser_build_binary_op): Properly handle
1137 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1138
bef08b71
DM
11392015-11-17 David Malcolm <dmalcolm@redhat.com>
1140
1141 * c-parser.c (set_c_expr_source_range): Bulletproof both
1142 overloaded implementations against NULL expr->value.
1143 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1144 values.
1145 (c_parser_unary_expression): Likewise when handling addresses of
1146 labels.
1147 (c_parser_postfix_expression): Likewise for statement expressions,
1148 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1149 __builtin_va_arg, and for __builtin_offset_of.
1150 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1151 src_range using the range of the braced initializer.
1152 (c_parser_transaction_expression): Set src_range for "ret" to a
1153 sane pair of values.
1154
fff77217
KY
11552015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1156
1157 * c-parser.c (c_finish_omp_declare_simd): Look for
1158 "simd" attribute as well. Update error message.
1159
1d899da2
TS
11602015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1161
1162 * c-parser.c (c_parser_omp_declare_target): Adjust.
1163
e4606348
JJ
11642015-11-14 Jakub Jelinek <jakub@redhat.com>
1165
1166 * c-typeck.c (c_finish_omp_clauses): Don't mark
1167 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1168
3e636daf
MP
11692015-11-14 Marek Polacek <polacek@redhat.com>
1170
1171 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1172 * c-typeck.c: Likewise.
1173
ebedc9a3
DM
11742015-11-13 David Malcolm <dmalcolm@redhat.com>
1175
1176 * c-decl.c (warn_defaults_to): Pass line_table to
1177 rich_location ctor.
1178 * c-errors.c (pedwarn_c99): Likewise.
1179 (pedwarn_c90): Likewise.
1180 * c-parser.c (set_c_expr_source_range): New functions.
1181 (c_token::get_range): New method.
1182 (c_token::get_finish): New method.
1183 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1184 based on the range from the start of the LHS to the end of the
1185 RHS.
1186 (c_parser_conditional_expression): Likewise, based on the range
1187 from the start of the cond.value to the end of exp2.value.
1188 (c_parser_binary_expression): Call set_c_expr_source_range on
1189 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1190 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1191 based on the cast_loc through to the end of the expr.
1192 (c_parser_unary_expression): Likewise, based on the
1193 op_loc through to the end of op.
1194 (c_parser_sizeof_expression) Likewise, based on the start of the
1195 sizeof token through to either the closing paren or the end of
1196 expr.
1197 (c_parser_postfix_expression): Likewise, using the token range,
1198 or from the open paren through to the close paren for
1199 parenthesized expressions.
1200 (c_parser_postfix_expression_after_primary): Likewise, for
1201 various kinds of expression.
1202 * c-tree.h (struct c_expr): Add field "src_range".
1203 (c_expr::get_start): New method.
1204 (c_expr::get_finish): New method.
1205 (set_c_expr_source_range): New decls.
1206 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1207 on ret for prefix unary ops.
1208 (parser_build_binary_op): Likewise, running from the start of
1209 arg1.value through to the end of arg2.value.
1210
ec8b536f
MP
12112015-11-13 Marek Polacek <polacek@redhat.com>
1212
1213 PR c/68320
1214 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1215
277fe616
DM
12162015-11-13 David Malcolm <dmalcolm@redhat.com>
1217
1218 * c-typeck.c: Include spellcheck.h.
1219 (lookup_field_fuzzy_find_candidates): New function.
1220 (lookup_field_fuzzy): New function.
1221 (build_component_ref): If the field was not found, try using
1222 lookup_field_fuzzy and potentially offer a suggestion.
1223
6e232ba4
JN
12242015-11-12 James Norris <jnorris@codesourcery.com>
1225 Joseph Myers <joseph@codesourcery.com>
1226
1227 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1228 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1229 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1230 and PRAGMA_OMP_CLAUSE_LINK.
1231 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1232 and PRAGMA_OACC_CLAUSE_LINK.
1233 (OACC_DECLARE_CLAUSE_MASK): New definition.
1234 (c_parser_oacc_declare): New function.
1235
9be4f715
MP
12362015-11-12 Marek Polacek <polacek@redhat.com>
1237
1238 PR c/67784
1239 * c-parser.c (c_parser_for_statement): Reclassify the token in
1240 a correct scope.
1241
e78bede6
MP
12422015-11-11 Marek Polacek <polacek@redhat.com>
1243
1244 PR c/68107
1245 PR c++/68266
1246 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1247 checking the size of an array.
1248
69f293c9
AM
12492015-11-11 Andrew MacLeod <amacleod@redhat.com>
1250
1251 * c-array-notation.c: Remove unused header files.
1252 * c-aux-info.c: Likewise.
1253 * c-convert.c: Likewise.
1254 * c-decl.c: Likewise.
1255 * c-errors.c: Likewise.
1256 * c-lang.c: Likewise.
1257 * c-objc-common.c: Likewise.
1258 * c-parser.c: Likewise.
1259 * c-typeck.c: Likewise.
1260 * gccspec.c: Likewise.
1261
3a40d81d
NS
12622015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1263 Cesar Philippidis <cesar@codesourcery.com>
1264 James Norris <jnorris@codesourcery.com>
1265 Julian Brown <julian@codesourcery.com>
1266 Nathan Sidwell <nathan@codesourcery.com>
1267
1268 c/
1269 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1270 routine arg.
1271 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1272 (c_parser_pragma): Parse 'acc routine'.
1273 (OACC_ROUTINE_CLAUSE_MARK): Define.
1274 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1275
fc402eec
AA
12762015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1277
1278 PR debug/67192
1279 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1280 location of the backward-goto to the start of the loop body.
1281
f6b0b3db
AA
12822015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1283
1284 PR debug/67192
1285 * c-parser.c (c_parser_while_statement): Finish the loop before
1286 parsing ahead for misleading indentation.
1287 (c_parser_for_statement): Likewise.
1288
ee45a32d
EB
12892015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1290
1291 * c-decl.c (finish_struct): If the structure has reverse storage
1292 order, rewrite the type of array fields with scalar component. Call
1293 maybe_apply_pragma_scalar_storage_order on entry.
1294 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1295 errors on bit-fields and reverse SSO here and not...
1296 (c_mark_addressable): ...here.
1297 (output_init_element): Adjust call to initializer_constant_valid_p.
1298 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1299
8a645150
DM
13002015-11-06 David Malcolm <dmalcolm@redhat.com>
1301
1302 * c-decl.c (warn_defaults_to): Update for change in signature
1303 of diagnostic_set_info.
1304 * c-errors.c (pedwarn_c99): Likewise.
1305 (pedwarn_c90): Likewise.
1306 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1307 for textinfo::set_location.
1308
7a5e4956
CP
13092015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1310 Thomas Schwinge <thomas@codesourcery.com>
1311 James Norris <jnorris@codesourcery.com>
1312
1313 * c-parser.c (c_parser_omp_clause_name): Add support for
1314 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1315 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1316 default(none) in OpenACC.
1317 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1318 arguments.
1319 (c_parser_oacc_clause_tile): New function.
1320 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1321 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1322 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1323 TILE}.
1324 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1325 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1326 FIRSTPRIVATE}.
1327 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1328 (c_parser_oacc_update): Update the error message for missing clauses.
1329 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1330 and OMP_CLAUSE_INDEPENDENT.
1331
bfcfbfa0
MP
13322015-11-05 Marek Polacek <polacek@redhat.com>
1333
1334 PR c/68090
1335 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1336 deal with pre-evaluation on invalid types.
1337
e01d41e5
JJ
13382015-11-05 Jakub Jelinek <jakub@redhat.com>
1339 Ilya Verbin <ilya.verbin@intel.com>
1340
1341 * c-parser.c: Include context.h and gimple-expr.h.
1342 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1343 monotonic together with nonmonotonic.
1344 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1345 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1346 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1347 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1348 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1349 expressions on combined target teams before the target.
1350 (c_parser_omp_declare_target): If decl has "omp declare target" or
1351 "omp declare target link" attribute, and cgraph or varpool node already
1352 exists, then set corresponding flags. Call c_finish_omp_clauses
1353 in the parenthesized extended-list syntax case.
1354 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1355 declare target.
1356 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1357 on OMP_CLAUSE_REDUCTION array sections.
1358 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1359 into the constant offset, or for variable low-bound using
1360 POINTER_PLUS_EXPR. For structure element based array sections use
1361 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1362 (c_finish_omp_clauses): Drop generic_field_head, structure
1363 elements are now always mapped even as array section bases,
1364 diagnose same var in data sharing and mapping clauses. Diagnose if
1365 linear step on declare simd is neither a constant nor a uniform
1366 parameter. Look through POINTER_PLUS_EXPR for array section
1367 reductions. Diagnose the same var or function appearing multiple
1368 times on the same directive. Fix up wording for the to clause if t
1369 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1370 modifier on kinds other than dynamic or guided or nonmonotonic
1371 modifier together with ordered clause.
1372
4bf9e5a8
TS
13732015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1374 Chung-Lin Tang <cltang@codesourcery.com>
1375
1376 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1377
2adfab87
AM
13782015-10-29 Andrew MacLeod <amacleod@redhat.com>
1379
1380 * c-array-notation.c: Reorder #include's and remove duplicates.
1381 * c-aux-info.c: Likewise.
1382 * c-convert.c: Likewise.
1383 * c-decl.c: Likewise.
1384 * c-errors.c: Likewise.
1385 * c-lang.c: Likewise.
1386 * c-objc-common.c: Likewise.
1387 * c-parser.c: Likewise.
1388 * c-typeck.c: Likewise.
1389
e922069e
JW
13902015-10-26 Jim Wilson <jim.wilson@linaro.org>
1391
1392 PR debug/66068
1393 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1394 after calling build_qualified_type.
1395
765dd391
CP
13962015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1397 Thomas Schwinge <thomas@codesourcery.com>
1398 James Norris <jnorris@codesourcery.com>
1399 Joseph Myers <joseph@codesourcery.com>
1400 Julian Brown <julian@codesourcery.com>
1401 Bernd Schmidt <bschmidt@redhat.com>
1402
1403 * c-parser.c (c_parser_oacc_shape_clause): New.
1404 (c_parser_oacc_simple_clause): New.
1405 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1406 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1407
88bae6f4
TS
14082015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1409 James Norris <jnorris@codesourcery.com>
1410 Cesar Philippidis <cesar@codesourcery.com>
1411
1412 PR c/64765
1413 PR c/64880
1414 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1415 parameters, and handle these. Adjust all users.
1416 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1417 into...
1418 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1419 all users.
1420 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1421 declare functions.
1422 (c_finish_omp_construct): Declare function.
1423 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1424 Merge functions into...
1425 (c_finish_omp_construct): ... this new function.
1426
a8fc2579
RB
14272015-10-22 Richard Biener <rguenther@suse.de>
1428
1429 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1430 before folding a MINUS_EXPR.
1431
e9122ef6
MP
14322015-10-21 Marek Polacek <polacek@redhat.com>
1433
1434 PR c/68024
1435 * c-decl.c (start_function): Warn about vararg functions without
1436 a prototype.
1437
9f47c7e5
IE
14382015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1439
1440 * c-typeck.c (build_conditional_expr): Use boolean vector
1441 type for vector comparison.
1442 (build_vec_cmp): New.
1443 (build_binary_op): Use build_vec_cmp for comparison.
1444
fa60eeb9
MP
14452015-10-20 Marek Polacek <polacek@redhat.com>
1446
1447 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1448
2c7020eb
MP
14492015-10-20 Marek Polacek <polacek@redhat.com>
1450
1451 PR c/67964
1452 * c-parser.c (c_parser_attributes): Break out of the loop if the
1453 token after an attribute isn't a comma.
1454
d9a6bd32
JJ
14552015-10-13 Jakub Jelinek <jakub@redhat.com>
1456 Aldy Hernandez <aldyh@redhat.com>
1457
1458 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1459 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1460 (c_parser_omp_variable_list): Handle structure elements for
1461 map, to and from clauses. Handle array sections in reduction
1462 clause. Formatting fixes.
1463 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1464 if clause modifiers.
1465 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1466 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1467 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1468 c_parser_omp_clause_is_device_ptr): New functions.
1469 (c_parser_omp_clause_ordered): Parse optional parameter.
1470 (c_parser_omp_clause_reduction): Handle array reductions.
1471 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1472 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1473 functions.
1474 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1475 (c_parser_omp_clause_depend_sink): New function.
1476 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1477 (c_parser_omp_clause_map): Parse release/delete map kinds and
1478 optional always modifier.
1479 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1480 and c_finish_omp_clauses callers.
1481 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1482 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1483 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1484 (OMP_CRITICAL_CLAUSE_MASK): Define.
1485 (c_parser_omp_critical): Parse critical clauses.
1486 (c_parser_omp_for_loop): Handle doacross loops, adjust
1487 c_finish_omp_for and c_finish_omp_clauses callers.
1488 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1489 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1490 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1491 (c_parser_omp_for): Disallow ordered clause when combined with
1492 distribute. Disallow linear clause when combined with distribute
1493 and not combined with simd.
1494 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1495 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1496 parse clauses and if depend clause is found, don't parse a body.
1497 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1498 Allow target parallel without for after it.
1499 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1500 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1501 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1502 invalid kinds.
1503 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1504 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1505 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1506 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1507 functions.
1508 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1509 defaultmap and is_device_ptr clauses.
1510 (c_parser_omp_target): Parse target parallel and target simd. Set
1511 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1512 and target exit data. Diagnose invalid map kinds.
1513 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1514 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1515 construct.
1516 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1517 &omp_priv.
1518 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1519 (c_parser_omp_taskloop): New function.
1520 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1521 handle PRAGMA_OMP_TASKLOOP.
1522 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1523 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1524 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1525 Add IS_OMP argument, handle structure element bases, diagnose
1526 bitfields, pass IS_OMP recursively, diagnose known zero length
1527 array sections in depend clauses, handle array sections in reduction
1528 clause, diagnose negative length even for pointers.
1529 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1530 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1531 array sections in reduction clause, set
1532 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1533 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1534 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1535 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1536
21ba0cea
MP
15372015-10-06 Marek Polacek <polacek@redhat.com>
1538
1539 * c-parser.c (c_parser_statement_after_labels): Use
1540 protected_set_expr_location.
1541 (c_parser_omp_clause_num_gangs): Likewise.
1542 (c_parser_omp_clause_num_threads): Likewise.
1543 (c_parser_omp_clause_num_workers): Likewise.
1544 (c_parser_omp_clause_vector_length): Likewise.
1545 (c_parser_omp_clause_num_teams): Likewise.
1546 (c_parser_omp_clause_thread_limit): Likewise.
1547 * c-typeck.c (build_c_cast): Likewise.
1548 (c_cast_expr): Likewise.
1549
624d31fe
RS
15502015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1551
1552 * c-typeck.c (c_tree_equal): Use real_equal instead of
1553 REAL_VALUES_EQUAL.
1554
b8fd7909
JM
15552015-10-04 Jason Merrill <jason@redhat.com>
1556
1557 * c-parser.c (c_lex_one_token): Handle @synchronized.
1558 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1559 can change whether the function is transaction_safe.
1560
1c7485af
MP
15612015-10-02 Marek Polacek <polacek@redhat.com>
1562
1563 PR c/67730
1564 * c-typeck.c (convert_for_assignment): Use the expansion point
1565 location throughout.
1566
3e3b8d63
MP
15672015-10-02 Marek Polacek <polacek@redhat.com>
1568
1569 PR c/64249
1570 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1571 and pass it down to c_parser_if_statement.
1572 (c_parser_else_body): Add CHAIN parameter and pass it down to
1573 c_parser_statement_after_labels.
1574 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1575 duplicated if-else-if conditions.
1576
aabef2de
MP
15772015-10-01 Marek Polacek <polacek@redhat.com>
1578
1579 * c-typeck.c (convert_for_assignment): Improve commentary.
1580
de8ddd5f
MP
15812015-09-30 Marek Polacek <polacek@redhat.com>
1582
1583 PR c/67730
1584 * c-typeck.c (c_finish_return): Use the expansion point location for
1585 certain "return with value" warnings.
1586
c4914de6
MLI
15872015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1588
1589 * c-parser.c (pragma_lex): Add loc argument.
1590
0e36f5c7
MP
15912015-09-15 Marek Polacek <polacek@redhat.com>
1592
1593 PR c/67580
1594 * c-decl.c (tag_exists_p): New function.
1595 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1596 struct/union/enum keywords are missing.
1597 * c-tree.h (tag_exists_p): Declare.
1598
2f3bb934
MP
15992015-09-15 Marek Polacek <polacek@redhat.com>
1600
1601 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1602 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1603 Return NULL_TREE instead of 0.
1604 (lookup_name): Return NULL_TREE instead of 0.
1605 (lookup_name_in_scope): Likewise.
1606 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1607 (parser_xref_tag): Use false instead of 0.
1608 (start_struct): Use true instead of 1.
1609 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1610
aa256c4a
MP
16112015-09-14 Marek Polacek <polacek@redhat.com>
1612
1613 * c-typeck.c (set_nonincremental_init_from_string): Use
1614 HOST_WIDE_INT_M1U when shifting a negative value.
1615
dbb68221
MW
16162015-09-09 Mark Wielaard <mjw@redhat.com>
1617
1618 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1619 parm against NULL.
1620
a8a098ac
JJ
16212015-09-10 Jakub Jelinek <jakub@redhat.com>
1622
1623 PR c/67502
1624 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1625 into OMP_FOR_PRE_BODY rather than before the loop.
1626
f4b189d5
JJ
16272015-09-09 Jakub Jelinek <jakub@redhat.com>
1628
0bb99c11
JJ
1629 PR c/67501
1630 * c-parser.c (c_parser_oacc_all_clauses,
1631 c_parser_omp_all_clauses): Remove invalid clause from
1632 list of clauses even if parser->error is set.
1633
fce5e5e3
JJ
1634 PR c/67500
1635 * c-parser.c (c_parser_omp_clause_aligned,
1636 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1637 test for errors.
1638 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1639 error_mark_node.
1640
f4b189d5
JJ
1641 PR c/67495
1642 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1643 instead of c_parser_unary_expression. If the result is !lvalue_p,
1644 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1645
b2aaf235
MP
16462015-09-04 Marek Polacek <polacek@redhat.com>
1647
1648 PR sanitizer/67279
1649 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1650
1807ffc1
MS
16512015-09-03 Martin Sebor <msebor@redhat.com>
1652
1653 PR c/66516
8b652e65
JJ
1654 * c-typeck.c (convert_arguments, parser_build_unary_op,
1655 build_conditional_expr, c_cast_expr, convert_for_assignment,
1656 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1657 reject_gcc_builtin.
1658 (c_decl_implicit): Define.
1659
d04ff417
MP
16602015-09-02 Marek Polacek <polacek@redhat.com>
1661
1662 PR c/67432
1663 * c-parser.c (c_parser_enum_specifier): Give a better error for
1664 an empty enum.
1665
a79683d5
TS
16662015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1667
1668 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1669
191a6b94
MP
16702015-08-12 Marek Polacek <polacek@redhat.com>
1671
1672 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1673 LOC to it.
1674
420a9d9b
MP
16752015-08-03 Marek Polacek <polacek@redhat.com>
1676
1677 PR c/67088
1678 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1679 Use it.
1680 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1681
992118a1
PP
16822015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1683
1684 * c-parser.c (c_parser_if_body): Take token_indent_info
1685 argument. Call warn_for_misleading_indentation even when the
1686 body is a semicolon. Extract token_indent_infos corresponding
1687 to the guard, body and next tokens. Adjust call to
1688 warn_for_misleading_indentation accordingly.
1689 (c_parser_else_body): Likewise.
1690 (c_parser_if_statement): Likewise.
1691 (c_parser_while_statement): Likewise.
1692 (c_parser_for_statement): Likewise.
1693
46308474
LFSM
16942015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1695 Manuel López-Ibáñez <manu@gcc.gnu.org>
1696
1697 * c-decl.c (get_parm_info): Remove static var. Update warning
1698 message.
1699
05b28fd6
MP
17002015-07-27 Marek Polacek <polacek@redhat.com>
1701
1702 PR c++/66555
1703 PR c/54979
1704 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1705
451b5e48
MP
17062015-07-20 Marek Polacek <polacek@redhat.com>
1707
1708 PR c++/55095
1709 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1710 (build_binary_op): Warn about left shift overflows.
1711
1916bcb5
AM
17122015-07-09 Andrew MacLeod <amacleod@redhat.com>
1713
1714 * c-array-notation.c: Adjust includes for flags.h changes.
1715 * c-objc-common.c: Likewise.
1716
c7131fb2
AM
17172015-07-07 Andrew MacLeod <amacleod@redhat.com>
1718
1719 * c-array-notation.c: Adjust includes.
1720 * c-aux-info.c: Likewise.
1721 * c-convert.c: Likewise.
1722 * c-decl.c: Likewise.
1723 * c-errors.c: Likewise.
1724 * c-lang.c: Likewise.
1725 * c-objc-common.c: Likewise.
1726 * c-parser.c: Likewise.
1727 * c-typeck.c: Likewise.
1728
da2e71c9
MLI
17292015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1730
1731 PR fortran/66605
1732 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1733
b155cfd9
MP
17342015-06-29 Marek Polacek <polacek@redhat.com>
1735
1736 PR c/66322
1737 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1738 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1739 about -Wswitch-bool here.
1740 (do_case): Update c_add_case_label call.
1741 (c_finish_case): Update c_do_switch_warnings call.
1742
31521951
MP
17432015-06-27 Marek Polacek <polacek@redhat.com>
1744
1745 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1746
22d03525
MP
17472015-06-26 Marek Polacek <polacek@redhat.com>
1748
1749 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1750 INDIRECT_REF_P.
1751 * c-typeck.c (array_to_pointer_conversion): Likewise.
1752 (build_unary_op): Likewise.
1753 (c_finish_return): Likewise.
1754
f0889939
AM
17552015-06-25 Andrew MacLeod <amacleod@redhat.com>
1756
1757 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1758 * c-parser.c: Likewise.
1759
8d67ee55
RS
17602015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1761
1762 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1763 instead of pointer_hash.
1764 (detect_field_duplicates): Likewise.
1765
0ae9bd27
MP
17662015-06-25 Marek Polacek <polacek@redhat.com>
1767
1768 * c-array-notation.c: Use VAR_P throughout.
1769 * c-decl.c: Likewise.
1770 * c-objc-common.c: Likewise.
1771 * c-parser.c: Likewise.
1772 * c-typeck.c: Likewise.
1773
62f9079a
MP
17742015-06-25 Marek Polacek <polacek@redhat.com>
1775
1776 * c-decl.c: Use is_global_var throughout.
1777 * c-parser.c: Likewise.
1778 * c-typeck.c: Likewise.
1779
abb226c9
AM
17802015-06-17 Andrew MacLeod <amacleod@redhat.com>
1781
1782 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1783 * c-aux-info.c: Likewise.
1784 * c-convert.c: Likewise.
1785 * c-decl.c: Likewise.
1786 * c-errors.c: Likewise.
1787 * c-lang.c: Likewise.
1788 * c-objc-common.c: Likewise.
1789 * c-parser.c: Likewise.
1790 * c-typeck.c: Likewise.
1791
8cbababc
JH
17922015-06-11 Jan Hubicka <hubicka@ucw.cz>
1793
1794 PR middle-end/66325
1795 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1796 variants.
1797
a0349665
PMR
17982015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1799
1800 * c-decl.c (pop_scope): Register the main translation unit
1801 through the new debug hook.
1802
13fdf2e2
AM
18032015-06-08 Andrew MacLeod <amacleod@redhat.com>
1804
1805 * c-array-notation.c : Adjust include files.
1806 * c-aux-info.c : Likewise.
1807 * c-convert.c : Likewise.
1808 * c-decl.c : Likewise.
1809 * c-errors.c : Likewise.
1810 * c-lang.c : Likewise.
1811 * c-lang.h : Likewise.
1812 * c-objc-common.c : Likewise.
1813 * c-parser.c : Likewise.
1814 * c-typeck.c : Likewise.
1815
d7438551
AH
18162015-06-05 Aldy Hernandez <aldyh@redhat.com>
1817
1818 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1819 immediately clobber it.
1820 (c_write_global_declarations_1): Remove call to
1821 check_global_declaration_1.
1822 (c_write_global_declarations_2): Remove.
1823 (c_write_final_cleanups): Rename from c_write_global_declarations.
1824 Remove call to finalize_compilation_unit.
1825 Remove calls to debugging hooks.
1826 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1827 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1828 * c-tree.h: Remove c_write_global_declarations.
1829
ecb9f223
AM
18302015-06-04 Andrew MacLeod <amacleod@redhat.com>
1831
1832 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1833 * c-aux-info.c: Likewise.
1834 * c-convert.c: Likewise.
1835 * c-decl.c: Likewise.
1836 * c-errors.c: Likewise.
1837 * c-lang.c: Likewise.
1838 * c-objc-common.c: Likewise.
1839 * c-parser.c: Likewise.
1840 * c-typeck.c: Likewise.
1841
9482b620
MP
18422015-06-04 Marek Polacek <polacek@redhat.com>
1843
1844 PR c/66341
1845 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1846 it is a lvalue.
1847
bc51ace3
PK
18482015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1849
1850 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1851 Warn for empty struct.
1852 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1853
ea5b45b6
AT
18542015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1855
1856 * c-decl.c (start_function): Call plugin before parsing.
1857 (finish_function): Call plugin after parsing.
1858
c2d47482
PK
18592015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1860
1861 PR c/49551
1862 * c-decl.c (merge_decls): Merge DECL_COMMON.
1863
a95492ab
JW
18642015-05-22 Jim Wilson <jim.wilson@linaro.org>
1865
1866 * Make-lang.in (check_gcc_pallelize): Define.
1867
fd5c817a
MP
18682015-05-22 Marek Polacek <polacek@redhat.com>
1869
1870 PR c/47043
1871 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1872 attributes.
1873
c7b70a3c
MP
18742015-05-21 Marek Polacek <polacek@redhat.com>
1875
1876 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1877 DECL_BUILT_IN.
1878
21b634ae
MP
18792015-05-20 Marek Polacek <polacek@redhat.com>
1880
1881 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1882 * c-typeck.c: Likewise.
1883
296a8c2f
MP
18842015-05-19 Marek Polacek <polacek@redhat.com>
1885
1886 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1887
41b37d5e
JJ
18882015-05-19 Jakub Jelinek <jakub@redhat.com>
1889
1890 PR middle-end/66199
1891 * c-parser.c (c_parser_omp_for_loop): Don't add
1892 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1893 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1894 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1895 constructs.
1896
fab27f52
MM
18972015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1898
1899 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 1900 swaps.
fab27f52 1901
40de31cf
MLI
19022015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1903
1904 PR fortran/44054
1905 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1906 accessor function.
1907
3aa3c9fc
MP
19082015-05-14 Marek Polacek <polacek@redhat.com>
1909
1910 PR c/66066
1911 PR c/66127
1912 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1913 rather than with 0.
1914
c3388e62
DM
19152015-05-12 David Malcolm <dmalcolm@redhat.com>
1916
1917 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1918 to add a call to warn_for_misleading_indentation.
1919 (c_parser_else_body): Likewise, adding param "else_loc".
1920 (c_parser_if_statement): Check for misleading indentation.
1921 (c_parser_while_statement): Likewise.
1922 (c_parser_for_statement): Likewise.
1923
755e528f
MP
19242015-05-08 Marek Polacek <polacek@redhat.com>
1925
1926 PR c/64918
1927 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1928 (output_init_element): Likewise.
1929
0173bd2a
MP
19302015-05-07 Marek Polacek <polacek@redhat.com>
1931
1932 PR c/65179
1933 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1934 value.
1935
9babc352
MP
19362015-04-30 Marek Polacek <polacek@redhat.com>
1937
1938 * c-typeck.c (set_init_label): Call error_at instead of error and
1939 pass LOC to it.
1940
ac9f18db
MP
1941 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1942 the type of a decl.
1943
ec3fba51
MP
1944 * c-typeck.c (c_build_va_arg): Clarify the error message.
1945
b811915d
TS
19462015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1947
1948 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1949 OMP_STANDALONE_CLAUSES.
1950
f3075008
MP
19512015-04-28 Marek Polacek <polacek@redhat.com>
1952
1953 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1954
4e81b788
MP
19552015-04-28 Marek Polacek <polacek@redhat.com>
1956
1957 PR c/65901
1958 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1959
6c1db78e
MP
19602015-04-25 Marek Polacek <polacek@redhat.com>
1961
1962 PR c/52085
1963 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1964 attribute.
1965
5c4abbb8
MP
19662015-04-23 Marek Polacek <polacek@redhat.com>
1967
1968 PR c/65345
1969 * c-decl.c (set_labels_context_r): New function.
1970 (store_parm_decls): Call it via walk_tree_without_duplicates.
1971 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1972 instead of create_tmp_var. Build TARGET_EXPR instead of
1973 COMPOUND_EXPR.
1974 (build_atomic_assign): Use create_tmp_var_raw instead of
1975 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1976
06aca1d5
IV
19772015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1978
1979 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1980 (c_parser_omp_target_update): Add missed %> to error_at ().
1981
8fba1830
BRF
19822015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1983
1984 PR target/55143
1985 * c-decl.c (c_default_pointer_mode): Remove definition.
1986 * c-tree.h (c_default_pointer_mode): Remove declaration.
1987
62021f64
TB
19882015-03-27 Tobias Burnus <burnus@net-b.de>
1989
1990 PR c/65586
1991 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1992 error out.
1993 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1994 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1995 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1996
9b65e171
JJ
19972015-03-19 Jakub Jelinek <jakub@redhat.com>
1998
1999 * c-decl.c (c_decl_attributes): Also add "omp declare target"
2000 attribute for DECL_EXTERNAL VAR_DECLs.
2001
17958621
JJ
20022015-03-11 Jakub Jelinek <jakub@redhat.com>
2003
2004 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
2005 argument.
2006
7ccb1a11
JJ
20072015-03-10 Jakub Jelinek <jakub@redhat.com>
2008
2009 PR c/65120
2010 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
2011 before preparing arguments to warn_logical_not_parentheses.
2012
01177669
JJ
20132015-03-09 Jakub Jelinek <jakub@redhat.com>
2014
2015 PR c/65120
2016 * c-typeck.c (parser_build_binary_op): Don't warn for
2017 !!x == y or !b == y where b is _Bool.
2018
802ac282
MP
20192015-03-09 Marek Polacek <polacek@redhat.com>
2020
2021 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
2022 * c-decl.c (grokdeclarator): Likewise.
2023 * c-typeck.c (build_binary_op): Likewise.
2024
e5165b60
MP
20252015-02-27 Marek Polacek <polacek@redhat.com>
2026
2027 PR c/65228
2028 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2029
065d214c
MP
20302015-02-14 Marek Polacek <polacek@redhat.com>
2031
2032 PR c/64768
2033 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2034 declared through a typedef name.
2035
e5d9235b
MP
20362015-02-13 Marek Polacek <polacek@redhat.com>
2037
2038 PR c/65050
2039 * c-decl.c (grokdeclarator): Print also the type when giving
2040 the error message about array's incomplete element type.
2041
fa01ffcc
JJ
20422015-02-11 Jakub Jelinek <jakub@redhat.com>
2043
2044 PR c/64824
2045 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2046 check in the POP macro.
2047
c3e38a03
MP
20482015-02-09 Marek Polacek <polacek@redhat.com>
2049
2050 PR c/64856
2051 * c-typeck.c (process_init_element): Don't always wrap
2052 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2053 initializing a range of elements.
2054
4886ec8e
JJ
20552015-02-04 Jakub Jelinek <jakub@redhat.com>
2056
2057 PR c/64824
2058 PR c/64868
2059 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2060
c3e38a03 20612015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2062
2063 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2064 processing enum declaration.
2065
7b33f0c8
MP
20662015-01-29 Marek Polacek <polacek@redhat.com>
2067
2068 PR c/64709
2069 * c-typeck.c (pop_init_level): If constructor_elements has
2070 exactly one element with integer_zerop value, set constructor_zeroinit
2071 to 1. Remove braces around warning_init call.
2072
dea63e49
JJ
20732015-01-27 Jakub Jelinek <jakub@redhat.com>
2074
2075 PR c/64766
2076 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2077 of FUNCTION_DECLs with error_mark_node.
2078
d38f7dce
JJ
20792015-01-26 Jakub Jelinek <jakub@redhat.com>
2080
2081 PR c/64778
2082 * c-typeck.c (convert_arguments): Return -1 if there are
2083 error_args, even if we've diagnosed too many arguments.
2084
cbf5d0e7
RB
20852015-01-21 Richard Biener <rguenther@suse.de>
2086
2087 PR middle-end/64313
2088 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2089 for builtins the user declared correctly.
2090
41dbbb37
TS
20912015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2092 Bernd Schmidt <bernds@codesourcery.com>
2093 Cesar Philippidis <cesar@codesourcery.com>
2094 James Norris <jnorris@codesourcery.com>
2095 Jakub Jelinek <jakub@redhat.com>
2096 Ilmir Usmanov <i.usmanov@samsung.com>
2097
2098 * c-parser.c: Include "gomp-constants.h".
2099 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2100 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2101 Use OMP_CLAUSE_SET_MAP_KIND.
2102 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2103 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2104 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2105 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2106 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2107 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2108 "copyout", "create", "delete", "deviceptr", "gang", "host",
2109 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2110 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2111 "present_or_create", "pcreate", "seq", "self", "vector",
2112 "vector_length", "wait", "worker".
2113 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2114 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2115 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2116 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2117 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2118 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2119 (c_parser_oacc_data_clause_deviceptr)
2120 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2121 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2122 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2123 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2124 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2125 (c_parser_oacc_parallel, c_parser_oacc_update)
2126 (c_parser_oacc_wait): New functions.
2127 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2128 (c_finish_oacc_data): New prototypes.
2129 * c-typeck.c: Include "gomp-constants.h".
2130 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2131 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2132 OMP_CLAUSE_SET_MAP_KIND.
2133 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2134 (c_finish_oacc_data): New functions.
2135 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2136 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2137 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2138 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2139 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2140 GOMP_MAP_FORCE_DEVICEPTR.
2141
adfac8df
JJ
21422015-01-09 Michael Collison <michael.collison@linaro.org>
2143
2144 * c-array-notation.c: Include hash-set.h, machmode.h,
2145 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2146 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2147 * c-aux-info.c: Ditto.
2148 * c-convert.c: Ditto.
2149 * c-decl.c: Ditto.
2150 * c-errors.c: Ditto.
2151 * c-lang.c: Dittoxs.
2152 * c-objc-common.c: Ditto.
2153 * c-parser.c: Ditto.
2154 * c-typeck.c: Include hash-set.h, machmode.h,
2155 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2156 fold-const.h, wide-int.h, inchash.h, real.h and
2157 fixed-value.h due to flattening of tree.h.
2158
2cc901dc
MP
21592015-01-07 Marek Polacek <polacek@redhat.com>
2160
2161 PR c/64417
2162 * c-typeck.c (process_init_element): Disallow initialization of
2163 a flexible array member with a string constant if the structure
2164 is in an array.
2165
5624e564
JJ
21662015-01-05 Jakub Jelinek <jakub@redhat.com>
2167
e5341100
JJ
2168 PR sanitizer/64344
2169 * c-typeck.c (convert_for_assignment, c_finish_return): For
2170 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2171 types also set in_late_binary_op around convert call.
2172 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2173 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2174 result on expr as last argument to ubsan_instrument_float_cast,
2175 if in_late_binary_op, don't use c_save_expr but save_expr.
2176
5624e564
JJ
2177 Update copyright years.
2178
5bd012f8
MP
21792015-01-05 Marek Polacek <polacek@redhat.com>
2180
2181 PR c/64423
2182 * c-typeck.c (build_array_ref): Pass loc down to
2183 warn_array_subscript_with_type_char.
2184
3f8257db 21852014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2186
2187 * c-typeck.c: New behavious for pointers to arrays with qualifiers
8e745a17 2188 (common-pointer-type): For pointers to arrays take qualifiers from
768952be 2189 element type.
8e745a17 2190 (build_conditional_expr): Add warnings for lost qualifiers.
768952be 2191 (comp-target-types): Allow pointers to arrays with different qualifiers.
8e745a17 2192 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
768952be 2193 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
8e745a17 2194 to PEDWARN_FOR_QUALIFIERS.
768952be 2195
8f94a8c4
JJ
21962014-12-17 Jakub Jelinek <jakub@redhat.com>
2197
2198 PR sanitizer/64289
2199 * c-convert.c: Include ubsan.h.
2200 (convert): For real -> integral casts and
2201 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2202 instead instrument the float cast directly.
2203
b731b390
JJ
22042014-11-29 Jakub Jelinek <jakub@redhat.com>
2205
2206 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2207 c_finish_stmt_expr): Remove NULL last argument from
2208 create_tmp_var_raw and create_tmp_var calls.
2209 * c-array-notation.c (fix_builtin_array_notation_fn,
2210 build_array_notation_expr, fix_conditional_array_notations_1,
2211 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2212
541e35a6
MP
22132014-11-28 Marek Polacek <polacek@redhat.com>
2214
2215 PR c/63862
2216 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2217 convert the right operand to integer type.
2218
b286be94
MP
22192014-11-25 Marek Polacek <polacek@redhat.com>
2220
2221 PR c/63877
2222 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2223 for inline functions.
2224
aa7da51a
JJ
22252014-11-21 Jakub Jelinek <jakub@redhat.com>
2226
2227 PR target/63764
2228 * c-typeck.c (build_array_ref): Adjust
2229 convert_vector_to_pointer_for_subscript caller. If it returns true,
2230 call non_lvalue_loc on the result.
2231
d876207f
RB
22322014-11-11 Richard Biener <rguenther@suse.de>
2233
2234 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2235 to true.
2236
e5e44252
AK
22372014-11-10 Andi Kleen <ak@linux.intel.com>
2238
2239 PR c/60804
2240 * c-parser.c (c_parser_statement_after_labels): Call
2241 check_no_cilk.
2242 (c_parser_if_statement): Dito.
2243 (c_parser_switch_statement): Dito.
2244 (c_parser_while_statement): Dito.
2245 (c_parser_do_statement): Dito.
2246 (c_parser_for_statement): Dito.
2247 * c-typeck.c (c_finish_loop): Dito.
2248
13c21655
PC
22492014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2250
2251 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2252 OPT_Wshift_count_overflow in the warnings.
2253
2d51fcef
MP
22542014-10-30 Marek Polacek <polacek@redhat.com>
2255
2256 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2257 print the stripped version as well, if they're not the same.
2258
ef4bddc2
RS
22592014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2260
2261 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2262 machine_mode.
2263
c582198b
AM
22642014-10-28 Andrew MacLeod <amacleod@redhat.com>
2265
2266 * c-decl.c: Adjust include files.
2267 * c-parser.c: Ditto.
2268
ddc8de03
PM
22692014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2270 Tom Tromey <tromey@redhat.com>
2271
2272 * c-tree.h (enum c_oracle_request): New.
2273 (c_binding_oracle_function): New typedef.
2274 (c_binding_oracle, c_pushtag, c_bind): Declare.
2275 * c-decl.c (c_binding_oracle): New global.
2276 (I_SYMBOL_CHECKED): New macro.
2277 (i_symbol_binding): New function.
2278 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2279 (I_TAG_CHECKED): New macro.
2280 (i_tag_binding): New function.
2281 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2282 (I_LABEL_CHECKED): New macro.
2283 (i_label_binding): New function.
2284 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2285 (c_print_identifier): Save and restore c_binding_oracle.
2286 (c_pushtag, c_bind): New functions.
2287
60393bbc
AM
22882014-10-27 Andrew MacLeod <amacleod@redhat.com>
2289
2290 * c-typeck.c: Adjust include files.
2291
d723bb7c
MLI
22922014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2293
2294 PR c++/53061
2295 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2296 initialization here...
2297 (c_initialize_diagnostics): ... but here. Set defaults after
2298 building pretty-printer.
2299
1bc5a451
MP
23002014-10-23 Marek Polacek <polacek@redhat.com>
2301
2302 PR c/63626
2303 * c-decl.c (pop_scope): Don't print warning in external_scope.
2304
4435bb92
MP
23052014-10-19 Marek Polacek <polacek@redhat.com>
2306
2307 PR c/63567
2308 * c-typeck.c (output_init_element): Allow initializing objects with
2309 static storage duration with compound literals even in C99 and add
2310 pedwarn for it.
2311
7278465e
MP
23122014-10-17 Marek Polacek <polacek@redhat.com>
2313
2314 PR c/63567
2315 * c-typeck.c (digest_init): Allow initializing objects with static
2316 storage duration with compound literals even in C99 and add pedwarn
2317 for it.
2318
d9b7be2e
MP
23192014-10-17 Marek Polacek <polacek@redhat.com>
2320
2321 PR c/63543
2322 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2323 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2324 error multiple times. Print the type.
2325
f406ae1f
MP
23262014-10-17 Marek Polacek <polacek@redhat.com>
2327
2328 PR c/63549
2329 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2330 type.
2331
92574c7c
MP
23322014-10-17 Marek Polacek <polacek@redhat.com>
2333
2334 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2335 (start_function): Use OPT_Wimplicit_int instead of 0.
2336 (store_parm_decls_oldstyle): Likewise.
2337
1bc4a978
MT
23382014-10-17 Alan Modra <amodra@gmail.com>
2339
2340 PR middle-end/61848
2341 * c-decl.c (merge_decls): Don't merge section name or tls model
2342 to newdecl symtab node, instead merge to olddecl. Override
2343 existing olddecl section name. Set tls_model for all thread-local
2344 vars, not just OMP thread-private ones. Remove incorrect comment.
2345
83685514
AM
23462014-10-16 Andrew MacLeod <amacleod@redhat.com>
2347
2348 * c-decl.c: Adjust include files.
2349
78a7c317
DD
23502014-10-14 DJ Delorie <dj@redhat.com>
2351
2352 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2353 (c_token_starts_typename): Check all __intN, not just __int128.
2354 (c_token_starts_declspecs): Likewise.
2355 (c_parser_declspecs): Likewise.
2356 (c_parser_attribute_any_word): Likewise.
2357 (c_parser_objc_selector): Likewise.
2358 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2359 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2360 is specified.
2361 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2362 __int128.
2363 (finish_declspecs): Likewise.
2364
74d98c1e
AB
23652014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2366
8e745a17 2367 * c-parser.c (c_parser_all_labels): New function to replace
74d98c1e 2368 the duplicate code.
8e745a17 2369 (c_parser_statement): Call the new function.
74d98c1e 2370
84937de2
MP
23712014-10-09 Marek Polacek <polacek@redhat.com>
2372
2373 PR c/63480
2374 * c-typeck.c (pop_init_level): Don't warn about initializing
2375 with { }.
2376
0382aaa0
MP
23772014-10-07 Marek Polacek <polacek@redhat.com>
2378
2379 PR c/59717
2380 * c-decl.c (header_for_builtin_fn): New function.
2381 (implicitly_declare): Suggest which header to include.
2382
7a0ca710
MP
23832014-10-07 Marek Polacek <polacek@redhat.com>
2384
2385 * c-convert.c (convert): Use error_operand_p.
2386 * c-typeck.c (require_complete_type): Likewise.
2387 (really_atomic_lvalue): Likewise.
2388 (digest_init): Likewise.
2389 (handle_omp_array_sections_1): Likewise.
2390
6bc8a126
MP
23912014-10-03 Marek Polacek <polacek@redhat.com>
2392
2393 PR c/63453
2394 * c-decl.c (pop_scope): Don't warn about "inline function declared
2395 but never defined" for functions marked with gnu_inline attribute.
2396
d90c0a59
JJ
23972014-09-25 Jakub Jelinek <jakub@redhat.com>
2398
2399 PR c++/63249
2400 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2401 on low_bound and length.
2402
083e891e
MP
24032014-09-24 Marek Polacek <polacek@redhat.com>
2404
2405 PR c/61405
2406 PR c/53874
2407 * c-parser.c: Don't define CPP_KEYWORD.
2408 (c_parser_switch_statement): Pass original type to c_finish_case.
2409 * c-tree.h (c_finish_case): Update declaration.
2410 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2411 conditionally to c_do_switch_warnings.
2412
8d95fe25
MP
24132014-09-03 Marek Polacek <polacek@redhat.com>
2414
2415 PR c/62024
2416 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2417 conversions.
2418
9a771876
JJ
24192014-09-02 Jakub Jelinek <jakub@redhat.com>
2420 Balaji V. Iyer <balaji.v.iyer@intel.com>
2421 Igor Zamyatin <igor.zamyatin@intel.com>
2422
2423 * c-parser.c (c_parser_cilk_for): New function.
2424 (c_parser_cilk_grainsize): Likewise.
2425 (c_get_temp_regvar): Likewise.
2426 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2427 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2428 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2429 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2430 case.
2431
b7679d96
CG
24322014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2433
2434 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2435 with using HOST_WIDE_INT without truncation to 'int'
2436
59ea0364
MP
24372014-08-22 Marek Polacek <polacek@redhat.com>
2438
2439 PR c++/62199
2440 * c-typeck.c (parser_build_binary_op): Adjust call to
2441 warn_logical_not_parentheses.
2442
671a475e
IZ
24432014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2444
2445 PR other/62008
2446 * c-parser.c (c_parser_array_notation): Check for correct
2447 type of an array added.
2448
04159acf
MP
24492014-08-19 Marek Polacek <polacek@redhat.com>
2450
2451 PR c++/62153
2452 * c-typeck.c (build_binary_op): If either operand of a comparison
2453 is a boolean expression, call maybe_warn_bool_compare.
2454
c77935ee
PP
24552014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2456
2457 PR c/45584
2458 * c-typeck.c (build_c_cast): Do a conversion even when the
2459 TYPE_MAIN_VARIANTs are the same.
2460
35aff4fb
MP
24612014-08-19 Marek Polacek <polacek@redhat.com>
2462
2463 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2464 pedwarn_c99 instead of pedwarn.
2465 (grokfield): Likewise.
2466 (warn_defaults_to): New function.
2467 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2468 Unconditionally call pedwarn_c99 instead of pedwarn.
2469 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2470 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2471 check flag_isoc11 before.
2472 * c-errors.c (pedwarn_c99): Change the return type to bool.
2473 Handle -Wc99-c11-compat.
2474 * c-parser.c (disable_extension_diagnostics): Handle
2475 warn_c99_c11_compat.
2476 (restore_extension_diagnostics): Likewise.
2477 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2478 instead of pedwarn, don't check flag_isoc11 before.
2479 (c_parser_declspecs): Likewise.
2480 (c_parser_alignas_specifier): Likewise.
2481 (c_parser_alignof_expression): Likewise.
2482 (c_parser_generic_selection): Likewise.
2483 * c-tree.h (pedwarn_c99): Update declaration.
2484 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2485 of pedwarn_c99.
2486
177cce46
MP
24872014-08-19 Marek Polacek <polacek@redhat.com>
2488
2489 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2490 to pedwarn_c90.
2491 * c-errors.c: Include "opts.h".
2492 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2493 * c-parser.c (disable_extension_diagnostics): Handle negative value
2494 of warn_c90_c99_compat, too.
2495 (restore_extension_diagnostics): Likewise.
2496 (c_parser_compound_statement_nostart): Pass
2497 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2498
6dc99c33
MP
24992014-08-12 Marek Polacek <polacek@redhat.com>
2500
2501 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2502 Add pedwarn.
2503 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2504 Likewise.
2505 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2506
3f8257db 25072014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
2508
2509 PR c/51849
2510 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2511 Call pedwarn_c90 instead of pedwarn.
2512 (check_bitfield_type_and_width): Likewise.
2513 (declspecs_add_qual): Likewise.
2514 (declspecs_add_type): Likewise.
2515 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2516 Adjust to only call pedwarn_c90.
2517 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2518 pedwarn_c90 instead of pedwarn.
2519 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2520 * c-parser.c (disable_extension_diagnostics): Handle
2521 warn_c90_c99_compat.
2522 (restore_extension_diagnostics): Likewise.
2523 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2524 pedwarn_c90 instead of pedwarn.
2525 (c_parser_initelt): Likewise.
2526 (c_parser_postfix_expression): Likewise.
2527 (c_parser_postfix_expression_after_paren_type): Likewise.
2528 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2529 * c-tree.h: Fix formatting.
2530 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2531 pedwarn_c90 instead of pedwarn.
2532
9f25a338
TS
25332014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2534
2535 * c-typeck.c: Remove include of pointer-set.h.
2536
044331a8
MP
25372014-08-07 Marek Polacek <polacek@redhat.com>
2538
2539 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2540
b787e7a2
TS
25412014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2542
2543 * c-typeck.c: Use hash_map instead of pointer_map.
2544
6e2830c3
TS
25452014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2546
2547 * c-decl.c: Use hash_set instead of pointer_set.
2548
a7ee52fb
IZ
25492014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2550
2551 PR middle-end/61455
2552 * c-array-notation.c (expand_array_notations): Handling
2553 of DECL_EXPR added.
2554
b4dfdc11
MG
25552014-07-31 Marc Glisse <marc.glisse@inria.fr>
2556
2557 PR c++/60517
2558 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2559 a local variable.
2560
976d5a22
TT
25612014-07-30 Tom Tromey <tromey@redhat.com>
2562
2563 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2564 field.
2565 (really_start_incremental_init, push_init_level): Initialize
2566 designator_depth.
2567 (pop_init_level): Set global designator_depth.
2568 (process_init_element): Check for designated_init attribute.
2569
30281de2
MP
25702014-07-20 Marek Polacek <polacek@redhat.com>
2571
2572 PR c/61852
2573 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2574 (implicitly_declare): Pass location to implicit_decl_warning.
2575
b108f48f
JJ
25762014-07-14 Jakub Jelinek <jakub@redhat.com>
2577
2578 PR middle-end/61294
2579 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2580 If non-NULL, call c_parser_check_literal_zero.
2581 (c_parser_check_literal_zero): New function.
2582 (c_parser_postfix_expression_after_primary): Adjust
2583 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2584
773ec47f
MP
25852014-07-06 Marek Polacek <polacek@redhat.com>
2586
2587 PR c/6940
2588 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2589 * c-tree.h (C_ARRAY_PARAMETER): Define.
2590 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2591 function parameter.
2592
22e1cf1c 25932014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 2594 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
2595
2596 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2597 releasing symbol.
2598
52ec0ea3
MP
25992014-07-01 Marek Polacek <polacek@redhat.com>
2600
2601 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2602 instead of 0 to WARN_FOR_ASSIGNMENT.
2603
d5c3d343
MP
26042014-07-01 Marek Polacek <polacek@redhat.com>
2605
2606 PR c/58286
2607 * c-typeck.c (convert_for_assignment): Pass
2608 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2609
6a7253a4
MP
26102014-06-30 Marek Polacek <polacek@redhat.com>
2611
2612 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2613 has no_sanitize_undefined attribute.
2614
5e88a8f4
IZ
26152014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2616
2617 PR middle-end/57541
2618 * c-array-notation.c (fix_builtin_array_notation_fn):
2619 Check for 0 arguments in builtin call. Check that bultin argument is
2620 correct.
2621 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2622 index.
2623
9698b078
SH
26242014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2625
2626 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2627 qualifiers in __auto_type for atomic types.
2628 (c_parser_typeof_specifier): Discard all type qualifiers in
2629 __typeof__ for atomic types.
2630
6e07c515
MP
26312014-06-25 Marek Polacek <polacek@redhat.com>
2632
2633 PR c/61162
2634 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2635 the return expression to c_finish_return.
2636
da6f124d
JJ
26372014-06-25 Jakub Jelinek <jakub@redhat.com>
2638
2639 * c-typeck.c (c_finish_omp_clauses): Make sure
2640 OMP_CLAUSE_LINEAR_STEP has correct type.
2641
c203e8a7
TS
26422014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2643
2644 * c-decl.c: Adjust.
2645
56ad0e38
JJ
26462014-06-24 Jakub Jelinek <jakub@redhat.com>
2647
2648 * c-parser.c (c_parser_omp_for_loop): For
2649 #pragma omp parallel for simd move lastprivate clause from parallel
2650 to for rather than simd.
2651
47c2554f
MP
26522014-06-23 Marek Polacek <polacek@redhat.com>
2653
2654 * c-typeck.c (parser_build_binary_op): Don't call
2655 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2656
56363ffd
JH
26572014-06-15 Jan Hubicka <hubicka@ucw.cz>
2658
2659 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2660 * c-decl.c (merge_decls): Likewise.
2661
d7ff7ae5
MP
26622014-06-09 Marek Polacek <polacek@redhat.com>
2663
2664 PR c/36446
2665 * c-typeck.c (error_init): Call inform instead of error_at.
2666 (pedwarn_init): Call inform instead of pedwarn.
2667 (warning_init): Call inform instead of warning_at.
2668
24d047a3
JH
26692014-06-07 Jan Hubicka <hubicka@ucw.cz>
2670
2671 * c-decl.c (merge_decls): Use set_decl_section_name.
2672 (duplicate_decls): Remove node if it exists.
2673
9bac5cbb
G
26742014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2675
2676 PR c/53119
2677 * c-typeck.c (push_init_level, process_init_element,
2678 pop_init_level): Correct check for zero initialization, move
2679 missing brace warning to respect zero initialization.
2680
8ffcdea8
MP
26812014-06-05 Marek Polacek <polacek@redhat.com>
2682
2683 PR c/56724
2684 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2685
742938c9
MP
26862014-06-05 Marek Polacek <polacek@redhat.com>
2687
2688 PR c/49706
2689 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2690 on the left hand side operand of a comparison.
2691
6447c55d
MP
26922014-06-05 Marek Polacek <polacek@redhat.com>
2693
2694 PR c/48062
2695 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2696 Print note only if the warning was printed.
2697
9dc7743c
IZ
26982014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2699
2700 PR c/58942
2701 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2702 with a pointer.
2703
fedfecef
MP
27042014-06-03 Marek Polacek <polacek@redhat.com>
2705
2706 PR c/60439
2707 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2708 c_start_case.
2709 * c-tree.h (c_start_case): Update.
2710 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2711 switch condition has boolean value.
2712
9b2b7279
AM
27132014-06-02 Andrew MacLeod <amacleod@redhat.com>
2714
2715 * c-decl.c: Include builtins.h.
2716 * c-parser.c: Likewise.
2717
5c1bc275
MP
27182014-05-27 Marek Polacek <polacek@redhat.com>
2719
2720 PR c/56724
2721 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2722 error and warning calls to error_at and warning_at. Pass location of
2723 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2724 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2725 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2726
97563bc8
IZ
27272014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2728
2729 PR c/61191
2730 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2731 function parameters.
2732
aede2c10
JH
27332014-05-23 Jan Hubicka <hubicka@ucw.cz>
2734
2735 * c-decl.c (merge_decls): Preserve symtab node pointers.
2736 (duplicate_decls): Free new decl.
2737
edbba2ce
TS
27382014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2739
f3316c6d
TS
2740 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2741 initialization.
2742
edbba2ce
TS
2743 * c-parser.c (c_parser_omp_target): Return bool values.
2744
68c81f24
TS
27452014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2746
2747 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2748 num_teams_loc variable to num_thread_limit_loc.
2749
632f2871
RS
27502014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2751
2752 * c-array-notation.c (expand_array_notations): Use void_node
2753 instead of void_zero_node.
2754
766090c2
TS
27552014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2756
2757 * c-decl.c (finish_struct): Adjust.
2758 (finish_enum): Likewise.
2759 (bind): Adjust.
2760 (record_inline_static): Likewise.
2761 (push_scope): Likewise.
2762 (make_label): Likewise.
2763 (lookup_label_for_goto): Likewise.
2764 (finish_struct): Likewise.
2765 (finish_enum): Likewise.
2766 (store_parm_decls): Likewise.
2767 (c_push_function_context): Likewise.
2768 * c-lang.h: Remove usage of variable_size gty attribute.
2769 * c-parser.c (c_parse_init): Adjust.
2770 (c_parse_file): Likewise.
2771
2b107f6b
MP
27722014-05-13 Marek Polacek <polacek@redhat.com>
2773
2774 PR c/61162
2775 * c-typeck.c (convert_for_assignment): Pass location to
2776 WARN_FOR_ASSIGNMENT instead of input_location.
2777
d033409e
MP
27782014-05-10 Marek Polacek <polacek@redhat.com>
2779
2780 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2781 maybe_warn_string_init.
2782 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2783 maybe_warn_string_init.
2784 * c-tree.h (maybe_warn_string_init): Update declaration.
2785 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2786 Call pedwarn_init with loc instead of with input_location.
2787 (digest_init): Pass init_loc to maybe_warn_string_init.
2788 (pop_init_level): Call pedwarn_init with loc instead of with
2789 input_location.
2790 (set_init_index): Likewise.
2791 (process_init_element): Likewise.
2792
ea58ef42
MP
27932014-05-09 Marek Polacek <polacek@redhat.com>
2794
2795 PR c/61096
2796 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2797 (c_parser_initelt): Pass location to set_init_label. Pass array index
2798 location to set_init_index.
2799 * c-tree.h (push_init_level): Update declaration.
2800 (pop_init_level): Likewise.
2801 (set_init_index): Likewise.
2802 (set_init_label): Likewise.
2803 * c-typeck.c (error_init): Add location parameter. Call error_at
2804 instead of error.
2805 (digest_init): Pass init_loc to error_init.
2806 (really_start_incremental_init):
2807 (push_init_level): Add location parameter. Pass loc to pop_init_level
2808 and error_init.
2809 (pop_init_level): Likewise.
2810 (set_designator): Add location parameter. Pass loc to pop_init_level,
2811 push_init_level, and error_init.
2812 (set_init_index): Add location parameter. Pass loc to error_init and
2813 set_designator.
2814 (set_init_label): Likewise.
2815 (output_init_element): Pass loc to error_init.
2816 (process_init_element): Pass loc to error_init, pop_init_level,
2817 pedwarn_init, and push_init_level.
2818
661a0813
MP
28192014-05-09 Marek Polacek <polacek@redhat.com>
2820
2821 PR c/50459
2822 * c-parser.c (c_parser_attributes): Parse the arguments as an
2823 expression-list if the attribute takes identifier.
2824
2793eeab
MP
28252014-05-08 Marek Polacek <polacek@redhat.com>
2826
2827 PR c/61053
2828 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2829 TYPE_ALIGN_UNIT.
2830
f827930a
MP
28312014-05-08 Marek Polacek <polacek@redhat.com>
2832
2833 PR c/61077
2834 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2835 of main.
2836
1d60af08
KZ
28372014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2838 Mike Stump <mikestump@comcast.net>
2839 Richard Sandiford <rdsandiford@googlemail.com>
2840
2841 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2842 (finish_enum): Use wide-int interfaces.
2843 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2844 * c-typeck.c (build_c_cast): Likewise.
2845 (set_nonincremental_init_from_string): Likewise.
2846 (c_tree_equal): Likewise.
2847
a0e24419
MP
28482014-05-02 Marek Polacek <polacek@redhat.com>
2849
2850 PR c/25801
2851 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2852 Return size_one_node when the type is not complete.
2853 (pointer_diff): Remove comment.
2854 (build_unary_op): Improve error messages.
2855
19fc9faa
MP
28562014-05-02 Marek Polacek <polacek@redhat.com>
2857
2858 * c-typeck.c (c_finish_return): Separate warning_at calls.
2859
63bc4e87
MP
28602014-05-02 Marek Polacek <polacek@redhat.com>
2861
2862 * c-tree.h (error_init): Remove declaration.
2863 (pedwarn_init): Likewise.
2864 * c-typeck.c (error_init): Make static and move above.
2865 (pedwarn_init): Likewise.
2866 (warning_init): Move above.
2867 (maybe_warn_string_init): Likewise.
2868
4bd2511b
JL
28692014-05-01 Jeff Law <law@redhat.com>
2870
2871 Revert:
2872
2873 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2874 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2875 avoid goto.
2876
6a358dcb
MP
28772014-05-02 Marek Polacek <polacek@redhat.com>
2878
2879 PR c/60784
2880 * c-typeck.c (push_init_level): Set constructor_designated to
2881 p->designated for structures.
2882
ae5ebda4
MP
28832014-05-01 Marek Polacek <polacek@redhat.com>
2884
2885 PR c/60915
2886 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2887 function-definition has an attribute after the declarator.
2888
96b40f8d
MP
28892014-05-01 Marek Polacek <polacek@redhat.com>
2890
2891 PR c/60257
2892 * c-typeck.c (warning_init): Add location_t parameter. Call
2893 warning_at instead of warning.
2894 (push_init_level): Pass input_location to warning_init.
2895 (add_pending_init): Add location_t parameter. Pass loc to
2896 warning_init.
2897 (set_nonincremental_init): Pass input_location to add_pending_init.
2898 (set_nonincremental_init_from_string): Likewise.
2899 (output_init_element): Pass loc to warning_init and to
2900 add_pending_init.
2901
32e00768
MP
29022014-05-01 Marek Polacek <polacek@redhat.com>
2903
2904 PR c/43395
2905 * c-typeck.c (c_finish_return): Distinguish between label and variable
2906 when warning about returning local address.
2907
c9379ce2
MP
29082014-05-01 Marek Polacek <polacek@redhat.com>
2909
2910 PR c/29467
2911 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2912 in C89 mode.
2913
d00887e8
MP
29142014-05-01 Marek Polacek <polacek@redhat.com>
2915
2916 PR c/43245
2917 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2918 instead of 0 to WARN_FOR_QUALIFIERS.
2919
5436fa2e
MP
29202014-05-01 Marek Polacek <polacek@redhat.com>
2921
2922 PR c/56989
2923 * c-typeck.c (default_conversion): Use better location for
2924 error call.
2925
f8ed5150
MP
29262014-04-30 Marek Polacek <polacek@redhat.com>
2927
2928 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2929 also when SANITIZE_FLOAT_DIVIDE is on.
2930
8337d1db
MP
29312014-04-30 Marek Polacek <polacek@redhat.com>
2932
2933 PR c/60139
2934 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2935 and pedwarn_init. Use loc insted of input_location.
2936
c4bdc42f
MP
29372014-04-30 Marek Polacek <polacek@redhat.com>
2938
2939 PR c/60351
2940 * c-typeck.c (build_binary_op): Use location when warning about
2941 shift count.
2942
45484dcf
MP
29432014-04-25 Marek Polacek <polacek@redhat.com>
2944
2945 PR c/18079
2946 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2947 always_inline/noinline and hot/cold attributes.
2948
34cf811f
MP
29492014-04-25 Marek Polacek <polacek@redhat.com>
2950
2951 PR c/60114
2952 * c-parser.c (c_parser_initelt): Pass input_location to
2953 process_init_element.
2954 (c_parser_initval): Pass loc to process_init_element.
2955 * c-tree.h (process_init_element): Adjust declaration.
2956 * c-typeck.c (push_init_level): Pass input_location to
2957 process_init_element.
2958 (pop_init_level): Likewise.
2959 (set_designator): Likewise.
2960 (output_init_element): Add location_t parameter. Pass loc to
2961 digest_init.
2962 (output_pending_init_elements): Pass input_location to
2963 output_init_element.
2964 (process_init_element): Add location_t parameter. Pass loc to
2965 output_init_element.
2966
42056eac
JJ
29672014-04-24 Jakub Jelinek <jakub@redhat.com>
2968
2969 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2970 atomic-clause, allow comma in between atomic-clause and
2971 seq_cst.
2972
e162a134
JJ
29732014-04-22 Jakub Jelinek <jakub@redhat.com>
2974
2975 PR c/59073
2976 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2977 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2978
2f6babac
IZ
29792014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2980
2981 PR middle-end/60469
2982 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2983 create_tmp_var instead build_decl for creating temps.
2984 (build_array_notation_expr): Likewise.
2985 (fix_conditional_array_notations_1): Likewise.
2986 (fix_array_notation_expr): Likewise.
2987 (fix_array_notation_call_expr): Likewise.
2988
8edbfaa6
JJ
29892014-03-28 Jakub Jelinek <jakub@redhat.com>
2990
2991 PR c++/60689
2992 * c-tree.h (c_build_function_call_vec): New prototype.
2993 * c-typeck.c (build_function_call_vec): Don't call
2994 resolve_overloaded_builtin here.
2995 (c_build_function_call_vec): New wrapper function around
2996 build_function_call_vec. Call resolve_overloaded_builtin here.
2997 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2998 Call c_build_function_call_vec instead of build_function_call_vec.
2999 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
3000 * c-decl.c (finish_decl): Likewise.
3001
7485aeea
MLI
30022014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3003
3004 PR c/55383
3005 * c-typeck.c: Use correct format string in cast-qual warning
3006
b17a8b07
TS
30072014-03-07 Thomas Schwinge <thomas@codesourcery.com>
3008
3009 * c-decl.c (c_decl_attributes): Use
3010 lang_hooks.types.omp_mappable_type.
3011 * c-typeck.c (c_finish_omp_clauses): Likewise.
3012
3af9c5e9
MP
30132014-03-06 Marek Polacek <polacek@redhat.com>
3014
3015 PR c/60197
3016 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
3017 of checking tree code.
3018
1c9f5f33
PK
30192014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3020
3021 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
3022 (c_parser_parameter_declaration): Likewise.
3023
cc28fc7f
MP
30242014-02-19 Marek Polacek <polacek@redhat.com>
3025
3026 PR c/60195
3027 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3028 Call mark_exp_read on exp.value.
3029 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3030 TREE_ADDRESSABLE on old instead of val.
3031 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3032
b581c05c
PK
30332014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3034
3035 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3036 C_EXPR_APPEND by vec_safe_push.
3037 * c-tree.h (C_EXPR_APPEND): Remove.
3038
81e5eca8
MP
30392014-01-31 Marek Polacek <polacek@redhat.com>
3040
3041 PR c/59963
3042 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3043 build_function_call_vec.
3044 (build_function_call): Likewise.
3045 (build_atomic_assign): Likewise.
3046 (build_function_call_vec): Add arg_loc parameter. Use it.
3047 (convert_arguments): Likewise.
3048 (convert_for_assignment): Rename rhs_loc to expr_loc.
3049 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3050 (c_parser_objc_keywordexpr): Likewise.
3051 (c_parser_postfix_expression_after_primary): Call
3052 build_function_call_vec with expr_loc rather than op_loc.
3053 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3054 build_function_call_vec.
3055 (c_parser_expr_list): Add locations parameter. Fill it with locations
3056 of function arguments.
3057 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3058
68fca595
MP
30592014-01-30 Marek Polacek <polacek@redhat.com>
3060
3061 PR c/59940
3062 * c-typeck.c (build_function_call_vec): Use loc parameter.
3063 (convert_arguments): Add location parameter. Use it.
3064 (ep_convert_and_check): Likewise.
3065 (build_atomic_assign): Adjust convert_for_assignment call.
3066 (build_modify_expr): Likewise.
3067 (digest_init): Likewise.
3068 (c_finish_return): Likewise.
3069 (build_conditional_expr): Adjust ep_convert_and_check calls.
3070 (convert_for_assignment): Add rhs_loc parameter. Use it.
3071 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3072 calls.
3073
fa337f3a
RB
30742014-01-30 Richard Biener <rguenther@suse.de>
3075
3076 PR c/59905
3077 * c-typeck.c (build_function_call_vec): Do not replace calls
3078 to a function via an incompatible type with a runtime abort.
3079
b72271b9
BI
30802014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3081
3082 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3083 flag_enable_cilkplus with flag_cilkplus.
3084 (c_parser_direct_declarator_inner): Likewise.
3085 (c_parser_attribute_any_word): Likewise.
3086 (c_parser_attributes): Likewise.
3087 (c_parser_compound_statement): Likewise.
3088 (c_parser_statement_after_labels): Likewise.
3089 (c_parser_if_statement): Likewise.
3090 (c_parser_switch_statement): Likewise.
3091 (c_parser_do_statement): Likewise.
3092 (c_parser_for_statement): Likewise.
3093 (c_parser_unary_expression): Likewise.
3094 (c_parser_postfix_expression): Likewise.
3095 (c_parser_postfix_expression_after_primary): Likewise.
3096 (c_parser_postfix_expression_after_primary): Likewise.
3097 (c_parser_omp_clause_name): Likewise.
3098 (c_finish_omp_declare_simd): Likewise.
3099 (c_parser_cilk_verify_simd): Likewise.
3100 * c-typeck.c (build_array_ref): Likewise.
3101 (build_function_call_vec): Likewise.
3102 (convert_arguments): Likewise.
3103 (build_compound_expr): Likewise.
3104 (c_finish_return): Likewise.
3105 (c_finish_if_stmt): Likewise.
3106 (c_finish_loop): Likewise.
3107 (build_binary_op): Likewise.
3108
393e8e8b
MP
31092014-01-23 Marek Polacek <polacek@redhat.com>
3110
3111 PR c/59846
3112 * c-typeck.c (parser_build_binary_op): Use location instead of
3113 input_location.
3114 (build_binary_op): Pass location to shorten_compare.
3115
f04dda30
MP
31162014-01-23 Marek Polacek <polacek@redhat.com>
3117
3118 PR c/58346
3119 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3120 an empty aggregate.
3121
789eadcd
MP
31222014-01-23 Marek Polacek <polacek@redhat.com>
3123
3124 PR c/59871
3125 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3126 of a comma expression.
3127 (emit_side_effect_warnings): Likewise.
3128
40f14e9f
BI
31292014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3130
3131 PR c/59825
3132 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3133 function to use walk_tree and moved a lot of its functionality to
3134 expand_array_notations.
3135 (expand_array_notations): New function.
3136
74558dd9
BI
31372014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3138
3139 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3140 attribute an attribute without value.
3141
652fea39
JJ
31422014-01-23 Jakub Jelinek <jakub@redhat.com>
3143
3144 PR middle-end/58809
3145 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3146 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3147
f34f1c87
MP
31482014-01-22 Marek Polacek <polacek@redhat.com>
3149
3150 PR c/59891
3151 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3152 of remove_c_maybe_const_expr on op1 and op2.
3153
241f845a
JJ
31542014-01-15 Jakub Jelinek <jakub@redhat.com>
3155
3156 PR c/58943
3157 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3158 effects, preevaluate rhs using SAVE_EXPR first.
3159
9a74f20c
BI
31602014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3161
3162 PR c++/59631
3163 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3164 statements with if-elseif statements.
3165
96066ce1
MP
31662014-01-06 Marek Polacek <polacek@redhat.com>
3167
3168 PR c/57773
3169 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3170 defined bit-field types only in ISO C.
3171
23a5b65a
RS
31722014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3173
3174 Update copyright years
3175
f9030485
RS
31762014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3177
3178 * c-array-notation.c: Use the standard form for the copyright notice.
3179
41958c28
BI
31802013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3181
3182 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3183 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3184 field in parser is not empty. If not-empty, call the function
3185 c_parser_finish_omp_declare_simd.
3186 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3187 between SIMD-enabled functions and #pragma simd. Added new parameter.
3188 (c_parser_cilk_all_clauses): Modified the usage of the function
3189 c_parser_cilk_clause_vectorlength as mentioned above.
3190 (c_parser_cilk_simd_fn_vector_attrs): New function.
3191 (c_finish_cilk_simd_fn_tokens): Likewise.
3192 (is_cilkplus_vector_p): Likewise.
3193 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3194 "nomask," and "mask" strings in clause name.
3195 (c_parser_omp_all_clauses): Added 3 new case statements:
3196 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3197 PRAGMA_CILK_CLAUSE_NOMASK.
3198 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3199 check for vector attribute and if so call the function
3200 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3201 called the function c_finish_cilk_simd_fn_tokens.
3202 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3203 parser field is non-empty. If so, parse them as you would parse
3204 the omp declare simd pragma.
3205 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3206 Added a check when step is a parameter and flag it as error.
3207 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3208 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3209 pragma_omp_clause.
3210
cef0fd0e
TS
32112013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3212
3213 * c-parser.c (c_parser_omp_parallel): Fix description.
3214
12893402
BI
32152013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3216
3217 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3218 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3219 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3220 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3221
296674db
JM
32222013-12-04 Joseph Myers <joseph@codesourcery.com>
3223
3224 PR c/52023
3225 * c-parser.c (c_parser_alignas_specifier): Use
3226 c_sizeof_or_alignof_type instead of c_alignof.
3227 (c_parser_alignof_expression): Likewise, with min_alignof
3228 parameter depending on alignof spelling used.
3229
edd28054
MP
32302013-12-04 Marek Polacek <polacek@redhat.com>
3231
3232 PR c/54113
3233 * c-decl.c (start_function): Don't warn for missing prototype for
3234 inline functions.
3235
da0fc454
MP
32362013-12-03 Marek Polacek <polacek@redhat.com>
3237
3238 PR c/59351
3239 * c-decl.c (build_compound_literal): Allow compound literals with
3240 empty initial value.
3241
4c2ecab0
JM
32422013-12-02 Joseph Myers <joseph@codesourcery.com>
3243
3244 PR c/58235
3245 * c-typeck.c (build_modify_expr): Diagnose assignment to
3246 expression with array type.
3247
340baef7
JM
32482013-11-29 Joseph Myers <joseph@codesourcery.com>
3249
3250 PR c/42262
3251 * c-typeck.c (process_init_element): Do not treat a string as
3252 initializing a whole array when used with a designator for an
3253 individual element.
3254
6763b9f7
JM
32552013-11-29 Joseph Myers <joseph@codesourcery.com>
3256
3257 PR c/57574
3258 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3259 an inline function following a static declaration.
3260
e7bd1de1
JJ
32612013-11-28 Jakub Jelinek <jakub@redhat.com>
3262
3263 PR c/59310
3264 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3265 to p_name before calling c_parser_omp_teams instead of after.
3266 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3267 argument. Remove unused p_name variable.
3268
0136f8f0
AH
32692013-11-27 Aldy Hernandez <aldyh@redhat.com>
3270 Jakub Jelinek <jakub@redhat.com>
3271
3272 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3273 external_scope is NULL.
3274
241b71bb
TV
32752013-11-27 Tom de Vries <tom@codesourcery.com>
3276 Marc Glisse <marc.glisse@inria.fr>
3277
3278 PR c++/59032
3279 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3280
2fb9a547
AM
32812013-11-22 Andrew MacLeod <amacleod@redhat.com>
3282
3283 * c-typeck.c: Add required include files from gimple.h.
3284
8400e75e
DM
32852013-11-22 David Malcolm <dmalcolm@redhat.com>
3286
3287 * c-decl.c (define_label, shadow_tag_warned)
3288 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3289 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3290 (declspecs_add_type): Remove use of in_system_header macro.
3291 * c-parser.c (c_parser_unary_expression): Likewise.
3292 * c-typeck.c (store_init_value, process_init_element)
3293 (c_start_case): Likewise.
3294
3295 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3296 macro.
3297
3298 * c-parser.c (c_parser_set_source_position_from_token): Remove
3299 reference to in_system_header from comment.
3300
386b1f1f
RS
33012013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3302
3303 * c-decl.c (grokdeclarator): Update comment to refer to
3304 tree_to_[su]hwi rather than tree_low_cst.
3305
ae7e9ddd
RS
33062013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3307
3308 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3309 tree_to_uhwi throughout.
3310
9439e9a1
RS
33112013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3312
3313 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3314 throughout.
3315
9541ffee
RS
33162013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3317
3318 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3319 throughout.
3320
c02065fc
AH
33212013-11-15 Aldy Hernandez <aldyh@redhat.com>
3322
3323 * c-parser.c (c_parser_cilk_simd): New.
3324 (c_parser_cilk_verify_simd): New.
3325 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3326 (c_parser_omp_for_loop): Add case for NE_EXPR.
3327 Set c_break_label for CILK_SIMD.
3328 (c_parser_cilk_clause_vectorlength): New.
3329 (c_parser_cilk_clause_linear): New.
3330 (c_parser_cilk_clause_name): New.
3331 (c_parser_cilk_all_clauses): New.
3332 * c-typeck.c (build_unary_op): Pass location argument to
3333 readonly_error.
3334 (build_modify_expr): Same.
3335 (build_asm_expr): Same.
3336 (c_finish_bc_stmt): Error on break/continue in loops.
3337
18f429e2
AM
33382013-11-14 Andrew MacLeod <amacleod@redhat.com>
3339
3340 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3341
d8a2d370
DN
33422013-11-14 Diego Novillo <dnovillo@google.com>
3343
3344 * c-decl.c: Include print-tree.h.
3345 Include stor-layout.h.
3346 Include varasm.h.
3347 Include attribs.h.
3348 Include stringpool.h.
3349 * c-lang.c: Include fold-const.h.
3350 * c-parser.c: Include stringpool.h.
3351 Include attribs.h.
3352 Include stor-layout.h.
3353 Include varasm.h.
3354 Include trans-mem.h.
3355 * c-typeck.c: Include stor-layout.h.
3356 Include trans-mem.h.
3357 Include varasm.h.
3358 Include stmt.h.
3359
38b7bc7f
JM
33602013-11-13 Joseph Myers <joseph@codesourcery.com>
3361
3362 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3363 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3364 __auto_type.
3365 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3366 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3367 RID_AUTO_TYPE.
3368 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3369 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3370 (c_parser_declarator, c_parser_direct_declarator_inner)
3371 (c_parser_parameter_declaration, c_parser_type_name): All callers
3372 changed.
3373 (c_parser_declaration_or_fndef): Handle declarations with type
3374 determined from the initializer.
3375
45b0be94
AM
33762013-11-12 Andrew MacLeod <amacleod@redhat.com>
3377
18f429e2 3378 * c-typeck.c: Include gimplify.h.
45b0be94 3379
582d9b50
JM
33802013-11-12 Joseph Myers <joseph@codesourcery.com>
3381
3382 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3383 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3384 comment.
3385 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3386 or _Thread_local as appropriate in diagnostics.
3387 (build_null_declspecs): Initialize ret->thread_gnu_p.
3388 (declspecs_add_scspec): Handle either __thread or _Thread_local
3389 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3390 pedantic. Do not disallow _Thread_local extern and _Thread_local
3391 static.
3392
267bac10
JM
33932013-11-07 Joseph Myers <joseph@codesourcery.com>
3394 Andrew MacLeod <amacleod@redhat.com>
3395
3396 * c-aux-info.c (gen_type): Handle atomic qualifier.
3397 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3398 qualifiers when compating types.
3399 (shadow_tag_warned): Handle atomic_p in declspecs.
3400 (quals_from_declspecs): Likewise.
3401 (start_decl): Use c_type_promotes_to when promoting argument
3402 types.
3403 (grokdeclarator): Handle _Atomic.
3404 (get_parm_info): Diagnose any qualifier on "void" as only
3405 parameter.
3406 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3407 comparing types. Use c_type_promotes_to when promoting argument
3408 types.
3409 (finish_function): Use c_type_promotes_to when promoting argument
3410 types.
3411 (build_null_declspecs): Handle atomic_p in declspecs.
3412 (declspecs_add_qual): Handle RID_ATOMIC.
3413 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3414 (c_token_starts_declspecs): Handle RID_ATOMIC.
3415 (c_parser_declspecs): Handle atomic type specifiers and
3416 qualifiers.
3417 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3418 from types of expressions with atomic type.
3419 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3420 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3421 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3422 (c_parser_statement_after_labels, c_parser_switch_statement)
3423 (c_parser_for_statement, c_parser_expr_no_commas)
3424 (c_parser_conditional_expression, c_parser_binary_expression)
3425 (c_parser_cast_expression, c_parser_unary_expression)
3426 (c_parser_postfix_expression)
3427 (c_parser_postfix_expression_after_primary, c_parser_expression):
3428 Use convert_lvalue_to_rvalue.
3429 (c_parser_expression_conv, c_parser_expr_list): Document
3430 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3431 (c_parser_objc_synchronized_statement): Use
3432 convert_lvalue_to_rvalue.
3433 (c_parser_objc_selector): Handle RID_ATOMIC.
3434 (c_parser_objc_receiver, c_parser_array_notation): Use
3435 convert_lvalue_to_rvalue.
3436 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3437 _Atomic (type-name).
3438 (struct c_declspecs): Add atomic_p field.
3439 (convert_lvalue_to_rvalue): Declare.
3440 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3441 corresponding atomic types.
3442 (qualify_type): Don't add _Atomic qualifiers from second argument.
3443 (comp_target_types): Do not allow _Atomic mismatches.
3444 (type_lists_compatible_p): Do not remove atomic qualifiers when
3445 comparing types.
3446 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3447 (build_atomic_assign): New functions.
3448 (build_unary_op): Use build_atomic_assign for atomic increment and
3449 decrement.
3450 (build_conditional_expr): Do not treat _Atomic void as a qualified
3451 version of void.
3452 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3453 (find_anonymous_field_with_type, convert_to_anonymous_field)
3454 (convert_for_assignment): Do not remove atomic qualifiers when
3455 comparing types.
3456 (digest_init): Do not accept initialization of arrays of atomic
3457 elements by string constants.
3458 (build_asm_expr): Use convert_lvalue_to_rvalue.
3459 (build_binary_op): Do not treat _Atomic void as a qualified
3460 version of void.
3461
0c249d4b
DD
34622013-11-06 DJ Delorie <dj@redhat.com>
3463
3464 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3465 both explicit and builtin, print the location of the explicit one.
3466
6d7f7e0a
TB
34672013-11-05 Tobias Burnus <burnus@net-b.de>
3468
3469 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3470 c_parser_omp_distribute, c_parser_omp_teams,
3471 c_parser_omp_target, c_parser_omp_declare): Handle
3472 -fopenmp-simd.
3473
b906f4ca
MP
34742013-11-03 Marek Polacek <polacek@redhat.com>
3475
3476 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3477
ee1d5a02
JJ
34782013-11-01 Jakub Jelinek <jakub@redhat.com>
3479
3480 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3481 check_dup_generic at the end, unless remove is true.
3482 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3483 remove = true;.
3484 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3485
5a9785fb
JJ
34862013-10-31 Jakub Jelinek <jakub@redhat.com>
3487
3488 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3489 with decl that is not pointer nor array.
3490
939b37da
BI
34912013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3492
3493 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3494 a spawning function is found.
3495 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3496 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3497 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3498 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3499 case.
3500 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3501 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3502 expr.
3503 (c_finish_return): Added a check to reject _Cilk_spawn in return
3504 expression.
3505 (build_cilk_spawn): New function.
3506 (build_cilk_sync): Likewise.
3507 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3508
d4af74d4
TB
35092013-10-27 Tobias Burnus <burnus@net-b.de>
3510
3511 PR other/33426
3512 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3513 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3514 (c_parser_statement_after_labels): Update calls.
3515
d73749df 35162013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3517
3518 PR other/33426
3519 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3520 Handle PRAGMA_IVDEP.
3521 (c_parser_statement_after_labels): Update call.
3522
f28aa681
MP
35232013-10-24 Marek Polacek <polacek@redhat.com>
3524
3525 * c-parser.c (c_parser_struct_declaration): Add a comment.
3526 (c_parser_declarator): Don't allow _Alignas here.
3527
0645c1a2
AM
35282013-10-17 Andrew MacLeod <amacleod@redhat.com>
3529
3530 * c-parser.c: Include omp-low.h.
3531 * c-typeck.c: Likewise.
3532
568a31f2
MP
35332013-10-17 Marek Polacek <polacek@redhat.com>
3534
3535 PR c/58267
3536 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3537 Document syntax of the array-declarator.
3538 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3539 are not permitted.
3540 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3541 (c_parser_struct_declaration): Likewise.
3542 (c_parser_declarator): Likewise.
3543 (c_parser_direct_declarator_inner): Likewise.
3544 (c_parser_parameter_declaration): Likewise.
3545 (c_parser_type_name): Likewise.
3546
acf0174b
JJ
35472013-10-11 Jakub Jelinek <jakub@redhat.com>
3548
3549 * c-lang.h (current_omp_declare_target_attribute): New extern
3550 decl.
3551 * c-parser.c: Include c-lang.h.
3552 (struct c_parser): Change tokens to c_token *.
3553 Add tokens_buf field. Change tokens_avail type to unsigned int.
3554 (c_parser_consume_token): If parser->tokens isn't
3555 &parser->tokens_buf[0], increment parser->tokens.
3556 (c_parser_consume_pragma): Likewise.
3557 (enum pragma_context): Add pragma_struct and pragma_param.
3558 (c_parser_external_declaration): Adjust
3559 c_parser_declaration_or_fndef caller.
3560 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3561 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3562 Adjust recursive call.
3563 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3564 of pragma_external.
3565 (c_parser_parameter_declaration): Use pragma_param instead of
3566 pragma_external.
3567 (c_parser_compound_statement_nostart, c_parser_label,
3568 c_parser_for_statement): Adjust
3569 c_parser_declaration_or_fndef callers.
3570 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3571 it through to c_parser_conditional_expression.
3572 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3573 pass it through to c_parser_binary_expression. Adjust recursive
3574 call.
3575 (c_parser_binary_expression): Remove prec argument, add
3576 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3577 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3578 binop matches it, use build2 instead of parser_build_binary_op.
3579 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3580 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3581 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3582 Handle pragma_struct and pragma_param the same as pragma_external.
3583 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3584 (c_parser_omp_variable_list): Parse array sections for
3585 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3586 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3587 (c_parser_omp_clause_reduction): Handle user defined reductions.
3588 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3589 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3590 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3591 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3592 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3593 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3594 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3595 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3596 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3597 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3598 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3599 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3600 (c_parser_omp_for_loop): Add CODE argument, pass it through
3601 to c_finish_omp_for. Change last argument to cclauses,
3602 and adjust uses to grab parallel clauses from the array of all
3603 the split clauses. Adjust c_parser_binary_expression,
3604 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3605 (omp_split_clauses): New function.
3606 (c_parser_omp_simd): New function.
3607 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3608 Allow the function to be called also when parsing combined constructs,
3609 and call c_parser_omp_simd when parsing for simd.
3610 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3611 #pragma omp section, require exactly one structured-block instead of
3612 sequence of statements.
3613 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3614 Allow the function to be called also when parsing combined constructs.
3615 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3616 Allow the function to be called also when parsing combined
3617 constructs.
3618 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3619 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3620 c_parser_omp_teams, c_parser_omp_target_data,
3621 c_parser_omp_target_update, c_parser_omp_target,
3622 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3623 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3624 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3625 (c_parser_omp_construct): Add p_name and mask vars. Handle
3626 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3627 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3628 and c_parser_omp_sections callers.
3629 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3630 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3631 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3632 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3633 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3634 OMP_CLAUSE_DEPEND.
3635 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3636 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3637 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3638 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3639 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3640 * c-typeck.c: Include tree-inline.h.
3641 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3642 handle_omp_array_sections_1, handle_omp_array_sections,
3643 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3644 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3645 user defined reductions.
3646 (c_tree_equal): New function.
3647 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3648 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3649 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3650 c_check_omp_declare_reduction_r): New prototypes.
3651 * c-decl.c (current_omp_declare_target_attribute): New variable.
3652 (c_decl_attributes): New function.
3653 (start_decl, start_function): Use it instead of decl_attributes.
3654 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3655 c_omp_reduction_decl, c_omp_reduction_lookup,
3656 c_check_omp_declare_reduction_r): New functions.
3657
0a6c2227
TT
36582013-09-25 Tom Tromey <tromey@redhat.com>
3659
3660 * Make-lang.in (c/gccspec.o): Remove.
3661 (CFLAGS-c/gccspec.o): New variable.
3662 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3663 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3664 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3665
f3bc55f0
TT
36662013-09-25 Tom Tromey <tromey@redhat.com>
3667
3668 * Make-lang.in (c/gccspec.o): Don't use subshell.
3669
a24d975c
MP
36702013-09-18 Marek Polacek <polacek@redhat.com>
3671
3672 PR sanitize/58443
3673 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3674 Remove unnecessary check.
3675
ce6923c5
MP
36762013-09-18 Marek Polacek <polacek@redhat.com>
3677
3678 PR sanitizer/58411
3679 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3680 no_sanitize_undefined attribute.
3681
a1e51df9
KT
36822013-09-13 Kai Tietz <ktietz@redhat.com>
3683
3684 PR target/57848
3685 * c-decl.c (c_builtin_function_ext_scope): Remove
3686 wrong assumption that it is never called on prexisting
3687 symbol.
3688
0af94e6f
JR
36892013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3690
3691 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3692
20059c8b
GDR
36932013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3694
3695 * c-objc-common.c (c_tree_printer): Tidy.
3696
de5a5fa1
MP
36972013-08-30 Marek Polacek <polacek@redhat.com>
3698
3699 * c-typeck.c (build_binary_op): Add division by zero and shift
3700 instrumentation.
3701
2531a1d9 37022013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 3703 Joseph Myers <joseph@codesourcery.com>
2531a1d9 3704
6e2bcc98 3705 PR c/35649
2531a1d9
JR
3706 * c-typeck.c (c_common_type): Prefer double_type_node over
3707 other REAL_TYPE types with the same precision.
3708 (convert_arguments): Likewise.
3709
025311c4
GDR
37102013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3711
3712 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3713 (c_initialize_diagnostics): Call a destructor for the early printer.
3714
da6ca2b5
GDR
37152013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3716
3717 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3718 printer initialization.
3719
318cda85 37202013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 3721
318cda85
BI
3722 PR c/57490
3723 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3724 check for truth values.
3725 (expand_array_notation_exprs): Added truth values case. Removed an
3726 unwanted else. Added for-loop to walk through subtrees in default
3727 case.
3728
b066401f
GDR
37292013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3730
3731 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3732
fb48aadc
JM
37332013-07-23 Joseph Myers <joseph@codesourcery.com>
3734
3735 * c-parser.c (struct c_generic_association): Fix typo.
3736
433cc7b0
TT
37372013-07-23 Tom Tromey <tromey@redhat.com>
3738 Joseph Myers <joseph@codesourcery.com>
3739
3740 * c-parser.c (struct c_generic_association): New.
3741 (c_generic_association_d): New typedef.
3742 (c_parser_generic_selection): New function.
3743 (c_parser_postfix_expression): Handle RID_GENERIC.
3744
26d40c3d
JM
37452013-07-13 Jason Merrill <jason@redhat.com>
3746
3747 PR c++/57793
3748 * c-decl.c (finish_struct): Check for too-large class.
3749
ecdbd01a 37502013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
3751
3752 PR c/57821
3753 * c-typeck.c (set_init_index): When folding, check for index overflow.
3754
1141ed3f
BI
37552013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3756
3757 * c-parser.c (c_parser_array_notation): Removed rejection of array
3758 notations in an array of function pointers.
3759
713b46fa
BI
37602013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3761
3762 * c-array-notation.c (make_triplet_val_inv): New function.
3763 (create_cmp_incr): Likewise.
3764 (create_array_refs): Likewise.
3765 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3766 Also modularized common parts between functions and called the function.
3767 (build_array_notation_expr): Likewise.
3768 (fix_conditional_array_notations_1): Likewise.
3769 (fix_array_notation_expr): Likewise.
3770 (fix_array_notation_call_expr): Likewise.
3771
92f20202
MP
37722013-06-18 Marek Polacek <polacek@redhat.com>
3773
3774 PR c/57630
3775 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3776
73a23b06
BI
37772013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3778
3779 * c-array-notation.c (build_array_notation_expr): Reject array notation
3780 mismatch between LHS and RHS even inside a call_expr. Also, removed
3781 a couple while statements that were dead code.
3782
00b8517d
BI
37832013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3784
3785 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3786 excessive precision expressions in function parameters. Also removed
3787 couple unwanted while statements.
3788
1509bdda
BI
37892013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3790
3791 * c-array-notation.c (expand_array_notation_exprs): Added
3792 ARRAY_NOTATION_REF case.
3793
d60f1706
BI
37942013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3795
3796 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3797 function to c-family/array-notation-common.c.
3798 (is_cilkplus_reduce_builtin): Likewise.
3799 (find_rank): Likewise.
3800 (extract_array_notation_exprs): Likewise.
3801 (replace_array_notations): Likewise.
3802 (find_inv_trees): Likewise.
3803 (replace_inv_trees): Likewise.
3804 (contains_array_notation_expr): Likewise.
3805 (find_correct_array_notation_type): Likewise.
3806 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3807 (struct inv_list): Moved this to c-family/array-notation-common.c.
3808 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3809
6d6efbb3
BI
38102013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3811
3812 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3813 reduction functions outside the for-loop. Added a check if the fundecl
3814 is non-NULL. Finally, removed an unwanted if-statement, and made the
3815 body unconditional.
3816
25c22937
BI
38172013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3818
3819 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3820 condition of the if-statement matches the rank of else-block and then-
3821 block when array notations are used.
3822 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3823 expression after the entire function body is parsed.
3824 (c_parser_expr_no_commas): Delayed creating array notation expressions
3825 to the end of function parsing.
3826 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3827 whole if-statement instead of just the condition.
3828 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3829
edd25645
BI
38302013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3831
3832 PR c/57474
3833 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3834 array to NULL_TREE if they are unused. Also added a check for the
3835 field to be NULL before its fields are used in future.
3836
065ce7f1
RO
38372013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3838
3839 PR bootstrap/57450
3840 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3841 (build_array_notation_expr): Likewise.
3842
36536d79
BI
38432013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3844
3845 * c-typeck.c (build_array_ref): Added a check to see if array's
3846 index is greater than one. If true, then emit an error.
3847 (build_function_call_vec): Exclude error reporting and checking
3848 for builtin array-notation functions.
3849 (convert_arguments): Likewise.
3850 (c_finish_return): Added a check for array notations as a return
3851 expression. If true, then emit an error.
3852 (c_finish_loop): Added a check for array notations in a loop
3853 condition. If true then emit an error.
3854 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3855 (build_binary_op): Added a check for array notation expr inside
3856 op1 and op0. If present, we call another function to find correct
3857 type.
3858 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3859 * c-parser.c (c_parser_compound_statement): Check if array
3860 notation code is used in tree, if so, then transform them into
3861 appropriate C code.
3862 (c_parser_expr_no_commas): Check if array notation is used in LHS
3863 or RHS, if so, then build array notation expression instead of
3864 regular modify.
3865 (c_parser_postfix_expression_after_primary): Added a check for
3866 colon(s) after square braces, if so then handle it like an array
3867 notation. Also, break up array notations in unary op if found.
3868 (c_parser_direct_declarator_inner): Added a check for array
3869 notation.
3870 (c_parser_compound_statement): Added a check for array notation in
3871 a stmt. If one is present, then expand array notation expr.
3872 (c_parser_if_statement): Likewise.
3873 (c_parser_switch_statement): Added a check for array notations in
3874 a switch statement's condition. If true, then output an error.
3875 (c_parser_while_statement): Similarly, but for a while.
3876 (c_parser_do_statement): Similarly, but for a do-while.
3877 (c_parser_for_statement): Similarly, but for a for-loop.
3878 (c_parser_unary_expression): Check if array notation is used in a
3879 pre-increment or pre-decrement expression. If true, then expand
3880 them.
3881 (c_parser_array_notation): New function.
3882 * c-array-notation.c: New file.
3883 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3884
cd192ccc
MS
38852013-05-23 Mike Stump <mikestump@comcast.net>
3886
3887 * c-typeck.c (convert_for_assignment): Handle references to memory
3888 spaces better.
3889
427b248d
JM
38902013-05-16 Jason Merrill <jason@redhat.com>
3891
3892 * Make-lang.in (cc1$(exeext)): Use link mutex.
3893
44d90fe1
PC
38942013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3895
3896 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3897 to simply use OPT_Wpointer_arith.
3898 (build_unary_op): Likewise.
3899
4e7d7b3d
JJ
39002013-04-03 Jakub Jelinek <jakub@redhat.com>
3901
3902 PR c/19449
3903 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3904 argument. If set, or it temporarily for parsing of the first
3905 argument into force_folding_builtin_constant_p.
3906 (c_parser_postfix_expression): Adjust callers.
3907
839b422f
RB
39082013-03-21 Richard Biener <rguenther@suse.de>
3909
3910 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3911 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3912
2ee028f1
MP
39132013-02-12 Marek Polacek <polacek@redhat.com>
3914
3915 PR c/44938
3916 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3917 origtypes to NULL.
3918
8824edff
JJ
39192013-01-24 Jakub Jelinek <jakub@redhat.com>
3920
3921 PR c/56078
3922 * c-typeck.c (set_nonincremental_init_from_string): If
3923 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3924 returned false.
3925 (process_init_element): Likewise.
3926
eadd3d0d
JJ
39272012-12-20 Jakub Jelinek <jakub@redhat.com>
3928
3929 PR c++/55619
3930 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3931 argument, don't call default_function_array_conversion
3932 nor c_fully_fold here.
3933 (c_parser_asm_statement): Adjust callers.
3934 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3935 and outputs here, and call default_function_array_conversion
3936 on inputs that don't need to be addressable.
3937
f8a93a2e
JJ
39382012-12-18 Jakub Jelinek <jakub@redhat.com>
3939
3940 PR c/39464
3941 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3942 warning require that both c_common_unsigned_type as well as
3943 c_common_signed_type is the same for both mvl and mvr types.
3944
9771b263
DN
39452012-11-16 Diego Novillo <dnovillo@google.com>
3946
3947 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3948
3949 * c-common.c: Use new vec API in vec.h.
3950 * c-common.h: Likewise.
3951 * c-gimplify.c: Likewise.
3952 * c-pragma.c: Likewise.
3953 * c-pretty-print.c: Likewise.
3954 * c-pretty-print.h: Likewise.
3955 * c-semantics.c: Likewise.
3956 * c-decl.c: Likewise.
3957 * c-parser.c: Likewise.
3958 * c-tree.h: Likewise.
3959 * c-typeck.c: Likewise.
3960
880661a4
JW
39612012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3962
3963 PR c++/54930
3964 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3965
077d1abe
MLI
39662012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3967
3968 PR c/53066
3969 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3970 shadows a function, unless the variable is a function or a
3971 pointer-to-function.
3972
3a785c97
JJ
39732012-10-12 Jakub Jelinek <jakub@redhat.com>
3974
3975 PR c/54381
3976 * c-parser.c (struct c_tree_loc_pair): Removed.
3977 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3978 add location_t * and tree * arguments, fill in array of 3
3979 sizeof_arg trees and corresponding locs.
3980 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3981 c_parser_expr_list callers.
3982 (c_parser_postfix_expression_after_primary): Likewise. Pass
3983 array of 3 sizeof_arg trees and locs (corresponding to first
3984 3 arguments) to sizeof_pointer_memaccess_warning.
3985
703c8606
LC
39862012-10-09 Lawrence Crowl <crowl@google.com>
3987
3988 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3989 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3990 hash table.
3991
5d9de0d0
PC
39922012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3993
3994 PR c++/54194
3995 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3996 call.
3997
a212e43f
MG
39982012-10-09 Marc Glisse <marc.glisse@inria.fr>
3999
4000 PR c++/54427
4001 * c-typeck.c: Include c-common.h.
4002 (enum stv_conv): Moved to c-common.h.
4003 (scalar_to_vector): Moved to c-common.c.
4004 (build_binary_op): Adapt to scalar_to_vector's new prototype.
4005 * Make-lang.in: c-typeck.c depends on c-common.h.
4006
3b78de56
AC
40072012-10-04 Arnaud Charlet <charlet@adacore.com>
4008
4009 * c-decl.c (c_write_global_declarations): Fix handling of
4010 -fdump-ada-spec*.
4011
78c60e3d
SS
40122012-09-30 Sharad Singhai <singhai@google.com>
4013
4014 * c-decl.c (c_write_global_declarations): Use a different method
4015 to determine if the dump has ben initialized.
4016
9f33203d
JM
40172012-09-14 Joseph Myers <joseph@codesourcery.com>
4018
4019 PR c/54552
4020 * c-typeck.c (c_cast_expr): When casting to a type requiring
4021 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
4022 c_fully_fold first.
4023
a27d595d
JM
40242012-09-14 Joseph Myers <joseph@codesourcery.com>
4025
4026 PR c/54103
4027 * c-typeck.c (build_unary_op): Pass original argument of
4028 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4029 any C_MAYBE_CONST_EXPR, if it has integer operands.
4030 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4031 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4032 to c_objc_common_truthvalue_conversion, then remove any
4033 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4034 c_objc_common_truthvalue_conversion not
4035 c_common_truthvalue_conversion.
4036 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4037 call note_integer_operands for arguments with integer operands
4038 that are not integer constants.
4039
9feb29df
JJ
40402012-09-13 Jakub Jelinek <jakub@redhat.com>
4041
4042 PR c/54559
4043 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4044 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4045
d409320c
JJ
40462012-08-31 Jakub Jelinek <jakub@redhat.com>
4047
4048 PR c/54428
4049 * c-convert.c (convert): Don't call fold_convert_loc if
4050 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4051 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4052 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4053
6265d07c
JJ
40542012-08-24 Jakub Jelinek <jakub@redhat.com>
4055
4056 PR c/54355
4057 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4058 for nested and empty_ok arguments in the call to
4059 c_parser_declaration_or_fndef.
4060
1a4049e7
JJ
40612012-08-17 Jakub Jelinek <jakub@redhat.com>
4062
4063 * c-tree.h (c_last_sizeof_arg): Declare.
4064 * c-parser.c (struct c_tree_loc_pair): New type.
4065 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4066 non-NULL.
4067 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4068 (c_parser_postfix_expression_after_primary): Likewise. Call
4069 sizeof_pointer_memaccess_warning if needed.
4070 (sizeof_ptr_memacc_comptypes): New function.
4071 * c-typeck.c (c_last_sizeof_arg): New global variable.
4072 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4073
0229aee9
UB
40742012-07-24 Uros Bizjak <ubizjak@gmail.com>
4075
4076 * c-lang.h (lang_decl): Add variable_size GTY option.
4077
7ee2468b
SB
40782012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4079
4080 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4081 * Make-lang.in: Fix dependencies.
4082
d4a10d0a
SB
40832012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4084
4085 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4086 and add language Makefile hooks.
4087 * config-lang.in: New file.
4088 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4089 add the required "normal" config-lang.in rules.
4090 * c-lang.h: Moved from gcc/ to here.
4091 * c-tree.h: Likewise.
4092 * c-objc-common.c: Likewise.
4093 * c-objc-common.h: Likewise.
4094 * c-typeck.c: Likewise.
4095 * c-convert.c: Likewise.
4096 * c-lang.c: Likewise.
4097 * c-aux-info.c: Likewise.
4098 * c-errors.c: Likewise.
4099 * gccspec.c: Likewise.
4100 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4101 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4102\f
818ab71a 4103Copyright (C) 2012-2016 Free Software Foundation, Inc.
d4a10d0a
SB
4104
4105Copying and distribution of this file, with or without modification,
4106are permitted in any medium without royalty provided the copyright
4107notice and this notice are preserved.