]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR c++/69657 (abs() not inlined after including math.h)
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
ba539195
JN
12016-02-16 James Norris <jnorris@codesourcery.com>
2
3 PR c/64748
4 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
5
16595a1f
BS
62016-02-12 Bernd Schmidt <bschmidt@redhat.com>
7
f48dfe98
BS
8 * c-decl.c (build_null_declspecs): Zero the entire struct.
9
16595a1f
BS
10 PR c/69522
11 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
12 callers changed. If nested_p is true, use it to call
13 finish_implicit_inits.
14 * c-tree.h (finish_implicit_inits): Declare.
15 * c-typeck.c (finish_implicit_inits): New function. Move code
16 from ...
17 (push_init_level): ... here.
18 (set_designator, process_init_element): Call finish_implicit_inits.
19
66756373
JJ
202016-02-11 Jakub Jelinek <jakub@redhat.com>
21
22 PR c/69768
23 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
24 arguments for -Waddress warning.
25
1066e9b5
JJ
262016-02-04 Jakub Jelinek <jakub@redhat.com>
27
28 PR c/69669
29 * c-decl.c (finish_enum): When honoring mode attribute,
30 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
31
3a5d2ba4
JJ
322016-01-29 Jakub Jelinek <jakub@redhat.com>
33
34 PR debug/69518
35 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
36 all type variants, not just TYPE_MAIN_VARIANT.
37
cbdd8ae0
JJ
382016-01-27 Jakub Jelinek <jakub@redhat.com>
39
40 PR debug/66869
41 * c-decl.c (c_write_global_declarations_1): Warn with
42 warn_unused_function if static prototype without definition
43 is not C_DECL_USED.
44
fa74a4bc
MP
452016-01-27 Marek Polacek <polacek@redhat.com>
46
47 PR c/68062
48 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
49 to unsigned, if needed. Add -Wsign-compare warning.
50
13f92e8d
JJ
512016-01-26 Jakub Jelinek <jakub@redhat.com>
52
53 PR tree-optimization/69483
54 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
55
cd8e73dc 562016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
57
58 PR c/24293
59 * c-tree.h (incomplete_record_decls): Declare.
60 * c-parser.c (incomplete_record_decls): Define.
61 (c_parser_translation_unit): Iterate through incomplete_record_decls and
62 report error if any decl has zero size.
63 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
64 or enum type to incomplete_record_decls.
65
e6d6ec9e
TV
662016-01-14 Tom de Vries <tom@codesourcery.com>
67
68 PR tree-optimization/68773
69 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
70 set force_output.
71
00083992
MP
722016-01-14 Marek Polacek <polacek@redhat.com>
73
74 PR c/69262
75 * c-decl.c (grokdeclarator): Provide more information for invalid
76 array declarations.
77
7443cf13
DM
782016-01-06 David Malcolm <dmalcolm@redhat.com>
79
80 * c-parser.c (c_parser_unary_expression): For dereferences, build
81 a combined location before calling build_indirect_ref, so that
82 error reports cover the full range, manually updating the c_expr
83 src_range.
84
6b131d5b
MP
852016-01-06 Marek Polacek <polacek@redhat.com>
86
87 PR sanitizer/69099
88 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
89 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
90 NULL.
91
818ab71a
JJ
922016-01-04 Jakub Jelinek <jakub@redhat.com>
93
94 Update copyright years.
95
2fe0a208
MP
962016-01-04 Marek Polacek <polacek@redhat.com>
97
98 PR c/68908
99 * c-typeck.c (build_atomic_assign): Improve commentary. Add
100 optimization to use __atomic_fetch_* built-in if possible.
101
c7b48c8a
TS
1022015-12-23 Thomas Schwinge <thomas@codesourcery.com>
103
104 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
105 into...
106 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
107 all users.
108
fda5652f
MP
1092015-12-22 Marek Polacek <polacek@redhat.com>
110
111 PR c/69002
112 * c-typeck.c (build_component_ref): Warn when acessing elements of
113 atomic structures or unions.
114
745e411d
DM
1152015-12-21 David Malcolm <dmalcolm@redhat.com>
116
117 * c-typeck.c: Include "gcc-rich-location.h".
118 (build_binary_op): In the two places that call binary_op_error,
119 create a gcc_rich_location and populate it with the location of
120 the binary op and its two operands.
121
94c40e19
DM
1222015-12-16 David Malcolm <dmalcolm@redhat.com>
123
124 * c-parser.c (c_parser_statement_after_labels): When calling
125 c_finish_return, Use the return expression's location if it has
126 one, falling back to the location of the first token within it.
127 * c-typeck.c (c_finish_return): When issuing warnings about
128 the incorrect presence/absence of a return value, issue a note
129 showing the declaration of the function.
130
de67c4c3
DM
1312015-12-16 David Malcolm <dmalcolm@redhat.com>
132
133 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
134 to 4.
135 (c_parser_peek_nth_token): New function.
136 (c_parser_peek_conflict_marker): New function.
137 (c_parser_error): Detect conflict markers and report them as such.
138
a10704e1
DM
1392015-12-16 David Malcolm <dmalcolm@redhat.com>
140
141 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
142 to preserve range information for the primary expression
143 in the call to c_parser_postfix_expression_after_primary.
144
8062bca6
DM
1452015-12-16 David Malcolm <dmalcolm@redhat.com>
146
147 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
148 expression location, falling back on the first token location,
149 rather than always using the latter.
150
d06f8b75
MP
1512015-12-16 Marek Polacek <polacek@redhat.com>
152
153 PR c/64637
154 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
155 available.
156
2994fb91
MP
1572015-12-15 Marek Polacek <polacek@redhat.com>
158
159 PR c/68907
160 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
161 artificial decl.
162
a1b93f8d
DM
1632015-12-08 David Malcolm <dmalcolm@redhat.com>
164
165 * c-parser.c (c_parser_alignof_expression): Capture location of
166 closing parenthesis (if any), or of end of unary expression, and
167 use it to build a src_range for the expression.
168
46c6e1e2
DM
1692015-12-08 David Malcolm <dmalcolm@redhat.com>
170
171 PR c/68757
172 * c-parser.c (c_parser_get_builtin_args): Add
173 "out_close_paren_loc" param, and write back to it.
174 (c_parser_postfix_expression): Capture the closing
175 parenthesis location for RID_CHOOSE_EXPR,
176 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
177 RID_BUILTIN_SHUFFLE and use it to set the source range
178 for such expressions; within RID_BUILTIN_COMPLEX set
179 the underlying location.
180
66189108
MP
1812015-12-07 Marek Polacek <polacek@redhat.com>
182
183 PR c/68668
184 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
185 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
186
f187980b
EB
1872015-12-04 Eric Botcazou <ebotcazou@adacore.com>
188
189 * c-tree.h (c_build_va_arg): Adjust prototype.
190 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
191 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
192 parameter, adjust throughout and issue an error if EXPR is a component
193 with reverse storage order.
194
4250754e
JM
1952015-12-02 Jason Merrill <jason@redhat.com>
196
197 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
198 (c_fully_fold_internal, decl_constant_value_for_optimization):
199 Move from c-common.c.
200 * c-tree.h: Declare decl_constant_value_for_optimization.
201 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
202
e9e32ee6
JM
2032015-12-02 Joseph Myers <joseph@codesourcery.com>
204
205 PR c/68162
206 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
207 following link from declarator to next declarator. Track original
208 qualified type and pass it to c_build_qualified_type.
209 * c-typeck.c (c_build_qualified_type): Add arguments
210 orig_qual_type and orig_qual_indirect.
211
ff7a55bf
TS
2122015-12-02 Thomas Schwinge <thomas@codesourcery.com>
213
214 * c-parser.c (c_parser_omp_clause_name)
215 (c_parser_oacc_all_clauses): Alphabetical sorting.
216
657e4e47
JJ
2172015-12-02 Jakub Jelinek <jakub@redhat.com>
218
219 PR c/68533
220 * c-decl.c (get_parm_info): Use b->locus instead of input_location
221 for diagnostics.
222
37d5ad46
JB
2232015-12-01 Julian Brown <julian@codesourcery.com>
224 Cesar Philippidis <cesar@codesourcery.com>
225 James Norris <James_Norris@mentor.com>
226
227 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
228 (c_parser_oacc_clause_use_device): New function.
229 (c_parser_oacc_all_clauses): Add use_device support.
230 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
231 (c_parser_oacc_host_data): New function.
232 (c_parser_omp_construct): Add host_data support.
233 * c-tree.h (c_finish_oacc_host_data): Add prototype.
234 * c-typeck.c (c_finish_oacc_host_data): New function.
235 (c_finish_omp_clauses): Add use_device support.
236
a4850ce9
JH
2372015-11-29 Jan Hubicka <hubicka@ucw.cz>
238
239 PR c/67106
240 * c-decl.c: Set TYPE_PACKED in variants.
241
b58d3df2
ML
2422015-11-27 Martin Liska <mliska@suse.cz>
243
244 PR c++/68312
245 * c-array-notation.c (fix_builtin_array_notation_fn):
246 Use release_vec_vec instead of vec::release.
247 (build_array_notation_expr): Likewise.
248 (fix_conditional_array_notations_1): Likewise.
249 (fix_array_notation_expr): Likewise.
250 (fix_array_notation_call_expr): Likewise.
251
aec17bfe
JJ
2522015-11-27 Jakub Jelinek <jakub@redhat.com>
253
254 PR c/63326
255 * c-parser.c (c_parser_compound_statement_nostart): If
256 last_label is true, use pragma_stmt instead of pragma_compound
257 as second c_parser_pragma argument.
258 (c_parser_omp_ordered, c_parser_omp_target_update,
259 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
260 false as second argument to c_parser_skip_to_pragma_eol after
261 diagnosing standalone directives used in pragma_stmt context.
262
688c4de0
IV
2632015-11-24 Ilya Verbin <ilya.verbin@intel.com>
264
265 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
266 with "if (ENABLE_OFFLOADING)".
267
cbd03aee
DM
2682015-11-23 David Malcolm <dmalcolm@redhat.com>
269
270 PR objc/68438
271 * c-parser.c (c_parser_postfix_expression): Set up source ranges
272 for various Objective-C constructs: Class.name syntax,
273 @selector(), @protocol(), @encode(), and [] message syntax.
274
a87a86e1
DM
2752015-11-20 David Malcolm <dmalcolm@redhat.com>
276
277 PR 62314
278 * c-typeck.c (should_suggest_deref_p): New function.
279 (build_component_ref): Special-case POINTER_TYPE when
280 generating a "not a structure of union" error message, and
281 suggest a "->" rather than a ".", providing a fix-it hint.
282
8ece8dfb
DM
2832015-11-19 David Malcolm <dmalcolm@redhat.com>
284
285 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
286 candidate into a new function, find_closest_identifier.
287
433068cc
MP
2882015-11-19 Marek Polacek <polacek@redhat.com>
289
290 PR c/68412
291 * c-typeck.c (parser_build_binary_op): Properly handle
292 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
293
bef08b71
DM
2942015-11-17 David Malcolm <dmalcolm@redhat.com>
295
296 * c-parser.c (set_c_expr_source_range): Bulletproof both
297 overloaded implementations against NULL expr->value.
298 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
299 values.
300 (c_parser_unary_expression): Likewise when handling addresses of
301 labels.
302 (c_parser_postfix_expression): Likewise for statement expressions,
303 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
304 __builtin_va_arg, and for __builtin_offset_of.
305 (c_parser_postfix_expression_after_paren_type): Initialize expr's
306 src_range using the range of the braced initializer.
307 (c_parser_transaction_expression): Set src_range for "ret" to a
308 sane pair of values.
309
fff77217
KY
3102015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
311
312 * c-parser.c (c_finish_omp_declare_simd): Look for
313 "simd" attribute as well. Update error message.
314
1d899da2
TS
3152015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
316
317 * c-parser.c (c_parser_omp_declare_target): Adjust.
318
e4606348
JJ
3192015-11-14 Jakub Jelinek <jakub@redhat.com>
320
321 * c-typeck.c (c_finish_omp_clauses): Don't mark
322 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
323
3e636daf
MP
3242015-11-14 Marek Polacek <polacek@redhat.com>
325
326 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
327 * c-typeck.c: Likewise.
328
ebedc9a3
DM
3292015-11-13 David Malcolm <dmalcolm@redhat.com>
330
331 * c-decl.c (warn_defaults_to): Pass line_table to
332 rich_location ctor.
333 * c-errors.c (pedwarn_c99): Likewise.
334 (pedwarn_c90): Likewise.
335 * c-parser.c (set_c_expr_source_range): New functions.
336 (c_token::get_range): New method.
337 (c_token::get_finish): New method.
338 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
339 based on the range from the start of the LHS to the end of the
340 RHS.
341 (c_parser_conditional_expression): Likewise, based on the range
342 from the start of the cond.value to the end of exp2.value.
343 (c_parser_binary_expression): Call set_c_expr_source_range on
344 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
345 (c_parser_cast_expression): Call set_c_expr_source_range on ret
346 based on the cast_loc through to the end of the expr.
347 (c_parser_unary_expression): Likewise, based on the
348 op_loc through to the end of op.
349 (c_parser_sizeof_expression) Likewise, based on the start of the
350 sizeof token through to either the closing paren or the end of
351 expr.
352 (c_parser_postfix_expression): Likewise, using the token range,
353 or from the open paren through to the close paren for
354 parenthesized expressions.
355 (c_parser_postfix_expression_after_primary): Likewise, for
356 various kinds of expression.
357 * c-tree.h (struct c_expr): Add field "src_range".
358 (c_expr::get_start): New method.
359 (c_expr::get_finish): New method.
360 (set_c_expr_source_range): New decls.
361 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
362 on ret for prefix unary ops.
363 (parser_build_binary_op): Likewise, running from the start of
364 arg1.value through to the end of arg2.value.
365
ec8b536f
MP
3662015-11-13 Marek Polacek <polacek@redhat.com>
367
368 PR c/68320
369 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
370
277fe616
DM
3712015-11-13 David Malcolm <dmalcolm@redhat.com>
372
373 * c-typeck.c: Include spellcheck.h.
374 (lookup_field_fuzzy_find_candidates): New function.
375 (lookup_field_fuzzy): New function.
376 (build_component_ref): If the field was not found, try using
377 lookup_field_fuzzy and potentially offer a suggestion.
378
6e232ba4
JN
3792015-11-12 James Norris <jnorris@codesourcery.com>
380 Joseph Myers <joseph@codesourcery.com>
381
382 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
383 (c_parser_omp_clause_name): Handle 'device_resident' clause.
384 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
385 and PRAGMA_OMP_CLAUSE_LINK.
386 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
387 and PRAGMA_OACC_CLAUSE_LINK.
388 (OACC_DECLARE_CLAUSE_MASK): New definition.
389 (c_parser_oacc_declare): New function.
390
9be4f715
MP
3912015-11-12 Marek Polacek <polacek@redhat.com>
392
393 PR c/67784
394 * c-parser.c (c_parser_for_statement): Reclassify the token in
395 a correct scope.
396
e78bede6
MP
3972015-11-11 Marek Polacek <polacek@redhat.com>
398
399 PR c/68107
400 PR c++/68266
401 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
402 checking the size of an array.
403
69f293c9
AM
4042015-11-11 Andrew MacLeod <amacleod@redhat.com>
405
406 * c-array-notation.c: Remove unused header files.
407 * c-aux-info.c: Likewise.
408 * c-convert.c: Likewise.
409 * c-decl.c: Likewise.
410 * c-errors.c: Likewise.
411 * c-lang.c: Likewise.
412 * c-objc-common.c: Likewise.
413 * c-parser.c: Likewise.
414 * c-typeck.c: Likewise.
415 * gccspec.c: Likewise.
416
3a40d81d
NS
4172015-11-09 Thomas Schwinge <thomas@codesourcery.com>
418 Cesar Philippidis <cesar@codesourcery.com>
419 James Norris <jnorris@codesourcery.com>
420 Julian Brown <julian@codesourcery.com>
421 Nathan Sidwell <nathan@codesourcery.com>
422
423 c/
424 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
425 routine arg.
426 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
427 (c_parser_pragma): Parse 'acc routine'.
428 (OACC_ROUTINE_CLAUSE_MARK): Define.
429 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
430
fc402eec
AA
4312015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
432
433 PR debug/67192
434 * c-typeck.c (c_finish_loop): For unconditional loops, set the
435 location of the backward-goto to the start of the loop body.
436
f6b0b3db
AA
4372015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
438
439 PR debug/67192
440 * c-parser.c (c_parser_while_statement): Finish the loop before
441 parsing ahead for misleading indentation.
442 (c_parser_for_statement): Likewise.
443
ee45a32d
EB
4442015-11-08 Eric Botcazou <ebotcazou@adacore.com>
445
446 * c-decl.c (finish_struct): If the structure has reverse storage
447 order, rewrite the type of array fields with scalar component. Call
448 maybe_apply_pragma_scalar_storage_order on entry.
449 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
450 errors on bit-fields and reverse SSO here and not...
451 (c_mark_addressable): ...here.
452 (output_init_element): Adjust call to initializer_constant_valid_p.
453 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
454
8a645150
DM
4552015-11-06 David Malcolm <dmalcolm@redhat.com>
456
457 * c-decl.c (warn_defaults_to): Update for change in signature
458 of diagnostic_set_info.
459 * c-errors.c (pedwarn_c99): Likewise.
460 (pedwarn_c90): Likewise.
461 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
462 for textinfo::set_location.
463
7a5e4956
CP
4642015-11-05 Cesar Philippidis <cesar@codesourcery.com>
465 Thomas Schwinge <thomas@codesourcery.com>
466 James Norris <jnorris@codesourcery.com>
467
468 * c-parser.c (c_parser_omp_clause_name): Add support for
469 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
470 (c_parser_omp_clause_default): Add is_oacc argument. Handle
471 default(none) in OpenACC.
472 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
473 arguments.
474 (c_parser_oacc_clause_tile): New function.
475 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
476 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
477 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
478 TILE}.
479 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
480 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
481 FIRSTPRIVATE}.
482 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
483 (c_parser_oacc_update): Update the error message for missing clauses.
484 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
485 and OMP_CLAUSE_INDEPENDENT.
486
bfcfbfa0
MP
4872015-11-05 Marek Polacek <polacek@redhat.com>
488
489 PR c/68090
490 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
491 deal with pre-evaluation on invalid types.
492
e01d41e5
JJ
4932015-11-05 Jakub Jelinek <jakub@redhat.com>
494 Ilya Verbin <ilya.verbin@intel.com>
495
496 * c-parser.c: Include context.h and gimple-expr.h.
497 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
498 monotonic together with nonmonotonic.
499 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
500 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
501 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
502 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
503 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
504 expressions on combined target teams before the target.
505 (c_parser_omp_declare_target): If decl has "omp declare target" or
506 "omp declare target link" attribute, and cgraph or varpool node already
507 exists, then set corresponding flags. Call c_finish_omp_clauses
508 in the parenthesized extended-list syntax case.
509 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
510 declare target.
511 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
512 on OMP_CLAUSE_REDUCTION array sections.
513 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
514 into the constant offset, or for variable low-bound using
515 POINTER_PLUS_EXPR. For structure element based array sections use
516 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
517 (c_finish_omp_clauses): Drop generic_field_head, structure
518 elements are now always mapped even as array section bases,
519 diagnose same var in data sharing and mapping clauses. Diagnose if
520 linear step on declare simd is neither a constant nor a uniform
521 parameter. Look through POINTER_PLUS_EXPR for array section
522 reductions. Diagnose the same var or function appearing multiple
523 times on the same directive. Fix up wording for the to clause if t
524 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
525 modifier on kinds other than dynamic or guided or nonmonotonic
526 modifier together with ordered clause.
527
4bf9e5a8
TS
5282015-11-03 Thomas Schwinge <thomas@codesourcery.com>
529 Chung-Lin Tang <cltang@codesourcery.com>
530
531 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
532
2adfab87
AM
5332015-10-29 Andrew MacLeod <amacleod@redhat.com>
534
535 * c-array-notation.c: Reorder #include's and remove duplicates.
536 * c-aux-info.c: Likewise.
537 * c-convert.c: Likewise.
538 * c-decl.c: Likewise.
539 * c-errors.c: Likewise.
540 * c-lang.c: Likewise.
541 * c-objc-common.c: Likewise.
542 * c-parser.c: Likewise.
543 * c-typeck.c: Likewise.
544
e922069e
JW
5452015-10-26 Jim Wilson <jim.wilson@linaro.org>
546
547 PR debug/66068
548 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
549 after calling build_qualified_type.
550
765dd391
CP
5512015-10-27 Cesar Philippidis <cesar@codesourcery.com>
552 Thomas Schwinge <thomas@codesourcery.com>
553 James Norris <jnorris@codesourcery.com>
554 Joseph Myers <joseph@codesourcery.com>
555 Julian Brown <julian@codesourcery.com>
556 Bernd Schmidt <bschmidt@redhat.com>
557
558 * c-parser.c (c_parser_oacc_shape_clause): New.
559 (c_parser_oacc_simple_clause): New.
560 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
561 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
562
88bae6f4
TS
5632015-10-27 Thomas Schwinge <thomas@codesourcery.com>
564 James Norris <jnorris@codesourcery.com>
565 Cesar Philippidis <cesar@codesourcery.com>
566
567 PR c/64765
568 PR c/64880
569 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
570 parameters, and handle these. Adjust all users.
571 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
572 into...
573 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
574 all users.
575 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
576 declare functions.
577 (c_finish_omp_construct): Declare function.
578 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
579 Merge functions into...
580 (c_finish_omp_construct): ... this new function.
581
a8fc2579
RB
5822015-10-22 Richard Biener <rguenther@suse.de>
583
584 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
585 before folding a MINUS_EXPR.
586
e9122ef6
MP
5872015-10-21 Marek Polacek <polacek@redhat.com>
588
589 PR c/68024
590 * c-decl.c (start_function): Warn about vararg functions without
591 a prototype.
592
9f47c7e5
IE
5932015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
594
595 * c-typeck.c (build_conditional_expr): Use boolean vector
596 type for vector comparison.
597 (build_vec_cmp): New.
598 (build_binary_op): Use build_vec_cmp for comparison.
599
fa60eeb9
MP
6002015-10-20 Marek Polacek <polacek@redhat.com>
601
602 * c-parser.c (is_cilkplus_vector_p): Don't define here.
603
2c7020eb
MP
6042015-10-20 Marek Polacek <polacek@redhat.com>
605
606 PR c/67964
607 * c-parser.c (c_parser_attributes): Break out of the loop if the
608 token after an attribute isn't a comma.
609
d9a6bd32
JJ
6102015-10-13 Jakub Jelinek <jakub@redhat.com>
611 Aldy Hernandez <aldyh@redhat.com>
612
613 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
614 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
615 (c_parser_omp_variable_list): Handle structure elements for
616 map, to and from clauses. Handle array sections in reduction
617 clause. Formatting fixes.
618 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
619 if clause modifiers.
620 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
621 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
622 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
623 c_parser_omp_clause_is_device_ptr): New functions.
624 (c_parser_omp_clause_ordered): Parse optional parameter.
625 (c_parser_omp_clause_reduction): Handle array reductions.
626 (c_parser_omp_clause_schedule): Parse optional simd modifier.
627 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
628 functions.
629 (c_parser_omp_clause_linear): Parse linear clause modifiers.
630 (c_parser_omp_clause_depend_sink): New function.
631 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
632 (c_parser_omp_clause_map): Parse release/delete map kinds and
633 optional always modifier.
634 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
635 and c_finish_omp_clauses callers.
636 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
637 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
638 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
639 (OMP_CRITICAL_CLAUSE_MASK): Define.
640 (c_parser_omp_critical): Parse critical clauses.
641 (c_parser_omp_for_loop): Handle doacross loops, adjust
642 c_finish_omp_for and c_finish_omp_clauses callers.
643 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
644 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
645 (OMP_FOR_CLAUSE_MASK): Add linear clause.
646 (c_parser_omp_for): Disallow ordered clause when combined with
647 distribute. Disallow linear clause when combined with distribute
648 and not combined with simd.
649 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
650 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
651 parse clauses and if depend clause is found, don't parse a body.
652 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
653 Allow target parallel without for after it.
654 (OMP_TASK_CLAUSE_MASK): Add priority clause.
655 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
656 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
657 invalid kinds.
658 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
659 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
660 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
661 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
662 functions.
663 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
664 defaultmap and is_device_ptr clauses.
665 (c_parser_omp_target): Parse target parallel and target simd. Set
666 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
667 and target exit data. Diagnose invalid map kinds.
668 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
669 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
670 construct.
671 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
672 &omp_priv.
673 (OMP_TASKLOOP_CLAUSE_MASK): Define.
674 (c_parser_omp_taskloop): New function.
675 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
676 handle PRAGMA_OMP_TASKLOOP.
677 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
678 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
679 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
680 Add IS_OMP argument, handle structure element bases, diagnose
681 bitfields, pass IS_OMP recursively, diagnose known zero length
682 array sections in depend clauses, handle array sections in reduction
683 clause, diagnose negative length even for pointers.
684 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
685 types, pass IS_OMP down to handle_omp_array_sections_1, handle
686 array sections in reduction clause, set
687 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
688 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
689 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
690 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
691
21ba0cea
MP
6922015-10-06 Marek Polacek <polacek@redhat.com>
693
694 * c-parser.c (c_parser_statement_after_labels): Use
695 protected_set_expr_location.
696 (c_parser_omp_clause_num_gangs): Likewise.
697 (c_parser_omp_clause_num_threads): Likewise.
698 (c_parser_omp_clause_num_workers): Likewise.
699 (c_parser_omp_clause_vector_length): Likewise.
700 (c_parser_omp_clause_num_teams): Likewise.
701 (c_parser_omp_clause_thread_limit): Likewise.
702 * c-typeck.c (build_c_cast): Likewise.
703 (c_cast_expr): Likewise.
704
624d31fe
RS
7052015-10-05 Richard Sandiford <richard.sandiford@arm.com>
706
707 * c-typeck.c (c_tree_equal): Use real_equal instead of
708 REAL_VALUES_EQUAL.
709
b8fd7909
JM
7102015-10-04 Jason Merrill <jason@redhat.com>
711
712 * c-parser.c (c_lex_one_token): Handle @synchronized.
713 * c-decl.c (match_builtin_function_types): A declaration of a built-in
714 can change whether the function is transaction_safe.
715
1c7485af
MP
7162015-10-02 Marek Polacek <polacek@redhat.com>
717
718 PR c/67730
719 * c-typeck.c (convert_for_assignment): Use the expansion point
720 location throughout.
721
3e3b8d63
MP
7222015-10-02 Marek Polacek <polacek@redhat.com>
723
724 PR c/64249
725 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
726 and pass it down to c_parser_if_statement.
727 (c_parser_else_body): Add CHAIN parameter and pass it down to
728 c_parser_statement_after_labels.
729 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
730 duplicated if-else-if conditions.
731
aabef2de
MP
7322015-10-01 Marek Polacek <polacek@redhat.com>
733
734 * c-typeck.c (convert_for_assignment): Improve commentary.
735
de8ddd5f
MP
7362015-09-30 Marek Polacek <polacek@redhat.com>
737
738 PR c/67730
739 * c-typeck.c (c_finish_return): Use the expansion point location for
740 certain "return with value" warnings.
741
c4914de6
MLI
7422015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
743
744 * c-parser.c (pragma_lex): Add loc argument.
745
0e36f5c7
MP
7462015-09-15 Marek Polacek <polacek@redhat.com>
747
748 PR c/67580
749 * c-decl.c (tag_exists_p): New function.
750 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
751 struct/union/enum keywords are missing.
752 * c-tree.h (tag_exists_p): Declare.
753
2f3bb934
MP
7542015-09-15 Marek Polacek <polacek@redhat.com>
755
756 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
757 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
758 Return NULL_TREE instead of 0.
759 (lookup_name): Return NULL_TREE instead of 0.
760 (lookup_name_in_scope): Likewise.
761 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
762 (parser_xref_tag): Use false instead of 0.
763 (start_struct): Use true instead of 1.
764 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
765
aa256c4a
MP
7662015-09-14 Marek Polacek <polacek@redhat.com>
767
768 * c-typeck.c (set_nonincremental_init_from_string): Use
769 HOST_WIDE_INT_M1U when shifting a negative value.
770
dbb68221
MW
7712015-09-09 Mark Wielaard <mjw@redhat.com>
772
773 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
774 parm against NULL.
775
a8a098ac
JJ
7762015-09-10 Jakub Jelinek <jakub@redhat.com>
777
778 PR c/67502
779 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
780 into OMP_FOR_PRE_BODY rather than before the loop.
781
f4b189d5
JJ
7822015-09-09 Jakub Jelinek <jakub@redhat.com>
783
0bb99c11
JJ
784 PR c/67501
785 * c-parser.c (c_parser_oacc_all_clauses,
786 c_parser_omp_all_clauses): Remove invalid clause from
787 list of clauses even if parser->error is set.
788
fce5e5e3
JJ
789 PR c/67500
790 * c-parser.c (c_parser_omp_clause_aligned,
791 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
792 test for errors.
793 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
794 error_mark_node.
795
f4b189d5
JJ
796 PR c/67495
797 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
798 instead of c_parser_unary_expression. If the result is !lvalue_p,
799 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
800
b2aaf235
MP
8012015-09-04 Marek Polacek <polacek@redhat.com>
802
803 PR sanitizer/67279
804 * c-typeck.c (build_binary_op): Don't instrument static initializers.
805
1807ffc1
MS
8062015-09-03 Martin Sebor <msebor@redhat.com>
807
808 PR c/66516
8b652e65
JJ
809 * c-typeck.c (convert_arguments, parser_build_unary_op,
810 build_conditional_expr, c_cast_expr, convert_for_assignment,
811 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
812 reject_gcc_builtin.
813 (c_decl_implicit): Define.
814
d04ff417
MP
8152015-09-02 Marek Polacek <polacek@redhat.com>
816
817 PR c/67432
818 * c-parser.c (c_parser_enum_specifier): Give a better error for
819 an empty enum.
820
a79683d5
TS
8212015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
822
823 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
824
191a6b94
MP
8252015-08-12 Marek Polacek <polacek@redhat.com>
826
827 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
828 LOC to it.
829
420a9d9b
MP
8302015-08-03 Marek Polacek <polacek@redhat.com>
831
832 PR c/67088
833 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
834 Use it.
835 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
836
992118a1
PP
8372015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
838
839 * c-parser.c (c_parser_if_body): Take token_indent_info
840 argument. Call warn_for_misleading_indentation even when the
841 body is a semicolon. Extract token_indent_infos corresponding
842 to the guard, body and next tokens. Adjust call to
843 warn_for_misleading_indentation accordingly.
844 (c_parser_else_body): Likewise.
845 (c_parser_if_statement): Likewise.
846 (c_parser_while_statement): Likewise.
847 (c_parser_for_statement): Likewise.
848
46308474
LFSM
8492015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
850 Manuel López-Ibáñez <manu@gcc.gnu.org>
851
852 * c-decl.c (get_parm_info): Remove static var. Update warning
853 message.
854
05b28fd6
MP
8552015-07-27 Marek Polacek <polacek@redhat.com>
856
857 PR c++/66555
858 PR c/54979
859 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
860
451b5e48
MP
8612015-07-20 Marek Polacek <polacek@redhat.com>
862
863 PR c++/55095
864 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
865 (build_binary_op): Warn about left shift overflows.
866
1916bcb5
AM
8672015-07-09 Andrew MacLeod <amacleod@redhat.com>
868
869 * c-array-notation.c: Adjust includes for flags.h changes.
870 * c-objc-common.c: Likewise.
871
c7131fb2
AM
8722015-07-07 Andrew MacLeod <amacleod@redhat.com>
873
874 * c-array-notation.c: Adjust includes.
875 * c-aux-info.c: Likewise.
876 * c-convert.c: Likewise.
877 * c-decl.c: Likewise.
878 * c-errors.c: Likewise.
879 * c-lang.c: Likewise.
880 * c-objc-common.c: Likewise.
881 * c-parser.c: Likewise.
882 * c-typeck.c: Likewise.
883
da2e71c9
MLI
8842015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
885
886 PR fortran/66605
887 * c-decl.c (finish_function): Call do_warn_unused_parameter.
888
b155cfd9
MP
8892015-06-29 Marek Polacek <polacek@redhat.com>
890
891 PR c/66322
892 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
893 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
894 about -Wswitch-bool here.
895 (do_case): Update c_add_case_label call.
896 (c_finish_case): Update c_do_switch_warnings call.
897
31521951
MP
8982015-06-27 Marek Polacek <polacek@redhat.com>
899
900 * c-typeck.c: Use VECTOR_TYPE_P throughout.
901
22d03525
MP
9022015-06-26 Marek Polacek <polacek@redhat.com>
903
904 * c-array-notation.c (fix_builtin_array_notation_fn): Use
905 INDIRECT_REF_P.
906 * c-typeck.c (array_to_pointer_conversion): Likewise.
907 (build_unary_op): Likewise.
908 (c_finish_return): Likewise.
909
f0889939
AM
9102015-06-25 Andrew MacLeod <amacleod@redhat.com>
911
912 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
913 * c-parser.c: Likewise.
914
8d67ee55
RS
9152015-06-25 Richard Sandiford <richard.sandiford@arm.com>
916
917 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
918 instead of pointer_hash.
919 (detect_field_duplicates): Likewise.
920
0ae9bd27
MP
9212015-06-25 Marek Polacek <polacek@redhat.com>
922
923 * c-array-notation.c: Use VAR_P throughout.
924 * c-decl.c: Likewise.
925 * c-objc-common.c: Likewise.
926 * c-parser.c: Likewise.
927 * c-typeck.c: Likewise.
928
62f9079a
MP
9292015-06-25 Marek Polacek <polacek@redhat.com>
930
931 * c-decl.c: Use is_global_var throughout.
932 * c-parser.c: Likewise.
933 * c-typeck.c: Likewise.
934
abb226c9
AM
9352015-06-17 Andrew MacLeod <amacleod@redhat.com>
936
937 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
938 * c-aux-info.c: Likewise.
939 * c-convert.c: Likewise.
940 * c-decl.c: Likewise.
941 * c-errors.c: Likewise.
942 * c-lang.c: Likewise.
943 * c-objc-common.c: Likewise.
944 * c-parser.c: Likewise.
945 * c-typeck.c: Likewise.
946
8cbababc
JH
9472015-06-11 Jan Hubicka <hubicka@ucw.cz>
948
949 PR middle-end/66325
950 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
951 variants.
952
a0349665
PMR
9532015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
954
955 * c-decl.c (pop_scope): Register the main translation unit
956 through the new debug hook.
957
13fdf2e2
AM
9582015-06-08 Andrew MacLeod <amacleod@redhat.com>
959
960 * c-array-notation.c : Adjust include files.
961 * c-aux-info.c : Likewise.
962 * c-convert.c : Likewise.
963 * c-decl.c : Likewise.
964 * c-errors.c : Likewise.
965 * c-lang.c : Likewise.
966 * c-lang.h : Likewise.
967 * c-objc-common.c : Likewise.
968 * c-parser.c : Likewise.
969 * c-typeck.c : Likewise.
970
d7438551
AH
9712015-06-05 Aldy Hernandez <aldyh@redhat.com>
972
973 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
974 immediately clobber it.
975 (c_write_global_declarations_1): Remove call to
976 check_global_declaration_1.
977 (c_write_global_declarations_2): Remove.
978 (c_write_final_cleanups): Rename from c_write_global_declarations.
979 Remove call to finalize_compilation_unit.
980 Remove calls to debugging hooks.
981 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
982 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
983 * c-tree.h: Remove c_write_global_declarations.
984
ecb9f223
AM
9852015-06-04 Andrew MacLeod <amacleod@redhat.com>
986
987 * c-array-notation.c: Adjust includes for restructured coretypes.h.
988 * c-aux-info.c: Likewise.
989 * c-convert.c: Likewise.
990 * c-decl.c: Likewise.
991 * c-errors.c: Likewise.
992 * c-lang.c: Likewise.
993 * c-objc-common.c: Likewise.
994 * c-parser.c: Likewise.
995 * c-typeck.c: Likewise.
996
9482b620
MP
9972015-06-04 Marek Polacek <polacek@redhat.com>
998
999 PR c/66341
1000 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1001 it is a lvalue.
1002
bc51ace3
PK
10032015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1004
1005 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1006 Warn for empty struct.
1007 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1008
ea5b45b6
AT
10092015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1010
1011 * c-decl.c (start_function): Call plugin before parsing.
1012 (finish_function): Call plugin after parsing.
1013
c2d47482
PK
10142015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1015
1016 PR c/49551
1017 * c-decl.c (merge_decls): Merge DECL_COMMON.
1018
a95492ab
JW
10192015-05-22 Jim Wilson <jim.wilson@linaro.org>
1020
1021 * Make-lang.in (check_gcc_pallelize): Define.
1022
fd5c817a
MP
10232015-05-22 Marek Polacek <polacek@redhat.com>
1024
1025 PR c/47043
1026 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1027 attributes.
1028
c7b70a3c
MP
10292015-05-21 Marek Polacek <polacek@redhat.com>
1030
1031 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1032 DECL_BUILT_IN.
1033
21b634ae
MP
10342015-05-20 Marek Polacek <polacek@redhat.com>
1035
1036 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1037 * c-typeck.c: Likewise.
1038
296a8c2f
MP
10392015-05-19 Marek Polacek <polacek@redhat.com>
1040
1041 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1042
41b37d5e
JJ
10432015-05-19 Jakub Jelinek <jakub@redhat.com>
1044
1045 PR middle-end/66199
1046 * c-parser.c (c_parser_omp_for_loop): Don't add
1047 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1048 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1049 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1050 constructs.
1051
fab27f52
MM
10522015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1053
1054 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 1055 swaps.
fab27f52 1056
40de31cf
MLI
10572015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1058
1059 PR fortran/44054
1060 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1061 accessor function.
1062
3aa3c9fc
MP
10632015-05-14 Marek Polacek <polacek@redhat.com>
1064
1065 PR c/66066
1066 PR c/66127
1067 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1068 rather than with 0.
1069
c3388e62
DM
10702015-05-12 David Malcolm <dmalcolm@redhat.com>
1071
1072 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1073 to add a call to warn_for_misleading_indentation.
1074 (c_parser_else_body): Likewise, adding param "else_loc".
1075 (c_parser_if_statement): Check for misleading indentation.
1076 (c_parser_while_statement): Likewise.
1077 (c_parser_for_statement): Likewise.
1078
755e528f
MP
10792015-05-08 Marek Polacek <polacek@redhat.com>
1080
1081 PR c/64918
1082 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1083 (output_init_element): Likewise.
1084
0173bd2a
MP
10852015-05-07 Marek Polacek <polacek@redhat.com>
1086
1087 PR c/65179
1088 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1089 value.
1090
9babc352
MP
10912015-04-30 Marek Polacek <polacek@redhat.com>
1092
1093 * c-typeck.c (set_init_label): Call error_at instead of error and
1094 pass LOC to it.
1095
ac9f18db
MP
1096 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1097 the type of a decl.
1098
ec3fba51
MP
1099 * c-typeck.c (c_build_va_arg): Clarify the error message.
1100
b811915d
TS
11012015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1102
1103 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1104 OMP_STANDALONE_CLAUSES.
1105
f3075008
MP
11062015-04-28 Marek Polacek <polacek@redhat.com>
1107
1108 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1109
4e81b788
MP
11102015-04-28 Marek Polacek <polacek@redhat.com>
1111
1112 PR c/65901
1113 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1114
6c1db78e
MP
11152015-04-25 Marek Polacek <polacek@redhat.com>
1116
1117 PR c/52085
1118 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1119 attribute.
1120
5c4abbb8
MP
11212015-04-23 Marek Polacek <polacek@redhat.com>
1122
1123 PR c/65345
1124 * c-decl.c (set_labels_context_r): New function.
1125 (store_parm_decls): Call it via walk_tree_without_duplicates.
1126 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1127 instead of create_tmp_var. Build TARGET_EXPR instead of
1128 COMPOUND_EXPR.
1129 (build_atomic_assign): Use create_tmp_var_raw instead of
1130 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1131
06aca1d5
IV
11322015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1133
1134 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1135 (c_parser_omp_target_update): Add missed %> to error_at ().
1136
8fba1830
BRF
11372015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1138
1139 PR target/55143
1140 * c-decl.c (c_default_pointer_mode): Remove definition.
1141 * c-tree.h (c_default_pointer_mode): Remove declaration.
1142
62021f64
TB
11432015-03-27 Tobias Burnus <burnus@net-b.de>
1144
1145 PR c/65586
1146 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1147 error out.
1148 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1149 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1150 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1151
9b65e171
JJ
11522015-03-19 Jakub Jelinek <jakub@redhat.com>
1153
1154 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1155 attribute for DECL_EXTERNAL VAR_DECLs.
1156
17958621
JJ
11572015-03-11 Jakub Jelinek <jakub@redhat.com>
1158
1159 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1160 argument.
1161
7ccb1a11
JJ
11622015-03-10 Jakub Jelinek <jakub@redhat.com>
1163
1164 PR c/65120
1165 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1166 before preparing arguments to warn_logical_not_parentheses.
1167
01177669
JJ
11682015-03-09 Jakub Jelinek <jakub@redhat.com>
1169
1170 PR c/65120
1171 * c-typeck.c (parser_build_binary_op): Don't warn for
1172 !!x == y or !b == y where b is _Bool.
1173
802ac282
MP
11742015-03-09 Marek Polacek <polacek@redhat.com>
1175
1176 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1177 * c-decl.c (grokdeclarator): Likewise.
1178 * c-typeck.c (build_binary_op): Likewise.
1179
e5165b60
MP
11802015-02-27 Marek Polacek <polacek@redhat.com>
1181
1182 PR c/65228
1183 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1184
065d214c
MP
11852015-02-14 Marek Polacek <polacek@redhat.com>
1186
1187 PR c/64768
1188 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1189 declared through a typedef name.
1190
e5d9235b
MP
11912015-02-13 Marek Polacek <polacek@redhat.com>
1192
1193 PR c/65050
1194 * c-decl.c (grokdeclarator): Print also the type when giving
1195 the error message about array's incomplete element type.
1196
fa01ffcc
JJ
11972015-02-11 Jakub Jelinek <jakub@redhat.com>
1198
1199 PR c/64824
1200 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1201 check in the POP macro.
1202
c3e38a03
MP
12032015-02-09 Marek Polacek <polacek@redhat.com>
1204
1205 PR c/64856
1206 * c-typeck.c (process_init_element): Don't always wrap
1207 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1208 initializing a range of elements.
1209
4886ec8e
JJ
12102015-02-04 Jakub Jelinek <jakub@redhat.com>
1211
1212 PR c/64824
1213 PR c/64868
1214 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1215
c3e38a03 12162015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
1217
1218 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1219 processing enum declaration.
1220
7b33f0c8
MP
12212015-01-29 Marek Polacek <polacek@redhat.com>
1222
1223 PR c/64709
1224 * c-typeck.c (pop_init_level): If constructor_elements has
1225 exactly one element with integer_zerop value, set constructor_zeroinit
1226 to 1. Remove braces around warning_init call.
1227
dea63e49
JJ
12282015-01-27 Jakub Jelinek <jakub@redhat.com>
1229
1230 PR c/64766
1231 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1232 of FUNCTION_DECLs with error_mark_node.
1233
d38f7dce
JJ
12342015-01-26 Jakub Jelinek <jakub@redhat.com>
1235
1236 PR c/64778
1237 * c-typeck.c (convert_arguments): Return -1 if there are
1238 error_args, even if we've diagnosed too many arguments.
1239
cbf5d0e7
RB
12402015-01-21 Richard Biener <rguenther@suse.de>
1241
1242 PR middle-end/64313
1243 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1244 for builtins the user declared correctly.
1245
41dbbb37
TS
12462015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1247 Bernd Schmidt <bernds@codesourcery.com>
1248 Cesar Philippidis <cesar@codesourcery.com>
1249 James Norris <jnorris@codesourcery.com>
1250 Jakub Jelinek <jakub@redhat.com>
1251 Ilmir Usmanov <i.usmanov@samsung.com>
1252
1253 * c-parser.c: Include "gomp-constants.h".
1254 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1255 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1256 Use OMP_CLAUSE_SET_MAP_KIND.
1257 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1258 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1259 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1260 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1261 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1262 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1263 "copyout", "create", "delete", "deviceptr", "gang", "host",
1264 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1265 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1266 "present_or_create", "pcreate", "seq", "self", "vector",
1267 "vector_length", "wait", "worker".
1268 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1269 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1270 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1271 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1272 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1273 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1274 (c_parser_oacc_data_clause_deviceptr)
1275 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1276 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1277 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1278 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1279 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1280 (c_parser_oacc_parallel, c_parser_oacc_update)
1281 (c_parser_oacc_wait): New functions.
1282 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1283 (c_finish_oacc_data): New prototypes.
1284 * c-typeck.c: Include "gomp-constants.h".
1285 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1286 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1287 OMP_CLAUSE_SET_MAP_KIND.
1288 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1289 (c_finish_oacc_data): New functions.
1290 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1291 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1292 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1293 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1294 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1295 GOMP_MAP_FORCE_DEVICEPTR.
1296
adfac8df
JJ
12972015-01-09 Michael Collison <michael.collison@linaro.org>
1298
1299 * c-array-notation.c: Include hash-set.h, machmode.h,
1300 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1301 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1302 * c-aux-info.c: Ditto.
1303 * c-convert.c: Ditto.
1304 * c-decl.c: Ditto.
1305 * c-errors.c: Ditto.
1306 * c-lang.c: Dittoxs.
1307 * c-objc-common.c: Ditto.
1308 * c-parser.c: Ditto.
1309 * c-typeck.c: Include hash-set.h, machmode.h,
1310 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1311 fold-const.h, wide-int.h, inchash.h, real.h and
1312 fixed-value.h due to flattening of tree.h.
1313
2cc901dc
MP
13142015-01-07 Marek Polacek <polacek@redhat.com>
1315
1316 PR c/64417
1317 * c-typeck.c (process_init_element): Disallow initialization of
1318 a flexible array member with a string constant if the structure
1319 is in an array.
1320
5624e564
JJ
13212015-01-05 Jakub Jelinek <jakub@redhat.com>
1322
e5341100
JJ
1323 PR sanitizer/64344
1324 * c-typeck.c (convert_for_assignment, c_finish_return): For
1325 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1326 types also set in_late_binary_op around convert call.
1327 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1328 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1329 result on expr as last argument to ubsan_instrument_float_cast,
1330 if in_late_binary_op, don't use c_save_expr but save_expr.
1331
5624e564
JJ
1332 Update copyright years.
1333
5bd012f8
MP
13342015-01-05 Marek Polacek <polacek@redhat.com>
1335
1336 PR c/64423
1337 * c-typeck.c (build_array_ref): Pass loc down to
1338 warn_array_subscript_with_type_char.
1339
768952be
MU
13402014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1341
1342 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1343 (common-pointer-type): For pointers to arrays take qualifiers from
1344 element type.
1345 (build_conditional_expr): Add warnings for lost qualifiers.
1346 (comp-target-types): Allow pointers to arrays with different qualifiers.
1347 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1348 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1349 to PEDWARN_FOR_QUALIFIERS.
1350
8f94a8c4
JJ
13512014-12-17 Jakub Jelinek <jakub@redhat.com>
1352
1353 PR sanitizer/64289
1354 * c-convert.c: Include ubsan.h.
1355 (convert): For real -> integral casts and
1356 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1357 instead instrument the float cast directly.
1358
b731b390
JJ
13592014-11-29 Jakub Jelinek <jakub@redhat.com>
1360
1361 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1362 c_finish_stmt_expr): Remove NULL last argument from
1363 create_tmp_var_raw and create_tmp_var calls.
1364 * c-array-notation.c (fix_builtin_array_notation_fn,
1365 build_array_notation_expr, fix_conditional_array_notations_1,
1366 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1367
541e35a6
MP
13682014-11-28 Marek Polacek <polacek@redhat.com>
1369
1370 PR c/63862
1371 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1372 convert the right operand to integer type.
1373
b286be94
MP
13742014-11-25 Marek Polacek <polacek@redhat.com>
1375
1376 PR c/63877
1377 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1378 for inline functions.
1379
aa7da51a
JJ
13802014-11-21 Jakub Jelinek <jakub@redhat.com>
1381
1382 PR target/63764
1383 * c-typeck.c (build_array_ref): Adjust
1384 convert_vector_to_pointer_for_subscript caller. If it returns true,
1385 call non_lvalue_loc on the result.
1386
d876207f
RB
13872014-11-11 Richard Biener <rguenther@suse.de>
1388
1389 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1390 to true.
1391
e5e44252
AK
13922014-11-10 Andi Kleen <ak@linux.intel.com>
1393
1394 PR c/60804
1395 * c-parser.c (c_parser_statement_after_labels): Call
1396 check_no_cilk.
1397 (c_parser_if_statement): Dito.
1398 (c_parser_switch_statement): Dito.
1399 (c_parser_while_statement): Dito.
1400 (c_parser_do_statement): Dito.
1401 (c_parser_for_statement): Dito.
1402 * c-typeck.c (c_finish_loop): Dito.
1403
13c21655
PC
14042014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1405
1406 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1407 OPT_Wshift_count_overflow in the warnings.
1408
2d51fcef
MP
14092014-10-30 Marek Polacek <polacek@redhat.com>
1410
1411 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1412 print the stripped version as well, if they're not the same.
1413
ef4bddc2
RS
14142014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1415
1416 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1417 machine_mode.
1418
c582198b
AM
14192014-10-28 Andrew MacLeod <amacleod@redhat.com>
1420
1421 * c-decl.c: Adjust include files.
1422 * c-parser.c: Ditto.
1423
ddc8de03
PM
14242014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1425 Tom Tromey <tromey@redhat.com>
1426
1427 * c-tree.h (enum c_oracle_request): New.
1428 (c_binding_oracle_function): New typedef.
1429 (c_binding_oracle, c_pushtag, c_bind): Declare.
1430 * c-decl.c (c_binding_oracle): New global.
1431 (I_SYMBOL_CHECKED): New macro.
1432 (i_symbol_binding): New function.
1433 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1434 (I_TAG_CHECKED): New macro.
1435 (i_tag_binding): New function.
1436 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1437 (I_LABEL_CHECKED): New macro.
1438 (i_label_binding): New function.
1439 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1440 (c_print_identifier): Save and restore c_binding_oracle.
1441 (c_pushtag, c_bind): New functions.
1442
60393bbc
AM
14432014-10-27 Andrew MacLeod <amacleod@redhat.com>
1444
1445 * c-typeck.c: Adjust include files.
1446
d723bb7c
MLI
14472014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1448
1449 PR c++/53061
1450 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1451 initialization here...
1452 (c_initialize_diagnostics): ... but here. Set defaults after
1453 building pretty-printer.
1454
1bc5a451
MP
14552014-10-23 Marek Polacek <polacek@redhat.com>
1456
1457 PR c/63626
1458 * c-decl.c (pop_scope): Don't print warning in external_scope.
1459
4435bb92
MP
14602014-10-19 Marek Polacek <polacek@redhat.com>
1461
1462 PR c/63567
1463 * c-typeck.c (output_init_element): Allow initializing objects with
1464 static storage duration with compound literals even in C99 and add
1465 pedwarn for it.
1466
7278465e
MP
14672014-10-17 Marek Polacek <polacek@redhat.com>
1468
1469 PR c/63567
1470 * c-typeck.c (digest_init): Allow initializing objects with static
1471 storage duration with compound literals even in C99 and add pedwarn
1472 for it.
1473
d9b7be2e
MP
14742014-10-17 Marek Polacek <polacek@redhat.com>
1475
1476 PR c/63543
1477 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1478 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1479 error multiple times. Print the type.
1480
f406ae1f
MP
14812014-10-17 Marek Polacek <polacek@redhat.com>
1482
1483 PR c/63549
1484 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1485 type.
1486
92574c7c
MP
14872014-10-17 Marek Polacek <polacek@redhat.com>
1488
1489 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1490 (start_function): Use OPT_Wimplicit_int instead of 0.
1491 (store_parm_decls_oldstyle): Likewise.
1492
1bc4a978
MT
14932014-10-17 Alan Modra <amodra@gmail.com>
1494
1495 PR middle-end/61848
1496 * c-decl.c (merge_decls): Don't merge section name or tls model
1497 to newdecl symtab node, instead merge to olddecl. Override
1498 existing olddecl section name. Set tls_model for all thread-local
1499 vars, not just OMP thread-private ones. Remove incorrect comment.
1500
83685514
AM
15012014-10-16 Andrew MacLeod <amacleod@redhat.com>
1502
1503 * c-decl.c: Adjust include files.
1504
78a7c317
DD
15052014-10-14 DJ Delorie <dj@redhat.com>
1506
1507 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1508 (c_token_starts_typename): Check all __intN, not just __int128.
1509 (c_token_starts_declspecs): Likewise.
1510 (c_parser_declspecs): Likewise.
1511 (c_parser_attribute_any_word): Likewise.
1512 (c_parser_objc_selector): Likewise.
1513 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1514 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1515 is specified.
1516 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1517 __int128.
1518 (finish_declspecs): Likewise.
1519
74d98c1e
AB
15202014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1521
1522 * c-parser.c (c_parser_all_labels): New function to replace
1523 the duplicate code.
1524 (c_parser_statement): Call the new function.
1525
84937de2
MP
15262014-10-09 Marek Polacek <polacek@redhat.com>
1527
1528 PR c/63480
1529 * c-typeck.c (pop_init_level): Don't warn about initializing
1530 with { }.
1531
0382aaa0
MP
15322014-10-07 Marek Polacek <polacek@redhat.com>
1533
1534 PR c/59717
1535 * c-decl.c (header_for_builtin_fn): New function.
1536 (implicitly_declare): Suggest which header to include.
1537
7a0ca710
MP
15382014-10-07 Marek Polacek <polacek@redhat.com>
1539
1540 * c-convert.c (convert): Use error_operand_p.
1541 * c-typeck.c (require_complete_type): Likewise.
1542 (really_atomic_lvalue): Likewise.
1543 (digest_init): Likewise.
1544 (handle_omp_array_sections_1): Likewise.
1545
6bc8a126
MP
15462014-10-03 Marek Polacek <polacek@redhat.com>
1547
1548 PR c/63453
1549 * c-decl.c (pop_scope): Don't warn about "inline function declared
1550 but never defined" for functions marked with gnu_inline attribute.
1551
d90c0a59
JJ
15522014-09-25 Jakub Jelinek <jakub@redhat.com>
1553
1554 PR c++/63249
1555 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1556 on low_bound and length.
1557
083e891e
MP
15582014-09-24 Marek Polacek <polacek@redhat.com>
1559
1560 PR c/61405
1561 PR c/53874
1562 * c-parser.c: Don't define CPP_KEYWORD.
1563 (c_parser_switch_statement): Pass original type to c_finish_case.
1564 * c-tree.h (c_finish_case): Update declaration.
1565 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1566 conditionally to c_do_switch_warnings.
1567
8d95fe25
MP
15682014-09-03 Marek Polacek <polacek@redhat.com>
1569
1570 PR c/62024
1571 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1572 conversions.
1573
9a771876
JJ
15742014-09-02 Jakub Jelinek <jakub@redhat.com>
1575 Balaji V. Iyer <balaji.v.iyer@intel.com>
1576 Igor Zamyatin <igor.zamyatin@intel.com>
1577
1578 * c-parser.c (c_parser_cilk_for): New function.
1579 (c_parser_cilk_grainsize): Likewise.
1580 (c_get_temp_regvar): Likewise.
1581 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1582 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1583 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1584 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1585 case.
1586
b7679d96
CG
15872014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1588
1589 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1590 with using HOST_WIDE_INT without truncation to 'int'
1591
59ea0364
MP
15922014-08-22 Marek Polacek <polacek@redhat.com>
1593
1594 PR c++/62199
1595 * c-typeck.c (parser_build_binary_op): Adjust call to
1596 warn_logical_not_parentheses.
1597
671a475e
IZ
15982014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1599
1600 PR other/62008
1601 * c-parser.c (c_parser_array_notation): Check for correct
1602 type of an array added.
1603
04159acf
MP
16042014-08-19 Marek Polacek <polacek@redhat.com>
1605
1606 PR c++/62153
1607 * c-typeck.c (build_binary_op): If either operand of a comparison
1608 is a boolean expression, call maybe_warn_bool_compare.
1609
c77935ee
PP
16102014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1611
1612 PR c/45584
1613 * c-typeck.c (build_c_cast): Do a conversion even when the
1614 TYPE_MAIN_VARIANTs are the same.
1615
35aff4fb
MP
16162014-08-19 Marek Polacek <polacek@redhat.com>
1617
1618 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1619 pedwarn_c99 instead of pedwarn.
1620 (grokfield): Likewise.
1621 (warn_defaults_to): New function.
1622 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1623 Unconditionally call pedwarn_c99 instead of pedwarn.
1624 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1625 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1626 check flag_isoc11 before.
1627 * c-errors.c (pedwarn_c99): Change the return type to bool.
1628 Handle -Wc99-c11-compat.
1629 * c-parser.c (disable_extension_diagnostics): Handle
1630 warn_c99_c11_compat.
1631 (restore_extension_diagnostics): Likewise.
1632 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1633 instead of pedwarn, don't check flag_isoc11 before.
1634 (c_parser_declspecs): Likewise.
1635 (c_parser_alignas_specifier): Likewise.
1636 (c_parser_alignof_expression): Likewise.
1637 (c_parser_generic_selection): Likewise.
1638 * c-tree.h (pedwarn_c99): Update declaration.
1639 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1640 of pedwarn_c99.
1641
177cce46
MP
16422014-08-19 Marek Polacek <polacek@redhat.com>
1643
1644 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1645 to pedwarn_c90.
1646 * c-errors.c: Include "opts.h".
1647 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1648 * c-parser.c (disable_extension_diagnostics): Handle negative value
1649 of warn_c90_c99_compat, too.
1650 (restore_extension_diagnostics): Likewise.
1651 (c_parser_compound_statement_nostart): Pass
1652 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1653
6dc99c33
MP
16542014-08-12 Marek Polacek <polacek@redhat.com>
1655
1656 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1657 Add pedwarn.
1658 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1659 Likewise.
1660 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1661
f3bede71
MP
16622014-08-10 Marek Polacek <polacek@redhat.com>
1663
1664 PR c/51849
1665 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1666 Call pedwarn_c90 instead of pedwarn.
1667 (check_bitfield_type_and_width): Likewise.
1668 (declspecs_add_qual): Likewise.
1669 (declspecs_add_type): Likewise.
1670 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1671 Adjust to only call pedwarn_c90.
1672 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1673 pedwarn_c90 instead of pedwarn.
1674 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1675 * c-parser.c (disable_extension_diagnostics): Handle
1676 warn_c90_c99_compat.
1677 (restore_extension_diagnostics): Likewise.
1678 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1679 pedwarn_c90 instead of pedwarn.
1680 (c_parser_initelt): Likewise.
1681 (c_parser_postfix_expression): Likewise.
1682 (c_parser_postfix_expression_after_paren_type): Likewise.
1683 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1684 * c-tree.h: Fix formatting.
1685 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
1686 pedwarn_c90 instead of pedwarn.
1687
9f25a338
TS
16882014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1689
1690 * c-typeck.c: Remove include of pointer-set.h.
1691
044331a8
MP
16922014-08-07 Marek Polacek <polacek@redhat.com>
1693
1694 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1695
b787e7a2
TS
16962014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1697
1698 * c-typeck.c: Use hash_map instead of pointer_map.
1699
6e2830c3
TS
17002014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1701
1702 * c-decl.c: Use hash_set instead of pointer_set.
1703
a7ee52fb
IZ
17042014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1705
1706 PR middle-end/61455
1707 * c-array-notation.c (expand_array_notations): Handling
1708 of DECL_EXPR added.
1709
b4dfdc11
MG
17102014-07-31 Marc Glisse <marc.glisse@inria.fr>
1711
1712 PR c++/60517
1713 * c-typeck.c (c_finish_return): Return 0 instead of the address of
1714 a local variable.
1715
976d5a22
TT
17162014-07-30 Tom Tromey <tromey@redhat.com>
1717
1718 * c-typeck.c (struct constructor_stack) <designator_depth>: New
1719 field.
1720 (really_start_incremental_init, push_init_level): Initialize
1721 designator_depth.
1722 (pop_init_level): Set global designator_depth.
1723 (process_init_element): Check for designated_init attribute.
1724
30281de2
MP
17252014-07-20 Marek Polacek <polacek@redhat.com>
1726
1727 PR c/61852
1728 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
1729 (implicitly_declare): Pass location to implicit_decl_warning.
1730
b108f48f
JJ
17312014-07-14 Jakub Jelinek <jakub@redhat.com>
1732
1733 PR middle-end/61294
1734 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1735 If non-NULL, call c_parser_check_literal_zero.
1736 (c_parser_check_literal_zero): New function.
1737 (c_parser_postfix_expression_after_primary): Adjust
1738 c_parser_expr_list caller, handle -Wmemset-transposed-args.
1739
773ec47f
MP
17402014-07-06 Marek Polacek <polacek@redhat.com>
1741
1742 PR c/6940
1743 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1744 * c-tree.h (C_ARRAY_PARAMETER): Define.
1745 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1746 function parameter.
1747
22e1cf1c
JH
17482014-07-02 Jan Hubicka <hubicka@ucw.cz>
1749 Chen Gang <gang.chen.5i5j@gmail.com>
1750
1751 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1752 releasing symbol.
1753
52ec0ea3
MP
17542014-07-01 Marek Polacek <polacek@redhat.com>
1755
1756 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1757 instead of 0 to WARN_FOR_ASSIGNMENT.
1758
d5c3d343
MP
17592014-07-01 Marek Polacek <polacek@redhat.com>
1760
1761 PR c/58286
1762 * c-typeck.c (convert_for_assignment): Pass
1763 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1764
6a7253a4
MP
17652014-06-30 Marek Polacek <polacek@redhat.com>
1766
1767 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1768 has no_sanitize_undefined attribute.
1769
5e88a8f4
IZ
17702014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1771
1772 PR middle-end/57541
1773 * c-array-notation.c (fix_builtin_array_notation_fn):
1774 Check for 0 arguments in builtin call. Check that bultin argument is
1775 correct.
1776 * c-parser.c (c_parser_array_notation): Check for incorrect initial
1777 index.
1778
9698b078
SH
17792014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
1780
1781 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
1782 qualifiers in __auto_type for atomic types.
1783 (c_parser_typeof_specifier): Discard all type qualifiers in
1784 __typeof__ for atomic types.
1785
6e07c515
MP
17862014-06-25 Marek Polacek <polacek@redhat.com>
1787
1788 PR c/61162
1789 * c-parser.c (c_parser_statement_after_labels): Pass the location of
1790 the return expression to c_finish_return.
1791
da6f124d
JJ
17922014-06-25 Jakub Jelinek <jakub@redhat.com>
1793
1794 * c-typeck.c (c_finish_omp_clauses): Make sure
1795 OMP_CLAUSE_LINEAR_STEP has correct type.
1796
c203e8a7
TS
17972014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1798
1799 * c-decl.c: Adjust.
1800
56ad0e38
JJ
18012014-06-24 Jakub Jelinek <jakub@redhat.com>
1802
1803 * c-parser.c (c_parser_omp_for_loop): For
1804 #pragma omp parallel for simd move lastprivate clause from parallel
1805 to for rather than simd.
1806
47c2554f
MP
18072014-06-23 Marek Polacek <polacek@redhat.com>
1808
1809 * c-typeck.c (parser_build_binary_op): Don't call
1810 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1811
56363ffd
JH
18122014-06-15 Jan Hubicka <hubicka@ucw.cz>
1813
1814 * c-parser.c (c_parser_omp_threadprivate): Likewise.
1815 * c-decl.c (merge_decls): Likewise.
1816
d7ff7ae5
MP
18172014-06-09 Marek Polacek <polacek@redhat.com>
1818
1819 PR c/36446
1820 * c-typeck.c (error_init): Call inform instead of error_at.
1821 (pedwarn_init): Call inform instead of pedwarn.
1822 (warning_init): Call inform instead of warning_at.
1823
24d047a3
JH
18242014-06-07 Jan Hubicka <hubicka@ucw.cz>
1825
1826 * c-decl.c (merge_decls): Use set_decl_section_name.
1827 (duplicate_decls): Remove node if it exists.
1828
9bac5cbb
G
18292014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1830
1831 PR c/53119
1832 * c-typeck.c (push_init_level, process_init_element,
1833 pop_init_level): Correct check for zero initialization, move
1834 missing brace warning to respect zero initialization.
1835
8ffcdea8
MP
18362014-06-05 Marek Polacek <polacek@redhat.com>
1837
1838 PR c/56724
1839 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1840
742938c9
MP
18412014-06-05 Marek Polacek <polacek@redhat.com>
1842
1843 PR c/49706
1844 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1845 on the left hand side operand of a comparison.
1846
6447c55d
MP
18472014-06-05 Marek Polacek <polacek@redhat.com>
1848
1849 PR c/48062
1850 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1851 Print note only if the warning was printed.
1852
9dc7743c
IZ
18532014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1854
1855 PR c/58942
1856 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1857 with a pointer.
1858
fedfecef
MP
18592014-06-03 Marek Polacek <polacek@redhat.com>
1860
1861 PR c/60439
1862 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1863 c_start_case.
1864 * c-tree.h (c_start_case): Update.
1865 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1866 switch condition has boolean value.
1867
9b2b7279
AM
18682014-06-02 Andrew MacLeod <amacleod@redhat.com>
1869
1870 * c-decl.c: Include builtins.h.
1871 * c-parser.c: Likewise.
1872
5c1bc275
MP
18732014-05-27 Marek Polacek <polacek@redhat.com>
1874
1875 PR c/56724
1876 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1877 error and warning calls to error_at and warning_at. Pass location of
1878 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1879 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1880 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1881
97563bc8
IZ
18822014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1883
1884 PR c/61191
1885 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1886 function parameters.
1887
aede2c10
JH
18882014-05-23 Jan Hubicka <hubicka@ucw.cz>
1889
1890 * c-decl.c (merge_decls): Preserve symtab node pointers.
1891 (duplicate_decls): Free new decl.
1892
edbba2ce
TS
18932014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1894
f3316c6d
TS
1895 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1896 initialization.
1897
edbba2ce
TS
1898 * c-parser.c (c_parser_omp_target): Return bool values.
1899
68c81f24
TS
19002014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1901
1902 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1903 num_teams_loc variable to num_thread_limit_loc.
1904
632f2871
RS
19052014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1906
1907 * c-array-notation.c (expand_array_notations): Use void_node
1908 instead of void_zero_node.
1909
766090c2
TS
19102014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1911
1912 * c-decl.c (finish_struct): Adjust.
1913 (finish_enum): Likewise.
1914 (bind): Adjust.
1915 (record_inline_static): Likewise.
1916 (push_scope): Likewise.
1917 (make_label): Likewise.
1918 (lookup_label_for_goto): Likewise.
1919 (finish_struct): Likewise.
1920 (finish_enum): Likewise.
1921 (store_parm_decls): Likewise.
1922 (c_push_function_context): Likewise.
1923 * c-lang.h: Remove usage of variable_size gty attribute.
1924 * c-parser.c (c_parse_init): Adjust.
1925 (c_parse_file): Likewise.
1926
2b107f6b
MP
19272014-05-13 Marek Polacek <polacek@redhat.com>
1928
1929 PR c/61162
1930 * c-typeck.c (convert_for_assignment): Pass location to
1931 WARN_FOR_ASSIGNMENT instead of input_location.
1932
d033409e
MP
19332014-05-10 Marek Polacek <polacek@redhat.com>
1934
1935 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1936 maybe_warn_string_init.
1937 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1938 maybe_warn_string_init.
1939 * c-tree.h (maybe_warn_string_init): Update declaration.
1940 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1941 Call pedwarn_init with loc instead of with input_location.
1942 (digest_init): Pass init_loc to maybe_warn_string_init.
1943 (pop_init_level): Call pedwarn_init with loc instead of with
1944 input_location.
1945 (set_init_index): Likewise.
1946 (process_init_element): Likewise.
1947
ea58ef42
MP
19482014-05-09 Marek Polacek <polacek@redhat.com>
1949
1950 PR c/61096
1951 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1952 (c_parser_initelt): Pass location to set_init_label. Pass array index
1953 location to set_init_index.
1954 * c-tree.h (push_init_level): Update declaration.
1955 (pop_init_level): Likewise.
1956 (set_init_index): Likewise.
1957 (set_init_label): Likewise.
1958 * c-typeck.c (error_init): Add location parameter. Call error_at
1959 instead of error.
1960 (digest_init): Pass init_loc to error_init.
1961 (really_start_incremental_init):
1962 (push_init_level): Add location parameter. Pass loc to pop_init_level
1963 and error_init.
1964 (pop_init_level): Likewise.
1965 (set_designator): Add location parameter. Pass loc to pop_init_level,
1966 push_init_level, and error_init.
1967 (set_init_index): Add location parameter. Pass loc to error_init and
1968 set_designator.
1969 (set_init_label): Likewise.
1970 (output_init_element): Pass loc to error_init.
1971 (process_init_element): Pass loc to error_init, pop_init_level,
1972 pedwarn_init, and push_init_level.
1973
661a0813
MP
19742014-05-09 Marek Polacek <polacek@redhat.com>
1975
1976 PR c/50459
1977 * c-parser.c (c_parser_attributes): Parse the arguments as an
1978 expression-list if the attribute takes identifier.
1979
2793eeab
MP
19802014-05-08 Marek Polacek <polacek@redhat.com>
1981
1982 PR c/61053
1983 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1984 TYPE_ALIGN_UNIT.
1985
f827930a
MP
19862014-05-08 Marek Polacek <polacek@redhat.com>
1987
1988 PR c/61077
1989 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1990 of main.
1991
1d60af08
KZ
19922014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1993 Mike Stump <mikestump@comcast.net>
1994 Richard Sandiford <rdsandiford@googlemail.com>
1995
1996 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1997 (finish_enum): Use wide-int interfaces.
1998 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1999 * c-typeck.c (build_c_cast): Likewise.
2000 (set_nonincremental_init_from_string): Likewise.
2001 (c_tree_equal): Likewise.
2002
a0e24419
MP
20032014-05-02 Marek Polacek <polacek@redhat.com>
2004
2005 PR c/25801
2006 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2007 Return size_one_node when the type is not complete.
2008 (pointer_diff): Remove comment.
2009 (build_unary_op): Improve error messages.
2010
19fc9faa
MP
20112014-05-02 Marek Polacek <polacek@redhat.com>
2012
2013 * c-typeck.c (c_finish_return): Separate warning_at calls.
2014
63bc4e87
MP
20152014-05-02 Marek Polacek <polacek@redhat.com>
2016
2017 * c-tree.h (error_init): Remove declaration.
2018 (pedwarn_init): Likewise.
2019 * c-typeck.c (error_init): Make static and move above.
2020 (pedwarn_init): Likewise.
2021 (warning_init): Move above.
2022 (maybe_warn_string_init): Likewise.
2023
4bd2511b
JL
20242014-05-01 Jeff Law <law@redhat.com>
2025
2026 Revert:
2027
2028 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2029 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2030 avoid goto.
2031
6a358dcb
MP
20322014-05-02 Marek Polacek <polacek@redhat.com>
2033
2034 PR c/60784
2035 * c-typeck.c (push_init_level): Set constructor_designated to
2036 p->designated for structures.
2037
ae5ebda4
MP
20382014-05-01 Marek Polacek <polacek@redhat.com>
2039
2040 PR c/60915
2041 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2042 function-definition has an attribute after the declarator.
2043
96b40f8d
MP
20442014-05-01 Marek Polacek <polacek@redhat.com>
2045
2046 PR c/60257
2047 * c-typeck.c (warning_init): Add location_t parameter. Call
2048 warning_at instead of warning.
2049 (push_init_level): Pass input_location to warning_init.
2050 (add_pending_init): Add location_t parameter. Pass loc to
2051 warning_init.
2052 (set_nonincremental_init): Pass input_location to add_pending_init.
2053 (set_nonincremental_init_from_string): Likewise.
2054 (output_init_element): Pass loc to warning_init and to
2055 add_pending_init.
2056
32e00768
MP
20572014-05-01 Marek Polacek <polacek@redhat.com>
2058
2059 PR c/43395
2060 * c-typeck.c (c_finish_return): Distinguish between label and variable
2061 when warning about returning local address.
2062
c9379ce2
MP
20632014-05-01 Marek Polacek <polacek@redhat.com>
2064
2065 PR c/29467
2066 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2067 in C89 mode.
2068
d00887e8
MP
20692014-05-01 Marek Polacek <polacek@redhat.com>
2070
2071 PR c/43245
2072 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2073 instead of 0 to WARN_FOR_QUALIFIERS.
2074
5436fa2e
MP
20752014-05-01 Marek Polacek <polacek@redhat.com>
2076
2077 PR c/56989
2078 * c-typeck.c (default_conversion): Use better location for
2079 error call.
2080
f8ed5150
MP
20812014-04-30 Marek Polacek <polacek@redhat.com>
2082
2083 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2084 also when SANITIZE_FLOAT_DIVIDE is on.
2085
8337d1db
MP
20862014-04-30 Marek Polacek <polacek@redhat.com>
2087
2088 PR c/60139
2089 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2090 and pedwarn_init. Use loc insted of input_location.
2091
c4bdc42f
MP
20922014-04-30 Marek Polacek <polacek@redhat.com>
2093
2094 PR c/60351
2095 * c-typeck.c (build_binary_op): Use location when warning about
2096 shift count.
2097
45484dcf
MP
20982014-04-25 Marek Polacek <polacek@redhat.com>
2099
2100 PR c/18079
2101 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2102 always_inline/noinline and hot/cold attributes.
2103
34cf811f
MP
21042014-04-25 Marek Polacek <polacek@redhat.com>
2105
2106 PR c/60114
2107 * c-parser.c (c_parser_initelt): Pass input_location to
2108 process_init_element.
2109 (c_parser_initval): Pass loc to process_init_element.
2110 * c-tree.h (process_init_element): Adjust declaration.
2111 * c-typeck.c (push_init_level): Pass input_location to
2112 process_init_element.
2113 (pop_init_level): Likewise.
2114 (set_designator): Likewise.
2115 (output_init_element): Add location_t parameter. Pass loc to
2116 digest_init.
2117 (output_pending_init_elements): Pass input_location to
2118 output_init_element.
2119 (process_init_element): Add location_t parameter. Pass loc to
2120 output_init_element.
2121
42056eac
JJ
21222014-04-24 Jakub Jelinek <jakub@redhat.com>
2123
2124 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2125 atomic-clause, allow comma in between atomic-clause and
2126 seq_cst.
2127
e162a134
JJ
21282014-04-22 Jakub Jelinek <jakub@redhat.com>
2129
2130 PR c/59073
2131 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2132 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2133
2f6babac
IZ
21342014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2135
2136 PR middle-end/60469
2137 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2138 create_tmp_var instead build_decl for creating temps.
2139 (build_array_notation_expr): Likewise.
2140 (fix_conditional_array_notations_1): Likewise.
2141 (fix_array_notation_expr): Likewise.
2142 (fix_array_notation_call_expr): Likewise.
2143
8edbfaa6
JJ
21442014-03-28 Jakub Jelinek <jakub@redhat.com>
2145
2146 PR c++/60689
2147 * c-tree.h (c_build_function_call_vec): New prototype.
2148 * c-typeck.c (build_function_call_vec): Don't call
2149 resolve_overloaded_builtin here.
2150 (c_build_function_call_vec): New wrapper function around
2151 build_function_call_vec. Call resolve_overloaded_builtin here.
2152 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2153 Call c_build_function_call_vec instead of build_function_call_vec.
2154 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2155 * c-decl.c (finish_decl): Likewise.
2156
7485aeea
MLI
21572014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2158
2159 PR c/55383
2160 * c-typeck.c: Use correct format string in cast-qual warning
2161
b17a8b07
TS
21622014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2163
2164 * c-decl.c (c_decl_attributes): Use
2165 lang_hooks.types.omp_mappable_type.
2166 * c-typeck.c (c_finish_omp_clauses): Likewise.
2167
3af9c5e9
MP
21682014-03-06 Marek Polacek <polacek@redhat.com>
2169
2170 PR c/60197
2171 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2172 of checking tree code.
2173
1c9f5f33
PK
21742014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2175
2176 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2177 (c_parser_parameter_declaration): Likewise.
2178
cc28fc7f
MP
21792014-02-19 Marek Polacek <polacek@redhat.com>
2180
2181 PR c/60195
2182 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2183 Call mark_exp_read on exp.value.
2184 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2185 TREE_ADDRESSABLE on old instead of val.
2186 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2187
b581c05c
PK
21882014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2189
2190 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2191 C_EXPR_APPEND by vec_safe_push.
2192 * c-tree.h (C_EXPR_APPEND): Remove.
2193
81e5eca8
MP
21942014-01-31 Marek Polacek <polacek@redhat.com>
2195
2196 PR c/59963
2197 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2198 build_function_call_vec.
2199 (build_function_call): Likewise.
2200 (build_atomic_assign): Likewise.
2201 (build_function_call_vec): Add arg_loc parameter. Use it.
2202 (convert_arguments): Likewise.
2203 (convert_for_assignment): Rename rhs_loc to expr_loc.
2204 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2205 (c_parser_objc_keywordexpr): Likewise.
2206 (c_parser_postfix_expression_after_primary): Call
2207 build_function_call_vec with expr_loc rather than op_loc.
2208 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2209 build_function_call_vec.
2210 (c_parser_expr_list): Add locations parameter. Fill it with locations
2211 of function arguments.
2212 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2213
68fca595
MP
22142014-01-30 Marek Polacek <polacek@redhat.com>
2215
2216 PR c/59940
2217 * c-typeck.c (build_function_call_vec): Use loc parameter.
2218 (convert_arguments): Add location parameter. Use it.
2219 (ep_convert_and_check): Likewise.
2220 (build_atomic_assign): Adjust convert_for_assignment call.
2221 (build_modify_expr): Likewise.
2222 (digest_init): Likewise.
2223 (c_finish_return): Likewise.
2224 (build_conditional_expr): Adjust ep_convert_and_check calls.
2225 (convert_for_assignment): Add rhs_loc parameter. Use it.
2226 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2227 calls.
2228
fa337f3a
RB
22292014-01-30 Richard Biener <rguenther@suse.de>
2230
2231 PR c/59905
2232 * c-typeck.c (build_function_call_vec): Do not replace calls
2233 to a function via an incompatible type with a runtime abort.
2234
b72271b9
BI
22352014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2236
2237 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2238 flag_enable_cilkplus with flag_cilkplus.
2239 (c_parser_direct_declarator_inner): Likewise.
2240 (c_parser_attribute_any_word): Likewise.
2241 (c_parser_attributes): Likewise.
2242 (c_parser_compound_statement): Likewise.
2243 (c_parser_statement_after_labels): Likewise.
2244 (c_parser_if_statement): Likewise.
2245 (c_parser_switch_statement): Likewise.
2246 (c_parser_do_statement): Likewise.
2247 (c_parser_for_statement): Likewise.
2248 (c_parser_unary_expression): Likewise.
2249 (c_parser_postfix_expression): Likewise.
2250 (c_parser_postfix_expression_after_primary): Likewise.
2251 (c_parser_postfix_expression_after_primary): Likewise.
2252 (c_parser_omp_clause_name): Likewise.
2253 (c_finish_omp_declare_simd): Likewise.
2254 (c_parser_cilk_verify_simd): Likewise.
2255 * c-typeck.c (build_array_ref): Likewise.
2256 (build_function_call_vec): Likewise.
2257 (convert_arguments): Likewise.
2258 (build_compound_expr): Likewise.
2259 (c_finish_return): Likewise.
2260 (c_finish_if_stmt): Likewise.
2261 (c_finish_loop): Likewise.
2262 (build_binary_op): Likewise.
2263
393e8e8b
MP
22642014-01-23 Marek Polacek <polacek@redhat.com>
2265
2266 PR c/59846
2267 * c-typeck.c (parser_build_binary_op): Use location instead of
2268 input_location.
2269 (build_binary_op): Pass location to shorten_compare.
2270
f04dda30
MP
22712014-01-23 Marek Polacek <polacek@redhat.com>
2272
2273 PR c/58346
2274 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2275 an empty aggregate.
2276
789eadcd
MP
22772014-01-23 Marek Polacek <polacek@redhat.com>
2278
2279 PR c/59871
2280 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2281 of a comma expression.
2282 (emit_side_effect_warnings): Likewise.
2283
40f14e9f
BI
22842014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2285
2286 PR c/59825
2287 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2288 function to use walk_tree and moved a lot of its functionality to
2289 expand_array_notations.
2290 (expand_array_notations): New function.
2291
74558dd9
BI
22922014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2293
2294 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2295 attribute an attribute without value.
2296
652fea39
JJ
22972014-01-23 Jakub Jelinek <jakub@redhat.com>
2298
2299 PR middle-end/58809
2300 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2301 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2302
f34f1c87
MP
23032014-01-22 Marek Polacek <polacek@redhat.com>
2304
2305 PR c/59891
2306 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2307 of remove_c_maybe_const_expr on op1 and op2.
2308
241f845a
JJ
23092014-01-15 Jakub Jelinek <jakub@redhat.com>
2310
2311 PR c/58943
2312 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2313 effects, preevaluate rhs using SAVE_EXPR first.
2314
9a74f20c
BI
23152014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2316
2317 PR c++/59631
2318 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2319 statements with if-elseif statements.
2320
96066ce1
MP
23212014-01-06 Marek Polacek <polacek@redhat.com>
2322
2323 PR c/57773
2324 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2325 defined bit-field types only in ISO C.
2326
23a5b65a
RS
23272014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2328
2329 Update copyright years
2330
f9030485
RS
23312014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2332
2333 * c-array-notation.c: Use the standard form for the copyright notice.
2334
41958c28
BI
23352013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2336
2337 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2338 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2339 field in parser is not empty. If not-empty, call the function
2340 c_parser_finish_omp_declare_simd.
2341 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2342 between SIMD-enabled functions and #pragma simd. Added new parameter.
2343 (c_parser_cilk_all_clauses): Modified the usage of the function
2344 c_parser_cilk_clause_vectorlength as mentioned above.
2345 (c_parser_cilk_simd_fn_vector_attrs): New function.
2346 (c_finish_cilk_simd_fn_tokens): Likewise.
2347 (is_cilkplus_vector_p): Likewise.
2348 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2349 "nomask," and "mask" strings in clause name.
2350 (c_parser_omp_all_clauses): Added 3 new case statements:
2351 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2352 PRAGMA_CILK_CLAUSE_NOMASK.
2353 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2354 check for vector attribute and if so call the function
2355 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2356 called the function c_finish_cilk_simd_fn_tokens.
2357 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2358 parser field is non-empty. If so, parse them as you would parse
2359 the omp declare simd pragma.
2360 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2361 Added a check when step is a parameter and flag it as error.
2362 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2363 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2364 pragma_omp_clause.
2365
cef0fd0e
TS
23662013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2367
2368 * c-parser.c (c_parser_omp_parallel): Fix description.
2369
12893402
BI
23702013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2371
2372 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2373 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2374 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2375 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2376
296674db
JM
23772013-12-04 Joseph Myers <joseph@codesourcery.com>
2378
2379 PR c/52023
2380 * c-parser.c (c_parser_alignas_specifier): Use
2381 c_sizeof_or_alignof_type instead of c_alignof.
2382 (c_parser_alignof_expression): Likewise, with min_alignof
2383 parameter depending on alignof spelling used.
2384
edd28054
MP
23852013-12-04 Marek Polacek <polacek@redhat.com>
2386
2387 PR c/54113
2388 * c-decl.c (start_function): Don't warn for missing prototype for
2389 inline functions.
2390
da0fc454
MP
23912013-12-03 Marek Polacek <polacek@redhat.com>
2392
2393 PR c/59351
2394 * c-decl.c (build_compound_literal): Allow compound literals with
2395 empty initial value.
2396
4c2ecab0
JM
23972013-12-02 Joseph Myers <joseph@codesourcery.com>
2398
2399 PR c/58235
2400 * c-typeck.c (build_modify_expr): Diagnose assignment to
2401 expression with array type.
2402
340baef7
JM
24032013-11-29 Joseph Myers <joseph@codesourcery.com>
2404
2405 PR c/42262
2406 * c-typeck.c (process_init_element): Do not treat a string as
2407 initializing a whole array when used with a designator for an
2408 individual element.
2409
6763b9f7
JM
24102013-11-29 Joseph Myers <joseph@codesourcery.com>
2411
2412 PR c/57574
2413 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2414 an inline function following a static declaration.
2415
e7bd1de1
JJ
24162013-11-28 Jakub Jelinek <jakub@redhat.com>
2417
2418 PR c/59310
2419 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2420 to p_name before calling c_parser_omp_teams instead of after.
2421 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2422 argument. Remove unused p_name variable.
2423
0136f8f0
AH
24242013-11-27 Aldy Hernandez <aldyh@redhat.com>
2425 Jakub Jelinek <jakub@redhat.com>
2426
2427 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2428 external_scope is NULL.
2429
241b71bb
TV
24302013-11-27 Tom de Vries <tom@codesourcery.com>
2431 Marc Glisse <marc.glisse@inria.fr>
2432
2433 PR c++/59032
2434 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2435
2fb9a547
AM
24362013-11-22 Andrew MacLeod <amacleod@redhat.com>
2437
2438 * c-typeck.c: Add required include files from gimple.h.
2439
8400e75e
DM
24402013-11-22 David Malcolm <dmalcolm@redhat.com>
2441
2442 * c-decl.c (define_label, shadow_tag_warned)
2443 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2444 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2445 (declspecs_add_type): Remove use of in_system_header macro.
2446 * c-parser.c (c_parser_unary_expression): Likewise.
2447 * c-typeck.c (store_init_value, process_init_element)
2448 (c_start_case): Likewise.
2449
2450 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2451 macro.
2452
2453 * c-parser.c (c_parser_set_source_position_from_token): Remove
2454 reference to in_system_header from comment.
2455
386b1f1f
RS
24562013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2457
2458 * c-decl.c (grokdeclarator): Update comment to refer to
2459 tree_to_[su]hwi rather than tree_low_cst.
2460
ae7e9ddd
RS
24612013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2462
2463 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2464 tree_to_uhwi throughout.
2465
9439e9a1
RS
24662013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2467
2468 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2469 throughout.
2470
9541ffee
RS
24712013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2472
2473 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2474 throughout.
2475
c02065fc
AH
24762013-11-15 Aldy Hernandez <aldyh@redhat.com>
2477
2478 * c-parser.c (c_parser_cilk_simd): New.
2479 (c_parser_cilk_verify_simd): New.
2480 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2481 (c_parser_omp_for_loop): Add case for NE_EXPR.
2482 Set c_break_label for CILK_SIMD.
2483 (c_parser_cilk_clause_vectorlength): New.
2484 (c_parser_cilk_clause_linear): New.
2485 (c_parser_cilk_clause_name): New.
2486 (c_parser_cilk_all_clauses): New.
2487 * c-typeck.c (build_unary_op): Pass location argument to
2488 readonly_error.
2489 (build_modify_expr): Same.
2490 (build_asm_expr): Same.
2491 (c_finish_bc_stmt): Error on break/continue in loops.
2492
18f429e2
AM
24932013-11-14 Andrew MacLeod <amacleod@redhat.com>
2494
2495 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2496
d8a2d370
DN
24972013-11-14 Diego Novillo <dnovillo@google.com>
2498
2499 * c-decl.c: Include print-tree.h.
2500 Include stor-layout.h.
2501 Include varasm.h.
2502 Include attribs.h.
2503 Include stringpool.h.
2504 * c-lang.c: Include fold-const.h.
2505 * c-parser.c: Include stringpool.h.
2506 Include attribs.h.
2507 Include stor-layout.h.
2508 Include varasm.h.
2509 Include trans-mem.h.
2510 * c-typeck.c: Include stor-layout.h.
2511 Include trans-mem.h.
2512 Include varasm.h.
2513 Include stmt.h.
2514
38b7bc7f
JM
25152013-11-13 Joseph Myers <joseph@codesourcery.com>
2516
2517 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2518 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2519 __auto_type.
2520 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2521 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2522 RID_AUTO_TYPE.
2523 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2524 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2525 (c_parser_declarator, c_parser_direct_declarator_inner)
2526 (c_parser_parameter_declaration, c_parser_type_name): All callers
2527 changed.
2528 (c_parser_declaration_or_fndef): Handle declarations with type
2529 determined from the initializer.
2530
45b0be94
AM
25312013-11-12 Andrew MacLeod <amacleod@redhat.com>
2532
18f429e2 2533 * c-typeck.c: Include gimplify.h.
45b0be94 2534
582d9b50
JM
25352013-11-12 Joseph Myers <joseph@codesourcery.com>
2536
2537 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2538 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2539 comment.
2540 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2541 or _Thread_local as appropriate in diagnostics.
2542 (build_null_declspecs): Initialize ret->thread_gnu_p.
2543 (declspecs_add_scspec): Handle either __thread or _Thread_local
2544 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2545 pedantic. Do not disallow _Thread_local extern and _Thread_local
2546 static.
2547
267bac10
JM
25482013-11-07 Joseph Myers <joseph@codesourcery.com>
2549 Andrew MacLeod <amacleod@redhat.com>
2550
2551 * c-aux-info.c (gen_type): Handle atomic qualifier.
2552 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2553 qualifiers when compating types.
2554 (shadow_tag_warned): Handle atomic_p in declspecs.
2555 (quals_from_declspecs): Likewise.
2556 (start_decl): Use c_type_promotes_to when promoting argument
2557 types.
2558 (grokdeclarator): Handle _Atomic.
2559 (get_parm_info): Diagnose any qualifier on "void" as only
2560 parameter.
2561 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2562 comparing types. Use c_type_promotes_to when promoting argument
2563 types.
2564 (finish_function): Use c_type_promotes_to when promoting argument
2565 types.
2566 (build_null_declspecs): Handle atomic_p in declspecs.
2567 (declspecs_add_qual): Handle RID_ATOMIC.
2568 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2569 (c_token_starts_declspecs): Handle RID_ATOMIC.
2570 (c_parser_declspecs): Handle atomic type specifiers and
2571 qualifiers.
2572 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2573 from types of expressions with atomic type.
2574 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2575 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2576 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2577 (c_parser_statement_after_labels, c_parser_switch_statement)
2578 (c_parser_for_statement, c_parser_expr_no_commas)
2579 (c_parser_conditional_expression, c_parser_binary_expression)
2580 (c_parser_cast_expression, c_parser_unary_expression)
2581 (c_parser_postfix_expression)
2582 (c_parser_postfix_expression_after_primary, c_parser_expression):
2583 Use convert_lvalue_to_rvalue.
2584 (c_parser_expression_conv, c_parser_expr_list): Document
2585 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2586 (c_parser_objc_synchronized_statement): Use
2587 convert_lvalue_to_rvalue.
2588 (c_parser_objc_selector): Handle RID_ATOMIC.
2589 (c_parser_objc_receiver, c_parser_array_notation): Use
2590 convert_lvalue_to_rvalue.
2591 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2592 _Atomic (type-name).
2593 (struct c_declspecs): Add atomic_p field.
2594 (convert_lvalue_to_rvalue): Declare.
2595 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2596 corresponding atomic types.
2597 (qualify_type): Don't add _Atomic qualifiers from second argument.
2598 (comp_target_types): Do not allow _Atomic mismatches.
2599 (type_lists_compatible_p): Do not remove atomic qualifiers when
2600 comparing types.
2601 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2602 (build_atomic_assign): New functions.
2603 (build_unary_op): Use build_atomic_assign for atomic increment and
2604 decrement.
2605 (build_conditional_expr): Do not treat _Atomic void as a qualified
2606 version of void.
2607 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2608 (find_anonymous_field_with_type, convert_to_anonymous_field)
2609 (convert_for_assignment): Do not remove atomic qualifiers when
2610 comparing types.
2611 (digest_init): Do not accept initialization of arrays of atomic
2612 elements by string constants.
2613 (build_asm_expr): Use convert_lvalue_to_rvalue.
2614 (build_binary_op): Do not treat _Atomic void as a qualified
2615 version of void.
2616
0c249d4b
DD
26172013-11-06 DJ Delorie <dj@redhat.com>
2618
2619 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2620 both explicit and builtin, print the location of the explicit one.
2621
6d7f7e0a
TB
26222013-11-05 Tobias Burnus <burnus@net-b.de>
2623
2624 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2625 c_parser_omp_distribute, c_parser_omp_teams,
2626 c_parser_omp_target, c_parser_omp_declare): Handle
2627 -fopenmp-simd.
2628
b906f4ca
MP
26292013-11-03 Marek Polacek <polacek@redhat.com>
2630
2631 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2632
ee1d5a02
JJ
26332013-11-01 Jakub Jelinek <jakub@redhat.com>
2634
2635 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2636 check_dup_generic at the end, unless remove is true.
2637 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2638 remove = true;.
2639 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2640
5a9785fb
JJ
26412013-10-31 Jakub Jelinek <jakub@redhat.com>
2642
2643 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2644 with decl that is not pointer nor array.
2645
939b37da
BI
26462013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2647
2648 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2649 a spawning function is found.
2650 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2651 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2652 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2653 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2654 case.
2655 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2656 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2657 expr.
2658 (c_finish_return): Added a check to reject _Cilk_spawn in return
2659 expression.
2660 (build_cilk_spawn): New function.
2661 (build_cilk_sync): Likewise.
2662 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2663
d4af74d4
TB
26642013-10-27 Tobias Burnus <burnus@net-b.de>
2665
2666 PR other/33426
2667 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2668 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2669 (c_parser_statement_after_labels): Update calls.
2670
d73749df 26712013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
2672
2673 PR other/33426
2674 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2675 Handle PRAGMA_IVDEP.
2676 (c_parser_statement_after_labels): Update call.
2677
f28aa681
MP
26782013-10-24 Marek Polacek <polacek@redhat.com>
2679
2680 * c-parser.c (c_parser_struct_declaration): Add a comment.
2681 (c_parser_declarator): Don't allow _Alignas here.
2682
0645c1a2
AM
26832013-10-17 Andrew MacLeod <amacleod@redhat.com>
2684
2685 * c-parser.c: Include omp-low.h.
2686 * c-typeck.c: Likewise.
2687
568a31f2
MP
26882013-10-17 Marek Polacek <polacek@redhat.com>
2689
2690 PR c/58267
2691 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2692 Document syntax of the array-declarator.
2693 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2694 are not permitted.
2695 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2696 (c_parser_struct_declaration): Likewise.
2697 (c_parser_declarator): Likewise.
2698 (c_parser_direct_declarator_inner): Likewise.
2699 (c_parser_parameter_declaration): Likewise.
2700 (c_parser_type_name): Likewise.
2701
acf0174b
JJ
27022013-10-11 Jakub Jelinek <jakub@redhat.com>
2703
2704 * c-lang.h (current_omp_declare_target_attribute): New extern
2705 decl.
2706 * c-parser.c: Include c-lang.h.
2707 (struct c_parser): Change tokens to c_token *.
2708 Add tokens_buf field. Change tokens_avail type to unsigned int.
2709 (c_parser_consume_token): If parser->tokens isn't
2710 &parser->tokens_buf[0], increment parser->tokens.
2711 (c_parser_consume_pragma): Likewise.
2712 (enum pragma_context): Add pragma_struct and pragma_param.
2713 (c_parser_external_declaration): Adjust
2714 c_parser_declaration_or_fndef caller.
2715 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2716 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2717 Adjust recursive call.
2718 (c_parser_struct_or_union_specifier): Use pragma_struct instead
2719 of pragma_external.
2720 (c_parser_parameter_declaration): Use pragma_param instead of
2721 pragma_external.
2722 (c_parser_compound_statement_nostart, c_parser_label,
2723 c_parser_for_statement): Adjust
2724 c_parser_declaration_or_fndef callers.
2725 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2726 it through to c_parser_conditional_expression.
2727 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2728 pass it through to c_parser_binary_expression. Adjust recursive
2729 call.
2730 (c_parser_binary_expression): Remove prec argument, add
2731 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
2732 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2733 binop matches it, use build2 instead of parser_build_binary_op.
2734 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2735 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2736 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2737 Handle pragma_struct and pragma_param the same as pragma_external.
2738 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2739 (c_parser_omp_variable_list): Parse array sections for
2740 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2741 (c_parser_omp_clause_collapse): Fully fold collapse expression.
2742 (c_parser_omp_clause_reduction): Handle user defined reductions.
2743 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2744 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2745 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2746 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2747 c_parser_omp_clause_depend, c_parser_omp_clause_map,
2748 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2749 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2750 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2751 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
2752 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
2753 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2754 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
2755 (c_parser_omp_for_loop): Add CODE argument, pass it through
2756 to c_finish_omp_for. Change last argument to cclauses,
2757 and adjust uses to grab parallel clauses from the array of all
2758 the split clauses. Adjust c_parser_binary_expression,
2759 c_parser_declaration_or_fndef and c_finish_omp_for callers.
2760 (omp_split_clauses): New function.
2761 (c_parser_omp_simd): New function.
2762 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2763 Allow the function to be called also when parsing combined constructs,
2764 and call c_parser_omp_simd when parsing for simd.
2765 (c_parser_omp_sections_scope): If section-sequence doesn't start with
2766 #pragma omp section, require exactly one structured-block instead of
2767 sequence of statements.
2768 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2769 Allow the function to be called also when parsing combined constructs.
2770 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2771 Allow the function to be called also when parsing combined
2772 constructs.
2773 (c_parser_omp_taskgroup, c_parser_omp_cancel,
2774 c_parser_omp_cancellation_point, c_parser_omp_distribute,
2775 c_parser_omp_teams, c_parser_omp_target_data,
2776 c_parser_omp_target_update, c_parser_omp_target,
2777 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2778 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2779 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2780 (c_parser_omp_construct): Add p_name and mask vars. Handle
2781 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
2782 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
2783 and c_parser_omp_sections callers.
2784 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
2785 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
2786 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
2787 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
2788 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
2789 OMP_CLAUSE_DEPEND.
2790 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
2791 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
2792 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2793 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2794 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2795 * c-typeck.c: Include tree-inline.h.
2796 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2797 handle_omp_array_sections_1, handle_omp_array_sections,
2798 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2799 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2800 user defined reductions.
2801 (c_tree_equal): New function.
2802 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2803 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2804 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2805 c_check_omp_declare_reduction_r): New prototypes.
2806 * c-decl.c (current_omp_declare_target_attribute): New variable.
2807 (c_decl_attributes): New function.
2808 (start_decl, start_function): Use it instead of decl_attributes.
2809 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2810 c_omp_reduction_decl, c_omp_reduction_lookup,
2811 c_check_omp_declare_reduction_r): New functions.
2812
0a6c2227
TT
28132013-09-25 Tom Tromey <tromey@redhat.com>
2814
2815 * Make-lang.in (c/gccspec.o): Remove.
2816 (CFLAGS-c/gccspec.o): New variable.
2817 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2818 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2819 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2820
f3bc55f0
TT
28212013-09-25 Tom Tromey <tromey@redhat.com>
2822
2823 * Make-lang.in (c/gccspec.o): Don't use subshell.
2824
a24d975c
MP
28252013-09-18 Marek Polacek <polacek@redhat.com>
2826
2827 PR sanitize/58443
2828 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2829 Remove unnecessary check.
2830
ce6923c5
MP
28312013-09-18 Marek Polacek <polacek@redhat.com>
2832
2833 PR sanitizer/58411
2834 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2835 no_sanitize_undefined attribute.
2836
a1e51df9
KT
28372013-09-13 Kai Tietz <ktietz@redhat.com>
2838
2839 PR target/57848
2840 * c-decl.c (c_builtin_function_ext_scope): Remove
2841 wrong assumption that it is never called on prexisting
2842 symbol.
2843
0af94e6f
JR
28442013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2845
2846 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2847
20059c8b
GDR
28482013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2849
2850 * c-objc-common.c (c_tree_printer): Tidy.
2851
de5a5fa1
MP
28522013-08-30 Marek Polacek <polacek@redhat.com>
2853
2854 * c-typeck.c (build_binary_op): Add division by zero and shift
2855 instrumentation.
2856
2531a1d9 28572013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 2858 Joseph Myers <joseph@codesourcery.com>
2531a1d9 2859
6e2bcc98 2860 PR c/35649
2531a1d9
JR
2861 * c-typeck.c (c_common_type): Prefer double_type_node over
2862 other REAL_TYPE types with the same precision.
2863 (convert_arguments): Likewise.
2864
025311c4
GDR
28652013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2866
2867 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2868 (c_initialize_diagnostics): Call a destructor for the early printer.
2869
da6ca2b5
GDR
28702013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2871
2872 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2873 printer initialization.
2874
318cda85 28752013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 2876
318cda85
BI
2877 PR c/57490
2878 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2879 check for truth values.
2880 (expand_array_notation_exprs): Added truth values case. Removed an
2881 unwanted else. Added for-loop to walk through subtrees in default
2882 case.
2883
b066401f
GDR
28842013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2885
2886 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2887
fb48aadc
JM
28882013-07-23 Joseph Myers <joseph@codesourcery.com>
2889
2890 * c-parser.c (struct c_generic_association): Fix typo.
2891
433cc7b0
TT
28922013-07-23 Tom Tromey <tromey@redhat.com>
2893 Joseph Myers <joseph@codesourcery.com>
2894
2895 * c-parser.c (struct c_generic_association): New.
2896 (c_generic_association_d): New typedef.
2897 (c_parser_generic_selection): New function.
2898 (c_parser_postfix_expression): Handle RID_GENERIC.
2899
26d40c3d
JM
29002013-07-13 Jason Merrill <jason@redhat.com>
2901
2902 PR c++/57793
2903 * c-decl.c (finish_struct): Check for too-large class.
2904
ecdbd01a 29052013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
2906
2907 PR c/57821
2908 * c-typeck.c (set_init_index): When folding, check for index overflow.
2909
1141ed3f
BI
29102013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2911
2912 * c-parser.c (c_parser_array_notation): Removed rejection of array
2913 notations in an array of function pointers.
2914
713b46fa
BI
29152013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2916
2917 * c-array-notation.c (make_triplet_val_inv): New function.
2918 (create_cmp_incr): Likewise.
2919 (create_array_refs): Likewise.
2920 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2921 Also modularized common parts between functions and called the function.
2922 (build_array_notation_expr): Likewise.
2923 (fix_conditional_array_notations_1): Likewise.
2924 (fix_array_notation_expr): Likewise.
2925 (fix_array_notation_call_expr): Likewise.
2926
92f20202
MP
29272013-06-18 Marek Polacek <polacek@redhat.com>
2928
2929 PR c/57630
2930 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2931
73a23b06
BI
29322013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2933
2934 * c-array-notation.c (build_array_notation_expr): Reject array notation
2935 mismatch between LHS and RHS even inside a call_expr. Also, removed
2936 a couple while statements that were dead code.
2937
00b8517d
BI
29382013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2939
2940 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2941 excessive precision expressions in function parameters. Also removed
2942 couple unwanted while statements.
2943
1509bdda
BI
29442013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2945
2946 * c-array-notation.c (expand_array_notation_exprs): Added
2947 ARRAY_NOTATION_REF case.
2948
d60f1706
BI
29492013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2950
2951 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2952 function to c-family/array-notation-common.c.
2953 (is_cilkplus_reduce_builtin): Likewise.
2954 (find_rank): Likewise.
2955 (extract_array_notation_exprs): Likewise.
2956 (replace_array_notations): Likewise.
2957 (find_inv_trees): Likewise.
2958 (replace_inv_trees): Likewise.
2959 (contains_array_notation_expr): Likewise.
2960 (find_correct_array_notation_type): Likewise.
2961 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2962 (struct inv_list): Moved this to c-family/array-notation-common.c.
2963 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2964
6d6efbb3
BI
29652013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2966
2967 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2968 reduction functions outside the for-loop. Added a check if the fundecl
2969 is non-NULL. Finally, removed an unwanted if-statement, and made the
2970 body unconditional.
2971
25c22937
BI
29722013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2973
2974 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2975 condition of the if-statement matches the rank of else-block and then-
2976 block when array notations are used.
2977 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2978 expression after the entire function body is parsed.
2979 (c_parser_expr_no_commas): Delayed creating array notation expressions
2980 to the end of function parsing.
2981 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2982 whole if-statement instead of just the condition.
2983 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2984
edd25645
BI
29852013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2986
2987 PR c/57474
2988 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2989 array to NULL_TREE if they are unused. Also added a check for the
2990 field to be NULL before its fields are used in future.
2991
065ce7f1
RO
29922013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2993
2994 PR bootstrap/57450
2995 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2996 (build_array_notation_expr): Likewise.
2997
36536d79
BI
29982013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2999
3000 * c-typeck.c (build_array_ref): Added a check to see if array's
3001 index is greater than one. If true, then emit an error.
3002 (build_function_call_vec): Exclude error reporting and checking
3003 for builtin array-notation functions.
3004 (convert_arguments): Likewise.
3005 (c_finish_return): Added a check for array notations as a return
3006 expression. If true, then emit an error.
3007 (c_finish_loop): Added a check for array notations in a loop
3008 condition. If true then emit an error.
3009 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3010 (build_binary_op): Added a check for array notation expr inside
3011 op1 and op0. If present, we call another function to find correct
3012 type.
3013 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3014 * c-parser.c (c_parser_compound_statement): Check if array
3015 notation code is used in tree, if so, then transform them into
3016 appropriate C code.
3017 (c_parser_expr_no_commas): Check if array notation is used in LHS
3018 or RHS, if so, then build array notation expression instead of
3019 regular modify.
3020 (c_parser_postfix_expression_after_primary): Added a check for
3021 colon(s) after square braces, if so then handle it like an array
3022 notation. Also, break up array notations in unary op if found.
3023 (c_parser_direct_declarator_inner): Added a check for array
3024 notation.
3025 (c_parser_compound_statement): Added a check for array notation in
3026 a stmt. If one is present, then expand array notation expr.
3027 (c_parser_if_statement): Likewise.
3028 (c_parser_switch_statement): Added a check for array notations in
3029 a switch statement's condition. If true, then output an error.
3030 (c_parser_while_statement): Similarly, but for a while.
3031 (c_parser_do_statement): Similarly, but for a do-while.
3032 (c_parser_for_statement): Similarly, but for a for-loop.
3033 (c_parser_unary_expression): Check if array notation is used in a
3034 pre-increment or pre-decrement expression. If true, then expand
3035 them.
3036 (c_parser_array_notation): New function.
3037 * c-array-notation.c: New file.
3038 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3039
cd192ccc
MS
30402013-05-23 Mike Stump <mikestump@comcast.net>
3041
3042 * c-typeck.c (convert_for_assignment): Handle references to memory
3043 spaces better.
3044
427b248d
JM
30452013-05-16 Jason Merrill <jason@redhat.com>
3046
3047 * Make-lang.in (cc1$(exeext)): Use link mutex.
3048
44d90fe1
PC
30492013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3050
3051 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3052 to simply use OPT_Wpointer_arith.
3053 (build_unary_op): Likewise.
3054
4e7d7b3d
JJ
30552013-04-03 Jakub Jelinek <jakub@redhat.com>
3056
3057 PR c/19449
3058 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3059 argument. If set, or it temporarily for parsing of the first
3060 argument into force_folding_builtin_constant_p.
3061 (c_parser_postfix_expression): Adjust callers.
3062
839b422f
RB
30632013-03-21 Richard Biener <rguenther@suse.de>
3064
3065 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3066 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3067
2ee028f1
MP
30682013-02-12 Marek Polacek <polacek@redhat.com>
3069
3070 PR c/44938
3071 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3072 origtypes to NULL.
3073
8824edff
JJ
30742013-01-24 Jakub Jelinek <jakub@redhat.com>
3075
3076 PR c/56078
3077 * c-typeck.c (set_nonincremental_init_from_string): If
3078 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3079 returned false.
3080 (process_init_element): Likewise.
3081
eadd3d0d
JJ
30822012-12-20 Jakub Jelinek <jakub@redhat.com>
3083
3084 PR c++/55619
3085 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3086 argument, don't call default_function_array_conversion
3087 nor c_fully_fold here.
3088 (c_parser_asm_statement): Adjust callers.
3089 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3090 and outputs here, and call default_function_array_conversion
3091 on inputs that don't need to be addressable.
3092
f8a93a2e
JJ
30932012-12-18 Jakub Jelinek <jakub@redhat.com>
3094
3095 PR c/39464
3096 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3097 warning require that both c_common_unsigned_type as well as
3098 c_common_signed_type is the same for both mvl and mvr types.
3099
9771b263
DN
31002012-11-16 Diego Novillo <dnovillo@google.com>
3101
3102 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3103
3104 * c-common.c: Use new vec API in vec.h.
3105 * c-common.h: Likewise.
3106 * c-gimplify.c: Likewise.
3107 * c-pragma.c: Likewise.
3108 * c-pretty-print.c: Likewise.
3109 * c-pretty-print.h: Likewise.
3110 * c-semantics.c: Likewise.
3111 * c-decl.c: Likewise.
3112 * c-parser.c: Likewise.
3113 * c-tree.h: Likewise.
3114 * c-typeck.c: Likewise.
3115
880661a4
JW
31162012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3117
3118 PR c++/54930
3119 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3120
077d1abe
MLI
31212012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3122
3123 PR c/53066
3124 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3125 shadows a function, unless the variable is a function or a
3126 pointer-to-function.
3127
3a785c97
JJ
31282012-10-12 Jakub Jelinek <jakub@redhat.com>
3129
3130 PR c/54381
3131 * c-parser.c (struct c_tree_loc_pair): Removed.
3132 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3133 add location_t * and tree * arguments, fill in array of 3
3134 sizeof_arg trees and corresponding locs.
3135 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3136 c_parser_expr_list callers.
3137 (c_parser_postfix_expression_after_primary): Likewise. Pass
3138 array of 3 sizeof_arg trees and locs (corresponding to first
3139 3 arguments) to sizeof_pointer_memaccess_warning.
3140
703c8606
LC
31412012-10-09 Lawrence Crowl <crowl@google.com>
3142
3143 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3144 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3145 hash table.
3146
5d9de0d0
PC
31472012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3148
3149 PR c++/54194
3150 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3151 call.
3152
a212e43f
MG
31532012-10-09 Marc Glisse <marc.glisse@inria.fr>
3154
3155 PR c++/54427
3156 * c-typeck.c: Include c-common.h.
3157 (enum stv_conv): Moved to c-common.h.
3158 (scalar_to_vector): Moved to c-common.c.
3159 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3160 * Make-lang.in: c-typeck.c depends on c-common.h.
3161
3b78de56
AC
31622012-10-04 Arnaud Charlet <charlet@adacore.com>
3163
3164 * c-decl.c (c_write_global_declarations): Fix handling of
3165 -fdump-ada-spec*.
3166
78c60e3d
SS
31672012-09-30 Sharad Singhai <singhai@google.com>
3168
3169 * c-decl.c (c_write_global_declarations): Use a different method
3170 to determine if the dump has ben initialized.
3171
9f33203d
JM
31722012-09-14 Joseph Myers <joseph@codesourcery.com>
3173
3174 PR c/54552
3175 * c-typeck.c (c_cast_expr): When casting to a type requiring
3176 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3177 c_fully_fold first.
3178
a27d595d
JM
31792012-09-14 Joseph Myers <joseph@codesourcery.com>
3180
3181 PR c/54103
3182 * c-typeck.c (build_unary_op): Pass original argument of
3183 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3184 any C_MAYBE_CONST_EXPR, if it has integer operands.
3185 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3186 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3187 to c_objc_common_truthvalue_conversion, then remove any
3188 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3189 c_objc_common_truthvalue_conversion not
3190 c_common_truthvalue_conversion.
3191 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3192 call note_integer_operands for arguments with integer operands
3193 that are not integer constants.
3194
9feb29df
JJ
31952012-09-13 Jakub Jelinek <jakub@redhat.com>
3196
3197 PR c/54559
3198 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3199 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3200
d409320c
JJ
32012012-08-31 Jakub Jelinek <jakub@redhat.com>
3202
3203 PR c/54428
3204 * c-convert.c (convert): Don't call fold_convert_loc if
3205 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3206 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3207 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3208
6265d07c
JJ
32092012-08-24 Jakub Jelinek <jakub@redhat.com>
3210
3211 PR c/54355
3212 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3213 for nested and empty_ok arguments in the call to
3214 c_parser_declaration_or_fndef.
3215
1a4049e7
JJ
32162012-08-17 Jakub Jelinek <jakub@redhat.com>
3217
3218 * c-tree.h (c_last_sizeof_arg): Declare.
3219 * c-parser.c (struct c_tree_loc_pair): New type.
3220 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3221 non-NULL.
3222 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3223 (c_parser_postfix_expression_after_primary): Likewise. Call
3224 sizeof_pointer_memaccess_warning if needed.
3225 (sizeof_ptr_memacc_comptypes): New function.
3226 * c-typeck.c (c_last_sizeof_arg): New global variable.
3227 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3228
0229aee9
UB
32292012-07-24 Uros Bizjak <ubizjak@gmail.com>
3230
3231 * c-lang.h (lang_decl): Add variable_size GTY option.
3232
7ee2468b
SB
32332012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3234
3235 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3236 * Make-lang.in: Fix dependencies.
3237
d4a10d0a
SB
32382012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3239
3240 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3241 and add language Makefile hooks.
3242 * config-lang.in: New file.
3243 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3244 add the required "normal" config-lang.in rules.
3245 * c-lang.h: Moved from gcc/ to here.
3246 * c-tree.h: Likewise.
3247 * c-objc-common.c: Likewise.
3248 * c-objc-common.h: Likewise.
3249 * c-typeck.c: Likewise.
3250 * c-convert.c: Likewise.
3251 * c-lang.c: Likewise.
3252 * c-aux-info.c: Likewise.
3253 * c-errors.c: Likewise.
3254 * gccspec.c: Likewise.
3255 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3256 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3257\f
818ab71a 3258Copyright (C) 2012-2016 Free Software Foundation, Inc.
d4a10d0a
SB
3259
3260Copying and distribution of this file, with or without modification,
3261are permitted in any medium without royalty provided the copyright
3262notice and this notice are preserved.