]> gcc.gnu.org Git - gcc.git/blame - gcc/c/ChangeLog
re PR target/72827 (gnat bootstrap broken on powerpc64le-linux-gnu)
[gcc.git] / gcc / c / ChangeLog
CommitLineData
089af25c
DM
12016-08-31 David Malcolm <dmalcolm@redhat.com>
2
3 * c-parser.c (c_parser_declaration_or_fndef): Add trailing space
4 to the insertion fixits for "struct", "union", and "enum".
5
f9087798
DM
62016-08-30 David Malcolm <dmalcolm@redhat.com>
7
8 * c-decl.c (implicit_decl_warning): Use add_fixit_replace
9 rather than add_fixit_misspelled_id.
10 (undeclared_variable): Likewise.
11 * c-parser.c (c_parser_declaration_or_fndef): Likewise. Remove
12 now-redundant "here" params from add_fixit_insert method calls.
13 (c_parser_parameter_declaration): Likewise.
14 * c-typeck.c (build_component_ref): Remove now-redundant range
15 param from add_fixit_replace method calls.
16
ebef225f
MP
172016-08-25 Marek Polacek <polacek@redhat.com>
18
19 * c-typeck.c (parser_build_binary_op): Pass LHS to
20 warn_logical_not_parentheses.
21
fe377a48
MP
222016-08-25 Marek Polacek <polacek@redhat.com>
23
24 PR c/77323
25 * c-decl.c (declspecs_add_type): Set typespec_word even when __intN
26 or _FloatN or _FloatNx is not supported.
27 (finish_declspecs): Set type to integer_type_node when _FloatN or
28 _FloatNx is not supported.
29
c65699ef
JM
302016-08-19 Joseph Myers <joseph@codesourcery.com>
31
32 PR c/32187
33 * c-tree.h (cts_floatn_nx): New enum c_typespec_keyword value.
34 (struct c_declspecs): Add field floatn_nx_idx.
35 * c-decl.c (declspecs_add_type, finish_declspecs): Handle _FloatN
36 and _FloatNx type specifiers.
37 * c-parser.c (c_keyword_starts_typename, c_token_starts_declspecs)
38 (c_parser_declspecs, c_parser_attribute_any_word)
39 (c_parser_objc_selector): Use CASE_RID_FLOATN_NX.
40 * c-typeck.c (c_common_type): Handle _FloatN and _FloatNx types.
41 (convert_arguments): Avoid promoting _FloatN and _FloatNx types
42 narrower than double.
43
2f1364c2
JJ
442016-08-12 Jakub Jelinek <jakub@redhat.com>
45 Martin Liska <mliska@suse.cz>
46
47 PR c/67410
48 * c-typeck.c (set_nonincremental_init_from_string): Use / instead of
49 % to determine val element to change. Assert that
50 wchar_bytes * charwidth fits into val array.
51
191816a3
MP
522016-08-12 Marek Polacek <polacek@redhat.com>
53
54 PR c/7652
55 * c-parser.c (c_parser_external_declaration): Add FALLTHRU.
56 (c_parser_postfix_expression): Likewise.
57 * c-typeck.c (build_unary_op): Adjust fall through comment.
58 (c_mark_addressable): Likewise.
59
b95a64bb
JJ
602016-08-11 Jakub Jelinek <jakub@redhat.com>
61
62 PR c/72816
63 * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible
64 array member through typedef, for orig_qual_indirect == 0 clear
65 orig_qual_type.
66
895aa8e1
DM
672016-08-08 David Malcolm <dmalcolm@redhat.com>
68
69 PR c/64955
70 * c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
71 this up to selftest::run_c_tests.
72 (selftest::run_c_tests): New function.
73
0b212d8c
TS
742016-08-04 Thomas Schwinge <thomas@codesourcery.com>
75
ae9281fc
TS
76 * c-parser.c (struct oacc_routine_data): Add error_seen and
77 fndecl_seen members.
78 (c_finish_oacc_routine): Use these.
79 (c_parser_declaration_or_fndef): Adjust.
80 (c_parser_oacc_routine): Likewise. Support more C language
81 constructs, and improve diagnostics. Move pragma context
82 checking...
83 (c_parser_pragma): ... here.
84
0b212d8c
TS
85 * c-parser.c (struct oacc_routine_data): New.
86 (c_parser_declaration_or_fndef, c_parser_oacc_routine): Use it.
87 Simplify code.
88 (c_finish_oacc_routine): Likewise. Don't attach clauses to "omp
89 declare target" attribute.
90
76e2c821
JB
912016-08-01 Jan Beulich <jbeulich@suse.com>
92
93 * c-fold.c (c_fully_fold_internal): Also emit shift count
94 warnings for vector types.
95 * c-typeck.c (build_binary_op): Likewise.
96
f618a472
MP
972016-07-29 Marek Polacek <polacek@redhat.com>
98
99 PR c/71742
100 * c-decl.c (finish_struct): Rephrase an error message.
101
efd0786f
MP
102 PR c/71853
103 * c-parser.c (c_parser_switch_statement): Initialize ce.original_type
104 to error node for invalid code.
105
e00dceaf
MP
106 PR c/71573
107 * c-decl.c (implicitly_declare): Return decl early not only for
108 error_mark_nodes, but for anything that is not a FUNCTION_DECL.
109
673a107a
JJ
1102016-07-29 Jakub Jelinek <jakub@redhat.com>
111
112 PR c/71969
113 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS
114 on GNU extern inline functions.
115
a5b5c8b6
MP
1162016-07-29 Marek Polacek <polacek@redhat.com>
117
118 PR c/71583
119 * c-parser.c (c_parser_postfix_expression_after_paren_type): Also
120 check expr.value.
121
e3fe09c1
UB
1222016-07-22 Uros Bizjak <ubizjak@gmail.com>
123
124 * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1,
125
7c8f7eaa
DM
1262016-07-20 David Malcolm <dmalcolm@redhat.com>
127
128 * c-decl.c (struct edit_distance_traits<cpp_hashnode *>): Move to
129 spellcheck-tree.h
130 (best_macro_match): Likewise, converting from a typedef to a
131 subclass.
132 (find_closest_macro_cpp_cb): Move to spellcheck-tree.c.
133 (lookup_name_fuzzy): Update for change of best_macro_match to a
134 subclass with a ctor that calls cpp_forall_identifiers.
135
de6a69ee
DM
1362016-07-20 David Malcolm <dmalcolm@redhat.com>
137
138 * c-decl.c (implicit_decl_warning): Update for conversion of
139 return type of lookup_name_fuzzy to const char *.
140 (undeclared_variable): Likewise.
141 (lookup_name_fuzzy): Convert return type from tree to
142 const char *.
143 * c-parser.c (c_parser_declaration_or_fndef): Update for
144 conversion of return type of lookup_name_fuzzy to const char *.
145 (c_parser_parameter_declaration): Likewise.
146
b1c9c068
CP
1472016-07-15 Cesar Philippidis <cesar@codesourcery.com>
148
149 * c-parser.c (c_parser_oacc_declare): Don't scan for
150 GOMP_MAP_POINTER.
151 * c-typeck.c (handle_omp_array_sections): Mark data clauses with
152 GOMP_MAP_FORCE_{PRESENT,TO,FROM,TOFROM} as potentially having
153 zero-length subarrays.
154
ddbbcb19
JJ
1552016-07-15 Jakub Jelinek <jakub@redhat.com>
156
157 PR c/71858
158 * c-decl.c (implicit_decl_warning): Use FUZZY_LOOKUP_FUNCTION_NAME
159 instead of FUZZY_LOOKUP_NAME.
160 (lookup_name_fuzzy): For FUZZY_LOOKUP_FUNCTION_NAME consider
161 FUNCTION_DECLs, {VAR,PARM}_DECLs function pointers and macros.
162
dd36b877
JJ
1632016-07-14 Jakub Jelinek <jakub@redhat.com>
164
165 PR c/71858
166 * c-decl.c (lookup_name_fuzzy): Ignore binding->invisible.
167
8c681247
TS
1682016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
169
170 * c-parser.c (c_parser_generic_selection): Make type of variable
171 auto_vec.
172 (c_parser_omp_declare_simd): Likewise.
173
bf4fa671
TS
1742016-07-12 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
175
176 * c-decl.c (struct c_struct_parse_info): Change member types
177 from vec to auto_vec.
178 (start_struct): Adjust.
179 (finish_struct): Likewise.
180
557e8c49
JJ
1812016-07-02 Jakub Jelinek <jakub@redhat.com>
182
183 PR c/71719
184 * c-typeck.c (mark_exp_read): Handle VIEW_CONVERT_EXPR.
185
54d19c3b
TS
1862016-06-29 Thomas Schwinge <thomas@codesourcery.com>
187
188 * c-parser.c (c_parser_pragma) <PRAGMA_OMP_CANCELLATION_POINT>:
189 Move pragma context checking into...
190 (c_parser_omp_cancellation_point): ... here, and improve
191 diagnostic messages.
192 * c-typeck.c (c_finish_omp_cancel)
193 (c_finish_omp_cancellation_point): Improve diagnostic messages.
194
152ef731
JJ
1952016-06-29 Jakub Jelinek <jakub@redhat.com>
196
197 PR c/71685
198 * c-typeck.c (c_build_qualified_type): Don't clear
199 C_TYPE_INCOMPLETE_VARS for the main variant.
200
2012016-06-28 Martin Sebor <msebor@redhat.com>
4378d117
MS
202
203 PR c/71552
204 * c-typeck.c (output_init_element): Diagnose incompatible types
205 before non-constant initializers.
206
e9ac1f86
JJ
2072016-06-28 Jakub Jelinek <jakub@redhat.com>
208
209 * Make-lang.in: Don't cat ../stage_current if it does not exist.
210
277d7ee0
AK
2112016-06-23 Andi Kleen <ak@linux.intel.com>
212
213 * Make-lang.in: Add support for autofdo.
214
1a4f11c8
DM
2152016-06-22 David Malcolm <dmalcolm@redhat.com>
216
217 PR c/70339
218 * c-decl.c: Include spellcheck-tree.h and gcc-rich-location.h.
219 (implicit_decl_warning): When issuing warnings for implicit
220 declarations, attempt to provide a suggestion via
221 lookup_name_fuzzy.
222 (undeclared_variable): Likewise when issuing errors.
223 (lookup_name_in_scope): Likewise.
224 (struct edit_distance_traits<cpp_hashnode *>): New struct.
225 (best_macro_match): New typedef.
226 (find_closest_macro_cpp_cb): New function.
227 (lookup_name_fuzzy): New function.
228 * c-parser.c: Include gcc-rich-location.h.
229 (c_token_starts_typename): Split out case CPP_KEYWORD into...
230 (c_keyword_starts_typename): ...this new function.
231 (c_parser_declaration_or_fndef): When issuing errors about
232 missing "struct" etc, add a fixit. For other kinds of errors,
233 attempt to provide a suggestion via lookup_name_fuzzy.
234 (c_parser_parms_declarator): When looking ahead to detect typos in
235 type names, also reject CPP_KEYWORD.
236 (c_parser_parameter_declaration): When issuing errors about
237 unknown type names, attempt to provide a suggestion via
238 lookup_name_fuzzy.
239 * c-tree.h (c_keyword_starts_typename): New prototype.
240
5a578671
JM
2412016-06-20 Joseph Myers <joseph@codesourcery.com>
242
243 PR c/71601
244 * c-typeck.c (build_conditional_expr): Return error_mark_node if
245 c_common_type returns error_mark_node.
246
aa0db437
MS
2472016-06-19 Martin Sebor <msebor@redhat.com>
248
249 PR c/69507
250 * c-parser.c (c_parser_alignof_expression): Avoid diagnosing
251 __alignof__ (expression).
252
6a3f203c
DM
2532016-06-14 David Malcolm <dmalcolm@redhat.com>
254
255 * c-typeck.c: Include spellcheck-tree.h rather than spellcheck.h.
256
264757fb
DM
2572016-06-14 David Malcolm <dmalcolm@redhat.com>
258
259 * c-typeck.c (build_component_ref): Simplify fixit code by
260 using gcc_rich_location::add_fixit_misspelled_id.
261 (set_init_label): Likewise.
262
f7e4f2e3
DM
2632016-06-13 David Malcolm <dmalcolm@redhat.com>
264
265 * c-parser.c (c_parser_initelt): Provide location of name for new
266 location_t param of set_init_label.
267 * c-tree.h (set_init_label): Add location_t param.
268 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
269 param and use it when issuing error messages about unrecognized
270 field names. Attempt to provide a fixit hint if appropriate,
271 otherwise update the error message to provide the type name.
272
4b1ffdb1
TS
2732016-06-10 Thomas Schwinge <thomas@codesourcery.com>
274
275 PR c/71381
276 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
277 Loosen checking.
278
44a845ca
MS
2792016-06-08 Martin Sebor <msebor@redhat.com>
280 Jakub Jelinek <jakub@redhat.com>
281
282 PR c++/70507
283 PR c/68120
284 * c-typeck.c (convert_arguments): Don't promote last argument
285 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
286
92a5f2ba
MP
2872016-06-08 Marek Polacek <polacek@redhat.com>
288
289 PR c/71418
290 * c-decl.c (grokdeclarator): Check TYPE_P.
291
08203f73
MP
292 PR c/71426
293 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
294 code.
295
6ffd47b7
DM
2962016-06-07 David Malcolm <dmalcolm@redhat.com>
297
298 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
299 and structure element reference, capture the location of the
300 element name token and pass it to build_component_ref.
301 (c_parser_postfix_expression_after_primary): Likewise for
302 structure element dereference.
303 (c_parser_omp_variable_list): Likewise for
304 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
305 * c-tree.h (build_component_ref): Add location_t param.
306 * c-typeck.c (build_component_ref): Add location_t param
307 COMPONENT_LOC. Use it, if available, when issuing hints about
308 mispelled member names to provide a fixit replacement hint.
309
1f40cff3
MP
3102016-06-06 Marek Polacek <polacek@redhat.com>
311
312 PR c/71362
313 * c-parser.c (c_parser_direct_declarator): Set location.
314
5545a907
MP
3152016-06-06 Marek Polacek <polacek@redhat.com>
316
317 * c-typeck.c (comptypes_internal): Handle comparisons of
318 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
319 TYPE_REF_CAN_ALIAS_ALL.
320
b605f663
CLT
3212016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
322
323 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
324 arguments as addressable when async clause exists.
325
00631022
JJ
3262016-05-30 Jakub Jelinek <jakub@redhat.com>
327
328 PR c++/71349
329 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
330 when combined with target construct.
331
7211a097
JJ
3322016-05-26 Jakub Jelinek <jakub@redhat.com>
333
334 * c-parser.c (c_parser_omp_clause_schedule): Warn if
335 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
336
95efe6b6
MP
3372016-05-25 Marek Polacek <polacek@redhat.com>
338
339 PR c/71265
340 * c-decl.c (c_make_fname_decl): Don't check seen_error.
341
a23faf7a
MP
342 PR c/71266
343 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
344
e46c7770
CP
3452016-05-24 Cesar Philippidis <cesar@codesourcery.com>
346
347 * c-parser.c (c_parser_oacc_declare): Add support for
348 GOMP_MAP_FIRSTPRIVATE_POINTER.
349 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
350 argument with enum c_omp_region_type ort.
351 (handle_omp_array_sections): Likewise. Update call to
352 handle_omp_array_sections_1.
353 (c_finish_omp_clauses): Add specific errors and warning messages for
354 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
355 call to handle_omp_array_sections.
356
a04e69c0
TS
3572016-05-24 Thomas Schwinge <thomas@codesourcery.com>
358
359 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
360
f17a223d
RB
3612016-05-24 Richard Biener <rguenther@suse.de>
362
363 PR middle-end/70434
364 PR c/69504
365 * c-typeck.c (build_array_ref): Do not complain about indexing
366 non-lvalue vectors. Adjust for function name change.
367
79063edd
MS
3682016-05-20 Martin Sebor <msebor@redhat.com>
369
370 PR c/71115
371 * c-typeck.c (error_init): Use
372 expansion_point_location_if_in_system_header.
373 (warning_init): Same.
374
8a40fef3
DM
3752016-05-19 David Malcolm <dmalcolm@redhat.com>
376
377 PR c/71171
378 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
379 in error-handling.
380 (c_parser_postfix_expression): Likewise.
381 * c-tree.h (c_expr::set_error): New method.
382 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
383 that result's range is initialized.
384
e9892350
JG
3852016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
386
387 * c-typeck.c (parser_build_unary_op): Fix formatting.
388
8fad45f5
MW
3892016-05-16 Matthew Wahab <matthew.wahab@arm.com>
390
391 * c-decl.c (grokdeclarator): Remove errmsg and use of
392 targetm.invalid_return_type.
393 (grokparms): Remove errmsg and use of
394 targetm.invalid_parameter_type.
395
aa4b467b
JM
3962016-05-13 Joseph Myers <joseph@codesourcery.com>
397
398 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
399 function return type.
400
4f2e1536
MP
4012016-05-12 Marek Polacek <polacek@redhat.com>
402
403 PR c/70756
404 * c-decl.c (build_compound_literal): Pass LOC down to
405 c_incomplete_type_error.
406 * c-tree.h (require_complete_type): Adjust declaration.
407 (c_incomplete_type_error): Likewise.
408 * c-typeck.c (require_complete_type): Add location parameter, pass it
409 down to c_incomplete_type_error.
410 (c_incomplete_type_error): Add location parameter, pass it down to
411 error_at.
412 (build_component_ref): Pass location down to c_incomplete_type_error.
413 (default_conversion): Pass location down to require_complete_type.
414 (build_array_ref): Likewise.
415 (build_function_call_vec): Likewise.
416 (convert_arguments): Likewise.
417 (build_unary_op): Likewise.
418 (build_c_cast): Likewise.
419 (build_modify_expr): Likewise.
420 (convert_for_assignment): Likewise.
421 (c_finish_omp_clauses): Likewise.
422
d6e83a8d
MM
4232016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
424
425 PR c/43651
426 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
427 is enabled.
428 * c-errors.c (pedwarn_c90): Return true if warned.
429 * c-tree.h (pedwarn_c90): Change return type to bool.
430 (enum c_declspec_word): Add new enumerator cdw_atomic.
431
5c3a10fb
MP
4322016-05-11 Marek Polacek <polacek@redhat.com>
433
434 PR c++/71024
435 * c-decl.c (diagnose_mismatched_decls): Factor out code to
436 diagnose_mismatched_attributes and call it.
437
cf68d92c
MP
4382016-05-10 Marek Polacek <polacek@redhat.com>
439
440 PR c/70255
441 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
442 on a declaration following the definition.
443
351f85c5
JJ
4442016-05-05 Jakub Jelinek <jakub@redhat.com>
445
446 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
447 parse it through to c_parser_c99_block_statement.
448 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
449 caller.
450
deef7113
MP
4512016-05-04 Marek Polacek <polacek@redhat.com>
452
453 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
454 OPT_Wdangling_else.
455
de55efd5
MP
4562016-05-04 Marek Polacek <polacek@redhat.com>
457
458 PR c/48778
459 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
460 for macro expansions.
461
79ce98bc
MP
4622016-05-03 Marek Polacek <polacek@redhat.com>
463
464 PR c/70859
465 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
466 check_builtin_function_arguments.
467
fb2647aa
RB
4682016-05-03 Richard Biener <rguenther@suse.de>
469
470 * Make-lang.in (cc1-checksum.c): For stage-final re-use
471 the checksum from the previous stage.
472
77886428
CP
4732016-05-02 Cesar Philippidis <cesar@codesourcery.com>
474
475 * c-parser.c (c_parser_oacc_all_clauses): Update call to
476 c_finish_omp_clauses.
477 (c_parser_omp_all_clauses): Likewise.
478 (c_parser_oacc_cache): Likewise.
479 (c_parser_oacc_loop): Likewise.
480 (omp_split_clauses): Likewise.
481 (c_parser_omp_declare_target): Likewise.
482 (c_parser_cilk_all_clauses): Likewise.
483 (c_parser_cilk_for): Likewise.
484 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
485 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
486
7176a4a0
MP
4872016-05-02 Marek Polacek <polacek@redhat.com>
488
489 PR c/70851
490 * c-decl.c (grokdeclarator): Diagnose when array's size has an
491 incomplete type.
492
e7ff0319
CP
4932016-04-29 Cesar Philippidis <cesar@codesourcery.com>
494
495 PR middle-end/70626
496 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
497 OACC_LOOP_CLAUSE_MASK.
498 (c_parser_oacc_kernels_parallel): Update call to
499 c_oacc_split_loop_clauses.
500
9f405ce1
AM
5012016-04-28 Andrew MacLeod <amacleod@redhat.com>
502
503 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
504 argument to build_modify_expr in two cases.
505
c1e1f433
BS
5062016-04-27 Bernd Schmidt <bschmidt@redhat.com>
507
508 * c-parser.c (c_parser_postfix_expression_after_primary): Call
509 warn_for_memset instead of warning directly here.
510
2448a956
MP
5112016-04-26 Marek Polacek <polacek@redhat.com>
512
513 PR c/67784
514 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
515 out of ...
516 (c_parser_for_statement): ... here.
517 (c_parser_if_statement): Use it.
518 (c_parser_switch_statement): Use it.
519 (c_parser_while_statement): Use it.
520
b02a5e26
MP
521 PR c/70791
522 * c-decl.c (pushdecl): Pass LOCUS down to warning.
523
477d4906
IV
5242016-04-20 Ilya Verbin <ilya.verbin@intel.com>
525
526 PR c++/69363
527 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
528 instead of c_finish_cilk_clauses.
529 * c-tree.h (c_finish_omp_clauses): Add new default argument.
530 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
531 floating-point variables in the linear clause for Cilk Plus.
532
fe37c7af
MM
5332016-04-18 Michael Matz <matz@suse.de>
534
535 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
536 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
537
949505a9
MP
5382016-04-15 Marek Polacek <polacek@redhat.com>
539
540 PR c/70671
541 * c-typeck.c (build_unary_op): Pass location down to error and
542 warning call.
543
dda1bf61
JJ
5442016-04-15 Jakub Jelinek <jakub@redhat.com>
545
546 PR c/70436
547 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
548 where needed.
549 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
550 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
551 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
552 Adjust c_parser_pragma callers.
553 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
554 caller.
555 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
556 c_parser_statement.
557 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
558 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
559 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
560 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
561 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
562 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
563 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
564 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
565 down where needed.
566 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
567 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
568 calls.
569
99cd9857
MP
5702016-04-13 Marek Polacek <polacek@redhat.com>
571
572 PR c/70436
573 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
574 adjust callers.
575 (c_parser_statement): Likewise.
576 (c_parser_c99_block_statement): Likewise.
577 (c_parser_while_statement): Likewise.
578 (c_parser_for_statement): Likewise.
579 (c_parser_if_body): Don't set IF_P here.
580 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
581 about dangling else here.
582 * c-tree.h (c_finish_if_stmt): Adjust declaration.
583 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
584 warn about dangling else here.
585
f13355da
MP
5862016-04-04 Marek Polacek <polacek@redhat.com>
587
588 PR c/70307
589 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
590
5fde6a45
MP
5912016-03-31 Marek Polacek <polacek@redhat.com>
592
593 PR c/70297
594 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
595
4bbf545b
DM
5962016-03-18 David Malcolm <dmalcolm@redhat.com>
597
598 PR c/70281
599 * c-parser.c (c_parser_postfix_expression): Set the source range
600 for uses of "__builtin_types_compatible_p".
601
fcc2b74f
JJ
6022016-03-17 Jakub Jelinek <jakub@redhat.com>
603
604 PR c/70280
605 * c-typeck.c (composite_type): Don't count void_list_node
606 into len, if the list is terminated by void_list_node, start
607 with void_list_node instead of NULL for newargs. Stop
608 at void_list_node.
609
ab4c578f
MP
6102016-03-16 Marek Polacek <polacek@redhat.com>
611
612 PR c/70093
613 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
614 nested functions returning VM types.
615
96b3c82d
CP
6162016-03-09 Cesar Philippidis <cesar@codesourcery.com>
617
618 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
619 when calling c_finish_omp_clauses.
620
29b9828f
BS
6212016-03-04 Bernd Schmidt <bschmidt@redhat.com>
622
623 PR c/69824
624 * c-decl.c (get_parm_info): Don't queue implicit function declarations
625 for later.
626
7ff6ca38
MP
6272016-03-04 Marek Polacek <polacek@redhat.com>
628
629 PR c/69798
630 * c-parser.c (c_parser_postfix_expression): Call
631 c_parser_cast_expression rather than c_parser_postfix_expression.
632
686e2237
JJ
6332016-03-01 Jakub Jelinek <jakub@redhat.com>
634
635 PR c/69796
636 PR c/69974
637 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
638 of incomplete decls to error_mark_node.
639
0b05329b
MP
6402016-02-24 Marek Polacek <polacek@redhat.com>
641
642 PR c/69819
643 * c-decl.c (finish_decl): Don't update the copy of the type of a
644 different decl type.
645
067fbd8b
JJ
6462016-02-23 Jakub Jelinek <jakub@redhat.com>
647
648 PR objc/69844
649 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
650 in id_kind reclassification.
651
bf14eba2
JJ
6522016-02-16 Jakub Jelinek <jakub@redhat.com>
653
654 PR c/69835
655 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
656
ba539195
JN
6572016-02-16 James Norris <jnorris@codesourcery.com>
658
659 PR c/64748
660 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
661
16595a1f
BS
6622016-02-12 Bernd Schmidt <bschmidt@redhat.com>
663
f48dfe98
BS
664 * c-decl.c (build_null_declspecs): Zero the entire struct.
665
16595a1f
BS
666 PR c/69522
667 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
668 callers changed. If nested_p is true, use it to call
669 finish_implicit_inits.
670 * c-tree.h (finish_implicit_inits): Declare.
671 * c-typeck.c (finish_implicit_inits): New function. Move code
672 from ...
673 (push_init_level): ... here.
674 (set_designator, process_init_element): Call finish_implicit_inits.
675
66756373
JJ
6762016-02-11 Jakub Jelinek <jakub@redhat.com>
677
678 PR c/69768
679 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
680 arguments for -Waddress warning.
681
1066e9b5
JJ
6822016-02-04 Jakub Jelinek <jakub@redhat.com>
683
684 PR c/69669
685 * c-decl.c (finish_enum): When honoring mode attribute,
686 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
687
3a5d2ba4
JJ
6882016-01-29 Jakub Jelinek <jakub@redhat.com>
689
690 PR debug/69518
691 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
692 all type variants, not just TYPE_MAIN_VARIANT.
693
cbdd8ae0
JJ
6942016-01-27 Jakub Jelinek <jakub@redhat.com>
695
696 PR debug/66869
697 * c-decl.c (c_write_global_declarations_1): Warn with
698 warn_unused_function if static prototype without definition
699 is not C_DECL_USED.
700
fa74a4bc
MP
7012016-01-27 Marek Polacek <polacek@redhat.com>
702
703 PR c/68062
704 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
705 to unsigned, if needed. Add -Wsign-compare warning.
706
13f92e8d
JJ
7072016-01-26 Jakub Jelinek <jakub@redhat.com>
708
709 PR tree-optimization/69483
710 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
711
cd8e73dc 7122016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
713
714 PR c/24293
715 * c-tree.h (incomplete_record_decls): Declare.
716 * c-parser.c (incomplete_record_decls): Define.
717 (c_parser_translation_unit): Iterate through incomplete_record_decls and
718 report error if any decl has zero size.
719 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
720 or enum type to incomplete_record_decls.
721
e6d6ec9e
TV
7222016-01-14 Tom de Vries <tom@codesourcery.com>
723
724 PR tree-optimization/68773
725 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
726 set force_output.
727
00083992
MP
7282016-01-14 Marek Polacek <polacek@redhat.com>
729
730 PR c/69262
731 * c-decl.c (grokdeclarator): Provide more information for invalid
732 array declarations.
733
7443cf13
DM
7342016-01-06 David Malcolm <dmalcolm@redhat.com>
735
736 * c-parser.c (c_parser_unary_expression): For dereferences, build
737 a combined location before calling build_indirect_ref, so that
738 error reports cover the full range, manually updating the c_expr
739 src_range.
740
6b131d5b
MP
7412016-01-06 Marek Polacek <polacek@redhat.com>
742
743 PR sanitizer/69099
744 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
745 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
746 NULL.
747
818ab71a
JJ
7482016-01-04 Jakub Jelinek <jakub@redhat.com>
749
750 Update copyright years.
751
2fe0a208
MP
7522016-01-04 Marek Polacek <polacek@redhat.com>
753
754 PR c/68908
755 * c-typeck.c (build_atomic_assign): Improve commentary. Add
756 optimization to use __atomic_fetch_* built-in if possible.
757
c7b48c8a
TS
7582015-12-23 Thomas Schwinge <thomas@codesourcery.com>
759
760 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
761 into...
762 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
763 all users.
764
fda5652f
MP
7652015-12-22 Marek Polacek <polacek@redhat.com>
766
767 PR c/69002
768 * c-typeck.c (build_component_ref): Warn when acessing elements of
769 atomic structures or unions.
770
745e411d
DM
7712015-12-21 David Malcolm <dmalcolm@redhat.com>
772
773 * c-typeck.c: Include "gcc-rich-location.h".
774 (build_binary_op): In the two places that call binary_op_error,
775 create a gcc_rich_location and populate it with the location of
776 the binary op and its two operands.
777
94c40e19
DM
7782015-12-16 David Malcolm <dmalcolm@redhat.com>
779
780 * c-parser.c (c_parser_statement_after_labels): When calling
781 c_finish_return, Use the return expression's location if it has
782 one, falling back to the location of the first token within it.
783 * c-typeck.c (c_finish_return): When issuing warnings about
784 the incorrect presence/absence of a return value, issue a note
785 showing the declaration of the function.
786
de67c4c3
DM
7872015-12-16 David Malcolm <dmalcolm@redhat.com>
788
789 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
790 to 4.
791 (c_parser_peek_nth_token): New function.
792 (c_parser_peek_conflict_marker): New function.
793 (c_parser_error): Detect conflict markers and report them as such.
794
a10704e1
DM
7952015-12-16 David Malcolm <dmalcolm@redhat.com>
796
797 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
798 to preserve range information for the primary expression
799 in the call to c_parser_postfix_expression_after_primary.
800
8062bca6
DM
8012015-12-16 David Malcolm <dmalcolm@redhat.com>
802
803 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
804 expression location, falling back on the first token location,
805 rather than always using the latter.
806
d06f8b75
MP
8072015-12-16 Marek Polacek <polacek@redhat.com>
808
809 PR c/64637
810 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
811 available.
812
2994fb91
MP
8132015-12-15 Marek Polacek <polacek@redhat.com>
814
815 PR c/68907
816 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
817 artificial decl.
818
a1b93f8d
DM
8192015-12-08 David Malcolm <dmalcolm@redhat.com>
820
821 * c-parser.c (c_parser_alignof_expression): Capture location of
822 closing parenthesis (if any), or of end of unary expression, and
823 use it to build a src_range for the expression.
824
46c6e1e2
DM
8252015-12-08 David Malcolm <dmalcolm@redhat.com>
826
827 PR c/68757
828 * c-parser.c (c_parser_get_builtin_args): Add
829 "out_close_paren_loc" param, and write back to it.
830 (c_parser_postfix_expression): Capture the closing
831 parenthesis location for RID_CHOOSE_EXPR,
832 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
833 RID_BUILTIN_SHUFFLE and use it to set the source range
834 for such expressions; within RID_BUILTIN_COMPLEX set
835 the underlying location.
836
66189108
MP
8372015-12-07 Marek Polacek <polacek@redhat.com>
838
839 PR c/68668
840 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
841 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
842
f187980b
EB
8432015-12-04 Eric Botcazou <ebotcazou@adacore.com>
844
845 * c-tree.h (c_build_va_arg): Adjust prototype.
846 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
847 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
848 parameter, adjust throughout and issue an error if EXPR is a component
849 with reverse storage order.
850
4250754e
JM
8512015-12-02 Jason Merrill <jason@redhat.com>
852
853 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
854 (c_fully_fold_internal, decl_constant_value_for_optimization):
855 Move from c-common.c.
856 * c-tree.h: Declare decl_constant_value_for_optimization.
857 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
858
e9e32ee6
JM
8592015-12-02 Joseph Myers <joseph@codesourcery.com>
860
861 PR c/68162
862 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
863 following link from declarator to next declarator. Track original
864 qualified type and pass it to c_build_qualified_type.
865 * c-typeck.c (c_build_qualified_type): Add arguments
866 orig_qual_type and orig_qual_indirect.
867
ff7a55bf
TS
8682015-12-02 Thomas Schwinge <thomas@codesourcery.com>
869
870 * c-parser.c (c_parser_omp_clause_name)
871 (c_parser_oacc_all_clauses): Alphabetical sorting.
872
657e4e47
JJ
8732015-12-02 Jakub Jelinek <jakub@redhat.com>
874
875 PR c/68533
876 * c-decl.c (get_parm_info): Use b->locus instead of input_location
877 for diagnostics.
878
37d5ad46
JB
8792015-12-01 Julian Brown <julian@codesourcery.com>
880 Cesar Philippidis <cesar@codesourcery.com>
881 James Norris <James_Norris@mentor.com>
882
883 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
884 (c_parser_oacc_clause_use_device): New function.
885 (c_parser_oacc_all_clauses): Add use_device support.
886 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
887 (c_parser_oacc_host_data): New function.
888 (c_parser_omp_construct): Add host_data support.
889 * c-tree.h (c_finish_oacc_host_data): Add prototype.
890 * c-typeck.c (c_finish_oacc_host_data): New function.
891 (c_finish_omp_clauses): Add use_device support.
892
a4850ce9
JH
8932015-11-29 Jan Hubicka <hubicka@ucw.cz>
894
895 PR c/67106
896 * c-decl.c: Set TYPE_PACKED in variants.
897
b58d3df2
ML
8982015-11-27 Martin Liska <mliska@suse.cz>
899
900 PR c++/68312
901 * c-array-notation.c (fix_builtin_array_notation_fn):
902 Use release_vec_vec instead of vec::release.
903 (build_array_notation_expr): Likewise.
904 (fix_conditional_array_notations_1): Likewise.
905 (fix_array_notation_expr): Likewise.
906 (fix_array_notation_call_expr): Likewise.
907
aec17bfe
JJ
9082015-11-27 Jakub Jelinek <jakub@redhat.com>
909
910 PR c/63326
911 * c-parser.c (c_parser_compound_statement_nostart): If
912 last_label is true, use pragma_stmt instead of pragma_compound
913 as second c_parser_pragma argument.
914 (c_parser_omp_ordered, c_parser_omp_target_update,
915 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
916 false as second argument to c_parser_skip_to_pragma_eol after
917 diagnosing standalone directives used in pragma_stmt context.
918
688c4de0
IV
9192015-11-24 Ilya Verbin <ilya.verbin@intel.com>
920
921 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
922 with "if (ENABLE_OFFLOADING)".
923
cbd03aee
DM
9242015-11-23 David Malcolm <dmalcolm@redhat.com>
925
926 PR objc/68438
927 * c-parser.c (c_parser_postfix_expression): Set up source ranges
928 for various Objective-C constructs: Class.name syntax,
929 @selector(), @protocol(), @encode(), and [] message syntax.
930
a87a86e1
DM
9312015-11-20 David Malcolm <dmalcolm@redhat.com>
932
933 PR 62314
934 * c-typeck.c (should_suggest_deref_p): New function.
935 (build_component_ref): Special-case POINTER_TYPE when
936 generating a "not a structure of union" error message, and
937 suggest a "->" rather than a ".", providing a fix-it hint.
938
8ece8dfb
DM
9392015-11-19 David Malcolm <dmalcolm@redhat.com>
940
941 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
942 candidate into a new function, find_closest_identifier.
943
433068cc
MP
9442015-11-19 Marek Polacek <polacek@redhat.com>
945
946 PR c/68412
947 * c-typeck.c (parser_build_binary_op): Properly handle
948 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
949
bef08b71
DM
9502015-11-17 David Malcolm <dmalcolm@redhat.com>
951
952 * c-parser.c (set_c_expr_source_range): Bulletproof both
953 overloaded implementations against NULL expr->value.
954 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
955 values.
956 (c_parser_unary_expression): Likewise when handling addresses of
957 labels.
958 (c_parser_postfix_expression): Likewise for statement expressions,
959 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
960 __builtin_va_arg, and for __builtin_offset_of.
961 (c_parser_postfix_expression_after_paren_type): Initialize expr's
962 src_range using the range of the braced initializer.
963 (c_parser_transaction_expression): Set src_range for "ret" to a
964 sane pair of values.
965
fff77217
KY
9662015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
967
968 * c-parser.c (c_finish_omp_declare_simd): Look for
969 "simd" attribute as well. Update error message.
970
1d899da2
TS
9712015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
972
973 * c-parser.c (c_parser_omp_declare_target): Adjust.
974
e4606348
JJ
9752015-11-14 Jakub Jelinek <jakub@redhat.com>
976
977 * c-typeck.c (c_finish_omp_clauses): Don't mark
978 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
979
3e636daf
MP
9802015-11-14 Marek Polacek <polacek@redhat.com>
981
982 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
983 * c-typeck.c: Likewise.
984
ebedc9a3
DM
9852015-11-13 David Malcolm <dmalcolm@redhat.com>
986
987 * c-decl.c (warn_defaults_to): Pass line_table to
988 rich_location ctor.
989 * c-errors.c (pedwarn_c99): Likewise.
990 (pedwarn_c90): Likewise.
991 * c-parser.c (set_c_expr_source_range): New functions.
992 (c_token::get_range): New method.
993 (c_token::get_finish): New method.
994 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
995 based on the range from the start of the LHS to the end of the
996 RHS.
997 (c_parser_conditional_expression): Likewise, based on the range
998 from the start of the cond.value to the end of exp2.value.
999 (c_parser_binary_expression): Call set_c_expr_source_range on
1000 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
1001 (c_parser_cast_expression): Call set_c_expr_source_range on ret
1002 based on the cast_loc through to the end of the expr.
1003 (c_parser_unary_expression): Likewise, based on the
1004 op_loc through to the end of op.
1005 (c_parser_sizeof_expression) Likewise, based on the start of the
1006 sizeof token through to either the closing paren or the end of
1007 expr.
1008 (c_parser_postfix_expression): Likewise, using the token range,
1009 or from the open paren through to the close paren for
1010 parenthesized expressions.
1011 (c_parser_postfix_expression_after_primary): Likewise, for
1012 various kinds of expression.
1013 * c-tree.h (struct c_expr): Add field "src_range".
1014 (c_expr::get_start): New method.
1015 (c_expr::get_finish): New method.
1016 (set_c_expr_source_range): New decls.
1017 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
1018 on ret for prefix unary ops.
1019 (parser_build_binary_op): Likewise, running from the start of
1020 arg1.value through to the end of arg2.value.
1021
ec8b536f
MP
10222015-11-13 Marek Polacek <polacek@redhat.com>
1023
1024 PR c/68320
1025 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
1026
277fe616
DM
10272015-11-13 David Malcolm <dmalcolm@redhat.com>
1028
1029 * c-typeck.c: Include spellcheck.h.
1030 (lookup_field_fuzzy_find_candidates): New function.
1031 (lookup_field_fuzzy): New function.
1032 (build_component_ref): If the field was not found, try using
1033 lookup_field_fuzzy and potentially offer a suggestion.
1034
6e232ba4
JN
10352015-11-12 James Norris <jnorris@codesourcery.com>
1036 Joseph Myers <joseph@codesourcery.com>
1037
1038 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
1039 (c_parser_omp_clause_name): Handle 'device_resident' clause.
1040 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1041 and PRAGMA_OMP_CLAUSE_LINK.
1042 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
1043 and PRAGMA_OACC_CLAUSE_LINK.
1044 (OACC_DECLARE_CLAUSE_MASK): New definition.
1045 (c_parser_oacc_declare): New function.
1046
9be4f715
MP
10472015-11-12 Marek Polacek <polacek@redhat.com>
1048
1049 PR c/67784
1050 * c-parser.c (c_parser_for_statement): Reclassify the token in
1051 a correct scope.
1052
e78bede6
MP
10532015-11-11 Marek Polacek <polacek@redhat.com>
1054
1055 PR c/68107
1056 PR c++/68266
1057 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
1058 checking the size of an array.
1059
69f293c9
AM
10602015-11-11 Andrew MacLeod <amacleod@redhat.com>
1061
1062 * c-array-notation.c: Remove unused header files.
1063 * c-aux-info.c: Likewise.
1064 * c-convert.c: Likewise.
1065 * c-decl.c: Likewise.
1066 * c-errors.c: Likewise.
1067 * c-lang.c: Likewise.
1068 * c-objc-common.c: Likewise.
1069 * c-parser.c: Likewise.
1070 * c-typeck.c: Likewise.
1071 * gccspec.c: Likewise.
1072
3a40d81d
NS
10732015-11-09 Thomas Schwinge <thomas@codesourcery.com>
1074 Cesar Philippidis <cesar@codesourcery.com>
1075 James Norris <jnorris@codesourcery.com>
1076 Julian Brown <julian@codesourcery.com>
1077 Nathan Sidwell <nathan@codesourcery.com>
1078
1079 c/
1080 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
1081 routine arg.
1082 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
1083 (c_parser_pragma): Parse 'acc routine'.
1084 (OACC_ROUTINE_CLAUSE_MARK): Define.
1085 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
1086
fc402eec
AA
10872015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1088
1089 PR debug/67192
1090 * c-typeck.c (c_finish_loop): For unconditional loops, set the
1091 location of the backward-goto to the start of the loop body.
1092
f6b0b3db
AA
10932015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
1094
1095 PR debug/67192
1096 * c-parser.c (c_parser_while_statement): Finish the loop before
1097 parsing ahead for misleading indentation.
1098 (c_parser_for_statement): Likewise.
1099
ee45a32d
EB
11002015-11-08 Eric Botcazou <ebotcazou@adacore.com>
1101
1102 * c-decl.c (finish_struct): If the structure has reverse storage
1103 order, rewrite the type of array fields with scalar component. Call
1104 maybe_apply_pragma_scalar_storage_order on entry.
1105 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
1106 errors on bit-fields and reverse SSO here and not...
1107 (c_mark_addressable): ...here.
1108 (output_init_element): Adjust call to initializer_constant_valid_p.
1109 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
1110
8a645150
DM
11112015-11-06 David Malcolm <dmalcolm@redhat.com>
1112
1113 * c-decl.c (warn_defaults_to): Update for change in signature
1114 of diagnostic_set_info.
1115 * c-errors.c (pedwarn_c99): Likewise.
1116 (pedwarn_c90): Likewise.
1117 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
1118 for textinfo::set_location.
1119
7a5e4956
CP
11202015-11-05 Cesar Philippidis <cesar@codesourcery.com>
1121 Thomas Schwinge <thomas@codesourcery.com>
1122 James Norris <jnorris@codesourcery.com>
1123
1124 * c-parser.c (c_parser_omp_clause_name): Add support for
1125 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
1126 (c_parser_omp_clause_default): Add is_oacc argument. Handle
1127 default(none) in OpenACC.
1128 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
1129 arguments.
1130 (c_parser_oacc_clause_tile): New function.
1131 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
1132 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
1133 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
1134 TILE}.
1135 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
1136 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
1137 FIRSTPRIVATE}.
1138 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
1139 (c_parser_oacc_update): Update the error message for missing clauses.
1140 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
1141 and OMP_CLAUSE_INDEPENDENT.
1142
bfcfbfa0
MP
11432015-11-05 Marek Polacek <polacek@redhat.com>
1144
1145 PR c/68090
1146 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
1147 deal with pre-evaluation on invalid types.
1148
e01d41e5
JJ
11492015-11-05 Jakub Jelinek <jakub@redhat.com>
1150 Ilya Verbin <ilya.verbin@intel.com>
1151
1152 * c-parser.c: Include context.h and gimple-expr.h.
1153 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
1154 monotonic together with nonmonotonic.
1155 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
1156 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
1157 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
1158 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
1159 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
1160 expressions on combined target teams before the target.
1161 (c_parser_omp_declare_target): If decl has "omp declare target" or
1162 "omp declare target link" attribute, and cgraph or varpool node already
1163 exists, then set corresponding flags. Call c_finish_omp_clauses
1164 in the parenthesized extended-list syntax case.
1165 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
1166 declare target.
1167 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
1168 on OMP_CLAUSE_REDUCTION array sections.
1169 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
1170 into the constant offset, or for variable low-bound using
1171 POINTER_PLUS_EXPR. For structure element based array sections use
1172 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
1173 (c_finish_omp_clauses): Drop generic_field_head, structure
1174 elements are now always mapped even as array section bases,
1175 diagnose same var in data sharing and mapping clauses. Diagnose if
1176 linear step on declare simd is neither a constant nor a uniform
1177 parameter. Look through POINTER_PLUS_EXPR for array section
1178 reductions. Diagnose the same var or function appearing multiple
1179 times on the same directive. Fix up wording for the to clause if t
1180 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
1181 modifier on kinds other than dynamic or guided or nonmonotonic
1182 modifier together with ordered clause.
1183
4bf9e5a8
TS
11842015-11-03 Thomas Schwinge <thomas@codesourcery.com>
1185 Chung-Lin Tang <cltang@codesourcery.com>
1186
1187 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
1188
2adfab87
AM
11892015-10-29 Andrew MacLeod <amacleod@redhat.com>
1190
1191 * c-array-notation.c: Reorder #include's and remove duplicates.
1192 * c-aux-info.c: Likewise.
1193 * c-convert.c: Likewise.
1194 * c-decl.c: Likewise.
1195 * c-errors.c: Likewise.
1196 * c-lang.c: Likewise.
1197 * c-objc-common.c: Likewise.
1198 * c-parser.c: Likewise.
1199 * c-typeck.c: Likewise.
1200
e922069e
JW
12012015-10-26 Jim Wilson <jim.wilson@linaro.org>
1202
1203 PR debug/66068
1204 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
1205 after calling build_qualified_type.
1206
765dd391
CP
12072015-10-27 Cesar Philippidis <cesar@codesourcery.com>
1208 Thomas Schwinge <thomas@codesourcery.com>
1209 James Norris <jnorris@codesourcery.com>
1210 Joseph Myers <joseph@codesourcery.com>
1211 Julian Brown <julian@codesourcery.com>
1212 Bernd Schmidt <bschmidt@redhat.com>
1213
1214 * c-parser.c (c_parser_oacc_shape_clause): New.
1215 (c_parser_oacc_simple_clause): New.
1216 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
1217 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
1218
88bae6f4
TS
12192015-10-27 Thomas Schwinge <thomas@codesourcery.com>
1220 James Norris <jnorris@codesourcery.com>
1221 Cesar Philippidis <cesar@codesourcery.com>
1222
1223 PR c/64765
1224 PR c/64880
1225 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
1226 parameters, and handle these. Adjust all users.
1227 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
1228 into...
1229 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
1230 all users.
1231 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
1232 declare functions.
1233 (c_finish_omp_construct): Declare function.
1234 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
1235 Merge functions into...
1236 (c_finish_omp_construct): ... this new function.
1237
a8fc2579
RB
12382015-10-22 Richard Biener <rguenther@suse.de>
1239
1240 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
1241 before folding a MINUS_EXPR.
1242
e9122ef6
MP
12432015-10-21 Marek Polacek <polacek@redhat.com>
1244
1245 PR c/68024
1246 * c-decl.c (start_function): Warn about vararg functions without
1247 a prototype.
1248
9f47c7e5
IE
12492015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
1250
1251 * c-typeck.c (build_conditional_expr): Use boolean vector
1252 type for vector comparison.
1253 (build_vec_cmp): New.
1254 (build_binary_op): Use build_vec_cmp for comparison.
1255
fa60eeb9
MP
12562015-10-20 Marek Polacek <polacek@redhat.com>
1257
1258 * c-parser.c (is_cilkplus_vector_p): Don't define here.
1259
2c7020eb
MP
12602015-10-20 Marek Polacek <polacek@redhat.com>
1261
1262 PR c/67964
1263 * c-parser.c (c_parser_attributes): Break out of the loop if the
1264 token after an attribute isn't a comma.
1265
d9a6bd32
JJ
12662015-10-13 Jakub Jelinek <jakub@redhat.com>
1267 Aldy Hernandez <aldyh@redhat.com>
1268
1269 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1270 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1271 (c_parser_omp_variable_list): Handle structure elements for
1272 map, to and from clauses. Handle array sections in reduction
1273 clause. Formatting fixes.
1274 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1275 if clause modifiers.
1276 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1277 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1278 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1279 c_parser_omp_clause_is_device_ptr): New functions.
1280 (c_parser_omp_clause_ordered): Parse optional parameter.
1281 (c_parser_omp_clause_reduction): Handle array reductions.
1282 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1283 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1284 functions.
1285 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1286 (c_parser_omp_clause_depend_sink): New function.
1287 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1288 (c_parser_omp_clause_map): Parse release/delete map kinds and
1289 optional always modifier.
1290 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1291 and c_finish_omp_clauses callers.
1292 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1293 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1294 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1295 (OMP_CRITICAL_CLAUSE_MASK): Define.
1296 (c_parser_omp_critical): Parse critical clauses.
1297 (c_parser_omp_for_loop): Handle doacross loops, adjust
1298 c_finish_omp_for and c_finish_omp_clauses callers.
1299 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1300 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1301 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1302 (c_parser_omp_for): Disallow ordered clause when combined with
1303 distribute. Disallow linear clause when combined with distribute
1304 and not combined with simd.
1305 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1306 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1307 parse clauses and if depend clause is found, don't parse a body.
1308 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1309 Allow target parallel without for after it.
1310 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1311 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1312 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1313 invalid kinds.
1314 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1315 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1316 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1317 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1318 functions.
1319 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1320 defaultmap and is_device_ptr clauses.
1321 (c_parser_omp_target): Parse target parallel and target simd. Set
1322 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1323 and target exit data. Diagnose invalid map kinds.
1324 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1325 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1326 construct.
1327 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1328 &omp_priv.
1329 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1330 (c_parser_omp_taskloop): New function.
1331 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1332 handle PRAGMA_OMP_TASKLOOP.
1333 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1334 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1335 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1336 Add IS_OMP argument, handle structure element bases, diagnose
1337 bitfields, pass IS_OMP recursively, diagnose known zero length
1338 array sections in depend clauses, handle array sections in reduction
1339 clause, diagnose negative length even for pointers.
1340 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1341 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1342 array sections in reduction clause, set
1343 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1344 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1345 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1346 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1347
21ba0cea
MP
13482015-10-06 Marek Polacek <polacek@redhat.com>
1349
1350 * c-parser.c (c_parser_statement_after_labels): Use
1351 protected_set_expr_location.
1352 (c_parser_omp_clause_num_gangs): Likewise.
1353 (c_parser_omp_clause_num_threads): Likewise.
1354 (c_parser_omp_clause_num_workers): Likewise.
1355 (c_parser_omp_clause_vector_length): Likewise.
1356 (c_parser_omp_clause_num_teams): Likewise.
1357 (c_parser_omp_clause_thread_limit): Likewise.
1358 * c-typeck.c (build_c_cast): Likewise.
1359 (c_cast_expr): Likewise.
1360
624d31fe
RS
13612015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1362
1363 * c-typeck.c (c_tree_equal): Use real_equal instead of
1364 REAL_VALUES_EQUAL.
1365
b8fd7909
JM
13662015-10-04 Jason Merrill <jason@redhat.com>
1367
1368 * c-parser.c (c_lex_one_token): Handle @synchronized.
1369 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1370 can change whether the function is transaction_safe.
1371
1c7485af
MP
13722015-10-02 Marek Polacek <polacek@redhat.com>
1373
1374 PR c/67730
1375 * c-typeck.c (convert_for_assignment): Use the expansion point
1376 location throughout.
1377
3e3b8d63
MP
13782015-10-02 Marek Polacek <polacek@redhat.com>
1379
1380 PR c/64249
1381 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1382 and pass it down to c_parser_if_statement.
1383 (c_parser_else_body): Add CHAIN parameter and pass it down to
1384 c_parser_statement_after_labels.
1385 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1386 duplicated if-else-if conditions.
1387
aabef2de
MP
13882015-10-01 Marek Polacek <polacek@redhat.com>
1389
1390 * c-typeck.c (convert_for_assignment): Improve commentary.
1391
de8ddd5f
MP
13922015-09-30 Marek Polacek <polacek@redhat.com>
1393
1394 PR c/67730
1395 * c-typeck.c (c_finish_return): Use the expansion point location for
1396 certain "return with value" warnings.
1397
c4914de6
MLI
13982015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1399
1400 * c-parser.c (pragma_lex): Add loc argument.
1401
0e36f5c7
MP
14022015-09-15 Marek Polacek <polacek@redhat.com>
1403
1404 PR c/67580
1405 * c-decl.c (tag_exists_p): New function.
1406 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1407 struct/union/enum keywords are missing.
1408 * c-tree.h (tag_exists_p): Declare.
1409
2f3bb934
MP
14102015-09-15 Marek Polacek <polacek@redhat.com>
1411
1412 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1413 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1414 Return NULL_TREE instead of 0.
1415 (lookup_name): Return NULL_TREE instead of 0.
1416 (lookup_name_in_scope): Likewise.
1417 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1418 (parser_xref_tag): Use false instead of 0.
1419 (start_struct): Use true instead of 1.
1420 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1421
aa256c4a
MP
14222015-09-14 Marek Polacek <polacek@redhat.com>
1423
1424 * c-typeck.c (set_nonincremental_init_from_string): Use
1425 HOST_WIDE_INT_M1U when shifting a negative value.
1426
dbb68221
MW
14272015-09-09 Mark Wielaard <mjw@redhat.com>
1428
1429 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1430 parm against NULL.
1431
a8a098ac
JJ
14322015-09-10 Jakub Jelinek <jakub@redhat.com>
1433
1434 PR c/67502
1435 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1436 into OMP_FOR_PRE_BODY rather than before the loop.
1437
f4b189d5
JJ
14382015-09-09 Jakub Jelinek <jakub@redhat.com>
1439
0bb99c11
JJ
1440 PR c/67501
1441 * c-parser.c (c_parser_oacc_all_clauses,
1442 c_parser_omp_all_clauses): Remove invalid clause from
1443 list of clauses even if parser->error is set.
1444
fce5e5e3
JJ
1445 PR c/67500
1446 * c-parser.c (c_parser_omp_clause_aligned,
1447 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1448 test for errors.
1449 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1450 error_mark_node.
1451
f4b189d5
JJ
1452 PR c/67495
1453 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1454 instead of c_parser_unary_expression. If the result is !lvalue_p,
1455 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1456
b2aaf235
MP
14572015-09-04 Marek Polacek <polacek@redhat.com>
1458
1459 PR sanitizer/67279
1460 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1461
1807ffc1
MS
14622015-09-03 Martin Sebor <msebor@redhat.com>
1463
1464 PR c/66516
8b652e65
JJ
1465 * c-typeck.c (convert_arguments, parser_build_unary_op,
1466 build_conditional_expr, c_cast_expr, convert_for_assignment,
1467 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1468 reject_gcc_builtin.
1469 (c_decl_implicit): Define.
1470
d04ff417
MP
14712015-09-02 Marek Polacek <polacek@redhat.com>
1472
1473 PR c/67432
1474 * c-parser.c (c_parser_enum_specifier): Give a better error for
1475 an empty enum.
1476
a79683d5
TS
14772015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1478
1479 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1480
191a6b94
MP
14812015-08-12 Marek Polacek <polacek@redhat.com>
1482
1483 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1484 LOC to it.
1485
420a9d9b
MP
14862015-08-03 Marek Polacek <polacek@redhat.com>
1487
1488 PR c/67088
1489 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1490 Use it.
1491 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1492
992118a1
PP
14932015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1494
1495 * c-parser.c (c_parser_if_body): Take token_indent_info
1496 argument. Call warn_for_misleading_indentation even when the
1497 body is a semicolon. Extract token_indent_infos corresponding
1498 to the guard, body and next tokens. Adjust call to
1499 warn_for_misleading_indentation accordingly.
1500 (c_parser_else_body): Likewise.
1501 (c_parser_if_statement): Likewise.
1502 (c_parser_while_statement): Likewise.
1503 (c_parser_for_statement): Likewise.
1504
46308474
LFSM
15052015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1506 Manuel López-Ibáñez <manu@gcc.gnu.org>
1507
1508 * c-decl.c (get_parm_info): Remove static var. Update warning
1509 message.
1510
05b28fd6
MP
15112015-07-27 Marek Polacek <polacek@redhat.com>
1512
1513 PR c++/66555
1514 PR c/54979
1515 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1516
451b5e48
MP
15172015-07-20 Marek Polacek <polacek@redhat.com>
1518
1519 PR c++/55095
1520 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1521 (build_binary_op): Warn about left shift overflows.
1522
1916bcb5
AM
15232015-07-09 Andrew MacLeod <amacleod@redhat.com>
1524
1525 * c-array-notation.c: Adjust includes for flags.h changes.
1526 * c-objc-common.c: Likewise.
1527
c7131fb2
AM
15282015-07-07 Andrew MacLeod <amacleod@redhat.com>
1529
1530 * c-array-notation.c: Adjust includes.
1531 * c-aux-info.c: Likewise.
1532 * c-convert.c: Likewise.
1533 * c-decl.c: Likewise.
1534 * c-errors.c: Likewise.
1535 * c-lang.c: Likewise.
1536 * c-objc-common.c: Likewise.
1537 * c-parser.c: Likewise.
1538 * c-typeck.c: Likewise.
1539
da2e71c9
MLI
15402015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1541
1542 PR fortran/66605
1543 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1544
b155cfd9
MP
15452015-06-29 Marek Polacek <polacek@redhat.com>
1546
1547 PR c/66322
1548 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1549 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1550 about -Wswitch-bool here.
1551 (do_case): Update c_add_case_label call.
1552 (c_finish_case): Update c_do_switch_warnings call.
1553
31521951
MP
15542015-06-27 Marek Polacek <polacek@redhat.com>
1555
1556 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1557
22d03525
MP
15582015-06-26 Marek Polacek <polacek@redhat.com>
1559
1560 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1561 INDIRECT_REF_P.
1562 * c-typeck.c (array_to_pointer_conversion): Likewise.
1563 (build_unary_op): Likewise.
1564 (c_finish_return): Likewise.
1565
f0889939
AM
15662015-06-25 Andrew MacLeod <amacleod@redhat.com>
1567
1568 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1569 * c-parser.c: Likewise.
1570
8d67ee55
RS
15712015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1572
1573 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1574 instead of pointer_hash.
1575 (detect_field_duplicates): Likewise.
1576
0ae9bd27
MP
15772015-06-25 Marek Polacek <polacek@redhat.com>
1578
1579 * c-array-notation.c: Use VAR_P throughout.
1580 * c-decl.c: Likewise.
1581 * c-objc-common.c: Likewise.
1582 * c-parser.c: Likewise.
1583 * c-typeck.c: Likewise.
1584
62f9079a
MP
15852015-06-25 Marek Polacek <polacek@redhat.com>
1586
1587 * c-decl.c: Use is_global_var throughout.
1588 * c-parser.c: Likewise.
1589 * c-typeck.c: Likewise.
1590
abb226c9
AM
15912015-06-17 Andrew MacLeod <amacleod@redhat.com>
1592
1593 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1594 * c-aux-info.c: Likewise.
1595 * c-convert.c: Likewise.
1596 * c-decl.c: Likewise.
1597 * c-errors.c: Likewise.
1598 * c-lang.c: Likewise.
1599 * c-objc-common.c: Likewise.
1600 * c-parser.c: Likewise.
1601 * c-typeck.c: Likewise.
1602
8cbababc
JH
16032015-06-11 Jan Hubicka <hubicka@ucw.cz>
1604
1605 PR middle-end/66325
1606 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1607 variants.
1608
a0349665
PMR
16092015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1610
1611 * c-decl.c (pop_scope): Register the main translation unit
1612 through the new debug hook.
1613
13fdf2e2
AM
16142015-06-08 Andrew MacLeod <amacleod@redhat.com>
1615
1616 * c-array-notation.c : Adjust include files.
1617 * c-aux-info.c : Likewise.
1618 * c-convert.c : Likewise.
1619 * c-decl.c : Likewise.
1620 * c-errors.c : Likewise.
1621 * c-lang.c : Likewise.
1622 * c-lang.h : Likewise.
1623 * c-objc-common.c : Likewise.
1624 * c-parser.c : Likewise.
1625 * c-typeck.c : Likewise.
1626
d7438551
AH
16272015-06-05 Aldy Hernandez <aldyh@redhat.com>
1628
1629 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1630 immediately clobber it.
1631 (c_write_global_declarations_1): Remove call to
1632 check_global_declaration_1.
1633 (c_write_global_declarations_2): Remove.
1634 (c_write_final_cleanups): Rename from c_write_global_declarations.
1635 Remove call to finalize_compilation_unit.
1636 Remove calls to debugging hooks.
1637 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1638 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1639 * c-tree.h: Remove c_write_global_declarations.
1640
ecb9f223
AM
16412015-06-04 Andrew MacLeod <amacleod@redhat.com>
1642
1643 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1644 * c-aux-info.c: Likewise.
1645 * c-convert.c: Likewise.
1646 * c-decl.c: Likewise.
1647 * c-errors.c: Likewise.
1648 * c-lang.c: Likewise.
1649 * c-objc-common.c: Likewise.
1650 * c-parser.c: Likewise.
1651 * c-typeck.c: Likewise.
1652
9482b620
MP
16532015-06-04 Marek Polacek <polacek@redhat.com>
1654
1655 PR c/66341
1656 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1657 it is a lvalue.
1658
bc51ace3
PK
16592015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1660
1661 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1662 Warn for empty struct.
1663 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1664
ea5b45b6
AT
16652015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1666
1667 * c-decl.c (start_function): Call plugin before parsing.
1668 (finish_function): Call plugin after parsing.
1669
c2d47482
PK
16702015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1671
1672 PR c/49551
1673 * c-decl.c (merge_decls): Merge DECL_COMMON.
1674
a95492ab
JW
16752015-05-22 Jim Wilson <jim.wilson@linaro.org>
1676
1677 * Make-lang.in (check_gcc_pallelize): Define.
1678
fd5c817a
MP
16792015-05-22 Marek Polacek <polacek@redhat.com>
1680
1681 PR c/47043
1682 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1683 attributes.
1684
c7b70a3c
MP
16852015-05-21 Marek Polacek <polacek@redhat.com>
1686
1687 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1688 DECL_BUILT_IN.
1689
21b634ae
MP
16902015-05-20 Marek Polacek <polacek@redhat.com>
1691
1692 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1693 * c-typeck.c: Likewise.
1694
296a8c2f
MP
16952015-05-19 Marek Polacek <polacek@redhat.com>
1696
1697 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1698
41b37d5e
JJ
16992015-05-19 Jakub Jelinek <jakub@redhat.com>
1700
1701 PR middle-end/66199
1702 * c-parser.c (c_parser_omp_for_loop): Don't add
1703 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1704 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1705 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1706 constructs.
1707
fab27f52
MM
17082015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1709
1710 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 1711 swaps.
fab27f52 1712
40de31cf
MLI
17132015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1714
1715 PR fortran/44054
1716 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1717 accessor function.
1718
3aa3c9fc
MP
17192015-05-14 Marek Polacek <polacek@redhat.com>
1720
1721 PR c/66066
1722 PR c/66127
1723 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1724 rather than with 0.
1725
c3388e62
DM
17262015-05-12 David Malcolm <dmalcolm@redhat.com>
1727
1728 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1729 to add a call to warn_for_misleading_indentation.
1730 (c_parser_else_body): Likewise, adding param "else_loc".
1731 (c_parser_if_statement): Check for misleading indentation.
1732 (c_parser_while_statement): Likewise.
1733 (c_parser_for_statement): Likewise.
1734
755e528f
MP
17352015-05-08 Marek Polacek <polacek@redhat.com>
1736
1737 PR c/64918
1738 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1739 (output_init_element): Likewise.
1740
0173bd2a
MP
17412015-05-07 Marek Polacek <polacek@redhat.com>
1742
1743 PR c/65179
1744 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1745 value.
1746
9babc352
MP
17472015-04-30 Marek Polacek <polacek@redhat.com>
1748
1749 * c-typeck.c (set_init_label): Call error_at instead of error and
1750 pass LOC to it.
1751
ac9f18db
MP
1752 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1753 the type of a decl.
1754
ec3fba51
MP
1755 * c-typeck.c (c_build_va_arg): Clarify the error message.
1756
b811915d
TS
17572015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1758
1759 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1760 OMP_STANDALONE_CLAUSES.
1761
f3075008
MP
17622015-04-28 Marek Polacek <polacek@redhat.com>
1763
1764 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1765
4e81b788
MP
17662015-04-28 Marek Polacek <polacek@redhat.com>
1767
1768 PR c/65901
1769 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1770
6c1db78e
MP
17712015-04-25 Marek Polacek <polacek@redhat.com>
1772
1773 PR c/52085
1774 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1775 attribute.
1776
5c4abbb8
MP
17772015-04-23 Marek Polacek <polacek@redhat.com>
1778
1779 PR c/65345
1780 * c-decl.c (set_labels_context_r): New function.
1781 (store_parm_decls): Call it via walk_tree_without_duplicates.
1782 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1783 instead of create_tmp_var. Build TARGET_EXPR instead of
1784 COMPOUND_EXPR.
1785 (build_atomic_assign): Use create_tmp_var_raw instead of
1786 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1787
06aca1d5
IV
17882015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1789
1790 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1791 (c_parser_omp_target_update): Add missed %> to error_at ().
1792
8fba1830
BRF
17932015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1794
1795 PR target/55143
1796 * c-decl.c (c_default_pointer_mode): Remove definition.
1797 * c-tree.h (c_default_pointer_mode): Remove declaration.
1798
62021f64
TB
17992015-03-27 Tobias Burnus <burnus@net-b.de>
1800
1801 PR c/65586
1802 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1803 error out.
1804 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1805 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1806 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1807
9b65e171
JJ
18082015-03-19 Jakub Jelinek <jakub@redhat.com>
1809
1810 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1811 attribute for DECL_EXTERNAL VAR_DECLs.
1812
17958621
JJ
18132015-03-11 Jakub Jelinek <jakub@redhat.com>
1814
1815 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1816 argument.
1817
7ccb1a11
JJ
18182015-03-10 Jakub Jelinek <jakub@redhat.com>
1819
1820 PR c/65120
1821 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1822 before preparing arguments to warn_logical_not_parentheses.
1823
01177669
JJ
18242015-03-09 Jakub Jelinek <jakub@redhat.com>
1825
1826 PR c/65120
1827 * c-typeck.c (parser_build_binary_op): Don't warn for
1828 !!x == y or !b == y where b is _Bool.
1829
802ac282
MP
18302015-03-09 Marek Polacek <polacek@redhat.com>
1831
1832 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1833 * c-decl.c (grokdeclarator): Likewise.
1834 * c-typeck.c (build_binary_op): Likewise.
1835
e5165b60
MP
18362015-02-27 Marek Polacek <polacek@redhat.com>
1837
1838 PR c/65228
1839 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1840
065d214c
MP
18412015-02-14 Marek Polacek <polacek@redhat.com>
1842
1843 PR c/64768
1844 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1845 declared through a typedef name.
1846
e5d9235b
MP
18472015-02-13 Marek Polacek <polacek@redhat.com>
1848
1849 PR c/65050
1850 * c-decl.c (grokdeclarator): Print also the type when giving
1851 the error message about array's incomplete element type.
1852
fa01ffcc
JJ
18532015-02-11 Jakub Jelinek <jakub@redhat.com>
1854
1855 PR c/64824
1856 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1857 check in the POP macro.
1858
c3e38a03
MP
18592015-02-09 Marek Polacek <polacek@redhat.com>
1860
1861 PR c/64856
1862 * c-typeck.c (process_init_element): Don't always wrap
1863 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1864 initializing a range of elements.
1865
4886ec8e
JJ
18662015-02-04 Jakub Jelinek <jakub@redhat.com>
1867
1868 PR c/64824
1869 PR c/64868
1870 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1871
c3e38a03 18722015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
1873
1874 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1875 processing enum declaration.
1876
7b33f0c8
MP
18772015-01-29 Marek Polacek <polacek@redhat.com>
1878
1879 PR c/64709
1880 * c-typeck.c (pop_init_level): If constructor_elements has
1881 exactly one element with integer_zerop value, set constructor_zeroinit
1882 to 1. Remove braces around warning_init call.
1883
dea63e49
JJ
18842015-01-27 Jakub Jelinek <jakub@redhat.com>
1885
1886 PR c/64766
1887 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1888 of FUNCTION_DECLs with error_mark_node.
1889
d38f7dce
JJ
18902015-01-26 Jakub Jelinek <jakub@redhat.com>
1891
1892 PR c/64778
1893 * c-typeck.c (convert_arguments): Return -1 if there are
1894 error_args, even if we've diagnosed too many arguments.
1895
cbf5d0e7
RB
18962015-01-21 Richard Biener <rguenther@suse.de>
1897
1898 PR middle-end/64313
1899 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1900 for builtins the user declared correctly.
1901
41dbbb37
TS
19022015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1903 Bernd Schmidt <bernds@codesourcery.com>
1904 Cesar Philippidis <cesar@codesourcery.com>
1905 James Norris <jnorris@codesourcery.com>
1906 Jakub Jelinek <jakub@redhat.com>
1907 Ilmir Usmanov <i.usmanov@samsung.com>
1908
1909 * c-parser.c: Include "gomp-constants.h".
1910 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1911 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1912 Use OMP_CLAUSE_SET_MAP_KIND.
1913 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1914 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1915 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1916 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1917 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1918 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1919 "copyout", "create", "delete", "deviceptr", "gang", "host",
1920 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1921 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1922 "present_or_create", "pcreate", "seq", "self", "vector",
1923 "vector_length", "wait", "worker".
1924 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1925 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1926 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1927 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1928 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1929 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1930 (c_parser_oacc_data_clause_deviceptr)
1931 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1932 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1933 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1934 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1935 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1936 (c_parser_oacc_parallel, c_parser_oacc_update)
1937 (c_parser_oacc_wait): New functions.
1938 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1939 (c_finish_oacc_data): New prototypes.
1940 * c-typeck.c: Include "gomp-constants.h".
1941 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1942 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1943 OMP_CLAUSE_SET_MAP_KIND.
1944 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1945 (c_finish_oacc_data): New functions.
1946 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1947 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1948 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1949 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1950 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1951 GOMP_MAP_FORCE_DEVICEPTR.
1952
adfac8df
JJ
19532015-01-09 Michael Collison <michael.collison@linaro.org>
1954
1955 * c-array-notation.c: Include hash-set.h, machmode.h,
1956 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1957 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1958 * c-aux-info.c: Ditto.
1959 * c-convert.c: Ditto.
1960 * c-decl.c: Ditto.
1961 * c-errors.c: Ditto.
1962 * c-lang.c: Dittoxs.
1963 * c-objc-common.c: Ditto.
1964 * c-parser.c: Ditto.
1965 * c-typeck.c: Include hash-set.h, machmode.h,
1966 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1967 fold-const.h, wide-int.h, inchash.h, real.h and
1968 fixed-value.h due to flattening of tree.h.
1969
2cc901dc
MP
19702015-01-07 Marek Polacek <polacek@redhat.com>
1971
1972 PR c/64417
1973 * c-typeck.c (process_init_element): Disallow initialization of
1974 a flexible array member with a string constant if the structure
1975 is in an array.
1976
5624e564
JJ
19772015-01-05 Jakub Jelinek <jakub@redhat.com>
1978
e5341100
JJ
1979 PR sanitizer/64344
1980 * c-typeck.c (convert_for_assignment, c_finish_return): For
1981 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1982 types also set in_late_binary_op around convert call.
1983 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1984 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1985 result on expr as last argument to ubsan_instrument_float_cast,
1986 if in_late_binary_op, don't use c_save_expr but save_expr.
1987
5624e564
JJ
1988 Update copyright years.
1989
5bd012f8
MP
19902015-01-05 Marek Polacek <polacek@redhat.com>
1991
1992 PR c/64423
1993 * c-typeck.c (build_array_ref): Pass loc down to
1994 warn_array_subscript_with_type_char.
1995
768952be
MU
19962014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1997
1998 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1999 (common-pointer-type): For pointers to arrays take qualifiers from
2000 element type.
2001 (build_conditional_expr): Add warnings for lost qualifiers.
2002 (comp-target-types): Allow pointers to arrays with different qualifiers.
2003 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
2004 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
2005 to PEDWARN_FOR_QUALIFIERS.
2006
8f94a8c4
JJ
20072014-12-17 Jakub Jelinek <jakub@redhat.com>
2008
2009 PR sanitizer/64289
2010 * c-convert.c: Include ubsan.h.
2011 (convert): For real -> integral casts and
2012 -fsanitize=float-cast-overflow don't call convert_to_integer, but
2013 instead instrument the float cast directly.
2014
b731b390
JJ
20152014-11-29 Jakub Jelinek <jakub@redhat.com>
2016
2017 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
2018 c_finish_stmt_expr): Remove NULL last argument from
2019 create_tmp_var_raw and create_tmp_var calls.
2020 * c-array-notation.c (fix_builtin_array_notation_fn,
2021 build_array_notation_expr, fix_conditional_array_notations_1,
2022 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
2023
541e35a6
MP
20242014-11-28 Marek Polacek <polacek@redhat.com>
2025
2026 PR c/63862
2027 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
2028 convert the right operand to integer type.
2029
b286be94
MP
20302014-11-25 Marek Polacek <polacek@redhat.com>
2031
2032 PR c/63877
2033 * c-decl.c (start_function): Disable -Wmissing-declarations warning
2034 for inline functions.
2035
aa7da51a
JJ
20362014-11-21 Jakub Jelinek <jakub@redhat.com>
2037
2038 PR target/63764
2039 * c-typeck.c (build_array_ref): Adjust
2040 convert_vector_to_pointer_for_subscript caller. If it returns true,
2041 call non_lvalue_loc on the result.
2042
d876207f
RB
20432014-11-11 Richard Biener <rguenther@suse.de>
2044
2045 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
2046 to true.
2047
e5e44252
AK
20482014-11-10 Andi Kleen <ak@linux.intel.com>
2049
2050 PR c/60804
2051 * c-parser.c (c_parser_statement_after_labels): Call
2052 check_no_cilk.
2053 (c_parser_if_statement): Dito.
2054 (c_parser_switch_statement): Dito.
2055 (c_parser_while_statement): Dito.
2056 (c_parser_do_statement): Dito.
2057 (c_parser_for_statement): Dito.
2058 * c-typeck.c (c_finish_loop): Dito.
2059
13c21655
PC
20602014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
2061
2062 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
2063 OPT_Wshift_count_overflow in the warnings.
2064
2d51fcef
MP
20652014-10-30 Marek Polacek <polacek@redhat.com>
2066
2067 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
2068 print the stripped version as well, if they're not the same.
2069
ef4bddc2
RS
20702014-10-29 Richard Sandiford <richard.sandiford@arm.com>
2071
2072 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
2073 machine_mode.
2074
c582198b
AM
20752014-10-28 Andrew MacLeod <amacleod@redhat.com>
2076
2077 * c-decl.c: Adjust include files.
2078 * c-parser.c: Ditto.
2079
ddc8de03
PM
20802014-10-27 Phil Muldoon <pmuldoon@redhat.com>
2081 Tom Tromey <tromey@redhat.com>
2082
2083 * c-tree.h (enum c_oracle_request): New.
2084 (c_binding_oracle_function): New typedef.
2085 (c_binding_oracle, c_pushtag, c_bind): Declare.
2086 * c-decl.c (c_binding_oracle): New global.
2087 (I_SYMBOL_CHECKED): New macro.
2088 (i_symbol_binding): New function.
2089 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
2090 (I_TAG_CHECKED): New macro.
2091 (i_tag_binding): New function.
2092 (I_TAG_BINDING, I_TAG_DECL): Redefine.
2093 (I_LABEL_CHECKED): New macro.
2094 (i_label_binding): New function.
2095 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
2096 (c_print_identifier): Save and restore c_binding_oracle.
2097 (c_pushtag, c_bind): New functions.
2098
60393bbc
AM
20992014-10-27 Andrew MacLeod <amacleod@redhat.com>
2100
2101 * c-typeck.c: Adjust include files.
2102
d723bb7c
MLI
21032014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
2104
2105 PR c++/53061
2106 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
2107 initialization here...
2108 (c_initialize_diagnostics): ... but here. Set defaults after
2109 building pretty-printer.
2110
1bc5a451
MP
21112014-10-23 Marek Polacek <polacek@redhat.com>
2112
2113 PR c/63626
2114 * c-decl.c (pop_scope): Don't print warning in external_scope.
2115
4435bb92
MP
21162014-10-19 Marek Polacek <polacek@redhat.com>
2117
2118 PR c/63567
2119 * c-typeck.c (output_init_element): Allow initializing objects with
2120 static storage duration with compound literals even in C99 and add
2121 pedwarn for it.
2122
7278465e
MP
21232014-10-17 Marek Polacek <polacek@redhat.com>
2124
2125 PR c/63567
2126 * c-typeck.c (digest_init): Allow initializing objects with static
2127 storage duration with compound literals even in C99 and add pedwarn
2128 for it.
2129
d9b7be2e
MP
21302014-10-17 Marek Polacek <polacek@redhat.com>
2131
2132 PR c/63543
2133 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
2134 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
2135 error multiple times. Print the type.
2136
f406ae1f
MP
21372014-10-17 Marek Polacek <polacek@redhat.com>
2138
2139 PR c/63549
2140 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
2141 type.
2142
92574c7c
MP
21432014-10-17 Marek Polacek <polacek@redhat.com>
2144
2145 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
2146 (start_function): Use OPT_Wimplicit_int instead of 0.
2147 (store_parm_decls_oldstyle): Likewise.
2148
1bc4a978
MT
21492014-10-17 Alan Modra <amodra@gmail.com>
2150
2151 PR middle-end/61848
2152 * c-decl.c (merge_decls): Don't merge section name or tls model
2153 to newdecl symtab node, instead merge to olddecl. Override
2154 existing olddecl section name. Set tls_model for all thread-local
2155 vars, not just OMP thread-private ones. Remove incorrect comment.
2156
83685514
AM
21572014-10-16 Andrew MacLeod <amacleod@redhat.com>
2158
2159 * c-decl.c: Adjust include files.
2160
78a7c317
DD
21612014-10-14 DJ Delorie <dj@redhat.com>
2162
2163 * c-parser.c (c_parse_init): Add RID entries for each __intN.
2164 (c_token_starts_typename): Check all __intN, not just __int128.
2165 (c_token_starts_declspecs): Likewise.
2166 (c_parser_declspecs): Likewise.
2167 (c_parser_attribute_any_word): Likewise.
2168 (c_parser_objc_selector): Likewise.
2169 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
2170 (struct c_declspecs): Add int_n_idx field to record *which* __intN
2171 is specified.
2172 * c-decl.c (declspecs_add_type): Check for all __intN, not just
2173 __int128.
2174 (finish_declspecs): Likewise.
2175
74d98c1e
AB
21762014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
2177
2178 * c-parser.c (c_parser_all_labels): New function to replace
2179 the duplicate code.
2180 (c_parser_statement): Call the new function.
2181
84937de2
MP
21822014-10-09 Marek Polacek <polacek@redhat.com>
2183
2184 PR c/63480
2185 * c-typeck.c (pop_init_level): Don't warn about initializing
2186 with { }.
2187
0382aaa0
MP
21882014-10-07 Marek Polacek <polacek@redhat.com>
2189
2190 PR c/59717
2191 * c-decl.c (header_for_builtin_fn): New function.
2192 (implicitly_declare): Suggest which header to include.
2193
7a0ca710
MP
21942014-10-07 Marek Polacek <polacek@redhat.com>
2195
2196 * c-convert.c (convert): Use error_operand_p.
2197 * c-typeck.c (require_complete_type): Likewise.
2198 (really_atomic_lvalue): Likewise.
2199 (digest_init): Likewise.
2200 (handle_omp_array_sections_1): Likewise.
2201
6bc8a126
MP
22022014-10-03 Marek Polacek <polacek@redhat.com>
2203
2204 PR c/63453
2205 * c-decl.c (pop_scope): Don't warn about "inline function declared
2206 but never defined" for functions marked with gnu_inline attribute.
2207
d90c0a59
JJ
22082014-09-25 Jakub Jelinek <jakub@redhat.com>
2209
2210 PR c++/63249
2211 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
2212 on low_bound and length.
2213
083e891e
MP
22142014-09-24 Marek Polacek <polacek@redhat.com>
2215
2216 PR c/61405
2217 PR c/53874
2218 * c-parser.c: Don't define CPP_KEYWORD.
2219 (c_parser_switch_statement): Pass original type to c_finish_case.
2220 * c-tree.h (c_finish_case): Update declaration.
2221 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
2222 conditionally to c_do_switch_warnings.
2223
8d95fe25
MP
22242014-09-03 Marek Polacek <polacek@redhat.com>
2225
2226 PR c/62024
2227 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
2228 conversions.
2229
9a771876
JJ
22302014-09-02 Jakub Jelinek <jakub@redhat.com>
2231 Balaji V. Iyer <balaji.v.iyer@intel.com>
2232 Igor Zamyatin <igor.zamyatin@intel.com>
2233
2234 * c-parser.c (c_parser_cilk_for): New function.
2235 (c_parser_cilk_grainsize): Likewise.
2236 (c_get_temp_regvar): Likewise.
2237 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
2238 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
2239 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
2240 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
2241 case.
2242
b7679d96
CG
22432014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
2244
2245 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
2246 with using HOST_WIDE_INT without truncation to 'int'
2247
59ea0364
MP
22482014-08-22 Marek Polacek <polacek@redhat.com>
2249
2250 PR c++/62199
2251 * c-typeck.c (parser_build_binary_op): Adjust call to
2252 warn_logical_not_parentheses.
2253
671a475e
IZ
22542014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
2255
2256 PR other/62008
2257 * c-parser.c (c_parser_array_notation): Check for correct
2258 type of an array added.
2259
04159acf
MP
22602014-08-19 Marek Polacek <polacek@redhat.com>
2261
2262 PR c++/62153
2263 * c-typeck.c (build_binary_op): If either operand of a comparison
2264 is a boolean expression, call maybe_warn_bool_compare.
2265
c77935ee
PP
22662014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2267
2268 PR c/45584
2269 * c-typeck.c (build_c_cast): Do a conversion even when the
2270 TYPE_MAIN_VARIANTs are the same.
2271
35aff4fb
MP
22722014-08-19 Marek Polacek <polacek@redhat.com>
2273
2274 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2275 pedwarn_c99 instead of pedwarn.
2276 (grokfield): Likewise.
2277 (warn_defaults_to): New function.
2278 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2279 Unconditionally call pedwarn_c99 instead of pedwarn.
2280 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2281 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2282 check flag_isoc11 before.
2283 * c-errors.c (pedwarn_c99): Change the return type to bool.
2284 Handle -Wc99-c11-compat.
2285 * c-parser.c (disable_extension_diagnostics): Handle
2286 warn_c99_c11_compat.
2287 (restore_extension_diagnostics): Likewise.
2288 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2289 instead of pedwarn, don't check flag_isoc11 before.
2290 (c_parser_declspecs): Likewise.
2291 (c_parser_alignas_specifier): Likewise.
2292 (c_parser_alignof_expression): Likewise.
2293 (c_parser_generic_selection): Likewise.
2294 * c-tree.h (pedwarn_c99): Update declaration.
2295 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2296 of pedwarn_c99.
2297
177cce46
MP
22982014-08-19 Marek Polacek <polacek@redhat.com>
2299
2300 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2301 to pedwarn_c90.
2302 * c-errors.c: Include "opts.h".
2303 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2304 * c-parser.c (disable_extension_diagnostics): Handle negative value
2305 of warn_c90_c99_compat, too.
2306 (restore_extension_diagnostics): Likewise.
2307 (c_parser_compound_statement_nostart): Pass
2308 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2309
6dc99c33
MP
23102014-08-12 Marek Polacek <polacek@redhat.com>
2311
2312 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2313 Add pedwarn.
2314 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2315 Likewise.
2316 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2317
f3bede71
MP
23182014-08-10 Marek Polacek <polacek@redhat.com>
2319
2320 PR c/51849
2321 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2322 Call pedwarn_c90 instead of pedwarn.
2323 (check_bitfield_type_and_width): Likewise.
2324 (declspecs_add_qual): Likewise.
2325 (declspecs_add_type): Likewise.
2326 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2327 Adjust to only call pedwarn_c90.
2328 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2329 pedwarn_c90 instead of pedwarn.
2330 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2331 * c-parser.c (disable_extension_diagnostics): Handle
2332 warn_c90_c99_compat.
2333 (restore_extension_diagnostics): Likewise.
2334 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2335 pedwarn_c90 instead of pedwarn.
2336 (c_parser_initelt): Likewise.
2337 (c_parser_postfix_expression): Likewise.
2338 (c_parser_postfix_expression_after_paren_type): Likewise.
2339 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2340 * c-tree.h: Fix formatting.
2341 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2342 pedwarn_c90 instead of pedwarn.
2343
9f25a338
TS
23442014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2345
2346 * c-typeck.c: Remove include of pointer-set.h.
2347
044331a8
MP
23482014-08-07 Marek Polacek <polacek@redhat.com>
2349
2350 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2351
b787e7a2
TS
23522014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2353
2354 * c-typeck.c: Use hash_map instead of pointer_map.
2355
6e2830c3
TS
23562014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2357
2358 * c-decl.c: Use hash_set instead of pointer_set.
2359
a7ee52fb
IZ
23602014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2361
2362 PR middle-end/61455
2363 * c-array-notation.c (expand_array_notations): Handling
2364 of DECL_EXPR added.
2365
b4dfdc11
MG
23662014-07-31 Marc Glisse <marc.glisse@inria.fr>
2367
2368 PR c++/60517
2369 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2370 a local variable.
2371
976d5a22
TT
23722014-07-30 Tom Tromey <tromey@redhat.com>
2373
2374 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2375 field.
2376 (really_start_incremental_init, push_init_level): Initialize
2377 designator_depth.
2378 (pop_init_level): Set global designator_depth.
2379 (process_init_element): Check for designated_init attribute.
2380
30281de2
MP
23812014-07-20 Marek Polacek <polacek@redhat.com>
2382
2383 PR c/61852
2384 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2385 (implicitly_declare): Pass location to implicit_decl_warning.
2386
b108f48f
JJ
23872014-07-14 Jakub Jelinek <jakub@redhat.com>
2388
2389 PR middle-end/61294
2390 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2391 If non-NULL, call c_parser_check_literal_zero.
2392 (c_parser_check_literal_zero): New function.
2393 (c_parser_postfix_expression_after_primary): Adjust
2394 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2395
773ec47f
MP
23962014-07-06 Marek Polacek <polacek@redhat.com>
2397
2398 PR c/6940
2399 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2400 * c-tree.h (C_ARRAY_PARAMETER): Define.
2401 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2402 function parameter.
2403
22e1cf1c
JH
24042014-07-02 Jan Hubicka <hubicka@ucw.cz>
2405 Chen Gang <gang.chen.5i5j@gmail.com>
2406
2407 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2408 releasing symbol.
2409
52ec0ea3
MP
24102014-07-01 Marek Polacek <polacek@redhat.com>
2411
2412 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2413 instead of 0 to WARN_FOR_ASSIGNMENT.
2414
d5c3d343
MP
24152014-07-01 Marek Polacek <polacek@redhat.com>
2416
2417 PR c/58286
2418 * c-typeck.c (convert_for_assignment): Pass
2419 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2420
6a7253a4
MP
24212014-06-30 Marek Polacek <polacek@redhat.com>
2422
2423 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2424 has no_sanitize_undefined attribute.
2425
5e88a8f4
IZ
24262014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2427
2428 PR middle-end/57541
2429 * c-array-notation.c (fix_builtin_array_notation_fn):
2430 Check for 0 arguments in builtin call. Check that bultin argument is
2431 correct.
2432 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2433 index.
2434
9698b078
SH
24352014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2436
2437 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2438 qualifiers in __auto_type for atomic types.
2439 (c_parser_typeof_specifier): Discard all type qualifiers in
2440 __typeof__ for atomic types.
2441
6e07c515
MP
24422014-06-25 Marek Polacek <polacek@redhat.com>
2443
2444 PR c/61162
2445 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2446 the return expression to c_finish_return.
2447
da6f124d
JJ
24482014-06-25 Jakub Jelinek <jakub@redhat.com>
2449
2450 * c-typeck.c (c_finish_omp_clauses): Make sure
2451 OMP_CLAUSE_LINEAR_STEP has correct type.
2452
c203e8a7
TS
24532014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2454
2455 * c-decl.c: Adjust.
2456
56ad0e38
JJ
24572014-06-24 Jakub Jelinek <jakub@redhat.com>
2458
2459 * c-parser.c (c_parser_omp_for_loop): For
2460 #pragma omp parallel for simd move lastprivate clause from parallel
2461 to for rather than simd.
2462
47c2554f
MP
24632014-06-23 Marek Polacek <polacek@redhat.com>
2464
2465 * c-typeck.c (parser_build_binary_op): Don't call
2466 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2467
56363ffd
JH
24682014-06-15 Jan Hubicka <hubicka@ucw.cz>
2469
2470 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2471 * c-decl.c (merge_decls): Likewise.
2472
d7ff7ae5
MP
24732014-06-09 Marek Polacek <polacek@redhat.com>
2474
2475 PR c/36446
2476 * c-typeck.c (error_init): Call inform instead of error_at.
2477 (pedwarn_init): Call inform instead of pedwarn.
2478 (warning_init): Call inform instead of warning_at.
2479
24d047a3
JH
24802014-06-07 Jan Hubicka <hubicka@ucw.cz>
2481
2482 * c-decl.c (merge_decls): Use set_decl_section_name.
2483 (duplicate_decls): Remove node if it exists.
2484
9bac5cbb
G
24852014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2486
2487 PR c/53119
2488 * c-typeck.c (push_init_level, process_init_element,
2489 pop_init_level): Correct check for zero initialization, move
2490 missing brace warning to respect zero initialization.
2491
8ffcdea8
MP
24922014-06-05 Marek Polacek <polacek@redhat.com>
2493
2494 PR c/56724
2495 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2496
742938c9
MP
24972014-06-05 Marek Polacek <polacek@redhat.com>
2498
2499 PR c/49706
2500 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2501 on the left hand side operand of a comparison.
2502
6447c55d
MP
25032014-06-05 Marek Polacek <polacek@redhat.com>
2504
2505 PR c/48062
2506 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2507 Print note only if the warning was printed.
2508
9dc7743c
IZ
25092014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2510
2511 PR c/58942
2512 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2513 with a pointer.
2514
fedfecef
MP
25152014-06-03 Marek Polacek <polacek@redhat.com>
2516
2517 PR c/60439
2518 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2519 c_start_case.
2520 * c-tree.h (c_start_case): Update.
2521 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2522 switch condition has boolean value.
2523
9b2b7279
AM
25242014-06-02 Andrew MacLeod <amacleod@redhat.com>
2525
2526 * c-decl.c: Include builtins.h.
2527 * c-parser.c: Likewise.
2528
5c1bc275
MP
25292014-05-27 Marek Polacek <polacek@redhat.com>
2530
2531 PR c/56724
2532 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2533 error and warning calls to error_at and warning_at. Pass location of
2534 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2535 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2536 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2537
97563bc8
IZ
25382014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2539
2540 PR c/61191
2541 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2542 function parameters.
2543
aede2c10
JH
25442014-05-23 Jan Hubicka <hubicka@ucw.cz>
2545
2546 * c-decl.c (merge_decls): Preserve symtab node pointers.
2547 (duplicate_decls): Free new decl.
2548
edbba2ce
TS
25492014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2550
f3316c6d
TS
2551 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2552 initialization.
2553
edbba2ce
TS
2554 * c-parser.c (c_parser_omp_target): Return bool values.
2555
68c81f24
TS
25562014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2557
2558 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2559 num_teams_loc variable to num_thread_limit_loc.
2560
632f2871
RS
25612014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2562
2563 * c-array-notation.c (expand_array_notations): Use void_node
2564 instead of void_zero_node.
2565
766090c2
TS
25662014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2567
2568 * c-decl.c (finish_struct): Adjust.
2569 (finish_enum): Likewise.
2570 (bind): Adjust.
2571 (record_inline_static): Likewise.
2572 (push_scope): Likewise.
2573 (make_label): Likewise.
2574 (lookup_label_for_goto): Likewise.
2575 (finish_struct): Likewise.
2576 (finish_enum): Likewise.
2577 (store_parm_decls): Likewise.
2578 (c_push_function_context): Likewise.
2579 * c-lang.h: Remove usage of variable_size gty attribute.
2580 * c-parser.c (c_parse_init): Adjust.
2581 (c_parse_file): Likewise.
2582
2b107f6b
MP
25832014-05-13 Marek Polacek <polacek@redhat.com>
2584
2585 PR c/61162
2586 * c-typeck.c (convert_for_assignment): Pass location to
2587 WARN_FOR_ASSIGNMENT instead of input_location.
2588
d033409e
MP
25892014-05-10 Marek Polacek <polacek@redhat.com>
2590
2591 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2592 maybe_warn_string_init.
2593 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2594 maybe_warn_string_init.
2595 * c-tree.h (maybe_warn_string_init): Update declaration.
2596 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2597 Call pedwarn_init with loc instead of with input_location.
2598 (digest_init): Pass init_loc to maybe_warn_string_init.
2599 (pop_init_level): Call pedwarn_init with loc instead of with
2600 input_location.
2601 (set_init_index): Likewise.
2602 (process_init_element): Likewise.
2603
ea58ef42
MP
26042014-05-09 Marek Polacek <polacek@redhat.com>
2605
2606 PR c/61096
2607 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2608 (c_parser_initelt): Pass location to set_init_label. Pass array index
2609 location to set_init_index.
2610 * c-tree.h (push_init_level): Update declaration.
2611 (pop_init_level): Likewise.
2612 (set_init_index): Likewise.
2613 (set_init_label): Likewise.
2614 * c-typeck.c (error_init): Add location parameter. Call error_at
2615 instead of error.
2616 (digest_init): Pass init_loc to error_init.
2617 (really_start_incremental_init):
2618 (push_init_level): Add location parameter. Pass loc to pop_init_level
2619 and error_init.
2620 (pop_init_level): Likewise.
2621 (set_designator): Add location parameter. Pass loc to pop_init_level,
2622 push_init_level, and error_init.
2623 (set_init_index): Add location parameter. Pass loc to error_init and
2624 set_designator.
2625 (set_init_label): Likewise.
2626 (output_init_element): Pass loc to error_init.
2627 (process_init_element): Pass loc to error_init, pop_init_level,
2628 pedwarn_init, and push_init_level.
2629
661a0813
MP
26302014-05-09 Marek Polacek <polacek@redhat.com>
2631
2632 PR c/50459
2633 * c-parser.c (c_parser_attributes): Parse the arguments as an
2634 expression-list if the attribute takes identifier.
2635
2793eeab
MP
26362014-05-08 Marek Polacek <polacek@redhat.com>
2637
2638 PR c/61053
2639 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2640 TYPE_ALIGN_UNIT.
2641
f827930a
MP
26422014-05-08 Marek Polacek <polacek@redhat.com>
2643
2644 PR c/61077
2645 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2646 of main.
2647
1d60af08
KZ
26482014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2649 Mike Stump <mikestump@comcast.net>
2650 Richard Sandiford <rdsandiford@googlemail.com>
2651
2652 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2653 (finish_enum): Use wide-int interfaces.
2654 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2655 * c-typeck.c (build_c_cast): Likewise.
2656 (set_nonincremental_init_from_string): Likewise.
2657 (c_tree_equal): Likewise.
2658
a0e24419
MP
26592014-05-02 Marek Polacek <polacek@redhat.com>
2660
2661 PR c/25801
2662 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2663 Return size_one_node when the type is not complete.
2664 (pointer_diff): Remove comment.
2665 (build_unary_op): Improve error messages.
2666
19fc9faa
MP
26672014-05-02 Marek Polacek <polacek@redhat.com>
2668
2669 * c-typeck.c (c_finish_return): Separate warning_at calls.
2670
63bc4e87
MP
26712014-05-02 Marek Polacek <polacek@redhat.com>
2672
2673 * c-tree.h (error_init): Remove declaration.
2674 (pedwarn_init): Likewise.
2675 * c-typeck.c (error_init): Make static and move above.
2676 (pedwarn_init): Likewise.
2677 (warning_init): Move above.
2678 (maybe_warn_string_init): Likewise.
2679
4bd2511b
JL
26802014-05-01 Jeff Law <law@redhat.com>
2681
2682 Revert:
2683
2684 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2685 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2686 avoid goto.
2687
6a358dcb
MP
26882014-05-02 Marek Polacek <polacek@redhat.com>
2689
2690 PR c/60784
2691 * c-typeck.c (push_init_level): Set constructor_designated to
2692 p->designated for structures.
2693
ae5ebda4
MP
26942014-05-01 Marek Polacek <polacek@redhat.com>
2695
2696 PR c/60915
2697 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2698 function-definition has an attribute after the declarator.
2699
96b40f8d
MP
27002014-05-01 Marek Polacek <polacek@redhat.com>
2701
2702 PR c/60257
2703 * c-typeck.c (warning_init): Add location_t parameter. Call
2704 warning_at instead of warning.
2705 (push_init_level): Pass input_location to warning_init.
2706 (add_pending_init): Add location_t parameter. Pass loc to
2707 warning_init.
2708 (set_nonincremental_init): Pass input_location to add_pending_init.
2709 (set_nonincremental_init_from_string): Likewise.
2710 (output_init_element): Pass loc to warning_init and to
2711 add_pending_init.
2712
32e00768
MP
27132014-05-01 Marek Polacek <polacek@redhat.com>
2714
2715 PR c/43395
2716 * c-typeck.c (c_finish_return): Distinguish between label and variable
2717 when warning about returning local address.
2718
c9379ce2
MP
27192014-05-01 Marek Polacek <polacek@redhat.com>
2720
2721 PR c/29467
2722 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2723 in C89 mode.
2724
d00887e8
MP
27252014-05-01 Marek Polacek <polacek@redhat.com>
2726
2727 PR c/43245
2728 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2729 instead of 0 to WARN_FOR_QUALIFIERS.
2730
5436fa2e
MP
27312014-05-01 Marek Polacek <polacek@redhat.com>
2732
2733 PR c/56989
2734 * c-typeck.c (default_conversion): Use better location for
2735 error call.
2736
f8ed5150
MP
27372014-04-30 Marek Polacek <polacek@redhat.com>
2738
2739 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2740 also when SANITIZE_FLOAT_DIVIDE is on.
2741
8337d1db
MP
27422014-04-30 Marek Polacek <polacek@redhat.com>
2743
2744 PR c/60139
2745 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2746 and pedwarn_init. Use loc insted of input_location.
2747
c4bdc42f
MP
27482014-04-30 Marek Polacek <polacek@redhat.com>
2749
2750 PR c/60351
2751 * c-typeck.c (build_binary_op): Use location when warning about
2752 shift count.
2753
45484dcf
MP
27542014-04-25 Marek Polacek <polacek@redhat.com>
2755
2756 PR c/18079
2757 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2758 always_inline/noinline and hot/cold attributes.
2759
34cf811f
MP
27602014-04-25 Marek Polacek <polacek@redhat.com>
2761
2762 PR c/60114
2763 * c-parser.c (c_parser_initelt): Pass input_location to
2764 process_init_element.
2765 (c_parser_initval): Pass loc to process_init_element.
2766 * c-tree.h (process_init_element): Adjust declaration.
2767 * c-typeck.c (push_init_level): Pass input_location to
2768 process_init_element.
2769 (pop_init_level): Likewise.
2770 (set_designator): Likewise.
2771 (output_init_element): Add location_t parameter. Pass loc to
2772 digest_init.
2773 (output_pending_init_elements): Pass input_location to
2774 output_init_element.
2775 (process_init_element): Add location_t parameter. Pass loc to
2776 output_init_element.
2777
42056eac
JJ
27782014-04-24 Jakub Jelinek <jakub@redhat.com>
2779
2780 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2781 atomic-clause, allow comma in between atomic-clause and
2782 seq_cst.
2783
e162a134
JJ
27842014-04-22 Jakub Jelinek <jakub@redhat.com>
2785
2786 PR c/59073
2787 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2788 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2789
2f6babac
IZ
27902014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2791
2792 PR middle-end/60469
2793 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2794 create_tmp_var instead build_decl for creating temps.
2795 (build_array_notation_expr): Likewise.
2796 (fix_conditional_array_notations_1): Likewise.
2797 (fix_array_notation_expr): Likewise.
2798 (fix_array_notation_call_expr): Likewise.
2799
8edbfaa6
JJ
28002014-03-28 Jakub Jelinek <jakub@redhat.com>
2801
2802 PR c++/60689
2803 * c-tree.h (c_build_function_call_vec): New prototype.
2804 * c-typeck.c (build_function_call_vec): Don't call
2805 resolve_overloaded_builtin here.
2806 (c_build_function_call_vec): New wrapper function around
2807 build_function_call_vec. Call resolve_overloaded_builtin here.
2808 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2809 Call c_build_function_call_vec instead of build_function_call_vec.
2810 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2811 * c-decl.c (finish_decl): Likewise.
2812
7485aeea
MLI
28132014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2814
2815 PR c/55383
2816 * c-typeck.c: Use correct format string in cast-qual warning
2817
b17a8b07
TS
28182014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2819
2820 * c-decl.c (c_decl_attributes): Use
2821 lang_hooks.types.omp_mappable_type.
2822 * c-typeck.c (c_finish_omp_clauses): Likewise.
2823
3af9c5e9
MP
28242014-03-06 Marek Polacek <polacek@redhat.com>
2825
2826 PR c/60197
2827 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2828 of checking tree code.
2829
1c9f5f33
PK
28302014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2831
2832 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2833 (c_parser_parameter_declaration): Likewise.
2834
cc28fc7f
MP
28352014-02-19 Marek Polacek <polacek@redhat.com>
2836
2837 PR c/60195
2838 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2839 Call mark_exp_read on exp.value.
2840 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2841 TREE_ADDRESSABLE on old instead of val.
2842 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2843
b581c05c
PK
28442014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2845
2846 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2847 C_EXPR_APPEND by vec_safe_push.
2848 * c-tree.h (C_EXPR_APPEND): Remove.
2849
81e5eca8
MP
28502014-01-31 Marek Polacek <polacek@redhat.com>
2851
2852 PR c/59963
2853 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2854 build_function_call_vec.
2855 (build_function_call): Likewise.
2856 (build_atomic_assign): Likewise.
2857 (build_function_call_vec): Add arg_loc parameter. Use it.
2858 (convert_arguments): Likewise.
2859 (convert_for_assignment): Rename rhs_loc to expr_loc.
2860 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2861 (c_parser_objc_keywordexpr): Likewise.
2862 (c_parser_postfix_expression_after_primary): Call
2863 build_function_call_vec with expr_loc rather than op_loc.
2864 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2865 build_function_call_vec.
2866 (c_parser_expr_list): Add locations parameter. Fill it with locations
2867 of function arguments.
2868 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2869
68fca595
MP
28702014-01-30 Marek Polacek <polacek@redhat.com>
2871
2872 PR c/59940
2873 * c-typeck.c (build_function_call_vec): Use loc parameter.
2874 (convert_arguments): Add location parameter. Use it.
2875 (ep_convert_and_check): Likewise.
2876 (build_atomic_assign): Adjust convert_for_assignment call.
2877 (build_modify_expr): Likewise.
2878 (digest_init): Likewise.
2879 (c_finish_return): Likewise.
2880 (build_conditional_expr): Adjust ep_convert_and_check calls.
2881 (convert_for_assignment): Add rhs_loc parameter. Use it.
2882 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2883 calls.
2884
fa337f3a
RB
28852014-01-30 Richard Biener <rguenther@suse.de>
2886
2887 PR c/59905
2888 * c-typeck.c (build_function_call_vec): Do not replace calls
2889 to a function via an incompatible type with a runtime abort.
2890
b72271b9
BI
28912014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2892
2893 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2894 flag_enable_cilkplus with flag_cilkplus.
2895 (c_parser_direct_declarator_inner): Likewise.
2896 (c_parser_attribute_any_word): Likewise.
2897 (c_parser_attributes): Likewise.
2898 (c_parser_compound_statement): Likewise.
2899 (c_parser_statement_after_labels): Likewise.
2900 (c_parser_if_statement): Likewise.
2901 (c_parser_switch_statement): Likewise.
2902 (c_parser_do_statement): Likewise.
2903 (c_parser_for_statement): Likewise.
2904 (c_parser_unary_expression): Likewise.
2905 (c_parser_postfix_expression): Likewise.
2906 (c_parser_postfix_expression_after_primary): Likewise.
2907 (c_parser_postfix_expression_after_primary): Likewise.
2908 (c_parser_omp_clause_name): Likewise.
2909 (c_finish_omp_declare_simd): Likewise.
2910 (c_parser_cilk_verify_simd): Likewise.
2911 * c-typeck.c (build_array_ref): Likewise.
2912 (build_function_call_vec): Likewise.
2913 (convert_arguments): Likewise.
2914 (build_compound_expr): Likewise.
2915 (c_finish_return): Likewise.
2916 (c_finish_if_stmt): Likewise.
2917 (c_finish_loop): Likewise.
2918 (build_binary_op): Likewise.
2919
393e8e8b
MP
29202014-01-23 Marek Polacek <polacek@redhat.com>
2921
2922 PR c/59846
2923 * c-typeck.c (parser_build_binary_op): Use location instead of
2924 input_location.
2925 (build_binary_op): Pass location to shorten_compare.
2926
f04dda30
MP
29272014-01-23 Marek Polacek <polacek@redhat.com>
2928
2929 PR c/58346
2930 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2931 an empty aggregate.
2932
789eadcd
MP
29332014-01-23 Marek Polacek <polacek@redhat.com>
2934
2935 PR c/59871
2936 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2937 of a comma expression.
2938 (emit_side_effect_warnings): Likewise.
2939
40f14e9f
BI
29402014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2941
2942 PR c/59825
2943 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2944 function to use walk_tree and moved a lot of its functionality to
2945 expand_array_notations.
2946 (expand_array_notations): New function.
2947
74558dd9
BI
29482014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2949
2950 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2951 attribute an attribute without value.
2952
652fea39
JJ
29532014-01-23 Jakub Jelinek <jakub@redhat.com>
2954
2955 PR middle-end/58809
2956 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2957 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2958
f34f1c87
MP
29592014-01-22 Marek Polacek <polacek@redhat.com>
2960
2961 PR c/59891
2962 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2963 of remove_c_maybe_const_expr on op1 and op2.
2964
241f845a
JJ
29652014-01-15 Jakub Jelinek <jakub@redhat.com>
2966
2967 PR c/58943
2968 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2969 effects, preevaluate rhs using SAVE_EXPR first.
2970
9a74f20c
BI
29712014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2972
2973 PR c++/59631
2974 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2975 statements with if-elseif statements.
2976
96066ce1
MP
29772014-01-06 Marek Polacek <polacek@redhat.com>
2978
2979 PR c/57773
2980 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2981 defined bit-field types only in ISO C.
2982
23a5b65a
RS
29832014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2984
2985 Update copyright years
2986
f9030485
RS
29872014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2988
2989 * c-array-notation.c: Use the standard form for the copyright notice.
2990
41958c28
BI
29912013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2992
2993 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2994 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2995 field in parser is not empty. If not-empty, call the function
2996 c_parser_finish_omp_declare_simd.
2997 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2998 between SIMD-enabled functions and #pragma simd. Added new parameter.
2999 (c_parser_cilk_all_clauses): Modified the usage of the function
3000 c_parser_cilk_clause_vectorlength as mentioned above.
3001 (c_parser_cilk_simd_fn_vector_attrs): New function.
3002 (c_finish_cilk_simd_fn_tokens): Likewise.
3003 (is_cilkplus_vector_p): Likewise.
3004 (c_parser_omp_clause_name): Added checking for "vectorlength,"
3005 "nomask," and "mask" strings in clause name.
3006 (c_parser_omp_all_clauses): Added 3 new case statements:
3007 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
3008 PRAGMA_CILK_CLAUSE_NOMASK.
3009 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
3010 check for vector attribute and if so call the function
3011 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
3012 called the function c_finish_cilk_simd_fn_tokens.
3013 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
3014 parser field is non-empty. If so, parse them as you would parse
3015 the omp declare simd pragma.
3016 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
3017 Added a check when step is a parameter and flag it as error.
3018 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
3019 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
3020 pragma_omp_clause.
3021
cef0fd0e
TS
30222013-12-17 Thomas Schwinge <thomas@codesourcery.com>
3023
3024 * c-parser.c (c_parser_omp_parallel): Fix description.
3025
12893402
BI
30262013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
3027
3028 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
3029 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3030 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
3031 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
3032
296674db
JM
30332013-12-04 Joseph Myers <joseph@codesourcery.com>
3034
3035 PR c/52023
3036 * c-parser.c (c_parser_alignas_specifier): Use
3037 c_sizeof_or_alignof_type instead of c_alignof.
3038 (c_parser_alignof_expression): Likewise, with min_alignof
3039 parameter depending on alignof spelling used.
3040
edd28054
MP
30412013-12-04 Marek Polacek <polacek@redhat.com>
3042
3043 PR c/54113
3044 * c-decl.c (start_function): Don't warn for missing prototype for
3045 inline functions.
3046
da0fc454
MP
30472013-12-03 Marek Polacek <polacek@redhat.com>
3048
3049 PR c/59351
3050 * c-decl.c (build_compound_literal): Allow compound literals with
3051 empty initial value.
3052
4c2ecab0
JM
30532013-12-02 Joseph Myers <joseph@codesourcery.com>
3054
3055 PR c/58235
3056 * c-typeck.c (build_modify_expr): Diagnose assignment to
3057 expression with array type.
3058
340baef7
JM
30592013-11-29 Joseph Myers <joseph@codesourcery.com>
3060
3061 PR c/42262
3062 * c-typeck.c (process_init_element): Do not treat a string as
3063 initializing a whole array when used with a designator for an
3064 individual element.
3065
6763b9f7
JM
30662013-11-29 Joseph Myers <joseph@codesourcery.com>
3067
3068 PR c/57574
3069 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
3070 an inline function following a static declaration.
3071
e7bd1de1
JJ
30722013-11-28 Jakub Jelinek <jakub@redhat.com>
3073
3074 PR c/59310
3075 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
3076 to p_name before calling c_parser_omp_teams instead of after.
3077 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
3078 argument. Remove unused p_name variable.
3079
0136f8f0
AH
30802013-11-27 Aldy Hernandez <aldyh@redhat.com>
3081 Jakub Jelinek <jakub@redhat.com>
3082
3083 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
3084 external_scope is NULL.
3085
241b71bb
TV
30862013-11-27 Tom de Vries <tom@codesourcery.com>
3087 Marc Glisse <marc.glisse@inria.fr>
3088
3089 PR c++/59032
3090 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
3091
2fb9a547
AM
30922013-11-22 Andrew MacLeod <amacleod@redhat.com>
3093
3094 * c-typeck.c: Add required include files from gimple.h.
3095
8400e75e
DM
30962013-11-22 David Malcolm <dmalcolm@redhat.com>
3097
3098 * c-decl.c (define_label, shadow_tag_warned)
3099 (check_bitfield_type_and_width, grokdeclarator, grokparms,
3100 store_parm_decls_newstyle, store_parm_decls_oldstyle)
3101 (declspecs_add_type): Remove use of in_system_header macro.
3102 * c-parser.c (c_parser_unary_expression): Likewise.
3103 * c-typeck.c (store_init_value, process_init_element)
3104 (c_start_case): Likewise.
3105
3106 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
3107 macro.
3108
3109 * c-parser.c (c_parser_set_source_position_from_token): Remove
3110 reference to in_system_header from comment.
3111
386b1f1f
RS
31122013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3113
3114 * c-decl.c (grokdeclarator): Update comment to refer to
3115 tree_to_[su]hwi rather than tree_low_cst.
3116
ae7e9ddd
RS
31172013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3118
3119 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
3120 tree_to_uhwi throughout.
3121
9439e9a1
RS
31222013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3123
3124 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
3125 throughout.
3126
9541ffee
RS
31272013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
3128
3129 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
3130 throughout.
3131
c02065fc
AH
31322013-11-15 Aldy Hernandez <aldyh@redhat.com>
3133
3134 * c-parser.c (c_parser_cilk_simd): New.
3135 (c_parser_cilk_verify_simd): New.
3136 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
3137 (c_parser_omp_for_loop): Add case for NE_EXPR.
3138 Set c_break_label for CILK_SIMD.
3139 (c_parser_cilk_clause_vectorlength): New.
3140 (c_parser_cilk_clause_linear): New.
3141 (c_parser_cilk_clause_name): New.
3142 (c_parser_cilk_all_clauses): New.
3143 * c-typeck.c (build_unary_op): Pass location argument to
3144 readonly_error.
3145 (build_modify_expr): Same.
3146 (build_asm_expr): Same.
3147 (c_finish_bc_stmt): Error on break/continue in loops.
3148
18f429e2
AM
31492013-11-14 Andrew MacLeod <amacleod@redhat.com>
3150
3151 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
3152
d8a2d370
DN
31532013-11-14 Diego Novillo <dnovillo@google.com>
3154
3155 * c-decl.c: Include print-tree.h.
3156 Include stor-layout.h.
3157 Include varasm.h.
3158 Include attribs.h.
3159 Include stringpool.h.
3160 * c-lang.c: Include fold-const.h.
3161 * c-parser.c: Include stringpool.h.
3162 Include attribs.h.
3163 Include stor-layout.h.
3164 Include varasm.h.
3165 Include trans-mem.h.
3166 * c-typeck.c: Include stor-layout.h.
3167 Include trans-mem.h.
3168 Include varasm.h.
3169 Include stmt.h.
3170
38b7bc7f
JM
31712013-11-13 Joseph Myers <joseph@codesourcery.com>
3172
3173 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
3174 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
3175 __auto_type.
3176 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
3177 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
3178 RID_AUTO_TYPE.
3179 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
3180 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
3181 (c_parser_declarator, c_parser_direct_declarator_inner)
3182 (c_parser_parameter_declaration, c_parser_type_name): All callers
3183 changed.
3184 (c_parser_declaration_or_fndef): Handle declarations with type
3185 determined from the initializer.
3186
45b0be94
AM
31872013-11-12 Andrew MacLeod <amacleod@redhat.com>
3188
18f429e2 3189 * c-typeck.c: Include gimplify.h.
45b0be94 3190
582d9b50
JM
31912013-11-12 Joseph Myers <joseph@codesourcery.com>
3192
3193 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
3194 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
3195 comment.
3196 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
3197 or _Thread_local as appropriate in diagnostics.
3198 (build_null_declspecs): Initialize ret->thread_gnu_p.
3199 (declspecs_add_scspec): Handle either __thread or _Thread_local
3200 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
3201 pedantic. Do not disallow _Thread_local extern and _Thread_local
3202 static.
3203
267bac10
JM
32042013-11-07 Joseph Myers <joseph@codesourcery.com>
3205 Andrew MacLeod <amacleod@redhat.com>
3206
3207 * c-aux-info.c (gen_type): Handle atomic qualifier.
3208 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
3209 qualifiers when compating types.
3210 (shadow_tag_warned): Handle atomic_p in declspecs.
3211 (quals_from_declspecs): Likewise.
3212 (start_decl): Use c_type_promotes_to when promoting argument
3213 types.
3214 (grokdeclarator): Handle _Atomic.
3215 (get_parm_info): Diagnose any qualifier on "void" as only
3216 parameter.
3217 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
3218 comparing types. Use c_type_promotes_to when promoting argument
3219 types.
3220 (finish_function): Use c_type_promotes_to when promoting argument
3221 types.
3222 (build_null_declspecs): Handle atomic_p in declspecs.
3223 (declspecs_add_qual): Handle RID_ATOMIC.
3224 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
3225 (c_token_starts_declspecs): Handle RID_ATOMIC.
3226 (c_parser_declspecs): Handle atomic type specifiers and
3227 qualifiers.
3228 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
3229 from types of expressions with atomic type.
3230 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
3231 (c_parser_attribute_any_word): Handle RID_ATOMIC.
3232 (c_parser_initializer, c_parser_initelt, c_parser_initval)
3233 (c_parser_statement_after_labels, c_parser_switch_statement)
3234 (c_parser_for_statement, c_parser_expr_no_commas)
3235 (c_parser_conditional_expression, c_parser_binary_expression)
3236 (c_parser_cast_expression, c_parser_unary_expression)
3237 (c_parser_postfix_expression)
3238 (c_parser_postfix_expression_after_primary, c_parser_expression):
3239 Use convert_lvalue_to_rvalue.
3240 (c_parser_expression_conv, c_parser_expr_list): Document
3241 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
3242 (c_parser_objc_synchronized_statement): Use
3243 convert_lvalue_to_rvalue.
3244 (c_parser_objc_selector): Handle RID_ATOMIC.
3245 (c_parser_objc_receiver, c_parser_array_notation): Use
3246 convert_lvalue_to_rvalue.
3247 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
3248 _Atomic (type-name).
3249 (struct c_declspecs): Add atomic_p field.
3250 (convert_lvalue_to_rvalue): Declare.
3251 * c-typeck.c (c_type_promotes_to): Promote atomic types to
3252 corresponding atomic types.
3253 (qualify_type): Don't add _Atomic qualifiers from second argument.
3254 (comp_target_types): Do not allow _Atomic mismatches.
3255 (type_lists_compatible_p): Do not remove atomic qualifiers when
3256 comparing types.
3257 (really_atomic_lvalue, convert_lvalue_to_rvalue)
3258 (build_atomic_assign): New functions.
3259 (build_unary_op): Use build_atomic_assign for atomic increment and
3260 decrement.
3261 (build_conditional_expr): Do not treat _Atomic void as a qualified
3262 version of void.
3263 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3264 (find_anonymous_field_with_type, convert_to_anonymous_field)
3265 (convert_for_assignment): Do not remove atomic qualifiers when
3266 comparing types.
3267 (digest_init): Do not accept initialization of arrays of atomic
3268 elements by string constants.
3269 (build_asm_expr): Use convert_lvalue_to_rvalue.
3270 (build_binary_op): Do not treat _Atomic void as a qualified
3271 version of void.
3272
0c249d4b
DD
32732013-11-06 DJ Delorie <dj@redhat.com>
3274
3275 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3276 both explicit and builtin, print the location of the explicit one.
3277
6d7f7e0a
TB
32782013-11-05 Tobias Burnus <burnus@net-b.de>
3279
3280 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3281 c_parser_omp_distribute, c_parser_omp_teams,
3282 c_parser_omp_target, c_parser_omp_declare): Handle
3283 -fopenmp-simd.
3284
b906f4ca
MP
32852013-11-03 Marek Polacek <polacek@redhat.com>
3286
3287 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3288
ee1d5a02
JJ
32892013-11-01 Jakub Jelinek <jakub@redhat.com>
3290
3291 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3292 check_dup_generic at the end, unless remove is true.
3293 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3294 remove = true;.
3295 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3296
5a9785fb
JJ
32972013-10-31 Jakub Jelinek <jakub@redhat.com>
3298
3299 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3300 with decl that is not pointer nor array.
3301
939b37da
BI
33022013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3303
3304 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3305 a spawning function is found.
3306 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3307 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3308 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3309 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3310 case.
3311 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3312 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3313 expr.
3314 (c_finish_return): Added a check to reject _Cilk_spawn in return
3315 expression.
3316 (build_cilk_spawn): New function.
3317 (build_cilk_sync): Likewise.
3318 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3319
d4af74d4
TB
33202013-10-27 Tobias Burnus <burnus@net-b.de>
3321
3322 PR other/33426
3323 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3324 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3325 (c_parser_statement_after_labels): Update calls.
3326
d73749df 33272013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3328
3329 PR other/33426
3330 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3331 Handle PRAGMA_IVDEP.
3332 (c_parser_statement_after_labels): Update call.
3333
f28aa681
MP
33342013-10-24 Marek Polacek <polacek@redhat.com>
3335
3336 * c-parser.c (c_parser_struct_declaration): Add a comment.
3337 (c_parser_declarator): Don't allow _Alignas here.
3338
0645c1a2
AM
33392013-10-17 Andrew MacLeod <amacleod@redhat.com>
3340
3341 * c-parser.c: Include omp-low.h.
3342 * c-typeck.c: Likewise.
3343
568a31f2
MP
33442013-10-17 Marek Polacek <polacek@redhat.com>
3345
3346 PR c/58267
3347 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3348 Document syntax of the array-declarator.
3349 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3350 are not permitted.
3351 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3352 (c_parser_struct_declaration): Likewise.
3353 (c_parser_declarator): Likewise.
3354 (c_parser_direct_declarator_inner): Likewise.
3355 (c_parser_parameter_declaration): Likewise.
3356 (c_parser_type_name): Likewise.
3357
acf0174b
JJ
33582013-10-11 Jakub Jelinek <jakub@redhat.com>
3359
3360 * c-lang.h (current_omp_declare_target_attribute): New extern
3361 decl.
3362 * c-parser.c: Include c-lang.h.
3363 (struct c_parser): Change tokens to c_token *.
3364 Add tokens_buf field. Change tokens_avail type to unsigned int.
3365 (c_parser_consume_token): If parser->tokens isn't
3366 &parser->tokens_buf[0], increment parser->tokens.
3367 (c_parser_consume_pragma): Likewise.
3368 (enum pragma_context): Add pragma_struct and pragma_param.
3369 (c_parser_external_declaration): Adjust
3370 c_parser_declaration_or_fndef caller.
3371 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3372 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3373 Adjust recursive call.
3374 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3375 of pragma_external.
3376 (c_parser_parameter_declaration): Use pragma_param instead of
3377 pragma_external.
3378 (c_parser_compound_statement_nostart, c_parser_label,
3379 c_parser_for_statement): Adjust
3380 c_parser_declaration_or_fndef callers.
3381 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3382 it through to c_parser_conditional_expression.
3383 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3384 pass it through to c_parser_binary_expression. Adjust recursive
3385 call.
3386 (c_parser_binary_expression): Remove prec argument, add
3387 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3388 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3389 binop matches it, use build2 instead of parser_build_binary_op.
3390 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3391 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3392 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3393 Handle pragma_struct and pragma_param the same as pragma_external.
3394 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3395 (c_parser_omp_variable_list): Parse array sections for
3396 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3397 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3398 (c_parser_omp_clause_reduction): Handle user defined reductions.
3399 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3400 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3401 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3402 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3403 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3404 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3405 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3406 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3407 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3408 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3409 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3410 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3411 (c_parser_omp_for_loop): Add CODE argument, pass it through
3412 to c_finish_omp_for. Change last argument to cclauses,
3413 and adjust uses to grab parallel clauses from the array of all
3414 the split clauses. Adjust c_parser_binary_expression,
3415 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3416 (omp_split_clauses): New function.
3417 (c_parser_omp_simd): New function.
3418 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3419 Allow the function to be called also when parsing combined constructs,
3420 and call c_parser_omp_simd when parsing for simd.
3421 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3422 #pragma omp section, require exactly one structured-block instead of
3423 sequence of statements.
3424 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3425 Allow the function to be called also when parsing combined constructs.
3426 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3427 Allow the function to be called also when parsing combined
3428 constructs.
3429 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3430 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3431 c_parser_omp_teams, c_parser_omp_target_data,
3432 c_parser_omp_target_update, c_parser_omp_target,
3433 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3434 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3435 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3436 (c_parser_omp_construct): Add p_name and mask vars. Handle
3437 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3438 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3439 and c_parser_omp_sections callers.
3440 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3441 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3442 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3443 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3444 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3445 OMP_CLAUSE_DEPEND.
3446 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3447 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3448 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3449 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3450 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3451 * c-typeck.c: Include tree-inline.h.
3452 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3453 handle_omp_array_sections_1, handle_omp_array_sections,
3454 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3455 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3456 user defined reductions.
3457 (c_tree_equal): New function.
3458 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3459 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3460 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3461 c_check_omp_declare_reduction_r): New prototypes.
3462 * c-decl.c (current_omp_declare_target_attribute): New variable.
3463 (c_decl_attributes): New function.
3464 (start_decl, start_function): Use it instead of decl_attributes.
3465 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3466 c_omp_reduction_decl, c_omp_reduction_lookup,
3467 c_check_omp_declare_reduction_r): New functions.
3468
0a6c2227
TT
34692013-09-25 Tom Tromey <tromey@redhat.com>
3470
3471 * Make-lang.in (c/gccspec.o): Remove.
3472 (CFLAGS-c/gccspec.o): New variable.
3473 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3474 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3475 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3476
f3bc55f0
TT
34772013-09-25 Tom Tromey <tromey@redhat.com>
3478
3479 * Make-lang.in (c/gccspec.o): Don't use subshell.
3480
a24d975c
MP
34812013-09-18 Marek Polacek <polacek@redhat.com>
3482
3483 PR sanitize/58443
3484 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3485 Remove unnecessary check.
3486
ce6923c5
MP
34872013-09-18 Marek Polacek <polacek@redhat.com>
3488
3489 PR sanitizer/58411
3490 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3491 no_sanitize_undefined attribute.
3492
a1e51df9
KT
34932013-09-13 Kai Tietz <ktietz@redhat.com>
3494
3495 PR target/57848
3496 * c-decl.c (c_builtin_function_ext_scope): Remove
3497 wrong assumption that it is never called on prexisting
3498 symbol.
3499
0af94e6f
JR
35002013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3501
3502 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3503
20059c8b
GDR
35042013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3505
3506 * c-objc-common.c (c_tree_printer): Tidy.
3507
de5a5fa1
MP
35082013-08-30 Marek Polacek <polacek@redhat.com>
3509
3510 * c-typeck.c (build_binary_op): Add division by zero and shift
3511 instrumentation.
3512
2531a1d9 35132013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 3514 Joseph Myers <joseph@codesourcery.com>
2531a1d9 3515
6e2bcc98 3516 PR c/35649
2531a1d9
JR
3517 * c-typeck.c (c_common_type): Prefer double_type_node over
3518 other REAL_TYPE types with the same precision.
3519 (convert_arguments): Likewise.
3520
025311c4
GDR
35212013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3522
3523 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3524 (c_initialize_diagnostics): Call a destructor for the early printer.
3525
da6ca2b5
GDR
35262013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3527
3528 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3529 printer initialization.
3530
318cda85 35312013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 3532
318cda85
BI
3533 PR c/57490
3534 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3535 check for truth values.
3536 (expand_array_notation_exprs): Added truth values case. Removed an
3537 unwanted else. Added for-loop to walk through subtrees in default
3538 case.
3539
b066401f
GDR
35402013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3541
3542 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3543
fb48aadc
JM
35442013-07-23 Joseph Myers <joseph@codesourcery.com>
3545
3546 * c-parser.c (struct c_generic_association): Fix typo.
3547
433cc7b0
TT
35482013-07-23 Tom Tromey <tromey@redhat.com>
3549 Joseph Myers <joseph@codesourcery.com>
3550
3551 * c-parser.c (struct c_generic_association): New.
3552 (c_generic_association_d): New typedef.
3553 (c_parser_generic_selection): New function.
3554 (c_parser_postfix_expression): Handle RID_GENERIC.
3555
26d40c3d
JM
35562013-07-13 Jason Merrill <jason@redhat.com>
3557
3558 PR c++/57793
3559 * c-decl.c (finish_struct): Check for too-large class.
3560
ecdbd01a 35612013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
3562
3563 PR c/57821
3564 * c-typeck.c (set_init_index): When folding, check for index overflow.
3565
1141ed3f
BI
35662013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3567
3568 * c-parser.c (c_parser_array_notation): Removed rejection of array
3569 notations in an array of function pointers.
3570
713b46fa
BI
35712013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3572
3573 * c-array-notation.c (make_triplet_val_inv): New function.
3574 (create_cmp_incr): Likewise.
3575 (create_array_refs): Likewise.
3576 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3577 Also modularized common parts between functions and called the function.
3578 (build_array_notation_expr): Likewise.
3579 (fix_conditional_array_notations_1): Likewise.
3580 (fix_array_notation_expr): Likewise.
3581 (fix_array_notation_call_expr): Likewise.
3582
92f20202
MP
35832013-06-18 Marek Polacek <polacek@redhat.com>
3584
3585 PR c/57630
3586 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3587
73a23b06
BI
35882013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3589
3590 * c-array-notation.c (build_array_notation_expr): Reject array notation
3591 mismatch between LHS and RHS even inside a call_expr. Also, removed
3592 a couple while statements that were dead code.
3593
00b8517d
BI
35942013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3595
3596 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3597 excessive precision expressions in function parameters. Also removed
3598 couple unwanted while statements.
3599
1509bdda
BI
36002013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3601
3602 * c-array-notation.c (expand_array_notation_exprs): Added
3603 ARRAY_NOTATION_REF case.
3604
d60f1706
BI
36052013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3606
3607 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3608 function to c-family/array-notation-common.c.
3609 (is_cilkplus_reduce_builtin): Likewise.
3610 (find_rank): Likewise.
3611 (extract_array_notation_exprs): Likewise.
3612 (replace_array_notations): Likewise.
3613 (find_inv_trees): Likewise.
3614 (replace_inv_trees): Likewise.
3615 (contains_array_notation_expr): Likewise.
3616 (find_correct_array_notation_type): Likewise.
3617 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3618 (struct inv_list): Moved this to c-family/array-notation-common.c.
3619 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3620
6d6efbb3
BI
36212013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3622
3623 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3624 reduction functions outside the for-loop. Added a check if the fundecl
3625 is non-NULL. Finally, removed an unwanted if-statement, and made the
3626 body unconditional.
3627
25c22937
BI
36282013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3629
3630 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3631 condition of the if-statement matches the rank of else-block and then-
3632 block when array notations are used.
3633 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3634 expression after the entire function body is parsed.
3635 (c_parser_expr_no_commas): Delayed creating array notation expressions
3636 to the end of function parsing.
3637 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3638 whole if-statement instead of just the condition.
3639 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3640
edd25645
BI
36412013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3642
3643 PR c/57474
3644 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3645 array to NULL_TREE if they are unused. Also added a check for the
3646 field to be NULL before its fields are used in future.
3647
065ce7f1
RO
36482013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3649
3650 PR bootstrap/57450
3651 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3652 (build_array_notation_expr): Likewise.
3653
36536d79
BI
36542013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3655
3656 * c-typeck.c (build_array_ref): Added a check to see if array's
3657 index is greater than one. If true, then emit an error.
3658 (build_function_call_vec): Exclude error reporting and checking
3659 for builtin array-notation functions.
3660 (convert_arguments): Likewise.
3661 (c_finish_return): Added a check for array notations as a return
3662 expression. If true, then emit an error.
3663 (c_finish_loop): Added a check for array notations in a loop
3664 condition. If true then emit an error.
3665 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3666 (build_binary_op): Added a check for array notation expr inside
3667 op1 and op0. If present, we call another function to find correct
3668 type.
3669 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3670 * c-parser.c (c_parser_compound_statement): Check if array
3671 notation code is used in tree, if so, then transform them into
3672 appropriate C code.
3673 (c_parser_expr_no_commas): Check if array notation is used in LHS
3674 or RHS, if so, then build array notation expression instead of
3675 regular modify.
3676 (c_parser_postfix_expression_after_primary): Added a check for
3677 colon(s) after square braces, if so then handle it like an array
3678 notation. Also, break up array notations in unary op if found.
3679 (c_parser_direct_declarator_inner): Added a check for array
3680 notation.
3681 (c_parser_compound_statement): Added a check for array notation in
3682 a stmt. If one is present, then expand array notation expr.
3683 (c_parser_if_statement): Likewise.
3684 (c_parser_switch_statement): Added a check for array notations in
3685 a switch statement's condition. If true, then output an error.
3686 (c_parser_while_statement): Similarly, but for a while.
3687 (c_parser_do_statement): Similarly, but for a do-while.
3688 (c_parser_for_statement): Similarly, but for a for-loop.
3689 (c_parser_unary_expression): Check if array notation is used in a
3690 pre-increment or pre-decrement expression. If true, then expand
3691 them.
3692 (c_parser_array_notation): New function.
3693 * c-array-notation.c: New file.
3694 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3695
cd192ccc
MS
36962013-05-23 Mike Stump <mikestump@comcast.net>
3697
3698 * c-typeck.c (convert_for_assignment): Handle references to memory
3699 spaces better.
3700
427b248d
JM
37012013-05-16 Jason Merrill <jason@redhat.com>
3702
3703 * Make-lang.in (cc1$(exeext)): Use link mutex.
3704
44d90fe1
PC
37052013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3706
3707 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3708 to simply use OPT_Wpointer_arith.
3709 (build_unary_op): Likewise.
3710
4e7d7b3d
JJ
37112013-04-03 Jakub Jelinek <jakub@redhat.com>
3712
3713 PR c/19449
3714 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3715 argument. If set, or it temporarily for parsing of the first
3716 argument into force_folding_builtin_constant_p.
3717 (c_parser_postfix_expression): Adjust callers.
3718
839b422f
RB
37192013-03-21 Richard Biener <rguenther@suse.de>
3720
3721 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3722 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3723
2ee028f1
MP
37242013-02-12 Marek Polacek <polacek@redhat.com>
3725
3726 PR c/44938
3727 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3728 origtypes to NULL.
3729
8824edff
JJ
37302013-01-24 Jakub Jelinek <jakub@redhat.com>
3731
3732 PR c/56078
3733 * c-typeck.c (set_nonincremental_init_from_string): If
3734 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3735 returned false.
3736 (process_init_element): Likewise.
3737
eadd3d0d
JJ
37382012-12-20 Jakub Jelinek <jakub@redhat.com>
3739
3740 PR c++/55619
3741 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3742 argument, don't call default_function_array_conversion
3743 nor c_fully_fold here.
3744 (c_parser_asm_statement): Adjust callers.
3745 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3746 and outputs here, and call default_function_array_conversion
3747 on inputs that don't need to be addressable.
3748
f8a93a2e
JJ
37492012-12-18 Jakub Jelinek <jakub@redhat.com>
3750
3751 PR c/39464
3752 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3753 warning require that both c_common_unsigned_type as well as
3754 c_common_signed_type is the same for both mvl and mvr types.
3755
9771b263
DN
37562012-11-16 Diego Novillo <dnovillo@google.com>
3757
3758 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3759
3760 * c-common.c: Use new vec API in vec.h.
3761 * c-common.h: Likewise.
3762 * c-gimplify.c: Likewise.
3763 * c-pragma.c: Likewise.
3764 * c-pretty-print.c: Likewise.
3765 * c-pretty-print.h: Likewise.
3766 * c-semantics.c: Likewise.
3767 * c-decl.c: Likewise.
3768 * c-parser.c: Likewise.
3769 * c-tree.h: Likewise.
3770 * c-typeck.c: Likewise.
3771
880661a4
JW
37722012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3773
3774 PR c++/54930
3775 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3776
077d1abe
MLI
37772012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3778
3779 PR c/53066
3780 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3781 shadows a function, unless the variable is a function or a
3782 pointer-to-function.
3783
3a785c97
JJ
37842012-10-12 Jakub Jelinek <jakub@redhat.com>
3785
3786 PR c/54381
3787 * c-parser.c (struct c_tree_loc_pair): Removed.
3788 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3789 add location_t * and tree * arguments, fill in array of 3
3790 sizeof_arg trees and corresponding locs.
3791 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3792 c_parser_expr_list callers.
3793 (c_parser_postfix_expression_after_primary): Likewise. Pass
3794 array of 3 sizeof_arg trees and locs (corresponding to first
3795 3 arguments) to sizeof_pointer_memaccess_warning.
3796
703c8606
LC
37972012-10-09 Lawrence Crowl <crowl@google.com>
3798
3799 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3800 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3801 hash table.
3802
5d9de0d0
PC
38032012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3804
3805 PR c++/54194
3806 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3807 call.
3808
a212e43f
MG
38092012-10-09 Marc Glisse <marc.glisse@inria.fr>
3810
3811 PR c++/54427
3812 * c-typeck.c: Include c-common.h.
3813 (enum stv_conv): Moved to c-common.h.
3814 (scalar_to_vector): Moved to c-common.c.
3815 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3816 * Make-lang.in: c-typeck.c depends on c-common.h.
3817
3b78de56
AC
38182012-10-04 Arnaud Charlet <charlet@adacore.com>
3819
3820 * c-decl.c (c_write_global_declarations): Fix handling of
3821 -fdump-ada-spec*.
3822
78c60e3d
SS
38232012-09-30 Sharad Singhai <singhai@google.com>
3824
3825 * c-decl.c (c_write_global_declarations): Use a different method
3826 to determine if the dump has ben initialized.
3827
9f33203d
JM
38282012-09-14 Joseph Myers <joseph@codesourcery.com>
3829
3830 PR c/54552
3831 * c-typeck.c (c_cast_expr): When casting to a type requiring
3832 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3833 c_fully_fold first.
3834
a27d595d
JM
38352012-09-14 Joseph Myers <joseph@codesourcery.com>
3836
3837 PR c/54103
3838 * c-typeck.c (build_unary_op): Pass original argument of
3839 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3840 any C_MAYBE_CONST_EXPR, if it has integer operands.
3841 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3842 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3843 to c_objc_common_truthvalue_conversion, then remove any
3844 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3845 c_objc_common_truthvalue_conversion not
3846 c_common_truthvalue_conversion.
3847 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3848 call note_integer_operands for arguments with integer operands
3849 that are not integer constants.
3850
9feb29df
JJ
38512012-09-13 Jakub Jelinek <jakub@redhat.com>
3852
3853 PR c/54559
3854 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3855 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3856
d409320c
JJ
38572012-08-31 Jakub Jelinek <jakub@redhat.com>
3858
3859 PR c/54428
3860 * c-convert.c (convert): Don't call fold_convert_loc if
3861 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3862 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3863 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3864
6265d07c
JJ
38652012-08-24 Jakub Jelinek <jakub@redhat.com>
3866
3867 PR c/54355
3868 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3869 for nested and empty_ok arguments in the call to
3870 c_parser_declaration_or_fndef.
3871
1a4049e7
JJ
38722012-08-17 Jakub Jelinek <jakub@redhat.com>
3873
3874 * c-tree.h (c_last_sizeof_arg): Declare.
3875 * c-parser.c (struct c_tree_loc_pair): New type.
3876 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3877 non-NULL.
3878 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3879 (c_parser_postfix_expression_after_primary): Likewise. Call
3880 sizeof_pointer_memaccess_warning if needed.
3881 (sizeof_ptr_memacc_comptypes): New function.
3882 * c-typeck.c (c_last_sizeof_arg): New global variable.
3883 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3884
0229aee9
UB
38852012-07-24 Uros Bizjak <ubizjak@gmail.com>
3886
3887 * c-lang.h (lang_decl): Add variable_size GTY option.
3888
7ee2468b
SB
38892012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3890
3891 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3892 * Make-lang.in: Fix dependencies.
3893
d4a10d0a
SB
38942012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3895
3896 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3897 and add language Makefile hooks.
3898 * config-lang.in: New file.
3899 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3900 add the required "normal" config-lang.in rules.
3901 * c-lang.h: Moved from gcc/ to here.
3902 * c-tree.h: Likewise.
3903 * c-objc-common.c: Likewise.
3904 * c-objc-common.h: Likewise.
3905 * c-typeck.c: Likewise.
3906 * c-convert.c: Likewise.
3907 * c-lang.c: Likewise.
3908 * c-aux-info.c: Likewise.
3909 * c-errors.c: Likewise.
3910 * gccspec.c: Likewise.
3911 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3912 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3913\f
818ab71a 3914Copyright (C) 2012-2016 Free Software Foundation, Inc.
d4a10d0a
SB
3915
3916Copying and distribution of this file, with or without modification,
3917are permitted in any medium without royalty provided the copyright
3918notice and this notice are preserved.
This page took 1.328228 seconds and 5 git commands to generate.