]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
tree-ssa-math-opts.c (find_bswap_or_nop): Zero out bytes in cmpxchg and cmpnop in...
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
1ee62b92
PG
12016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
2 Richard Biener <rguenther@suse.de>
3
4 * Make-lang.in (C_AND_OBJC_OBJS): Add gimple-parser.o.
5 * config-lang.in (gtfiles): Add c/c-parser.h.
6 * c-tree.h (enum c_declspec_word): Add cdw_gimple.
7 (struct c_declspecs): Add gimple_pass member and gimple_p flag.
8 * c-parser.c (enum c_id_kind, struct c_token,
9 c_parser_next_token_is, c_parser_next_token_is_not,
10 c_parser_next_token_is_keyword,
11 enum c_lookahead_kind, enum c_dtr_syn, enum c_parser_prec):
12 Split out to ...
13 * c-parser.h: ... new header.
14 * c-parser.c: Include c-parser.h and gimple-parser.h.
15 (c_parser_peek_token, c_parser_peek_2nd_token,
16 c_token_starts_typename, c_parser_next_token_starts_declspecs,
17 c_parser_next_tokens_start_declaration, c_parser_consume_token,
18 c_parser_error, c_parser_require, c_parser_skip_until_found,
19 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
20 c_parser_type_name): Export.
21 (c_parser_tokens_buf): New function.
22 (c_parser_error): Likewise.
23 (c_parser_set_error): Likewise.
24 (c_parser_declspecs): Handle RID_GIMPLE.
25 (c_parser_declaration_or_fndef): Parse __GIMPLE marked body
26 via c_parser_parse_gimple_body.
27 * c-parser.h (c_parser_peek_token, c_parser_peek_2nd_token,
28 c_token_starts_typename, c_parser_next_token_starts_declspecs,
29 c_parser_next_tokens_start_declaration, c_parser_consume_token,
30 c_parser_error, c_parser_require, c_parser_skip_until_found,
31 c_parser_declspecs, c_parser_declarator, c_parser_peek_nth_token,
32 c_parser_type_name): Declare.
33 (struct c_parser): Declare forward.
34 (c_parser_tokens_buf): Declare.
35 (c_parser_error): Likewise.
36 (c_parser_set_error): Likewise.
37 * gimple-parser.c: New file.
38 * gimple-parser.h: Likewise.
39
84ff4775
LCW
402016-09-11 Le-Chun Wu <lcwu@google.com>
41 Mark Wielaard <mjw@redhat.com>
42
43 * c-decl.c (warn_if_shadowing): Use the warning code corresponding
44 to the given -Wshadow= variant.
45
4d0cdd0c
TP
462016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
47
48 * c-typeck.c: Include memmodel.h.
49
1202f33e
JJ
502016-10-13 Jakub Jelinek <jakub@redhat.com>
51
52 PR target/77957
53 * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
54 instead of lhd_return_null_tree_v.
55
8a14afd0
BS
562016-10-07 Bernd Schmidt <bschmidt@redhat.com>
57
58 PR c++/69733
59 * c-decl.c (smallest_type_quals_location): New static function.
60 (grokdeclarator): Try to find the correct location for an ignored
61 qualifier.
62
81fea426
MP
632016-09-26 Marek Polacek <polacek@redhat.com>
64
65 PR c/7652
66 * c-decl.c (pop_scope): Add gcc_fallthrough.
67
682016-09-26 Marek Polacek <polacek@redhat.com>
69
70 PR c/7652
71 * c-parser.c (struct c_token): Add flags field.
72 (c_lex_one_token): Pass it to c_lex_with_flags.
73 (c_parser_declaration_or_fndef): Turn __attribute__((fallthrough));
74 into IFN_FALLTHROUGH.
75 (c_parser_label): Set FALLTHROUGH_LABEL_P on labels. Handle
76 attribute fallthrough after a case label or default label.
77 (c_parser_statement_after_labels): Handle RID_ATTRIBUTE.
78
9a2300e9
MP
792016-09-24 Marek Polacek <polacek@redhat.com>
80
81 PR c/77490
82 * c-typeck.c (build_unary_op): Warn about bit not on expressions that
83 have boolean value. Warn about ++/-- on booleans.
84
7de76362
JJ
852016-09-23 Jakub Jelinek <jakub@redhat.com>
86
87 * c-parser.c (incomplete_record_decls): Remove unnecessary
88 = vNULL initialization of file scope vec.
89
5b73d2ab
MP
902016-09-16 Marek Polacek <polacek@redhat.com>
91
92 * c-typeck.c (lvalue_p): Use true and false instead of 1 and 0.
93
e51fbec3
MP
942016-09-14 Marek Polacek <polacek@redhat.com>
95
96 * c-array-notation.c (create_cmp_incr): Use false instead of 0.
97 (fix_array_notation_expr): Likewise.
98 * c-decl.c (finish_decl): Likewise.
99 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
100 * c-typeck.c (array_to_pointer_conversion): Use true instead of 1.
101 (function_to_pointer_conversion): Use false instead of 0.
102 (convert_lvalue_to_rvalue): Likewise.
103 (parser_build_unary_op): Likewise.
104 (build_atomic_assign): Likewise.
105 (build_unary_op): Change nonconvert parameter type to bool, use
106 true/false instead of 1/0.
107 (build_binary_op): Use true instead of 1.
108
254830ba
DM
1092016-09-13 David Malcolm <dmalcolm@redhat.com>
110
111 * c-parser.c (c_parser_declaration_or_fndef): Update for renaming
112 of add_fixit_insert to add_fixit_insert_before.
113
4c13ba17
MP
1142016-09-13 Marek Polacek <polacek@redhat.com>
115
116 * c-typeck.c (build_unary_op): Rename FLAG parameter to NOCONVERT. Use
117 it.
118
54dcdb88
BE
1192016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
120
121 PR c++/77496
122 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
123 COMPOUND_EXPR to warn_for_omitted_condop.
124
e5106e27
DM
1252016-09-07 David Malcolm <dmalcolm@redhat.com>
126
127 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
128 c_get_substring_location for this new langhook.
129
9dc5773f
JJ
1302016-09-02 Jakub Jelinek <jakub@redhat.com>
131
132 PR c/65467
133 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
134 flag_openmp.
135 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
136 instead of mark_exp_read on low_bound/length expression.
137 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
138 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
139 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
140 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
141 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
142 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
143 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
144 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
145 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
146 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
147 instead of mark_expr_read.
148 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
149 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
150 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
151 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
152 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
153 array section bases outside of depend clause, for depend clause
154 use convert_lvalue_to_rvalue on the base.
155 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
156 linear, aligned, map, to and from clauses.
157 (c_omp_clause_copy_ctor): New function.
158
295844f6
MP
1592016-09-01 Marek Polacek <polacek@redhat.com>
160
161 PR c/7652
162 * c-typeck.c (composite_type): Add FALLTHRU comment.
163
089af25c
DM
1642016-08-31 David Malcolm <dmalcolm@redhat.com>
165
166 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
167 to the insertion fixits for "struct", "union", and "enum".
168
f9087798
DM
1692016-08-30 David Malcolm <dmalcolm@redhat.com>
170
171 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
172 rather than add_fixit_misspelled_id.
173 (undeclared_variable): Likewise.
174 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
175 now-redundant "here" params from add_fixit_insert method calls.
176 (c_parser_parameter_declaration): Likewise.
177 * c-typeck.c (build_component_ref): Remove now-redundant range
178 param from add_fixit_replace method calls.
179
ebef225f
MP
1802016-08-25 Marek Polacek <polacek@redhat.com>
181
182 * c-typeck.c (parser_build_binary_op): Pass LHS to
183 warn_logical_not_parentheses.
184
fe377a48
MP
1852016-08-25 Marek Polacek <polacek@redhat.com>
186
187 PR c/77323
188 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
189 or _FloatN or _FloatNx is not supported.
190 (finish_declspecs): Set type to integer_type_node when _FloatN or
191 _FloatNx is not supported.
192
c65699ef
JM
1932016-08-19 Joseph Myers <joseph@codesourcery.com>
194
195 PR c/32187
196 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
197 (struct c_declspecs): Add field floatn_nx_idx.
198 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
199 and _FloatNx type specifiers.
200 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
201 (c_parser_declspecs, c_parser_attribute_any_word)
202 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
203 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
204 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
205 narrower than double.
206
2f1364c2
JJ
2072016-08-12 Jakub Jelinek <jakub@redhat.com>
208 Martin Liska <mliska@suse.cz>
209
210 PR c/67410
211 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
212 % to determine val element to change. Assert that
213 wchar_bytes * charwidth fits into val array.
214
191816a3
MP
2152016-08-12 Marek Polacek <polacek@redhat.com>
216
217 PR c/7652
218 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
219 (c_parser_postfix_expression): Likewise.
220 * c-typeck.c (build_unary_op): Adjust fall through comment.
221 (c_mark_addressable): Likewise.
222
b95a64bb
JJ
2232016-08-11 Jakub Jelinek <jakub@redhat.com>
224
225 PR c/72816
226 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
227 array member through typedef, for orig_qual_indirect == 0 clear
228 orig_qual_type.
229
895aa8e1
DM
2302016-08-08 David Malcolm <dmalcolm@redhat.com>
231
232 PR c/64955
233 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
234 this up to selftest::run_c_tests.
235 (selftest::run_c_tests): New function.
236
0b212d8c
TS
2372016-08-04 Thomas Schwinge <thomas@codesourcery.com>
238
ae9281fc
TS
239 * c-parser.c (struct oacc_routine_data): Add error_seen and
240 fndecl_seen members.
241 (c_finish_oacc_routine): Use these.
242 (c_parser_declaration_or_fndef): Adjust.
243 (c_parser_oacc_routine): Likewise. Support more C language
244 constructs, and improve diagnostics. Move pragma context
245 checking...
246 (c_parser_pragma): ... here.
247
0b212d8c
TS
248 * c-parser.c (struct oacc_routine_data): New.
249 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
250 Simplify code.
251 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
252 declare target" attribute.
253
76e2c821
JB
2542016-08-01 Jan Beulich <jbeulich@suse.com>
255
256 * c-fold.c (c_fully_fold_internal): Also emit shift count
257 warnings for vector types.
258 * c-typeck.c (build_binary_op): Likewise.
259
f618a472
MP
2602016-07-29 Marek Polacek <polacek@redhat.com>
261
262 PR c/71742
263 * c-decl.c (finish_struct): Rephrase an error message.
264
efd0786f
MP
265 PR c/71853
266 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
267 to error node for invalid code.
268
e00dceaf
MP
269 PR c/71573
270 * c-decl.c (implicitly_declare): Return decl early not only for
271 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
272
673a107a
JJ
2732016-07-29 Jakub Jelinek <jakub@redhat.com>
274
275 PR c/71969
276 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
277 on GNU extern inline functions.
278
a5b5c8b6
MP
2792016-07-29 Marek Polacek <polacek@redhat.com>
280
281 PR c/71583
282 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
283 check expr.value.
284
e3fe09c1
UB
2852016-07-22 Uros Bizjak <ubizjak@gmail.com>
286
287 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
288
7c8f7eaa
DM
2892016-07-20 David Malcolm <dmalcolm@redhat.com>
290
291 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
292 spellcheck-tree.h
293 (best_macro_match): Likewise, converting from a typedef to a
294 subclass.
295 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
296 (lookup_name_fuzzy): Update for change of best_macro_match to a
297 subclass with a ctor that calls cpp_forall_identifiers.
298
de6a69ee
DM
2992016-07-20 David Malcolm <dmalcolm@redhat.com>
300
301 * c-decl.c (implicit_decl_warning): Update for conversion of
302 return type of lookup_name_fuzzy to const char *.
303 (undeclared_variable): Likewise.
304 (lookup_name_fuzzy): Convert return type from tree to
305 const char *.
306 * c-parser.c (c_parser_declaration_or_fndef): Update for
307 conversion of return type of lookup_name_fuzzy to const char *.
308 (c_parser_parameter_declaration): Likewise.
309
b1c9c068
CP
3102016-07-15 Cesar Philippidis <cesar@codesourcery.com>
311
312 * c-parser.c (c_parser_oacc_declare): Don't scan for
313 GOMP_MAP_POINTER.
314 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
315 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
316 zero-length subarrays.
317
ddbbcb19
JJ
3182016-07-15 Jakub Jelinek <jakub@redhat.com>
319
320 PR c/71858
321 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
322 instead of FUZZY_LOOKUP_NAME.
323 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
324 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
325
dd36b877
JJ
3262016-07-14 Jakub Jelinek <jakub@redhat.com>
327
328 PR c/71858
329 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
330
8c681247
TS
3312016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
332
333 * c-parser.c (c_parser_generic_selection): Make type of variable
334 auto_vec.
335 (c_parser_omp_declare_simd): Likewise.
336
bf4fa671
TS
3372016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
338
339 * c-decl.c (struct c_struct_parse_info): Change member types
340 from vec to auto_vec.
341 (start_struct): Adjust.
342 (finish_struct): Likewise.
343
557e8c49
JJ
3442016-07-02 Jakub Jelinek <jakub@redhat.com>
345
346 PR c/71719
347 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
348
54d19c3b
TS
3492016-06-29 Thomas Schwinge <thomas@codesourcery.com>
350
351 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
352 Move pragma context checking into...
353 (c_parser_omp_cancellation_point): ... here, and improve
354 diagnostic messages.
355 * c-typeck.c (c_finish_omp_cancel)
356 (c_finish_omp_cancellation_point): Improve diagnostic messages.
357
152ef731
JJ
3582016-06-29 Jakub Jelinek <jakub@redhat.com>
359
360 PR c/71685
361 * c-typeck.c (c_build_qualified_type): Don't clear
362 C_TYPE_INCOMPLETE_VARS for the main variant.
363
3642016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
365
366 PR c/71552
367 * c-typeck.c (output_init_element): Diagnose incompatible types
368 before non-constant initializers.
369
e9ac1f86
JJ
3702016-06-28 Jakub Jelinek <jakub@redhat.com>
371
372 * Make-lang.in: Don't cat ../stage_current if it does not exist.
373
277d7ee0
AK
3742016-06-23 Andi Kleen <ak@linux.intel.com>
375
376 * Make-lang.in: Add support for autofdo.
377
1a4f11c8
DM
3782016-06-22 David Malcolm <dmalcolm@redhat.com>
379
380 PR c/70339
381 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
382 (implicit_decl_warning): When issuing warnings for implicit
383 declarations, attempt to provide a suggestion via
384 lookup_name_fuzzy.
385 (undeclared_variable): Likewise when issuing errors.
386 (lookup_name_in_scope): Likewise.
387 (struct edit_distance_traits<cpp_hashnode *>): New struct.
388 (best_macro_match): New typedef.
389 (find_closest_macro_cpp_cb): New function.
390 (lookup_name_fuzzy): New function.
391 * c-parser.c: Include gcc-rich-location.h.
392 (c_token_starts_typename): Split out case CPP_KEYWORD into...
393 (c_keyword_starts_typename): ...this new function.
394 (c_parser_declaration_or_fndef): When issuing errors about
395 missing "struct" etc, add a fixit. For other kinds of errors,
396 attempt to provide a suggestion via lookup_name_fuzzy.
397 (c_parser_parms_declarator): When looking ahead to detect typos in
398 type names, also reject CPP_KEYWORD.
399 (c_parser_parameter_declaration): When issuing errors about
400 unknown type names, attempt to provide a suggestion via
401 lookup_name_fuzzy.
402 * c-tree.h (c_keyword_starts_typename): New prototype.
403
5a578671
JM
4042016-06-20 Joseph Myers <joseph@codesourcery.com>
405
406 PR c/71601
407 * c-typeck.c (build_conditional_expr): Return error_mark_node if
408 c_common_type returns error_mark_node.
409
3f8257db 4102016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
411
412 PR c/69507
413 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
414 __alignof__ (expression).
415
6a3f203c
DM
4162016-06-14 David Malcolm <dmalcolm@redhat.com>
417
418 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
419
264757fb
DM
4202016-06-14 David Malcolm <dmalcolm@redhat.com>
421
422 * c-typeck.c (build_component_ref): Simplify fixit code by
423 using gcc_rich_location::add_fixit_misspelled_id.
424 (set_init_label): Likewise.
425
f7e4f2e3
DM
4262016-06-13 David Malcolm <dmalcolm@redhat.com>
427
428 * c-parser.c (c_parser_initelt): Provide location of name for new
429 location_t param of set_init_label.
430 * c-tree.h (set_init_label): Add location_t param.
431 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
432 param and use it when issuing error messages about unrecognized
433 field names. Attempt to provide a fixit hint if appropriate,
434 otherwise update the error message to provide the type name.
435
4b1ffdb1
TS
4362016-06-10 Thomas Schwinge <thomas@codesourcery.com>
437
438 PR c/71381
439 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
440 Loosen checking.
441
44a845ca
MS
4422016-06-08 Martin Sebor <msebor@redhat.com>
443 Jakub Jelinek <jakub@redhat.com>
444
445 PR c++/70507
446 PR c/68120
447 * c-typeck.c (convert_arguments): Don't promote last argument
448 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
449
92a5f2ba
MP
4502016-06-08 Marek Polacek <polacek@redhat.com>
451
452 PR c/71418
453 * c-decl.c (grokdeclarator): Check TYPE_P.
454
08203f73
MP
455 PR c/71426
456 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
457 code.
458
6ffd47b7
DM
4592016-06-07 David Malcolm <dmalcolm@redhat.com>
460
461 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
462 and structure element reference, capture the location of the
463 element name token and pass it to build_component_ref.
464 (c_parser_postfix_expression_after_primary): Likewise for
465 structure element dereference.
466 (c_parser_omp_variable_list): Likewise for
467 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
468 * c-tree.h (build_component_ref): Add location_t param.
469 * c-typeck.c (build_component_ref): Add location_t param
470 COMPONENT_LOC. Use it, if available, when issuing hints about
471 mispelled member names to provide a fixit replacement hint.
472
1f40cff3
MP
4732016-06-06 Marek Polacek <polacek@redhat.com>
474
475 PR c/71362
476 * c-parser.c (c_parser_direct_declarator): Set location.
477
5545a907
MP
4782016-06-06 Marek Polacek <polacek@redhat.com>
479
480 * c-typeck.c (comptypes_internal): Handle comparisons of
481 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
482 TYPE_REF_CAN_ALIAS_ALL.
483
b605f663
CLT
4842016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
485
486 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
487 arguments as addressable when async clause exists.
488
00631022
JJ
4892016-05-30 Jakub Jelinek <jakub@redhat.com>
490
491 PR c++/71349
492 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
493 when combined with target construct.
494
7211a097
JJ
4952016-05-26 Jakub Jelinek <jakub@redhat.com>
496
497 * c-parser.c (c_parser_omp_clause_schedule): Warn if
498 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
499
95efe6b6
MP
5002016-05-25 Marek Polacek <polacek@redhat.com>
501
502 PR c/71265
503 * c-decl.c (c_make_fname_decl): Don't check seen_error.
504
a23faf7a
MP
505 PR c/71266
506 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
507
e46c7770
CP
5082016-05-24 Cesar Philippidis <cesar@codesourcery.com>
509
510 * c-parser.c (c_parser_oacc_declare): Add support for
511 GOMP_MAP_FIRSTPRIVATE_POINTER.
512 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
513 argument with enum c_omp_region_type ort.
514 (handle_omp_array_sections): Likewise. Update call to
515 handle_omp_array_sections_1.
516 (c_finish_omp_clauses): Add specific errors and warning messages for
517 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
518 call to handle_omp_array_sections.
519
a04e69c0
TS
5202016-05-24 Thomas Schwinge <thomas@codesourcery.com>
521
522 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
523
f17a223d
RB
5242016-05-24 Richard Biener <rguenther@suse.de>
525
526 PR middle-end/70434
527 PR c/69504
528 * c-typeck.c (build_array_ref): Do not complain about indexing
529 non-lvalue vectors. Adjust for function name change.
530
79063edd
MS
5312016-05-20 Martin Sebor <msebor@redhat.com>
532
533 PR c/71115
534 * c-typeck.c (error_init): Use
535 expansion_point_location_if_in_system_header.
536 (warning_init): Same.
537
8a40fef3
DM
5382016-05-19 David Malcolm <dmalcolm@redhat.com>
539
540 PR c/71171
541 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
542 in error-handling.
543 (c_parser_postfix_expression): Likewise.
544 * c-tree.h (c_expr::set_error): New method.
545 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
546 that result's range is initialized.
547
e9892350
JG
5482016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
549
550 * c-typeck.c (parser_build_unary_op): Fix formatting.
551
8fad45f5
MW
5522016-05-16 Matthew Wahab <matthew.wahab@arm.com>
553
554 * c-decl.c (grokdeclarator): Remove errmsg and use of
555 targetm.invalid_return_type.
556 (grokparms): Remove errmsg and use of
557 targetm.invalid_parameter_type.
558
aa4b467b
JM
5592016-05-13 Joseph Myers <joseph@codesourcery.com>
560
561 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
562 function return type.
563
4f2e1536
MP
5642016-05-12 Marek Polacek <polacek@redhat.com>
565
566 PR c/70756
567 * c-decl.c (build_compound_literal): Pass LOC down to
568 c_incomplete_type_error.
569 * c-tree.h (require_complete_type): Adjust declaration.
570 (c_incomplete_type_error): Likewise.
571 * c-typeck.c (require_complete_type): Add location parameter, pass it
572 down to c_incomplete_type_error.
573 (c_incomplete_type_error): Add location parameter, pass it down to
574 error_at.
575 (build_component_ref): Pass location down to c_incomplete_type_error.
576 (default_conversion): Pass location down to require_complete_type.
577 (build_array_ref): Likewise.
578 (build_function_call_vec): Likewise.
579 (convert_arguments): Likewise.
580 (build_unary_op): Likewise.
581 (build_c_cast): Likewise.
582 (build_modify_expr): Likewise.
583 (convert_for_assignment): Likewise.
584 (c_finish_omp_clauses): Likewise.
585
d6e83a8d
MM
5862016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
587
588 PR c/43651
589 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
590 is enabled.
591 * c-errors.c (pedwarn_c90): Return true if warned.
592 * c-tree.h (pedwarn_c90): Change return type to bool.
593 (enum c_declspec_word): Add new enumerator cdw_atomic.
594
5c3a10fb
MP
5952016-05-11 Marek Polacek <polacek@redhat.com>
596
597 PR c++/71024
598 * c-decl.c (diagnose_mismatched_decls): Factor out code to
599 diagnose_mismatched_attributes and call it.
600
cf68d92c
MP
6012016-05-10 Marek Polacek <polacek@redhat.com>
602
603 PR c/70255
604 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
605 on a declaration following the definition.
606
351f85c5
JJ
6072016-05-05 Jakub Jelinek <jakub@redhat.com>
608
609 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
610 parse it through to c_parser_c99_block_statement.
611 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
612 caller.
613
deef7113
MP
6142016-05-04 Marek Polacek <polacek@redhat.com>
615
616 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
617 OPT_Wdangling_else.
618
de55efd5
MP
6192016-05-04 Marek Polacek <polacek@redhat.com>
620
621 PR c/48778
622 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
623 for macro expansions.
624
79ce98bc
MP
6252016-05-03 Marek Polacek <polacek@redhat.com>
626
627 PR c/70859
628 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
629 check_builtin_function_arguments.
630
fb2647aa
RB
6312016-05-03 Richard Biener <rguenther@suse.de>
632
633 * Make-lang.in (cc1-checksum.c): For stage-final re-use
634 the checksum from the previous stage.
635
77886428
CP
6362016-05-02 Cesar Philippidis <cesar@codesourcery.com>
637
638 * c-parser.c (c_parser_oacc_all_clauses): Update call to
639 c_finish_omp_clauses.
640 (c_parser_omp_all_clauses): Likewise.
641 (c_parser_oacc_cache): Likewise.
642 (c_parser_oacc_loop): Likewise.
643 (omp_split_clauses): Likewise.
644 (c_parser_omp_declare_target): Likewise.
645 (c_parser_cilk_all_clauses): Likewise.
646 (c_parser_cilk_for): Likewise.
647 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
648 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
649
7176a4a0
MP
6502016-05-02 Marek Polacek <polacek@redhat.com>
651
652 PR c/70851
653 * c-decl.c (grokdeclarator): Diagnose when array's size has an
654 incomplete type.
655
e7ff0319
CP
6562016-04-29 Cesar Philippidis <cesar@codesourcery.com>
657
658 PR middle-end/70626
659 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
660 OACC_LOOP_CLAUSE_MASK.
661 (c_parser_oacc_kernels_parallel): Update call to
662 c_oacc_split_loop_clauses.
663
9f405ce1
AM
6642016-04-28 Andrew MacLeod <amacleod@redhat.com>
665
666 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
667 argument to build_modify_expr in two cases.
668
c1e1f433
BS
6692016-04-27 Bernd Schmidt <bschmidt@redhat.com>
670
671 * c-parser.c (c_parser_postfix_expression_after_primary): Call
672 warn_for_memset instead of warning directly here.
673
2448a956
MP
6742016-04-26 Marek Polacek <polacek@redhat.com>
675
676 PR c/67784
677 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
678 out of ...
679 (c_parser_for_statement): ... here.
680 (c_parser_if_statement): Use it.
681 (c_parser_switch_statement): Use it.
682 (c_parser_while_statement): Use it.
683
b02a5e26
MP
684 PR c/70791
685 * c-decl.c (pushdecl): Pass LOCUS down to warning.
686
477d4906
IV
6872016-04-20 Ilya Verbin <ilya.verbin@intel.com>
688
689 PR c++/69363
690 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
691 instead of c_finish_cilk_clauses.
692 * c-tree.h (c_finish_omp_clauses): Add new default argument.
693 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
694 floating-point variables in the linear clause for Cilk Plus.
695
fe37c7af
MM
6962016-04-18 Michael Matz <matz@suse.de>
697
698 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
699 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
700
949505a9
MP
7012016-04-15 Marek Polacek <polacek@redhat.com>
702
703 PR c/70671
704 * c-typeck.c (build_unary_op): Pass location down to error and
705 warning call.
706
dda1bf61
JJ
7072016-04-15 Jakub Jelinek <jakub@redhat.com>
708
709 PR c/70436
710 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
711 where needed.
712 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
713 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
714 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
715 Adjust c_parser_pragma callers.
716 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
717 caller.
718 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
719 c_parser_statement.
720 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
721 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
722 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
723 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
724 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
725 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
726 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
727 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
728 down where needed.
729 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
730 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
731 calls.
732
99cd9857
MP
7332016-04-13 Marek Polacek <polacek@redhat.com>
734
735 PR c/70436
736 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
737 adjust callers.
738 (c_parser_statement): Likewise.
739 (c_parser_c99_block_statement): Likewise.
740 (c_parser_while_statement): Likewise.
741 (c_parser_for_statement): Likewise.
742 (c_parser_if_body): Don't set IF_P here.
743 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
744 about dangling else here.
745 * c-tree.h (c_finish_if_stmt): Adjust declaration.
746 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
747 warn about dangling else here.
748
f13355da
MP
7492016-04-04 Marek Polacek <polacek@redhat.com>
750
751 PR c/70307
752 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
753
5fde6a45
MP
7542016-03-31 Marek Polacek <polacek@redhat.com>
755
756 PR c/70297
757 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
758
4bbf545b
DM
7592016-03-18 David Malcolm <dmalcolm@redhat.com>
760
761 PR c/70281
762 * c-parser.c (c_parser_postfix_expression): Set the source range
763 for uses of "__builtin_types_compatible_p".
764
fcc2b74f
JJ
7652016-03-17 Jakub Jelinek <jakub@redhat.com>
766
767 PR c/70280
768 * c-typeck.c (composite_type): Don't count void_list_node
769 into len, if the list is terminated by void_list_node, start
770 with void_list_node instead of NULL for newargs. Stop
771 at void_list_node.
772
ab4c578f
MP
7732016-03-16 Marek Polacek <polacek@redhat.com>
774
775 PR c/70093
776 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
777 nested functions returning VM types.
778
96b3c82d
CP
7792016-03-09 Cesar Philippidis <cesar@codesourcery.com>
780
781 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
782 when calling c_finish_omp_clauses.
783
29b9828f
BS
7842016-03-04 Bernd Schmidt <bschmidt@redhat.com>
785
786 PR c/69824
787 * c-decl.c (get_parm_info): Don't queue implicit function declarations
788 for later.
789
7ff6ca38
MP
7902016-03-04 Marek Polacek <polacek@redhat.com>
791
792 PR c/69798
793 * c-parser.c (c_parser_postfix_expression): Call
794 c_parser_cast_expression rather than c_parser_postfix_expression.
795
686e2237
JJ
7962016-03-01 Jakub Jelinek <jakub@redhat.com>
797
798 PR c/69796
799 PR c/69974
800 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
801 of incomplete decls to error_mark_node.
802
0b05329b
MP
8032016-02-24 Marek Polacek <polacek@redhat.com>
804
805 PR c/69819
806 * c-decl.c (finish_decl): Don't update the copy of the type of a
807 different decl type.
808
067fbd8b
JJ
8092016-02-23 Jakub Jelinek <jakub@redhat.com>
810
811 PR objc/69844
812 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
813 in id_kind reclassification.
814
bf14eba2
JJ
8152016-02-16 Jakub Jelinek <jakub@redhat.com>
816
817 PR c/69835
818 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
819
ba539195
JN
8202016-02-16 James Norris <jnorris@codesourcery.com>
821
822 PR c/64748
823 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
824
16595a1f
BS
8252016-02-12 Bernd Schmidt <bschmidt@redhat.com>
826
f48dfe98
BS
827 * c-decl.c (build_null_declspecs): Zero the entire struct.
828
16595a1f
BS
829 PR c/69522
830 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
831 callers changed. If nested_p is true, use it to call
832 finish_implicit_inits.
833 * c-tree.h (finish_implicit_inits): Declare.
834 * c-typeck.c (finish_implicit_inits): New function. Move code
835 from ...
836 (push_init_level): ... here.
837 (set_designator, process_init_element): Call finish_implicit_inits.
838
66756373
JJ
8392016-02-11 Jakub Jelinek <jakub@redhat.com>
840
841 PR c/69768
842 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
843 arguments for -Waddress warning.
844
1066e9b5
JJ
8452016-02-04 Jakub Jelinek <jakub@redhat.com>
846
847 PR c/69669
848 * c-decl.c (finish_enum): When honoring mode attribute,
849 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
850
3a5d2ba4
JJ
8512016-01-29 Jakub Jelinek <jakub@redhat.com>
852
853 PR debug/69518
854 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
855 all type variants, not just TYPE_MAIN_VARIANT.
856
cbdd8ae0
JJ
8572016-01-27 Jakub Jelinek <jakub@redhat.com>
858
859 PR debug/66869
860 * c-decl.c (c_write_global_declarations_1): Warn with
861 warn_unused_function if static prototype without definition
862 is not C_DECL_USED.
863
fa74a4bc
MP
8642016-01-27 Marek Polacek <polacek@redhat.com>
865
866 PR c/68062
867 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
868 to unsigned, if needed. Add -Wsign-compare warning.
869
13f92e8d
JJ
8702016-01-26 Jakub Jelinek <jakub@redhat.com>
871
872 PR tree-optimization/69483
873 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
874
cd8e73dc 8752016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
876
877 PR c/24293
878 * c-tree.h (incomplete_record_decls): Declare.
879 * c-parser.c (incomplete_record_decls): Define.
880 (c_parser_translation_unit): Iterate through incomplete_record_decls and
881 report error if any decl has zero size.
882 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
883 or enum type to incomplete_record_decls.
884
e6d6ec9e
TV
8852016-01-14 Tom de Vries <tom@codesourcery.com>
886
887 PR tree-optimization/68773
888 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
889 set force_output.
890
00083992
MP
8912016-01-14 Marek Polacek <polacek@redhat.com>
892
893 PR c/69262
894 * c-decl.c (grokdeclarator): Provide more information for invalid
895 array declarations.
896
7443cf13
DM
8972016-01-06 David Malcolm <dmalcolm@redhat.com>
898
899 * c-parser.c (c_parser_unary_expression): For dereferences, build
900 a combined location before calling build_indirect_ref, so that
901 error reports cover the full range, manually updating the c_expr
902 src_range.
903
6b131d5b
MP
9042016-01-06 Marek Polacek <polacek@redhat.com>
905
906 PR sanitizer/69099
907 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
908 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
909 NULL.
910
818ab71a
JJ
9112016-01-04 Jakub Jelinek <jakub@redhat.com>
912
913 Update copyright years.
914
2fe0a208
MP
9152016-01-04 Marek Polacek <polacek@redhat.com>
916
917 PR c/68908
918 * c-typeck.c (build_atomic_assign): Improve commentary. Add
919 optimization to use __atomic_fetch_* built-in if possible.
920
c7b48c8a
TS
9212015-12-23 Thomas Schwinge <thomas@codesourcery.com>
922
923 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
924 into...
925 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
926 all users.
927
fda5652f
MP
9282015-12-22 Marek Polacek <polacek@redhat.com>
929
930 PR c/69002
931 * c-typeck.c (build_component_ref): Warn when acessing elements of
932 atomic structures or unions.
933
745e411d
DM
9342015-12-21 David Malcolm <dmalcolm@redhat.com>
935
936 * c-typeck.c: Include "gcc-rich-location.h".
937 (build_binary_op): In the two places that call binary_op_error,
938 create a gcc_rich_location and populate it with the location of
939 the binary op and its two operands.
940
94c40e19
DM
9412015-12-16 David Malcolm <dmalcolm@redhat.com>
942
943 * c-parser.c (c_parser_statement_after_labels): When calling
944 c_finish_return, Use the return expression's location if it has
945 one, falling back to the location of the first token within it.
946 * c-typeck.c (c_finish_return): When issuing warnings about
947 the incorrect presence/absence of a return value, issue a note
948 showing the declaration of the function.
949
de67c4c3
DM
9502015-12-16 David Malcolm <dmalcolm@redhat.com>
951
952 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
953 to 4.
954 (c_parser_peek_nth_token): New function.
955 (c_parser_peek_conflict_marker): New function.
956 (c_parser_error): Detect conflict markers and report them as such.
957
a10704e1
DM
9582015-12-16 David Malcolm <dmalcolm@redhat.com>
959
960 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
961 to preserve range information for the primary expression
962 in the call to c_parser_postfix_expression_after_primary.
963
8062bca6
DM
9642015-12-16 David Malcolm <dmalcolm@redhat.com>
965
966 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
967 expression location, falling back on the first token location,
968 rather than always using the latter.
969
d06f8b75
MP
9702015-12-16 Marek Polacek <polacek@redhat.com>
971
972 PR c/64637
973 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
974 available.
975
2994fb91
MP
9762015-12-15 Marek Polacek <polacek@redhat.com>
977
978 PR c/68907
979 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
980 artificial decl.
981
a1b93f8d
DM
9822015-12-08 David Malcolm <dmalcolm@redhat.com>
983
984 * c-parser.c (c_parser_alignof_expression): Capture location of
985 closing parenthesis (if any), or of end of unary expression, and
986 use it to build a src_range for the expression.
987
46c6e1e2
DM
9882015-12-08 David Malcolm <dmalcolm@redhat.com>
989
990 PR c/68757
991 * c-parser.c (c_parser_get_builtin_args): Add
992 "out_close_paren_loc" param, and write back to it.
993 (c_parser_postfix_expression): Capture the closing
994 parenthesis location for RID_CHOOSE_EXPR,
995 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
996 RID_BUILTIN_SHUFFLE and use it to set the source range
997 for such expressions; within RID_BUILTIN_COMPLEX set
998 the underlying location.
999
66189108
MP
10002015-12-07 Marek Polacek <polacek@redhat.com>
1001
1002 PR c/68668
1003 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
1004 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
1005
f187980b
EB
10062015-12-04 Eric Botcazou <ebotcazou@adacore.com>
1007
1008 * c-tree.h (c_build_va_arg): Adjust prototype.
1009 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
1010 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
1011 parameter, adjust throughout and issue an error if EXPR is a component
1012 with reverse storage order.
1013
4250754e
JM
10142015-12-02 Jason Merrill <jason@redhat.com>
1015
1016 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
1017 (c_fully_fold_internal, decl_constant_value_for_optimization):
1018 Move from c-common.c.
1019 * c-tree.h: Declare decl_constant_value_for_optimization.
1020 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
1021
e9e32ee6
JM
10222015-12-02 Joseph Myers <joseph@codesourcery.com>
1023
1024 PR c/68162
1025 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
1026 following link from declarator to next declarator. Track original
1027 qualified type and pass it to c_build_qualified_type.
1028 * c-typeck.c (c_build_qualified_type): Add arguments
1029 orig_qual_type and orig_qual_indirect.
1030
ff7a55bf
TS
10312015-12-02 Thomas Schwinge <thomas@codesourcery.com>
1032
1033 * c-parser.c (c_parser_omp_clause_name)
1034 (c_parser_oacc_all_clauses): Alphabetical sorting.
1035
657e4e47
JJ
10362015-12-02 Jakub Jelinek <jakub@redhat.com>
1037
1038 PR c/68533
1039 * c-decl.c (get_parm_info): Use b->locus instead of input_location
1040 for diagnostics.
1041
37d5ad46
JB
10422015-12-01 Julian Brown <julian@codesourcery.com>
1043 Cesar Philippidis <cesar@codesourcery.com>
1044 James Norris <James_Norris@mentor.com>
1045
1046 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
1047 (c_parser_oacc_clause_use_device): New function.
1048 (c_parser_oacc_all_clauses): Add use_device support.
1049 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
1050 (c_parser_oacc_host_data): New function.
1051 (c_parser_omp_construct): Add host_data support.
1052 * c-tree.h (c_finish_oacc_host_data): Add prototype.
1053 * c-typeck.c (c_finish_oacc_host_data): New function.
1054 (c_finish_omp_clauses): Add use_device support.
1055
a4850ce9
JH
10562015-11-29 Jan Hubicka <hubicka@ucw.cz>
1057
1058 PR c/67106
1059 * c-decl.c: Set TYPE_PACKED in variants.
1060
b58d3df2
ML
10612015-11-27 Martin Liska <mliska@suse.cz>
1062
1063 PR c++/68312
1064 * c-array-notation.c (fix_builtin_array_notation_fn):
1065 Use release_vec_vec instead of vec::release.
1066 (build_array_notation_expr): Likewise.
1067 (fix_conditional_array_notations_1): Likewise.
1068 (fix_array_notation_expr): Likewise.
1069 (fix_array_notation_call_expr): Likewise.
1070
aec17bfe
JJ
10712015-11-27 Jakub Jelinek <jakub@redhat.com>
1072
1073 PR c/63326
1074 * c-parser.c (c_parser_compound_statement_nostart): If
1075 last_label is true, use pragma_stmt instead of pragma_compound
1076 as second c_parser_pragma argument.
1077 (c_parser_omp_ordered, c_parser_omp_target_update,
1078 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
1079 false as second argument to c_parser_skip_to_pragma_eol after
1080 diagnosing standalone directives used in pragma_stmt context.
1081
688c4de0
IV
10822015-11-24 Ilya Verbin <ilya.verbin@intel.com>
1083
1084 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
1085 with "if (ENABLE_OFFLOADING)".
1086
cbd03aee
DM
10872015-11-23 David Malcolm <dmalcolm@redhat.com>
1088
1089 PR objc/68438
1090 * c-parser.c (c_parser_postfix_expression): Set up source ranges
1091 for various Objective-C constructs: Class.name syntax,
1092 @selector(), @protocol(), @encode(), and [] message syntax.
1093
a87a86e1
DM
10942015-11-20 David Malcolm <dmalcolm@redhat.com>
1095
1096 PR 62314
1097 * c-typeck.c (should_suggest_deref_p): New function.
1098 (build_component_ref): Special-case POINTER_TYPE when
1099 generating a "not a structure of union" error message, and
1100 suggest a "->" rather than a ".", providing a fix-it hint.
1101
8ece8dfb
DM
11022015-11-19 David Malcolm <dmalcolm@redhat.com>
1103
1104 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
1105 candidate into a new function, find_closest_identifier.
1106
433068cc
MP
11072015-11-19 Marek Polacek <polacek@redhat.com>
1108
1109 PR c/68412
1110 * c-typeck.c (parser_build_binary_op): Properly handle
1111 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
1112
bef08b71
DM
11132015-11-17 David Malcolm <dmalcolm@redhat.com>
1114
1115 * c-parser.c (set_c_expr_source_range): Bulletproof both
1116 overloaded implementations against NULL expr->value.
1117 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1118 values.
1119 (c_parser_unary_expression): Likewise when handling addresses of
1120 labels.
1121 (c_parser_postfix_expression): Likewise for statement expressions,
1122 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1123 __builtin_va_arg, and for __builtin_offset_of.
1124 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1125 src_range using the range of the braced initializer.
1126 (c_parser_transaction_expression): Set src_range for "ret" to a
1127 sane pair of values.
1128
fff77217
KY
11292015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1130
1131 * c-parser.c (c_finish_omp_declare_simd): Look for
1132 "simd" attribute as well. Update error message.
1133
1d899da2
TS
11342015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1135
1136 * c-parser.c (c_parser_omp_declare_target): Adjust.
1137
e4606348
JJ
11382015-11-14 Jakub Jelinek <jakub@redhat.com>
1139
1140 * c-typeck.c (c_finish_omp_clauses): Don't mark
1141 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1142
3e636daf
MP
11432015-11-14 Marek Polacek <polacek@redhat.com>
1144
1145 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1146 * c-typeck.c: Likewise.
1147
ebedc9a3
DM
11482015-11-13 David Malcolm <dmalcolm@redhat.com>
1149
1150 * c-decl.c (warn_defaults_to): Pass line_table to
1151 rich_location ctor.
1152 * c-errors.c (pedwarn_c99): Likewise.
1153 (pedwarn_c90): Likewise.
1154 * c-parser.c (set_c_expr_source_range): New functions.
1155 (c_token::get_range): New method.
1156 (c_token::get_finish): New method.
1157 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1158 based on the range from the start of the LHS to the end of the
1159 RHS.
1160 (c_parser_conditional_expression): Likewise, based on the range
1161 from the start of the cond.value to the end of exp2.value.
1162 (c_parser_binary_expression): Call set_c_expr_source_range on
1163 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1164 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1165 based on the cast_loc through to the end of the expr.
1166 (c_parser_unary_expression): Likewise, based on the
1167 op_loc through to the end of op.
1168 (c_parser_sizeof_expression) Likewise, based on the start of the
1169 sizeof token through to either the closing paren or the end of
1170 expr.
1171 (c_parser_postfix_expression): Likewise, using the token range,
1172 or from the open paren through to the close paren for
1173 parenthesized expressions.
1174 (c_parser_postfix_expression_after_primary): Likewise, for
1175 various kinds of expression.
1176 * c-tree.h (struct c_expr): Add field "src_range".
1177 (c_expr::get_start): New method.
1178 (c_expr::get_finish): New method.
1179 (set_c_expr_source_range): New decls.
1180 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1181 on ret for prefix unary ops.
1182 (parser_build_binary_op): Likewise, running from the start of
1183 arg1.value through to the end of arg2.value.
1184
ec8b536f
MP
11852015-11-13 Marek Polacek <polacek@redhat.com>
1186
1187 PR c/68320
1188 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1189
277fe616
DM
11902015-11-13 David Malcolm <dmalcolm@redhat.com>
1191
1192 * c-typeck.c: Include spellcheck.h.
1193 (lookup_field_fuzzy_find_candidates): New function.
1194 (lookup_field_fuzzy): New function.
1195 (build_component_ref): If the field was not found, try using
1196 lookup_field_fuzzy and potentially offer a suggestion.
1197
6e232ba4
JN
11982015-11-12 James Norris <jnorris@codesourcery.com>
1199 Joseph Myers <joseph@codesourcery.com>
1200
1201 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1202 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1203 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1204 and PRAGMA_OMP_CLAUSE_LINK.
1205 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1206 and PRAGMA_OACC_CLAUSE_LINK.
1207 (OACC_DECLARE_CLAUSE_MASK): New definition.
1208 (c_parser_oacc_declare): New function.
1209
9be4f715
MP
12102015-11-12 Marek Polacek <polacek@redhat.com>
1211
1212 PR c/67784
1213 * c-parser.c (c_parser_for_statement): Reclassify the token in
1214 a correct scope.
1215
e78bede6
MP
12162015-11-11 Marek Polacek <polacek@redhat.com>
1217
1218 PR c/68107
1219 PR c++/68266
1220 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1221 checking the size of an array.
1222
69f293c9
AM
12232015-11-11 Andrew MacLeod <amacleod@redhat.com>
1224
1225 * c-array-notation.c: Remove unused header files.
1226 * c-aux-info.c: Likewise.
1227 * c-convert.c: Likewise.
1228 * c-decl.c: Likewise.
1229 * c-errors.c: Likewise.
1230 * c-lang.c: Likewise.
1231 * c-objc-common.c: Likewise.
1232 * c-parser.c: Likewise.
1233 * c-typeck.c: Likewise.
1234 * gccspec.c: Likewise.
1235
3a40d81d
NS
12362015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1237 Cesar Philippidis <cesar@codesourcery.com>
1238 James Norris <jnorris@codesourcery.com>
1239 Julian Brown <julian@codesourcery.com>
1240 Nathan Sidwell <nathan@codesourcery.com>
1241
1242 c/
1243 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1244 routine arg.
1245 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1246 (c_parser_pragma): Parse 'acc routine'.
1247 (OACC_ROUTINE_CLAUSE_MARK): Define.
1248 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1249
fc402eec
AA
12502015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1251
1252 PR debug/67192
1253 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1254 location of the backward-goto to the start of the loop body.
1255
f6b0b3db
AA
12562015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1257
1258 PR debug/67192
1259 * c-parser.c (c_parser_while_statement): Finish the loop before
1260 parsing ahead for misleading indentation.
1261 (c_parser_for_statement): Likewise.
1262
ee45a32d
EB
12632015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1264
1265 * c-decl.c (finish_struct): If the structure has reverse storage
1266 order, rewrite the type of array fields with scalar component. Call
1267 maybe_apply_pragma_scalar_storage_order on entry.
1268 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1269 errors on bit-fields and reverse SSO here and not...
1270 (c_mark_addressable): ...here.
1271 (output_init_element): Adjust call to initializer_constant_valid_p.
1272 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1273
8a645150
DM
12742015-11-06 David Malcolm <dmalcolm@redhat.com>
1275
1276 * c-decl.c (warn_defaults_to): Update for change in signature
1277 of diagnostic_set_info.
1278 * c-errors.c (pedwarn_c99): Likewise.
1279 (pedwarn_c90): Likewise.
1280 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1281 for textinfo::set_location.
1282
7a5e4956
CP
12832015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1284 Thomas Schwinge <thomas@codesourcery.com>
1285 James Norris <jnorris@codesourcery.com>
1286
1287 * c-parser.c (c_parser_omp_clause_name): Add support for
1288 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1289 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1290 default(none) in OpenACC.
1291 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1292 arguments.
1293 (c_parser_oacc_clause_tile): New function.
1294 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1295 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1296 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1297 TILE}.
1298 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1299 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1300 FIRSTPRIVATE}.
1301 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1302 (c_parser_oacc_update): Update the error message for missing clauses.
1303 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1304 and OMP_CLAUSE_INDEPENDENT.
1305
bfcfbfa0
MP
13062015-11-05 Marek Polacek <polacek@redhat.com>
1307
1308 PR c/68090
1309 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1310 deal with pre-evaluation on invalid types.
1311
e01d41e5
JJ
13122015-11-05 Jakub Jelinek <jakub@redhat.com>
1313 Ilya Verbin <ilya.verbin@intel.com>
1314
1315 * c-parser.c: Include context.h and gimple-expr.h.
1316 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1317 monotonic together with nonmonotonic.
1318 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1319 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1320 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1321 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1322 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1323 expressions on combined target teams before the target.
1324 (c_parser_omp_declare_target): If decl has "omp declare target" or
1325 "omp declare target link" attribute, and cgraph or varpool node already
1326 exists, then set corresponding flags. Call c_finish_omp_clauses
1327 in the parenthesized extended-list syntax case.
1328 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1329 declare target.
1330 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1331 on OMP_CLAUSE_REDUCTION array sections.
1332 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1333 into the constant offset, or for variable low-bound using
1334 POINTER_PLUS_EXPR. For structure element based array sections use
1335 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1336 (c_finish_omp_clauses): Drop generic_field_head, structure
1337 elements are now always mapped even as array section bases,
1338 diagnose same var in data sharing and mapping clauses. Diagnose if
1339 linear step on declare simd is neither a constant nor a uniform
1340 parameter. Look through POINTER_PLUS_EXPR for array section
1341 reductions. Diagnose the same var or function appearing multiple
1342 times on the same directive. Fix up wording for the to clause if t
1343 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1344 modifier on kinds other than dynamic or guided or nonmonotonic
1345 modifier together with ordered clause.
1346
4bf9e5a8
TS
13472015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1348 Chung-Lin Tang <cltang@codesourcery.com>
1349
1350 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1351
2adfab87
AM
13522015-10-29 Andrew MacLeod <amacleod@redhat.com>
1353
1354 * c-array-notation.c: Reorder #include's and remove duplicates.
1355 * c-aux-info.c: Likewise.
1356 * c-convert.c: Likewise.
1357 * c-decl.c: Likewise.
1358 * c-errors.c: Likewise.
1359 * c-lang.c: Likewise.
1360 * c-objc-common.c: Likewise.
1361 * c-parser.c: Likewise.
1362 * c-typeck.c: Likewise.
1363
e922069e
JW
13642015-10-26 Jim Wilson <jim.wilson@linaro.org>
1365
1366 PR debug/66068
1367 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1368 after calling build_qualified_type.
1369
765dd391
CP
13702015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1371 Thomas Schwinge <thomas@codesourcery.com>
1372 James Norris <jnorris@codesourcery.com>
1373 Joseph Myers <joseph@codesourcery.com>
1374 Julian Brown <julian@codesourcery.com>
1375 Bernd Schmidt <bschmidt@redhat.com>
1376
1377 * c-parser.c (c_parser_oacc_shape_clause): New.
1378 (c_parser_oacc_simple_clause): New.
1379 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1380 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1381
88bae6f4
TS
13822015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1383 James Norris <jnorris@codesourcery.com>
1384 Cesar Philippidis <cesar@codesourcery.com>
1385
1386 PR c/64765
1387 PR c/64880
1388 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1389 parameters, and handle these. Adjust all users.
1390 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1391 into...
1392 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1393 all users.
1394 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1395 declare functions.
1396 (c_finish_omp_construct): Declare function.
1397 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1398 Merge functions into...
1399 (c_finish_omp_construct): ... this new function.
1400
a8fc2579
RB
14012015-10-22 Richard Biener <rguenther@suse.de>
1402
1403 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1404 before folding a MINUS_EXPR.
1405
e9122ef6
MP
14062015-10-21 Marek Polacek <polacek@redhat.com>
1407
1408 PR c/68024
1409 * c-decl.c (start_function): Warn about vararg functions without
1410 a prototype.
1411
9f47c7e5
IE
14122015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1413
1414 * c-typeck.c (build_conditional_expr): Use boolean vector
1415 type for vector comparison.
1416 (build_vec_cmp): New.
1417 (build_binary_op): Use build_vec_cmp for comparison.
1418
fa60eeb9
MP
14192015-10-20 Marek Polacek <polacek@redhat.com>
1420
1421 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1422
2c7020eb
MP
14232015-10-20 Marek Polacek <polacek@redhat.com>
1424
1425 PR c/67964
1426 * c-parser.c (c_parser_attributes): Break out of the loop if the
1427 token after an attribute isn't a comma.
1428
d9a6bd32
JJ
14292015-10-13 Jakub Jelinek <jakub@redhat.com>
1430 Aldy Hernandez <aldyh@redhat.com>
1431
1432 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1433 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1434 (c_parser_omp_variable_list): Handle structure elements for
1435 map, to and from clauses. Handle array sections in reduction
1436 clause. Formatting fixes.
1437 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1438 if clause modifiers.
1439 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1440 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1441 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1442 c_parser_omp_clause_is_device_ptr): New functions.
1443 (c_parser_omp_clause_ordered): Parse optional parameter.
1444 (c_parser_omp_clause_reduction): Handle array reductions.
1445 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1446 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1447 functions.
1448 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1449 (c_parser_omp_clause_depend_sink): New function.
1450 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1451 (c_parser_omp_clause_map): Parse release/delete map kinds and
1452 optional always modifier.
1453 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1454 and c_finish_omp_clauses callers.
1455 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1456 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1457 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1458 (OMP_CRITICAL_CLAUSE_MASK): Define.
1459 (c_parser_omp_critical): Parse critical clauses.
1460 (c_parser_omp_for_loop): Handle doacross loops, adjust
1461 c_finish_omp_for and c_finish_omp_clauses callers.
1462 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1463 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1464 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1465 (c_parser_omp_for): Disallow ordered clause when combined with
1466 distribute. Disallow linear clause when combined with distribute
1467 and not combined with simd.
1468 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1469 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1470 parse clauses and if depend clause is found, don't parse a body.
1471 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1472 Allow target parallel without for after it.
1473 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1474 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1475 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1476 invalid kinds.
1477 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1478 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1479 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1480 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1481 functions.
1482 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1483 defaultmap and is_device_ptr clauses.
1484 (c_parser_omp_target): Parse target parallel and target simd. Set
1485 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1486 and target exit data. Diagnose invalid map kinds.
1487 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1488 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1489 construct.
1490 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1491 &omp_priv.
1492 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1493 (c_parser_omp_taskloop): New function.
1494 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1495 handle PRAGMA_OMP_TASKLOOP.
1496 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1497 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1498 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1499 Add IS_OMP argument, handle structure element bases, diagnose
1500 bitfields, pass IS_OMP recursively, diagnose known zero length
1501 array sections in depend clauses, handle array sections in reduction
1502 clause, diagnose negative length even for pointers.
1503 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1504 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1505 array sections in reduction clause, set
1506 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1507 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1508 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1509 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1510
21ba0cea
MP
15112015-10-06 Marek Polacek <polacek@redhat.com>
1512
1513 * c-parser.c (c_parser_statement_after_labels): Use
1514 protected_set_expr_location.
1515 (c_parser_omp_clause_num_gangs): Likewise.
1516 (c_parser_omp_clause_num_threads): Likewise.
1517 (c_parser_omp_clause_num_workers): Likewise.
1518 (c_parser_omp_clause_vector_length): Likewise.
1519 (c_parser_omp_clause_num_teams): Likewise.
1520 (c_parser_omp_clause_thread_limit): Likewise.
1521 * c-typeck.c (build_c_cast): Likewise.
1522 (c_cast_expr): Likewise.
1523
624d31fe
RS
15242015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1525
1526 * c-typeck.c (c_tree_equal): Use real_equal instead of
1527 REAL_VALUES_EQUAL.
1528
b8fd7909
JM
15292015-10-04 Jason Merrill <jason@redhat.com>
1530
1531 * c-parser.c (c_lex_one_token): Handle @synchronized.
1532 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1533 can change whether the function is transaction_safe.
1534
1c7485af
MP
15352015-10-02 Marek Polacek <polacek@redhat.com>
1536
1537 PR c/67730
1538 * c-typeck.c (convert_for_assignment): Use the expansion point
1539 location throughout.
1540
3e3b8d63
MP
15412015-10-02 Marek Polacek <polacek@redhat.com>
1542
1543 PR c/64249
1544 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1545 and pass it down to c_parser_if_statement.
1546 (c_parser_else_body): Add CHAIN parameter and pass it down to
1547 c_parser_statement_after_labels.
1548 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1549 duplicated if-else-if conditions.
1550
aabef2de
MP
15512015-10-01 Marek Polacek <polacek@redhat.com>
1552
1553 * c-typeck.c (convert_for_assignment): Improve commentary.
1554
de8ddd5f
MP
15552015-09-30 Marek Polacek <polacek@redhat.com>
1556
1557 PR c/67730
1558 * c-typeck.c (c_finish_return): Use the expansion point location for
1559 certain "return with value" warnings.
1560
c4914de6
MLI
15612015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1562
1563 * c-parser.c (pragma_lex): Add loc argument.
1564
0e36f5c7
MP
15652015-09-15 Marek Polacek <polacek@redhat.com>
1566
1567 PR c/67580
1568 * c-decl.c (tag_exists_p): New function.
1569 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1570 struct/union/enum keywords are missing.
1571 * c-tree.h (tag_exists_p): Declare.
1572
2f3bb934
MP
15732015-09-15 Marek Polacek <polacek@redhat.com>
1574
1575 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1576 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1577 Return NULL_TREE instead of 0.
1578 (lookup_name): Return NULL_TREE instead of 0.
1579 (lookup_name_in_scope): Likewise.
1580 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1581 (parser_xref_tag): Use false instead of 0.
1582 (start_struct): Use true instead of 1.
1583 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1584
aa256c4a
MP
15852015-09-14 Marek Polacek <polacek@redhat.com>
1586
1587 * c-typeck.c (set_nonincremental_init_from_string): Use
1588 HOST_WIDE_INT_M1U when shifting a negative value.
1589
dbb68221
MW
15902015-09-09 Mark Wielaard <mjw@redhat.com>
1591
1592 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1593 parm against NULL.
1594
a8a098ac
JJ
15952015-09-10 Jakub Jelinek <jakub@redhat.com>
1596
1597 PR c/67502
1598 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1599 into OMP_FOR_PRE_BODY rather than before the loop.
1600
f4b189d5
JJ
16012015-09-09 Jakub Jelinek <jakub@redhat.com>
1602
0bb99c11
JJ
1603 PR c/67501
1604 * c-parser.c (c_parser_oacc_all_clauses,
1605 c_parser_omp_all_clauses): Remove invalid clause from
1606 list of clauses even if parser->error is set.
1607
fce5e5e3
JJ
1608 PR c/67500
1609 * c-parser.c (c_parser_omp_clause_aligned,
1610 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1611 test for errors.
1612 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1613 error_mark_node.
1614
f4b189d5
JJ
1615 PR c/67495
1616 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1617 instead of c_parser_unary_expression. If the result is !lvalue_p,
1618 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1619
b2aaf235
MP
16202015-09-04 Marek Polacek <polacek@redhat.com>
1621
1622 PR sanitizer/67279
1623 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1624
1807ffc1
MS
16252015-09-03 Martin Sebor <msebor@redhat.com>
1626
1627 PR c/66516
8b652e65
JJ
1628 * c-typeck.c (convert_arguments, parser_build_unary_op,
1629 build_conditional_expr, c_cast_expr, convert_for_assignment,
1630 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1631 reject_gcc_builtin.
1632 (c_decl_implicit): Define.
1633
d04ff417
MP
16342015-09-02 Marek Polacek <polacek@redhat.com>
1635
1636 PR c/67432
1637 * c-parser.c (c_parser_enum_specifier): Give a better error for
1638 an empty enum.
1639
a79683d5
TS
16402015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1641
1642 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1643
191a6b94
MP
16442015-08-12 Marek Polacek <polacek@redhat.com>
1645
1646 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1647 LOC to it.
1648
420a9d9b
MP
16492015-08-03 Marek Polacek <polacek@redhat.com>
1650
1651 PR c/67088
1652 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1653 Use it.
1654 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1655
992118a1
PP
16562015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1657
1658 * c-parser.c (c_parser_if_body): Take token_indent_info
1659 argument. Call warn_for_misleading_indentation even when the
1660 body is a semicolon. Extract token_indent_infos corresponding
1661 to the guard, body and next tokens. Adjust call to
1662 warn_for_misleading_indentation accordingly.
1663 (c_parser_else_body): Likewise.
1664 (c_parser_if_statement): Likewise.
1665 (c_parser_while_statement): Likewise.
1666 (c_parser_for_statement): Likewise.
1667
46308474
LFSM
16682015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1669 Manuel López-Ibáñez <manu@gcc.gnu.org>
1670
1671 * c-decl.c (get_parm_info): Remove static var. Update warning
1672 message.
1673
05b28fd6
MP
16742015-07-27 Marek Polacek <polacek@redhat.com>
1675
1676 PR c++/66555
1677 PR c/54979
1678 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1679
451b5e48
MP
16802015-07-20 Marek Polacek <polacek@redhat.com>
1681
1682 PR c++/55095
1683 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1684 (build_binary_op): Warn about left shift overflows.
1685
1916bcb5
AM
16862015-07-09 Andrew MacLeod <amacleod@redhat.com>
1687
1688 * c-array-notation.c: Adjust includes for flags.h changes.
1689 * c-objc-common.c: Likewise.
1690
c7131fb2
AM
16912015-07-07 Andrew MacLeod <amacleod@redhat.com>
1692
1693 * c-array-notation.c: Adjust includes.
1694 * c-aux-info.c: Likewise.
1695 * c-convert.c: Likewise.
1696 * c-decl.c: Likewise.
1697 * c-errors.c: Likewise.
1698 * c-lang.c: Likewise.
1699 * c-objc-common.c: Likewise.
1700 * c-parser.c: Likewise.
1701 * c-typeck.c: Likewise.
1702
da2e71c9
MLI
17032015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1704
1705 PR fortran/66605
1706 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1707
b155cfd9
MP
17082015-06-29 Marek Polacek <polacek@redhat.com>
1709
1710 PR c/66322
1711 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1712 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1713 about -Wswitch-bool here.
1714 (do_case): Update c_add_case_label call.
1715 (c_finish_case): Update c_do_switch_warnings call.
1716
31521951
MP
17172015-06-27 Marek Polacek <polacek@redhat.com>
1718
1719 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1720
22d03525
MP
17212015-06-26 Marek Polacek <polacek@redhat.com>
1722
1723 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1724 INDIRECT_REF_P.
1725 * c-typeck.c (array_to_pointer_conversion): Likewise.
1726 (build_unary_op): Likewise.
1727 (c_finish_return): Likewise.
1728
f0889939
AM
17292015-06-25 Andrew MacLeod <amacleod@redhat.com>
1730
1731 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1732 * c-parser.c: Likewise.
1733
8d67ee55
RS
17342015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1735
1736 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1737 instead of pointer_hash.
1738 (detect_field_duplicates): Likewise.
1739
0ae9bd27
MP
17402015-06-25 Marek Polacek <polacek@redhat.com>
1741
1742 * c-array-notation.c: Use VAR_P throughout.
1743 * c-decl.c: Likewise.
1744 * c-objc-common.c: Likewise.
1745 * c-parser.c: Likewise.
1746 * c-typeck.c: Likewise.
1747
62f9079a
MP
17482015-06-25 Marek Polacek <polacek@redhat.com>
1749
1750 * c-decl.c: Use is_global_var throughout.
1751 * c-parser.c: Likewise.
1752 * c-typeck.c: Likewise.
1753
abb226c9
AM
17542015-06-17 Andrew MacLeod <amacleod@redhat.com>
1755
1756 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1757 * c-aux-info.c: Likewise.
1758 * c-convert.c: Likewise.
1759 * c-decl.c: Likewise.
1760 * c-errors.c: Likewise.
1761 * c-lang.c: Likewise.
1762 * c-objc-common.c: Likewise.
1763 * c-parser.c: Likewise.
1764 * c-typeck.c: Likewise.
1765
8cbababc
JH
17662015-06-11 Jan Hubicka <hubicka@ucw.cz>
1767
1768 PR middle-end/66325
1769 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1770 variants.
1771
a0349665
PMR
17722015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1773
1774 * c-decl.c (pop_scope): Register the main translation unit
1775 through the new debug hook.
1776
13fdf2e2
AM
17772015-06-08 Andrew MacLeod <amacleod@redhat.com>
1778
1779 * c-array-notation.c : Adjust include files.
1780 * c-aux-info.c : Likewise.
1781 * c-convert.c : Likewise.
1782 * c-decl.c : Likewise.
1783 * c-errors.c : Likewise.
1784 * c-lang.c : Likewise.
1785 * c-lang.h : Likewise.
1786 * c-objc-common.c : Likewise.
1787 * c-parser.c : Likewise.
1788 * c-typeck.c : Likewise.
1789
d7438551
AH
17902015-06-05 Aldy Hernandez <aldyh@redhat.com>
1791
1792 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1793 immediately clobber it.
1794 (c_write_global_declarations_1): Remove call to
1795 check_global_declaration_1.
1796 (c_write_global_declarations_2): Remove.
1797 (c_write_final_cleanups): Rename from c_write_global_declarations.
1798 Remove call to finalize_compilation_unit.
1799 Remove calls to debugging hooks.
1800 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1801 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1802 * c-tree.h: Remove c_write_global_declarations.
1803
ecb9f223
AM
18042015-06-04 Andrew MacLeod <amacleod@redhat.com>
1805
1806 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1807 * c-aux-info.c: Likewise.
1808 * c-convert.c: Likewise.
1809 * c-decl.c: Likewise.
1810 * c-errors.c: Likewise.
1811 * c-lang.c: Likewise.
1812 * c-objc-common.c: Likewise.
1813 * c-parser.c: Likewise.
1814 * c-typeck.c: Likewise.
1815
9482b620
MP
18162015-06-04 Marek Polacek <polacek@redhat.com>
1817
1818 PR c/66341
1819 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1820 it is a lvalue.
1821
bc51ace3
PK
18222015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1823
1824 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1825 Warn for empty struct.
1826 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1827
ea5b45b6
AT
18282015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1829
1830 * c-decl.c (start_function): Call plugin before parsing.
1831 (finish_function): Call plugin after parsing.
1832
c2d47482
PK
18332015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1834
1835 PR c/49551
1836 * c-decl.c (merge_decls): Merge DECL_COMMON.
1837
a95492ab
JW
18382015-05-22 Jim Wilson <jim.wilson@linaro.org>
1839
1840 * Make-lang.in (check_gcc_pallelize): Define.
1841
fd5c817a
MP
18422015-05-22 Marek Polacek <polacek@redhat.com>
1843
1844 PR c/47043
1845 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1846 attributes.
1847
c7b70a3c
MP
18482015-05-21 Marek Polacek <polacek@redhat.com>
1849
1850 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1851 DECL_BUILT_IN.
1852
21b634ae
MP
18532015-05-20 Marek Polacek <polacek@redhat.com>
1854
1855 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1856 * c-typeck.c: Likewise.
1857
296a8c2f
MP
18582015-05-19 Marek Polacek <polacek@redhat.com>
1859
1860 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1861
41b37d5e
JJ
18622015-05-19 Jakub Jelinek <jakub@redhat.com>
1863
1864 PR middle-end/66199
1865 * c-parser.c (c_parser_omp_for_loop): Don't add
1866 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1867 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1868 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1869 constructs.
1870
fab27f52
MM
18712015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1872
1873 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 1874 swaps.
fab27f52 1875
40de31cf
MLI
18762015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1877
1878 PR fortran/44054
1879 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1880 accessor function.
1881
3aa3c9fc
MP
18822015-05-14 Marek Polacek <polacek@redhat.com>
1883
1884 PR c/66066
1885 PR c/66127
1886 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1887 rather than with 0.
1888
c3388e62
DM
18892015-05-12 David Malcolm <dmalcolm@redhat.com>
1890
1891 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1892 to add a call to warn_for_misleading_indentation.
1893 (c_parser_else_body): Likewise, adding param "else_loc".
1894 (c_parser_if_statement): Check for misleading indentation.
1895 (c_parser_while_statement): Likewise.
1896 (c_parser_for_statement): Likewise.
1897
755e528f
MP
18982015-05-08 Marek Polacek <polacek@redhat.com>
1899
1900 PR c/64918
1901 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1902 (output_init_element): Likewise.
1903
0173bd2a
MP
19042015-05-07 Marek Polacek <polacek@redhat.com>
1905
1906 PR c/65179
1907 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1908 value.
1909
9babc352
MP
19102015-04-30 Marek Polacek <polacek@redhat.com>
1911
1912 * c-typeck.c (set_init_label): Call error_at instead of error and
1913 pass LOC to it.
1914
ac9f18db
MP
1915 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1916 the type of a decl.
1917
ec3fba51
MP
1918 * c-typeck.c (c_build_va_arg): Clarify the error message.
1919
b811915d
TS
19202015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1921
1922 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1923 OMP_STANDALONE_CLAUSES.
1924
f3075008
MP
19252015-04-28 Marek Polacek <polacek@redhat.com>
1926
1927 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1928
4e81b788
MP
19292015-04-28 Marek Polacek <polacek@redhat.com>
1930
1931 PR c/65901
1932 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1933
6c1db78e
MP
19342015-04-25 Marek Polacek <polacek@redhat.com>
1935
1936 PR c/52085
1937 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1938 attribute.
1939
5c4abbb8
MP
19402015-04-23 Marek Polacek <polacek@redhat.com>
1941
1942 PR c/65345
1943 * c-decl.c (set_labels_context_r): New function.
1944 (store_parm_decls): Call it via walk_tree_without_duplicates.
1945 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1946 instead of create_tmp_var. Build TARGET_EXPR instead of
1947 COMPOUND_EXPR.
1948 (build_atomic_assign): Use create_tmp_var_raw instead of
1949 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1950
06aca1d5
IV
19512015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1952
1953 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1954 (c_parser_omp_target_update): Add missed %> to error_at ().
1955
8fba1830
BRF
19562015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1957
1958 PR target/55143
1959 * c-decl.c (c_default_pointer_mode): Remove definition.
1960 * c-tree.h (c_default_pointer_mode): Remove declaration.
1961
62021f64
TB
19622015-03-27 Tobias Burnus <burnus@net-b.de>
1963
1964 PR c/65586
1965 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1966 error out.
1967 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1968 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1969 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1970
9b65e171
JJ
19712015-03-19 Jakub Jelinek <jakub@redhat.com>
1972
1973 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1974 attribute for DECL_EXTERNAL VAR_DECLs.
1975
17958621
JJ
19762015-03-11 Jakub Jelinek <jakub@redhat.com>
1977
1978 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1979 argument.
1980
7ccb1a11
JJ
19812015-03-10 Jakub Jelinek <jakub@redhat.com>
1982
1983 PR c/65120
1984 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1985 before preparing arguments to warn_logical_not_parentheses.
1986
01177669
JJ
19872015-03-09 Jakub Jelinek <jakub@redhat.com>
1988
1989 PR c/65120
1990 * c-typeck.c (parser_build_binary_op): Don't warn for
1991 !!x == y or !b == y where b is _Bool.
1992
802ac282
MP
19932015-03-09 Marek Polacek <polacek@redhat.com>
1994
1995 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1996 * c-decl.c (grokdeclarator): Likewise.
1997 * c-typeck.c (build_binary_op): Likewise.
1998
e5165b60
MP
19992015-02-27 Marek Polacek <polacek@redhat.com>
2000
2001 PR c/65228
2002 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
2003
065d214c
MP
20042015-02-14 Marek Polacek <polacek@redhat.com>
2005
2006 PR c/64768
2007 * c-decl.c (grokdeclarator): Set the range of a flexible array member
2008 declared through a typedef name.
2009
e5d9235b
MP
20102015-02-13 Marek Polacek <polacek@redhat.com>
2011
2012 PR c/65050
2013 * c-decl.c (grokdeclarator): Print also the type when giving
2014 the error message about array's incomplete element type.
2015
fa01ffcc
JJ
20162015-02-11 Jakub Jelinek <jakub@redhat.com>
2017
2018 PR c/64824
2019 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
2020 check in the POP macro.
2021
c3e38a03
MP
20222015-02-09 Marek Polacek <polacek@redhat.com>
2023
2024 PR c/64856
2025 * c-typeck.c (process_init_element): Don't always wrap
2026 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
2027 initializing a range of elements.
2028
4886ec8e
JJ
20292015-02-04 Jakub Jelinek <jakub@redhat.com>
2030
2031 PR c/64824
2032 PR c/64868
2033 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
2034
c3e38a03 20352015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
2036
2037 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
2038 processing enum declaration.
2039
7b33f0c8
MP
20402015-01-29 Marek Polacek <polacek@redhat.com>
2041
2042 PR c/64709
2043 * c-typeck.c (pop_init_level): If constructor_elements has
2044 exactly one element with integer_zerop value, set constructor_zeroinit
2045 to 1. Remove braces around warning_init call.
2046
dea63e49
JJ
20472015-01-27 Jakub Jelinek <jakub@redhat.com>
2048
2049 PR c/64766
2050 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
2051 of FUNCTION_DECLs with error_mark_node.
2052
d38f7dce
JJ
20532015-01-26 Jakub Jelinek <jakub@redhat.com>
2054
2055 PR c/64778
2056 * c-typeck.c (convert_arguments): Return -1 if there are
2057 error_args, even if we've diagnosed too many arguments.
2058
cbf5d0e7
RB
20592015-01-21 Richard Biener <rguenther@suse.de>
2060
2061 PR middle-end/64313
2062 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
2063 for builtins the user declared correctly.
2064
41dbbb37
TS
20652015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2066 Bernd Schmidt <bernds@codesourcery.com>
2067 Cesar Philippidis <cesar@codesourcery.com>
2068 James Norris <jnorris@codesourcery.com>
2069 Jakub Jelinek <jakub@redhat.com>
2070 Ilmir Usmanov <i.usmanov@samsung.com>
2071
2072 * c-parser.c: Include "gomp-constants.h".
2073 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
2074 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
2075 Use OMP_CLAUSE_SET_MAP_KIND.
2076 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
2077 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
2078 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
2079 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
2080 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
2081 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
2082 "copyout", "create", "delete", "deviceptr", "gang", "host",
2083 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
2084 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
2085 "present_or_create", "pcreate", "seq", "self", "vector",
2086 "vector_length", "wait", "worker".
2087 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
2088 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
2089 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
2090 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
2091 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
2092 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
2093 (c_parser_oacc_data_clause_deviceptr)
2094 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
2095 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
2096 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
2097 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
2098 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
2099 (c_parser_oacc_parallel, c_parser_oacc_update)
2100 (c_parser_oacc_wait): New functions.
2101 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
2102 (c_finish_oacc_data): New prototypes.
2103 * c-typeck.c: Include "gomp-constants.h".
2104 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
2105 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
2106 OMP_CLAUSE_SET_MAP_KIND.
2107 (c_finish_oacc_parallel, c_finish_oacc_kernels)
2108 (c_finish_oacc_data): New functions.
2109 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
2110 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
2111 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
2112 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
2113 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
2114 GOMP_MAP_FORCE_DEVICEPTR.
2115
adfac8df
JJ
21162015-01-09 Michael Collison <michael.collison@linaro.org>
2117
2118 * c-array-notation.c: Include hash-set.h, machmode.h,
2119 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2120 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2121 * c-aux-info.c: Ditto.
2122 * c-convert.c: Ditto.
2123 * c-decl.c: Ditto.
2124 * c-errors.c: Ditto.
2125 * c-lang.c: Dittoxs.
2126 * c-objc-common.c: Ditto.
2127 * c-parser.c: Ditto.
2128 * c-typeck.c: Include hash-set.h, machmode.h,
2129 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2130 fold-const.h, wide-int.h, inchash.h, real.h and
2131 fixed-value.h due to flattening of tree.h.
2132
2cc901dc
MP
21332015-01-07 Marek Polacek <polacek@redhat.com>
2134
2135 PR c/64417
2136 * c-typeck.c (process_init_element): Disallow initialization of
2137 a flexible array member with a string constant if the structure
2138 is in an array.
2139
5624e564
JJ
21402015-01-05 Jakub Jelinek <jakub@redhat.com>
2141
e5341100
JJ
2142 PR sanitizer/64344
2143 * c-typeck.c (convert_for_assignment, c_finish_return): For
2144 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2145 types also set in_late_binary_op around convert call.
2146 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2147 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2148 result on expr as last argument to ubsan_instrument_float_cast,
2149 if in_late_binary_op, don't use c_save_expr but save_expr.
2150
5624e564
JJ
2151 Update copyright years.
2152
5bd012f8
MP
21532015-01-05 Marek Polacek <polacek@redhat.com>
2154
2155 PR c/64423
2156 * c-typeck.c (build_array_ref): Pass loc down to
2157 warn_array_subscript_with_type_char.
2158
3f8257db 21592014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2160
2161 * c-typeck.c: New behavious for pointers to arrays with qualifiers
2162 (common-pointer-type): For pointers to arrays take qualifiers from
2163 element type.
2164 (build_conditional_expr): Add warnings for lost qualifiers.
2165 (comp-target-types): Allow pointers to arrays with different qualifiers.
2166 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
2167 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
2168 to PEDWARN_FOR_QUALIFIERS.
2169
8f94a8c4
JJ
21702014-12-17 Jakub Jelinek <jakub@redhat.com>
2171
2172 PR sanitizer/64289
2173 * c-convert.c: Include ubsan.h.
2174 (convert): For real -> integral casts and
2175 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2176 instead instrument the float cast directly.
2177
b731b390
JJ
21782014-11-29 Jakub Jelinek <jakub@redhat.com>
2179
2180 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2181 c_finish_stmt_expr): Remove NULL last argument from
2182 create_tmp_var_raw and create_tmp_var calls.
2183 * c-array-notation.c (fix_builtin_array_notation_fn,
2184 build_array_notation_expr, fix_conditional_array_notations_1,
2185 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2186
541e35a6
MP
21872014-11-28 Marek Polacek <polacek@redhat.com>
2188
2189 PR c/63862
2190 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2191 convert the right operand to integer type.
2192
b286be94
MP
21932014-11-25 Marek Polacek <polacek@redhat.com>
2194
2195 PR c/63877
2196 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2197 for inline functions.
2198
aa7da51a
JJ
21992014-11-21 Jakub Jelinek <jakub@redhat.com>
2200
2201 PR target/63764
2202 * c-typeck.c (build_array_ref): Adjust
2203 convert_vector_to_pointer_for_subscript caller. If it returns true,
2204 call non_lvalue_loc on the result.
2205
d876207f
RB
22062014-11-11 Richard Biener <rguenther@suse.de>
2207
2208 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2209 to true.
2210
e5e44252
AK
22112014-11-10 Andi Kleen <ak@linux.intel.com>
2212
2213 PR c/60804
2214 * c-parser.c (c_parser_statement_after_labels): Call
2215 check_no_cilk.
2216 (c_parser_if_statement): Dito.
2217 (c_parser_switch_statement): Dito.
2218 (c_parser_while_statement): Dito.
2219 (c_parser_do_statement): Dito.
2220 (c_parser_for_statement): Dito.
2221 * c-typeck.c (c_finish_loop): Dito.
2222
13c21655
PC
22232014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2224
2225 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2226 OPT_Wshift_count_overflow in the warnings.
2227
2d51fcef
MP
22282014-10-30 Marek Polacek <polacek@redhat.com>
2229
2230 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2231 print the stripped version as well, if they're not the same.
2232
ef4bddc2
RS
22332014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2234
2235 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2236 machine_mode.
2237
c582198b
AM
22382014-10-28 Andrew MacLeod <amacleod@redhat.com>
2239
2240 * c-decl.c: Adjust include files.
2241 * c-parser.c: Ditto.
2242
ddc8de03
PM
22432014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2244 Tom Tromey <tromey@redhat.com>
2245
2246 * c-tree.h (enum c_oracle_request): New.
2247 (c_binding_oracle_function): New typedef.
2248 (c_binding_oracle, c_pushtag, c_bind): Declare.
2249 * c-decl.c (c_binding_oracle): New global.
2250 (I_SYMBOL_CHECKED): New macro.
2251 (i_symbol_binding): New function.
2252 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2253 (I_TAG_CHECKED): New macro.
2254 (i_tag_binding): New function.
2255 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2256 (I_LABEL_CHECKED): New macro.
2257 (i_label_binding): New function.
2258 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2259 (c_print_identifier): Save and restore c_binding_oracle.
2260 (c_pushtag, c_bind): New functions.
2261
60393bbc
AM
22622014-10-27 Andrew MacLeod <amacleod@redhat.com>
2263
2264 * c-typeck.c: Adjust include files.
2265
d723bb7c
MLI
22662014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2267
2268 PR c++/53061
2269 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2270 initialization here...
2271 (c_initialize_diagnostics): ... but here. Set defaults after
2272 building pretty-printer.
2273
1bc5a451
MP
22742014-10-23 Marek Polacek <polacek@redhat.com>
2275
2276 PR c/63626
2277 * c-decl.c (pop_scope): Don't print warning in external_scope.
2278
4435bb92
MP
22792014-10-19 Marek Polacek <polacek@redhat.com>
2280
2281 PR c/63567
2282 * c-typeck.c (output_init_element): Allow initializing objects with
2283 static storage duration with compound literals even in C99 and add
2284 pedwarn for it.
2285
7278465e
MP
22862014-10-17 Marek Polacek <polacek@redhat.com>
2287
2288 PR c/63567
2289 * c-typeck.c (digest_init): Allow initializing objects with static
2290 storage duration with compound literals even in C99 and add pedwarn
2291 for it.
2292
d9b7be2e
MP
22932014-10-17 Marek Polacek <polacek@redhat.com>
2294
2295 PR c/63543
2296 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2297 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2298 error multiple times. Print the type.
2299
f406ae1f
MP
23002014-10-17 Marek Polacek <polacek@redhat.com>
2301
2302 PR c/63549
2303 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2304 type.
2305
92574c7c
MP
23062014-10-17 Marek Polacek <polacek@redhat.com>
2307
2308 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2309 (start_function): Use OPT_Wimplicit_int instead of 0.
2310 (store_parm_decls_oldstyle): Likewise.
2311
1bc4a978
MT
23122014-10-17 Alan Modra <amodra@gmail.com>
2313
2314 PR middle-end/61848
2315 * c-decl.c (merge_decls): Don't merge section name or tls model
2316 to newdecl symtab node, instead merge to olddecl. Override
2317 existing olddecl section name. Set tls_model for all thread-local
2318 vars, not just OMP thread-private ones. Remove incorrect comment.
2319
83685514
AM
23202014-10-16 Andrew MacLeod <amacleod@redhat.com>
2321
2322 * c-decl.c: Adjust include files.
2323
78a7c317
DD
23242014-10-14 DJ Delorie <dj@redhat.com>
2325
2326 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2327 (c_token_starts_typename): Check all __intN, not just __int128.
2328 (c_token_starts_declspecs): Likewise.
2329 (c_parser_declspecs): Likewise.
2330 (c_parser_attribute_any_word): Likewise.
2331 (c_parser_objc_selector): Likewise.
2332 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2333 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2334 is specified.
2335 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2336 __int128.
2337 (finish_declspecs): Likewise.
2338
74d98c1e
AB
23392014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2340
2341 * c-parser.c (c_parser_all_labels): New function to replace
2342 the duplicate code.
2343 (c_parser_statement): Call the new function.
2344
84937de2
MP
23452014-10-09 Marek Polacek <polacek@redhat.com>
2346
2347 PR c/63480
2348 * c-typeck.c (pop_init_level): Don't warn about initializing
2349 with { }.
2350
0382aaa0
MP
23512014-10-07 Marek Polacek <polacek@redhat.com>
2352
2353 PR c/59717
2354 * c-decl.c (header_for_builtin_fn): New function.
2355 (implicitly_declare): Suggest which header to include.
2356
7a0ca710
MP
23572014-10-07 Marek Polacek <polacek@redhat.com>
2358
2359 * c-convert.c (convert): Use error_operand_p.
2360 * c-typeck.c (require_complete_type): Likewise.
2361 (really_atomic_lvalue): Likewise.
2362 (digest_init): Likewise.
2363 (handle_omp_array_sections_1): Likewise.
2364
6bc8a126
MP
23652014-10-03 Marek Polacek <polacek@redhat.com>
2366
2367 PR c/63453
2368 * c-decl.c (pop_scope): Don't warn about "inline function declared
2369 but never defined" for functions marked with gnu_inline attribute.
2370
d90c0a59
JJ
23712014-09-25 Jakub Jelinek <jakub@redhat.com>
2372
2373 PR c++/63249
2374 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2375 on low_bound and length.
2376
083e891e
MP
23772014-09-24 Marek Polacek <polacek@redhat.com>
2378
2379 PR c/61405
2380 PR c/53874
2381 * c-parser.c: Don't define CPP_KEYWORD.
2382 (c_parser_switch_statement): Pass original type to c_finish_case.
2383 * c-tree.h (c_finish_case): Update declaration.
2384 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2385 conditionally to c_do_switch_warnings.
2386
8d95fe25
MP
23872014-09-03 Marek Polacek <polacek@redhat.com>
2388
2389 PR c/62024
2390 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2391 conversions.
2392
9a771876
JJ
23932014-09-02 Jakub Jelinek <jakub@redhat.com>
2394 Balaji V. Iyer <balaji.v.iyer@intel.com>
2395 Igor Zamyatin <igor.zamyatin@intel.com>
2396
2397 * c-parser.c (c_parser_cilk_for): New function.
2398 (c_parser_cilk_grainsize): Likewise.
2399 (c_get_temp_regvar): Likewise.
2400 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2401 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2402 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2403 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2404 case.
2405
b7679d96
CG
24062014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2407
2408 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2409 with using HOST_WIDE_INT without truncation to 'int'
2410
59ea0364
MP
24112014-08-22 Marek Polacek <polacek@redhat.com>
2412
2413 PR c++/62199
2414 * c-typeck.c (parser_build_binary_op): Adjust call to
2415 warn_logical_not_parentheses.
2416
671a475e
IZ
24172014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2418
2419 PR other/62008
2420 * c-parser.c (c_parser_array_notation): Check for correct
2421 type of an array added.
2422
04159acf
MP
24232014-08-19 Marek Polacek <polacek@redhat.com>
2424
2425 PR c++/62153
2426 * c-typeck.c (build_binary_op): If either operand of a comparison
2427 is a boolean expression, call maybe_warn_bool_compare.
2428
c77935ee
PP
24292014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2430
2431 PR c/45584
2432 * c-typeck.c (build_c_cast): Do a conversion even when the
2433 TYPE_MAIN_VARIANTs are the same.
2434
35aff4fb
MP
24352014-08-19 Marek Polacek <polacek@redhat.com>
2436
2437 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2438 pedwarn_c99 instead of pedwarn.
2439 (grokfield): Likewise.
2440 (warn_defaults_to): New function.
2441 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2442 Unconditionally call pedwarn_c99 instead of pedwarn.
2443 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2444 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2445 check flag_isoc11 before.
2446 * c-errors.c (pedwarn_c99): Change the return type to bool.
2447 Handle -Wc99-c11-compat.
2448 * c-parser.c (disable_extension_diagnostics): Handle
2449 warn_c99_c11_compat.
2450 (restore_extension_diagnostics): Likewise.
2451 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2452 instead of pedwarn, don't check flag_isoc11 before.
2453 (c_parser_declspecs): Likewise.
2454 (c_parser_alignas_specifier): Likewise.
2455 (c_parser_alignof_expression): Likewise.
2456 (c_parser_generic_selection): Likewise.
2457 * c-tree.h (pedwarn_c99): Update declaration.
2458 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2459 of pedwarn_c99.
2460
177cce46
MP
24612014-08-19 Marek Polacek <polacek@redhat.com>
2462
2463 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2464 to pedwarn_c90.
2465 * c-errors.c: Include "opts.h".
2466 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2467 * c-parser.c (disable_extension_diagnostics): Handle negative value
2468 of warn_c90_c99_compat, too.
2469 (restore_extension_diagnostics): Likewise.
2470 (c_parser_compound_statement_nostart): Pass
2471 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2472
6dc99c33
MP
24732014-08-12 Marek Polacek <polacek@redhat.com>
2474
2475 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2476 Add pedwarn.
2477 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2478 Likewise.
2479 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2480
3f8257db 24812014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
2482
2483 PR c/51849
2484 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2485 Call pedwarn_c90 instead of pedwarn.
2486 (check_bitfield_type_and_width): Likewise.
2487 (declspecs_add_qual): Likewise.
2488 (declspecs_add_type): Likewise.
2489 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2490 Adjust to only call pedwarn_c90.
2491 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2492 pedwarn_c90 instead of pedwarn.
2493 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2494 * c-parser.c (disable_extension_diagnostics): Handle
2495 warn_c90_c99_compat.
2496 (restore_extension_diagnostics): Likewise.
2497 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2498 pedwarn_c90 instead of pedwarn.
2499 (c_parser_initelt): Likewise.
2500 (c_parser_postfix_expression): Likewise.
2501 (c_parser_postfix_expression_after_paren_type): Likewise.
2502 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2503 * c-tree.h: Fix formatting.
2504 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2505 pedwarn_c90 instead of pedwarn.
2506
9f25a338
TS
25072014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2508
2509 * c-typeck.c: Remove include of pointer-set.h.
2510
044331a8
MP
25112014-08-07 Marek Polacek <polacek@redhat.com>
2512
2513 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2514
b787e7a2
TS
25152014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2516
2517 * c-typeck.c: Use hash_map instead of pointer_map.
2518
6e2830c3
TS
25192014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2520
2521 * c-decl.c: Use hash_set instead of pointer_set.
2522
a7ee52fb
IZ
25232014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2524
2525 PR middle-end/61455
2526 * c-array-notation.c (expand_array_notations): Handling
2527 of DECL_EXPR added.
2528
b4dfdc11
MG
25292014-07-31 Marc Glisse <marc.glisse@inria.fr>
2530
2531 PR c++/60517
2532 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2533 a local variable.
2534
976d5a22
TT
25352014-07-30 Tom Tromey <tromey@redhat.com>
2536
2537 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2538 field.
2539 (really_start_incremental_init, push_init_level): Initialize
2540 designator_depth.
2541 (pop_init_level): Set global designator_depth.
2542 (process_init_element): Check for designated_init attribute.
2543
30281de2
MP
25442014-07-20 Marek Polacek <polacek@redhat.com>
2545
2546 PR c/61852
2547 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2548 (implicitly_declare): Pass location to implicit_decl_warning.
2549
b108f48f
JJ
25502014-07-14 Jakub Jelinek <jakub@redhat.com>
2551
2552 PR middle-end/61294
2553 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2554 If non-NULL, call c_parser_check_literal_zero.
2555 (c_parser_check_literal_zero): New function.
2556 (c_parser_postfix_expression_after_primary): Adjust
2557 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2558
773ec47f
MP
25592014-07-06 Marek Polacek <polacek@redhat.com>
2560
2561 PR c/6940
2562 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2563 * c-tree.h (C_ARRAY_PARAMETER): Define.
2564 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2565 function parameter.
2566
22e1cf1c 25672014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 2568 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
2569
2570 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2571 releasing symbol.
2572
52ec0ea3
MP
25732014-07-01 Marek Polacek <polacek@redhat.com>
2574
2575 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2576 instead of 0 to WARN_FOR_ASSIGNMENT.
2577
d5c3d343
MP
25782014-07-01 Marek Polacek <polacek@redhat.com>
2579
2580 PR c/58286
2581 * c-typeck.c (convert_for_assignment): Pass
2582 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2583
6a7253a4
MP
25842014-06-30 Marek Polacek <polacek@redhat.com>
2585
2586 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2587 has no_sanitize_undefined attribute.
2588
5e88a8f4
IZ
25892014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2590
2591 PR middle-end/57541
2592 * c-array-notation.c (fix_builtin_array_notation_fn):
2593 Check for 0 arguments in builtin call. Check that bultin argument is
2594 correct.
2595 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2596 index.
2597
9698b078
SH
25982014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2599
2600 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2601 qualifiers in __auto_type for atomic types.
2602 (c_parser_typeof_specifier): Discard all type qualifiers in
2603 __typeof__ for atomic types.
2604
6e07c515
MP
26052014-06-25 Marek Polacek <polacek@redhat.com>
2606
2607 PR c/61162
2608 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2609 the return expression to c_finish_return.
2610
da6f124d
JJ
26112014-06-25 Jakub Jelinek <jakub@redhat.com>
2612
2613 * c-typeck.c (c_finish_omp_clauses): Make sure
2614 OMP_CLAUSE_LINEAR_STEP has correct type.
2615
c203e8a7
TS
26162014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2617
2618 * c-decl.c: Adjust.
2619
56ad0e38
JJ
26202014-06-24 Jakub Jelinek <jakub@redhat.com>
2621
2622 * c-parser.c (c_parser_omp_for_loop): For
2623 #pragma omp parallel for simd move lastprivate clause from parallel
2624 to for rather than simd.
2625
47c2554f
MP
26262014-06-23 Marek Polacek <polacek@redhat.com>
2627
2628 * c-typeck.c (parser_build_binary_op): Don't call
2629 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2630
56363ffd
JH
26312014-06-15 Jan Hubicka <hubicka@ucw.cz>
2632
2633 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2634 * c-decl.c (merge_decls): Likewise.
2635
d7ff7ae5
MP
26362014-06-09 Marek Polacek <polacek@redhat.com>
2637
2638 PR c/36446
2639 * c-typeck.c (error_init): Call inform instead of error_at.
2640 (pedwarn_init): Call inform instead of pedwarn.
2641 (warning_init): Call inform instead of warning_at.
2642
24d047a3
JH
26432014-06-07 Jan Hubicka <hubicka@ucw.cz>
2644
2645 * c-decl.c (merge_decls): Use set_decl_section_name.
2646 (duplicate_decls): Remove node if it exists.
2647
9bac5cbb
G
26482014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2649
2650 PR c/53119
2651 * c-typeck.c (push_init_level, process_init_element,
2652 pop_init_level): Correct check for zero initialization, move
2653 missing brace warning to respect zero initialization.
2654
8ffcdea8
MP
26552014-06-05 Marek Polacek <polacek@redhat.com>
2656
2657 PR c/56724
2658 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2659
742938c9
MP
26602014-06-05 Marek Polacek <polacek@redhat.com>
2661
2662 PR c/49706
2663 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2664 on the left hand side operand of a comparison.
2665
6447c55d
MP
26662014-06-05 Marek Polacek <polacek@redhat.com>
2667
2668 PR c/48062
2669 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2670 Print note only if the warning was printed.
2671
9dc7743c
IZ
26722014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2673
2674 PR c/58942
2675 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2676 with a pointer.
2677
fedfecef
MP
26782014-06-03 Marek Polacek <polacek@redhat.com>
2679
2680 PR c/60439
2681 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2682 c_start_case.
2683 * c-tree.h (c_start_case): Update.
2684 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2685 switch condition has boolean value.
2686
9b2b7279
AM
26872014-06-02 Andrew MacLeod <amacleod@redhat.com>
2688
2689 * c-decl.c: Include builtins.h.
2690 * c-parser.c: Likewise.
2691
5c1bc275
MP
26922014-05-27 Marek Polacek <polacek@redhat.com>
2693
2694 PR c/56724
2695 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2696 error and warning calls to error_at and warning_at. Pass location of
2697 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2698 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2699 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2700
97563bc8
IZ
27012014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2702
2703 PR c/61191
2704 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2705 function parameters.
2706
aede2c10
JH
27072014-05-23 Jan Hubicka <hubicka@ucw.cz>
2708
2709 * c-decl.c (merge_decls): Preserve symtab node pointers.
2710 (duplicate_decls): Free new decl.
2711
edbba2ce
TS
27122014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2713
f3316c6d
TS
2714 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2715 initialization.
2716
edbba2ce
TS
2717 * c-parser.c (c_parser_omp_target): Return bool values.
2718
68c81f24
TS
27192014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2720
2721 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2722 num_teams_loc variable to num_thread_limit_loc.
2723
632f2871
RS
27242014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2725
2726 * c-array-notation.c (expand_array_notations): Use void_node
2727 instead of void_zero_node.
2728
766090c2
TS
27292014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2730
2731 * c-decl.c (finish_struct): Adjust.
2732 (finish_enum): Likewise.
2733 (bind): Adjust.
2734 (record_inline_static): Likewise.
2735 (push_scope): Likewise.
2736 (make_label): Likewise.
2737 (lookup_label_for_goto): Likewise.
2738 (finish_struct): Likewise.
2739 (finish_enum): Likewise.
2740 (store_parm_decls): Likewise.
2741 (c_push_function_context): Likewise.
2742 * c-lang.h: Remove usage of variable_size gty attribute.
2743 * c-parser.c (c_parse_init): Adjust.
2744 (c_parse_file): Likewise.
2745
2b107f6b
MP
27462014-05-13 Marek Polacek <polacek@redhat.com>
2747
2748 PR c/61162
2749 * c-typeck.c (convert_for_assignment): Pass location to
2750 WARN_FOR_ASSIGNMENT instead of input_location.
2751
d033409e
MP
27522014-05-10 Marek Polacek <polacek@redhat.com>
2753
2754 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2755 maybe_warn_string_init.
2756 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2757 maybe_warn_string_init.
2758 * c-tree.h (maybe_warn_string_init): Update declaration.
2759 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2760 Call pedwarn_init with loc instead of with input_location.
2761 (digest_init): Pass init_loc to maybe_warn_string_init.
2762 (pop_init_level): Call pedwarn_init with loc instead of with
2763 input_location.
2764 (set_init_index): Likewise.
2765 (process_init_element): Likewise.
2766
ea58ef42
MP
27672014-05-09 Marek Polacek <polacek@redhat.com>
2768
2769 PR c/61096
2770 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2771 (c_parser_initelt): Pass location to set_init_label. Pass array index
2772 location to set_init_index.
2773 * c-tree.h (push_init_level): Update declaration.
2774 (pop_init_level): Likewise.
2775 (set_init_index): Likewise.
2776 (set_init_label): Likewise.
2777 * c-typeck.c (error_init): Add location parameter. Call error_at
2778 instead of error.
2779 (digest_init): Pass init_loc to error_init.
2780 (really_start_incremental_init):
2781 (push_init_level): Add location parameter. Pass loc to pop_init_level
2782 and error_init.
2783 (pop_init_level): Likewise.
2784 (set_designator): Add location parameter. Pass loc to pop_init_level,
2785 push_init_level, and error_init.
2786 (set_init_index): Add location parameter. Pass loc to error_init and
2787 set_designator.
2788 (set_init_label): Likewise.
2789 (output_init_element): Pass loc to error_init.
2790 (process_init_element): Pass loc to error_init, pop_init_level,
2791 pedwarn_init, and push_init_level.
2792
661a0813
MP
27932014-05-09 Marek Polacek <polacek@redhat.com>
2794
2795 PR c/50459
2796 * c-parser.c (c_parser_attributes): Parse the arguments as an
2797 expression-list if the attribute takes identifier.
2798
2793eeab
MP
27992014-05-08 Marek Polacek <polacek@redhat.com>
2800
2801 PR c/61053
2802 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2803 TYPE_ALIGN_UNIT.
2804
f827930a
MP
28052014-05-08 Marek Polacek <polacek@redhat.com>
2806
2807 PR c/61077
2808 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2809 of main.
2810
1d60af08
KZ
28112014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2812 Mike Stump <mikestump@comcast.net>
2813 Richard Sandiford <rdsandiford@googlemail.com>
2814
2815 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2816 (finish_enum): Use wide-int interfaces.
2817 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2818 * c-typeck.c (build_c_cast): Likewise.
2819 (set_nonincremental_init_from_string): Likewise.
2820 (c_tree_equal): Likewise.
2821
a0e24419
MP
28222014-05-02 Marek Polacek <polacek@redhat.com>
2823
2824 PR c/25801
2825 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2826 Return size_one_node when the type is not complete.
2827 (pointer_diff): Remove comment.
2828 (build_unary_op): Improve error messages.
2829
19fc9faa
MP
28302014-05-02 Marek Polacek <polacek@redhat.com>
2831
2832 * c-typeck.c (c_finish_return): Separate warning_at calls.
2833
63bc4e87
MP
28342014-05-02 Marek Polacek <polacek@redhat.com>
2835
2836 * c-tree.h (error_init): Remove declaration.
2837 (pedwarn_init): Likewise.
2838 * c-typeck.c (error_init): Make static and move above.
2839 (pedwarn_init): Likewise.
2840 (warning_init): Move above.
2841 (maybe_warn_string_init): Likewise.
2842
4bd2511b
JL
28432014-05-01 Jeff Law <law@redhat.com>
2844
2845 Revert:
2846
2847 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2848 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2849 avoid goto.
2850
6a358dcb
MP
28512014-05-02 Marek Polacek <polacek@redhat.com>
2852
2853 PR c/60784
2854 * c-typeck.c (push_init_level): Set constructor_designated to
2855 p->designated for structures.
2856
ae5ebda4
MP
28572014-05-01 Marek Polacek <polacek@redhat.com>
2858
2859 PR c/60915
2860 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2861 function-definition has an attribute after the declarator.
2862
96b40f8d
MP
28632014-05-01 Marek Polacek <polacek@redhat.com>
2864
2865 PR c/60257
2866 * c-typeck.c (warning_init): Add location_t parameter. Call
2867 warning_at instead of warning.
2868 (push_init_level): Pass input_location to warning_init.
2869 (add_pending_init): Add location_t parameter. Pass loc to
2870 warning_init.
2871 (set_nonincremental_init): Pass input_location to add_pending_init.
2872 (set_nonincremental_init_from_string): Likewise.
2873 (output_init_element): Pass loc to warning_init and to
2874 add_pending_init.
2875
32e00768
MP
28762014-05-01 Marek Polacek <polacek@redhat.com>
2877
2878 PR c/43395
2879 * c-typeck.c (c_finish_return): Distinguish between label and variable
2880 when warning about returning local address.
2881
c9379ce2
MP
28822014-05-01 Marek Polacek <polacek@redhat.com>
2883
2884 PR c/29467
2885 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2886 in C89 mode.
2887
d00887e8
MP
28882014-05-01 Marek Polacek <polacek@redhat.com>
2889
2890 PR c/43245
2891 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2892 instead of 0 to WARN_FOR_QUALIFIERS.
2893
5436fa2e
MP
28942014-05-01 Marek Polacek <polacek@redhat.com>
2895
2896 PR c/56989
2897 * c-typeck.c (default_conversion): Use better location for
2898 error call.
2899
f8ed5150
MP
29002014-04-30 Marek Polacek <polacek@redhat.com>
2901
2902 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2903 also when SANITIZE_FLOAT_DIVIDE is on.
2904
8337d1db
MP
29052014-04-30 Marek Polacek <polacek@redhat.com>
2906
2907 PR c/60139
2908 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2909 and pedwarn_init. Use loc insted of input_location.
2910
c4bdc42f
MP
29112014-04-30 Marek Polacek <polacek@redhat.com>
2912
2913 PR c/60351
2914 * c-typeck.c (build_binary_op): Use location when warning about
2915 shift count.
2916
45484dcf
MP
29172014-04-25 Marek Polacek <polacek@redhat.com>
2918
2919 PR c/18079
2920 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2921 always_inline/noinline and hot/cold attributes.
2922
34cf811f
MP
29232014-04-25 Marek Polacek <polacek@redhat.com>
2924
2925 PR c/60114
2926 * c-parser.c (c_parser_initelt): Pass input_location to
2927 process_init_element.
2928 (c_parser_initval): Pass loc to process_init_element.
2929 * c-tree.h (process_init_element): Adjust declaration.
2930 * c-typeck.c (push_init_level): Pass input_location to
2931 process_init_element.
2932 (pop_init_level): Likewise.
2933 (set_designator): Likewise.
2934 (output_init_element): Add location_t parameter. Pass loc to
2935 digest_init.
2936 (output_pending_init_elements): Pass input_location to
2937 output_init_element.
2938 (process_init_element): Add location_t parameter. Pass loc to
2939 output_init_element.
2940
42056eac
JJ
29412014-04-24 Jakub Jelinek <jakub@redhat.com>
2942
2943 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2944 atomic-clause, allow comma in between atomic-clause and
2945 seq_cst.
2946
e162a134
JJ
29472014-04-22 Jakub Jelinek <jakub@redhat.com>
2948
2949 PR c/59073
2950 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2951 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2952
2f6babac
IZ
29532014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2954
2955 PR middle-end/60469
2956 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2957 create_tmp_var instead build_decl for creating temps.
2958 (build_array_notation_expr): Likewise.
2959 (fix_conditional_array_notations_1): Likewise.
2960 (fix_array_notation_expr): Likewise.
2961 (fix_array_notation_call_expr): Likewise.
2962
8edbfaa6
JJ
29632014-03-28 Jakub Jelinek <jakub@redhat.com>
2964
2965 PR c++/60689
2966 * c-tree.h (c_build_function_call_vec): New prototype.
2967 * c-typeck.c (build_function_call_vec): Don't call
2968 resolve_overloaded_builtin here.
2969 (c_build_function_call_vec): New wrapper function around
2970 build_function_call_vec. Call resolve_overloaded_builtin here.
2971 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2972 Call c_build_function_call_vec instead of build_function_call_vec.
2973 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2974 * c-decl.c (finish_decl): Likewise.
2975
7485aeea
MLI
29762014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2977
2978 PR c/55383
2979 * c-typeck.c: Use correct format string in cast-qual warning
2980
b17a8b07
TS
29812014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2982
2983 * c-decl.c (c_decl_attributes): Use
2984 lang_hooks.types.omp_mappable_type.
2985 * c-typeck.c (c_finish_omp_clauses): Likewise.
2986
3af9c5e9
MP
29872014-03-06 Marek Polacek <polacek@redhat.com>
2988
2989 PR c/60197
2990 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2991 of checking tree code.
2992
1c9f5f33
PK
29932014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2994
2995 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2996 (c_parser_parameter_declaration): Likewise.
2997
cc28fc7f
MP
29982014-02-19 Marek Polacek <polacek@redhat.com>
2999
3000 PR c/60195
3001 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
3002 Call mark_exp_read on exp.value.
3003 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
3004 TREE_ADDRESSABLE on old instead of val.
3005 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
3006
b581c05c
PK
30072014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
3008
3009 * c-parser.c (c_parser_get_builtin_args): Replace calls to
3010 C_EXPR_APPEND by vec_safe_push.
3011 * c-tree.h (C_EXPR_APPEND): Remove.
3012
81e5eca8
MP
30132014-01-31 Marek Polacek <polacek@redhat.com>
3014
3015 PR c/59963
3016 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
3017 build_function_call_vec.
3018 (build_function_call): Likewise.
3019 (build_atomic_assign): Likewise.
3020 (build_function_call_vec): Add arg_loc parameter. Use it.
3021 (convert_arguments): Likewise.
3022 (convert_for_assignment): Rename rhs_loc to expr_loc.
3023 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
3024 (c_parser_objc_keywordexpr): Likewise.
3025 (c_parser_postfix_expression_after_primary): Call
3026 build_function_call_vec with expr_loc rather than op_loc.
3027 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
3028 build_function_call_vec.
3029 (c_parser_expr_list): Add locations parameter. Fill it with locations
3030 of function arguments.
3031 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
3032
68fca595
MP
30332014-01-30 Marek Polacek <polacek@redhat.com>
3034
3035 PR c/59940
3036 * c-typeck.c (build_function_call_vec): Use loc parameter.
3037 (convert_arguments): Add location parameter. Use it.
3038 (ep_convert_and_check): Likewise.
3039 (build_atomic_assign): Adjust convert_for_assignment call.
3040 (build_modify_expr): Likewise.
3041 (digest_init): Likewise.
3042 (c_finish_return): Likewise.
3043 (build_conditional_expr): Adjust ep_convert_and_check calls.
3044 (convert_for_assignment): Add rhs_loc parameter. Use it.
3045 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
3046 calls.
3047
fa337f3a
RB
30482014-01-30 Richard Biener <rguenther@suse.de>
3049
3050 PR c/59905
3051 * c-typeck.c (build_function_call_vec): Do not replace calls
3052 to a function via an incompatible type with a runtime abort.
3053
b72271b9
BI
30542014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
3055
3056 * c-parser.c (c_parser_declaration_or_fndef): Replaced
3057 flag_enable_cilkplus with flag_cilkplus.
3058 (c_parser_direct_declarator_inner): Likewise.
3059 (c_parser_attribute_any_word): Likewise.
3060 (c_parser_attributes): Likewise.
3061 (c_parser_compound_statement): Likewise.
3062 (c_parser_statement_after_labels): Likewise.
3063 (c_parser_if_statement): Likewise.
3064 (c_parser_switch_statement): Likewise.
3065 (c_parser_do_statement): Likewise.
3066 (c_parser_for_statement): Likewise.
3067 (c_parser_unary_expression): Likewise.
3068 (c_parser_postfix_expression): Likewise.
3069 (c_parser_postfix_expression_after_primary): Likewise.
3070 (c_parser_postfix_expression_after_primary): Likewise.
3071 (c_parser_omp_clause_name): Likewise.
3072 (c_finish_omp_declare_simd): Likewise.
3073 (c_parser_cilk_verify_simd): Likewise.
3074 * c-typeck.c (build_array_ref): Likewise.
3075 (build_function_call_vec): Likewise.
3076 (convert_arguments): Likewise.
3077 (build_compound_expr): Likewise.
3078 (c_finish_return): Likewise.
3079 (c_finish_if_stmt): Likewise.
3080 (c_finish_loop): Likewise.
3081 (build_binary_op): Likewise.
3082
393e8e8b
MP
30832014-01-23 Marek Polacek <polacek@redhat.com>
3084
3085 PR c/59846
3086 * c-typeck.c (parser_build_binary_op): Use location instead of
3087 input_location.
3088 (build_binary_op): Pass location to shorten_compare.
3089
f04dda30
MP
30902014-01-23 Marek Polacek <polacek@redhat.com>
3091
3092 PR c/58346
3093 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
3094 an empty aggregate.
3095
789eadcd
MP
30962014-01-23 Marek Polacek <polacek@redhat.com>
3097
3098 PR c/59871
3099 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
3100 of a comma expression.
3101 (emit_side_effect_warnings): Likewise.
3102
40f14e9f
BI
31032014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3104
3105 PR c/59825
3106 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
3107 function to use walk_tree and moved a lot of its functionality to
3108 expand_array_notations.
3109 (expand_array_notations): New function.
3110
74558dd9
BI
31112014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
3112
3113 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
3114 attribute an attribute without value.
3115
652fea39
JJ
31162014-01-23 Jakub Jelinek <jakub@redhat.com>
3117
3118 PR middle-end/58809
3119 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3120 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3121
f34f1c87
MP
31222014-01-22 Marek Polacek <polacek@redhat.com>
3123
3124 PR c/59891
3125 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3126 of remove_c_maybe_const_expr on op1 and op2.
3127
241f845a
JJ
31282014-01-15 Jakub Jelinek <jakub@redhat.com>
3129
3130 PR c/58943
3131 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3132 effects, preevaluate rhs using SAVE_EXPR first.
3133
9a74f20c
BI
31342014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3135
3136 PR c++/59631
3137 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3138 statements with if-elseif statements.
3139
96066ce1
MP
31402014-01-06 Marek Polacek <polacek@redhat.com>
3141
3142 PR c/57773
3143 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3144 defined bit-field types only in ISO C.
3145
23a5b65a
RS
31462014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3147
3148 Update copyright years
3149
f9030485
RS
31502014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3151
3152 * c-array-notation.c: Use the standard form for the copyright notice.
3153
41958c28
BI
31542013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3155
3156 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3157 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3158 field in parser is not empty. If not-empty, call the function
3159 c_parser_finish_omp_declare_simd.
3160 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3161 between SIMD-enabled functions and #pragma simd. Added new parameter.
3162 (c_parser_cilk_all_clauses): Modified the usage of the function
3163 c_parser_cilk_clause_vectorlength as mentioned above.
3164 (c_parser_cilk_simd_fn_vector_attrs): New function.
3165 (c_finish_cilk_simd_fn_tokens): Likewise.
3166 (is_cilkplus_vector_p): Likewise.
3167 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3168 "nomask," and "mask" strings in clause name.
3169 (c_parser_omp_all_clauses): Added 3 new case statements:
3170 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3171 PRAGMA_CILK_CLAUSE_NOMASK.
3172 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3173 check for vector attribute and if so call the function
3174 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3175 called the function c_finish_cilk_simd_fn_tokens.
3176 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3177 parser field is non-empty. If so, parse them as you would parse
3178 the omp declare simd pragma.
3179 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3180 Added a check when step is a parameter and flag it as error.
3181 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3182 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3183 pragma_omp_clause.
3184
cef0fd0e
TS
31852013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3186
3187 * c-parser.c (c_parser_omp_parallel): Fix description.
3188
12893402
BI
31892013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3190
3191 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3192 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3193 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3194 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3195
296674db
JM
31962013-12-04 Joseph Myers <joseph@codesourcery.com>
3197
3198 PR c/52023
3199 * c-parser.c (c_parser_alignas_specifier): Use
3200 c_sizeof_or_alignof_type instead of c_alignof.
3201 (c_parser_alignof_expression): Likewise, with min_alignof
3202 parameter depending on alignof spelling used.
3203
edd28054
MP
32042013-12-04 Marek Polacek <polacek@redhat.com>
3205
3206 PR c/54113
3207 * c-decl.c (start_function): Don't warn for missing prototype for
3208 inline functions.
3209
da0fc454
MP
32102013-12-03 Marek Polacek <polacek@redhat.com>
3211
3212 PR c/59351
3213 * c-decl.c (build_compound_literal): Allow compound literals with
3214 empty initial value.
3215
4c2ecab0
JM
32162013-12-02 Joseph Myers <joseph@codesourcery.com>
3217
3218 PR c/58235
3219 * c-typeck.c (build_modify_expr): Diagnose assignment to
3220 expression with array type.
3221
340baef7
JM
32222013-11-29 Joseph Myers <joseph@codesourcery.com>
3223
3224 PR c/42262
3225 * c-typeck.c (process_init_element): Do not treat a string as
3226 initializing a whole array when used with a designator for an
3227 individual element.
3228
6763b9f7
JM
32292013-11-29 Joseph Myers <joseph@codesourcery.com>
3230
3231 PR c/57574
3232 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3233 an inline function following a static declaration.
3234
e7bd1de1
JJ
32352013-11-28 Jakub Jelinek <jakub@redhat.com>
3236
3237 PR c/59310
3238 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3239 to p_name before calling c_parser_omp_teams instead of after.
3240 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3241 argument. Remove unused p_name variable.
3242
0136f8f0
AH
32432013-11-27 Aldy Hernandez <aldyh@redhat.com>
3244 Jakub Jelinek <jakub@redhat.com>
3245
3246 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3247 external_scope is NULL.
3248
241b71bb
TV
32492013-11-27 Tom de Vries <tom@codesourcery.com>
3250 Marc Glisse <marc.glisse@inria.fr>
3251
3252 PR c++/59032
3253 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3254
2fb9a547
AM
32552013-11-22 Andrew MacLeod <amacleod@redhat.com>
3256
3257 * c-typeck.c: Add required include files from gimple.h.
3258
8400e75e
DM
32592013-11-22 David Malcolm <dmalcolm@redhat.com>
3260
3261 * c-decl.c (define_label, shadow_tag_warned)
3262 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3263 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3264 (declspecs_add_type): Remove use of in_system_header macro.
3265 * c-parser.c (c_parser_unary_expression): Likewise.
3266 * c-typeck.c (store_init_value, process_init_element)
3267 (c_start_case): Likewise.
3268
3269 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3270 macro.
3271
3272 * c-parser.c (c_parser_set_source_position_from_token): Remove
3273 reference to in_system_header from comment.
3274
386b1f1f
RS
32752013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3276
3277 * c-decl.c (grokdeclarator): Update comment to refer to
3278 tree_to_[su]hwi rather than tree_low_cst.
3279
ae7e9ddd
RS
32802013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3281
3282 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3283 tree_to_uhwi throughout.
3284
9439e9a1
RS
32852013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3286
3287 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3288 throughout.
3289
9541ffee
RS
32902013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3291
3292 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3293 throughout.
3294
c02065fc
AH
32952013-11-15 Aldy Hernandez <aldyh@redhat.com>
3296
3297 * c-parser.c (c_parser_cilk_simd): New.
3298 (c_parser_cilk_verify_simd): New.
3299 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3300 (c_parser_omp_for_loop): Add case for NE_EXPR.
3301 Set c_break_label for CILK_SIMD.
3302 (c_parser_cilk_clause_vectorlength): New.
3303 (c_parser_cilk_clause_linear): New.
3304 (c_parser_cilk_clause_name): New.
3305 (c_parser_cilk_all_clauses): New.
3306 * c-typeck.c (build_unary_op): Pass location argument to
3307 readonly_error.
3308 (build_modify_expr): Same.
3309 (build_asm_expr): Same.
3310 (c_finish_bc_stmt): Error on break/continue in loops.
3311
18f429e2
AM
33122013-11-14 Andrew MacLeod <amacleod@redhat.com>
3313
3314 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3315
d8a2d370
DN
33162013-11-14 Diego Novillo <dnovillo@google.com>
3317
3318 * c-decl.c: Include print-tree.h.
3319 Include stor-layout.h.
3320 Include varasm.h.
3321 Include attribs.h.
3322 Include stringpool.h.
3323 * c-lang.c: Include fold-const.h.
3324 * c-parser.c: Include stringpool.h.
3325 Include attribs.h.
3326 Include stor-layout.h.
3327 Include varasm.h.
3328 Include trans-mem.h.
3329 * c-typeck.c: Include stor-layout.h.
3330 Include trans-mem.h.
3331 Include varasm.h.
3332 Include stmt.h.
3333
38b7bc7f
JM
33342013-11-13 Joseph Myers <joseph@codesourcery.com>
3335
3336 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3337 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3338 __auto_type.
3339 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3340 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3341 RID_AUTO_TYPE.
3342 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3343 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3344 (c_parser_declarator, c_parser_direct_declarator_inner)
3345 (c_parser_parameter_declaration, c_parser_type_name): All callers
3346 changed.
3347 (c_parser_declaration_or_fndef): Handle declarations with type
3348 determined from the initializer.
3349
45b0be94
AM
33502013-11-12 Andrew MacLeod <amacleod@redhat.com>
3351
18f429e2 3352 * c-typeck.c: Include gimplify.h.
45b0be94 3353
582d9b50
JM
33542013-11-12 Joseph Myers <joseph@codesourcery.com>
3355
3356 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3357 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3358 comment.
3359 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3360 or _Thread_local as appropriate in diagnostics.
3361 (build_null_declspecs): Initialize ret->thread_gnu_p.
3362 (declspecs_add_scspec): Handle either __thread or _Thread_local
3363 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3364 pedantic. Do not disallow _Thread_local extern and _Thread_local
3365 static.
3366
267bac10
JM
33672013-11-07 Joseph Myers <joseph@codesourcery.com>
3368 Andrew MacLeod <amacleod@redhat.com>
3369
3370 * c-aux-info.c (gen_type): Handle atomic qualifier.
3371 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3372 qualifiers when compating types.
3373 (shadow_tag_warned): Handle atomic_p in declspecs.
3374 (quals_from_declspecs): Likewise.
3375 (start_decl): Use c_type_promotes_to when promoting argument
3376 types.
3377 (grokdeclarator): Handle _Atomic.
3378 (get_parm_info): Diagnose any qualifier on "void" as only
3379 parameter.
3380 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3381 comparing types. Use c_type_promotes_to when promoting argument
3382 types.
3383 (finish_function): Use c_type_promotes_to when promoting argument
3384 types.
3385 (build_null_declspecs): Handle atomic_p in declspecs.
3386 (declspecs_add_qual): Handle RID_ATOMIC.
3387 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3388 (c_token_starts_declspecs): Handle RID_ATOMIC.
3389 (c_parser_declspecs): Handle atomic type specifiers and
3390 qualifiers.
3391 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3392 from types of expressions with atomic type.
3393 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3394 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3395 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3396 (c_parser_statement_after_labels, c_parser_switch_statement)
3397 (c_parser_for_statement, c_parser_expr_no_commas)
3398 (c_parser_conditional_expression, c_parser_binary_expression)
3399 (c_parser_cast_expression, c_parser_unary_expression)
3400 (c_parser_postfix_expression)
3401 (c_parser_postfix_expression_after_primary, c_parser_expression):
3402 Use convert_lvalue_to_rvalue.
3403 (c_parser_expression_conv, c_parser_expr_list): Document
3404 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3405 (c_parser_objc_synchronized_statement): Use
3406 convert_lvalue_to_rvalue.
3407 (c_parser_objc_selector): Handle RID_ATOMIC.
3408 (c_parser_objc_receiver, c_parser_array_notation): Use
3409 convert_lvalue_to_rvalue.
3410 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3411 _Atomic (type-name).
3412 (struct c_declspecs): Add atomic_p field.
3413 (convert_lvalue_to_rvalue): Declare.
3414 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3415 corresponding atomic types.
3416 (qualify_type): Don't add _Atomic qualifiers from second argument.
3417 (comp_target_types): Do not allow _Atomic mismatches.
3418 (type_lists_compatible_p): Do not remove atomic qualifiers when
3419 comparing types.
3420 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3421 (build_atomic_assign): New functions.
3422 (build_unary_op): Use build_atomic_assign for atomic increment and
3423 decrement.
3424 (build_conditional_expr): Do not treat _Atomic void as a qualified
3425 version of void.
3426 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3427 (find_anonymous_field_with_type, convert_to_anonymous_field)
3428 (convert_for_assignment): Do not remove atomic qualifiers when
3429 comparing types.
3430 (digest_init): Do not accept initialization of arrays of atomic
3431 elements by string constants.
3432 (build_asm_expr): Use convert_lvalue_to_rvalue.
3433 (build_binary_op): Do not treat _Atomic void as a qualified
3434 version of void.
3435
0c249d4b
DD
34362013-11-06 DJ Delorie <dj@redhat.com>
3437
3438 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3439 both explicit and builtin, print the location of the explicit one.
3440
6d7f7e0a
TB
34412013-11-05 Tobias Burnus <burnus@net-b.de>
3442
3443 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3444 c_parser_omp_distribute, c_parser_omp_teams,
3445 c_parser_omp_target, c_parser_omp_declare): Handle
3446 -fopenmp-simd.
3447
b906f4ca
MP
34482013-11-03 Marek Polacek <polacek@redhat.com>
3449
3450 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3451
ee1d5a02
JJ
34522013-11-01 Jakub Jelinek <jakub@redhat.com>
3453
3454 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3455 check_dup_generic at the end, unless remove is true.
3456 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3457 remove = true;.
3458 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3459
5a9785fb
JJ
34602013-10-31 Jakub Jelinek <jakub@redhat.com>
3461
3462 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3463 with decl that is not pointer nor array.
3464
939b37da
BI
34652013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3466
3467 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3468 a spawning function is found.
3469 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3470 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3471 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3472 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3473 case.
3474 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3475 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3476 expr.
3477 (c_finish_return): Added a check to reject _Cilk_spawn in return
3478 expression.
3479 (build_cilk_spawn): New function.
3480 (build_cilk_sync): Likewise.
3481 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3482
d4af74d4
TB
34832013-10-27 Tobias Burnus <burnus@net-b.de>
3484
3485 PR other/33426
3486 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3487 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3488 (c_parser_statement_after_labels): Update calls.
3489
d73749df 34902013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3491
3492 PR other/33426
3493 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3494 Handle PRAGMA_IVDEP.
3495 (c_parser_statement_after_labels): Update call.
3496
f28aa681
MP
34972013-10-24 Marek Polacek <polacek@redhat.com>
3498
3499 * c-parser.c (c_parser_struct_declaration): Add a comment.
3500 (c_parser_declarator): Don't allow _Alignas here.
3501
0645c1a2
AM
35022013-10-17 Andrew MacLeod <amacleod@redhat.com>
3503
3504 * c-parser.c: Include omp-low.h.
3505 * c-typeck.c: Likewise.
3506
568a31f2
MP
35072013-10-17 Marek Polacek <polacek@redhat.com>
3508
3509 PR c/58267
3510 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3511 Document syntax of the array-declarator.
3512 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3513 are not permitted.
3514 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3515 (c_parser_struct_declaration): Likewise.
3516 (c_parser_declarator): Likewise.
3517 (c_parser_direct_declarator_inner): Likewise.
3518 (c_parser_parameter_declaration): Likewise.
3519 (c_parser_type_name): Likewise.
3520
acf0174b
JJ
35212013-10-11 Jakub Jelinek <jakub@redhat.com>
3522
3523 * c-lang.h (current_omp_declare_target_attribute): New extern
3524 decl.
3525 * c-parser.c: Include c-lang.h.
3526 (struct c_parser): Change tokens to c_token *.
3527 Add tokens_buf field. Change tokens_avail type to unsigned int.
3528 (c_parser_consume_token): If parser->tokens isn't
3529 &parser->tokens_buf[0], increment parser->tokens.
3530 (c_parser_consume_pragma): Likewise.
3531 (enum pragma_context): Add pragma_struct and pragma_param.
3532 (c_parser_external_declaration): Adjust
3533 c_parser_declaration_or_fndef caller.
3534 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3535 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3536 Adjust recursive call.
3537 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3538 of pragma_external.
3539 (c_parser_parameter_declaration): Use pragma_param instead of
3540 pragma_external.
3541 (c_parser_compound_statement_nostart, c_parser_label,
3542 c_parser_for_statement): Adjust
3543 c_parser_declaration_or_fndef callers.
3544 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3545 it through to c_parser_conditional_expression.
3546 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3547 pass it through to c_parser_binary_expression. Adjust recursive
3548 call.
3549 (c_parser_binary_expression): Remove prec argument, add
3550 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3551 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3552 binop matches it, use build2 instead of parser_build_binary_op.
3553 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3554 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3555 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3556 Handle pragma_struct and pragma_param the same as pragma_external.
3557 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3558 (c_parser_omp_variable_list): Parse array sections for
3559 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3560 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3561 (c_parser_omp_clause_reduction): Handle user defined reductions.
3562 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3563 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3564 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3565 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3566 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3567 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3568 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3569 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3570 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3571 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3572 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3573 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3574 (c_parser_omp_for_loop): Add CODE argument, pass it through
3575 to c_finish_omp_for. Change last argument to cclauses,
3576 and adjust uses to grab parallel clauses from the array of all
3577 the split clauses. Adjust c_parser_binary_expression,
3578 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3579 (omp_split_clauses): New function.
3580 (c_parser_omp_simd): New function.
3581 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3582 Allow the function to be called also when parsing combined constructs,
3583 and call c_parser_omp_simd when parsing for simd.
3584 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3585 #pragma omp section, require exactly one structured-block instead of
3586 sequence of statements.
3587 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3588 Allow the function to be called also when parsing combined constructs.
3589 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3590 Allow the function to be called also when parsing combined
3591 constructs.
3592 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3593 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3594 c_parser_omp_teams, c_parser_omp_target_data,
3595 c_parser_omp_target_update, c_parser_omp_target,
3596 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3597 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3598 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3599 (c_parser_omp_construct): Add p_name and mask vars. Handle
3600 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3601 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3602 and c_parser_omp_sections callers.
3603 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3604 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3605 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3606 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3607 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3608 OMP_CLAUSE_DEPEND.
3609 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3610 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3611 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3612 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3613 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3614 * c-typeck.c: Include tree-inline.h.
3615 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3616 handle_omp_array_sections_1, handle_omp_array_sections,
3617 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3618 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3619 user defined reductions.
3620 (c_tree_equal): New function.
3621 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3622 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3623 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3624 c_check_omp_declare_reduction_r): New prototypes.
3625 * c-decl.c (current_omp_declare_target_attribute): New variable.
3626 (c_decl_attributes): New function.
3627 (start_decl, start_function): Use it instead of decl_attributes.
3628 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3629 c_omp_reduction_decl, c_omp_reduction_lookup,
3630 c_check_omp_declare_reduction_r): New functions.
3631
0a6c2227
TT
36322013-09-25 Tom Tromey <tromey@redhat.com>
3633
3634 * Make-lang.in (c/gccspec.o): Remove.
3635 (CFLAGS-c/gccspec.o): New variable.
3636 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3637 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3638 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3639
f3bc55f0
TT
36402013-09-25 Tom Tromey <tromey@redhat.com>
3641
3642 * Make-lang.in (c/gccspec.o): Don't use subshell.
3643
a24d975c
MP
36442013-09-18 Marek Polacek <polacek@redhat.com>
3645
3646 PR sanitize/58443
3647 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3648 Remove unnecessary check.
3649
ce6923c5
MP
36502013-09-18 Marek Polacek <polacek@redhat.com>
3651
3652 PR sanitizer/58411
3653 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3654 no_sanitize_undefined attribute.
3655
a1e51df9
KT
36562013-09-13 Kai Tietz <ktietz@redhat.com>
3657
3658 PR target/57848
3659 * c-decl.c (c_builtin_function_ext_scope): Remove
3660 wrong assumption that it is never called on prexisting
3661 symbol.
3662
0af94e6f
JR
36632013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3664
3665 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3666
20059c8b
GDR
36672013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3668
3669 * c-objc-common.c (c_tree_printer): Tidy.
3670
de5a5fa1
MP
36712013-08-30 Marek Polacek <polacek@redhat.com>
3672
3673 * c-typeck.c (build_binary_op): Add division by zero and shift
3674 instrumentation.
3675
2531a1d9 36762013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 3677 Joseph Myers <joseph@codesourcery.com>
2531a1d9 3678
6e2bcc98 3679 PR c/35649
2531a1d9
JR
3680 * c-typeck.c (c_common_type): Prefer double_type_node over
3681 other REAL_TYPE types with the same precision.
3682 (convert_arguments): Likewise.
3683
025311c4
GDR
36842013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3685
3686 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3687 (c_initialize_diagnostics): Call a destructor for the early printer.
3688
da6ca2b5
GDR
36892013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3690
3691 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3692 printer initialization.
3693
318cda85 36942013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 3695
318cda85
BI
3696 PR c/57490
3697 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3698 check for truth values.
3699 (expand_array_notation_exprs): Added truth values case. Removed an
3700 unwanted else. Added for-loop to walk through subtrees in default
3701 case.
3702
b066401f
GDR
37032013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3704
3705 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3706
fb48aadc
JM
37072013-07-23 Joseph Myers <joseph@codesourcery.com>
3708
3709 * c-parser.c (struct c_generic_association): Fix typo.
3710
433cc7b0
TT
37112013-07-23 Tom Tromey <tromey@redhat.com>
3712 Joseph Myers <joseph@codesourcery.com>
3713
3714 * c-parser.c (struct c_generic_association): New.
3715 (c_generic_association_d): New typedef.
3716 (c_parser_generic_selection): New function.
3717 (c_parser_postfix_expression): Handle RID_GENERIC.
3718
26d40c3d
JM
37192013-07-13 Jason Merrill <jason@redhat.com>
3720
3721 PR c++/57793
3722 * c-decl.c (finish_struct): Check for too-large class.
3723
ecdbd01a 37242013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
3725
3726 PR c/57821
3727 * c-typeck.c (set_init_index): When folding, check for index overflow.
3728
1141ed3f
BI
37292013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3730
3731 * c-parser.c (c_parser_array_notation): Removed rejection of array
3732 notations in an array of function pointers.
3733
713b46fa
BI
37342013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3735
3736 * c-array-notation.c (make_triplet_val_inv): New function.
3737 (create_cmp_incr): Likewise.
3738 (create_array_refs): Likewise.
3739 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3740 Also modularized common parts between functions and called the function.
3741 (build_array_notation_expr): Likewise.
3742 (fix_conditional_array_notations_1): Likewise.
3743 (fix_array_notation_expr): Likewise.
3744 (fix_array_notation_call_expr): Likewise.
3745
92f20202
MP
37462013-06-18 Marek Polacek <polacek@redhat.com>
3747
3748 PR c/57630
3749 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3750
73a23b06
BI
37512013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3752
3753 * c-array-notation.c (build_array_notation_expr): Reject array notation
3754 mismatch between LHS and RHS even inside a call_expr. Also, removed
3755 a couple while statements that were dead code.
3756
00b8517d
BI
37572013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3758
3759 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3760 excessive precision expressions in function parameters. Also removed
3761 couple unwanted while statements.
3762
1509bdda
BI
37632013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3764
3765 * c-array-notation.c (expand_array_notation_exprs): Added
3766 ARRAY_NOTATION_REF case.
3767
d60f1706
BI
37682013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3769
3770 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3771 function to c-family/array-notation-common.c.
3772 (is_cilkplus_reduce_builtin): Likewise.
3773 (find_rank): Likewise.
3774 (extract_array_notation_exprs): Likewise.
3775 (replace_array_notations): Likewise.
3776 (find_inv_trees): Likewise.
3777 (replace_inv_trees): Likewise.
3778 (contains_array_notation_expr): Likewise.
3779 (find_correct_array_notation_type): Likewise.
3780 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3781 (struct inv_list): Moved this to c-family/array-notation-common.c.
3782 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3783
6d6efbb3
BI
37842013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3785
3786 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3787 reduction functions outside the for-loop. Added a check if the fundecl
3788 is non-NULL. Finally, removed an unwanted if-statement, and made the
3789 body unconditional.
3790
25c22937
BI
37912013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3792
3793 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3794 condition of the if-statement matches the rank of else-block and then-
3795 block when array notations are used.
3796 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3797 expression after the entire function body is parsed.
3798 (c_parser_expr_no_commas): Delayed creating array notation expressions
3799 to the end of function parsing.
3800 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3801 whole if-statement instead of just the condition.
3802 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3803
edd25645
BI
38042013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3805
3806 PR c/57474
3807 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3808 array to NULL_TREE if they are unused. Also added a check for the
3809 field to be NULL before its fields are used in future.
3810
065ce7f1
RO
38112013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3812
3813 PR bootstrap/57450
3814 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3815 (build_array_notation_expr): Likewise.
3816
36536d79
BI
38172013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3818
3819 * c-typeck.c (build_array_ref): Added a check to see if array's
3820 index is greater than one. If true, then emit an error.
3821 (build_function_call_vec): Exclude error reporting and checking
3822 for builtin array-notation functions.
3823 (convert_arguments): Likewise.
3824 (c_finish_return): Added a check for array notations as a return
3825 expression. If true, then emit an error.
3826 (c_finish_loop): Added a check for array notations in a loop
3827 condition. If true then emit an error.
3828 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3829 (build_binary_op): Added a check for array notation expr inside
3830 op1 and op0. If present, we call another function to find correct
3831 type.
3832 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3833 * c-parser.c (c_parser_compound_statement): Check if array
3834 notation code is used in tree, if so, then transform them into
3835 appropriate C code.
3836 (c_parser_expr_no_commas): Check if array notation is used in LHS
3837 or RHS, if so, then build array notation expression instead of
3838 regular modify.
3839 (c_parser_postfix_expression_after_primary): Added a check for
3840 colon(s) after square braces, if so then handle it like an array
3841 notation. Also, break up array notations in unary op if found.
3842 (c_parser_direct_declarator_inner): Added a check for array
3843 notation.
3844 (c_parser_compound_statement): Added a check for array notation in
3845 a stmt. If one is present, then expand array notation expr.
3846 (c_parser_if_statement): Likewise.
3847 (c_parser_switch_statement): Added a check for array notations in
3848 a switch statement's condition. If true, then output an error.
3849 (c_parser_while_statement): Similarly, but for a while.
3850 (c_parser_do_statement): Similarly, but for a do-while.
3851 (c_parser_for_statement): Similarly, but for a for-loop.
3852 (c_parser_unary_expression): Check if array notation is used in a
3853 pre-increment or pre-decrement expression. If true, then expand
3854 them.
3855 (c_parser_array_notation): New function.
3856 * c-array-notation.c: New file.
3857 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3858
cd192ccc
MS
38592013-05-23 Mike Stump <mikestump@comcast.net>
3860
3861 * c-typeck.c (convert_for_assignment): Handle references to memory
3862 spaces better.
3863
427b248d
JM
38642013-05-16 Jason Merrill <jason@redhat.com>
3865
3866 * Make-lang.in (cc1$(exeext)): Use link mutex.
3867
44d90fe1
PC
38682013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3869
3870 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3871 to simply use OPT_Wpointer_arith.
3872 (build_unary_op): Likewise.
3873
4e7d7b3d
JJ
38742013-04-03 Jakub Jelinek <jakub@redhat.com>
3875
3876 PR c/19449
3877 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3878 argument. If set, or it temporarily for parsing of the first
3879 argument into force_folding_builtin_constant_p.
3880 (c_parser_postfix_expression): Adjust callers.
3881
839b422f
RB
38822013-03-21 Richard Biener <rguenther@suse.de>
3883
3884 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3885 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3886
2ee028f1
MP
38872013-02-12 Marek Polacek <polacek@redhat.com>
3888
3889 PR c/44938
3890 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3891 origtypes to NULL.
3892
8824edff
JJ
38932013-01-24 Jakub Jelinek <jakub@redhat.com>
3894
3895 PR c/56078
3896 * c-typeck.c (set_nonincremental_init_from_string): If
3897 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3898 returned false.
3899 (process_init_element): Likewise.
3900
eadd3d0d
JJ
39012012-12-20 Jakub Jelinek <jakub@redhat.com>
3902
3903 PR c++/55619
3904 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3905 argument, don't call default_function_array_conversion
3906 nor c_fully_fold here.
3907 (c_parser_asm_statement): Adjust callers.
3908 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3909 and outputs here, and call default_function_array_conversion
3910 on inputs that don't need to be addressable.
3911
f8a93a2e
JJ
39122012-12-18 Jakub Jelinek <jakub@redhat.com>
3913
3914 PR c/39464
3915 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3916 warning require that both c_common_unsigned_type as well as
3917 c_common_signed_type is the same for both mvl and mvr types.
3918
9771b263
DN
39192012-11-16 Diego Novillo <dnovillo@google.com>
3920
3921 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3922
3923 * c-common.c: Use new vec API in vec.h.
3924 * c-common.h: Likewise.
3925 * c-gimplify.c: Likewise.
3926 * c-pragma.c: Likewise.
3927 * c-pretty-print.c: Likewise.
3928 * c-pretty-print.h: Likewise.
3929 * c-semantics.c: Likewise.
3930 * c-decl.c: Likewise.
3931 * c-parser.c: Likewise.
3932 * c-tree.h: Likewise.
3933 * c-typeck.c: Likewise.
3934
880661a4
JW
39352012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3936
3937 PR c++/54930
3938 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3939
077d1abe
MLI
39402012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3941
3942 PR c/53066
3943 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3944 shadows a function, unless the variable is a function or a
3945 pointer-to-function.
3946
3a785c97
JJ
39472012-10-12 Jakub Jelinek <jakub@redhat.com>
3948
3949 PR c/54381
3950 * c-parser.c (struct c_tree_loc_pair): Removed.
3951 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3952 add location_t * and tree * arguments, fill in array of 3
3953 sizeof_arg trees and corresponding locs.
3954 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3955 c_parser_expr_list callers.
3956 (c_parser_postfix_expression_after_primary): Likewise. Pass
3957 array of 3 sizeof_arg trees and locs (corresponding to first
3958 3 arguments) to sizeof_pointer_memaccess_warning.
3959
703c8606
LC
39602012-10-09 Lawrence Crowl <crowl@google.com>
3961
3962 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3963 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3964 hash table.
3965
5d9de0d0
PC
39662012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3967
3968 PR c++/54194
3969 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3970 call.
3971
a212e43f
MG
39722012-10-09 Marc Glisse <marc.glisse@inria.fr>
3973
3974 PR c++/54427
3975 * c-typeck.c: Include c-common.h.
3976 (enum stv_conv): Moved to c-common.h.
3977 (scalar_to_vector): Moved to c-common.c.
3978 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3979 * Make-lang.in: c-typeck.c depends on c-common.h.
3980
3b78de56
AC
39812012-10-04 Arnaud Charlet <charlet@adacore.com>
3982
3983 * c-decl.c (c_write_global_declarations): Fix handling of
3984 -fdump-ada-spec*.
3985
78c60e3d
SS
39862012-09-30 Sharad Singhai <singhai@google.com>
3987
3988 * c-decl.c (c_write_global_declarations): Use a different method
3989 to determine if the dump has ben initialized.
3990
9f33203d
JM
39912012-09-14 Joseph Myers <joseph@codesourcery.com>
3992
3993 PR c/54552
3994 * c-typeck.c (c_cast_expr): When casting to a type requiring
3995 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3996 c_fully_fold first.
3997
a27d595d
JM
39982012-09-14 Joseph Myers <joseph@codesourcery.com>
3999
4000 PR c/54103
4001 * c-typeck.c (build_unary_op): Pass original argument of
4002 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
4003 any C_MAYBE_CONST_EXPR, if it has integer operands.
4004 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
4005 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
4006 to c_objc_common_truthvalue_conversion, then remove any
4007 C_MAYBE_CONST_EXPR, if they have integer operands. Use
4008 c_objc_common_truthvalue_conversion not
4009 c_common_truthvalue_conversion.
4010 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
4011 call note_integer_operands for arguments with integer operands
4012 that are not integer constants.
4013
9feb29df
JJ
40142012-09-13 Jakub Jelinek <jakub@redhat.com>
4015
4016 PR c/54559
4017 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
4018 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
4019
d409320c
JJ
40202012-08-31 Jakub Jelinek <jakub@redhat.com>
4021
4022 PR c/54428
4023 * c-convert.c (convert): Don't call fold_convert_loc if
4024 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
4025 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
4026 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
4027
6265d07c
JJ
40282012-08-24 Jakub Jelinek <jakub@redhat.com>
4029
4030 PR c/54355
4031 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
4032 for nested and empty_ok arguments in the call to
4033 c_parser_declaration_or_fndef.
4034
1a4049e7
JJ
40352012-08-17 Jakub Jelinek <jakub@redhat.com>
4036
4037 * c-tree.h (c_last_sizeof_arg): Declare.
4038 * c-parser.c (struct c_tree_loc_pair): New type.
4039 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
4040 non-NULL.
4041 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
4042 (c_parser_postfix_expression_after_primary): Likewise. Call
4043 sizeof_pointer_memaccess_warning if needed.
4044 (sizeof_ptr_memacc_comptypes): New function.
4045 * c-typeck.c (c_last_sizeof_arg): New global variable.
4046 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
4047
0229aee9
UB
40482012-07-24 Uros Bizjak <ubizjak@gmail.com>
4049
4050 * c-lang.h (lang_decl): Add variable_size GTY option.
4051
7ee2468b
SB
40522012-07-16 Steven Bosscher <steven@gcc.gnu.org>
4053
4054 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
4055 * Make-lang.in: Fix dependencies.
4056
d4a10d0a
SB
40572012-06-29 Steven Bosscher <steven@gcc.gnu.org>
4058
4059 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
4060 and add language Makefile hooks.
4061 * config-lang.in: New file.
4062 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
4063 add the required "normal" config-lang.in rules.
4064 * c-lang.h: Moved from gcc/ to here.
4065 * c-tree.h: Likewise.
4066 * c-objc-common.c: Likewise.
4067 * c-objc-common.h: Likewise.
4068 * c-typeck.c: Likewise.
4069 * c-convert.c: Likewise.
4070 * c-lang.c: Likewise.
4071 * c-aux-info.c: Likewise.
4072 * c-errors.c: Likewise.
4073 * gccspec.c: Likewise.
4074 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
4075 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
4076\f
818ab71a 4077Copyright (C) 2012-2016 Free Software Foundation, Inc.
d4a10d0a
SB
4078
4079Copying and distribution of this file, with or without modification,
4080are permitted in any medium without royalty provided the copyright
4081notice and this notice are preserved.