]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
* optabs.c (prepare_cmp_insn): Update documentation comment.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
54dcdb88
BE
12016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2
3 PR c++/77496
4 * c-parser.c (c_parser_conditional_expression): Pass the rightmost
5 COMPOUND_EXPR to warn_for_omitted_condop.
6
e5106e27
DM
72016-09-07 David Malcolm <dmalcolm@redhat.com>
8
9 * c-lang.c (LANG_HOOKS_GET_SUBSTRING_LOCATION): Use
10 c_get_substring_location for this new langhook.
11
9dc5773f
JJ
122016-09-02 Jakub Jelinek <jakub@redhat.com>
13
14 PR c/65467
15 * c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
16 flag_openmp.
17 (c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
18 instead of mark_exp_read on low_bound/length expression.
19 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
20 c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
21 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
22 c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
23 c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
24 c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
25 c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
26 c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
27 c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
28 c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
29 instead of mark_expr_read.
30 (c_parser_omp_declare_reduction): Reject _Atomic qualified types.
31 * c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
32 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
33 * c-tree.h (c_omp_clause_copy_ctor): New prototype.
34 * c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
35 array section bases outside of depend clause, for depend clause
36 use convert_lvalue_to_rvalue on the base.
37 (c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
38 linear, aligned, map, to and from clauses.
39 (c_omp_clause_copy_ctor): New function.
40
295844f6
MP
412016-09-01 Marek Polacek <polacek@redhat.com>
42
43 PR c/7652
44 * c-typeck.c (composite_type): Add FALLTHRU comment.
45
089af25c
DM
462016-08-31 David Malcolm <dmalcolm@redhat.com>
47
48 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
49 to the insertion fixits for "struct", "union", and "enum".
50
f9087798
DM
512016-08-30 David Malcolm <dmalcolm@redhat.com>
52
53 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
54 rather than add_fixit_misspelled_id.
55 (undeclared_variable): Likewise.
56 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
57 now-redundant "here" params from add_fixit_insert method calls.
58 (c_parser_parameter_declaration): Likewise.
59 * c-typeck.c (build_component_ref): Remove now-redundant range
60 param from add_fixit_replace method calls.
61
ebef225f
MP
622016-08-25 Marek Polacek <polacek@redhat.com>
63
64 * c-typeck.c (parser_build_binary_op): Pass LHS to
65 warn_logical_not_parentheses.
66
fe377a48
MP
672016-08-25 Marek Polacek <polacek@redhat.com>
68
69 PR c/77323
70 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
71 or _FloatN or _FloatNx is not supported.
72 (finish_declspecs): Set type to integer_type_node when _FloatN or
73 _FloatNx is not supported.
74
c65699ef
JM
752016-08-19 Joseph Myers <joseph@codesourcery.com>
76
77 PR c/32187
78 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
79 (struct c_declspecs): Add field floatn_nx_idx.
80 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
81 and _FloatNx type specifiers.
82 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
83 (c_parser_declspecs, c_parser_attribute_any_word)
84 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
85 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
86 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
87 narrower than double.
88
2f1364c2
JJ
892016-08-12 Jakub Jelinek <jakub@redhat.com>
90 Martin Liska <mliska@suse.cz>
91
92 PR c/67410
93 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
94 % to determine val element to change. Assert that
95 wchar_bytes * charwidth fits into val array.
96
191816a3
MP
972016-08-12 Marek Polacek <polacek@redhat.com>
98
99 PR c/7652
100 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
101 (c_parser_postfix_expression): Likewise.
102 * c-typeck.c (build_unary_op): Adjust fall through comment.
103 (c_mark_addressable): Likewise.
104
b95a64bb
JJ
1052016-08-11 Jakub Jelinek <jakub@redhat.com>
106
107 PR c/72816
108 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
109 array member through typedef, for orig_qual_indirect == 0 clear
110 orig_qual_type.
111
895aa8e1
DM
1122016-08-08 David Malcolm <dmalcolm@redhat.com>
113
114 PR c/64955
115 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
116 this up to selftest::run_c_tests.
117 (selftest::run_c_tests): New function.
118
0b212d8c
TS
1192016-08-04 Thomas Schwinge <thomas@codesourcery.com>
120
ae9281fc
TS
121 * c-parser.c (struct oacc_routine_data): Add error_seen and
122 fndecl_seen members.
123 (c_finish_oacc_routine): Use these.
124 (c_parser_declaration_or_fndef): Adjust.
125 (c_parser_oacc_routine): Likewise. Support more C language
126 constructs, and improve diagnostics. Move pragma context
127 checking...
128 (c_parser_pragma): ... here.
129
0b212d8c
TS
130 * c-parser.c (struct oacc_routine_data): New.
131 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
132 Simplify code.
133 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
134 declare target" attribute.
135
76e2c821
JB
1362016-08-01 Jan Beulich <jbeulich@suse.com>
137
138 * c-fold.c (c_fully_fold_internal): Also emit shift count
139 warnings for vector types.
140 * c-typeck.c (build_binary_op): Likewise.
141
f618a472
MP
1422016-07-29 Marek Polacek <polacek@redhat.com>
143
144 PR c/71742
145 * c-decl.c (finish_struct): Rephrase an error message.
146
efd0786f
MP
147 PR c/71853
148 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
149 to error node for invalid code.
150
e00dceaf
MP
151 PR c/71573
152 * c-decl.c (implicitly_declare): Return decl early not only for
153 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
154
673a107a
JJ
1552016-07-29 Jakub Jelinek <jakub@redhat.com>
156
157 PR c/71969
158 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
159 on GNU extern inline functions.
160
a5b5c8b6
MP
1612016-07-29 Marek Polacek <polacek@redhat.com>
162
163 PR c/71583
164 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
165 check expr.value.
166
e3fe09c1
UB
1672016-07-22 Uros Bizjak <ubizjak@gmail.com>
168
169 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
170
7c8f7eaa
DM
1712016-07-20 David Malcolm <dmalcolm@redhat.com>
172
173 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
174 spellcheck-tree.h
175 (best_macro_match): Likewise, converting from a typedef to a
176 subclass.
177 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
178 (lookup_name_fuzzy): Update for change of best_macro_match to a
179 subclass with a ctor that calls cpp_forall_identifiers.
180
de6a69ee
DM
1812016-07-20 David Malcolm <dmalcolm@redhat.com>
182
183 * c-decl.c (implicit_decl_warning): Update for conversion of
184 return type of lookup_name_fuzzy to const char *.
185 (undeclared_variable): Likewise.
186 (lookup_name_fuzzy): Convert return type from tree to
187 const char *.
188 * c-parser.c (c_parser_declaration_or_fndef): Update for
189 conversion of return type of lookup_name_fuzzy to const char *.
190 (c_parser_parameter_declaration): Likewise.
191
b1c9c068
CP
1922016-07-15 Cesar Philippidis <cesar@codesourcery.com>
193
194 * c-parser.c (c_parser_oacc_declare): Don't scan for
195 GOMP_MAP_POINTER.
196 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
197 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
198 zero-length subarrays.
199
ddbbcb19
JJ
2002016-07-15 Jakub Jelinek <jakub@redhat.com>
201
202 PR c/71858
203 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
204 instead of FUZZY_LOOKUP_NAME.
205 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
206 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
207
dd36b877
JJ
2082016-07-14 Jakub Jelinek <jakub@redhat.com>
209
210 PR c/71858
211 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
212
8c681247
TS
2132016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
214
215 * c-parser.c (c_parser_generic_selection): Make type of variable
216 auto_vec.
217 (c_parser_omp_declare_simd): Likewise.
218
bf4fa671
TS
2192016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
220
221 * c-decl.c (struct c_struct_parse_info): Change member types
222 from vec to auto_vec.
223 (start_struct): Adjust.
224 (finish_struct): Likewise.
225
557e8c49
JJ
2262016-07-02 Jakub Jelinek <jakub@redhat.com>
227
228 PR c/71719
229 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
230
54d19c3b
TS
2312016-06-29 Thomas Schwinge <thomas@codesourcery.com>
232
233 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
234 Move pragma context checking into...
235 (c_parser_omp_cancellation_point): ... here, and improve
236 diagnostic messages.
237 * c-typeck.c (c_finish_omp_cancel)
238 (c_finish_omp_cancellation_point): Improve diagnostic messages.
239
152ef731
JJ
2402016-06-29 Jakub Jelinek <jakub@redhat.com>
241
242 PR c/71685
243 * c-typeck.c (c_build_qualified_type): Don't clear
244 C_TYPE_INCOMPLETE_VARS for the main variant.
245
2462016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
247
248 PR c/71552
249 * c-typeck.c (output_init_element): Diagnose incompatible types
250 before non-constant initializers.
251
e9ac1f86
JJ
2522016-06-28 Jakub Jelinek <jakub@redhat.com>
253
254 * Make-lang.in: Don't cat ../stage_current if it does not exist.
255
277d7ee0
AK
2562016-06-23 Andi Kleen <ak@linux.intel.com>
257
258 * Make-lang.in: Add support for autofdo.
259
1a4f11c8
DM
2602016-06-22 David Malcolm <dmalcolm@redhat.com>
261
262 PR c/70339
263 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
264 (implicit_decl_warning): When issuing warnings for implicit
265 declarations, attempt to provide a suggestion via
266 lookup_name_fuzzy.
267 (undeclared_variable): Likewise when issuing errors.
268 (lookup_name_in_scope): Likewise.
269 (struct edit_distance_traits<cpp_hashnode *>): New struct.
270 (best_macro_match): New typedef.
271 (find_closest_macro_cpp_cb): New function.
272 (lookup_name_fuzzy): New function.
273 * c-parser.c: Include gcc-rich-location.h.
274 (c_token_starts_typename): Split out case CPP_KEYWORD into...
275 (c_keyword_starts_typename): ...this new function.
276 (c_parser_declaration_or_fndef): When issuing errors about
277 missing "struct" etc, add a fixit. For other kinds of errors,
278 attempt to provide a suggestion via lookup_name_fuzzy.
279 (c_parser_parms_declarator): When looking ahead to detect typos in
280 type names, also reject CPP_KEYWORD.
281 (c_parser_parameter_declaration): When issuing errors about
282 unknown type names, attempt to provide a suggestion via
283 lookup_name_fuzzy.
284 * c-tree.h (c_keyword_starts_typename): New prototype.
285
5a578671
JM
2862016-06-20 Joseph Myers <joseph@codesourcery.com>
287
288 PR c/71601
289 * c-typeck.c (build_conditional_expr): Return error_mark_node if
290 c_common_type returns error_mark_node.
291
3f8257db 2922016-06-19 Martin Sebor <msebor@redhat.com>
aa0db437
MS
293
294 PR c/69507
295 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
296 __alignof__ (expression).
297
6a3f203c
DM
2982016-06-14 David Malcolm <dmalcolm@redhat.com>
299
300 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
301
264757fb
DM
3022016-06-14 David Malcolm <dmalcolm@redhat.com>
303
304 * c-typeck.c (build_component_ref): Simplify fixit code by
305 using gcc_rich_location::add_fixit_misspelled_id.
306 (set_init_label): Likewise.
307
f7e4f2e3
DM
3082016-06-13 David Malcolm <dmalcolm@redhat.com>
309
310 * c-parser.c (c_parser_initelt): Provide location of name for new
311 location_t param of set_init_label.
312 * c-tree.h (set_init_label): Add location_t param.
313 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
314 param and use it when issuing error messages about unrecognized
315 field names. Attempt to provide a fixit hint if appropriate,
316 otherwise update the error message to provide the type name.
317
4b1ffdb1
TS
3182016-06-10 Thomas Schwinge <thomas@codesourcery.com>
319
320 PR c/71381
321 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
322 Loosen checking.
323
44a845ca
MS
3242016-06-08 Martin Sebor <msebor@redhat.com>
325 Jakub Jelinek <jakub@redhat.com>
326
327 PR c++/70507
328 PR c/68120
329 * c-typeck.c (convert_arguments): Don't promote last argument
330 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
331
92a5f2ba
MP
3322016-06-08 Marek Polacek <polacek@redhat.com>
333
334 PR c/71418
335 * c-decl.c (grokdeclarator): Check TYPE_P.
336
08203f73
MP
337 PR c/71426
338 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
339 code.
340
6ffd47b7
DM
3412016-06-07 David Malcolm <dmalcolm@redhat.com>
342
343 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
344 and structure element reference, capture the location of the
345 element name token and pass it to build_component_ref.
346 (c_parser_postfix_expression_after_primary): Likewise for
347 structure element dereference.
348 (c_parser_omp_variable_list): Likewise for
349 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
350 * c-tree.h (build_component_ref): Add location_t param.
351 * c-typeck.c (build_component_ref): Add location_t param
352 COMPONENT_LOC. Use it, if available, when issuing hints about
353 mispelled member names to provide a fixit replacement hint.
354
1f40cff3
MP
3552016-06-06 Marek Polacek <polacek@redhat.com>
356
357 PR c/71362
358 * c-parser.c (c_parser_direct_declarator): Set location.
359
5545a907
MP
3602016-06-06 Marek Polacek <polacek@redhat.com>
361
362 * c-typeck.c (comptypes_internal): Handle comparisons of
363 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
364 TYPE_REF_CAN_ALIAS_ALL.
365
b605f663
CLT
3662016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
367
368 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
369 arguments as addressable when async clause exists.
370
00631022
JJ
3712016-05-30 Jakub Jelinek <jakub@redhat.com>
372
373 PR c++/71349
374 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
375 when combined with target construct.
376
7211a097
JJ
3772016-05-26 Jakub Jelinek <jakub@redhat.com>
378
379 * c-parser.c (c_parser_omp_clause_schedule): Warn if
380 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
381
95efe6b6
MP
3822016-05-25 Marek Polacek <polacek@redhat.com>
383
384 PR c/71265
385 * c-decl.c (c_make_fname_decl): Don't check seen_error.
386
a23faf7a
MP
387 PR c/71266
388 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
389
e46c7770
CP
3902016-05-24 Cesar Philippidis <cesar@codesourcery.com>
391
392 * c-parser.c (c_parser_oacc_declare): Add support for
393 GOMP_MAP_FIRSTPRIVATE_POINTER.
394 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
395 argument with enum c_omp_region_type ort.
396 (handle_omp_array_sections): Likewise. Update call to
397 handle_omp_array_sections_1.
398 (c_finish_omp_clauses): Add specific errors and warning messages for
399 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
400 call to handle_omp_array_sections.
401
a04e69c0
TS
4022016-05-24 Thomas Schwinge <thomas@codesourcery.com>
403
404 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
405
f17a223d
RB
4062016-05-24 Richard Biener <rguenther@suse.de>
407
408 PR middle-end/70434
409 PR c/69504
410 * c-typeck.c (build_array_ref): Do not complain about indexing
411 non-lvalue vectors. Adjust for function name change.
412
79063edd
MS
4132016-05-20 Martin Sebor <msebor@redhat.com>
414
415 PR c/71115
416 * c-typeck.c (error_init): Use
417 expansion_point_location_if_in_system_header.
418 (warning_init): Same.
419
8a40fef3
DM
4202016-05-19 David Malcolm <dmalcolm@redhat.com>
421
422 PR c/71171
423 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
424 in error-handling.
425 (c_parser_postfix_expression): Likewise.
426 * c-tree.h (c_expr::set_error): New method.
427 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
428 that result's range is initialized.
429
e9892350
JG
4302016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
431
432 * c-typeck.c (parser_build_unary_op): Fix formatting.
433
8fad45f5
MW
4342016-05-16 Matthew Wahab <matthew.wahab@arm.com>
435
436 * c-decl.c (grokdeclarator): Remove errmsg and use of
437 targetm.invalid_return_type.
438 (grokparms): Remove errmsg and use of
439 targetm.invalid_parameter_type.
440
aa4b467b
JM
4412016-05-13 Joseph Myers <joseph@codesourcery.com>
442
443 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
444 function return type.
445
4f2e1536
MP
4462016-05-12 Marek Polacek <polacek@redhat.com>
447
448 PR c/70756
449 * c-decl.c (build_compound_literal): Pass LOC down to
450 c_incomplete_type_error.
451 * c-tree.h (require_complete_type): Adjust declaration.
452 (c_incomplete_type_error): Likewise.
453 * c-typeck.c (require_complete_type): Add location parameter, pass it
454 down to c_incomplete_type_error.
455 (c_incomplete_type_error): Add location parameter, pass it down to
456 error_at.
457 (build_component_ref): Pass location down to c_incomplete_type_error.
458 (default_conversion): Pass location down to require_complete_type.
459 (build_array_ref): Likewise.
460 (build_function_call_vec): Likewise.
461 (convert_arguments): Likewise.
462 (build_unary_op): Likewise.
463 (build_c_cast): Likewise.
464 (build_modify_expr): Likewise.
465 (convert_for_assignment): Likewise.
466 (c_finish_omp_clauses): Likewise.
467
d6e83a8d
MM
4682016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
469
470 PR c/43651
471 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
472 is enabled.
473 * c-errors.c (pedwarn_c90): Return true if warned.
474 * c-tree.h (pedwarn_c90): Change return type to bool.
475 (enum c_declspec_word): Add new enumerator cdw_atomic.
476
5c3a10fb
MP
4772016-05-11 Marek Polacek <polacek@redhat.com>
478
479 PR c++/71024
480 * c-decl.c (diagnose_mismatched_decls): Factor out code to
481 diagnose_mismatched_attributes and call it.
482
cf68d92c
MP
4832016-05-10 Marek Polacek <polacek@redhat.com>
484
485 PR c/70255
486 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
487 on a declaration following the definition.
488
351f85c5
JJ
4892016-05-05 Jakub Jelinek <jakub@redhat.com>
490
491 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
492 parse it through to c_parser_c99_block_statement.
493 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
494 caller.
495
deef7113
MP
4962016-05-04 Marek Polacek <polacek@redhat.com>
497
498 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
499 OPT_Wdangling_else.
500
de55efd5
MP
5012016-05-04 Marek Polacek <polacek@redhat.com>
502
503 PR c/48778
504 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
505 for macro expansions.
506
79ce98bc
MP
5072016-05-03 Marek Polacek <polacek@redhat.com>
508
509 PR c/70859
510 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
511 check_builtin_function_arguments.
512
fb2647aa
RB
5132016-05-03 Richard Biener <rguenther@suse.de>
514
515 * Make-lang.in (cc1-checksum.c): For stage-final re-use
516 the checksum from the previous stage.
517
77886428
CP
5182016-05-02 Cesar Philippidis <cesar@codesourcery.com>
519
520 * c-parser.c (c_parser_oacc_all_clauses): Update call to
521 c_finish_omp_clauses.
522 (c_parser_omp_all_clauses): Likewise.
523 (c_parser_oacc_cache): Likewise.
524 (c_parser_oacc_loop): Likewise.
525 (omp_split_clauses): Likewise.
526 (c_parser_omp_declare_target): Likewise.
527 (c_parser_cilk_all_clauses): Likewise.
528 (c_parser_cilk_for): Likewise.
529 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
530 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
531
7176a4a0
MP
5322016-05-02 Marek Polacek <polacek@redhat.com>
533
534 PR c/70851
535 * c-decl.c (grokdeclarator): Diagnose when array's size has an
536 incomplete type.
537
e7ff0319
CP
5382016-04-29 Cesar Philippidis <cesar@codesourcery.com>
539
540 PR middle-end/70626
541 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
542 OACC_LOOP_CLAUSE_MASK.
543 (c_parser_oacc_kernels_parallel): Update call to
544 c_oacc_split_loop_clauses.
545
9f405ce1
AM
5462016-04-28 Andrew MacLeod <amacleod@redhat.com>
547
548 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
549 argument to build_modify_expr in two cases.
550
c1e1f433
BS
5512016-04-27 Bernd Schmidt <bschmidt@redhat.com>
552
553 * c-parser.c (c_parser_postfix_expression_after_primary): Call
554 warn_for_memset instead of warning directly here.
555
2448a956
MP
5562016-04-26 Marek Polacek <polacek@redhat.com>
557
558 PR c/67784
559 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
560 out of ...
561 (c_parser_for_statement): ... here.
562 (c_parser_if_statement): Use it.
563 (c_parser_switch_statement): Use it.
564 (c_parser_while_statement): Use it.
565
b02a5e26
MP
566 PR c/70791
567 * c-decl.c (pushdecl): Pass LOCUS down to warning.
568
477d4906
IV
5692016-04-20 Ilya Verbin <ilya.verbin@intel.com>
570
571 PR c++/69363
572 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
573 instead of c_finish_cilk_clauses.
574 * c-tree.h (c_finish_omp_clauses): Add new default argument.
575 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
576 floating-point variables in the linear clause for Cilk Plus.
577
fe37c7af
MM
5782016-04-18 Michael Matz <matz@suse.de>
579
580 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
581 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
582
949505a9
MP
5832016-04-15 Marek Polacek <polacek@redhat.com>
584
585 PR c/70671
586 * c-typeck.c (build_unary_op): Pass location down to error and
587 warning call.
588
dda1bf61
JJ
5892016-04-15 Jakub Jelinek <jakub@redhat.com>
590
591 PR c/70436
592 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
593 where needed.
594 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
595 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
596 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
597 Adjust c_parser_pragma callers.
598 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
599 caller.
600 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
601 c_parser_statement.
602 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
603 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
604 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
605 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
606 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
607 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
608 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
609 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
610 down where needed.
611 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
612 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
613 calls.
614
99cd9857
MP
6152016-04-13 Marek Polacek <polacek@redhat.com>
616
617 PR c/70436
618 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
619 adjust callers.
620 (c_parser_statement): Likewise.
621 (c_parser_c99_block_statement): Likewise.
622 (c_parser_while_statement): Likewise.
623 (c_parser_for_statement): Likewise.
624 (c_parser_if_body): Don't set IF_P here.
625 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
626 about dangling else here.
627 * c-tree.h (c_finish_if_stmt): Adjust declaration.
628 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
629 warn about dangling else here.
630
f13355da
MP
6312016-04-04 Marek Polacek <polacek@redhat.com>
632
633 PR c/70307
634 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
635
5fde6a45
MP
6362016-03-31 Marek Polacek <polacek@redhat.com>
637
638 PR c/70297
639 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
640
4bbf545b
DM
6412016-03-18 David Malcolm <dmalcolm@redhat.com>
642
643 PR c/70281
644 * c-parser.c (c_parser_postfix_expression): Set the source range
645 for uses of "__builtin_types_compatible_p".
646
fcc2b74f
JJ
6472016-03-17 Jakub Jelinek <jakub@redhat.com>
648
649 PR c/70280
650 * c-typeck.c (composite_type): Don't count void_list_node
651 into len, if the list is terminated by void_list_node, start
652 with void_list_node instead of NULL for newargs. Stop
653 at void_list_node.
654
ab4c578f
MP
6552016-03-16 Marek Polacek <polacek@redhat.com>
656
657 PR c/70093
658 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
659 nested functions returning VM types.
660
96b3c82d
CP
6612016-03-09 Cesar Philippidis <cesar@codesourcery.com>
662
663 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
664 when calling c_finish_omp_clauses.
665
29b9828f
BS
6662016-03-04 Bernd Schmidt <bschmidt@redhat.com>
667
668 PR c/69824
669 * c-decl.c (get_parm_info): Don't queue implicit function declarations
670 for later.
671
7ff6ca38
MP
6722016-03-04 Marek Polacek <polacek@redhat.com>
673
674 PR c/69798
675 * c-parser.c (c_parser_postfix_expression): Call
676 c_parser_cast_expression rather than c_parser_postfix_expression.
677
686e2237
JJ
6782016-03-01 Jakub Jelinek <jakub@redhat.com>
679
680 PR c/69796
681 PR c/69974
682 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
683 of incomplete decls to error_mark_node.
684
0b05329b
MP
6852016-02-24 Marek Polacek <polacek@redhat.com>
686
687 PR c/69819
688 * c-decl.c (finish_decl): Don't update the copy of the type of a
689 different decl type.
690
067fbd8b
JJ
6912016-02-23 Jakub Jelinek <jakub@redhat.com>
692
693 PR objc/69844
694 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
695 in id_kind reclassification.
696
bf14eba2
JJ
6972016-02-16 Jakub Jelinek <jakub@redhat.com>
698
699 PR c/69835
700 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
701
ba539195
JN
7022016-02-16 James Norris <jnorris@codesourcery.com>
703
704 PR c/64748
705 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
706
16595a1f
BS
7072016-02-12 Bernd Schmidt <bschmidt@redhat.com>
708
f48dfe98
BS
709 * c-decl.c (build_null_declspecs): Zero the entire struct.
710
16595a1f
BS
711 PR c/69522
712 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
713 callers changed. If nested_p is true, use it to call
714 finish_implicit_inits.
715 * c-tree.h (finish_implicit_inits): Declare.
716 * c-typeck.c (finish_implicit_inits): New function. Move code
717 from ...
718 (push_init_level): ... here.
719 (set_designator, process_init_element): Call finish_implicit_inits.
720
66756373
JJ
7212016-02-11 Jakub Jelinek <jakub@redhat.com>
722
723 PR c/69768
724 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
725 arguments for -Waddress warning.
726
1066e9b5
JJ
7272016-02-04 Jakub Jelinek <jakub@redhat.com>
728
729 PR c/69669
730 * c-decl.c (finish_enum): When honoring mode attribute,
731 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
732
3a5d2ba4
JJ
7332016-01-29 Jakub Jelinek <jakub@redhat.com>
734
735 PR debug/69518
736 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
737 all type variants, not just TYPE_MAIN_VARIANT.
738
cbdd8ae0
JJ
7392016-01-27 Jakub Jelinek <jakub@redhat.com>
740
741 PR debug/66869
742 * c-decl.c (c_write_global_declarations_1): Warn with
743 warn_unused_function if static prototype without definition
744 is not C_DECL_USED.
745
fa74a4bc
MP
7462016-01-27 Marek Polacek <polacek@redhat.com>
747
748 PR c/68062
749 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
750 to unsigned, if needed. Add -Wsign-compare warning.
751
13f92e8d
JJ
7522016-01-26 Jakub Jelinek <jakub@redhat.com>
753
754 PR tree-optimization/69483
755 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
756
cd8e73dc 7572016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
758
759 PR c/24293
760 * c-tree.h (incomplete_record_decls): Declare.
761 * c-parser.c (incomplete_record_decls): Define.
762 (c_parser_translation_unit): Iterate through incomplete_record_decls and
763 report error if any decl has zero size.
764 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
765 or enum type to incomplete_record_decls.
766
e6d6ec9e
TV
7672016-01-14 Tom de Vries <tom@codesourcery.com>
768
769 PR tree-optimization/68773
770 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
771 set force_output.
772
00083992
MP
7732016-01-14 Marek Polacek <polacek@redhat.com>
774
775 PR c/69262
776 * c-decl.c (grokdeclarator): Provide more information for invalid
777 array declarations.
778
7443cf13
DM
7792016-01-06 David Malcolm <dmalcolm@redhat.com>
780
781 * c-parser.c (c_parser_unary_expression): For dereferences, build
782 a combined location before calling build_indirect_ref, so that
783 error reports cover the full range, manually updating the c_expr
784 src_range.
785
6b131d5b
MP
7862016-01-06 Marek Polacek <polacek@redhat.com>
787
788 PR sanitizer/69099
789 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
790 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
791 NULL.
792
818ab71a
JJ
7932016-01-04 Jakub Jelinek <jakub@redhat.com>
794
795 Update copyright years.
796
2fe0a208
MP
7972016-01-04 Marek Polacek <polacek@redhat.com>
798
799 PR c/68908
800 * c-typeck.c (build_atomic_assign): Improve commentary. Add
801 optimization to use __atomic_fetch_* built-in if possible.
802
c7b48c8a
TS
8032015-12-23 Thomas Schwinge <thomas@codesourcery.com>
804
805 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
806 into...
807 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
808 all users.
809
fda5652f
MP
8102015-12-22 Marek Polacek <polacek@redhat.com>
811
812 PR c/69002
813 * c-typeck.c (build_component_ref): Warn when acessing elements of
814 atomic structures or unions.
815
745e411d
DM
8162015-12-21 David Malcolm <dmalcolm@redhat.com>
817
818 * c-typeck.c: Include "gcc-rich-location.h".
819 (build_binary_op): In the two places that call binary_op_error,
820 create a gcc_rich_location and populate it with the location of
821 the binary op and its two operands.
822
94c40e19
DM
8232015-12-16 David Malcolm <dmalcolm@redhat.com>
824
825 * c-parser.c (c_parser_statement_after_labels): When calling
826 c_finish_return, Use the return expression's location if it has
827 one, falling back to the location of the first token within it.
828 * c-typeck.c (c_finish_return): When issuing warnings about
829 the incorrect presence/absence of a return value, issue a note
830 showing the declaration of the function.
831
de67c4c3
DM
8322015-12-16 David Malcolm <dmalcolm@redhat.com>
833
834 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
835 to 4.
836 (c_parser_peek_nth_token): New function.
837 (c_parser_peek_conflict_marker): New function.
838 (c_parser_error): Detect conflict markers and report them as such.
839
a10704e1
DM
8402015-12-16 David Malcolm <dmalcolm@redhat.com>
841
842 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
843 to preserve range information for the primary expression
844 in the call to c_parser_postfix_expression_after_primary.
845
8062bca6
DM
8462015-12-16 David Malcolm <dmalcolm@redhat.com>
847
848 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
849 expression location, falling back on the first token location,
850 rather than always using the latter.
851
d06f8b75
MP
8522015-12-16 Marek Polacek <polacek@redhat.com>
853
854 PR c/64637
855 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
856 available.
857
2994fb91
MP
8582015-12-15 Marek Polacek <polacek@redhat.com>
859
860 PR c/68907
861 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
862 artificial decl.
863
a1b93f8d
DM
8642015-12-08 David Malcolm <dmalcolm@redhat.com>
865
866 * c-parser.c (c_parser_alignof_expression): Capture location of
867 closing parenthesis (if any), or of end of unary expression, and
868 use it to build a src_range for the expression.
869
46c6e1e2
DM
8702015-12-08 David Malcolm <dmalcolm@redhat.com>
871
872 PR c/68757
873 * c-parser.c (c_parser_get_builtin_args): Add
874 "out_close_paren_loc" param, and write back to it.
875 (c_parser_postfix_expression): Capture the closing
876 parenthesis location for RID_CHOOSE_EXPR,
877 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
878 RID_BUILTIN_SHUFFLE and use it to set the source range
879 for such expressions; within RID_BUILTIN_COMPLEX set
880 the underlying location.
881
66189108
MP
8822015-12-07 Marek Polacek <polacek@redhat.com>
883
884 PR c/68668
885 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
886 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
887
f187980b
EB
8882015-12-04 Eric Botcazou <ebotcazou@adacore.com>
889
890 * c-tree.h (c_build_va_arg): Adjust prototype.
891 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
892 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
893 parameter, adjust throughout and issue an error if EXPR is a component
894 with reverse storage order.
895
4250754e
JM
8962015-12-02 Jason Merrill <jason@redhat.com>
897
898 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
899 (c_fully_fold_internal, decl_constant_value_for_optimization):
900 Move from c-common.c.
901 * c-tree.h: Declare decl_constant_value_for_optimization.
902 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
903
e9e32ee6
JM
9042015-12-02 Joseph Myers <joseph@codesourcery.com>
905
906 PR c/68162
907 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
908 following link from declarator to next declarator. Track original
909 qualified type and pass it to c_build_qualified_type.
910 * c-typeck.c (c_build_qualified_type): Add arguments
911 orig_qual_type and orig_qual_indirect.
912
ff7a55bf
TS
9132015-12-02 Thomas Schwinge <thomas@codesourcery.com>
914
915 * c-parser.c (c_parser_omp_clause_name)
916 (c_parser_oacc_all_clauses): Alphabetical sorting.
917
657e4e47
JJ
9182015-12-02 Jakub Jelinek <jakub@redhat.com>
919
920 PR c/68533
921 * c-decl.c (get_parm_info): Use b->locus instead of input_location
922 for diagnostics.
923
37d5ad46
JB
9242015-12-01 Julian Brown <julian@codesourcery.com>
925 Cesar Philippidis <cesar@codesourcery.com>
926 James Norris <James_Norris@mentor.com>
927
928 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
929 (c_parser_oacc_clause_use_device): New function.
930 (c_parser_oacc_all_clauses): Add use_device support.
931 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
932 (c_parser_oacc_host_data): New function.
933 (c_parser_omp_construct): Add host_data support.
934 * c-tree.h (c_finish_oacc_host_data): Add prototype.
935 * c-typeck.c (c_finish_oacc_host_data): New function.
936 (c_finish_omp_clauses): Add use_device support.
937
a4850ce9
JH
9382015-11-29 Jan Hubicka <hubicka@ucw.cz>
939
940 PR c/67106
941 * c-decl.c: Set TYPE_PACKED in variants.
942
b58d3df2
ML
9432015-11-27 Martin Liska <mliska@suse.cz>
944
945 PR c++/68312
946 * c-array-notation.c (fix_builtin_array_notation_fn):
947 Use release_vec_vec instead of vec::release.
948 (build_array_notation_expr): Likewise.
949 (fix_conditional_array_notations_1): Likewise.
950 (fix_array_notation_expr): Likewise.
951 (fix_array_notation_call_expr): Likewise.
952
aec17bfe
JJ
9532015-11-27 Jakub Jelinek <jakub@redhat.com>
954
955 PR c/63326
956 * c-parser.c (c_parser_compound_statement_nostart): If
957 last_label is true, use pragma_stmt instead of pragma_compound
958 as second c_parser_pragma argument.
959 (c_parser_omp_ordered, c_parser_omp_target_update,
960 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
961 false as second argument to c_parser_skip_to_pragma_eol after
962 diagnosing standalone directives used in pragma_stmt context.
963
688c4de0
IV
9642015-11-24 Ilya Verbin <ilya.verbin@intel.com>
965
966 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
967 with "if (ENABLE_OFFLOADING)".
968
cbd03aee
DM
9692015-11-23 David Malcolm <dmalcolm@redhat.com>
970
971 PR objc/68438
972 * c-parser.c (c_parser_postfix_expression): Set up source ranges
973 for various Objective-C constructs: Class.name syntax,
974 @selector(), @protocol(), @encode(), and [] message syntax.
975
a87a86e1
DM
9762015-11-20 David Malcolm <dmalcolm@redhat.com>
977
978 PR 62314
979 * c-typeck.c (should_suggest_deref_p): New function.
980 (build_component_ref): Special-case POINTER_TYPE when
981 generating a "not a structure of union" error message, and
982 suggest a "->" rather than a ".", providing a fix-it hint.
983
8ece8dfb
DM
9842015-11-19 David Malcolm <dmalcolm@redhat.com>
985
986 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
987 candidate into a new function, find_closest_identifier.
988
433068cc
MP
9892015-11-19 Marek Polacek <polacek@redhat.com>
990
991 PR c/68412
992 * c-typeck.c (parser_build_binary_op): Properly handle
993 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
994
bef08b71
DM
9952015-11-17 David Malcolm <dmalcolm@redhat.com>
996
997 * c-parser.c (set_c_expr_source_range): Bulletproof both
998 overloaded implementations against NULL expr->value.
999 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
1000 values.
1001 (c_parser_unary_expression): Likewise when handling addresses of
1002 labels.
1003 (c_parser_postfix_expression): Likewise for statement expressions,
1004 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
1005 __builtin_va_arg, and for __builtin_offset_of.
1006 (c_parser_postfix_expression_after_paren_type): Initialize expr's
1007 src_range using the range of the braced initializer.
1008 (c_parser_transaction_expression): Set src_range for "ret" to a
1009 sane pair of values.
1010
fff77217
KY
10112015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
1012
1013 * c-parser.c (c_finish_omp_declare_simd): Look for
1014 "simd" attribute as well. Update error message.
1015
1d899da2
TS
10162015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
1017
1018 * c-parser.c (c_parser_omp_declare_target): Adjust.
1019
e4606348
JJ
10202015-11-14 Jakub Jelinek <jakub@redhat.com>
1021
1022 * c-typeck.c (c_finish_omp_clauses): Don't mark
1023 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
1024
3e636daf
MP
10252015-11-14 Marek Polacek <polacek@redhat.com>
1026
1027 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
1028 * c-typeck.c: Likewise.
1029
ebedc9a3
DM
10302015-11-13 David Malcolm <dmalcolm@redhat.com>
1031
1032 * c-decl.c (warn_defaults_to): Pass line_table to
1033 rich_location ctor.
1034 * c-errors.c (pedwarn_c99): Likewise.
1035 (pedwarn_c90): Likewise.
1036 * c-parser.c (set_c_expr_source_range): New functions.
1037 (c_token::get_range): New method.
1038 (c_token::get_finish): New method.
1039 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
1040 based on the range from the start of the LHS to the end of the
1041 RHS.
1042 (c_parser_conditional_expression): Likewise, based on the range
1043 from the start of the cond.value to the end of exp2.value.
1044 (c_parser_binary_expression): Call set_c_expr_source_range on
1045 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1046 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1047 based on the cast_loc through to the end of the expr.
1048 (c_parser_unary_expression): Likewise, based on the
1049 op_loc through to the end of op.
1050 (c_parser_sizeof_expression) Likewise, based on the start of the
1051 sizeof token through to either the closing paren or the end of
1052 expr.
1053 (c_parser_postfix_expression): Likewise, using the token range,
1054 or from the open paren through to the close paren for
1055 parenthesized expressions.
1056 (c_parser_postfix_expression_after_primary): Likewise, for
1057 various kinds of expression.
1058 * c-tree.h (struct c_expr): Add field "src_range".
1059 (c_expr::get_start): New method.
1060 (c_expr::get_finish): New method.
1061 (set_c_expr_source_range): New decls.
1062 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1063 on ret for prefix unary ops.
1064 (parser_build_binary_op): Likewise, running from the start of
1065 arg1.value through to the end of arg2.value.
1066
ec8b536f
MP
10672015-11-13 Marek Polacek <polacek@redhat.com>
1068
1069 PR c/68320
1070 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1071
277fe616
DM
10722015-11-13 David Malcolm <dmalcolm@redhat.com>
1073
1074 * c-typeck.c: Include spellcheck.h.
1075 (lookup_field_fuzzy_find_candidates): New function.
1076 (lookup_field_fuzzy): New function.
1077 (build_component_ref): If the field was not found, try using
1078 lookup_field_fuzzy and potentially offer a suggestion.
1079
6e232ba4
JN
10802015-11-12 James Norris <jnorris@codesourcery.com>
1081 Joseph Myers <joseph@codesourcery.com>
1082
1083 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1084 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1085 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1086 and PRAGMA_OMP_CLAUSE_LINK.
1087 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1088 and PRAGMA_OACC_CLAUSE_LINK.
1089 (OACC_DECLARE_CLAUSE_MASK): New definition.
1090 (c_parser_oacc_declare): New function.
1091
9be4f715
MP
10922015-11-12 Marek Polacek <polacek@redhat.com>
1093
1094 PR c/67784
1095 * c-parser.c (c_parser_for_statement): Reclassify the token in
1096 a correct scope.
1097
e78bede6
MP
10982015-11-11 Marek Polacek <polacek@redhat.com>
1099
1100 PR c/68107
1101 PR c++/68266
1102 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1103 checking the size of an array.
1104
69f293c9
AM
11052015-11-11 Andrew MacLeod <amacleod@redhat.com>
1106
1107 * c-array-notation.c: Remove unused header files.
1108 * c-aux-info.c: Likewise.
1109 * c-convert.c: Likewise.
1110 * c-decl.c: Likewise.
1111 * c-errors.c: Likewise.
1112 * c-lang.c: Likewise.
1113 * c-objc-common.c: Likewise.
1114 * c-parser.c: Likewise.
1115 * c-typeck.c: Likewise.
1116 * gccspec.c: Likewise.
1117
3a40d81d
NS
11182015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1119 Cesar Philippidis <cesar@codesourcery.com>
1120 James Norris <jnorris@codesourcery.com>
1121 Julian Brown <julian@codesourcery.com>
1122 Nathan Sidwell <nathan@codesourcery.com>
1123
1124 c/
1125 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1126 routine arg.
1127 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1128 (c_parser_pragma): Parse 'acc routine'.
1129 (OACC_ROUTINE_CLAUSE_MARK): Define.
1130 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1131
fc402eec
AA
11322015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1133
1134 PR debug/67192
1135 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1136 location of the backward-goto to the start of the loop body.
1137
f6b0b3db
AA
11382015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1139
1140 PR debug/67192
1141 * c-parser.c (c_parser_while_statement): Finish the loop before
1142 parsing ahead for misleading indentation.
1143 (c_parser_for_statement): Likewise.
1144
ee45a32d
EB
11452015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1146
1147 * c-decl.c (finish_struct): If the structure has reverse storage
1148 order, rewrite the type of array fields with scalar component. Call
1149 maybe_apply_pragma_scalar_storage_order on entry.
1150 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1151 errors on bit-fields and reverse SSO here and not...
1152 (c_mark_addressable): ...here.
1153 (output_init_element): Adjust call to initializer_constant_valid_p.
1154 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1155
8a645150
DM
11562015-11-06 David Malcolm <dmalcolm@redhat.com>
1157
1158 * c-decl.c (warn_defaults_to): Update for change in signature
1159 of diagnostic_set_info.
1160 * c-errors.c (pedwarn_c99): Likewise.
1161 (pedwarn_c90): Likewise.
1162 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1163 for textinfo::set_location.
1164
7a5e4956
CP
11652015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1166 Thomas Schwinge <thomas@codesourcery.com>
1167 James Norris <jnorris@codesourcery.com>
1168
1169 * c-parser.c (c_parser_omp_clause_name): Add support for
1170 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1171 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1172 default(none) in OpenACC.
1173 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1174 arguments.
1175 (c_parser_oacc_clause_tile): New function.
1176 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1177 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1178 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1179 TILE}.
1180 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1181 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1182 FIRSTPRIVATE}.
1183 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1184 (c_parser_oacc_update): Update the error message for missing clauses.
1185 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1186 and OMP_CLAUSE_INDEPENDENT.
1187
bfcfbfa0
MP
11882015-11-05 Marek Polacek <polacek@redhat.com>
1189
1190 PR c/68090
1191 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1192 deal with pre-evaluation on invalid types.
1193
e01d41e5
JJ
11942015-11-05 Jakub Jelinek <jakub@redhat.com>
1195 Ilya Verbin <ilya.verbin@intel.com>
1196
1197 * c-parser.c: Include context.h and gimple-expr.h.
1198 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1199 monotonic together with nonmonotonic.
1200 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1201 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1202 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1203 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1204 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1205 expressions on combined target teams before the target.
1206 (c_parser_omp_declare_target): If decl has "omp declare target" or
1207 "omp declare target link" attribute, and cgraph or varpool node already
1208 exists, then set corresponding flags. Call c_finish_omp_clauses
1209 in the parenthesized extended-list syntax case.
1210 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1211 declare target.
1212 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1213 on OMP_CLAUSE_REDUCTION array sections.
1214 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1215 into the constant offset, or for variable low-bound using
1216 POINTER_PLUS_EXPR. For structure element based array sections use
1217 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1218 (c_finish_omp_clauses): Drop generic_field_head, structure
1219 elements are now always mapped even as array section bases,
1220 diagnose same var in data sharing and mapping clauses. Diagnose if
1221 linear step on declare simd is neither a constant nor a uniform
1222 parameter. Look through POINTER_PLUS_EXPR for array section
1223 reductions. Diagnose the same var or function appearing multiple
1224 times on the same directive. Fix up wording for the to clause if t
1225 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1226 modifier on kinds other than dynamic or guided or nonmonotonic
1227 modifier together with ordered clause.
1228
4bf9e5a8
TS
12292015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1230 Chung-Lin Tang <cltang@codesourcery.com>
1231
1232 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1233
2adfab87
AM
12342015-10-29 Andrew MacLeod <amacleod@redhat.com>
1235
1236 * c-array-notation.c: Reorder #include's and remove duplicates.
1237 * c-aux-info.c: Likewise.
1238 * c-convert.c: Likewise.
1239 * c-decl.c: Likewise.
1240 * c-errors.c: Likewise.
1241 * c-lang.c: Likewise.
1242 * c-objc-common.c: Likewise.
1243 * c-parser.c: Likewise.
1244 * c-typeck.c: Likewise.
1245
e922069e
JW
12462015-10-26 Jim Wilson <jim.wilson@linaro.org>
1247
1248 PR debug/66068
1249 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1250 after calling build_qualified_type.
1251
765dd391
CP
12522015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1253 Thomas Schwinge <thomas@codesourcery.com>
1254 James Norris <jnorris@codesourcery.com>
1255 Joseph Myers <joseph@codesourcery.com>
1256 Julian Brown <julian@codesourcery.com>
1257 Bernd Schmidt <bschmidt@redhat.com>
1258
1259 * c-parser.c (c_parser_oacc_shape_clause): New.
1260 (c_parser_oacc_simple_clause): New.
1261 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1262 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1263
88bae6f4
TS
12642015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1265 James Norris <jnorris@codesourcery.com>
1266 Cesar Philippidis <cesar@codesourcery.com>
1267
1268 PR c/64765
1269 PR c/64880
1270 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1271 parameters, and handle these. Adjust all users.
1272 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1273 into...
1274 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1275 all users.
1276 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1277 declare functions.
1278 (c_finish_omp_construct): Declare function.
1279 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1280 Merge functions into...
1281 (c_finish_omp_construct): ... this new function.
1282
a8fc2579
RB
12832015-10-22 Richard Biener <rguenther@suse.de>
1284
1285 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1286 before folding a MINUS_EXPR.
1287
e9122ef6
MP
12882015-10-21 Marek Polacek <polacek@redhat.com>
1289
1290 PR c/68024
1291 * c-decl.c (start_function): Warn about vararg functions without
1292 a prototype.
1293
9f47c7e5
IE
12942015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1295
1296 * c-typeck.c (build_conditional_expr): Use boolean vector
1297 type for vector comparison.
1298 (build_vec_cmp): New.
1299 (build_binary_op): Use build_vec_cmp for comparison.
1300
fa60eeb9
MP
13012015-10-20 Marek Polacek <polacek@redhat.com>
1302
1303 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1304
2c7020eb
MP
13052015-10-20 Marek Polacek <polacek@redhat.com>
1306
1307 PR c/67964
1308 * c-parser.c (c_parser_attributes): Break out of the loop if the
1309 token after an attribute isn't a comma.
1310
d9a6bd32
JJ
13112015-10-13 Jakub Jelinek <jakub@redhat.com>
1312 Aldy Hernandez <aldyh@redhat.com>
1313
1314 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1315 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1316 (c_parser_omp_variable_list): Handle structure elements for
1317 map, to and from clauses. Handle array sections in reduction
1318 clause. Formatting fixes.
1319 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1320 if clause modifiers.
1321 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1322 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1323 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1324 c_parser_omp_clause_is_device_ptr): New functions.
1325 (c_parser_omp_clause_ordered): Parse optional parameter.
1326 (c_parser_omp_clause_reduction): Handle array reductions.
1327 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1328 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1329 functions.
1330 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1331 (c_parser_omp_clause_depend_sink): New function.
1332 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1333 (c_parser_omp_clause_map): Parse release/delete map kinds and
1334 optional always modifier.
1335 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1336 and c_finish_omp_clauses callers.
1337 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1338 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1339 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1340 (OMP_CRITICAL_CLAUSE_MASK): Define.
1341 (c_parser_omp_critical): Parse critical clauses.
1342 (c_parser_omp_for_loop): Handle doacross loops, adjust
1343 c_finish_omp_for and c_finish_omp_clauses callers.
1344 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1345 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1346 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1347 (c_parser_omp_for): Disallow ordered clause when combined with
1348 distribute. Disallow linear clause when combined with distribute
1349 and not combined with simd.
1350 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1351 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1352 parse clauses and if depend clause is found, don't parse a body.
1353 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1354 Allow target parallel without for after it.
1355 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1356 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1357 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1358 invalid kinds.
1359 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1360 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1361 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1362 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1363 functions.
1364 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1365 defaultmap and is_device_ptr clauses.
1366 (c_parser_omp_target): Parse target parallel and target simd. Set
1367 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1368 and target exit data. Diagnose invalid map kinds.
1369 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1370 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1371 construct.
1372 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1373 &omp_priv.
1374 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1375 (c_parser_omp_taskloop): New function.
1376 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1377 handle PRAGMA_OMP_TASKLOOP.
1378 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1379 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1380 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1381 Add IS_OMP argument, handle structure element bases, diagnose
1382 bitfields, pass IS_OMP recursively, diagnose known zero length
1383 array sections in depend clauses, handle array sections in reduction
1384 clause, diagnose negative length even for pointers.
1385 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1386 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1387 array sections in reduction clause, set
1388 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1389 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1390 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1391 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1392
21ba0cea
MP
13932015-10-06 Marek Polacek <polacek@redhat.com>
1394
1395 * c-parser.c (c_parser_statement_after_labels): Use
1396 protected_set_expr_location.
1397 (c_parser_omp_clause_num_gangs): Likewise.
1398 (c_parser_omp_clause_num_threads): Likewise.
1399 (c_parser_omp_clause_num_workers): Likewise.
1400 (c_parser_omp_clause_vector_length): Likewise.
1401 (c_parser_omp_clause_num_teams): Likewise.
1402 (c_parser_omp_clause_thread_limit): Likewise.
1403 * c-typeck.c (build_c_cast): Likewise.
1404 (c_cast_expr): Likewise.
1405
624d31fe
RS
14062015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1407
1408 * c-typeck.c (c_tree_equal): Use real_equal instead of
1409 REAL_VALUES_EQUAL.
1410
b8fd7909
JM
14112015-10-04 Jason Merrill <jason@redhat.com>
1412
1413 * c-parser.c (c_lex_one_token): Handle @synchronized.
1414 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1415 can change whether the function is transaction_safe.
1416
1c7485af
MP
14172015-10-02 Marek Polacek <polacek@redhat.com>
1418
1419 PR c/67730
1420 * c-typeck.c (convert_for_assignment): Use the expansion point
1421 location throughout.
1422
3e3b8d63
MP
14232015-10-02 Marek Polacek <polacek@redhat.com>
1424
1425 PR c/64249
1426 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1427 and pass it down to c_parser_if_statement.
1428 (c_parser_else_body): Add CHAIN parameter and pass it down to
1429 c_parser_statement_after_labels.
1430 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1431 duplicated if-else-if conditions.
1432
aabef2de
MP
14332015-10-01 Marek Polacek <polacek@redhat.com>
1434
1435 * c-typeck.c (convert_for_assignment): Improve commentary.
1436
de8ddd5f
MP
14372015-09-30 Marek Polacek <polacek@redhat.com>
1438
1439 PR c/67730
1440 * c-typeck.c (c_finish_return): Use the expansion point location for
1441 certain "return with value" warnings.
1442
c4914de6
MLI
14432015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1444
1445 * c-parser.c (pragma_lex): Add loc argument.
1446
0e36f5c7
MP
14472015-09-15 Marek Polacek <polacek@redhat.com>
1448
1449 PR c/67580
1450 * c-decl.c (tag_exists_p): New function.
1451 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1452 struct/union/enum keywords are missing.
1453 * c-tree.h (tag_exists_p): Declare.
1454
2f3bb934
MP
14552015-09-15 Marek Polacek <polacek@redhat.com>
1456
1457 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1458 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1459 Return NULL_TREE instead of 0.
1460 (lookup_name): Return NULL_TREE instead of 0.
1461 (lookup_name_in_scope): Likewise.
1462 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1463 (parser_xref_tag): Use false instead of 0.
1464 (start_struct): Use true instead of 1.
1465 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1466
aa256c4a
MP
14672015-09-14 Marek Polacek <polacek@redhat.com>
1468
1469 * c-typeck.c (set_nonincremental_init_from_string): Use
1470 HOST_WIDE_INT_M1U when shifting a negative value.
1471
dbb68221
MW
14722015-09-09 Mark Wielaard <mjw@redhat.com>
1473
1474 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1475 parm against NULL.
1476
a8a098ac
JJ
14772015-09-10 Jakub Jelinek <jakub@redhat.com>
1478
1479 PR c/67502
1480 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1481 into OMP_FOR_PRE_BODY rather than before the loop.
1482
f4b189d5
JJ
14832015-09-09 Jakub Jelinek <jakub@redhat.com>
1484
0bb99c11
JJ
1485 PR c/67501
1486 * c-parser.c (c_parser_oacc_all_clauses,
1487 c_parser_omp_all_clauses): Remove invalid clause from
1488 list of clauses even if parser->error is set.
1489
fce5e5e3
JJ
1490 PR c/67500
1491 * c-parser.c (c_parser_omp_clause_aligned,
1492 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1493 test for errors.
1494 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1495 error_mark_node.
1496
f4b189d5
JJ
1497 PR c/67495
1498 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1499 instead of c_parser_unary_expression. If the result is !lvalue_p,
1500 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1501
b2aaf235
MP
15022015-09-04 Marek Polacek <polacek@redhat.com>
1503
1504 PR sanitizer/67279
1505 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1506
1807ffc1
MS
15072015-09-03 Martin Sebor <msebor@redhat.com>
1508
1509 PR c/66516
8b652e65
JJ
1510 * c-typeck.c (convert_arguments, parser_build_unary_op,
1511 build_conditional_expr, c_cast_expr, convert_for_assignment,
1512 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1513 reject_gcc_builtin.
1514 (c_decl_implicit): Define.
1515
d04ff417
MP
15162015-09-02 Marek Polacek <polacek@redhat.com>
1517
1518 PR c/67432
1519 * c-parser.c (c_parser_enum_specifier): Give a better error for
1520 an empty enum.
1521
a79683d5
TS
15222015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1523
1524 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1525
191a6b94
MP
15262015-08-12 Marek Polacek <polacek@redhat.com>
1527
1528 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1529 LOC to it.
1530
420a9d9b
MP
15312015-08-03 Marek Polacek <polacek@redhat.com>
1532
1533 PR c/67088
1534 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1535 Use it.
1536 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1537
992118a1
PP
15382015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1539
1540 * c-parser.c (c_parser_if_body): Take token_indent_info
1541 argument. Call warn_for_misleading_indentation even when the
1542 body is a semicolon. Extract token_indent_infos corresponding
1543 to the guard, body and next tokens. Adjust call to
1544 warn_for_misleading_indentation accordingly.
1545 (c_parser_else_body): Likewise.
1546 (c_parser_if_statement): Likewise.
1547 (c_parser_while_statement): Likewise.
1548 (c_parser_for_statement): Likewise.
1549
46308474
LFSM
15502015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1551 Manuel López-Ibáñez <manu@gcc.gnu.org>
1552
1553 * c-decl.c (get_parm_info): Remove static var. Update warning
1554 message.
1555
05b28fd6
MP
15562015-07-27 Marek Polacek <polacek@redhat.com>
1557
1558 PR c++/66555
1559 PR c/54979
1560 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1561
451b5e48
MP
15622015-07-20 Marek Polacek <polacek@redhat.com>
1563
1564 PR c++/55095
1565 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1566 (build_binary_op): Warn about left shift overflows.
1567
1916bcb5
AM
15682015-07-09 Andrew MacLeod <amacleod@redhat.com>
1569
1570 * c-array-notation.c: Adjust includes for flags.h changes.
1571 * c-objc-common.c: Likewise.
1572
c7131fb2
AM
15732015-07-07 Andrew MacLeod <amacleod@redhat.com>
1574
1575 * c-array-notation.c: Adjust includes.
1576 * c-aux-info.c: Likewise.
1577 * c-convert.c: Likewise.
1578 * c-decl.c: Likewise.
1579 * c-errors.c: Likewise.
1580 * c-lang.c: Likewise.
1581 * c-objc-common.c: Likewise.
1582 * c-parser.c: Likewise.
1583 * c-typeck.c: Likewise.
1584
da2e71c9
MLI
15852015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1586
1587 PR fortran/66605
1588 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1589
b155cfd9
MP
15902015-06-29 Marek Polacek <polacek@redhat.com>
1591
1592 PR c/66322
1593 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1594 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1595 about -Wswitch-bool here.
1596 (do_case): Update c_add_case_label call.
1597 (c_finish_case): Update c_do_switch_warnings call.
1598
31521951
MP
15992015-06-27 Marek Polacek <polacek@redhat.com>
1600
1601 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1602
22d03525
MP
16032015-06-26 Marek Polacek <polacek@redhat.com>
1604
1605 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1606 INDIRECT_REF_P.
1607 * c-typeck.c (array_to_pointer_conversion): Likewise.
1608 (build_unary_op): Likewise.
1609 (c_finish_return): Likewise.
1610
f0889939
AM
16112015-06-25 Andrew MacLeod <amacleod@redhat.com>
1612
1613 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1614 * c-parser.c: Likewise.
1615
8d67ee55
RS
16162015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1617
1618 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1619 instead of pointer_hash.
1620 (detect_field_duplicates): Likewise.
1621
0ae9bd27
MP
16222015-06-25 Marek Polacek <polacek@redhat.com>
1623
1624 * c-array-notation.c: Use VAR_P throughout.
1625 * c-decl.c: Likewise.
1626 * c-objc-common.c: Likewise.
1627 * c-parser.c: Likewise.
1628 * c-typeck.c: Likewise.
1629
62f9079a
MP
16302015-06-25 Marek Polacek <polacek@redhat.com>
1631
1632 * c-decl.c: Use is_global_var throughout.
1633 * c-parser.c: Likewise.
1634 * c-typeck.c: Likewise.
1635
abb226c9
AM
16362015-06-17 Andrew MacLeod <amacleod@redhat.com>
1637
1638 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1639 * c-aux-info.c: Likewise.
1640 * c-convert.c: Likewise.
1641 * c-decl.c: Likewise.
1642 * c-errors.c: Likewise.
1643 * c-lang.c: Likewise.
1644 * c-objc-common.c: Likewise.
1645 * c-parser.c: Likewise.
1646 * c-typeck.c: Likewise.
1647
8cbababc
JH
16482015-06-11 Jan Hubicka <hubicka@ucw.cz>
1649
1650 PR middle-end/66325
1651 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1652 variants.
1653
a0349665
PMR
16542015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1655
1656 * c-decl.c (pop_scope): Register the main translation unit
1657 through the new debug hook.
1658
13fdf2e2
AM
16592015-06-08 Andrew MacLeod <amacleod@redhat.com>
1660
1661 * c-array-notation.c : Adjust include files.
1662 * c-aux-info.c : Likewise.
1663 * c-convert.c : Likewise.
1664 * c-decl.c : Likewise.
1665 * c-errors.c : Likewise.
1666 * c-lang.c : Likewise.
1667 * c-lang.h : Likewise.
1668 * c-objc-common.c : Likewise.
1669 * c-parser.c : Likewise.
1670 * c-typeck.c : Likewise.
1671
d7438551
AH
16722015-06-05 Aldy Hernandez <aldyh@redhat.com>
1673
1674 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1675 immediately clobber it.
1676 (c_write_global_declarations_1): Remove call to
1677 check_global_declaration_1.
1678 (c_write_global_declarations_2): Remove.
1679 (c_write_final_cleanups): Rename from c_write_global_declarations.
1680 Remove call to finalize_compilation_unit.
1681 Remove calls to debugging hooks.
1682 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1683 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1684 * c-tree.h: Remove c_write_global_declarations.
1685
ecb9f223
AM
16862015-06-04 Andrew MacLeod <amacleod@redhat.com>
1687
1688 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1689 * c-aux-info.c: Likewise.
1690 * c-convert.c: Likewise.
1691 * c-decl.c: Likewise.
1692 * c-errors.c: Likewise.
1693 * c-lang.c: Likewise.
1694 * c-objc-common.c: Likewise.
1695 * c-parser.c: Likewise.
1696 * c-typeck.c: Likewise.
1697
9482b620
MP
16982015-06-04 Marek Polacek <polacek@redhat.com>
1699
1700 PR c/66341
1701 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1702 it is a lvalue.
1703
bc51ace3
PK
17042015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1705
1706 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1707 Warn for empty struct.
1708 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1709
ea5b45b6
AT
17102015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1711
1712 * c-decl.c (start_function): Call plugin before parsing.
1713 (finish_function): Call plugin after parsing.
1714
c2d47482
PK
17152015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1716
1717 PR c/49551
1718 * c-decl.c (merge_decls): Merge DECL_COMMON.
1719
a95492ab
JW
17202015-05-22 Jim Wilson <jim.wilson@linaro.org>
1721
1722 * Make-lang.in (check_gcc_pallelize): Define.
1723
fd5c817a
MP
17242015-05-22 Marek Polacek <polacek@redhat.com>
1725
1726 PR c/47043
1727 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1728 attributes.
1729
c7b70a3c
MP
17302015-05-21 Marek Polacek <polacek@redhat.com>
1731
1732 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1733 DECL_BUILT_IN.
1734
21b634ae
MP
17352015-05-20 Marek Polacek <polacek@redhat.com>
1736
1737 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1738 * c-typeck.c: Likewise.
1739
296a8c2f
MP
17402015-05-19 Marek Polacek <polacek@redhat.com>
1741
1742 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1743
41b37d5e
JJ
17442015-05-19 Jakub Jelinek <jakub@redhat.com>
1745
1746 PR middle-end/66199
1747 * c-parser.c (c_parser_omp_for_loop): Don't add
1748 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1749 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1750 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1751 constructs.
1752
fab27f52
MM
17532015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1754
1755 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 1756 swaps.
fab27f52 1757
40de31cf
MLI
17582015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1759
1760 PR fortran/44054
1761 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1762 accessor function.
1763
3aa3c9fc
MP
17642015-05-14 Marek Polacek <polacek@redhat.com>
1765
1766 PR c/66066
1767 PR c/66127
1768 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1769 rather than with 0.
1770
c3388e62
DM
17712015-05-12 David Malcolm <dmalcolm@redhat.com>
1772
1773 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1774 to add a call to warn_for_misleading_indentation.
1775 (c_parser_else_body): Likewise, adding param "else_loc".
1776 (c_parser_if_statement): Check for misleading indentation.
1777 (c_parser_while_statement): Likewise.
1778 (c_parser_for_statement): Likewise.
1779
755e528f
MP
17802015-05-08 Marek Polacek <polacek@redhat.com>
1781
1782 PR c/64918
1783 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1784 (output_init_element): Likewise.
1785
0173bd2a
MP
17862015-05-07 Marek Polacek <polacek@redhat.com>
1787
1788 PR c/65179
1789 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1790 value.
1791
9babc352
MP
17922015-04-30 Marek Polacek <polacek@redhat.com>
1793
1794 * c-typeck.c (set_init_label): Call error_at instead of error and
1795 pass LOC to it.
1796
ac9f18db
MP
1797 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1798 the type of a decl.
1799
ec3fba51
MP
1800 * c-typeck.c (c_build_va_arg): Clarify the error message.
1801
b811915d
TS
18022015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1803
1804 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1805 OMP_STANDALONE_CLAUSES.
1806
f3075008
MP
18072015-04-28 Marek Polacek <polacek@redhat.com>
1808
1809 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1810
4e81b788
MP
18112015-04-28 Marek Polacek <polacek@redhat.com>
1812
1813 PR c/65901
1814 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1815
6c1db78e
MP
18162015-04-25 Marek Polacek <polacek@redhat.com>
1817
1818 PR c/52085
1819 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1820 attribute.
1821
5c4abbb8
MP
18222015-04-23 Marek Polacek <polacek@redhat.com>
1823
1824 PR c/65345
1825 * c-decl.c (set_labels_context_r): New function.
1826 (store_parm_decls): Call it via walk_tree_without_duplicates.
1827 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1828 instead of create_tmp_var. Build TARGET_EXPR instead of
1829 COMPOUND_EXPR.
1830 (build_atomic_assign): Use create_tmp_var_raw instead of
1831 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1832
06aca1d5
IV
18332015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1834
1835 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1836 (c_parser_omp_target_update): Add missed %> to error_at ().
1837
8fba1830
BRF
18382015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1839
1840 PR target/55143
1841 * c-decl.c (c_default_pointer_mode): Remove definition.
1842 * c-tree.h (c_default_pointer_mode): Remove declaration.
1843
62021f64
TB
18442015-03-27 Tobias Burnus <burnus@net-b.de>
1845
1846 PR c/65586
1847 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1848 error out.
1849 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1850 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1851 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1852
9b65e171
JJ
18532015-03-19 Jakub Jelinek <jakub@redhat.com>
1854
1855 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1856 attribute for DECL_EXTERNAL VAR_DECLs.
1857
17958621
JJ
18582015-03-11 Jakub Jelinek <jakub@redhat.com>
1859
1860 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1861 argument.
1862
7ccb1a11
JJ
18632015-03-10 Jakub Jelinek <jakub@redhat.com>
1864
1865 PR c/65120
1866 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1867 before preparing arguments to warn_logical_not_parentheses.
1868
01177669
JJ
18692015-03-09 Jakub Jelinek <jakub@redhat.com>
1870
1871 PR c/65120
1872 * c-typeck.c (parser_build_binary_op): Don't warn for
1873 !!x == y or !b == y where b is _Bool.
1874
802ac282
MP
18752015-03-09 Marek Polacek <polacek@redhat.com>
1876
1877 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1878 * c-decl.c (grokdeclarator): Likewise.
1879 * c-typeck.c (build_binary_op): Likewise.
1880
e5165b60
MP
18812015-02-27 Marek Polacek <polacek@redhat.com>
1882
1883 PR c/65228
1884 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1885
065d214c
MP
18862015-02-14 Marek Polacek <polacek@redhat.com>
1887
1888 PR c/64768
1889 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1890 declared through a typedef name.
1891
e5d9235b
MP
18922015-02-13 Marek Polacek <polacek@redhat.com>
1893
1894 PR c/65050
1895 * c-decl.c (grokdeclarator): Print also the type when giving
1896 the error message about array's incomplete element type.
1897
fa01ffcc
JJ
18982015-02-11 Jakub Jelinek <jakub@redhat.com>
1899
1900 PR c/64824
1901 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1902 check in the POP macro.
1903
c3e38a03
MP
19042015-02-09 Marek Polacek <polacek@redhat.com>
1905
1906 PR c/64856
1907 * c-typeck.c (process_init_element): Don't always wrap
1908 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1909 initializing a range of elements.
1910
4886ec8e
JJ
19112015-02-04 Jakub Jelinek <jakub@redhat.com>
1912
1913 PR c/64824
1914 PR c/64868
1915 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1916
c3e38a03 19172015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
1918
1919 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1920 processing enum declaration.
1921
7b33f0c8
MP
19222015-01-29 Marek Polacek <polacek@redhat.com>
1923
1924 PR c/64709
1925 * c-typeck.c (pop_init_level): If constructor_elements has
1926 exactly one element with integer_zerop value, set constructor_zeroinit
1927 to 1. Remove braces around warning_init call.
1928
dea63e49
JJ
19292015-01-27 Jakub Jelinek <jakub@redhat.com>
1930
1931 PR c/64766
1932 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1933 of FUNCTION_DECLs with error_mark_node.
1934
d38f7dce
JJ
19352015-01-26 Jakub Jelinek <jakub@redhat.com>
1936
1937 PR c/64778
1938 * c-typeck.c (convert_arguments): Return -1 if there are
1939 error_args, even if we've diagnosed too many arguments.
1940
cbf5d0e7
RB
19412015-01-21 Richard Biener <rguenther@suse.de>
1942
1943 PR middle-end/64313
1944 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1945 for builtins the user declared correctly.
1946
41dbbb37
TS
19472015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1948 Bernd Schmidt <bernds@codesourcery.com>
1949 Cesar Philippidis <cesar@codesourcery.com>
1950 James Norris <jnorris@codesourcery.com>
1951 Jakub Jelinek <jakub@redhat.com>
1952 Ilmir Usmanov <i.usmanov@samsung.com>
1953
1954 * c-parser.c: Include "gomp-constants.h".
1955 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1956 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1957 Use OMP_CLAUSE_SET_MAP_KIND.
1958 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1959 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1960 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1961 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1962 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1963 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1964 "copyout", "create", "delete", "deviceptr", "gang", "host",
1965 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1966 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1967 "present_or_create", "pcreate", "seq", "self", "vector",
1968 "vector_length", "wait", "worker".
1969 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1970 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1971 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1972 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1973 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1974 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1975 (c_parser_oacc_data_clause_deviceptr)
1976 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1977 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1978 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1979 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1980 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1981 (c_parser_oacc_parallel, c_parser_oacc_update)
1982 (c_parser_oacc_wait): New functions.
1983 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1984 (c_finish_oacc_data): New prototypes.
1985 * c-typeck.c: Include "gomp-constants.h".
1986 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1987 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1988 OMP_CLAUSE_SET_MAP_KIND.
1989 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1990 (c_finish_oacc_data): New functions.
1991 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1992 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1993 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1994 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1995 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1996 GOMP_MAP_FORCE_DEVICEPTR.
1997
adfac8df
JJ
19982015-01-09 Michael Collison <michael.collison@linaro.org>
1999
2000 * c-array-notation.c: Include hash-set.h, machmode.h,
2001 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2002 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
2003 * c-aux-info.c: Ditto.
2004 * c-convert.c: Ditto.
2005 * c-decl.c: Ditto.
2006 * c-errors.c: Ditto.
2007 * c-lang.c: Dittoxs.
2008 * c-objc-common.c: Ditto.
2009 * c-parser.c: Ditto.
2010 * c-typeck.c: Include hash-set.h, machmode.h,
2011 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
2012 fold-const.h, wide-int.h, inchash.h, real.h and
2013 fixed-value.h due to flattening of tree.h.
2014
2cc901dc
MP
20152015-01-07 Marek Polacek <polacek@redhat.com>
2016
2017 PR c/64417
2018 * c-typeck.c (process_init_element): Disallow initialization of
2019 a flexible array member with a string constant if the structure
2020 is in an array.
2021
5624e564
JJ
20222015-01-05 Jakub Jelinek <jakub@redhat.com>
2023
e5341100
JJ
2024 PR sanitizer/64344
2025 * c-typeck.c (convert_for_assignment, c_finish_return): For
2026 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
2027 types also set in_late_binary_op around convert call.
2028 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
2029 to integral type casts, if not in_late_binary_op, pass c_fully_fold
2030 result on expr as last argument to ubsan_instrument_float_cast,
2031 if in_late_binary_op, don't use c_save_expr but save_expr.
2032
5624e564
JJ
2033 Update copyright years.
2034
5bd012f8
MP
20352015-01-05 Marek Polacek <polacek@redhat.com>
2036
2037 PR c/64423
2038 * c-typeck.c (build_array_ref): Pass loc down to
2039 warn_array_subscript_with_type_char.
2040
3f8257db 20412014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
2042
2043 * c-typeck.c: New behavious for pointers to arrays with qualifiers
2044 (common-pointer-type): For pointers to arrays take qualifiers from
2045 element type.
2046 (build_conditional_expr): Add warnings for lost qualifiers.
2047 (comp-target-types): Allow pointers to arrays with different qualifiers.
2048 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
2049 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
2050 to PEDWARN_FOR_QUALIFIERS.
2051
8f94a8c4
JJ
20522014-12-17 Jakub Jelinek <jakub@redhat.com>
2053
2054 PR sanitizer/64289
2055 * c-convert.c: Include ubsan.h.
2056 (convert): For real -> integral casts and
2057 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2058 instead instrument the float cast directly.
2059
b731b390
JJ
20602014-11-29 Jakub Jelinek <jakub@redhat.com>
2061
2062 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2063 c_finish_stmt_expr): Remove NULL last argument from
2064 create_tmp_var_raw and create_tmp_var calls.
2065 * c-array-notation.c (fix_builtin_array_notation_fn,
2066 build_array_notation_expr, fix_conditional_array_notations_1,
2067 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2068
541e35a6
MP
20692014-11-28 Marek Polacek <polacek@redhat.com>
2070
2071 PR c/63862
2072 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2073 convert the right operand to integer type.
2074
b286be94
MP
20752014-11-25 Marek Polacek <polacek@redhat.com>
2076
2077 PR c/63877
2078 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2079 for inline functions.
2080
aa7da51a
JJ
20812014-11-21 Jakub Jelinek <jakub@redhat.com>
2082
2083 PR target/63764
2084 * c-typeck.c (build_array_ref): Adjust
2085 convert_vector_to_pointer_for_subscript caller. If it returns true,
2086 call non_lvalue_loc on the result.
2087
d876207f
RB
20882014-11-11 Richard Biener <rguenther@suse.de>
2089
2090 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2091 to true.
2092
e5e44252
AK
20932014-11-10 Andi Kleen <ak@linux.intel.com>
2094
2095 PR c/60804
2096 * c-parser.c (c_parser_statement_after_labels): Call
2097 check_no_cilk.
2098 (c_parser_if_statement): Dito.
2099 (c_parser_switch_statement): Dito.
2100 (c_parser_while_statement): Dito.
2101 (c_parser_do_statement): Dito.
2102 (c_parser_for_statement): Dito.
2103 * c-typeck.c (c_finish_loop): Dito.
2104
13c21655
PC
21052014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2106
2107 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2108 OPT_Wshift_count_overflow in the warnings.
2109
2d51fcef
MP
21102014-10-30 Marek Polacek <polacek@redhat.com>
2111
2112 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2113 print the stripped version as well, if they're not the same.
2114
ef4bddc2
RS
21152014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2116
2117 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2118 machine_mode.
2119
c582198b
AM
21202014-10-28 Andrew MacLeod <amacleod@redhat.com>
2121
2122 * c-decl.c: Adjust include files.
2123 * c-parser.c: Ditto.
2124
ddc8de03
PM
21252014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2126 Tom Tromey <tromey@redhat.com>
2127
2128 * c-tree.h (enum c_oracle_request): New.
2129 (c_binding_oracle_function): New typedef.
2130 (c_binding_oracle, c_pushtag, c_bind): Declare.
2131 * c-decl.c (c_binding_oracle): New global.
2132 (I_SYMBOL_CHECKED): New macro.
2133 (i_symbol_binding): New function.
2134 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2135 (I_TAG_CHECKED): New macro.
2136 (i_tag_binding): New function.
2137 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2138 (I_LABEL_CHECKED): New macro.
2139 (i_label_binding): New function.
2140 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2141 (c_print_identifier): Save and restore c_binding_oracle.
2142 (c_pushtag, c_bind): New functions.
2143
60393bbc
AM
21442014-10-27 Andrew MacLeod <amacleod@redhat.com>
2145
2146 * c-typeck.c: Adjust include files.
2147
d723bb7c
MLI
21482014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2149
2150 PR c++/53061
2151 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2152 initialization here...
2153 (c_initialize_diagnostics): ... but here. Set defaults after
2154 building pretty-printer.
2155
1bc5a451
MP
21562014-10-23 Marek Polacek <polacek@redhat.com>
2157
2158 PR c/63626
2159 * c-decl.c (pop_scope): Don't print warning in external_scope.
2160
4435bb92
MP
21612014-10-19 Marek Polacek <polacek@redhat.com>
2162
2163 PR c/63567
2164 * c-typeck.c (output_init_element): Allow initializing objects with
2165 static storage duration with compound literals even in C99 and add
2166 pedwarn for it.
2167
7278465e
MP
21682014-10-17 Marek Polacek <polacek@redhat.com>
2169
2170 PR c/63567
2171 * c-typeck.c (digest_init): Allow initializing objects with static
2172 storage duration with compound literals even in C99 and add pedwarn
2173 for it.
2174
d9b7be2e
MP
21752014-10-17 Marek Polacek <polacek@redhat.com>
2176
2177 PR c/63543
2178 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2179 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2180 error multiple times. Print the type.
2181
f406ae1f
MP
21822014-10-17 Marek Polacek <polacek@redhat.com>
2183
2184 PR c/63549
2185 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2186 type.
2187
92574c7c
MP
21882014-10-17 Marek Polacek <polacek@redhat.com>
2189
2190 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2191 (start_function): Use OPT_Wimplicit_int instead of 0.
2192 (store_parm_decls_oldstyle): Likewise.
2193
1bc4a978
MT
21942014-10-17 Alan Modra <amodra@gmail.com>
2195
2196 PR middle-end/61848
2197 * c-decl.c (merge_decls): Don't merge section name or tls model
2198 to newdecl symtab node, instead merge to olddecl. Override
2199 existing olddecl section name. Set tls_model for all thread-local
2200 vars, not just OMP thread-private ones. Remove incorrect comment.
2201
83685514
AM
22022014-10-16 Andrew MacLeod <amacleod@redhat.com>
2203
2204 * c-decl.c: Adjust include files.
2205
78a7c317
DD
22062014-10-14 DJ Delorie <dj@redhat.com>
2207
2208 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2209 (c_token_starts_typename): Check all __intN, not just __int128.
2210 (c_token_starts_declspecs): Likewise.
2211 (c_parser_declspecs): Likewise.
2212 (c_parser_attribute_any_word): Likewise.
2213 (c_parser_objc_selector): Likewise.
2214 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2215 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2216 is specified.
2217 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2218 __int128.
2219 (finish_declspecs): Likewise.
2220
74d98c1e
AB
22212014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2222
2223 * c-parser.c (c_parser_all_labels): New function to replace
2224 the duplicate code.
2225 (c_parser_statement): Call the new function.
2226
84937de2
MP
22272014-10-09 Marek Polacek <polacek@redhat.com>
2228
2229 PR c/63480
2230 * c-typeck.c (pop_init_level): Don't warn about initializing
2231 with { }.
2232
0382aaa0
MP
22332014-10-07 Marek Polacek <polacek@redhat.com>
2234
2235 PR c/59717
2236 * c-decl.c (header_for_builtin_fn): New function.
2237 (implicitly_declare): Suggest which header to include.
2238
7a0ca710
MP
22392014-10-07 Marek Polacek <polacek@redhat.com>
2240
2241 * c-convert.c (convert): Use error_operand_p.
2242 * c-typeck.c (require_complete_type): Likewise.
2243 (really_atomic_lvalue): Likewise.
2244 (digest_init): Likewise.
2245 (handle_omp_array_sections_1): Likewise.
2246
6bc8a126
MP
22472014-10-03 Marek Polacek <polacek@redhat.com>
2248
2249 PR c/63453
2250 * c-decl.c (pop_scope): Don't warn about "inline function declared
2251 but never defined" for functions marked with gnu_inline attribute.
2252
d90c0a59
JJ
22532014-09-25 Jakub Jelinek <jakub@redhat.com>
2254
2255 PR c++/63249
2256 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2257 on low_bound and length.
2258
083e891e
MP
22592014-09-24 Marek Polacek <polacek@redhat.com>
2260
2261 PR c/61405
2262 PR c/53874
2263 * c-parser.c: Don't define CPP_KEYWORD.
2264 (c_parser_switch_statement): Pass original type to c_finish_case.
2265 * c-tree.h (c_finish_case): Update declaration.
2266 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2267 conditionally to c_do_switch_warnings.
2268
8d95fe25
MP
22692014-09-03 Marek Polacek <polacek@redhat.com>
2270
2271 PR c/62024
2272 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2273 conversions.
2274
9a771876
JJ
22752014-09-02 Jakub Jelinek <jakub@redhat.com>
2276 Balaji V. Iyer <balaji.v.iyer@intel.com>
2277 Igor Zamyatin <igor.zamyatin@intel.com>
2278
2279 * c-parser.c (c_parser_cilk_for): New function.
2280 (c_parser_cilk_grainsize): Likewise.
2281 (c_get_temp_regvar): Likewise.
2282 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2283 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2284 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2285 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2286 case.
2287
b7679d96
CG
22882014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2289
2290 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2291 with using HOST_WIDE_INT without truncation to 'int'
2292
59ea0364
MP
22932014-08-22 Marek Polacek <polacek@redhat.com>
2294
2295 PR c++/62199
2296 * c-typeck.c (parser_build_binary_op): Adjust call to
2297 warn_logical_not_parentheses.
2298
671a475e
IZ
22992014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2300
2301 PR other/62008
2302 * c-parser.c (c_parser_array_notation): Check for correct
2303 type of an array added.
2304
04159acf
MP
23052014-08-19 Marek Polacek <polacek@redhat.com>
2306
2307 PR c++/62153
2308 * c-typeck.c (build_binary_op): If either operand of a comparison
2309 is a boolean expression, call maybe_warn_bool_compare.
2310
c77935ee
PP
23112014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2312
2313 PR c/45584
2314 * c-typeck.c (build_c_cast): Do a conversion even when the
2315 TYPE_MAIN_VARIANTs are the same.
2316
35aff4fb
MP
23172014-08-19 Marek Polacek <polacek@redhat.com>
2318
2319 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2320 pedwarn_c99 instead of pedwarn.
2321 (grokfield): Likewise.
2322 (warn_defaults_to): New function.
2323 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2324 Unconditionally call pedwarn_c99 instead of pedwarn.
2325 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2326 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2327 check flag_isoc11 before.
2328 * c-errors.c (pedwarn_c99): Change the return type to bool.
2329 Handle -Wc99-c11-compat.
2330 * c-parser.c (disable_extension_diagnostics): Handle
2331 warn_c99_c11_compat.
2332 (restore_extension_diagnostics): Likewise.
2333 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2334 instead of pedwarn, don't check flag_isoc11 before.
2335 (c_parser_declspecs): Likewise.
2336 (c_parser_alignas_specifier): Likewise.
2337 (c_parser_alignof_expression): Likewise.
2338 (c_parser_generic_selection): Likewise.
2339 * c-tree.h (pedwarn_c99): Update declaration.
2340 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2341 of pedwarn_c99.
2342
177cce46
MP
23432014-08-19 Marek Polacek <polacek@redhat.com>
2344
2345 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2346 to pedwarn_c90.
2347 * c-errors.c: Include "opts.h".
2348 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2349 * c-parser.c (disable_extension_diagnostics): Handle negative value
2350 of warn_c90_c99_compat, too.
2351 (restore_extension_diagnostics): Likewise.
2352 (c_parser_compound_statement_nostart): Pass
2353 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2354
6dc99c33
MP
23552014-08-12 Marek Polacek <polacek@redhat.com>
2356
2357 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2358 Add pedwarn.
2359 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2360 Likewise.
2361 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2362
3f8257db 23632014-08-10 Marek Polacek <polacek@redhat.com>
f3bede71
MP
2364
2365 PR c/51849
2366 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2367 Call pedwarn_c90 instead of pedwarn.
2368 (check_bitfield_type_and_width): Likewise.
2369 (declspecs_add_qual): Likewise.
2370 (declspecs_add_type): Likewise.
2371 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2372 Adjust to only call pedwarn_c90.
2373 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2374 pedwarn_c90 instead of pedwarn.
2375 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2376 * c-parser.c (disable_extension_diagnostics): Handle
2377 warn_c90_c99_compat.
2378 (restore_extension_diagnostics): Likewise.
2379 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2380 pedwarn_c90 instead of pedwarn.
2381 (c_parser_initelt): Likewise.
2382 (c_parser_postfix_expression): Likewise.
2383 (c_parser_postfix_expression_after_paren_type): Likewise.
2384 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2385 * c-tree.h: Fix formatting.
2386 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2387 pedwarn_c90 instead of pedwarn.
2388
9f25a338
TS
23892014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2390
2391 * c-typeck.c: Remove include of pointer-set.h.
2392
044331a8
MP
23932014-08-07 Marek Polacek <polacek@redhat.com>
2394
2395 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2396
b787e7a2
TS
23972014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2398
2399 * c-typeck.c: Use hash_map instead of pointer_map.
2400
6e2830c3
TS
24012014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2402
2403 * c-decl.c: Use hash_set instead of pointer_set.
2404
a7ee52fb
IZ
24052014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2406
2407 PR middle-end/61455
2408 * c-array-notation.c (expand_array_notations): Handling
2409 of DECL_EXPR added.
2410
b4dfdc11
MG
24112014-07-31 Marc Glisse <marc.glisse@inria.fr>
2412
2413 PR c++/60517
2414 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2415 a local variable.
2416
976d5a22
TT
24172014-07-30 Tom Tromey <tromey@redhat.com>
2418
2419 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2420 field.
2421 (really_start_incremental_init, push_init_level): Initialize
2422 designator_depth.
2423 (pop_init_level): Set global designator_depth.
2424 (process_init_element): Check for designated_init attribute.
2425
30281de2
MP
24262014-07-20 Marek Polacek <polacek@redhat.com>
2427
2428 PR c/61852
2429 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2430 (implicitly_declare): Pass location to implicit_decl_warning.
2431
b108f48f
JJ
24322014-07-14 Jakub Jelinek <jakub@redhat.com>
2433
2434 PR middle-end/61294
2435 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2436 If non-NULL, call c_parser_check_literal_zero.
2437 (c_parser_check_literal_zero): New function.
2438 (c_parser_postfix_expression_after_primary): Adjust
2439 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2440
773ec47f
MP
24412014-07-06 Marek Polacek <polacek@redhat.com>
2442
2443 PR c/6940
2444 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2445 * c-tree.h (C_ARRAY_PARAMETER): Define.
2446 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2447 function parameter.
2448
22e1cf1c 24492014-07-02 Jan Hubicka <hubicka@ucw.cz>
3f8257db 2450 Chen Gang <gang.chen.5i5j@gmail.com>
22e1cf1c
JH
2451
2452 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2453 releasing symbol.
2454
52ec0ea3
MP
24552014-07-01 Marek Polacek <polacek@redhat.com>
2456
2457 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2458 instead of 0 to WARN_FOR_ASSIGNMENT.
2459
d5c3d343
MP
24602014-07-01 Marek Polacek <polacek@redhat.com>
2461
2462 PR c/58286
2463 * c-typeck.c (convert_for_assignment): Pass
2464 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2465
6a7253a4
MP
24662014-06-30 Marek Polacek <polacek@redhat.com>
2467
2468 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2469 has no_sanitize_undefined attribute.
2470
5e88a8f4
IZ
24712014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2472
2473 PR middle-end/57541
2474 * c-array-notation.c (fix_builtin_array_notation_fn):
2475 Check for 0 arguments in builtin call. Check that bultin argument is
2476 correct.
2477 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2478 index.
2479
9698b078
SH
24802014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2481
2482 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2483 qualifiers in __auto_type for atomic types.
2484 (c_parser_typeof_specifier): Discard all type qualifiers in
2485 __typeof__ for atomic types.
2486
6e07c515
MP
24872014-06-25 Marek Polacek <polacek@redhat.com>
2488
2489 PR c/61162
2490 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2491 the return expression to c_finish_return.
2492
da6f124d
JJ
24932014-06-25 Jakub Jelinek <jakub@redhat.com>
2494
2495 * c-typeck.c (c_finish_omp_clauses): Make sure
2496 OMP_CLAUSE_LINEAR_STEP has correct type.
2497
c203e8a7
TS
24982014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2499
2500 * c-decl.c: Adjust.
2501
56ad0e38
JJ
25022014-06-24 Jakub Jelinek <jakub@redhat.com>
2503
2504 * c-parser.c (c_parser_omp_for_loop): For
2505 #pragma omp parallel for simd move lastprivate clause from parallel
2506 to for rather than simd.
2507
47c2554f
MP
25082014-06-23 Marek Polacek <polacek@redhat.com>
2509
2510 * c-typeck.c (parser_build_binary_op): Don't call
2511 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2512
56363ffd
JH
25132014-06-15 Jan Hubicka <hubicka@ucw.cz>
2514
2515 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2516 * c-decl.c (merge_decls): Likewise.
2517
d7ff7ae5
MP
25182014-06-09 Marek Polacek <polacek@redhat.com>
2519
2520 PR c/36446
2521 * c-typeck.c (error_init): Call inform instead of error_at.
2522 (pedwarn_init): Call inform instead of pedwarn.
2523 (warning_init): Call inform instead of warning_at.
2524
24d047a3
JH
25252014-06-07 Jan Hubicka <hubicka@ucw.cz>
2526
2527 * c-decl.c (merge_decls): Use set_decl_section_name.
2528 (duplicate_decls): Remove node if it exists.
2529
9bac5cbb
G
25302014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2531
2532 PR c/53119
2533 * c-typeck.c (push_init_level, process_init_element,
2534 pop_init_level): Correct check for zero initialization, move
2535 missing brace warning to respect zero initialization.
2536
8ffcdea8
MP
25372014-06-05 Marek Polacek <polacek@redhat.com>
2538
2539 PR c/56724
2540 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2541
742938c9
MP
25422014-06-05 Marek Polacek <polacek@redhat.com>
2543
2544 PR c/49706
2545 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2546 on the left hand side operand of a comparison.
2547
6447c55d
MP
25482014-06-05 Marek Polacek <polacek@redhat.com>
2549
2550 PR c/48062
2551 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2552 Print note only if the warning was printed.
2553
9dc7743c
IZ
25542014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2555
2556 PR c/58942
2557 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2558 with a pointer.
2559
fedfecef
MP
25602014-06-03 Marek Polacek <polacek@redhat.com>
2561
2562 PR c/60439
2563 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2564 c_start_case.
2565 * c-tree.h (c_start_case): Update.
2566 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2567 switch condition has boolean value.
2568
9b2b7279
AM
25692014-06-02 Andrew MacLeod <amacleod@redhat.com>
2570
2571 * c-decl.c: Include builtins.h.
2572 * c-parser.c: Likewise.
2573
5c1bc275
MP
25742014-05-27 Marek Polacek <polacek@redhat.com>
2575
2576 PR c/56724
2577 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2578 error and warning calls to error_at and warning_at. Pass location of
2579 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2580 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2581 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2582
97563bc8
IZ
25832014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2584
2585 PR c/61191
2586 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2587 function parameters.
2588
aede2c10
JH
25892014-05-23 Jan Hubicka <hubicka@ucw.cz>
2590
2591 * c-decl.c (merge_decls): Preserve symtab node pointers.
2592 (duplicate_decls): Free new decl.
2593
edbba2ce
TS
25942014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2595
f3316c6d
TS
2596 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2597 initialization.
2598
edbba2ce
TS
2599 * c-parser.c (c_parser_omp_target): Return bool values.
2600
68c81f24
TS
26012014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2602
2603 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2604 num_teams_loc variable to num_thread_limit_loc.
2605
632f2871
RS
26062014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2607
2608 * c-array-notation.c (expand_array_notations): Use void_node
2609 instead of void_zero_node.
2610
766090c2
TS
26112014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2612
2613 * c-decl.c (finish_struct): Adjust.
2614 (finish_enum): Likewise.
2615 (bind): Adjust.
2616 (record_inline_static): Likewise.
2617 (push_scope): Likewise.
2618 (make_label): Likewise.
2619 (lookup_label_for_goto): Likewise.
2620 (finish_struct): Likewise.
2621 (finish_enum): Likewise.
2622 (store_parm_decls): Likewise.
2623 (c_push_function_context): Likewise.
2624 * c-lang.h: Remove usage of variable_size gty attribute.
2625 * c-parser.c (c_parse_init): Adjust.
2626 (c_parse_file): Likewise.
2627
2b107f6b
MP
26282014-05-13 Marek Polacek <polacek@redhat.com>
2629
2630 PR c/61162
2631 * c-typeck.c (convert_for_assignment): Pass location to
2632 WARN_FOR_ASSIGNMENT instead of input_location.
2633
d033409e
MP
26342014-05-10 Marek Polacek <polacek@redhat.com>
2635
2636 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2637 maybe_warn_string_init.
2638 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2639 maybe_warn_string_init.
2640 * c-tree.h (maybe_warn_string_init): Update declaration.
2641 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2642 Call pedwarn_init with loc instead of with input_location.
2643 (digest_init): Pass init_loc to maybe_warn_string_init.
2644 (pop_init_level): Call pedwarn_init with loc instead of with
2645 input_location.
2646 (set_init_index): Likewise.
2647 (process_init_element): Likewise.
2648
ea58ef42
MP
26492014-05-09 Marek Polacek <polacek@redhat.com>
2650
2651 PR c/61096
2652 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2653 (c_parser_initelt): Pass location to set_init_label. Pass array index
2654 location to set_init_index.
2655 * c-tree.h (push_init_level): Update declaration.
2656 (pop_init_level): Likewise.
2657 (set_init_index): Likewise.
2658 (set_init_label): Likewise.
2659 * c-typeck.c (error_init): Add location parameter. Call error_at
2660 instead of error.
2661 (digest_init): Pass init_loc to error_init.
2662 (really_start_incremental_init):
2663 (push_init_level): Add location parameter. Pass loc to pop_init_level
2664 and error_init.
2665 (pop_init_level): Likewise.
2666 (set_designator): Add location parameter. Pass loc to pop_init_level,
2667 push_init_level, and error_init.
2668 (set_init_index): Add location parameter. Pass loc to error_init and
2669 set_designator.
2670 (set_init_label): Likewise.
2671 (output_init_element): Pass loc to error_init.
2672 (process_init_element): Pass loc to error_init, pop_init_level,
2673 pedwarn_init, and push_init_level.
2674
661a0813
MP
26752014-05-09 Marek Polacek <polacek@redhat.com>
2676
2677 PR c/50459
2678 * c-parser.c (c_parser_attributes): Parse the arguments as an
2679 expression-list if the attribute takes identifier.
2680
2793eeab
MP
26812014-05-08 Marek Polacek <polacek@redhat.com>
2682
2683 PR c/61053
2684 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2685 TYPE_ALIGN_UNIT.
2686
f827930a
MP
26872014-05-08 Marek Polacek <polacek@redhat.com>
2688
2689 PR c/61077
2690 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2691 of main.
2692
1d60af08
KZ
26932014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2694 Mike Stump <mikestump@comcast.net>
2695 Richard Sandiford <rdsandiford@googlemail.com>
2696
2697 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2698 (finish_enum): Use wide-int interfaces.
2699 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2700 * c-typeck.c (build_c_cast): Likewise.
2701 (set_nonincremental_init_from_string): Likewise.
2702 (c_tree_equal): Likewise.
2703
a0e24419
MP
27042014-05-02 Marek Polacek <polacek@redhat.com>
2705
2706 PR c/25801
2707 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2708 Return size_one_node when the type is not complete.
2709 (pointer_diff): Remove comment.
2710 (build_unary_op): Improve error messages.
2711
19fc9faa
MP
27122014-05-02 Marek Polacek <polacek@redhat.com>
2713
2714 * c-typeck.c (c_finish_return): Separate warning_at calls.
2715
63bc4e87
MP
27162014-05-02 Marek Polacek <polacek@redhat.com>
2717
2718 * c-tree.h (error_init): Remove declaration.
2719 (pedwarn_init): Likewise.
2720 * c-typeck.c (error_init): Make static and move above.
2721 (pedwarn_init): Likewise.
2722 (warning_init): Move above.
2723 (maybe_warn_string_init): Likewise.
2724
4bd2511b
JL
27252014-05-01 Jeff Law <law@redhat.com>
2726
2727 Revert:
2728
2729 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2730 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2731 avoid goto.
2732
6a358dcb
MP
27332014-05-02 Marek Polacek <polacek@redhat.com>
2734
2735 PR c/60784
2736 * c-typeck.c (push_init_level): Set constructor_designated to
2737 p->designated for structures.
2738
ae5ebda4
MP
27392014-05-01 Marek Polacek <polacek@redhat.com>
2740
2741 PR c/60915
2742 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2743 function-definition has an attribute after the declarator.
2744
96b40f8d
MP
27452014-05-01 Marek Polacek <polacek@redhat.com>
2746
2747 PR c/60257
2748 * c-typeck.c (warning_init): Add location_t parameter. Call
2749 warning_at instead of warning.
2750 (push_init_level): Pass input_location to warning_init.
2751 (add_pending_init): Add location_t parameter. Pass loc to
2752 warning_init.
2753 (set_nonincremental_init): Pass input_location to add_pending_init.
2754 (set_nonincremental_init_from_string): Likewise.
2755 (output_init_element): Pass loc to warning_init and to
2756 add_pending_init.
2757
32e00768
MP
27582014-05-01 Marek Polacek <polacek@redhat.com>
2759
2760 PR c/43395
2761 * c-typeck.c (c_finish_return): Distinguish between label and variable
2762 when warning about returning local address.
2763
c9379ce2
MP
27642014-05-01 Marek Polacek <polacek@redhat.com>
2765
2766 PR c/29467
2767 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2768 in C89 mode.
2769
d00887e8
MP
27702014-05-01 Marek Polacek <polacek@redhat.com>
2771
2772 PR c/43245
2773 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2774 instead of 0 to WARN_FOR_QUALIFIERS.
2775
5436fa2e
MP
27762014-05-01 Marek Polacek <polacek@redhat.com>
2777
2778 PR c/56989
2779 * c-typeck.c (default_conversion): Use better location for
2780 error call.
2781
f8ed5150
MP
27822014-04-30 Marek Polacek <polacek@redhat.com>
2783
2784 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2785 also when SANITIZE_FLOAT_DIVIDE is on.
2786
8337d1db
MP
27872014-04-30 Marek Polacek <polacek@redhat.com>
2788
2789 PR c/60139
2790 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2791 and pedwarn_init. Use loc insted of input_location.
2792
c4bdc42f
MP
27932014-04-30 Marek Polacek <polacek@redhat.com>
2794
2795 PR c/60351
2796 * c-typeck.c (build_binary_op): Use location when warning about
2797 shift count.
2798
45484dcf
MP
27992014-04-25 Marek Polacek <polacek@redhat.com>
2800
2801 PR c/18079
2802 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2803 always_inline/noinline and hot/cold attributes.
2804
34cf811f
MP
28052014-04-25 Marek Polacek <polacek@redhat.com>
2806
2807 PR c/60114
2808 * c-parser.c (c_parser_initelt): Pass input_location to
2809 process_init_element.
2810 (c_parser_initval): Pass loc to process_init_element.
2811 * c-tree.h (process_init_element): Adjust declaration.
2812 * c-typeck.c (push_init_level): Pass input_location to
2813 process_init_element.
2814 (pop_init_level): Likewise.
2815 (set_designator): Likewise.
2816 (output_init_element): Add location_t parameter. Pass loc to
2817 digest_init.
2818 (output_pending_init_elements): Pass input_location to
2819 output_init_element.
2820 (process_init_element): Add location_t parameter. Pass loc to
2821 output_init_element.
2822
42056eac
JJ
28232014-04-24 Jakub Jelinek <jakub@redhat.com>
2824
2825 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2826 atomic-clause, allow comma in between atomic-clause and
2827 seq_cst.
2828
e162a134
JJ
28292014-04-22 Jakub Jelinek <jakub@redhat.com>
2830
2831 PR c/59073
2832 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2833 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2834
2f6babac
IZ
28352014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2836
2837 PR middle-end/60469
2838 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2839 create_tmp_var instead build_decl for creating temps.
2840 (build_array_notation_expr): Likewise.
2841 (fix_conditional_array_notations_1): Likewise.
2842 (fix_array_notation_expr): Likewise.
2843 (fix_array_notation_call_expr): Likewise.
2844
8edbfaa6
JJ
28452014-03-28 Jakub Jelinek <jakub@redhat.com>
2846
2847 PR c++/60689
2848 * c-tree.h (c_build_function_call_vec): New prototype.
2849 * c-typeck.c (build_function_call_vec): Don't call
2850 resolve_overloaded_builtin here.
2851 (c_build_function_call_vec): New wrapper function around
2852 build_function_call_vec. Call resolve_overloaded_builtin here.
2853 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2854 Call c_build_function_call_vec instead of build_function_call_vec.
2855 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2856 * c-decl.c (finish_decl): Likewise.
2857
7485aeea
MLI
28582014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2859
2860 PR c/55383
2861 * c-typeck.c: Use correct format string in cast-qual warning
2862
b17a8b07
TS
28632014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2864
2865 * c-decl.c (c_decl_attributes): Use
2866 lang_hooks.types.omp_mappable_type.
2867 * c-typeck.c (c_finish_omp_clauses): Likewise.
2868
3af9c5e9
MP
28692014-03-06 Marek Polacek <polacek@redhat.com>
2870
2871 PR c/60197
2872 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2873 of checking tree code.
2874
1c9f5f33
PK
28752014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2876
2877 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2878 (c_parser_parameter_declaration): Likewise.
2879
cc28fc7f
MP
28802014-02-19 Marek Polacek <polacek@redhat.com>
2881
2882 PR c/60195
2883 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2884 Call mark_exp_read on exp.value.
2885 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2886 TREE_ADDRESSABLE on old instead of val.
2887 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2888
b581c05c
PK
28892014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2890
2891 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2892 C_EXPR_APPEND by vec_safe_push.
2893 * c-tree.h (C_EXPR_APPEND): Remove.
2894
81e5eca8
MP
28952014-01-31 Marek Polacek <polacek@redhat.com>
2896
2897 PR c/59963
2898 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2899 build_function_call_vec.
2900 (build_function_call): Likewise.
2901 (build_atomic_assign): Likewise.
2902 (build_function_call_vec): Add arg_loc parameter. Use it.
2903 (convert_arguments): Likewise.
2904 (convert_for_assignment): Rename rhs_loc to expr_loc.
2905 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2906 (c_parser_objc_keywordexpr): Likewise.
2907 (c_parser_postfix_expression_after_primary): Call
2908 build_function_call_vec with expr_loc rather than op_loc.
2909 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2910 build_function_call_vec.
2911 (c_parser_expr_list): Add locations parameter. Fill it with locations
2912 of function arguments.
2913 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2914
68fca595
MP
29152014-01-30 Marek Polacek <polacek@redhat.com>
2916
2917 PR c/59940
2918 * c-typeck.c (build_function_call_vec): Use loc parameter.
2919 (convert_arguments): Add location parameter. Use it.
2920 (ep_convert_and_check): Likewise.
2921 (build_atomic_assign): Adjust convert_for_assignment call.
2922 (build_modify_expr): Likewise.
2923 (digest_init): Likewise.
2924 (c_finish_return): Likewise.
2925 (build_conditional_expr): Adjust ep_convert_and_check calls.
2926 (convert_for_assignment): Add rhs_loc parameter. Use it.
2927 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2928 calls.
2929
fa337f3a
RB
29302014-01-30 Richard Biener <rguenther@suse.de>
2931
2932 PR c/59905
2933 * c-typeck.c (build_function_call_vec): Do not replace calls
2934 to a function via an incompatible type with a runtime abort.
2935
b72271b9
BI
29362014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2937
2938 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2939 flag_enable_cilkplus with flag_cilkplus.
2940 (c_parser_direct_declarator_inner): Likewise.
2941 (c_parser_attribute_any_word): Likewise.
2942 (c_parser_attributes): Likewise.
2943 (c_parser_compound_statement): Likewise.
2944 (c_parser_statement_after_labels): Likewise.
2945 (c_parser_if_statement): Likewise.
2946 (c_parser_switch_statement): Likewise.
2947 (c_parser_do_statement): Likewise.
2948 (c_parser_for_statement): Likewise.
2949 (c_parser_unary_expression): Likewise.
2950 (c_parser_postfix_expression): Likewise.
2951 (c_parser_postfix_expression_after_primary): Likewise.
2952 (c_parser_postfix_expression_after_primary): Likewise.
2953 (c_parser_omp_clause_name): Likewise.
2954 (c_finish_omp_declare_simd): Likewise.
2955 (c_parser_cilk_verify_simd): Likewise.
2956 * c-typeck.c (build_array_ref): Likewise.
2957 (build_function_call_vec): Likewise.
2958 (convert_arguments): Likewise.
2959 (build_compound_expr): Likewise.
2960 (c_finish_return): Likewise.
2961 (c_finish_if_stmt): Likewise.
2962 (c_finish_loop): Likewise.
2963 (build_binary_op): Likewise.
2964
393e8e8b
MP
29652014-01-23 Marek Polacek <polacek@redhat.com>
2966
2967 PR c/59846
2968 * c-typeck.c (parser_build_binary_op): Use location instead of
2969 input_location.
2970 (build_binary_op): Pass location to shorten_compare.
2971
f04dda30
MP
29722014-01-23 Marek Polacek <polacek@redhat.com>
2973
2974 PR c/58346
2975 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2976 an empty aggregate.
2977
789eadcd
MP
29782014-01-23 Marek Polacek <polacek@redhat.com>
2979
2980 PR c/59871
2981 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2982 of a comma expression.
2983 (emit_side_effect_warnings): Likewise.
2984
40f14e9f
BI
29852014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2986
2987 PR c/59825
2988 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2989 function to use walk_tree and moved a lot of its functionality to
2990 expand_array_notations.
2991 (expand_array_notations): New function.
2992
74558dd9
BI
29932014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2994
2995 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2996 attribute an attribute without value.
2997
652fea39
JJ
29982014-01-23 Jakub Jelinek <jakub@redhat.com>
2999
3000 PR middle-end/58809
3001 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
3002 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
3003
f34f1c87
MP
30042014-01-22 Marek Polacek <polacek@redhat.com>
3005
3006 PR c/59891
3007 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
3008 of remove_c_maybe_const_expr on op1 and op2.
3009
241f845a
JJ
30102014-01-15 Jakub Jelinek <jakub@redhat.com>
3011
3012 PR c/58943
3013 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
3014 effects, preevaluate rhs using SAVE_EXPR first.
3015
9a74f20c
BI
30162014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
3017
3018 PR c++/59631
3019 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
3020 statements with if-elseif statements.
3021
96066ce1
MP
30222014-01-06 Marek Polacek <polacek@redhat.com>
3023
3024 PR c/57773
3025 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
3026 defined bit-field types only in ISO C.
3027
23a5b65a
RS
30282014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3029
3030 Update copyright years
3031
f9030485
RS
30322014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
3033
3034 * c-array-notation.c: Use the standard form for the copyright notice.
3035
41958c28
BI
30362013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
3037
3038 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
3039 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
3040 field in parser is not empty. If not-empty, call the function
3041 c_parser_finish_omp_declare_simd.
3042 (c_parser_cilk_clause_vectorlength): Modified function to be shared
3043 between SIMD-enabled functions and #pragma simd. Added new parameter.
3044 (c_parser_cilk_all_clauses): Modified the usage of the function
3045 c_parser_cilk_clause_vectorlength as mentioned above.
3046 (c_parser_cilk_simd_fn_vector_attrs): New function.
3047 (c_finish_cilk_simd_fn_tokens): Likewise.
3048 (is_cilkplus_vector_p): Likewise.
3049 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3050 "nomask," and "mask" strings in clause name.
3051 (c_parser_omp_all_clauses): Added 3 new case statements:
3052 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3053 PRAGMA_CILK_CLAUSE_NOMASK.
3054 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3055 check for vector attribute and if so call the function
3056 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3057 called the function c_finish_cilk_simd_fn_tokens.
3058 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3059 parser field is non-empty. If so, parse them as you would parse
3060 the omp declare simd pragma.
3061 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3062 Added a check when step is a parameter and flag it as error.
3063 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3064 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3065 pragma_omp_clause.
3066
cef0fd0e
TS
30672013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3068
3069 * c-parser.c (c_parser_omp_parallel): Fix description.
3070
12893402
BI
30712013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3072
3073 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3074 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3075 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3076 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3077
296674db
JM
30782013-12-04 Joseph Myers <joseph@codesourcery.com>
3079
3080 PR c/52023
3081 * c-parser.c (c_parser_alignas_specifier): Use
3082 c_sizeof_or_alignof_type instead of c_alignof.
3083 (c_parser_alignof_expression): Likewise, with min_alignof
3084 parameter depending on alignof spelling used.
3085
edd28054
MP
30862013-12-04 Marek Polacek <polacek@redhat.com>
3087
3088 PR c/54113
3089 * c-decl.c (start_function): Don't warn for missing prototype for
3090 inline functions.
3091
da0fc454
MP
30922013-12-03 Marek Polacek <polacek@redhat.com>
3093
3094 PR c/59351
3095 * c-decl.c (build_compound_literal): Allow compound literals with
3096 empty initial value.
3097
4c2ecab0
JM
30982013-12-02 Joseph Myers <joseph@codesourcery.com>
3099
3100 PR c/58235
3101 * c-typeck.c (build_modify_expr): Diagnose assignment to
3102 expression with array type.
3103
340baef7
JM
31042013-11-29 Joseph Myers <joseph@codesourcery.com>
3105
3106 PR c/42262
3107 * c-typeck.c (process_init_element): Do not treat a string as
3108 initializing a whole array when used with a designator for an
3109 individual element.
3110
6763b9f7
JM
31112013-11-29 Joseph Myers <joseph@codesourcery.com>
3112
3113 PR c/57574
3114 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3115 an inline function following a static declaration.
3116
e7bd1de1
JJ
31172013-11-28 Jakub Jelinek <jakub@redhat.com>
3118
3119 PR c/59310
3120 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3121 to p_name before calling c_parser_omp_teams instead of after.
3122 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3123 argument. Remove unused p_name variable.
3124
0136f8f0
AH
31252013-11-27 Aldy Hernandez <aldyh@redhat.com>
3126 Jakub Jelinek <jakub@redhat.com>
3127
3128 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3129 external_scope is NULL.
3130
241b71bb
TV
31312013-11-27 Tom de Vries <tom@codesourcery.com>
3132 Marc Glisse <marc.glisse@inria.fr>
3133
3134 PR c++/59032
3135 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3136
2fb9a547
AM
31372013-11-22 Andrew MacLeod <amacleod@redhat.com>
3138
3139 * c-typeck.c: Add required include files from gimple.h.
3140
8400e75e
DM
31412013-11-22 David Malcolm <dmalcolm@redhat.com>
3142
3143 * c-decl.c (define_label, shadow_tag_warned)
3144 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3145 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3146 (declspecs_add_type): Remove use of in_system_header macro.
3147 * c-parser.c (c_parser_unary_expression): Likewise.
3148 * c-typeck.c (store_init_value, process_init_element)
3149 (c_start_case): Likewise.
3150
3151 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3152 macro.
3153
3154 * c-parser.c (c_parser_set_source_position_from_token): Remove
3155 reference to in_system_header from comment.
3156
386b1f1f
RS
31572013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3158
3159 * c-decl.c (grokdeclarator): Update comment to refer to
3160 tree_to_[su]hwi rather than tree_low_cst.
3161
ae7e9ddd
RS
31622013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3163
3164 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3165 tree_to_uhwi throughout.
3166
9439e9a1
RS
31672013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3168
3169 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3170 throughout.
3171
9541ffee
RS
31722013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3173
3174 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3175 throughout.
3176
c02065fc
AH
31772013-11-15 Aldy Hernandez <aldyh@redhat.com>
3178
3179 * c-parser.c (c_parser_cilk_simd): New.
3180 (c_parser_cilk_verify_simd): New.
3181 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3182 (c_parser_omp_for_loop): Add case for NE_EXPR.
3183 Set c_break_label for CILK_SIMD.
3184 (c_parser_cilk_clause_vectorlength): New.
3185 (c_parser_cilk_clause_linear): New.
3186 (c_parser_cilk_clause_name): New.
3187 (c_parser_cilk_all_clauses): New.
3188 * c-typeck.c (build_unary_op): Pass location argument to
3189 readonly_error.
3190 (build_modify_expr): Same.
3191 (build_asm_expr): Same.
3192 (c_finish_bc_stmt): Error on break/continue in loops.
3193
18f429e2
AM
31942013-11-14 Andrew MacLeod <amacleod@redhat.com>
3195
3196 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3197
d8a2d370
DN
31982013-11-14 Diego Novillo <dnovillo@google.com>
3199
3200 * c-decl.c: Include print-tree.h.
3201 Include stor-layout.h.
3202 Include varasm.h.
3203 Include attribs.h.
3204 Include stringpool.h.
3205 * c-lang.c: Include fold-const.h.
3206 * c-parser.c: Include stringpool.h.
3207 Include attribs.h.
3208 Include stor-layout.h.
3209 Include varasm.h.
3210 Include trans-mem.h.
3211 * c-typeck.c: Include stor-layout.h.
3212 Include trans-mem.h.
3213 Include varasm.h.
3214 Include stmt.h.
3215
38b7bc7f
JM
32162013-11-13 Joseph Myers <joseph@codesourcery.com>
3217
3218 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3219 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3220 __auto_type.
3221 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3222 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3223 RID_AUTO_TYPE.
3224 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3225 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3226 (c_parser_declarator, c_parser_direct_declarator_inner)
3227 (c_parser_parameter_declaration, c_parser_type_name): All callers
3228 changed.
3229 (c_parser_declaration_or_fndef): Handle declarations with type
3230 determined from the initializer.
3231
45b0be94
AM
32322013-11-12 Andrew MacLeod <amacleod@redhat.com>
3233
18f429e2 3234 * c-typeck.c: Include gimplify.h.
45b0be94 3235
582d9b50
JM
32362013-11-12 Joseph Myers <joseph@codesourcery.com>
3237
3238 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3239 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3240 comment.
3241 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3242 or _Thread_local as appropriate in diagnostics.
3243 (build_null_declspecs): Initialize ret->thread_gnu_p.
3244 (declspecs_add_scspec): Handle either __thread or _Thread_local
3245 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3246 pedantic. Do not disallow _Thread_local extern and _Thread_local
3247 static.
3248
267bac10
JM
32492013-11-07 Joseph Myers <joseph@codesourcery.com>
3250 Andrew MacLeod <amacleod@redhat.com>
3251
3252 * c-aux-info.c (gen_type): Handle atomic qualifier.
3253 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3254 qualifiers when compating types.
3255 (shadow_tag_warned): Handle atomic_p in declspecs.
3256 (quals_from_declspecs): Likewise.
3257 (start_decl): Use c_type_promotes_to when promoting argument
3258 types.
3259 (grokdeclarator): Handle _Atomic.
3260 (get_parm_info): Diagnose any qualifier on "void" as only
3261 parameter.
3262 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3263 comparing types. Use c_type_promotes_to when promoting argument
3264 types.
3265 (finish_function): Use c_type_promotes_to when promoting argument
3266 types.
3267 (build_null_declspecs): Handle atomic_p in declspecs.
3268 (declspecs_add_qual): Handle RID_ATOMIC.
3269 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3270 (c_token_starts_declspecs): Handle RID_ATOMIC.
3271 (c_parser_declspecs): Handle atomic type specifiers and
3272 qualifiers.
3273 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3274 from types of expressions with atomic type.
3275 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3276 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3277 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3278 (c_parser_statement_after_labels, c_parser_switch_statement)
3279 (c_parser_for_statement, c_parser_expr_no_commas)
3280 (c_parser_conditional_expression, c_parser_binary_expression)
3281 (c_parser_cast_expression, c_parser_unary_expression)
3282 (c_parser_postfix_expression)
3283 (c_parser_postfix_expression_after_primary, c_parser_expression):
3284 Use convert_lvalue_to_rvalue.
3285 (c_parser_expression_conv, c_parser_expr_list): Document
3286 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3287 (c_parser_objc_synchronized_statement): Use
3288 convert_lvalue_to_rvalue.
3289 (c_parser_objc_selector): Handle RID_ATOMIC.
3290 (c_parser_objc_receiver, c_parser_array_notation): Use
3291 convert_lvalue_to_rvalue.
3292 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3293 _Atomic (type-name).
3294 (struct c_declspecs): Add atomic_p field.
3295 (convert_lvalue_to_rvalue): Declare.
3296 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3297 corresponding atomic types.
3298 (qualify_type): Don't add _Atomic qualifiers from second argument.
3299 (comp_target_types): Do not allow _Atomic mismatches.
3300 (type_lists_compatible_p): Do not remove atomic qualifiers when
3301 comparing types.
3302 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3303 (build_atomic_assign): New functions.
3304 (build_unary_op): Use build_atomic_assign for atomic increment and
3305 decrement.
3306 (build_conditional_expr): Do not treat _Atomic void as a qualified
3307 version of void.
3308 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3309 (find_anonymous_field_with_type, convert_to_anonymous_field)
3310 (convert_for_assignment): Do not remove atomic qualifiers when
3311 comparing types.
3312 (digest_init): Do not accept initialization of arrays of atomic
3313 elements by string constants.
3314 (build_asm_expr): Use convert_lvalue_to_rvalue.
3315 (build_binary_op): Do not treat _Atomic void as a qualified
3316 version of void.
3317
0c249d4b
DD
33182013-11-06 DJ Delorie <dj@redhat.com>
3319
3320 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3321 both explicit and builtin, print the location of the explicit one.
3322
6d7f7e0a
TB
33232013-11-05 Tobias Burnus <burnus@net-b.de>
3324
3325 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3326 c_parser_omp_distribute, c_parser_omp_teams,
3327 c_parser_omp_target, c_parser_omp_declare): Handle
3328 -fopenmp-simd.
3329
b906f4ca
MP
33302013-11-03 Marek Polacek <polacek@redhat.com>
3331
3332 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3333
ee1d5a02
JJ
33342013-11-01 Jakub Jelinek <jakub@redhat.com>
3335
3336 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3337 check_dup_generic at the end, unless remove is true.
3338 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3339 remove = true;.
3340 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3341
5a9785fb
JJ
33422013-10-31 Jakub Jelinek <jakub@redhat.com>
3343
3344 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3345 with decl that is not pointer nor array.
3346
939b37da
BI
33472013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3348
3349 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3350 a spawning function is found.
3351 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3352 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3353 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3354 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3355 case.
3356 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3357 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3358 expr.
3359 (c_finish_return): Added a check to reject _Cilk_spawn in return
3360 expression.
3361 (build_cilk_spawn): New function.
3362 (build_cilk_sync): Likewise.
3363 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3364
d4af74d4
TB
33652013-10-27 Tobias Burnus <burnus@net-b.de>
3366
3367 PR other/33426
3368 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3369 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3370 (c_parser_statement_after_labels): Update calls.
3371
d73749df 33722013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3373
3374 PR other/33426
3375 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3376 Handle PRAGMA_IVDEP.
3377 (c_parser_statement_after_labels): Update call.
3378
f28aa681
MP
33792013-10-24 Marek Polacek <polacek@redhat.com>
3380
3381 * c-parser.c (c_parser_struct_declaration): Add a comment.
3382 (c_parser_declarator): Don't allow _Alignas here.
3383
0645c1a2
AM
33842013-10-17 Andrew MacLeod <amacleod@redhat.com>
3385
3386 * c-parser.c: Include omp-low.h.
3387 * c-typeck.c: Likewise.
3388
568a31f2
MP
33892013-10-17 Marek Polacek <polacek@redhat.com>
3390
3391 PR c/58267
3392 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3393 Document syntax of the array-declarator.
3394 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3395 are not permitted.
3396 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3397 (c_parser_struct_declaration): Likewise.
3398 (c_parser_declarator): Likewise.
3399 (c_parser_direct_declarator_inner): Likewise.
3400 (c_parser_parameter_declaration): Likewise.
3401 (c_parser_type_name): Likewise.
3402
acf0174b
JJ
34032013-10-11 Jakub Jelinek <jakub@redhat.com>
3404
3405 * c-lang.h (current_omp_declare_target_attribute): New extern
3406 decl.
3407 * c-parser.c: Include c-lang.h.
3408 (struct c_parser): Change tokens to c_token *.
3409 Add tokens_buf field. Change tokens_avail type to unsigned int.
3410 (c_parser_consume_token): If parser->tokens isn't
3411 &parser->tokens_buf[0], increment parser->tokens.
3412 (c_parser_consume_pragma): Likewise.
3413 (enum pragma_context): Add pragma_struct and pragma_param.
3414 (c_parser_external_declaration): Adjust
3415 c_parser_declaration_or_fndef caller.
3416 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3417 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3418 Adjust recursive call.
3419 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3420 of pragma_external.
3421 (c_parser_parameter_declaration): Use pragma_param instead of
3422 pragma_external.
3423 (c_parser_compound_statement_nostart, c_parser_label,
3424 c_parser_for_statement): Adjust
3425 c_parser_declaration_or_fndef callers.
3426 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3427 it through to c_parser_conditional_expression.
3428 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3429 pass it through to c_parser_binary_expression. Adjust recursive
3430 call.
3431 (c_parser_binary_expression): Remove prec argument, add
3432 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3433 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3434 binop matches it, use build2 instead of parser_build_binary_op.
3435 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3436 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3437 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3438 Handle pragma_struct and pragma_param the same as pragma_external.
3439 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3440 (c_parser_omp_variable_list): Parse array sections for
3441 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3442 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3443 (c_parser_omp_clause_reduction): Handle user defined reductions.
3444 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3445 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3446 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3447 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3448 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3449 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3450 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3451 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3452 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3453 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3454 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3455 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3456 (c_parser_omp_for_loop): Add CODE argument, pass it through
3457 to c_finish_omp_for. Change last argument to cclauses,
3458 and adjust uses to grab parallel clauses from the array of all
3459 the split clauses. Adjust c_parser_binary_expression,
3460 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3461 (omp_split_clauses): New function.
3462 (c_parser_omp_simd): New function.
3463 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3464 Allow the function to be called also when parsing combined constructs,
3465 and call c_parser_omp_simd when parsing for simd.
3466 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3467 #pragma omp section, require exactly one structured-block instead of
3468 sequence of statements.
3469 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3470 Allow the function to be called also when parsing combined constructs.
3471 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3472 Allow the function to be called also when parsing combined
3473 constructs.
3474 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3475 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3476 c_parser_omp_teams, c_parser_omp_target_data,
3477 c_parser_omp_target_update, c_parser_omp_target,
3478 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3479 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3480 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3481 (c_parser_omp_construct): Add p_name and mask vars. Handle
3482 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3483 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3484 and c_parser_omp_sections callers.
3485 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3486 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3487 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3488 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3489 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3490 OMP_CLAUSE_DEPEND.
3491 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3492 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3493 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3494 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3495 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3496 * c-typeck.c: Include tree-inline.h.
3497 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3498 handle_omp_array_sections_1, handle_omp_array_sections,
3499 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3500 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3501 user defined reductions.
3502 (c_tree_equal): New function.
3503 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3504 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3505 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3506 c_check_omp_declare_reduction_r): New prototypes.
3507 * c-decl.c (current_omp_declare_target_attribute): New variable.
3508 (c_decl_attributes): New function.
3509 (start_decl, start_function): Use it instead of decl_attributes.
3510 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3511 c_omp_reduction_decl, c_omp_reduction_lookup,
3512 c_check_omp_declare_reduction_r): New functions.
3513
0a6c2227
TT
35142013-09-25 Tom Tromey <tromey@redhat.com>
3515
3516 * Make-lang.in (c/gccspec.o): Remove.
3517 (CFLAGS-c/gccspec.o): New variable.
3518 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3519 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3520 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3521
f3bc55f0
TT
35222013-09-25 Tom Tromey <tromey@redhat.com>
3523
3524 * Make-lang.in (c/gccspec.o): Don't use subshell.
3525
a24d975c
MP
35262013-09-18 Marek Polacek <polacek@redhat.com>
3527
3528 PR sanitize/58443
3529 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3530 Remove unnecessary check.
3531
ce6923c5
MP
35322013-09-18 Marek Polacek <polacek@redhat.com>
3533
3534 PR sanitizer/58411
3535 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3536 no_sanitize_undefined attribute.
3537
a1e51df9
KT
35382013-09-13 Kai Tietz <ktietz@redhat.com>
3539
3540 PR target/57848
3541 * c-decl.c (c_builtin_function_ext_scope): Remove
3542 wrong assumption that it is never called on prexisting
3543 symbol.
3544
0af94e6f
JR
35452013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3546
3547 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3548
20059c8b
GDR
35492013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3550
3551 * c-objc-common.c (c_tree_printer): Tidy.
3552
de5a5fa1
MP
35532013-08-30 Marek Polacek <polacek@redhat.com>
3554
3555 * c-typeck.c (build_binary_op): Add division by zero and shift
3556 instrumentation.
3557
2531a1d9 35582013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 3559 Joseph Myers <joseph@codesourcery.com>
2531a1d9 3560
6e2bcc98 3561 PR c/35649
2531a1d9
JR
3562 * c-typeck.c (c_common_type): Prefer double_type_node over
3563 other REAL_TYPE types with the same precision.
3564 (convert_arguments): Likewise.
3565
025311c4
GDR
35662013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3567
3568 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3569 (c_initialize_diagnostics): Call a destructor for the early printer.
3570
da6ca2b5
GDR
35712013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3572
3573 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3574 printer initialization.
3575
318cda85 35762013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 3577
318cda85
BI
3578 PR c/57490
3579 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3580 check for truth values.
3581 (expand_array_notation_exprs): Added truth values case. Removed an
3582 unwanted else. Added for-loop to walk through subtrees in default
3583 case.
3584
b066401f
GDR
35852013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3586
3587 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3588
fb48aadc
JM
35892013-07-23 Joseph Myers <joseph@codesourcery.com>
3590
3591 * c-parser.c (struct c_generic_association): Fix typo.
3592
433cc7b0
TT
35932013-07-23 Tom Tromey <tromey@redhat.com>
3594 Joseph Myers <joseph@codesourcery.com>
3595
3596 * c-parser.c (struct c_generic_association): New.
3597 (c_generic_association_d): New typedef.
3598 (c_parser_generic_selection): New function.
3599 (c_parser_postfix_expression): Handle RID_GENERIC.
3600
26d40c3d
JM
36012013-07-13 Jason Merrill <jason@redhat.com>
3602
3603 PR c++/57793
3604 * c-decl.c (finish_struct): Check for too-large class.
3605
ecdbd01a 36062013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
3607
3608 PR c/57821
3609 * c-typeck.c (set_init_index): When folding, check for index overflow.
3610
1141ed3f
BI
36112013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3612
3613 * c-parser.c (c_parser_array_notation): Removed rejection of array
3614 notations in an array of function pointers.
3615
713b46fa
BI
36162013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3617
3618 * c-array-notation.c (make_triplet_val_inv): New function.
3619 (create_cmp_incr): Likewise.
3620 (create_array_refs): Likewise.
3621 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3622 Also modularized common parts between functions and called the function.
3623 (build_array_notation_expr): Likewise.
3624 (fix_conditional_array_notations_1): Likewise.
3625 (fix_array_notation_expr): Likewise.
3626 (fix_array_notation_call_expr): Likewise.
3627
92f20202
MP
36282013-06-18 Marek Polacek <polacek@redhat.com>
3629
3630 PR c/57630
3631 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3632
73a23b06
BI
36332013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3634
3635 * c-array-notation.c (build_array_notation_expr): Reject array notation
3636 mismatch between LHS and RHS even inside a call_expr. Also, removed
3637 a couple while statements that were dead code.
3638
00b8517d
BI
36392013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3640
3641 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3642 excessive precision expressions in function parameters. Also removed
3643 couple unwanted while statements.
3644
1509bdda
BI
36452013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3646
3647 * c-array-notation.c (expand_array_notation_exprs): Added
3648 ARRAY_NOTATION_REF case.
3649
d60f1706
BI
36502013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3651
3652 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3653 function to c-family/array-notation-common.c.
3654 (is_cilkplus_reduce_builtin): Likewise.
3655 (find_rank): Likewise.
3656 (extract_array_notation_exprs): Likewise.
3657 (replace_array_notations): Likewise.
3658 (find_inv_trees): Likewise.
3659 (replace_inv_trees): Likewise.
3660 (contains_array_notation_expr): Likewise.
3661 (find_correct_array_notation_type): Likewise.
3662 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3663 (struct inv_list): Moved this to c-family/array-notation-common.c.
3664 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3665
6d6efbb3
BI
36662013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3667
3668 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3669 reduction functions outside the for-loop. Added a check if the fundecl
3670 is non-NULL. Finally, removed an unwanted if-statement, and made the
3671 body unconditional.
3672
25c22937
BI
36732013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3674
3675 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3676 condition of the if-statement matches the rank of else-block and then-
3677 block when array notations are used.
3678 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3679 expression after the entire function body is parsed.
3680 (c_parser_expr_no_commas): Delayed creating array notation expressions
3681 to the end of function parsing.
3682 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3683 whole if-statement instead of just the condition.
3684 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3685
edd25645
BI
36862013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3687
3688 PR c/57474
3689 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3690 array to NULL_TREE if they are unused. Also added a check for the
3691 field to be NULL before its fields are used in future.
3692
065ce7f1
RO
36932013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3694
3695 PR bootstrap/57450
3696 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3697 (build_array_notation_expr): Likewise.
3698
36536d79
BI
36992013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3700
3701 * c-typeck.c (build_array_ref): Added a check to see if array's
3702 index is greater than one. If true, then emit an error.
3703 (build_function_call_vec): Exclude error reporting and checking
3704 for builtin array-notation functions.
3705 (convert_arguments): Likewise.
3706 (c_finish_return): Added a check for array notations as a return
3707 expression. If true, then emit an error.
3708 (c_finish_loop): Added a check for array notations in a loop
3709 condition. If true then emit an error.
3710 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3711 (build_binary_op): Added a check for array notation expr inside
3712 op1 and op0. If present, we call another function to find correct
3713 type.
3714 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3715 * c-parser.c (c_parser_compound_statement): Check if array
3716 notation code is used in tree, if so, then transform them into
3717 appropriate C code.
3718 (c_parser_expr_no_commas): Check if array notation is used in LHS
3719 or RHS, if so, then build array notation expression instead of
3720 regular modify.
3721 (c_parser_postfix_expression_after_primary): Added a check for
3722 colon(s) after square braces, if so then handle it like an array
3723 notation. Also, break up array notations in unary op if found.
3724 (c_parser_direct_declarator_inner): Added a check for array
3725 notation.
3726 (c_parser_compound_statement): Added a check for array notation in
3727 a stmt. If one is present, then expand array notation expr.
3728 (c_parser_if_statement): Likewise.
3729 (c_parser_switch_statement): Added a check for array notations in
3730 a switch statement's condition. If true, then output an error.
3731 (c_parser_while_statement): Similarly, but for a while.
3732 (c_parser_do_statement): Similarly, but for a do-while.
3733 (c_parser_for_statement): Similarly, but for a for-loop.
3734 (c_parser_unary_expression): Check if array notation is used in a
3735 pre-increment or pre-decrement expression. If true, then expand
3736 them.
3737 (c_parser_array_notation): New function.
3738 * c-array-notation.c: New file.
3739 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3740
cd192ccc
MS
37412013-05-23 Mike Stump <mikestump@comcast.net>
3742
3743 * c-typeck.c (convert_for_assignment): Handle references to memory
3744 spaces better.
3745
427b248d
JM
37462013-05-16 Jason Merrill <jason@redhat.com>
3747
3748 * Make-lang.in (cc1$(exeext)): Use link mutex.
3749
44d90fe1
PC
37502013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3751
3752 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3753 to simply use OPT_Wpointer_arith.
3754 (build_unary_op): Likewise.
3755
4e7d7b3d
JJ
37562013-04-03 Jakub Jelinek <jakub@redhat.com>
3757
3758 PR c/19449
3759 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3760 argument. If set, or it temporarily for parsing of the first
3761 argument into force_folding_builtin_constant_p.
3762 (c_parser_postfix_expression): Adjust callers.
3763
839b422f
RB
37642013-03-21 Richard Biener <rguenther@suse.de>
3765
3766 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3767 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3768
2ee028f1
MP
37692013-02-12 Marek Polacek <polacek@redhat.com>
3770
3771 PR c/44938
3772 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3773 origtypes to NULL.
3774
8824edff
JJ
37752013-01-24 Jakub Jelinek <jakub@redhat.com>
3776
3777 PR c/56078
3778 * c-typeck.c (set_nonincremental_init_from_string): If
3779 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3780 returned false.
3781 (process_init_element): Likewise.
3782
eadd3d0d
JJ
37832012-12-20 Jakub Jelinek <jakub@redhat.com>
3784
3785 PR c++/55619
3786 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3787 argument, don't call default_function_array_conversion
3788 nor c_fully_fold here.
3789 (c_parser_asm_statement): Adjust callers.
3790 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3791 and outputs here, and call default_function_array_conversion
3792 on inputs that don't need to be addressable.
3793
f8a93a2e
JJ
37942012-12-18 Jakub Jelinek <jakub@redhat.com>
3795
3796 PR c/39464
3797 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3798 warning require that both c_common_unsigned_type as well as
3799 c_common_signed_type is the same for both mvl and mvr types.
3800
9771b263
DN
38012012-11-16 Diego Novillo <dnovillo@google.com>
3802
3803 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3804
3805 * c-common.c: Use new vec API in vec.h.
3806 * c-common.h: Likewise.
3807 * c-gimplify.c: Likewise.
3808 * c-pragma.c: Likewise.
3809 * c-pretty-print.c: Likewise.
3810 * c-pretty-print.h: Likewise.
3811 * c-semantics.c: Likewise.
3812 * c-decl.c: Likewise.
3813 * c-parser.c: Likewise.
3814 * c-tree.h: Likewise.
3815 * c-typeck.c: Likewise.
3816
880661a4
JW
38172012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3818
3819 PR c++/54930
3820 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3821
077d1abe
MLI
38222012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3823
3824 PR c/53066
3825 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3826 shadows a function, unless the variable is a function or a
3827 pointer-to-function.
3828
3a785c97
JJ
38292012-10-12 Jakub Jelinek <jakub@redhat.com>
3830
3831 PR c/54381
3832 * c-parser.c (struct c_tree_loc_pair): Removed.
3833 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3834 add location_t * and tree * arguments, fill in array of 3
3835 sizeof_arg trees and corresponding locs.
3836 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3837 c_parser_expr_list callers.
3838 (c_parser_postfix_expression_after_primary): Likewise. Pass
3839 array of 3 sizeof_arg trees and locs (corresponding to first
3840 3 arguments) to sizeof_pointer_memaccess_warning.
3841
703c8606
LC
38422012-10-09 Lawrence Crowl <crowl@google.com>
3843
3844 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3845 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3846 hash table.
3847
5d9de0d0
PC
38482012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3849
3850 PR c++/54194
3851 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3852 call.
3853
a212e43f
MG
38542012-10-09 Marc Glisse <marc.glisse@inria.fr>
3855
3856 PR c++/54427
3857 * c-typeck.c: Include c-common.h.
3858 (enum stv_conv): Moved to c-common.h.
3859 (scalar_to_vector): Moved to c-common.c.
3860 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3861 * Make-lang.in: c-typeck.c depends on c-common.h.
3862
3b78de56
AC
38632012-10-04 Arnaud Charlet <charlet@adacore.com>
3864
3865 * c-decl.c (c_write_global_declarations): Fix handling of
3866 -fdump-ada-spec*.
3867
78c60e3d
SS
38682012-09-30 Sharad Singhai <singhai@google.com>
3869
3870 * c-decl.c (c_write_global_declarations): Use a different method
3871 to determine if the dump has ben initialized.
3872
9f33203d
JM
38732012-09-14 Joseph Myers <joseph@codesourcery.com>
3874
3875 PR c/54552
3876 * c-typeck.c (c_cast_expr): When casting to a type requiring
3877 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3878 c_fully_fold first.
3879
a27d595d
JM
38802012-09-14 Joseph Myers <joseph@codesourcery.com>
3881
3882 PR c/54103
3883 * c-typeck.c (build_unary_op): Pass original argument of
3884 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3885 any C_MAYBE_CONST_EXPR, if it has integer operands.
3886 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3887 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3888 to c_objc_common_truthvalue_conversion, then remove any
3889 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3890 c_objc_common_truthvalue_conversion not
3891 c_common_truthvalue_conversion.
3892 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3893 call note_integer_operands for arguments with integer operands
3894 that are not integer constants.
3895
9feb29df
JJ
38962012-09-13 Jakub Jelinek <jakub@redhat.com>
3897
3898 PR c/54559
3899 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3900 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3901
d409320c
JJ
39022012-08-31 Jakub Jelinek <jakub@redhat.com>
3903
3904 PR c/54428
3905 * c-convert.c (convert): Don't call fold_convert_loc if
3906 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3907 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3908 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3909
6265d07c
JJ
39102012-08-24 Jakub Jelinek <jakub@redhat.com>
3911
3912 PR c/54355
3913 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3914 for nested and empty_ok arguments in the call to
3915 c_parser_declaration_or_fndef.
3916
1a4049e7
JJ
39172012-08-17 Jakub Jelinek <jakub@redhat.com>
3918
3919 * c-tree.h (c_last_sizeof_arg): Declare.
3920 * c-parser.c (struct c_tree_loc_pair): New type.
3921 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3922 non-NULL.
3923 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3924 (c_parser_postfix_expression_after_primary): Likewise. Call
3925 sizeof_pointer_memaccess_warning if needed.
3926 (sizeof_ptr_memacc_comptypes): New function.
3927 * c-typeck.c (c_last_sizeof_arg): New global variable.
3928 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3929
0229aee9
UB
39302012-07-24 Uros Bizjak <ubizjak@gmail.com>
3931
3932 * c-lang.h (lang_decl): Add variable_size GTY option.
3933
7ee2468b
SB
39342012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3935
3936 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3937 * Make-lang.in: Fix dependencies.
3938
d4a10d0a
SB
39392012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3940
3941 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3942 and add language Makefile hooks.
3943 * config-lang.in: New file.
3944 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3945 add the required "normal" config-lang.in rules.
3946 * c-lang.h: Moved from gcc/ to here.
3947 * c-tree.h: Likewise.
3948 * c-objc-common.c: Likewise.
3949 * c-objc-common.h: Likewise.
3950 * c-typeck.c: Likewise.
3951 * c-convert.c: Likewise.
3952 * c-lang.c: Likewise.
3953 * c-aux-info.c: Likewise.
3954 * c-errors.c: Likewise.
3955 * gccspec.c: Likewise.
3956 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3957 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3958\f
818ab71a 3959Copyright (C) 2012-2016 Free Software Foundation, Inc.
d4a10d0a
SB
3960
3961Copying and distribution of this file, with or without modification,
3962are permitted in any medium without royalty provided the copyright
3963notice and this notice are preserved.