]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
pr68671.c: Xfail on PTX -- assembler crash.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
cf68d92c
MP
12016-05-10 Marek Polacek <polacek@redhat.com>
2
3 PR c/70255
4 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
5 on a declaration following the definition.
6
351f85c5
JJ
72016-05-05 Jakub Jelinek <jakub@redhat.com>
8
9 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
10 parse it through to c_parser_c99_block_statement.
11 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
12 caller.
13
deef7113
MP
142016-05-04 Marek Polacek <polacek@redhat.com>
15
16 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
17 OPT_Wdangling_else.
18
de55efd5
MP
192016-05-04 Marek Polacek <polacek@redhat.com>
20
21 PR c/48778
22 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
23 for macro expansions.
24
79ce98bc
MP
252016-05-03 Marek Polacek <polacek@redhat.com>
26
27 PR c/70859
28 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
29 check_builtin_function_arguments.
30
fb2647aa
RB
312016-05-03 Richard Biener <rguenther@suse.de>
32
33 * Make-lang.in (cc1-checksum.c): For stage-final re-use
34 the checksum from the previous stage.
35
77886428
CP
362016-05-02 Cesar Philippidis <cesar@codesourcery.com>
37
38 * c-parser.c (c_parser_oacc_all_clauses): Update call to
39 c_finish_omp_clauses.
40 (c_parser_omp_all_clauses): Likewise.
41 (c_parser_oacc_cache): Likewise.
42 (c_parser_oacc_loop): Likewise.
43 (omp_split_clauses): Likewise.
44 (c_parser_omp_declare_target): Likewise.
45 (c_parser_cilk_all_clauses): Likewise.
46 (c_parser_cilk_for): Likewise.
47 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
48 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
49
7176a4a0
MP
502016-05-02 Marek Polacek <polacek@redhat.com>
51
52 PR c/70851
53 * c-decl.c (grokdeclarator): Diagnose when array's size has an
54 incomplete type.
55
e7ff0319
CP
562016-04-29 Cesar Philippidis <cesar@codesourcery.com>
57
58 PR middle-end/70626
59 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
60 OACC_LOOP_CLAUSE_MASK.
61 (c_parser_oacc_kernels_parallel): Update call to
62 c_oacc_split_loop_clauses.
63
9f405ce1
AM
642016-04-28 Andrew MacLeod <amacleod@redhat.com>
65
66 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
67 argument to build_modify_expr in two cases.
68
c1e1f433
BS
692016-04-27 Bernd Schmidt <bschmidt@redhat.com>
70
71 * c-parser.c (c_parser_postfix_expression_after_primary): Call
72 warn_for_memset instead of warning directly here.
73
2448a956
MP
742016-04-26 Marek Polacek <polacek@redhat.com>
75
76 PR c/67784
77 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
78 out of ...
79 (c_parser_for_statement): ... here.
80 (c_parser_if_statement): Use it.
81 (c_parser_switch_statement): Use it.
82 (c_parser_while_statement): Use it.
83
b02a5e26
MP
84 PR c/70791
85 * c-decl.c (pushdecl): Pass LOCUS down to warning.
86
477d4906
IV
872016-04-20 Ilya Verbin <ilya.verbin@intel.com>
88
89 PR c++/69363
90 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
91 instead of c_finish_cilk_clauses.
92 * c-tree.h (c_finish_omp_clauses): Add new default argument.
93 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
94 floating-point variables in the linear clause for Cilk Plus.
95
fe37c7af
MM
962016-04-18 Michael Matz <matz@suse.de>
97
98 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
99 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
100
949505a9
MP
1012016-04-15 Marek Polacek <polacek@redhat.com>
102
103 PR c/70671
104 * c-typeck.c (build_unary_op): Pass location down to error and
105 warning call.
106
dda1bf61
JJ
1072016-04-15 Jakub Jelinek <jakub@redhat.com>
108
109 PR c/70436
110 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
111 where needed.
112 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
113 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
114 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
115 Adjust c_parser_pragma callers.
116 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
117 caller.
118 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
119 c_parser_statement.
120 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
121 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
122 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
123 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
124 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
125 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
126 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
127 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
128 down where needed.
129 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
130 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
131 calls.
132
99cd9857
MP
1332016-04-13 Marek Polacek <polacek@redhat.com>
134
135 PR c/70436
136 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
137 adjust callers.
138 (c_parser_statement): Likewise.
139 (c_parser_c99_block_statement): Likewise.
140 (c_parser_while_statement): Likewise.
141 (c_parser_for_statement): Likewise.
142 (c_parser_if_body): Don't set IF_P here.
143 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
144 about dangling else here.
145 * c-tree.h (c_finish_if_stmt): Adjust declaration.
146 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
147 warn about dangling else here.
148
f13355da
MP
1492016-04-04 Marek Polacek <polacek@redhat.com>
150
151 PR c/70307
152 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
153
5fde6a45
MP
1542016-03-31 Marek Polacek <polacek@redhat.com>
155
156 PR c/70297
157 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
158
4bbf545b
DM
1592016-03-18 David Malcolm <dmalcolm@redhat.com>
160
161 PR c/70281
162 * c-parser.c (c_parser_postfix_expression): Set the source range
163 for uses of "__builtin_types_compatible_p".
164
fcc2b74f
JJ
1652016-03-17 Jakub Jelinek <jakub@redhat.com>
166
167 PR c/70280
168 * c-typeck.c (composite_type): Don't count void_list_node
169 into len, if the list is terminated by void_list_node, start
170 with void_list_node instead of NULL for newargs. Stop
171 at void_list_node.
172
ab4c578f
MP
1732016-03-16 Marek Polacek <polacek@redhat.com>
174
175 PR c/70093
176 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
177 nested functions returning VM types.
178
96b3c82d
CP
1792016-03-09 Cesar Philippidis <cesar@codesourcery.com>
180
181 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
182 when calling c_finish_omp_clauses.
183
29b9828f
BS
1842016-03-04 Bernd Schmidt <bschmidt@redhat.com>
185
186 PR c/69824
187 * c-decl.c (get_parm_info): Don't queue implicit function declarations
188 for later.
189
7ff6ca38
MP
1902016-03-04 Marek Polacek <polacek@redhat.com>
191
192 PR c/69798
193 * c-parser.c (c_parser_postfix_expression): Call
194 c_parser_cast_expression rather than c_parser_postfix_expression.
195
686e2237
JJ
1962016-03-01 Jakub Jelinek <jakub@redhat.com>
197
198 PR c/69796
199 PR c/69974
200 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
201 of incomplete decls to error_mark_node.
202
0b05329b
MP
2032016-02-24 Marek Polacek <polacek@redhat.com>
204
205 PR c/69819
206 * c-decl.c (finish_decl): Don't update the copy of the type of a
207 different decl type.
208
067fbd8b
JJ
2092016-02-23 Jakub Jelinek <jakub@redhat.com>
210
211 PR objc/69844
212 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
213 in id_kind reclassification.
214
bf14eba2
JJ
2152016-02-16 Jakub Jelinek <jakub@redhat.com>
216
217 PR c/69835
218 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
219
ba539195
JN
2202016-02-16 James Norris <jnorris@codesourcery.com>
221
222 PR c/64748
223 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
224
16595a1f
BS
2252016-02-12 Bernd Schmidt <bschmidt@redhat.com>
226
f48dfe98
BS
227 * c-decl.c (build_null_declspecs): Zero the entire struct.
228
16595a1f
BS
229 PR c/69522
230 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
231 callers changed. If nested_p is true, use it to call
232 finish_implicit_inits.
233 * c-tree.h (finish_implicit_inits): Declare.
234 * c-typeck.c (finish_implicit_inits): New function. Move code
235 from ...
236 (push_init_level): ... here.
237 (set_designator, process_init_element): Call finish_implicit_inits.
238
66756373
JJ
2392016-02-11 Jakub Jelinek <jakub@redhat.com>
240
241 PR c/69768
242 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
243 arguments for -Waddress warning.
244
1066e9b5
JJ
2452016-02-04 Jakub Jelinek <jakub@redhat.com>
246
247 PR c/69669
248 * c-decl.c (finish_enum): When honoring mode attribute,
249 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
250
3a5d2ba4
JJ
2512016-01-29 Jakub Jelinek <jakub@redhat.com>
252
253 PR debug/69518
254 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
255 all type variants, not just TYPE_MAIN_VARIANT.
256
cbdd8ae0
JJ
2572016-01-27 Jakub Jelinek <jakub@redhat.com>
258
259 PR debug/66869
260 * c-decl.c (c_write_global_declarations_1): Warn with
261 warn_unused_function if static prototype without definition
262 is not C_DECL_USED.
263
fa74a4bc
MP
2642016-01-27 Marek Polacek <polacek@redhat.com>
265
266 PR c/68062
267 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
268 to unsigned, if needed. Add -Wsign-compare warning.
269
13f92e8d
JJ
2702016-01-26 Jakub Jelinek <jakub@redhat.com>
271
272 PR tree-optimization/69483
273 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
274
cd8e73dc 2752016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
276
277 PR c/24293
278 * c-tree.h (incomplete_record_decls): Declare.
279 * c-parser.c (incomplete_record_decls): Define.
280 (c_parser_translation_unit): Iterate through incomplete_record_decls and
281 report error if any decl has zero size.
282 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
283 or enum type to incomplete_record_decls.
284
e6d6ec9e
TV
2852016-01-14 Tom de Vries <tom@codesourcery.com>
286
287 PR tree-optimization/68773
288 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
289 set force_output.
290
00083992
MP
2912016-01-14 Marek Polacek <polacek@redhat.com>
292
293 PR c/69262
294 * c-decl.c (grokdeclarator): Provide more information for invalid
295 array declarations.
296
7443cf13
DM
2972016-01-06 David Malcolm <dmalcolm@redhat.com>
298
299 * c-parser.c (c_parser_unary_expression): For dereferences, build
300 a combined location before calling build_indirect_ref, so that
301 error reports cover the full range, manually updating the c_expr
302 src_range.
303
6b131d5b
MP
3042016-01-06 Marek Polacek <polacek@redhat.com>
305
306 PR sanitizer/69099
307 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
308 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
309 NULL.
310
818ab71a
JJ
3112016-01-04 Jakub Jelinek <jakub@redhat.com>
312
313 Update copyright years.
314
2fe0a208
MP
3152016-01-04 Marek Polacek <polacek@redhat.com>
316
317 PR c/68908
318 * c-typeck.c (build_atomic_assign): Improve commentary. Add
319 optimization to use __atomic_fetch_* built-in if possible.
320
c7b48c8a
TS
3212015-12-23 Thomas Schwinge <thomas@codesourcery.com>
322
323 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
324 into...
325 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
326 all users.
327
fda5652f
MP
3282015-12-22 Marek Polacek <polacek@redhat.com>
329
330 PR c/69002
331 * c-typeck.c (build_component_ref): Warn when acessing elements of
332 atomic structures or unions.
333
745e411d
DM
3342015-12-21 David Malcolm <dmalcolm@redhat.com>
335
336 * c-typeck.c: Include "gcc-rich-location.h".
337 (build_binary_op): In the two places that call binary_op_error,
338 create a gcc_rich_location and populate it with the location of
339 the binary op and its two operands.
340
94c40e19
DM
3412015-12-16 David Malcolm <dmalcolm@redhat.com>
342
343 * c-parser.c (c_parser_statement_after_labels): When calling
344 c_finish_return, Use the return expression's location if it has
345 one, falling back to the location of the first token within it.
346 * c-typeck.c (c_finish_return): When issuing warnings about
347 the incorrect presence/absence of a return value, issue a note
348 showing the declaration of the function.
349
de67c4c3
DM
3502015-12-16 David Malcolm <dmalcolm@redhat.com>
351
352 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
353 to 4.
354 (c_parser_peek_nth_token): New function.
355 (c_parser_peek_conflict_marker): New function.
356 (c_parser_error): Detect conflict markers and report them as such.
357
a10704e1
DM
3582015-12-16 David Malcolm <dmalcolm@redhat.com>
359
360 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
361 to preserve range information for the primary expression
362 in the call to c_parser_postfix_expression_after_primary.
363
8062bca6
DM
3642015-12-16 David Malcolm <dmalcolm@redhat.com>
365
366 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
367 expression location, falling back on the first token location,
368 rather than always using the latter.
369
d06f8b75
MP
3702015-12-16 Marek Polacek <polacek@redhat.com>
371
372 PR c/64637
373 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
374 available.
375
2994fb91
MP
3762015-12-15 Marek Polacek <polacek@redhat.com>
377
378 PR c/68907
379 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
380 artificial decl.
381
a1b93f8d
DM
3822015-12-08 David Malcolm <dmalcolm@redhat.com>
383
384 * c-parser.c (c_parser_alignof_expression): Capture location of
385 closing parenthesis (if any), or of end of unary expression, and
386 use it to build a src_range for the expression.
387
46c6e1e2
DM
3882015-12-08 David Malcolm <dmalcolm@redhat.com>
389
390 PR c/68757
391 * c-parser.c (c_parser_get_builtin_args): Add
392 "out_close_paren_loc" param, and write back to it.
393 (c_parser_postfix_expression): Capture the closing
394 parenthesis location for RID_CHOOSE_EXPR,
395 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
396 RID_BUILTIN_SHUFFLE and use it to set the source range
397 for such expressions; within RID_BUILTIN_COMPLEX set
398 the underlying location.
399
66189108
MP
4002015-12-07 Marek Polacek <polacek@redhat.com>
401
402 PR c/68668
403 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
404 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
405
f187980b
EB
4062015-12-04 Eric Botcazou <ebotcazou@adacore.com>
407
408 * c-tree.h (c_build_va_arg): Adjust prototype.
409 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
410 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
411 parameter, adjust throughout and issue an error if EXPR is a component
412 with reverse storage order.
413
4250754e
JM
4142015-12-02 Jason Merrill <jason@redhat.com>
415
416 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
417 (c_fully_fold_internal, decl_constant_value_for_optimization):
418 Move from c-common.c.
419 * c-tree.h: Declare decl_constant_value_for_optimization.
420 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
421
e9e32ee6
JM
4222015-12-02 Joseph Myers <joseph@codesourcery.com>
423
424 PR c/68162
425 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
426 following link from declarator to next declarator. Track original
427 qualified type and pass it to c_build_qualified_type.
428 * c-typeck.c (c_build_qualified_type): Add arguments
429 orig_qual_type and orig_qual_indirect.
430
ff7a55bf
TS
4312015-12-02 Thomas Schwinge <thomas@codesourcery.com>
432
433 * c-parser.c (c_parser_omp_clause_name)
434 (c_parser_oacc_all_clauses): Alphabetical sorting.
435
657e4e47
JJ
4362015-12-02 Jakub Jelinek <jakub@redhat.com>
437
438 PR c/68533
439 * c-decl.c (get_parm_info): Use b->locus instead of input_location
440 for diagnostics.
441
37d5ad46
JB
4422015-12-01 Julian Brown <julian@codesourcery.com>
443 Cesar Philippidis <cesar@codesourcery.com>
444 James Norris <James_Norris@mentor.com>
445
446 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
447 (c_parser_oacc_clause_use_device): New function.
448 (c_parser_oacc_all_clauses): Add use_device support.
449 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
450 (c_parser_oacc_host_data): New function.
451 (c_parser_omp_construct): Add host_data support.
452 * c-tree.h (c_finish_oacc_host_data): Add prototype.
453 * c-typeck.c (c_finish_oacc_host_data): New function.
454 (c_finish_omp_clauses): Add use_device support.
455
a4850ce9
JH
4562015-11-29 Jan Hubicka <hubicka@ucw.cz>
457
458 PR c/67106
459 * c-decl.c: Set TYPE_PACKED in variants.
460
b58d3df2
ML
4612015-11-27 Martin Liska <mliska@suse.cz>
462
463 PR c++/68312
464 * c-array-notation.c (fix_builtin_array_notation_fn):
465 Use release_vec_vec instead of vec::release.
466 (build_array_notation_expr): Likewise.
467 (fix_conditional_array_notations_1): Likewise.
468 (fix_array_notation_expr): Likewise.
469 (fix_array_notation_call_expr): Likewise.
470
aec17bfe
JJ
4712015-11-27 Jakub Jelinek <jakub@redhat.com>
472
473 PR c/63326
474 * c-parser.c (c_parser_compound_statement_nostart): If
475 last_label is true, use pragma_stmt instead of pragma_compound
476 as second c_parser_pragma argument.
477 (c_parser_omp_ordered, c_parser_omp_target_update,
478 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
479 false as second argument to c_parser_skip_to_pragma_eol after
480 diagnosing standalone directives used in pragma_stmt context.
481
688c4de0
IV
4822015-11-24 Ilya Verbin <ilya.verbin@intel.com>
483
484 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
485 with "if (ENABLE_OFFLOADING)".
486
cbd03aee
DM
4872015-11-23 David Malcolm <dmalcolm@redhat.com>
488
489 PR objc/68438
490 * c-parser.c (c_parser_postfix_expression): Set up source ranges
491 for various Objective-C constructs: Class.name syntax,
492 @selector(), @protocol(), @encode(), and [] message syntax.
493
a87a86e1
DM
4942015-11-20 David Malcolm <dmalcolm@redhat.com>
495
496 PR 62314
497 * c-typeck.c (should_suggest_deref_p): New function.
498 (build_component_ref): Special-case POINTER_TYPE when
499 generating a "not a structure of union" error message, and
500 suggest a "->" rather than a ".", providing a fix-it hint.
501
8ece8dfb
DM
5022015-11-19 David Malcolm <dmalcolm@redhat.com>
503
504 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
505 candidate into a new function, find_closest_identifier.
506
433068cc
MP
5072015-11-19 Marek Polacek <polacek@redhat.com>
508
509 PR c/68412
510 * c-typeck.c (parser_build_binary_op): Properly handle
511 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
512
bef08b71
DM
5132015-11-17 David Malcolm <dmalcolm@redhat.com>
514
515 * c-parser.c (set_c_expr_source_range): Bulletproof both
516 overloaded implementations against NULL expr->value.
517 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
518 values.
519 (c_parser_unary_expression): Likewise when handling addresses of
520 labels.
521 (c_parser_postfix_expression): Likewise for statement expressions,
522 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
523 __builtin_va_arg, and for __builtin_offset_of.
524 (c_parser_postfix_expression_after_paren_type): Initialize expr's
525 src_range using the range of the braced initializer.
526 (c_parser_transaction_expression): Set src_range for "ret" to a
527 sane pair of values.
528
fff77217
KY
5292015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
530
531 * c-parser.c (c_finish_omp_declare_simd): Look for
532 "simd" attribute as well. Update error message.
533
1d899da2
TS
5342015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
535
536 * c-parser.c (c_parser_omp_declare_target): Adjust.
537
e4606348
JJ
5382015-11-14 Jakub Jelinek <jakub@redhat.com>
539
540 * c-typeck.c (c_finish_omp_clauses): Don't mark
541 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
542
3e636daf
MP
5432015-11-14 Marek Polacek <polacek@redhat.com>
544
545 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
546 * c-typeck.c: Likewise.
547
ebedc9a3
DM
5482015-11-13 David Malcolm <dmalcolm@redhat.com>
549
550 * c-decl.c (warn_defaults_to): Pass line_table to
551 rich_location ctor.
552 * c-errors.c (pedwarn_c99): Likewise.
553 (pedwarn_c90): Likewise.
554 * c-parser.c (set_c_expr_source_range): New functions.
555 (c_token::get_range): New method.
556 (c_token::get_finish): New method.
557 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
558 based on the range from the start of the LHS to the end of the
559 RHS.
560 (c_parser_conditional_expression): Likewise, based on the range
561 from the start of the cond.value to the end of exp2.value.
562 (c_parser_binary_expression): Call set_c_expr_source_range on
563 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
564 (c_parser_cast_expression): Call set_c_expr_source_range on ret
565 based on the cast_loc through to the end of the expr.
566 (c_parser_unary_expression): Likewise, based on the
567 op_loc through to the end of op.
568 (c_parser_sizeof_expression) Likewise, based on the start of the
569 sizeof token through to either the closing paren or the end of
570 expr.
571 (c_parser_postfix_expression): Likewise, using the token range,
572 or from the open paren through to the close paren for
573 parenthesized expressions.
574 (c_parser_postfix_expression_after_primary): Likewise, for
575 various kinds of expression.
576 * c-tree.h (struct c_expr): Add field "src_range".
577 (c_expr::get_start): New method.
578 (c_expr::get_finish): New method.
579 (set_c_expr_source_range): New decls.
580 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
581 on ret for prefix unary ops.
582 (parser_build_binary_op): Likewise, running from the start of
583 arg1.value through to the end of arg2.value.
584
ec8b536f
MP
5852015-11-13 Marek Polacek <polacek@redhat.com>
586
587 PR c/68320
588 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
589
277fe616
DM
5902015-11-13 David Malcolm <dmalcolm@redhat.com>
591
592 * c-typeck.c: Include spellcheck.h.
593 (lookup_field_fuzzy_find_candidates): New function.
594 (lookup_field_fuzzy): New function.
595 (build_component_ref): If the field was not found, try using
596 lookup_field_fuzzy and potentially offer a suggestion.
597
6e232ba4
JN
5982015-11-12 James Norris <jnorris@codesourcery.com>
599 Joseph Myers <joseph@codesourcery.com>
600
601 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
602 (c_parser_omp_clause_name): Handle 'device_resident' clause.
603 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
604 and PRAGMA_OMP_CLAUSE_LINK.
605 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
606 and PRAGMA_OACC_CLAUSE_LINK.
607 (OACC_DECLARE_CLAUSE_MASK): New definition.
608 (c_parser_oacc_declare): New function.
609
9be4f715
MP
6102015-11-12 Marek Polacek <polacek@redhat.com>
611
612 PR c/67784
613 * c-parser.c (c_parser_for_statement): Reclassify the token in
614 a correct scope.
615
e78bede6
MP
6162015-11-11 Marek Polacek <polacek@redhat.com>
617
618 PR c/68107
619 PR c++/68266
620 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
621 checking the size of an array.
622
69f293c9
AM
6232015-11-11 Andrew MacLeod <amacleod@redhat.com>
624
625 * c-array-notation.c: Remove unused header files.
626 * c-aux-info.c: Likewise.
627 * c-convert.c: Likewise.
628 * c-decl.c: Likewise.
629 * c-errors.c: Likewise.
630 * c-lang.c: Likewise.
631 * c-objc-common.c: Likewise.
632 * c-parser.c: Likewise.
633 * c-typeck.c: Likewise.
634 * gccspec.c: Likewise.
635
3a40d81d
NS
6362015-11-09 Thomas Schwinge <thomas@codesourcery.com>
637 Cesar Philippidis <cesar@codesourcery.com>
638 James Norris <jnorris@codesourcery.com>
639 Julian Brown <julian@codesourcery.com>
640 Nathan Sidwell <nathan@codesourcery.com>
641
642 c/
643 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
644 routine arg.
645 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
646 (c_parser_pragma): Parse 'acc routine'.
647 (OACC_ROUTINE_CLAUSE_MARK): Define.
648 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
649
fc402eec
AA
6502015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
651
652 PR debug/67192
653 * c-typeck.c (c_finish_loop): For unconditional loops, set the
654 location of the backward-goto to the start of the loop body.
655
f6b0b3db
AA
6562015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
657
658 PR debug/67192
659 * c-parser.c (c_parser_while_statement): Finish the loop before
660 parsing ahead for misleading indentation.
661 (c_parser_for_statement): Likewise.
662
ee45a32d
EB
6632015-11-08 Eric Botcazou <ebotcazou@adacore.com>
664
665 * c-decl.c (finish_struct): If the structure has reverse storage
666 order, rewrite the type of array fields with scalar component. Call
667 maybe_apply_pragma_scalar_storage_order on entry.
668 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
669 errors on bit-fields and reverse SSO here and not...
670 (c_mark_addressable): ...here.
671 (output_init_element): Adjust call to initializer_constant_valid_p.
672 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
673
8a645150
DM
6742015-11-06 David Malcolm <dmalcolm@redhat.com>
675
676 * c-decl.c (warn_defaults_to): Update for change in signature
677 of diagnostic_set_info.
678 * c-errors.c (pedwarn_c99): Likewise.
679 (pedwarn_c90): Likewise.
680 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
681 for textinfo::set_location.
682
7a5e4956
CP
6832015-11-05 Cesar Philippidis <cesar@codesourcery.com>
684 Thomas Schwinge <thomas@codesourcery.com>
685 James Norris <jnorris@codesourcery.com>
686
687 * c-parser.c (c_parser_omp_clause_name): Add support for
688 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
689 (c_parser_omp_clause_default): Add is_oacc argument. Handle
690 default(none) in OpenACC.
691 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
692 arguments.
693 (c_parser_oacc_clause_tile): New function.
694 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
695 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
696 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
697 TILE}.
698 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
699 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
700 FIRSTPRIVATE}.
701 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
702 (c_parser_oacc_update): Update the error message for missing clauses.
703 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
704 and OMP_CLAUSE_INDEPENDENT.
705
bfcfbfa0
MP
7062015-11-05 Marek Polacek <polacek@redhat.com>
707
708 PR c/68090
709 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
710 deal with pre-evaluation on invalid types.
711
e01d41e5
JJ
7122015-11-05 Jakub Jelinek <jakub@redhat.com>
713 Ilya Verbin <ilya.verbin@intel.com>
714
715 * c-parser.c: Include context.h and gimple-expr.h.
716 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
717 monotonic together with nonmonotonic.
718 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
719 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
720 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
721 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
722 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
723 expressions on combined target teams before the target.
724 (c_parser_omp_declare_target): If decl has "omp declare target" or
725 "omp declare target link" attribute, and cgraph or varpool node already
726 exists, then set corresponding flags. Call c_finish_omp_clauses
727 in the parenthesized extended-list syntax case.
728 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
729 declare target.
730 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
731 on OMP_CLAUSE_REDUCTION array sections.
732 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
733 into the constant offset, or for variable low-bound using
734 POINTER_PLUS_EXPR. For structure element based array sections use
735 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
736 (c_finish_omp_clauses): Drop generic_field_head, structure
737 elements are now always mapped even as array section bases,
738 diagnose same var in data sharing and mapping clauses. Diagnose if
739 linear step on declare simd is neither a constant nor a uniform
740 parameter. Look through POINTER_PLUS_EXPR for array section
741 reductions. Diagnose the same var or function appearing multiple
742 times on the same directive. Fix up wording for the to clause if t
743 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
744 modifier on kinds other than dynamic or guided or nonmonotonic
745 modifier together with ordered clause.
746
4bf9e5a8
TS
7472015-11-03 Thomas Schwinge <thomas@codesourcery.com>
748 Chung-Lin Tang <cltang@codesourcery.com>
749
750 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
751
2adfab87
AM
7522015-10-29 Andrew MacLeod <amacleod@redhat.com>
753
754 * c-array-notation.c: Reorder #include's and remove duplicates.
755 * c-aux-info.c: Likewise.
756 * c-convert.c: Likewise.
757 * c-decl.c: Likewise.
758 * c-errors.c: Likewise.
759 * c-lang.c: Likewise.
760 * c-objc-common.c: Likewise.
761 * c-parser.c: Likewise.
762 * c-typeck.c: Likewise.
763
e922069e
JW
7642015-10-26 Jim Wilson <jim.wilson@linaro.org>
765
766 PR debug/66068
767 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
768 after calling build_qualified_type.
769
765dd391
CP
7702015-10-27 Cesar Philippidis <cesar@codesourcery.com>
771 Thomas Schwinge <thomas@codesourcery.com>
772 James Norris <jnorris@codesourcery.com>
773 Joseph Myers <joseph@codesourcery.com>
774 Julian Brown <julian@codesourcery.com>
775 Bernd Schmidt <bschmidt@redhat.com>
776
777 * c-parser.c (c_parser_oacc_shape_clause): New.
778 (c_parser_oacc_simple_clause): New.
779 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
780 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
781
88bae6f4
TS
7822015-10-27 Thomas Schwinge <thomas@codesourcery.com>
783 James Norris <jnorris@codesourcery.com>
784 Cesar Philippidis <cesar@codesourcery.com>
785
786 PR c/64765
787 PR c/64880
788 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
789 parameters, and handle these. Adjust all users.
790 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
791 into...
792 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
793 all users.
794 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
795 declare functions.
796 (c_finish_omp_construct): Declare function.
797 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
798 Merge functions into...
799 (c_finish_omp_construct): ... this new function.
800
a8fc2579
RB
8012015-10-22 Richard Biener <rguenther@suse.de>
802
803 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
804 before folding a MINUS_EXPR.
805
e9122ef6
MP
8062015-10-21 Marek Polacek <polacek@redhat.com>
807
808 PR c/68024
809 * c-decl.c (start_function): Warn about vararg functions without
810 a prototype.
811
9f47c7e5
IE
8122015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
813
814 * c-typeck.c (build_conditional_expr): Use boolean vector
815 type for vector comparison.
816 (build_vec_cmp): New.
817 (build_binary_op): Use build_vec_cmp for comparison.
818
fa60eeb9
MP
8192015-10-20 Marek Polacek <polacek@redhat.com>
820
821 * c-parser.c (is_cilkplus_vector_p): Don't define here.
822
2c7020eb
MP
8232015-10-20 Marek Polacek <polacek@redhat.com>
824
825 PR c/67964
826 * c-parser.c (c_parser_attributes): Break out of the loop if the
827 token after an attribute isn't a comma.
828
d9a6bd32
JJ
8292015-10-13 Jakub Jelinek <jakub@redhat.com>
830 Aldy Hernandez <aldyh@redhat.com>
831
832 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
833 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
834 (c_parser_omp_variable_list): Handle structure elements for
835 map, to and from clauses. Handle array sections in reduction
836 clause. Formatting fixes.
837 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
838 if clause modifiers.
839 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
840 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
841 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
842 c_parser_omp_clause_is_device_ptr): New functions.
843 (c_parser_omp_clause_ordered): Parse optional parameter.
844 (c_parser_omp_clause_reduction): Handle array reductions.
845 (c_parser_omp_clause_schedule): Parse optional simd modifier.
846 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
847 functions.
848 (c_parser_omp_clause_linear): Parse linear clause modifiers.
849 (c_parser_omp_clause_depend_sink): New function.
850 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
851 (c_parser_omp_clause_map): Parse release/delete map kinds and
852 optional always modifier.
853 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
854 and c_finish_omp_clauses callers.
855 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
856 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
857 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
858 (OMP_CRITICAL_CLAUSE_MASK): Define.
859 (c_parser_omp_critical): Parse critical clauses.
860 (c_parser_omp_for_loop): Handle doacross loops, adjust
861 c_finish_omp_for and c_finish_omp_clauses callers.
862 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
863 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
864 (OMP_FOR_CLAUSE_MASK): Add linear clause.
865 (c_parser_omp_for): Disallow ordered clause when combined with
866 distribute. Disallow linear clause when combined with distribute
867 and not combined with simd.
868 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
869 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
870 parse clauses and if depend clause is found, don't parse a body.
871 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
872 Allow target parallel without for after it.
873 (OMP_TASK_CLAUSE_MASK): Add priority clause.
874 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
875 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
876 invalid kinds.
877 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
878 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
879 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
880 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
881 functions.
882 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
883 defaultmap and is_device_ptr clauses.
884 (c_parser_omp_target): Parse target parallel and target simd. Set
885 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
886 and target exit data. Diagnose invalid map kinds.
887 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
888 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
889 construct.
890 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
891 &omp_priv.
892 (OMP_TASKLOOP_CLAUSE_MASK): Define.
893 (c_parser_omp_taskloop): New function.
894 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
895 handle PRAGMA_OMP_TASKLOOP.
896 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
897 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
898 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
899 Add IS_OMP argument, handle structure element bases, diagnose
900 bitfields, pass IS_OMP recursively, diagnose known zero length
901 array sections in depend clauses, handle array sections in reduction
902 clause, diagnose negative length even for pointers.
903 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
904 types, pass IS_OMP down to handle_omp_array_sections_1, handle
905 array sections in reduction clause, set
906 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
907 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
908 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
909 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
910
21ba0cea
MP
9112015-10-06 Marek Polacek <polacek@redhat.com>
912
913 * c-parser.c (c_parser_statement_after_labels): Use
914 protected_set_expr_location.
915 (c_parser_omp_clause_num_gangs): Likewise.
916 (c_parser_omp_clause_num_threads): Likewise.
917 (c_parser_omp_clause_num_workers): Likewise.
918 (c_parser_omp_clause_vector_length): Likewise.
919 (c_parser_omp_clause_num_teams): Likewise.
920 (c_parser_omp_clause_thread_limit): Likewise.
921 * c-typeck.c (build_c_cast): Likewise.
922 (c_cast_expr): Likewise.
923
624d31fe
RS
9242015-10-05 Richard Sandiford <richard.sandiford@arm.com>
925
926 * c-typeck.c (c_tree_equal): Use real_equal instead of
927 REAL_VALUES_EQUAL.
928
b8fd7909
JM
9292015-10-04 Jason Merrill <jason@redhat.com>
930
931 * c-parser.c (c_lex_one_token): Handle @synchronized.
932 * c-decl.c (match_builtin_function_types): A declaration of a built-in
933 can change whether the function is transaction_safe.
934
1c7485af
MP
9352015-10-02 Marek Polacek <polacek@redhat.com>
936
937 PR c/67730
938 * c-typeck.c (convert_for_assignment): Use the expansion point
939 location throughout.
940
3e3b8d63
MP
9412015-10-02 Marek Polacek <polacek@redhat.com>
942
943 PR c/64249
944 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
945 and pass it down to c_parser_if_statement.
946 (c_parser_else_body): Add CHAIN parameter and pass it down to
947 c_parser_statement_after_labels.
948 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
949 duplicated if-else-if conditions.
950
aabef2de
MP
9512015-10-01 Marek Polacek <polacek@redhat.com>
952
953 * c-typeck.c (convert_for_assignment): Improve commentary.
954
de8ddd5f
MP
9552015-09-30 Marek Polacek <polacek@redhat.com>
956
957 PR c/67730
958 * c-typeck.c (c_finish_return): Use the expansion point location for
959 certain "return with value" warnings.
960
c4914de6
MLI
9612015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
962
963 * c-parser.c (pragma_lex): Add loc argument.
964
0e36f5c7
MP
9652015-09-15 Marek Polacek <polacek@redhat.com>
966
967 PR c/67580
968 * c-decl.c (tag_exists_p): New function.
969 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
970 struct/union/enum keywords are missing.
971 * c-tree.h (tag_exists_p): Declare.
972
2f3bb934
MP
9732015-09-15 Marek Polacek <polacek@redhat.com>
974
975 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
976 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
977 Return NULL_TREE instead of 0.
978 (lookup_name): Return NULL_TREE instead of 0.
979 (lookup_name_in_scope): Likewise.
980 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
981 (parser_xref_tag): Use false instead of 0.
982 (start_struct): Use true instead of 1.
983 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
984
aa256c4a
MP
9852015-09-14 Marek Polacek <polacek@redhat.com>
986
987 * c-typeck.c (set_nonincremental_init_from_string): Use
988 HOST_WIDE_INT_M1U when shifting a negative value.
989
dbb68221
MW
9902015-09-09 Mark Wielaard <mjw@redhat.com>
991
992 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
993 parm against NULL.
994
a8a098ac
JJ
9952015-09-10 Jakub Jelinek <jakub@redhat.com>
996
997 PR c/67502
998 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
999 into OMP_FOR_PRE_BODY rather than before the loop.
1000
f4b189d5
JJ
10012015-09-09 Jakub Jelinek <jakub@redhat.com>
1002
0bb99c11
JJ
1003 PR c/67501
1004 * c-parser.c (c_parser_oacc_all_clauses,
1005 c_parser_omp_all_clauses): Remove invalid clause from
1006 list of clauses even if parser->error is set.
1007
fce5e5e3
JJ
1008 PR c/67500
1009 * c-parser.c (c_parser_omp_clause_aligned,
1010 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1011 test for errors.
1012 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1013 error_mark_node.
1014
f4b189d5
JJ
1015 PR c/67495
1016 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1017 instead of c_parser_unary_expression. If the result is !lvalue_p,
1018 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1019
b2aaf235
MP
10202015-09-04 Marek Polacek <polacek@redhat.com>
1021
1022 PR sanitizer/67279
1023 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1024
1807ffc1
MS
10252015-09-03 Martin Sebor <msebor@redhat.com>
1026
1027 PR c/66516
8b652e65
JJ
1028 * c-typeck.c (convert_arguments, parser_build_unary_op,
1029 build_conditional_expr, c_cast_expr, convert_for_assignment,
1030 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1031 reject_gcc_builtin.
1032 (c_decl_implicit): Define.
1033
d04ff417
MP
10342015-09-02 Marek Polacek <polacek@redhat.com>
1035
1036 PR c/67432
1037 * c-parser.c (c_parser_enum_specifier): Give a better error for
1038 an empty enum.
1039
a79683d5
TS
10402015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1041
1042 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1043
191a6b94
MP
10442015-08-12 Marek Polacek <polacek@redhat.com>
1045
1046 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1047 LOC to it.
1048
420a9d9b
MP
10492015-08-03 Marek Polacek <polacek@redhat.com>
1050
1051 PR c/67088
1052 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1053 Use it.
1054 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1055
992118a1
PP
10562015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1057
1058 * c-parser.c (c_parser_if_body): Take token_indent_info
1059 argument. Call warn_for_misleading_indentation even when the
1060 body is a semicolon. Extract token_indent_infos corresponding
1061 to the guard, body and next tokens. Adjust call to
1062 warn_for_misleading_indentation accordingly.
1063 (c_parser_else_body): Likewise.
1064 (c_parser_if_statement): Likewise.
1065 (c_parser_while_statement): Likewise.
1066 (c_parser_for_statement): Likewise.
1067
46308474
LFSM
10682015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1069 Manuel López-Ibáñez <manu@gcc.gnu.org>
1070
1071 * c-decl.c (get_parm_info): Remove static var. Update warning
1072 message.
1073
05b28fd6
MP
10742015-07-27 Marek Polacek <polacek@redhat.com>
1075
1076 PR c++/66555
1077 PR c/54979
1078 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1079
451b5e48
MP
10802015-07-20 Marek Polacek <polacek@redhat.com>
1081
1082 PR c++/55095
1083 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1084 (build_binary_op): Warn about left shift overflows.
1085
1916bcb5
AM
10862015-07-09 Andrew MacLeod <amacleod@redhat.com>
1087
1088 * c-array-notation.c: Adjust includes for flags.h changes.
1089 * c-objc-common.c: Likewise.
1090
c7131fb2
AM
10912015-07-07 Andrew MacLeod <amacleod@redhat.com>
1092
1093 * c-array-notation.c: Adjust includes.
1094 * c-aux-info.c: Likewise.
1095 * c-convert.c: Likewise.
1096 * c-decl.c: Likewise.
1097 * c-errors.c: Likewise.
1098 * c-lang.c: Likewise.
1099 * c-objc-common.c: Likewise.
1100 * c-parser.c: Likewise.
1101 * c-typeck.c: Likewise.
1102
da2e71c9
MLI
11032015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1104
1105 PR fortran/66605
1106 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1107
b155cfd9
MP
11082015-06-29 Marek Polacek <polacek@redhat.com>
1109
1110 PR c/66322
1111 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1112 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1113 about -Wswitch-bool here.
1114 (do_case): Update c_add_case_label call.
1115 (c_finish_case): Update c_do_switch_warnings call.
1116
31521951
MP
11172015-06-27 Marek Polacek <polacek@redhat.com>
1118
1119 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1120
22d03525
MP
11212015-06-26 Marek Polacek <polacek@redhat.com>
1122
1123 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1124 INDIRECT_REF_P.
1125 * c-typeck.c (array_to_pointer_conversion): Likewise.
1126 (build_unary_op): Likewise.
1127 (c_finish_return): Likewise.
1128
f0889939
AM
11292015-06-25 Andrew MacLeod <amacleod@redhat.com>
1130
1131 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1132 * c-parser.c: Likewise.
1133
8d67ee55
RS
11342015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1135
1136 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1137 instead of pointer_hash.
1138 (detect_field_duplicates): Likewise.
1139
0ae9bd27
MP
11402015-06-25 Marek Polacek <polacek@redhat.com>
1141
1142 * c-array-notation.c: Use VAR_P throughout.
1143 * c-decl.c: Likewise.
1144 * c-objc-common.c: Likewise.
1145 * c-parser.c: Likewise.
1146 * c-typeck.c: Likewise.
1147
62f9079a
MP
11482015-06-25 Marek Polacek <polacek@redhat.com>
1149
1150 * c-decl.c: Use is_global_var throughout.
1151 * c-parser.c: Likewise.
1152 * c-typeck.c: Likewise.
1153
abb226c9
AM
11542015-06-17 Andrew MacLeod <amacleod@redhat.com>
1155
1156 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1157 * c-aux-info.c: Likewise.
1158 * c-convert.c: Likewise.
1159 * c-decl.c: Likewise.
1160 * c-errors.c: Likewise.
1161 * c-lang.c: Likewise.
1162 * c-objc-common.c: Likewise.
1163 * c-parser.c: Likewise.
1164 * c-typeck.c: Likewise.
1165
8cbababc
JH
11662015-06-11 Jan Hubicka <hubicka@ucw.cz>
1167
1168 PR middle-end/66325
1169 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1170 variants.
1171
a0349665
PMR
11722015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1173
1174 * c-decl.c (pop_scope): Register the main translation unit
1175 through the new debug hook.
1176
13fdf2e2
AM
11772015-06-08 Andrew MacLeod <amacleod@redhat.com>
1178
1179 * c-array-notation.c : Adjust include files.
1180 * c-aux-info.c : Likewise.
1181 * c-convert.c : Likewise.
1182 * c-decl.c : Likewise.
1183 * c-errors.c : Likewise.
1184 * c-lang.c : Likewise.
1185 * c-lang.h : Likewise.
1186 * c-objc-common.c : Likewise.
1187 * c-parser.c : Likewise.
1188 * c-typeck.c : Likewise.
1189
d7438551
AH
11902015-06-05 Aldy Hernandez <aldyh@redhat.com>
1191
1192 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1193 immediately clobber it.
1194 (c_write_global_declarations_1): Remove call to
1195 check_global_declaration_1.
1196 (c_write_global_declarations_2): Remove.
1197 (c_write_final_cleanups): Rename from c_write_global_declarations.
1198 Remove call to finalize_compilation_unit.
1199 Remove calls to debugging hooks.
1200 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1201 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1202 * c-tree.h: Remove c_write_global_declarations.
1203
ecb9f223
AM
12042015-06-04 Andrew MacLeod <amacleod@redhat.com>
1205
1206 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1207 * c-aux-info.c: Likewise.
1208 * c-convert.c: Likewise.
1209 * c-decl.c: Likewise.
1210 * c-errors.c: Likewise.
1211 * c-lang.c: Likewise.
1212 * c-objc-common.c: Likewise.
1213 * c-parser.c: Likewise.
1214 * c-typeck.c: Likewise.
1215
9482b620
MP
12162015-06-04 Marek Polacek <polacek@redhat.com>
1217
1218 PR c/66341
1219 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1220 it is a lvalue.
1221
bc51ace3
PK
12222015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1223
1224 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1225 Warn for empty struct.
1226 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1227
ea5b45b6
AT
12282015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1229
1230 * c-decl.c (start_function): Call plugin before parsing.
1231 (finish_function): Call plugin after parsing.
1232
c2d47482
PK
12332015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1234
1235 PR c/49551
1236 * c-decl.c (merge_decls): Merge DECL_COMMON.
1237
a95492ab
JW
12382015-05-22 Jim Wilson <jim.wilson@linaro.org>
1239
1240 * Make-lang.in (check_gcc_pallelize): Define.
1241
fd5c817a
MP
12422015-05-22 Marek Polacek <polacek@redhat.com>
1243
1244 PR c/47043
1245 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1246 attributes.
1247
c7b70a3c
MP
12482015-05-21 Marek Polacek <polacek@redhat.com>
1249
1250 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1251 DECL_BUILT_IN.
1252
21b634ae
MP
12532015-05-20 Marek Polacek <polacek@redhat.com>
1254
1255 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1256 * c-typeck.c: Likewise.
1257
296a8c2f
MP
12582015-05-19 Marek Polacek <polacek@redhat.com>
1259
1260 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1261
41b37d5e
JJ
12622015-05-19 Jakub Jelinek <jakub@redhat.com>
1263
1264 PR middle-end/66199
1265 * c-parser.c (c_parser_omp_for_loop): Don't add
1266 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1267 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1268 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1269 constructs.
1270
fab27f52
MM
12712015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1272
1273 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 1274 swaps.
fab27f52 1275
40de31cf
MLI
12762015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1277
1278 PR fortran/44054
1279 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1280 accessor function.
1281
3aa3c9fc
MP
12822015-05-14 Marek Polacek <polacek@redhat.com>
1283
1284 PR c/66066
1285 PR c/66127
1286 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1287 rather than with 0.
1288
c3388e62
DM
12892015-05-12 David Malcolm <dmalcolm@redhat.com>
1290
1291 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1292 to add a call to warn_for_misleading_indentation.
1293 (c_parser_else_body): Likewise, adding param "else_loc".
1294 (c_parser_if_statement): Check for misleading indentation.
1295 (c_parser_while_statement): Likewise.
1296 (c_parser_for_statement): Likewise.
1297
755e528f
MP
12982015-05-08 Marek Polacek <polacek@redhat.com>
1299
1300 PR c/64918
1301 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1302 (output_init_element): Likewise.
1303
0173bd2a
MP
13042015-05-07 Marek Polacek <polacek@redhat.com>
1305
1306 PR c/65179
1307 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1308 value.
1309
9babc352
MP
13102015-04-30 Marek Polacek <polacek@redhat.com>
1311
1312 * c-typeck.c (set_init_label): Call error_at instead of error and
1313 pass LOC to it.
1314
ac9f18db
MP
1315 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1316 the type of a decl.
1317
ec3fba51
MP
1318 * c-typeck.c (c_build_va_arg): Clarify the error message.
1319
b811915d
TS
13202015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1321
1322 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1323 OMP_STANDALONE_CLAUSES.
1324
f3075008
MP
13252015-04-28 Marek Polacek <polacek@redhat.com>
1326
1327 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1328
4e81b788
MP
13292015-04-28 Marek Polacek <polacek@redhat.com>
1330
1331 PR c/65901
1332 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1333
6c1db78e
MP
13342015-04-25 Marek Polacek <polacek@redhat.com>
1335
1336 PR c/52085
1337 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1338 attribute.
1339
5c4abbb8
MP
13402015-04-23 Marek Polacek <polacek@redhat.com>
1341
1342 PR c/65345
1343 * c-decl.c (set_labels_context_r): New function.
1344 (store_parm_decls): Call it via walk_tree_without_duplicates.
1345 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1346 instead of create_tmp_var. Build TARGET_EXPR instead of
1347 COMPOUND_EXPR.
1348 (build_atomic_assign): Use create_tmp_var_raw instead of
1349 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1350
06aca1d5
IV
13512015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1352
1353 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1354 (c_parser_omp_target_update): Add missed %> to error_at ().
1355
8fba1830
BRF
13562015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1357
1358 PR target/55143
1359 * c-decl.c (c_default_pointer_mode): Remove definition.
1360 * c-tree.h (c_default_pointer_mode): Remove declaration.
1361
62021f64
TB
13622015-03-27 Tobias Burnus <burnus@net-b.de>
1363
1364 PR c/65586
1365 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1366 error out.
1367 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1368 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1369 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1370
9b65e171
JJ
13712015-03-19 Jakub Jelinek <jakub@redhat.com>
1372
1373 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1374 attribute for DECL_EXTERNAL VAR_DECLs.
1375
17958621
JJ
13762015-03-11 Jakub Jelinek <jakub@redhat.com>
1377
1378 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1379 argument.
1380
7ccb1a11
JJ
13812015-03-10 Jakub Jelinek <jakub@redhat.com>
1382
1383 PR c/65120
1384 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1385 before preparing arguments to warn_logical_not_parentheses.
1386
01177669
JJ
13872015-03-09 Jakub Jelinek <jakub@redhat.com>
1388
1389 PR c/65120
1390 * c-typeck.c (parser_build_binary_op): Don't warn for
1391 !!x == y or !b == y where b is _Bool.
1392
802ac282
MP
13932015-03-09 Marek Polacek <polacek@redhat.com>
1394
1395 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1396 * c-decl.c (grokdeclarator): Likewise.
1397 * c-typeck.c (build_binary_op): Likewise.
1398
e5165b60
MP
13992015-02-27 Marek Polacek <polacek@redhat.com>
1400
1401 PR c/65228
1402 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1403
065d214c
MP
14042015-02-14 Marek Polacek <polacek@redhat.com>
1405
1406 PR c/64768
1407 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1408 declared through a typedef name.
1409
e5d9235b
MP
14102015-02-13 Marek Polacek <polacek@redhat.com>
1411
1412 PR c/65050
1413 * c-decl.c (grokdeclarator): Print also the type when giving
1414 the error message about array's incomplete element type.
1415
fa01ffcc
JJ
14162015-02-11 Jakub Jelinek <jakub@redhat.com>
1417
1418 PR c/64824
1419 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1420 check in the POP macro.
1421
c3e38a03
MP
14222015-02-09 Marek Polacek <polacek@redhat.com>
1423
1424 PR c/64856
1425 * c-typeck.c (process_init_element): Don't always wrap
1426 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1427 initializing a range of elements.
1428
4886ec8e
JJ
14292015-02-04 Jakub Jelinek <jakub@redhat.com>
1430
1431 PR c/64824
1432 PR c/64868
1433 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1434
c3e38a03 14352015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
1436
1437 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1438 processing enum declaration.
1439
7b33f0c8
MP
14402015-01-29 Marek Polacek <polacek@redhat.com>
1441
1442 PR c/64709
1443 * c-typeck.c (pop_init_level): If constructor_elements has
1444 exactly one element with integer_zerop value, set constructor_zeroinit
1445 to 1. Remove braces around warning_init call.
1446
dea63e49
JJ
14472015-01-27 Jakub Jelinek <jakub@redhat.com>
1448
1449 PR c/64766
1450 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1451 of FUNCTION_DECLs with error_mark_node.
1452
d38f7dce
JJ
14532015-01-26 Jakub Jelinek <jakub@redhat.com>
1454
1455 PR c/64778
1456 * c-typeck.c (convert_arguments): Return -1 if there are
1457 error_args, even if we've diagnosed too many arguments.
1458
cbf5d0e7
RB
14592015-01-21 Richard Biener <rguenther@suse.de>
1460
1461 PR middle-end/64313
1462 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1463 for builtins the user declared correctly.
1464
41dbbb37
TS
14652015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1466 Bernd Schmidt <bernds@codesourcery.com>
1467 Cesar Philippidis <cesar@codesourcery.com>
1468 James Norris <jnorris@codesourcery.com>
1469 Jakub Jelinek <jakub@redhat.com>
1470 Ilmir Usmanov <i.usmanov@samsung.com>
1471
1472 * c-parser.c: Include "gomp-constants.h".
1473 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1474 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1475 Use OMP_CLAUSE_SET_MAP_KIND.
1476 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1477 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1478 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1479 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1480 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1481 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1482 "copyout", "create", "delete", "deviceptr", "gang", "host",
1483 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1484 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1485 "present_or_create", "pcreate", "seq", "self", "vector",
1486 "vector_length", "wait", "worker".
1487 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1488 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1489 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1490 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1491 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1492 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1493 (c_parser_oacc_data_clause_deviceptr)
1494 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1495 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1496 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1497 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1498 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1499 (c_parser_oacc_parallel, c_parser_oacc_update)
1500 (c_parser_oacc_wait): New functions.
1501 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1502 (c_finish_oacc_data): New prototypes.
1503 * c-typeck.c: Include "gomp-constants.h".
1504 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1505 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1506 OMP_CLAUSE_SET_MAP_KIND.
1507 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1508 (c_finish_oacc_data): New functions.
1509 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1510 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1511 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1512 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1513 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1514 GOMP_MAP_FORCE_DEVICEPTR.
1515
adfac8df
JJ
15162015-01-09 Michael Collison <michael.collison@linaro.org>
1517
1518 * c-array-notation.c: Include hash-set.h, machmode.h,
1519 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1520 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1521 * c-aux-info.c: Ditto.
1522 * c-convert.c: Ditto.
1523 * c-decl.c: Ditto.
1524 * c-errors.c: Ditto.
1525 * c-lang.c: Dittoxs.
1526 * c-objc-common.c: Ditto.
1527 * c-parser.c: Ditto.
1528 * c-typeck.c: Include hash-set.h, machmode.h,
1529 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1530 fold-const.h, wide-int.h, inchash.h, real.h and
1531 fixed-value.h due to flattening of tree.h.
1532
2cc901dc
MP
15332015-01-07 Marek Polacek <polacek@redhat.com>
1534
1535 PR c/64417
1536 * c-typeck.c (process_init_element): Disallow initialization of
1537 a flexible array member with a string constant if the structure
1538 is in an array.
1539
5624e564
JJ
15402015-01-05 Jakub Jelinek <jakub@redhat.com>
1541
e5341100
JJ
1542 PR sanitizer/64344
1543 * c-typeck.c (convert_for_assignment, c_finish_return): For
1544 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1545 types also set in_late_binary_op around convert call.
1546 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1547 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1548 result on expr as last argument to ubsan_instrument_float_cast,
1549 if in_late_binary_op, don't use c_save_expr but save_expr.
1550
5624e564
JJ
1551 Update copyright years.
1552
5bd012f8
MP
15532015-01-05 Marek Polacek <polacek@redhat.com>
1554
1555 PR c/64423
1556 * c-typeck.c (build_array_ref): Pass loc down to
1557 warn_array_subscript_with_type_char.
1558
768952be
MU
15592014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1560
1561 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1562 (common-pointer-type): For pointers to arrays take qualifiers from
1563 element type.
1564 (build_conditional_expr): Add warnings for lost qualifiers.
1565 (comp-target-types): Allow pointers to arrays with different qualifiers.
1566 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1567 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1568 to PEDWARN_FOR_QUALIFIERS.
1569
8f94a8c4
JJ
15702014-12-17 Jakub Jelinek <jakub@redhat.com>
1571
1572 PR sanitizer/64289
1573 * c-convert.c: Include ubsan.h.
1574 (convert): For real -> integral casts and
1575 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1576 instead instrument the float cast directly.
1577
b731b390
JJ
15782014-11-29 Jakub Jelinek <jakub@redhat.com>
1579
1580 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1581 c_finish_stmt_expr): Remove NULL last argument from
1582 create_tmp_var_raw and create_tmp_var calls.
1583 * c-array-notation.c (fix_builtin_array_notation_fn,
1584 build_array_notation_expr, fix_conditional_array_notations_1,
1585 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1586
541e35a6
MP
15872014-11-28 Marek Polacek <polacek@redhat.com>
1588
1589 PR c/63862
1590 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1591 convert the right operand to integer type.
1592
b286be94
MP
15932014-11-25 Marek Polacek <polacek@redhat.com>
1594
1595 PR c/63877
1596 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1597 for inline functions.
1598
aa7da51a
JJ
15992014-11-21 Jakub Jelinek <jakub@redhat.com>
1600
1601 PR target/63764
1602 * c-typeck.c (build_array_ref): Adjust
1603 convert_vector_to_pointer_for_subscript caller. If it returns true,
1604 call non_lvalue_loc on the result.
1605
d876207f
RB
16062014-11-11 Richard Biener <rguenther@suse.de>
1607
1608 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1609 to true.
1610
e5e44252
AK
16112014-11-10 Andi Kleen <ak@linux.intel.com>
1612
1613 PR c/60804
1614 * c-parser.c (c_parser_statement_after_labels): Call
1615 check_no_cilk.
1616 (c_parser_if_statement): Dito.
1617 (c_parser_switch_statement): Dito.
1618 (c_parser_while_statement): Dito.
1619 (c_parser_do_statement): Dito.
1620 (c_parser_for_statement): Dito.
1621 * c-typeck.c (c_finish_loop): Dito.
1622
13c21655
PC
16232014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1624
1625 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1626 OPT_Wshift_count_overflow in the warnings.
1627
2d51fcef
MP
16282014-10-30 Marek Polacek <polacek@redhat.com>
1629
1630 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1631 print the stripped version as well, if they're not the same.
1632
ef4bddc2
RS
16332014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1634
1635 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1636 machine_mode.
1637
c582198b
AM
16382014-10-28 Andrew MacLeod <amacleod@redhat.com>
1639
1640 * c-decl.c: Adjust include files.
1641 * c-parser.c: Ditto.
1642
ddc8de03
PM
16432014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1644 Tom Tromey <tromey@redhat.com>
1645
1646 * c-tree.h (enum c_oracle_request): New.
1647 (c_binding_oracle_function): New typedef.
1648 (c_binding_oracle, c_pushtag, c_bind): Declare.
1649 * c-decl.c (c_binding_oracle): New global.
1650 (I_SYMBOL_CHECKED): New macro.
1651 (i_symbol_binding): New function.
1652 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1653 (I_TAG_CHECKED): New macro.
1654 (i_tag_binding): New function.
1655 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1656 (I_LABEL_CHECKED): New macro.
1657 (i_label_binding): New function.
1658 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1659 (c_print_identifier): Save and restore c_binding_oracle.
1660 (c_pushtag, c_bind): New functions.
1661
60393bbc
AM
16622014-10-27 Andrew MacLeod <amacleod@redhat.com>
1663
1664 * c-typeck.c: Adjust include files.
1665
d723bb7c
MLI
16662014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1667
1668 PR c++/53061
1669 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1670 initialization here...
1671 (c_initialize_diagnostics): ... but here. Set defaults after
1672 building pretty-printer.
1673
1bc5a451
MP
16742014-10-23 Marek Polacek <polacek@redhat.com>
1675
1676 PR c/63626
1677 * c-decl.c (pop_scope): Don't print warning in external_scope.
1678
4435bb92
MP
16792014-10-19 Marek Polacek <polacek@redhat.com>
1680
1681 PR c/63567
1682 * c-typeck.c (output_init_element): Allow initializing objects with
1683 static storage duration with compound literals even in C99 and add
1684 pedwarn for it.
1685
7278465e
MP
16862014-10-17 Marek Polacek <polacek@redhat.com>
1687
1688 PR c/63567
1689 * c-typeck.c (digest_init): Allow initializing objects with static
1690 storage duration with compound literals even in C99 and add pedwarn
1691 for it.
1692
d9b7be2e
MP
16932014-10-17 Marek Polacek <polacek@redhat.com>
1694
1695 PR c/63543
1696 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1697 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1698 error multiple times. Print the type.
1699
f406ae1f
MP
17002014-10-17 Marek Polacek <polacek@redhat.com>
1701
1702 PR c/63549
1703 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1704 type.
1705
92574c7c
MP
17062014-10-17 Marek Polacek <polacek@redhat.com>
1707
1708 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1709 (start_function): Use OPT_Wimplicit_int instead of 0.
1710 (store_parm_decls_oldstyle): Likewise.
1711
1bc4a978
MT
17122014-10-17 Alan Modra <amodra@gmail.com>
1713
1714 PR middle-end/61848
1715 * c-decl.c (merge_decls): Don't merge section name or tls model
1716 to newdecl symtab node, instead merge to olddecl. Override
1717 existing olddecl section name. Set tls_model for all thread-local
1718 vars, not just OMP thread-private ones. Remove incorrect comment.
1719
83685514
AM
17202014-10-16 Andrew MacLeod <amacleod@redhat.com>
1721
1722 * c-decl.c: Adjust include files.
1723
78a7c317
DD
17242014-10-14 DJ Delorie <dj@redhat.com>
1725
1726 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1727 (c_token_starts_typename): Check all __intN, not just __int128.
1728 (c_token_starts_declspecs): Likewise.
1729 (c_parser_declspecs): Likewise.
1730 (c_parser_attribute_any_word): Likewise.
1731 (c_parser_objc_selector): Likewise.
1732 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1733 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1734 is specified.
1735 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1736 __int128.
1737 (finish_declspecs): Likewise.
1738
74d98c1e
AB
17392014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1740
1741 * c-parser.c (c_parser_all_labels): New function to replace
1742 the duplicate code.
1743 (c_parser_statement): Call the new function.
1744
84937de2
MP
17452014-10-09 Marek Polacek <polacek@redhat.com>
1746
1747 PR c/63480
1748 * c-typeck.c (pop_init_level): Don't warn about initializing
1749 with { }.
1750
0382aaa0
MP
17512014-10-07 Marek Polacek <polacek@redhat.com>
1752
1753 PR c/59717
1754 * c-decl.c (header_for_builtin_fn): New function.
1755 (implicitly_declare): Suggest which header to include.
1756
7a0ca710
MP
17572014-10-07 Marek Polacek <polacek@redhat.com>
1758
1759 * c-convert.c (convert): Use error_operand_p.
1760 * c-typeck.c (require_complete_type): Likewise.
1761 (really_atomic_lvalue): Likewise.
1762 (digest_init): Likewise.
1763 (handle_omp_array_sections_1): Likewise.
1764
6bc8a126
MP
17652014-10-03 Marek Polacek <polacek@redhat.com>
1766
1767 PR c/63453
1768 * c-decl.c (pop_scope): Don't warn about "inline function declared
1769 but never defined" for functions marked with gnu_inline attribute.
1770
d90c0a59
JJ
17712014-09-25 Jakub Jelinek <jakub@redhat.com>
1772
1773 PR c++/63249
1774 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1775 on low_bound and length.
1776
083e891e
MP
17772014-09-24 Marek Polacek <polacek@redhat.com>
1778
1779 PR c/61405
1780 PR c/53874
1781 * c-parser.c: Don't define CPP_KEYWORD.
1782 (c_parser_switch_statement): Pass original type to c_finish_case.
1783 * c-tree.h (c_finish_case): Update declaration.
1784 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1785 conditionally to c_do_switch_warnings.
1786
8d95fe25
MP
17872014-09-03 Marek Polacek <polacek@redhat.com>
1788
1789 PR c/62024
1790 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1791 conversions.
1792
9a771876
JJ
17932014-09-02 Jakub Jelinek <jakub@redhat.com>
1794 Balaji V. Iyer <balaji.v.iyer@intel.com>
1795 Igor Zamyatin <igor.zamyatin@intel.com>
1796
1797 * c-parser.c (c_parser_cilk_for): New function.
1798 (c_parser_cilk_grainsize): Likewise.
1799 (c_get_temp_regvar): Likewise.
1800 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1801 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1802 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1803 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1804 case.
1805
b7679d96
CG
18062014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1807
1808 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1809 with using HOST_WIDE_INT without truncation to 'int'
1810
59ea0364
MP
18112014-08-22 Marek Polacek <polacek@redhat.com>
1812
1813 PR c++/62199
1814 * c-typeck.c (parser_build_binary_op): Adjust call to
1815 warn_logical_not_parentheses.
1816
671a475e
IZ
18172014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1818
1819 PR other/62008
1820 * c-parser.c (c_parser_array_notation): Check for correct
1821 type of an array added.
1822
04159acf
MP
18232014-08-19 Marek Polacek <polacek@redhat.com>
1824
1825 PR c++/62153
1826 * c-typeck.c (build_binary_op): If either operand of a comparison
1827 is a boolean expression, call maybe_warn_bool_compare.
1828
c77935ee
PP
18292014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1830
1831 PR c/45584
1832 * c-typeck.c (build_c_cast): Do a conversion even when the
1833 TYPE_MAIN_VARIANTs are the same.
1834
35aff4fb
MP
18352014-08-19 Marek Polacek <polacek@redhat.com>
1836
1837 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1838 pedwarn_c99 instead of pedwarn.
1839 (grokfield): Likewise.
1840 (warn_defaults_to): New function.
1841 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1842 Unconditionally call pedwarn_c99 instead of pedwarn.
1843 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1844 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1845 check flag_isoc11 before.
1846 * c-errors.c (pedwarn_c99): Change the return type to bool.
1847 Handle -Wc99-c11-compat.
1848 * c-parser.c (disable_extension_diagnostics): Handle
1849 warn_c99_c11_compat.
1850 (restore_extension_diagnostics): Likewise.
1851 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1852 instead of pedwarn, don't check flag_isoc11 before.
1853 (c_parser_declspecs): Likewise.
1854 (c_parser_alignas_specifier): Likewise.
1855 (c_parser_alignof_expression): Likewise.
1856 (c_parser_generic_selection): Likewise.
1857 * c-tree.h (pedwarn_c99): Update declaration.
1858 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1859 of pedwarn_c99.
1860
177cce46
MP
18612014-08-19 Marek Polacek <polacek@redhat.com>
1862
1863 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1864 to pedwarn_c90.
1865 * c-errors.c: Include "opts.h".
1866 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1867 * c-parser.c (disable_extension_diagnostics): Handle negative value
1868 of warn_c90_c99_compat, too.
1869 (restore_extension_diagnostics): Likewise.
1870 (c_parser_compound_statement_nostart): Pass
1871 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1872
6dc99c33
MP
18732014-08-12 Marek Polacek <polacek@redhat.com>
1874
1875 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1876 Add pedwarn.
1877 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1878 Likewise.
1879 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1880
f3bede71
MP
18812014-08-10 Marek Polacek <polacek@redhat.com>
1882
1883 PR c/51849
1884 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1885 Call pedwarn_c90 instead of pedwarn.
1886 (check_bitfield_type_and_width): Likewise.
1887 (declspecs_add_qual): Likewise.
1888 (declspecs_add_type): Likewise.
1889 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1890 Adjust to only call pedwarn_c90.
1891 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1892 pedwarn_c90 instead of pedwarn.
1893 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1894 * c-parser.c (disable_extension_diagnostics): Handle
1895 warn_c90_c99_compat.
1896 (restore_extension_diagnostics): Likewise.
1897 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1898 pedwarn_c90 instead of pedwarn.
1899 (c_parser_initelt): Likewise.
1900 (c_parser_postfix_expression): Likewise.
1901 (c_parser_postfix_expression_after_paren_type): Likewise.
1902 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1903 * c-tree.h: Fix formatting.
1904 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
1905 pedwarn_c90 instead of pedwarn.
1906
9f25a338
TS
19072014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1908
1909 * c-typeck.c: Remove include of pointer-set.h.
1910
044331a8
MP
19112014-08-07 Marek Polacek <polacek@redhat.com>
1912
1913 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1914
b787e7a2
TS
19152014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1916
1917 * c-typeck.c: Use hash_map instead of pointer_map.
1918
6e2830c3
TS
19192014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1920
1921 * c-decl.c: Use hash_set instead of pointer_set.
1922
a7ee52fb
IZ
19232014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
1924
1925 PR middle-end/61455
1926 * c-array-notation.c (expand_array_notations): Handling
1927 of DECL_EXPR added.
1928
b4dfdc11
MG
19292014-07-31 Marc Glisse <marc.glisse@inria.fr>
1930
1931 PR c++/60517
1932 * c-typeck.c (c_finish_return): Return 0 instead of the address of
1933 a local variable.
1934
976d5a22
TT
19352014-07-30 Tom Tromey <tromey@redhat.com>
1936
1937 * c-typeck.c (struct constructor_stack) <designator_depth>: New
1938 field.
1939 (really_start_incremental_init, push_init_level): Initialize
1940 designator_depth.
1941 (pop_init_level): Set global designator_depth.
1942 (process_init_element): Check for designated_init attribute.
1943
30281de2
MP
19442014-07-20 Marek Polacek <polacek@redhat.com>
1945
1946 PR c/61852
1947 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
1948 (implicitly_declare): Pass location to implicit_decl_warning.
1949
b108f48f
JJ
19502014-07-14 Jakub Jelinek <jakub@redhat.com>
1951
1952 PR middle-end/61294
1953 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
1954 If non-NULL, call c_parser_check_literal_zero.
1955 (c_parser_check_literal_zero): New function.
1956 (c_parser_postfix_expression_after_primary): Adjust
1957 c_parser_expr_list caller, handle -Wmemset-transposed-args.
1958
773ec47f
MP
19592014-07-06 Marek Polacek <polacek@redhat.com>
1960
1961 PR c/6940
1962 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
1963 * c-tree.h (C_ARRAY_PARAMETER): Define.
1964 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
1965 function parameter.
1966
22e1cf1c
JH
19672014-07-02 Jan Hubicka <hubicka@ucw.cz>
1968 Chen Gang <gang.chen.5i5j@gmail.com>
1969
1970 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
1971 releasing symbol.
1972
52ec0ea3
MP
19732014-07-01 Marek Polacek <polacek@redhat.com>
1974
1975 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
1976 instead of 0 to WARN_FOR_ASSIGNMENT.
1977
d5c3d343
MP
19782014-07-01 Marek Polacek <polacek@redhat.com>
1979
1980 PR c/58286
1981 * c-typeck.c (convert_for_assignment): Pass
1982 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
1983
6a7253a4
MP
19842014-06-30 Marek Polacek <polacek@redhat.com>
1985
1986 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
1987 has no_sanitize_undefined attribute.
1988
5e88a8f4
IZ
19892014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
1990
1991 PR middle-end/57541
1992 * c-array-notation.c (fix_builtin_array_notation_fn):
1993 Check for 0 arguments in builtin call. Check that bultin argument is
1994 correct.
1995 * c-parser.c (c_parser_array_notation): Check for incorrect initial
1996 index.
1997
9698b078
SH
19982014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
1999
2000 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2001 qualifiers in __auto_type for atomic types.
2002 (c_parser_typeof_specifier): Discard all type qualifiers in
2003 __typeof__ for atomic types.
2004
6e07c515
MP
20052014-06-25 Marek Polacek <polacek@redhat.com>
2006
2007 PR c/61162
2008 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2009 the return expression to c_finish_return.
2010
da6f124d
JJ
20112014-06-25 Jakub Jelinek <jakub@redhat.com>
2012
2013 * c-typeck.c (c_finish_omp_clauses): Make sure
2014 OMP_CLAUSE_LINEAR_STEP has correct type.
2015
c203e8a7
TS
20162014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2017
2018 * c-decl.c: Adjust.
2019
56ad0e38
JJ
20202014-06-24 Jakub Jelinek <jakub@redhat.com>
2021
2022 * c-parser.c (c_parser_omp_for_loop): For
2023 #pragma omp parallel for simd move lastprivate clause from parallel
2024 to for rather than simd.
2025
47c2554f
MP
20262014-06-23 Marek Polacek <polacek@redhat.com>
2027
2028 * c-typeck.c (parser_build_binary_op): Don't call
2029 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2030
56363ffd
JH
20312014-06-15 Jan Hubicka <hubicka@ucw.cz>
2032
2033 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2034 * c-decl.c (merge_decls): Likewise.
2035
d7ff7ae5
MP
20362014-06-09 Marek Polacek <polacek@redhat.com>
2037
2038 PR c/36446
2039 * c-typeck.c (error_init): Call inform instead of error_at.
2040 (pedwarn_init): Call inform instead of pedwarn.
2041 (warning_init): Call inform instead of warning_at.
2042
24d047a3
JH
20432014-06-07 Jan Hubicka <hubicka@ucw.cz>
2044
2045 * c-decl.c (merge_decls): Use set_decl_section_name.
2046 (duplicate_decls): Remove node if it exists.
2047
9bac5cbb
G
20482014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2049
2050 PR c/53119
2051 * c-typeck.c (push_init_level, process_init_element,
2052 pop_init_level): Correct check for zero initialization, move
2053 missing brace warning to respect zero initialization.
2054
8ffcdea8
MP
20552014-06-05 Marek Polacek <polacek@redhat.com>
2056
2057 PR c/56724
2058 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2059
742938c9
MP
20602014-06-05 Marek Polacek <polacek@redhat.com>
2061
2062 PR c/49706
2063 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2064 on the left hand side operand of a comparison.
2065
6447c55d
MP
20662014-06-05 Marek Polacek <polacek@redhat.com>
2067
2068 PR c/48062
2069 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2070 Print note only if the warning was printed.
2071
9dc7743c
IZ
20722014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2073
2074 PR c/58942
2075 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2076 with a pointer.
2077
fedfecef
MP
20782014-06-03 Marek Polacek <polacek@redhat.com>
2079
2080 PR c/60439
2081 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2082 c_start_case.
2083 * c-tree.h (c_start_case): Update.
2084 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2085 switch condition has boolean value.
2086
9b2b7279
AM
20872014-06-02 Andrew MacLeod <amacleod@redhat.com>
2088
2089 * c-decl.c: Include builtins.h.
2090 * c-parser.c: Likewise.
2091
5c1bc275
MP
20922014-05-27 Marek Polacek <polacek@redhat.com>
2093
2094 PR c/56724
2095 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2096 error and warning calls to error_at and warning_at. Pass location of
2097 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2098 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2099 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2100
97563bc8
IZ
21012014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2102
2103 PR c/61191
2104 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2105 function parameters.
2106
aede2c10
JH
21072014-05-23 Jan Hubicka <hubicka@ucw.cz>
2108
2109 * c-decl.c (merge_decls): Preserve symtab node pointers.
2110 (duplicate_decls): Free new decl.
2111
edbba2ce
TS
21122014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2113
f3316c6d
TS
2114 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2115 initialization.
2116
edbba2ce
TS
2117 * c-parser.c (c_parser_omp_target): Return bool values.
2118
68c81f24
TS
21192014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2120
2121 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2122 num_teams_loc variable to num_thread_limit_loc.
2123
632f2871
RS
21242014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2125
2126 * c-array-notation.c (expand_array_notations): Use void_node
2127 instead of void_zero_node.
2128
766090c2
TS
21292014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2130
2131 * c-decl.c (finish_struct): Adjust.
2132 (finish_enum): Likewise.
2133 (bind): Adjust.
2134 (record_inline_static): Likewise.
2135 (push_scope): Likewise.
2136 (make_label): Likewise.
2137 (lookup_label_for_goto): Likewise.
2138 (finish_struct): Likewise.
2139 (finish_enum): Likewise.
2140 (store_parm_decls): Likewise.
2141 (c_push_function_context): Likewise.
2142 * c-lang.h: Remove usage of variable_size gty attribute.
2143 * c-parser.c (c_parse_init): Adjust.
2144 (c_parse_file): Likewise.
2145
2b107f6b
MP
21462014-05-13 Marek Polacek <polacek@redhat.com>
2147
2148 PR c/61162
2149 * c-typeck.c (convert_for_assignment): Pass location to
2150 WARN_FOR_ASSIGNMENT instead of input_location.
2151
d033409e
MP
21522014-05-10 Marek Polacek <polacek@redhat.com>
2153
2154 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2155 maybe_warn_string_init.
2156 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2157 maybe_warn_string_init.
2158 * c-tree.h (maybe_warn_string_init): Update declaration.
2159 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2160 Call pedwarn_init with loc instead of with input_location.
2161 (digest_init): Pass init_loc to maybe_warn_string_init.
2162 (pop_init_level): Call pedwarn_init with loc instead of with
2163 input_location.
2164 (set_init_index): Likewise.
2165 (process_init_element): Likewise.
2166
ea58ef42
MP
21672014-05-09 Marek Polacek <polacek@redhat.com>
2168
2169 PR c/61096
2170 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2171 (c_parser_initelt): Pass location to set_init_label. Pass array index
2172 location to set_init_index.
2173 * c-tree.h (push_init_level): Update declaration.
2174 (pop_init_level): Likewise.
2175 (set_init_index): Likewise.
2176 (set_init_label): Likewise.
2177 * c-typeck.c (error_init): Add location parameter. Call error_at
2178 instead of error.
2179 (digest_init): Pass init_loc to error_init.
2180 (really_start_incremental_init):
2181 (push_init_level): Add location parameter. Pass loc to pop_init_level
2182 and error_init.
2183 (pop_init_level): Likewise.
2184 (set_designator): Add location parameter. Pass loc to pop_init_level,
2185 push_init_level, and error_init.
2186 (set_init_index): Add location parameter. Pass loc to error_init and
2187 set_designator.
2188 (set_init_label): Likewise.
2189 (output_init_element): Pass loc to error_init.
2190 (process_init_element): Pass loc to error_init, pop_init_level,
2191 pedwarn_init, and push_init_level.
2192
661a0813
MP
21932014-05-09 Marek Polacek <polacek@redhat.com>
2194
2195 PR c/50459
2196 * c-parser.c (c_parser_attributes): Parse the arguments as an
2197 expression-list if the attribute takes identifier.
2198
2793eeab
MP
21992014-05-08 Marek Polacek <polacek@redhat.com>
2200
2201 PR c/61053
2202 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2203 TYPE_ALIGN_UNIT.
2204
f827930a
MP
22052014-05-08 Marek Polacek <polacek@redhat.com>
2206
2207 PR c/61077
2208 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2209 of main.
2210
1d60af08
KZ
22112014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2212 Mike Stump <mikestump@comcast.net>
2213 Richard Sandiford <rdsandiford@googlemail.com>
2214
2215 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2216 (finish_enum): Use wide-int interfaces.
2217 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2218 * c-typeck.c (build_c_cast): Likewise.
2219 (set_nonincremental_init_from_string): Likewise.
2220 (c_tree_equal): Likewise.
2221
a0e24419
MP
22222014-05-02 Marek Polacek <polacek@redhat.com>
2223
2224 PR c/25801
2225 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2226 Return size_one_node when the type is not complete.
2227 (pointer_diff): Remove comment.
2228 (build_unary_op): Improve error messages.
2229
19fc9faa
MP
22302014-05-02 Marek Polacek <polacek@redhat.com>
2231
2232 * c-typeck.c (c_finish_return): Separate warning_at calls.
2233
63bc4e87
MP
22342014-05-02 Marek Polacek <polacek@redhat.com>
2235
2236 * c-tree.h (error_init): Remove declaration.
2237 (pedwarn_init): Likewise.
2238 * c-typeck.c (error_init): Make static and move above.
2239 (pedwarn_init): Likewise.
2240 (warning_init): Move above.
2241 (maybe_warn_string_init): Likewise.
2242
4bd2511b
JL
22432014-05-01 Jeff Law <law@redhat.com>
2244
2245 Revert:
2246
2247 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2248 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2249 avoid goto.
2250
6a358dcb
MP
22512014-05-02 Marek Polacek <polacek@redhat.com>
2252
2253 PR c/60784
2254 * c-typeck.c (push_init_level): Set constructor_designated to
2255 p->designated for structures.
2256
ae5ebda4
MP
22572014-05-01 Marek Polacek <polacek@redhat.com>
2258
2259 PR c/60915
2260 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2261 function-definition has an attribute after the declarator.
2262
96b40f8d
MP
22632014-05-01 Marek Polacek <polacek@redhat.com>
2264
2265 PR c/60257
2266 * c-typeck.c (warning_init): Add location_t parameter. Call
2267 warning_at instead of warning.
2268 (push_init_level): Pass input_location to warning_init.
2269 (add_pending_init): Add location_t parameter. Pass loc to
2270 warning_init.
2271 (set_nonincremental_init): Pass input_location to add_pending_init.
2272 (set_nonincremental_init_from_string): Likewise.
2273 (output_init_element): Pass loc to warning_init and to
2274 add_pending_init.
2275
32e00768
MP
22762014-05-01 Marek Polacek <polacek@redhat.com>
2277
2278 PR c/43395
2279 * c-typeck.c (c_finish_return): Distinguish between label and variable
2280 when warning about returning local address.
2281
c9379ce2
MP
22822014-05-01 Marek Polacek <polacek@redhat.com>
2283
2284 PR c/29467
2285 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2286 in C89 mode.
2287
d00887e8
MP
22882014-05-01 Marek Polacek <polacek@redhat.com>
2289
2290 PR c/43245
2291 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2292 instead of 0 to WARN_FOR_QUALIFIERS.
2293
5436fa2e
MP
22942014-05-01 Marek Polacek <polacek@redhat.com>
2295
2296 PR c/56989
2297 * c-typeck.c (default_conversion): Use better location for
2298 error call.
2299
f8ed5150
MP
23002014-04-30 Marek Polacek <polacek@redhat.com>
2301
2302 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2303 also when SANITIZE_FLOAT_DIVIDE is on.
2304
8337d1db
MP
23052014-04-30 Marek Polacek <polacek@redhat.com>
2306
2307 PR c/60139
2308 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2309 and pedwarn_init. Use loc insted of input_location.
2310
c4bdc42f
MP
23112014-04-30 Marek Polacek <polacek@redhat.com>
2312
2313 PR c/60351
2314 * c-typeck.c (build_binary_op): Use location when warning about
2315 shift count.
2316
45484dcf
MP
23172014-04-25 Marek Polacek <polacek@redhat.com>
2318
2319 PR c/18079
2320 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2321 always_inline/noinline and hot/cold attributes.
2322
34cf811f
MP
23232014-04-25 Marek Polacek <polacek@redhat.com>
2324
2325 PR c/60114
2326 * c-parser.c (c_parser_initelt): Pass input_location to
2327 process_init_element.
2328 (c_parser_initval): Pass loc to process_init_element.
2329 * c-tree.h (process_init_element): Adjust declaration.
2330 * c-typeck.c (push_init_level): Pass input_location to
2331 process_init_element.
2332 (pop_init_level): Likewise.
2333 (set_designator): Likewise.
2334 (output_init_element): Add location_t parameter. Pass loc to
2335 digest_init.
2336 (output_pending_init_elements): Pass input_location to
2337 output_init_element.
2338 (process_init_element): Add location_t parameter. Pass loc to
2339 output_init_element.
2340
42056eac
JJ
23412014-04-24 Jakub Jelinek <jakub@redhat.com>
2342
2343 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2344 atomic-clause, allow comma in between atomic-clause and
2345 seq_cst.
2346
e162a134
JJ
23472014-04-22 Jakub Jelinek <jakub@redhat.com>
2348
2349 PR c/59073
2350 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2351 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2352
2f6babac
IZ
23532014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2354
2355 PR middle-end/60469
2356 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2357 create_tmp_var instead build_decl for creating temps.
2358 (build_array_notation_expr): Likewise.
2359 (fix_conditional_array_notations_1): Likewise.
2360 (fix_array_notation_expr): Likewise.
2361 (fix_array_notation_call_expr): Likewise.
2362
8edbfaa6
JJ
23632014-03-28 Jakub Jelinek <jakub@redhat.com>
2364
2365 PR c++/60689
2366 * c-tree.h (c_build_function_call_vec): New prototype.
2367 * c-typeck.c (build_function_call_vec): Don't call
2368 resolve_overloaded_builtin here.
2369 (c_build_function_call_vec): New wrapper function around
2370 build_function_call_vec. Call resolve_overloaded_builtin here.
2371 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2372 Call c_build_function_call_vec instead of build_function_call_vec.
2373 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2374 * c-decl.c (finish_decl): Likewise.
2375
7485aeea
MLI
23762014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2377
2378 PR c/55383
2379 * c-typeck.c: Use correct format string in cast-qual warning
2380
b17a8b07
TS
23812014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2382
2383 * c-decl.c (c_decl_attributes): Use
2384 lang_hooks.types.omp_mappable_type.
2385 * c-typeck.c (c_finish_omp_clauses): Likewise.
2386
3af9c5e9
MP
23872014-03-06 Marek Polacek <polacek@redhat.com>
2388
2389 PR c/60197
2390 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2391 of checking tree code.
2392
1c9f5f33
PK
23932014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2394
2395 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2396 (c_parser_parameter_declaration): Likewise.
2397
cc28fc7f
MP
23982014-02-19 Marek Polacek <polacek@redhat.com>
2399
2400 PR c/60195
2401 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2402 Call mark_exp_read on exp.value.
2403 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2404 TREE_ADDRESSABLE on old instead of val.
2405 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2406
b581c05c
PK
24072014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2408
2409 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2410 C_EXPR_APPEND by vec_safe_push.
2411 * c-tree.h (C_EXPR_APPEND): Remove.
2412
81e5eca8
MP
24132014-01-31 Marek Polacek <polacek@redhat.com>
2414
2415 PR c/59963
2416 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2417 build_function_call_vec.
2418 (build_function_call): Likewise.
2419 (build_atomic_assign): Likewise.
2420 (build_function_call_vec): Add arg_loc parameter. Use it.
2421 (convert_arguments): Likewise.
2422 (convert_for_assignment): Rename rhs_loc to expr_loc.
2423 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2424 (c_parser_objc_keywordexpr): Likewise.
2425 (c_parser_postfix_expression_after_primary): Call
2426 build_function_call_vec with expr_loc rather than op_loc.
2427 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2428 build_function_call_vec.
2429 (c_parser_expr_list): Add locations parameter. Fill it with locations
2430 of function arguments.
2431 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2432
68fca595
MP
24332014-01-30 Marek Polacek <polacek@redhat.com>
2434
2435 PR c/59940
2436 * c-typeck.c (build_function_call_vec): Use loc parameter.
2437 (convert_arguments): Add location parameter. Use it.
2438 (ep_convert_and_check): Likewise.
2439 (build_atomic_assign): Adjust convert_for_assignment call.
2440 (build_modify_expr): Likewise.
2441 (digest_init): Likewise.
2442 (c_finish_return): Likewise.
2443 (build_conditional_expr): Adjust ep_convert_and_check calls.
2444 (convert_for_assignment): Add rhs_loc parameter. Use it.
2445 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2446 calls.
2447
fa337f3a
RB
24482014-01-30 Richard Biener <rguenther@suse.de>
2449
2450 PR c/59905
2451 * c-typeck.c (build_function_call_vec): Do not replace calls
2452 to a function via an incompatible type with a runtime abort.
2453
b72271b9
BI
24542014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2455
2456 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2457 flag_enable_cilkplus with flag_cilkplus.
2458 (c_parser_direct_declarator_inner): Likewise.
2459 (c_parser_attribute_any_word): Likewise.
2460 (c_parser_attributes): Likewise.
2461 (c_parser_compound_statement): Likewise.
2462 (c_parser_statement_after_labels): Likewise.
2463 (c_parser_if_statement): Likewise.
2464 (c_parser_switch_statement): Likewise.
2465 (c_parser_do_statement): Likewise.
2466 (c_parser_for_statement): Likewise.
2467 (c_parser_unary_expression): Likewise.
2468 (c_parser_postfix_expression): Likewise.
2469 (c_parser_postfix_expression_after_primary): Likewise.
2470 (c_parser_postfix_expression_after_primary): Likewise.
2471 (c_parser_omp_clause_name): Likewise.
2472 (c_finish_omp_declare_simd): Likewise.
2473 (c_parser_cilk_verify_simd): Likewise.
2474 * c-typeck.c (build_array_ref): Likewise.
2475 (build_function_call_vec): Likewise.
2476 (convert_arguments): Likewise.
2477 (build_compound_expr): Likewise.
2478 (c_finish_return): Likewise.
2479 (c_finish_if_stmt): Likewise.
2480 (c_finish_loop): Likewise.
2481 (build_binary_op): Likewise.
2482
393e8e8b
MP
24832014-01-23 Marek Polacek <polacek@redhat.com>
2484
2485 PR c/59846
2486 * c-typeck.c (parser_build_binary_op): Use location instead of
2487 input_location.
2488 (build_binary_op): Pass location to shorten_compare.
2489
f04dda30
MP
24902014-01-23 Marek Polacek <polacek@redhat.com>
2491
2492 PR c/58346
2493 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2494 an empty aggregate.
2495
789eadcd
MP
24962014-01-23 Marek Polacek <polacek@redhat.com>
2497
2498 PR c/59871
2499 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2500 of a comma expression.
2501 (emit_side_effect_warnings): Likewise.
2502
40f14e9f
BI
25032014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2504
2505 PR c/59825
2506 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2507 function to use walk_tree and moved a lot of its functionality to
2508 expand_array_notations.
2509 (expand_array_notations): New function.
2510
74558dd9
BI
25112014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2512
2513 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2514 attribute an attribute without value.
2515
652fea39
JJ
25162014-01-23 Jakub Jelinek <jakub@redhat.com>
2517
2518 PR middle-end/58809
2519 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2520 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2521
f34f1c87
MP
25222014-01-22 Marek Polacek <polacek@redhat.com>
2523
2524 PR c/59891
2525 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2526 of remove_c_maybe_const_expr on op1 and op2.
2527
241f845a
JJ
25282014-01-15 Jakub Jelinek <jakub@redhat.com>
2529
2530 PR c/58943
2531 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2532 effects, preevaluate rhs using SAVE_EXPR first.
2533
9a74f20c
BI
25342014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2535
2536 PR c++/59631
2537 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2538 statements with if-elseif statements.
2539
96066ce1
MP
25402014-01-06 Marek Polacek <polacek@redhat.com>
2541
2542 PR c/57773
2543 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2544 defined bit-field types only in ISO C.
2545
23a5b65a
RS
25462014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2547
2548 Update copyright years
2549
f9030485
RS
25502014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2551
2552 * c-array-notation.c: Use the standard form for the copyright notice.
2553
41958c28
BI
25542013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2555
2556 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2557 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2558 field in parser is not empty. If not-empty, call the function
2559 c_parser_finish_omp_declare_simd.
2560 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2561 between SIMD-enabled functions and #pragma simd. Added new parameter.
2562 (c_parser_cilk_all_clauses): Modified the usage of the function
2563 c_parser_cilk_clause_vectorlength as mentioned above.
2564 (c_parser_cilk_simd_fn_vector_attrs): New function.
2565 (c_finish_cilk_simd_fn_tokens): Likewise.
2566 (is_cilkplus_vector_p): Likewise.
2567 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2568 "nomask," and "mask" strings in clause name.
2569 (c_parser_omp_all_clauses): Added 3 new case statements:
2570 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2571 PRAGMA_CILK_CLAUSE_NOMASK.
2572 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2573 check for vector attribute and if so call the function
2574 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2575 called the function c_finish_cilk_simd_fn_tokens.
2576 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2577 parser field is non-empty. If so, parse them as you would parse
2578 the omp declare simd pragma.
2579 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2580 Added a check when step is a parameter and flag it as error.
2581 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2582 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2583 pragma_omp_clause.
2584
cef0fd0e
TS
25852013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2586
2587 * c-parser.c (c_parser_omp_parallel): Fix description.
2588
12893402
BI
25892013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2590
2591 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2592 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2593 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2594 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2595
296674db
JM
25962013-12-04 Joseph Myers <joseph@codesourcery.com>
2597
2598 PR c/52023
2599 * c-parser.c (c_parser_alignas_specifier): Use
2600 c_sizeof_or_alignof_type instead of c_alignof.
2601 (c_parser_alignof_expression): Likewise, with min_alignof
2602 parameter depending on alignof spelling used.
2603
edd28054
MP
26042013-12-04 Marek Polacek <polacek@redhat.com>
2605
2606 PR c/54113
2607 * c-decl.c (start_function): Don't warn for missing prototype for
2608 inline functions.
2609
da0fc454
MP
26102013-12-03 Marek Polacek <polacek@redhat.com>
2611
2612 PR c/59351
2613 * c-decl.c (build_compound_literal): Allow compound literals with
2614 empty initial value.
2615
4c2ecab0
JM
26162013-12-02 Joseph Myers <joseph@codesourcery.com>
2617
2618 PR c/58235
2619 * c-typeck.c (build_modify_expr): Diagnose assignment to
2620 expression with array type.
2621
340baef7
JM
26222013-11-29 Joseph Myers <joseph@codesourcery.com>
2623
2624 PR c/42262
2625 * c-typeck.c (process_init_element): Do not treat a string as
2626 initializing a whole array when used with a designator for an
2627 individual element.
2628
6763b9f7
JM
26292013-11-29 Joseph Myers <joseph@codesourcery.com>
2630
2631 PR c/57574
2632 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2633 an inline function following a static declaration.
2634
e7bd1de1
JJ
26352013-11-28 Jakub Jelinek <jakub@redhat.com>
2636
2637 PR c/59310
2638 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2639 to p_name before calling c_parser_omp_teams instead of after.
2640 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2641 argument. Remove unused p_name variable.
2642
0136f8f0
AH
26432013-11-27 Aldy Hernandez <aldyh@redhat.com>
2644 Jakub Jelinek <jakub@redhat.com>
2645
2646 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2647 external_scope is NULL.
2648
241b71bb
TV
26492013-11-27 Tom de Vries <tom@codesourcery.com>
2650 Marc Glisse <marc.glisse@inria.fr>
2651
2652 PR c++/59032
2653 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2654
2fb9a547
AM
26552013-11-22 Andrew MacLeod <amacleod@redhat.com>
2656
2657 * c-typeck.c: Add required include files from gimple.h.
2658
8400e75e
DM
26592013-11-22 David Malcolm <dmalcolm@redhat.com>
2660
2661 * c-decl.c (define_label, shadow_tag_warned)
2662 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2663 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2664 (declspecs_add_type): Remove use of in_system_header macro.
2665 * c-parser.c (c_parser_unary_expression): Likewise.
2666 * c-typeck.c (store_init_value, process_init_element)
2667 (c_start_case): Likewise.
2668
2669 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2670 macro.
2671
2672 * c-parser.c (c_parser_set_source_position_from_token): Remove
2673 reference to in_system_header from comment.
2674
386b1f1f
RS
26752013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2676
2677 * c-decl.c (grokdeclarator): Update comment to refer to
2678 tree_to_[su]hwi rather than tree_low_cst.
2679
ae7e9ddd
RS
26802013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2681
2682 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2683 tree_to_uhwi throughout.
2684
9439e9a1
RS
26852013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2686
2687 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2688 throughout.
2689
9541ffee
RS
26902013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2691
2692 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2693 throughout.
2694
c02065fc
AH
26952013-11-15 Aldy Hernandez <aldyh@redhat.com>
2696
2697 * c-parser.c (c_parser_cilk_simd): New.
2698 (c_parser_cilk_verify_simd): New.
2699 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2700 (c_parser_omp_for_loop): Add case for NE_EXPR.
2701 Set c_break_label for CILK_SIMD.
2702 (c_parser_cilk_clause_vectorlength): New.
2703 (c_parser_cilk_clause_linear): New.
2704 (c_parser_cilk_clause_name): New.
2705 (c_parser_cilk_all_clauses): New.
2706 * c-typeck.c (build_unary_op): Pass location argument to
2707 readonly_error.
2708 (build_modify_expr): Same.
2709 (build_asm_expr): Same.
2710 (c_finish_bc_stmt): Error on break/continue in loops.
2711
18f429e2
AM
27122013-11-14 Andrew MacLeod <amacleod@redhat.com>
2713
2714 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2715
d8a2d370
DN
27162013-11-14 Diego Novillo <dnovillo@google.com>
2717
2718 * c-decl.c: Include print-tree.h.
2719 Include stor-layout.h.
2720 Include varasm.h.
2721 Include attribs.h.
2722 Include stringpool.h.
2723 * c-lang.c: Include fold-const.h.
2724 * c-parser.c: Include stringpool.h.
2725 Include attribs.h.
2726 Include stor-layout.h.
2727 Include varasm.h.
2728 Include trans-mem.h.
2729 * c-typeck.c: Include stor-layout.h.
2730 Include trans-mem.h.
2731 Include varasm.h.
2732 Include stmt.h.
2733
38b7bc7f
JM
27342013-11-13 Joseph Myers <joseph@codesourcery.com>
2735
2736 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2737 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2738 __auto_type.
2739 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2740 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2741 RID_AUTO_TYPE.
2742 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2743 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2744 (c_parser_declarator, c_parser_direct_declarator_inner)
2745 (c_parser_parameter_declaration, c_parser_type_name): All callers
2746 changed.
2747 (c_parser_declaration_or_fndef): Handle declarations with type
2748 determined from the initializer.
2749
45b0be94
AM
27502013-11-12 Andrew MacLeod <amacleod@redhat.com>
2751
18f429e2 2752 * c-typeck.c: Include gimplify.h.
45b0be94 2753
582d9b50
JM
27542013-11-12 Joseph Myers <joseph@codesourcery.com>
2755
2756 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2757 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2758 comment.
2759 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2760 or _Thread_local as appropriate in diagnostics.
2761 (build_null_declspecs): Initialize ret->thread_gnu_p.
2762 (declspecs_add_scspec): Handle either __thread or _Thread_local
2763 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2764 pedantic. Do not disallow _Thread_local extern and _Thread_local
2765 static.
2766
267bac10
JM
27672013-11-07 Joseph Myers <joseph@codesourcery.com>
2768 Andrew MacLeod <amacleod@redhat.com>
2769
2770 * c-aux-info.c (gen_type): Handle atomic qualifier.
2771 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2772 qualifiers when compating types.
2773 (shadow_tag_warned): Handle atomic_p in declspecs.
2774 (quals_from_declspecs): Likewise.
2775 (start_decl): Use c_type_promotes_to when promoting argument
2776 types.
2777 (grokdeclarator): Handle _Atomic.
2778 (get_parm_info): Diagnose any qualifier on "void" as only
2779 parameter.
2780 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2781 comparing types. Use c_type_promotes_to when promoting argument
2782 types.
2783 (finish_function): Use c_type_promotes_to when promoting argument
2784 types.
2785 (build_null_declspecs): Handle atomic_p in declspecs.
2786 (declspecs_add_qual): Handle RID_ATOMIC.
2787 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2788 (c_token_starts_declspecs): Handle RID_ATOMIC.
2789 (c_parser_declspecs): Handle atomic type specifiers and
2790 qualifiers.
2791 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2792 from types of expressions with atomic type.
2793 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2794 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2795 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2796 (c_parser_statement_after_labels, c_parser_switch_statement)
2797 (c_parser_for_statement, c_parser_expr_no_commas)
2798 (c_parser_conditional_expression, c_parser_binary_expression)
2799 (c_parser_cast_expression, c_parser_unary_expression)
2800 (c_parser_postfix_expression)
2801 (c_parser_postfix_expression_after_primary, c_parser_expression):
2802 Use convert_lvalue_to_rvalue.
2803 (c_parser_expression_conv, c_parser_expr_list): Document
2804 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2805 (c_parser_objc_synchronized_statement): Use
2806 convert_lvalue_to_rvalue.
2807 (c_parser_objc_selector): Handle RID_ATOMIC.
2808 (c_parser_objc_receiver, c_parser_array_notation): Use
2809 convert_lvalue_to_rvalue.
2810 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2811 _Atomic (type-name).
2812 (struct c_declspecs): Add atomic_p field.
2813 (convert_lvalue_to_rvalue): Declare.
2814 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2815 corresponding atomic types.
2816 (qualify_type): Don't add _Atomic qualifiers from second argument.
2817 (comp_target_types): Do not allow _Atomic mismatches.
2818 (type_lists_compatible_p): Do not remove atomic qualifiers when
2819 comparing types.
2820 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2821 (build_atomic_assign): New functions.
2822 (build_unary_op): Use build_atomic_assign for atomic increment and
2823 decrement.
2824 (build_conditional_expr): Do not treat _Atomic void as a qualified
2825 version of void.
2826 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2827 (find_anonymous_field_with_type, convert_to_anonymous_field)
2828 (convert_for_assignment): Do not remove atomic qualifiers when
2829 comparing types.
2830 (digest_init): Do not accept initialization of arrays of atomic
2831 elements by string constants.
2832 (build_asm_expr): Use convert_lvalue_to_rvalue.
2833 (build_binary_op): Do not treat _Atomic void as a qualified
2834 version of void.
2835
0c249d4b
DD
28362013-11-06 DJ Delorie <dj@redhat.com>
2837
2838 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2839 both explicit and builtin, print the location of the explicit one.
2840
6d7f7e0a
TB
28412013-11-05 Tobias Burnus <burnus@net-b.de>
2842
2843 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2844 c_parser_omp_distribute, c_parser_omp_teams,
2845 c_parser_omp_target, c_parser_omp_declare): Handle
2846 -fopenmp-simd.
2847
b906f4ca
MP
28482013-11-03 Marek Polacek <polacek@redhat.com>
2849
2850 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2851
ee1d5a02
JJ
28522013-11-01 Jakub Jelinek <jakub@redhat.com>
2853
2854 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2855 check_dup_generic at the end, unless remove is true.
2856 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2857 remove = true;.
2858 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2859
5a9785fb
JJ
28602013-10-31 Jakub Jelinek <jakub@redhat.com>
2861
2862 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2863 with decl that is not pointer nor array.
2864
939b37da
BI
28652013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2866
2867 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2868 a spawning function is found.
2869 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2870 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2871 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2872 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2873 case.
2874 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2875 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2876 expr.
2877 (c_finish_return): Added a check to reject _Cilk_spawn in return
2878 expression.
2879 (build_cilk_spawn): New function.
2880 (build_cilk_sync): Likewise.
2881 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2882
d4af74d4
TB
28832013-10-27 Tobias Burnus <burnus@net-b.de>
2884
2885 PR other/33426
2886 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2887 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2888 (c_parser_statement_after_labels): Update calls.
2889
d73749df 28902013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
2891
2892 PR other/33426
2893 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2894 Handle PRAGMA_IVDEP.
2895 (c_parser_statement_after_labels): Update call.
2896
f28aa681
MP
28972013-10-24 Marek Polacek <polacek@redhat.com>
2898
2899 * c-parser.c (c_parser_struct_declaration): Add a comment.
2900 (c_parser_declarator): Don't allow _Alignas here.
2901
0645c1a2
AM
29022013-10-17 Andrew MacLeod <amacleod@redhat.com>
2903
2904 * c-parser.c: Include omp-low.h.
2905 * c-typeck.c: Likewise.
2906
568a31f2
MP
29072013-10-17 Marek Polacek <polacek@redhat.com>
2908
2909 PR c/58267
2910 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2911 Document syntax of the array-declarator.
2912 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2913 are not permitted.
2914 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2915 (c_parser_struct_declaration): Likewise.
2916 (c_parser_declarator): Likewise.
2917 (c_parser_direct_declarator_inner): Likewise.
2918 (c_parser_parameter_declaration): Likewise.
2919 (c_parser_type_name): Likewise.
2920
acf0174b
JJ
29212013-10-11 Jakub Jelinek <jakub@redhat.com>
2922
2923 * c-lang.h (current_omp_declare_target_attribute): New extern
2924 decl.
2925 * c-parser.c: Include c-lang.h.
2926 (struct c_parser): Change tokens to c_token *.
2927 Add tokens_buf field. Change tokens_avail type to unsigned int.
2928 (c_parser_consume_token): If parser->tokens isn't
2929 &parser->tokens_buf[0], increment parser->tokens.
2930 (c_parser_consume_pragma): Likewise.
2931 (enum pragma_context): Add pragma_struct and pragma_param.
2932 (c_parser_external_declaration): Adjust
2933 c_parser_declaration_or_fndef caller.
2934 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
2935 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
2936 Adjust recursive call.
2937 (c_parser_struct_or_union_specifier): Use pragma_struct instead
2938 of pragma_external.
2939 (c_parser_parameter_declaration): Use pragma_param instead of
2940 pragma_external.
2941 (c_parser_compound_statement_nostart, c_parser_label,
2942 c_parser_for_statement): Adjust
2943 c_parser_declaration_or_fndef callers.
2944 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
2945 it through to c_parser_conditional_expression.
2946 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
2947 pass it through to c_parser_binary_expression. Adjust recursive
2948 call.
2949 (c_parser_binary_expression): Remove prec argument, add
2950 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
2951 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
2952 binop matches it, use build2 instead of parser_build_binary_op.
2953 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
2954 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
2955 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
2956 Handle pragma_struct and pragma_param the same as pragma_external.
2957 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
2958 (c_parser_omp_variable_list): Parse array sections for
2959 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
2960 (c_parser_omp_clause_collapse): Fully fold collapse expression.
2961 (c_parser_omp_clause_reduction): Handle user defined reductions.
2962 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
2963 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
2964 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
2965 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
2966 c_parser_omp_clause_depend, c_parser_omp_clause_map,
2967 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
2968 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
2969 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
2970 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
2971 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
2972 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
2973 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
2974 (c_parser_omp_for_loop): Add CODE argument, pass it through
2975 to c_finish_omp_for. Change last argument to cclauses,
2976 and adjust uses to grab parallel clauses from the array of all
2977 the split clauses. Adjust c_parser_binary_expression,
2978 c_parser_declaration_or_fndef and c_finish_omp_for callers.
2979 (omp_split_clauses): New function.
2980 (c_parser_omp_simd): New function.
2981 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
2982 Allow the function to be called also when parsing combined constructs,
2983 and call c_parser_omp_simd when parsing for simd.
2984 (c_parser_omp_sections_scope): If section-sequence doesn't start with
2985 #pragma omp section, require exactly one structured-block instead of
2986 sequence of statements.
2987 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
2988 Allow the function to be called also when parsing combined constructs.
2989 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
2990 Allow the function to be called also when parsing combined
2991 constructs.
2992 (c_parser_omp_taskgroup, c_parser_omp_cancel,
2993 c_parser_omp_cancellation_point, c_parser_omp_distribute,
2994 c_parser_omp_teams, c_parser_omp_target_data,
2995 c_parser_omp_target_update, c_parser_omp_target,
2996 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
2997 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
2998 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
2999 (c_parser_omp_construct): Add p_name and mask vars. Handle
3000 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3001 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3002 and c_parser_omp_sections callers.
3003 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3004 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3005 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3006 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3007 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3008 OMP_CLAUSE_DEPEND.
3009 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3010 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3011 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3012 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3013 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3014 * c-typeck.c: Include tree-inline.h.
3015 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3016 handle_omp_array_sections_1, handle_omp_array_sections,
3017 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3018 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3019 user defined reductions.
3020 (c_tree_equal): New function.
3021 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3022 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3023 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3024 c_check_omp_declare_reduction_r): New prototypes.
3025 * c-decl.c (current_omp_declare_target_attribute): New variable.
3026 (c_decl_attributes): New function.
3027 (start_decl, start_function): Use it instead of decl_attributes.
3028 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3029 c_omp_reduction_decl, c_omp_reduction_lookup,
3030 c_check_omp_declare_reduction_r): New functions.
3031
0a6c2227
TT
30322013-09-25 Tom Tromey <tromey@redhat.com>
3033
3034 * Make-lang.in (c/gccspec.o): Remove.
3035 (CFLAGS-c/gccspec.o): New variable.
3036 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3037 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3038 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3039
f3bc55f0
TT
30402013-09-25 Tom Tromey <tromey@redhat.com>
3041
3042 * Make-lang.in (c/gccspec.o): Don't use subshell.
3043
a24d975c
MP
30442013-09-18 Marek Polacek <polacek@redhat.com>
3045
3046 PR sanitize/58443
3047 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3048 Remove unnecessary check.
3049
ce6923c5
MP
30502013-09-18 Marek Polacek <polacek@redhat.com>
3051
3052 PR sanitizer/58411
3053 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3054 no_sanitize_undefined attribute.
3055
a1e51df9
KT
30562013-09-13 Kai Tietz <ktietz@redhat.com>
3057
3058 PR target/57848
3059 * c-decl.c (c_builtin_function_ext_scope): Remove
3060 wrong assumption that it is never called on prexisting
3061 symbol.
3062
0af94e6f
JR
30632013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3064
3065 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3066
20059c8b
GDR
30672013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3068
3069 * c-objc-common.c (c_tree_printer): Tidy.
3070
de5a5fa1
MP
30712013-08-30 Marek Polacek <polacek@redhat.com>
3072
3073 * c-typeck.c (build_binary_op): Add division by zero and shift
3074 instrumentation.
3075
2531a1d9 30762013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 3077 Joseph Myers <joseph@codesourcery.com>
2531a1d9 3078
6e2bcc98 3079 PR c/35649
2531a1d9
JR
3080 * c-typeck.c (c_common_type): Prefer double_type_node over
3081 other REAL_TYPE types with the same precision.
3082 (convert_arguments): Likewise.
3083
025311c4
GDR
30842013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3085
3086 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3087 (c_initialize_diagnostics): Call a destructor for the early printer.
3088
da6ca2b5
GDR
30892013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3090
3091 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3092 printer initialization.
3093
318cda85 30942013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 3095
318cda85
BI
3096 PR c/57490
3097 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3098 check for truth values.
3099 (expand_array_notation_exprs): Added truth values case. Removed an
3100 unwanted else. Added for-loop to walk through subtrees in default
3101 case.
3102
b066401f
GDR
31032013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3104
3105 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3106
fb48aadc
JM
31072013-07-23 Joseph Myers <joseph@codesourcery.com>
3108
3109 * c-parser.c (struct c_generic_association): Fix typo.
3110
433cc7b0
TT
31112013-07-23 Tom Tromey <tromey@redhat.com>
3112 Joseph Myers <joseph@codesourcery.com>
3113
3114 * c-parser.c (struct c_generic_association): New.
3115 (c_generic_association_d): New typedef.
3116 (c_parser_generic_selection): New function.
3117 (c_parser_postfix_expression): Handle RID_GENERIC.
3118
26d40c3d
JM
31192013-07-13 Jason Merrill <jason@redhat.com>
3120
3121 PR c++/57793
3122 * c-decl.c (finish_struct): Check for too-large class.
3123
ecdbd01a 31242013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
3125
3126 PR c/57821
3127 * c-typeck.c (set_init_index): When folding, check for index overflow.
3128
1141ed3f
BI
31292013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3130
3131 * c-parser.c (c_parser_array_notation): Removed rejection of array
3132 notations in an array of function pointers.
3133
713b46fa
BI
31342013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3135
3136 * c-array-notation.c (make_triplet_val_inv): New function.
3137 (create_cmp_incr): Likewise.
3138 (create_array_refs): Likewise.
3139 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3140 Also modularized common parts between functions and called the function.
3141 (build_array_notation_expr): Likewise.
3142 (fix_conditional_array_notations_1): Likewise.
3143 (fix_array_notation_expr): Likewise.
3144 (fix_array_notation_call_expr): Likewise.
3145
92f20202
MP
31462013-06-18 Marek Polacek <polacek@redhat.com>
3147
3148 PR c/57630
3149 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3150
73a23b06
BI
31512013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3152
3153 * c-array-notation.c (build_array_notation_expr): Reject array notation
3154 mismatch between LHS and RHS even inside a call_expr. Also, removed
3155 a couple while statements that were dead code.
3156
00b8517d
BI
31572013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3158
3159 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3160 excessive precision expressions in function parameters. Also removed
3161 couple unwanted while statements.
3162
1509bdda
BI
31632013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3164
3165 * c-array-notation.c (expand_array_notation_exprs): Added
3166 ARRAY_NOTATION_REF case.
3167
d60f1706
BI
31682013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3169
3170 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3171 function to c-family/array-notation-common.c.
3172 (is_cilkplus_reduce_builtin): Likewise.
3173 (find_rank): Likewise.
3174 (extract_array_notation_exprs): Likewise.
3175 (replace_array_notations): Likewise.
3176 (find_inv_trees): Likewise.
3177 (replace_inv_trees): Likewise.
3178 (contains_array_notation_expr): Likewise.
3179 (find_correct_array_notation_type): Likewise.
3180 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3181 (struct inv_list): Moved this to c-family/array-notation-common.c.
3182 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3183
6d6efbb3
BI
31842013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3185
3186 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3187 reduction functions outside the for-loop. Added a check if the fundecl
3188 is non-NULL. Finally, removed an unwanted if-statement, and made the
3189 body unconditional.
3190
25c22937
BI
31912013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3192
3193 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3194 condition of the if-statement matches the rank of else-block and then-
3195 block when array notations are used.
3196 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3197 expression after the entire function body is parsed.
3198 (c_parser_expr_no_commas): Delayed creating array notation expressions
3199 to the end of function parsing.
3200 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3201 whole if-statement instead of just the condition.
3202 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3203
edd25645
BI
32042013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3205
3206 PR c/57474
3207 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3208 array to NULL_TREE if they are unused. Also added a check for the
3209 field to be NULL before its fields are used in future.
3210
065ce7f1
RO
32112013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3212
3213 PR bootstrap/57450
3214 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3215 (build_array_notation_expr): Likewise.
3216
36536d79
BI
32172013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3218
3219 * c-typeck.c (build_array_ref): Added a check to see if array's
3220 index is greater than one. If true, then emit an error.
3221 (build_function_call_vec): Exclude error reporting and checking
3222 for builtin array-notation functions.
3223 (convert_arguments): Likewise.
3224 (c_finish_return): Added a check for array notations as a return
3225 expression. If true, then emit an error.
3226 (c_finish_loop): Added a check for array notations in a loop
3227 condition. If true then emit an error.
3228 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3229 (build_binary_op): Added a check for array notation expr inside
3230 op1 and op0. If present, we call another function to find correct
3231 type.
3232 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3233 * c-parser.c (c_parser_compound_statement): Check if array
3234 notation code is used in tree, if so, then transform them into
3235 appropriate C code.
3236 (c_parser_expr_no_commas): Check if array notation is used in LHS
3237 or RHS, if so, then build array notation expression instead of
3238 regular modify.
3239 (c_parser_postfix_expression_after_primary): Added a check for
3240 colon(s) after square braces, if so then handle it like an array
3241 notation. Also, break up array notations in unary op if found.
3242 (c_parser_direct_declarator_inner): Added a check for array
3243 notation.
3244 (c_parser_compound_statement): Added a check for array notation in
3245 a stmt. If one is present, then expand array notation expr.
3246 (c_parser_if_statement): Likewise.
3247 (c_parser_switch_statement): Added a check for array notations in
3248 a switch statement's condition. If true, then output an error.
3249 (c_parser_while_statement): Similarly, but for a while.
3250 (c_parser_do_statement): Similarly, but for a do-while.
3251 (c_parser_for_statement): Similarly, but for a for-loop.
3252 (c_parser_unary_expression): Check if array notation is used in a
3253 pre-increment or pre-decrement expression. If true, then expand
3254 them.
3255 (c_parser_array_notation): New function.
3256 * c-array-notation.c: New file.
3257 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3258
cd192ccc
MS
32592013-05-23 Mike Stump <mikestump@comcast.net>
3260
3261 * c-typeck.c (convert_for_assignment): Handle references to memory
3262 spaces better.
3263
427b248d
JM
32642013-05-16 Jason Merrill <jason@redhat.com>
3265
3266 * Make-lang.in (cc1$(exeext)): Use link mutex.
3267
44d90fe1
PC
32682013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3269
3270 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3271 to simply use OPT_Wpointer_arith.
3272 (build_unary_op): Likewise.
3273
4e7d7b3d
JJ
32742013-04-03 Jakub Jelinek <jakub@redhat.com>
3275
3276 PR c/19449
3277 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3278 argument. If set, or it temporarily for parsing of the first
3279 argument into force_folding_builtin_constant_p.
3280 (c_parser_postfix_expression): Adjust callers.
3281
839b422f
RB
32822013-03-21 Richard Biener <rguenther@suse.de>
3283
3284 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3285 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3286
2ee028f1
MP
32872013-02-12 Marek Polacek <polacek@redhat.com>
3288
3289 PR c/44938
3290 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3291 origtypes to NULL.
3292
8824edff
JJ
32932013-01-24 Jakub Jelinek <jakub@redhat.com>
3294
3295 PR c/56078
3296 * c-typeck.c (set_nonincremental_init_from_string): If
3297 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3298 returned false.
3299 (process_init_element): Likewise.
3300
eadd3d0d
JJ
33012012-12-20 Jakub Jelinek <jakub@redhat.com>
3302
3303 PR c++/55619
3304 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3305 argument, don't call default_function_array_conversion
3306 nor c_fully_fold here.
3307 (c_parser_asm_statement): Adjust callers.
3308 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3309 and outputs here, and call default_function_array_conversion
3310 on inputs that don't need to be addressable.
3311
f8a93a2e
JJ
33122012-12-18 Jakub Jelinek <jakub@redhat.com>
3313
3314 PR c/39464
3315 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3316 warning require that both c_common_unsigned_type as well as
3317 c_common_signed_type is the same for both mvl and mvr types.
3318
9771b263
DN
33192012-11-16 Diego Novillo <dnovillo@google.com>
3320
3321 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3322
3323 * c-common.c: Use new vec API in vec.h.
3324 * c-common.h: Likewise.
3325 * c-gimplify.c: Likewise.
3326 * c-pragma.c: Likewise.
3327 * c-pretty-print.c: Likewise.
3328 * c-pretty-print.h: Likewise.
3329 * c-semantics.c: Likewise.
3330 * c-decl.c: Likewise.
3331 * c-parser.c: Likewise.
3332 * c-tree.h: Likewise.
3333 * c-typeck.c: Likewise.
3334
880661a4
JW
33352012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3336
3337 PR c++/54930
3338 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3339
077d1abe
MLI
33402012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3341
3342 PR c/53066
3343 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3344 shadows a function, unless the variable is a function or a
3345 pointer-to-function.
3346
3a785c97
JJ
33472012-10-12 Jakub Jelinek <jakub@redhat.com>
3348
3349 PR c/54381
3350 * c-parser.c (struct c_tree_loc_pair): Removed.
3351 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3352 add location_t * and tree * arguments, fill in array of 3
3353 sizeof_arg trees and corresponding locs.
3354 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3355 c_parser_expr_list callers.
3356 (c_parser_postfix_expression_after_primary): Likewise. Pass
3357 array of 3 sizeof_arg trees and locs (corresponding to first
3358 3 arguments) to sizeof_pointer_memaccess_warning.
3359
703c8606
LC
33602012-10-09 Lawrence Crowl <crowl@google.com>
3361
3362 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3363 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3364 hash table.
3365
5d9de0d0
PC
33662012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3367
3368 PR c++/54194
3369 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3370 call.
3371
a212e43f
MG
33722012-10-09 Marc Glisse <marc.glisse@inria.fr>
3373
3374 PR c++/54427
3375 * c-typeck.c: Include c-common.h.
3376 (enum stv_conv): Moved to c-common.h.
3377 (scalar_to_vector): Moved to c-common.c.
3378 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3379 * Make-lang.in: c-typeck.c depends on c-common.h.
3380
3b78de56
AC
33812012-10-04 Arnaud Charlet <charlet@adacore.com>
3382
3383 * c-decl.c (c_write_global_declarations): Fix handling of
3384 -fdump-ada-spec*.
3385
78c60e3d
SS
33862012-09-30 Sharad Singhai <singhai@google.com>
3387
3388 * c-decl.c (c_write_global_declarations): Use a different method
3389 to determine if the dump has ben initialized.
3390
9f33203d
JM
33912012-09-14 Joseph Myers <joseph@codesourcery.com>
3392
3393 PR c/54552
3394 * c-typeck.c (c_cast_expr): When casting to a type requiring
3395 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3396 c_fully_fold first.
3397
a27d595d
JM
33982012-09-14 Joseph Myers <joseph@codesourcery.com>
3399
3400 PR c/54103
3401 * c-typeck.c (build_unary_op): Pass original argument of
3402 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3403 any C_MAYBE_CONST_EXPR, if it has integer operands.
3404 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3405 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3406 to c_objc_common_truthvalue_conversion, then remove any
3407 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3408 c_objc_common_truthvalue_conversion not
3409 c_common_truthvalue_conversion.
3410 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3411 call note_integer_operands for arguments with integer operands
3412 that are not integer constants.
3413
9feb29df
JJ
34142012-09-13 Jakub Jelinek <jakub@redhat.com>
3415
3416 PR c/54559
3417 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3418 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3419
d409320c
JJ
34202012-08-31 Jakub Jelinek <jakub@redhat.com>
3421
3422 PR c/54428
3423 * c-convert.c (convert): Don't call fold_convert_loc if
3424 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3425 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3426 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3427
6265d07c
JJ
34282012-08-24 Jakub Jelinek <jakub@redhat.com>
3429
3430 PR c/54355
3431 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3432 for nested and empty_ok arguments in the call to
3433 c_parser_declaration_or_fndef.
3434
1a4049e7
JJ
34352012-08-17 Jakub Jelinek <jakub@redhat.com>
3436
3437 * c-tree.h (c_last_sizeof_arg): Declare.
3438 * c-parser.c (struct c_tree_loc_pair): New type.
3439 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3440 non-NULL.
3441 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3442 (c_parser_postfix_expression_after_primary): Likewise. Call
3443 sizeof_pointer_memaccess_warning if needed.
3444 (sizeof_ptr_memacc_comptypes): New function.
3445 * c-typeck.c (c_last_sizeof_arg): New global variable.
3446 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3447
0229aee9
UB
34482012-07-24 Uros Bizjak <ubizjak@gmail.com>
3449
3450 * c-lang.h (lang_decl): Add variable_size GTY option.
3451
7ee2468b
SB
34522012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3453
3454 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3455 * Make-lang.in: Fix dependencies.
3456
d4a10d0a
SB
34572012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3458
3459 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3460 and add language Makefile hooks.
3461 * config-lang.in: New file.
3462 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3463 add the required "normal" config-lang.in rules.
3464 * c-lang.h: Moved from gcc/ to here.
3465 * c-tree.h: Likewise.
3466 * c-objc-common.c: Likewise.
3467 * c-objc-common.h: Likewise.
3468 * c-typeck.c: Likewise.
3469 * c-convert.c: Likewise.
3470 * c-lang.c: Likewise.
3471 * c-aux-info.c: Likewise.
3472 * c-errors.c: Likewise.
3473 * gccspec.c: Likewise.
3474 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3475 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3476\f
818ab71a 3477Copyright (C) 2012-2016 Free Software Foundation, Inc.
d4a10d0a
SB
3478
3479Copying and distribution of this file, with or without modification,
3480are permitted in any medium without royalty provided the copyright
3481notice and this notice are preserved.