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