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