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