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