]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
[ARM][2/4] Replace casts of 1 to HOST_WIDE_INT by HOST_WIDE_INT_1 and HOST_WIDE_INT_1U
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
f17a223d
RB
12016-05-24 Richard Biener <rguenther@suse.de>
2
3 PR middle-end/70434
4 PR c/69504
5 * c-typeck.c (build_array_ref): Do not complain about indexing
6 non-lvalue vectors. Adjust for function name change.
7
79063edd
MS
82016-05-20 Martin Sebor <msebor@redhat.com>
9
10 PR c/71115
11 * c-typeck.c (error_init): Use
12 expansion_point_location_if_in_system_header.
13 (warning_init): Same.
14
8a40fef3
DM
152016-05-19 David Malcolm <dmalcolm@redhat.com>
16
17 PR c/71171
18 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
19 in error-handling.
20 (c_parser_postfix_expression): Likewise.
21 * c-tree.h (c_expr::set_error): New method.
22 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
23 that result's range is initialized.
24
e9892350
JG
252016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
26
27 * c-typeck.c (parser_build_unary_op): Fix formatting.
28
8fad45f5
MW
292016-05-16 Matthew Wahab <matthew.wahab@arm.com>
30
31 * c-decl.c (grokdeclarator): Remove errmsg and use of
32 targetm.invalid_return_type.
33 (grokparms): Remove errmsg and use of
34 targetm.invalid_parameter_type.
35
aa4b467b
JM
362016-05-13 Joseph Myers <joseph@codesourcery.com>
37
38 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
39 function return type.
40
4f2e1536
MP
412016-05-12 Marek Polacek <polacek@redhat.com>
42
43 PR c/70756
44 * c-decl.c (build_compound_literal): Pass LOC down to
45 c_incomplete_type_error.
46 * c-tree.h (require_complete_type): Adjust declaration.
47 (c_incomplete_type_error): Likewise.
48 * c-typeck.c (require_complete_type): Add location parameter, pass it
49 down to c_incomplete_type_error.
50 (c_incomplete_type_error): Add location parameter, pass it down to
51 error_at.
52 (build_component_ref): Pass location down to c_incomplete_type_error.
53 (default_conversion): Pass location down to require_complete_type.
54 (build_array_ref): Likewise.
55 (build_function_call_vec): Likewise.
56 (convert_arguments): Likewise.
57 (build_unary_op): Likewise.
58 (build_c_cast): Likewise.
59 (build_modify_expr): Likewise.
60 (convert_for_assignment): Likewise.
61 (c_finish_omp_clauses): Likewise.
62
d6e83a8d
MM
632016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
64
65 PR c/43651
66 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
67 is enabled.
68 * c-errors.c (pedwarn_c90): Return true if warned.
69 * c-tree.h (pedwarn_c90): Change return type to bool.
70 (enum c_declspec_word): Add new enumerator cdw_atomic.
71
5c3a10fb
MP
722016-05-11 Marek Polacek <polacek@redhat.com>
73
74 PR c++/71024
75 * c-decl.c (diagnose_mismatched_decls): Factor out code to
76 diagnose_mismatched_attributes and call it.
77
cf68d92c
MP
782016-05-10 Marek Polacek <polacek@redhat.com>
79
80 PR c/70255
81 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
82 on a declaration following the definition.
83
351f85c5
JJ
842016-05-05 Jakub Jelinek <jakub@redhat.com>
85
86 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
87 parse it through to c_parser_c99_block_statement.
88 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
89 caller.
90
deef7113
MP
912016-05-04 Marek Polacek <polacek@redhat.com>
92
93 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
94 OPT_Wdangling_else.
95
de55efd5
MP
962016-05-04 Marek Polacek <polacek@redhat.com>
97
98 PR c/48778
99 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
100 for macro expansions.
101
79ce98bc
MP
1022016-05-03 Marek Polacek <polacek@redhat.com>
103
104 PR c/70859
105 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
106 check_builtin_function_arguments.
107
fb2647aa
RB
1082016-05-03 Richard Biener <rguenther@suse.de>
109
110 * Make-lang.in (cc1-checksum.c): For stage-final re-use
111 the checksum from the previous stage.
112
77886428
CP
1132016-05-02 Cesar Philippidis <cesar@codesourcery.com>
114
115 * c-parser.c (c_parser_oacc_all_clauses): Update call to
116 c_finish_omp_clauses.
117 (c_parser_omp_all_clauses): Likewise.
118 (c_parser_oacc_cache): Likewise.
119 (c_parser_oacc_loop): Likewise.
120 (omp_split_clauses): Likewise.
121 (c_parser_omp_declare_target): Likewise.
122 (c_parser_cilk_all_clauses): Likewise.
123 (c_parser_cilk_for): Likewise.
124 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
125 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
126
7176a4a0
MP
1272016-05-02 Marek Polacek <polacek@redhat.com>
128
129 PR c/70851
130 * c-decl.c (grokdeclarator): Diagnose when array's size has an
131 incomplete type.
132
e7ff0319
CP
1332016-04-29 Cesar Philippidis <cesar@codesourcery.com>
134
135 PR middle-end/70626
136 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
137 OACC_LOOP_CLAUSE_MASK.
138 (c_parser_oacc_kernels_parallel): Update call to
139 c_oacc_split_loop_clauses.
140
9f405ce1
AM
1412016-04-28 Andrew MacLeod <amacleod@redhat.com>
142
143 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
144 argument to build_modify_expr in two cases.
145
c1e1f433
BS
1462016-04-27 Bernd Schmidt <bschmidt@redhat.com>
147
148 * c-parser.c (c_parser_postfix_expression_after_primary): Call
149 warn_for_memset instead of warning directly here.
150
2448a956
MP
1512016-04-26 Marek Polacek <polacek@redhat.com>
152
153 PR c/67784
154 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
155 out of ...
156 (c_parser_for_statement): ... here.
157 (c_parser_if_statement): Use it.
158 (c_parser_switch_statement): Use it.
159 (c_parser_while_statement): Use it.
160
b02a5e26
MP
161 PR c/70791
162 * c-decl.c (pushdecl): Pass LOCUS down to warning.
163
477d4906
IV
1642016-04-20 Ilya Verbin <ilya.verbin@intel.com>
165
166 PR c++/69363
167 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
168 instead of c_finish_cilk_clauses.
169 * c-tree.h (c_finish_omp_clauses): Add new default argument.
170 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
171 floating-point variables in the linear clause for Cilk Plus.
172
fe37c7af
MM
1732016-04-18 Michael Matz <matz@suse.de>
174
175 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
176 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
177
949505a9
MP
1782016-04-15 Marek Polacek <polacek@redhat.com>
179
180 PR c/70671
181 * c-typeck.c (build_unary_op): Pass location down to error and
182 warning call.
183
dda1bf61
JJ
1842016-04-15 Jakub Jelinek <jakub@redhat.com>
185
186 PR c/70436
187 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
188 where needed.
189 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
190 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
191 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
192 Adjust c_parser_pragma callers.
193 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
194 caller.
195 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
196 c_parser_statement.
197 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
198 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
199 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
200 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
201 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
202 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
203 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
204 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
205 down where needed.
206 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
207 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
208 calls.
209
99cd9857
MP
2102016-04-13 Marek Polacek <polacek@redhat.com>
211
212 PR c/70436
213 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
214 adjust callers.
215 (c_parser_statement): Likewise.
216 (c_parser_c99_block_statement): Likewise.
217 (c_parser_while_statement): Likewise.
218 (c_parser_for_statement): Likewise.
219 (c_parser_if_body): Don't set IF_P here.
220 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
221 about dangling else here.
222 * c-tree.h (c_finish_if_stmt): Adjust declaration.
223 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
224 warn about dangling else here.
225
f13355da
MP
2262016-04-04 Marek Polacek <polacek@redhat.com>
227
228 PR c/70307
229 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
230
5fde6a45
MP
2312016-03-31 Marek Polacek <polacek@redhat.com>
232
233 PR c/70297
234 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
235
4bbf545b
DM
2362016-03-18 David Malcolm <dmalcolm@redhat.com>
237
238 PR c/70281
239 * c-parser.c (c_parser_postfix_expression): Set the source range
240 for uses of "__builtin_types_compatible_p".
241
fcc2b74f
JJ
2422016-03-17 Jakub Jelinek <jakub@redhat.com>
243
244 PR c/70280
245 * c-typeck.c (composite_type): Don't count void_list_node
246 into len, if the list is terminated by void_list_node, start
247 with void_list_node instead of NULL for newargs. Stop
248 at void_list_node.
249
ab4c578f
MP
2502016-03-16 Marek Polacek <polacek@redhat.com>
251
252 PR c/70093
253 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
254 nested functions returning VM types.
255
96b3c82d
CP
2562016-03-09 Cesar Philippidis <cesar@codesourcery.com>
257
258 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
259 when calling c_finish_omp_clauses.
260
29b9828f
BS
2612016-03-04 Bernd Schmidt <bschmidt@redhat.com>
262
263 PR c/69824
264 * c-decl.c (get_parm_info): Don't queue implicit function declarations
265 for later.
266
7ff6ca38
MP
2672016-03-04 Marek Polacek <polacek@redhat.com>
268
269 PR c/69798
270 * c-parser.c (c_parser_postfix_expression): Call
271 c_parser_cast_expression rather than c_parser_postfix_expression.
272
686e2237
JJ
2732016-03-01 Jakub Jelinek <jakub@redhat.com>
274
275 PR c/69796
276 PR c/69974
277 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
278 of incomplete decls to error_mark_node.
279
0b05329b
MP
2802016-02-24 Marek Polacek <polacek@redhat.com>
281
282 PR c/69819
283 * c-decl.c (finish_decl): Don't update the copy of the type of a
284 different decl type.
285
067fbd8b
JJ
2862016-02-23 Jakub Jelinek <jakub@redhat.com>
287
288 PR objc/69844
289 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
290 in id_kind reclassification.
291
bf14eba2
JJ
2922016-02-16 Jakub Jelinek <jakub@redhat.com>
293
294 PR c/69835
295 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
296
ba539195
JN
2972016-02-16 James Norris <jnorris@codesourcery.com>
298
299 PR c/64748
300 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
301
16595a1f
BS
3022016-02-12 Bernd Schmidt <bschmidt@redhat.com>
303
f48dfe98
BS
304 * c-decl.c (build_null_declspecs): Zero the entire struct.
305
16595a1f
BS
306 PR c/69522
307 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
308 callers changed. If nested_p is true, use it to call
309 finish_implicit_inits.
310 * c-tree.h (finish_implicit_inits): Declare.
311 * c-typeck.c (finish_implicit_inits): New function. Move code
312 from ...
313 (push_init_level): ... here.
314 (set_designator, process_init_element): Call finish_implicit_inits.
315
66756373
JJ
3162016-02-11 Jakub Jelinek <jakub@redhat.com>
317
318 PR c/69768
319 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
320 arguments for -Waddress warning.
321
1066e9b5
JJ
3222016-02-04 Jakub Jelinek <jakub@redhat.com>
323
324 PR c/69669
325 * c-decl.c (finish_enum): When honoring mode attribute,
326 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
327
3a5d2ba4
JJ
3282016-01-29 Jakub Jelinek <jakub@redhat.com>
329
330 PR debug/69518
331 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
332 all type variants, not just TYPE_MAIN_VARIANT.
333
cbdd8ae0
JJ
3342016-01-27 Jakub Jelinek <jakub@redhat.com>
335
336 PR debug/66869
337 * c-decl.c (c_write_global_declarations_1): Warn with
338 warn_unused_function if static prototype without definition
339 is not C_DECL_USED.
340
fa74a4bc
MP
3412016-01-27 Marek Polacek <polacek@redhat.com>
342
343 PR c/68062
344 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
345 to unsigned, if needed. Add -Wsign-compare warning.
346
13f92e8d
JJ
3472016-01-26 Jakub Jelinek <jakub@redhat.com>
348
349 PR tree-optimization/69483
350 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
351
cd8e73dc 3522016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
353
354 PR c/24293
355 * c-tree.h (incomplete_record_decls): Declare.
356 * c-parser.c (incomplete_record_decls): Define.
357 (c_parser_translation_unit): Iterate through incomplete_record_decls and
358 report error if any decl has zero size.
359 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
360 or enum type to incomplete_record_decls.
361
e6d6ec9e
TV
3622016-01-14 Tom de Vries <tom@codesourcery.com>
363
364 PR tree-optimization/68773
365 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
366 set force_output.
367
00083992
MP
3682016-01-14 Marek Polacek <polacek@redhat.com>
369
370 PR c/69262
371 * c-decl.c (grokdeclarator): Provide more information for invalid
372 array declarations.
373
7443cf13
DM
3742016-01-06 David Malcolm <dmalcolm@redhat.com>
375
376 * c-parser.c (c_parser_unary_expression): For dereferences, build
377 a combined location before calling build_indirect_ref, so that
378 error reports cover the full range, manually updating the c_expr
379 src_range.
380
6b131d5b
MP
3812016-01-06 Marek Polacek <polacek@redhat.com>
382
383 PR sanitizer/69099
384 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
385 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
386 NULL.
387
818ab71a
JJ
3882016-01-04 Jakub Jelinek <jakub@redhat.com>
389
390 Update copyright years.
391
2fe0a208
MP
3922016-01-04 Marek Polacek <polacek@redhat.com>
393
394 PR c/68908
395 * c-typeck.c (build_atomic_assign): Improve commentary. Add
396 optimization to use __atomic_fetch_* built-in if possible.
397
c7b48c8a
TS
3982015-12-23 Thomas Schwinge <thomas@codesourcery.com>
399
400 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
401 into...
402 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
403 all users.
404
fda5652f
MP
4052015-12-22 Marek Polacek <polacek@redhat.com>
406
407 PR c/69002
408 * c-typeck.c (build_component_ref): Warn when acessing elements of
409 atomic structures or unions.
410
745e411d
DM
4112015-12-21 David Malcolm <dmalcolm@redhat.com>
412
413 * c-typeck.c: Include "gcc-rich-location.h".
414 (build_binary_op): In the two places that call binary_op_error,
415 create a gcc_rich_location and populate it with the location of
416 the binary op and its two operands.
417
94c40e19
DM
4182015-12-16 David Malcolm <dmalcolm@redhat.com>
419
420 * c-parser.c (c_parser_statement_after_labels): When calling
421 c_finish_return, Use the return expression's location if it has
422 one, falling back to the location of the first token within it.
423 * c-typeck.c (c_finish_return): When issuing warnings about
424 the incorrect presence/absence of a return value, issue a note
425 showing the declaration of the function.
426
de67c4c3
DM
4272015-12-16 David Malcolm <dmalcolm@redhat.com>
428
429 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
430 to 4.
431 (c_parser_peek_nth_token): New function.
432 (c_parser_peek_conflict_marker): New function.
433 (c_parser_error): Detect conflict markers and report them as such.
434
a10704e1
DM
4352015-12-16 David Malcolm <dmalcolm@redhat.com>
436
437 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
438 to preserve range information for the primary expression
439 in the call to c_parser_postfix_expression_after_primary.
440
8062bca6
DM
4412015-12-16 David Malcolm <dmalcolm@redhat.com>
442
443 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
444 expression location, falling back on the first token location,
445 rather than always using the latter.
446
d06f8b75
MP
4472015-12-16 Marek Polacek <polacek@redhat.com>
448
449 PR c/64637
450 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
451 available.
452
2994fb91
MP
4532015-12-15 Marek Polacek <polacek@redhat.com>
454
455 PR c/68907
456 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
457 artificial decl.
458
a1b93f8d
DM
4592015-12-08 David Malcolm <dmalcolm@redhat.com>
460
461 * c-parser.c (c_parser_alignof_expression): Capture location of
462 closing parenthesis (if any), or of end of unary expression, and
463 use it to build a src_range for the expression.
464
46c6e1e2
DM
4652015-12-08 David Malcolm <dmalcolm@redhat.com>
466
467 PR c/68757
468 * c-parser.c (c_parser_get_builtin_args): Add
469 "out_close_paren_loc" param, and write back to it.
470 (c_parser_postfix_expression): Capture the closing
471 parenthesis location for RID_CHOOSE_EXPR,
472 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
473 RID_BUILTIN_SHUFFLE and use it to set the source range
474 for such expressions; within RID_BUILTIN_COMPLEX set
475 the underlying location.
476
66189108
MP
4772015-12-07 Marek Polacek <polacek@redhat.com>
478
479 PR c/68668
480 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
481 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
482
f187980b
EB
4832015-12-04 Eric Botcazou <ebotcazou@adacore.com>
484
485 * c-tree.h (c_build_va_arg): Adjust prototype.
486 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
487 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
488 parameter, adjust throughout and issue an error if EXPR is a component
489 with reverse storage order.
490
4250754e
JM
4912015-12-02 Jason Merrill <jason@redhat.com>
492
493 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
494 (c_fully_fold_internal, decl_constant_value_for_optimization):
495 Move from c-common.c.
496 * c-tree.h: Declare decl_constant_value_for_optimization.
497 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
498
e9e32ee6
JM
4992015-12-02 Joseph Myers <joseph@codesourcery.com>
500
501 PR c/68162
502 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
503 following link from declarator to next declarator. Track original
504 qualified type and pass it to c_build_qualified_type.
505 * c-typeck.c (c_build_qualified_type): Add arguments
506 orig_qual_type and orig_qual_indirect.
507
ff7a55bf
TS
5082015-12-02 Thomas Schwinge <thomas@codesourcery.com>
509
510 * c-parser.c (c_parser_omp_clause_name)
511 (c_parser_oacc_all_clauses): Alphabetical sorting.
512
657e4e47
JJ
5132015-12-02 Jakub Jelinek <jakub@redhat.com>
514
515 PR c/68533
516 * c-decl.c (get_parm_info): Use b->locus instead of input_location
517 for diagnostics.
518
37d5ad46
JB
5192015-12-01 Julian Brown <julian@codesourcery.com>
520 Cesar Philippidis <cesar@codesourcery.com>
521 James Norris <James_Norris@mentor.com>
522
523 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
524 (c_parser_oacc_clause_use_device): New function.
525 (c_parser_oacc_all_clauses): Add use_device support.
526 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
527 (c_parser_oacc_host_data): New function.
528 (c_parser_omp_construct): Add host_data support.
529 * c-tree.h (c_finish_oacc_host_data): Add prototype.
530 * c-typeck.c (c_finish_oacc_host_data): New function.
531 (c_finish_omp_clauses): Add use_device support.
532
a4850ce9
JH
5332015-11-29 Jan Hubicka <hubicka@ucw.cz>
534
535 PR c/67106
536 * c-decl.c: Set TYPE_PACKED in variants.
537
b58d3df2
ML
5382015-11-27 Martin Liska <mliska@suse.cz>
539
540 PR c++/68312
541 * c-array-notation.c (fix_builtin_array_notation_fn):
542 Use release_vec_vec instead of vec::release.
543 (build_array_notation_expr): Likewise.
544 (fix_conditional_array_notations_1): Likewise.
545 (fix_array_notation_expr): Likewise.
546 (fix_array_notation_call_expr): Likewise.
547
aec17bfe
JJ
5482015-11-27 Jakub Jelinek <jakub@redhat.com>
549
550 PR c/63326
551 * c-parser.c (c_parser_compound_statement_nostart): If
552 last_label is true, use pragma_stmt instead of pragma_compound
553 as second c_parser_pragma argument.
554 (c_parser_omp_ordered, c_parser_omp_target_update,
555 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
556 false as second argument to c_parser_skip_to_pragma_eol after
557 diagnosing standalone directives used in pragma_stmt context.
558
688c4de0
IV
5592015-11-24 Ilya Verbin <ilya.verbin@intel.com>
560
561 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
562 with "if (ENABLE_OFFLOADING)".
563
cbd03aee
DM
5642015-11-23 David Malcolm <dmalcolm@redhat.com>
565
566 PR objc/68438
567 * c-parser.c (c_parser_postfix_expression): Set up source ranges
568 for various Objective-C constructs: Class.name syntax,
569 @selector(), @protocol(), @encode(), and [] message syntax.
570
a87a86e1
DM
5712015-11-20 David Malcolm <dmalcolm@redhat.com>
572
573 PR 62314
574 * c-typeck.c (should_suggest_deref_p): New function.
575 (build_component_ref): Special-case POINTER_TYPE when
576 generating a "not a structure of union" error message, and
577 suggest a "->" rather than a ".", providing a fix-it hint.
578
8ece8dfb
DM
5792015-11-19 David Malcolm <dmalcolm@redhat.com>
580
581 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
582 candidate into a new function, find_closest_identifier.
583
433068cc
MP
5842015-11-19 Marek Polacek <polacek@redhat.com>
585
586 PR c/68412
587 * c-typeck.c (parser_build_binary_op): Properly handle
588 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
589
bef08b71
DM
5902015-11-17 David Malcolm <dmalcolm@redhat.com>
591
592 * c-parser.c (set_c_expr_source_range): Bulletproof both
593 overloaded implementations against NULL expr->value.
594 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
595 values.
596 (c_parser_unary_expression): Likewise when handling addresses of
597 labels.
598 (c_parser_postfix_expression): Likewise for statement expressions,
599 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
600 __builtin_va_arg, and for __builtin_offset_of.
601 (c_parser_postfix_expression_after_paren_type): Initialize expr's
602 src_range using the range of the braced initializer.
603 (c_parser_transaction_expression): Set src_range for "ret" to a
604 sane pair of values.
605
fff77217
KY
6062015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
607
608 * c-parser.c (c_finish_omp_declare_simd): Look for
609 "simd" attribute as well. Update error message.
610
1d899da2
TS
6112015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
612
613 * c-parser.c (c_parser_omp_declare_target): Adjust.
614
e4606348
JJ
6152015-11-14 Jakub Jelinek <jakub@redhat.com>
616
617 * c-typeck.c (c_finish_omp_clauses): Don't mark
618 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
619
3e636daf
MP
6202015-11-14 Marek Polacek <polacek@redhat.com>
621
622 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
623 * c-typeck.c: Likewise.
624
ebedc9a3
DM
6252015-11-13 David Malcolm <dmalcolm@redhat.com>
626
627 * c-decl.c (warn_defaults_to): Pass line_table to
628 rich_location ctor.
629 * c-errors.c (pedwarn_c99): Likewise.
630 (pedwarn_c90): Likewise.
631 * c-parser.c (set_c_expr_source_range): New functions.
632 (c_token::get_range): New method.
633 (c_token::get_finish): New method.
634 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
635 based on the range from the start of the LHS to the end of the
636 RHS.
637 (c_parser_conditional_expression): Likewise, based on the range
638 from the start of the cond.value to the end of exp2.value.
639 (c_parser_binary_expression): Call set_c_expr_source_range on
640 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
641 (c_parser_cast_expression): Call set_c_expr_source_range on ret
642 based on the cast_loc through to the end of the expr.
643 (c_parser_unary_expression): Likewise, based on the
644 op_loc through to the end of op.
645 (c_parser_sizeof_expression) Likewise, based on the start of the
646 sizeof token through to either the closing paren or the end of
647 expr.
648 (c_parser_postfix_expression): Likewise, using the token range,
649 or from the open paren through to the close paren for
650 parenthesized expressions.
651 (c_parser_postfix_expression_after_primary): Likewise, for
652 various kinds of expression.
653 * c-tree.h (struct c_expr): Add field "src_range".
654 (c_expr::get_start): New method.
655 (c_expr::get_finish): New method.
656 (set_c_expr_source_range): New decls.
657 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
658 on ret for prefix unary ops.
659 (parser_build_binary_op): Likewise, running from the start of
660 arg1.value through to the end of arg2.value.
661
ec8b536f
MP
6622015-11-13 Marek Polacek <polacek@redhat.com>
663
664 PR c/68320
665 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
666
277fe616
DM
6672015-11-13 David Malcolm <dmalcolm@redhat.com>
668
669 * c-typeck.c: Include spellcheck.h.
670 (lookup_field_fuzzy_find_candidates): New function.
671 (lookup_field_fuzzy): New function.
672 (build_component_ref): If the field was not found, try using
673 lookup_field_fuzzy and potentially offer a suggestion.
674
6e232ba4
JN
6752015-11-12 James Norris <jnorris@codesourcery.com>
676 Joseph Myers <joseph@codesourcery.com>
677
678 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
679 (c_parser_omp_clause_name): Handle 'device_resident' clause.
680 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
681 and PRAGMA_OMP_CLAUSE_LINK.
682 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
683 and PRAGMA_OACC_CLAUSE_LINK.
684 (OACC_DECLARE_CLAUSE_MASK): New definition.
685 (c_parser_oacc_declare): New function.
686
9be4f715
MP
6872015-11-12 Marek Polacek <polacek@redhat.com>
688
689 PR c/67784
690 * c-parser.c (c_parser_for_statement): Reclassify the token in
691 a correct scope.
692
e78bede6
MP
6932015-11-11 Marek Polacek <polacek@redhat.com>
694
695 PR c/68107
696 PR c++/68266
697 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
698 checking the size of an array.
699
69f293c9
AM
7002015-11-11 Andrew MacLeod <amacleod@redhat.com>
701
702 * c-array-notation.c: Remove unused header files.
703 * c-aux-info.c: Likewise.
704 * c-convert.c: Likewise.
705 * c-decl.c: Likewise.
706 * c-errors.c: Likewise.
707 * c-lang.c: Likewise.
708 * c-objc-common.c: Likewise.
709 * c-parser.c: Likewise.
710 * c-typeck.c: Likewise.
711 * gccspec.c: Likewise.
712
3a40d81d
NS
7132015-11-09 Thomas Schwinge <thomas@codesourcery.com>
714 Cesar Philippidis <cesar@codesourcery.com>
715 James Norris <jnorris@codesourcery.com>
716 Julian Brown <julian@codesourcery.com>
717 Nathan Sidwell <nathan@codesourcery.com>
718
719 c/
720 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
721 routine arg.
722 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
723 (c_parser_pragma): Parse 'acc routine'.
724 (OACC_ROUTINE_CLAUSE_MARK): Define.
725 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
726
fc402eec
AA
7272015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
728
729 PR debug/67192
730 * c-typeck.c (c_finish_loop): For unconditional loops, set the
731 location of the backward-goto to the start of the loop body.
732
f6b0b3db
AA
7332015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
734
735 PR debug/67192
736 * c-parser.c (c_parser_while_statement): Finish the loop before
737 parsing ahead for misleading indentation.
738 (c_parser_for_statement): Likewise.
739
ee45a32d
EB
7402015-11-08 Eric Botcazou <ebotcazou@adacore.com>
741
742 * c-decl.c (finish_struct): If the structure has reverse storage
743 order, rewrite the type of array fields with scalar component. Call
744 maybe_apply_pragma_scalar_storage_order on entry.
745 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
746 errors on bit-fields and reverse SSO here and not...
747 (c_mark_addressable): ...here.
748 (output_init_element): Adjust call to initializer_constant_valid_p.
749 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
750
8a645150
DM
7512015-11-06 David Malcolm <dmalcolm@redhat.com>
752
753 * c-decl.c (warn_defaults_to): Update for change in signature
754 of diagnostic_set_info.
755 * c-errors.c (pedwarn_c99): Likewise.
756 (pedwarn_c90): Likewise.
757 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
758 for textinfo::set_location.
759
7a5e4956
CP
7602015-11-05 Cesar Philippidis <cesar@codesourcery.com>
761 Thomas Schwinge <thomas@codesourcery.com>
762 James Norris <jnorris@codesourcery.com>
763
764 * c-parser.c (c_parser_omp_clause_name): Add support for
765 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
766 (c_parser_omp_clause_default): Add is_oacc argument. Handle
767 default(none) in OpenACC.
768 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
769 arguments.
770 (c_parser_oacc_clause_tile): New function.
771 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
772 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
773 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
774 TILE}.
775 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
776 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
777 FIRSTPRIVATE}.
778 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
779 (c_parser_oacc_update): Update the error message for missing clauses.
780 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
781 and OMP_CLAUSE_INDEPENDENT.
782
bfcfbfa0
MP
7832015-11-05 Marek Polacek <polacek@redhat.com>
784
785 PR c/68090
786 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
787 deal with pre-evaluation on invalid types.
788
e01d41e5
JJ
7892015-11-05 Jakub Jelinek <jakub@redhat.com>
790 Ilya Verbin <ilya.verbin@intel.com>
791
792 * c-parser.c: Include context.h and gimple-expr.h.
793 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
794 monotonic together with nonmonotonic.
795 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
796 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
797 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
798 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
799 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
800 expressions on combined target teams before the target.
801 (c_parser_omp_declare_target): If decl has "omp declare target" or
802 "omp declare target link" attribute, and cgraph or varpool node already
803 exists, then set corresponding flags. Call c_finish_omp_clauses
804 in the parenthesized extended-list syntax case.
805 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
806 declare target.
807 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
808 on OMP_CLAUSE_REDUCTION array sections.
809 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
810 into the constant offset, or for variable low-bound using
811 POINTER_PLUS_EXPR. For structure element based array sections use
812 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
813 (c_finish_omp_clauses): Drop generic_field_head, structure
814 elements are now always mapped even as array section bases,
815 diagnose same var in data sharing and mapping clauses. Diagnose if
816 linear step on declare simd is neither a constant nor a uniform
817 parameter. Look through POINTER_PLUS_EXPR for array section
818 reductions. Diagnose the same var or function appearing multiple
819 times on the same directive. Fix up wording for the to clause if t
820 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
821 modifier on kinds other than dynamic or guided or nonmonotonic
822 modifier together with ordered clause.
823
4bf9e5a8
TS
8242015-11-03 Thomas Schwinge <thomas@codesourcery.com>
825 Chung-Lin Tang <cltang@codesourcery.com>
826
827 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
828
2adfab87
AM
8292015-10-29 Andrew MacLeod <amacleod@redhat.com>
830
831 * c-array-notation.c: Reorder #include's and remove duplicates.
832 * c-aux-info.c: Likewise.
833 * c-convert.c: Likewise.
834 * c-decl.c: Likewise.
835 * c-errors.c: Likewise.
836 * c-lang.c: Likewise.
837 * c-objc-common.c: Likewise.
838 * c-parser.c: Likewise.
839 * c-typeck.c: Likewise.
840
e922069e
JW
8412015-10-26 Jim Wilson <jim.wilson@linaro.org>
842
843 PR debug/66068
844 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
845 after calling build_qualified_type.
846
765dd391
CP
8472015-10-27 Cesar Philippidis <cesar@codesourcery.com>
848 Thomas Schwinge <thomas@codesourcery.com>
849 James Norris <jnorris@codesourcery.com>
850 Joseph Myers <joseph@codesourcery.com>
851 Julian Brown <julian@codesourcery.com>
852 Bernd Schmidt <bschmidt@redhat.com>
853
854 * c-parser.c (c_parser_oacc_shape_clause): New.
855 (c_parser_oacc_simple_clause): New.
856 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
857 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
858
88bae6f4
TS
8592015-10-27 Thomas Schwinge <thomas@codesourcery.com>
860 James Norris <jnorris@codesourcery.com>
861 Cesar Philippidis <cesar@codesourcery.com>
862
863 PR c/64765
864 PR c/64880
865 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
866 parameters, and handle these. Adjust all users.
867 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
868 into...
869 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
870 all users.
871 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
872 declare functions.
873 (c_finish_omp_construct): Declare function.
874 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
875 Merge functions into...
876 (c_finish_omp_construct): ... this new function.
877
a8fc2579
RB
8782015-10-22 Richard Biener <rguenther@suse.de>
879
880 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
881 before folding a MINUS_EXPR.
882
e9122ef6
MP
8832015-10-21 Marek Polacek <polacek@redhat.com>
884
885 PR c/68024
886 * c-decl.c (start_function): Warn about vararg functions without
887 a prototype.
888
9f47c7e5
IE
8892015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
890
891 * c-typeck.c (build_conditional_expr): Use boolean vector
892 type for vector comparison.
893 (build_vec_cmp): New.
894 (build_binary_op): Use build_vec_cmp for comparison.
895
fa60eeb9
MP
8962015-10-20 Marek Polacek <polacek@redhat.com>
897
898 * c-parser.c (is_cilkplus_vector_p): Don't define here.
899
2c7020eb
MP
9002015-10-20 Marek Polacek <polacek@redhat.com>
901
902 PR c/67964
903 * c-parser.c (c_parser_attributes): Break out of the loop if the
904 token after an attribute isn't a comma.
905
d9a6bd32
JJ
9062015-10-13 Jakub Jelinek <jakub@redhat.com>
907 Aldy Hernandez <aldyh@redhat.com>
908
909 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
910 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
911 (c_parser_omp_variable_list): Handle structure elements for
912 map, to and from clauses. Handle array sections in reduction
913 clause. Formatting fixes.
914 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
915 if clause modifiers.
916 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
917 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
918 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
919 c_parser_omp_clause_is_device_ptr): New functions.
920 (c_parser_omp_clause_ordered): Parse optional parameter.
921 (c_parser_omp_clause_reduction): Handle array reductions.
922 (c_parser_omp_clause_schedule): Parse optional simd modifier.
923 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
924 functions.
925 (c_parser_omp_clause_linear): Parse linear clause modifiers.
926 (c_parser_omp_clause_depend_sink): New function.
927 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
928 (c_parser_omp_clause_map): Parse release/delete map kinds and
929 optional always modifier.
930 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
931 and c_finish_omp_clauses callers.
932 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
933 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
934 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
935 (OMP_CRITICAL_CLAUSE_MASK): Define.
936 (c_parser_omp_critical): Parse critical clauses.
937 (c_parser_omp_for_loop): Handle doacross loops, adjust
938 c_finish_omp_for and c_finish_omp_clauses callers.
939 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
940 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
941 (OMP_FOR_CLAUSE_MASK): Add linear clause.
942 (c_parser_omp_for): Disallow ordered clause when combined with
943 distribute. Disallow linear clause when combined with distribute
944 and not combined with simd.
945 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
946 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
947 parse clauses and if depend clause is found, don't parse a body.
948 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
949 Allow target parallel without for after it.
950 (OMP_TASK_CLAUSE_MASK): Add priority clause.
951 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
952 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
953 invalid kinds.
954 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
955 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
956 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
957 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
958 functions.
959 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
960 defaultmap and is_device_ptr clauses.
961 (c_parser_omp_target): Parse target parallel and target simd. Set
962 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
963 and target exit data. Diagnose invalid map kinds.
964 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
965 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
966 construct.
967 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
968 &omp_priv.
969 (OMP_TASKLOOP_CLAUSE_MASK): Define.
970 (c_parser_omp_taskloop): New function.
971 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
972 handle PRAGMA_OMP_TASKLOOP.
973 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
974 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
975 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
976 Add IS_OMP argument, handle structure element bases, diagnose
977 bitfields, pass IS_OMP recursively, diagnose known zero length
978 array sections in depend clauses, handle array sections in reduction
979 clause, diagnose negative length even for pointers.
980 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
981 types, pass IS_OMP down to handle_omp_array_sections_1, handle
982 array sections in reduction clause, set
983 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
984 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
985 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
986 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
987
21ba0cea
MP
9882015-10-06 Marek Polacek <polacek@redhat.com>
989
990 * c-parser.c (c_parser_statement_after_labels): Use
991 protected_set_expr_location.
992 (c_parser_omp_clause_num_gangs): Likewise.
993 (c_parser_omp_clause_num_threads): Likewise.
994 (c_parser_omp_clause_num_workers): Likewise.
995 (c_parser_omp_clause_vector_length): Likewise.
996 (c_parser_omp_clause_num_teams): Likewise.
997 (c_parser_omp_clause_thread_limit): Likewise.
998 * c-typeck.c (build_c_cast): Likewise.
999 (c_cast_expr): Likewise.
1000
624d31fe
RS
10012015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1002
1003 * c-typeck.c (c_tree_equal): Use real_equal instead of
1004 REAL_VALUES_EQUAL.
1005
b8fd7909
JM
10062015-10-04 Jason Merrill <jason@redhat.com>
1007
1008 * c-parser.c (c_lex_one_token): Handle @synchronized.
1009 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1010 can change whether the function is transaction_safe.
1011
1c7485af
MP
10122015-10-02 Marek Polacek <polacek@redhat.com>
1013
1014 PR c/67730
1015 * c-typeck.c (convert_for_assignment): Use the expansion point
1016 location throughout.
1017
3e3b8d63
MP
10182015-10-02 Marek Polacek <polacek@redhat.com>
1019
1020 PR c/64249
1021 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1022 and pass it down to c_parser_if_statement.
1023 (c_parser_else_body): Add CHAIN parameter and pass it down to
1024 c_parser_statement_after_labels.
1025 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1026 duplicated if-else-if conditions.
1027
aabef2de
MP
10282015-10-01 Marek Polacek <polacek@redhat.com>
1029
1030 * c-typeck.c (convert_for_assignment): Improve commentary.
1031
de8ddd5f
MP
10322015-09-30 Marek Polacek <polacek@redhat.com>
1033
1034 PR c/67730
1035 * c-typeck.c (c_finish_return): Use the expansion point location for
1036 certain "return with value" warnings.
1037
c4914de6
MLI
10382015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1039
1040 * c-parser.c (pragma_lex): Add loc argument.
1041
0e36f5c7
MP
10422015-09-15 Marek Polacek <polacek@redhat.com>
1043
1044 PR c/67580
1045 * c-decl.c (tag_exists_p): New function.
1046 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1047 struct/union/enum keywords are missing.
1048 * c-tree.h (tag_exists_p): Declare.
1049
2f3bb934
MP
10502015-09-15 Marek Polacek <polacek@redhat.com>
1051
1052 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1053 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1054 Return NULL_TREE instead of 0.
1055 (lookup_name): Return NULL_TREE instead of 0.
1056 (lookup_name_in_scope): Likewise.
1057 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1058 (parser_xref_tag): Use false instead of 0.
1059 (start_struct): Use true instead of 1.
1060 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1061
aa256c4a
MP
10622015-09-14 Marek Polacek <polacek@redhat.com>
1063
1064 * c-typeck.c (set_nonincremental_init_from_string): Use
1065 HOST_WIDE_INT_M1U when shifting a negative value.
1066
dbb68221
MW
10672015-09-09 Mark Wielaard <mjw@redhat.com>
1068
1069 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1070 parm against NULL.
1071
a8a098ac
JJ
10722015-09-10 Jakub Jelinek <jakub@redhat.com>
1073
1074 PR c/67502
1075 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1076 into OMP_FOR_PRE_BODY rather than before the loop.
1077
f4b189d5
JJ
10782015-09-09 Jakub Jelinek <jakub@redhat.com>
1079
0bb99c11
JJ
1080 PR c/67501
1081 * c-parser.c (c_parser_oacc_all_clauses,
1082 c_parser_omp_all_clauses): Remove invalid clause from
1083 list of clauses even if parser->error is set.
1084
fce5e5e3
JJ
1085 PR c/67500
1086 * c-parser.c (c_parser_omp_clause_aligned,
1087 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1088 test for errors.
1089 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1090 error_mark_node.
1091
f4b189d5
JJ
1092 PR c/67495
1093 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1094 instead of c_parser_unary_expression. If the result is !lvalue_p,
1095 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1096
b2aaf235
MP
10972015-09-04 Marek Polacek <polacek@redhat.com>
1098
1099 PR sanitizer/67279
1100 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1101
1807ffc1
MS
11022015-09-03 Martin Sebor <msebor@redhat.com>
1103
1104 PR c/66516
8b652e65
JJ
1105 * c-typeck.c (convert_arguments, parser_build_unary_op,
1106 build_conditional_expr, c_cast_expr, convert_for_assignment,
1107 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1108 reject_gcc_builtin.
1109 (c_decl_implicit): Define.
1110
d04ff417
MP
11112015-09-02 Marek Polacek <polacek@redhat.com>
1112
1113 PR c/67432
1114 * c-parser.c (c_parser_enum_specifier): Give a better error for
1115 an empty enum.
1116
a79683d5
TS
11172015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1118
1119 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1120
191a6b94
MP
11212015-08-12 Marek Polacek <polacek@redhat.com>
1122
1123 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1124 LOC to it.
1125
420a9d9b
MP
11262015-08-03 Marek Polacek <polacek@redhat.com>
1127
1128 PR c/67088
1129 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1130 Use it.
1131 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1132
992118a1
PP
11332015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1134
1135 * c-parser.c (c_parser_if_body): Take token_indent_info
1136 argument. Call warn_for_misleading_indentation even when the
1137 body is a semicolon. Extract token_indent_infos corresponding
1138 to the guard, body and next tokens. Adjust call to
1139 warn_for_misleading_indentation accordingly.
1140 (c_parser_else_body): Likewise.
1141 (c_parser_if_statement): Likewise.
1142 (c_parser_while_statement): Likewise.
1143 (c_parser_for_statement): Likewise.
1144
46308474
LFSM
11452015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1146 Manuel López-Ibáñez <manu@gcc.gnu.org>
1147
1148 * c-decl.c (get_parm_info): Remove static var. Update warning
1149 message.
1150
05b28fd6
MP
11512015-07-27 Marek Polacek <polacek@redhat.com>
1152
1153 PR c++/66555
1154 PR c/54979
1155 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1156
451b5e48
MP
11572015-07-20 Marek Polacek <polacek@redhat.com>
1158
1159 PR c++/55095
1160 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1161 (build_binary_op): Warn about left shift overflows.
1162
1916bcb5
AM
11632015-07-09 Andrew MacLeod <amacleod@redhat.com>
1164
1165 * c-array-notation.c: Adjust includes for flags.h changes.
1166 * c-objc-common.c: Likewise.
1167
c7131fb2
AM
11682015-07-07 Andrew MacLeod <amacleod@redhat.com>
1169
1170 * c-array-notation.c: Adjust includes.
1171 * c-aux-info.c: Likewise.
1172 * c-convert.c: Likewise.
1173 * c-decl.c: Likewise.
1174 * c-errors.c: Likewise.
1175 * c-lang.c: Likewise.
1176 * c-objc-common.c: Likewise.
1177 * c-parser.c: Likewise.
1178 * c-typeck.c: Likewise.
1179
da2e71c9
MLI
11802015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1181
1182 PR fortran/66605
1183 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1184
b155cfd9
MP
11852015-06-29 Marek Polacek <polacek@redhat.com>
1186
1187 PR c/66322
1188 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1189 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1190 about -Wswitch-bool here.
1191 (do_case): Update c_add_case_label call.
1192 (c_finish_case): Update c_do_switch_warnings call.
1193
31521951
MP
11942015-06-27 Marek Polacek <polacek@redhat.com>
1195
1196 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1197
22d03525
MP
11982015-06-26 Marek Polacek <polacek@redhat.com>
1199
1200 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1201 INDIRECT_REF_P.
1202 * c-typeck.c (array_to_pointer_conversion): Likewise.
1203 (build_unary_op): Likewise.
1204 (c_finish_return): Likewise.
1205
f0889939
AM
12062015-06-25 Andrew MacLeod <amacleod@redhat.com>
1207
1208 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1209 * c-parser.c: Likewise.
1210
8d67ee55
RS
12112015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1212
1213 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1214 instead of pointer_hash.
1215 (detect_field_duplicates): Likewise.
1216
0ae9bd27
MP
12172015-06-25 Marek Polacek <polacek@redhat.com>
1218
1219 * c-array-notation.c: Use VAR_P throughout.
1220 * c-decl.c: Likewise.
1221 * c-objc-common.c: Likewise.
1222 * c-parser.c: Likewise.
1223 * c-typeck.c: Likewise.
1224
62f9079a
MP
12252015-06-25 Marek Polacek <polacek@redhat.com>
1226
1227 * c-decl.c: Use is_global_var throughout.
1228 * c-parser.c: Likewise.
1229 * c-typeck.c: Likewise.
1230
abb226c9
AM
12312015-06-17 Andrew MacLeod <amacleod@redhat.com>
1232
1233 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1234 * c-aux-info.c: Likewise.
1235 * c-convert.c: Likewise.
1236 * c-decl.c: Likewise.
1237 * c-errors.c: Likewise.
1238 * c-lang.c: Likewise.
1239 * c-objc-common.c: Likewise.
1240 * c-parser.c: Likewise.
1241 * c-typeck.c: Likewise.
1242
8cbababc
JH
12432015-06-11 Jan Hubicka <hubicka@ucw.cz>
1244
1245 PR middle-end/66325
1246 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1247 variants.
1248
a0349665
PMR
12492015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1250
1251 * c-decl.c (pop_scope): Register the main translation unit
1252 through the new debug hook.
1253
13fdf2e2
AM
12542015-06-08 Andrew MacLeod <amacleod@redhat.com>
1255
1256 * c-array-notation.c : Adjust include files.
1257 * c-aux-info.c : Likewise.
1258 * c-convert.c : Likewise.
1259 * c-decl.c : Likewise.
1260 * c-errors.c : Likewise.
1261 * c-lang.c : Likewise.
1262 * c-lang.h : Likewise.
1263 * c-objc-common.c : Likewise.
1264 * c-parser.c : Likewise.
1265 * c-typeck.c : Likewise.
1266
d7438551
AH
12672015-06-05 Aldy Hernandez <aldyh@redhat.com>
1268
1269 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1270 immediately clobber it.
1271 (c_write_global_declarations_1): Remove call to
1272 check_global_declaration_1.
1273 (c_write_global_declarations_2): Remove.
1274 (c_write_final_cleanups): Rename from c_write_global_declarations.
1275 Remove call to finalize_compilation_unit.
1276 Remove calls to debugging hooks.
1277 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1278 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1279 * c-tree.h: Remove c_write_global_declarations.
1280
ecb9f223
AM
12812015-06-04 Andrew MacLeod <amacleod@redhat.com>
1282
1283 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1284 * c-aux-info.c: Likewise.
1285 * c-convert.c: Likewise.
1286 * c-decl.c: Likewise.
1287 * c-errors.c: Likewise.
1288 * c-lang.c: Likewise.
1289 * c-objc-common.c: Likewise.
1290 * c-parser.c: Likewise.
1291 * c-typeck.c: Likewise.
1292
9482b620
MP
12932015-06-04 Marek Polacek <polacek@redhat.com>
1294
1295 PR c/66341
1296 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1297 it is a lvalue.
1298
bc51ace3
PK
12992015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1300
1301 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1302 Warn for empty struct.
1303 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1304
ea5b45b6
AT
13052015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1306
1307 * c-decl.c (start_function): Call plugin before parsing.
1308 (finish_function): Call plugin after parsing.
1309
c2d47482
PK
13102015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1311
1312 PR c/49551
1313 * c-decl.c (merge_decls): Merge DECL_COMMON.
1314
a95492ab
JW
13152015-05-22 Jim Wilson <jim.wilson@linaro.org>
1316
1317 * Make-lang.in (check_gcc_pallelize): Define.
1318
fd5c817a
MP
13192015-05-22 Marek Polacek <polacek@redhat.com>
1320
1321 PR c/47043
1322 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1323 attributes.
1324
c7b70a3c
MP
13252015-05-21 Marek Polacek <polacek@redhat.com>
1326
1327 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1328 DECL_BUILT_IN.
1329
21b634ae
MP
13302015-05-20 Marek Polacek <polacek@redhat.com>
1331
1332 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1333 * c-typeck.c: Likewise.
1334
296a8c2f
MP
13352015-05-19 Marek Polacek <polacek@redhat.com>
1336
1337 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1338
41b37d5e
JJ
13392015-05-19 Jakub Jelinek <jakub@redhat.com>
1340
1341 PR middle-end/66199
1342 * c-parser.c (c_parser_omp_for_loop): Don't add
1343 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1344 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1345 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1346 constructs.
1347
fab27f52
MM
13482015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1349
1350 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 1351 swaps.
fab27f52 1352
40de31cf
MLI
13532015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1354
1355 PR fortran/44054
1356 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1357 accessor function.
1358
3aa3c9fc
MP
13592015-05-14 Marek Polacek <polacek@redhat.com>
1360
1361 PR c/66066
1362 PR c/66127
1363 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1364 rather than with 0.
1365
c3388e62
DM
13662015-05-12 David Malcolm <dmalcolm@redhat.com>
1367
1368 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1369 to add a call to warn_for_misleading_indentation.
1370 (c_parser_else_body): Likewise, adding param "else_loc".
1371 (c_parser_if_statement): Check for misleading indentation.
1372 (c_parser_while_statement): Likewise.
1373 (c_parser_for_statement): Likewise.
1374
755e528f
MP
13752015-05-08 Marek Polacek <polacek@redhat.com>
1376
1377 PR c/64918
1378 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1379 (output_init_element): Likewise.
1380
0173bd2a
MP
13812015-05-07 Marek Polacek <polacek@redhat.com>
1382
1383 PR c/65179
1384 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1385 value.
1386
9babc352
MP
13872015-04-30 Marek Polacek <polacek@redhat.com>
1388
1389 * c-typeck.c (set_init_label): Call error_at instead of error and
1390 pass LOC to it.
1391
ac9f18db
MP
1392 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1393 the type of a decl.
1394
ec3fba51
MP
1395 * c-typeck.c (c_build_va_arg): Clarify the error message.
1396
b811915d
TS
13972015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1398
1399 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1400 OMP_STANDALONE_CLAUSES.
1401
f3075008
MP
14022015-04-28 Marek Polacek <polacek@redhat.com>
1403
1404 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1405
4e81b788
MP
14062015-04-28 Marek Polacek <polacek@redhat.com>
1407
1408 PR c/65901
1409 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1410
6c1db78e
MP
14112015-04-25 Marek Polacek <polacek@redhat.com>
1412
1413 PR c/52085
1414 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1415 attribute.
1416
5c4abbb8
MP
14172015-04-23 Marek Polacek <polacek@redhat.com>
1418
1419 PR c/65345
1420 * c-decl.c (set_labels_context_r): New function.
1421 (store_parm_decls): Call it via walk_tree_without_duplicates.
1422 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1423 instead of create_tmp_var. Build TARGET_EXPR instead of
1424 COMPOUND_EXPR.
1425 (build_atomic_assign): Use create_tmp_var_raw instead of
1426 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1427
06aca1d5
IV
14282015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1429
1430 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1431 (c_parser_omp_target_update): Add missed %> to error_at ().
1432
8fba1830
BRF
14332015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1434
1435 PR target/55143
1436 * c-decl.c (c_default_pointer_mode): Remove definition.
1437 * c-tree.h (c_default_pointer_mode): Remove declaration.
1438
62021f64
TB
14392015-03-27 Tobias Burnus <burnus@net-b.de>
1440
1441 PR c/65586
1442 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1443 error out.
1444 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1445 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1446 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1447
9b65e171
JJ
14482015-03-19 Jakub Jelinek <jakub@redhat.com>
1449
1450 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1451 attribute for DECL_EXTERNAL VAR_DECLs.
1452
17958621
JJ
14532015-03-11 Jakub Jelinek <jakub@redhat.com>
1454
1455 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1456 argument.
1457
7ccb1a11
JJ
14582015-03-10 Jakub Jelinek <jakub@redhat.com>
1459
1460 PR c/65120
1461 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1462 before preparing arguments to warn_logical_not_parentheses.
1463
01177669
JJ
14642015-03-09 Jakub Jelinek <jakub@redhat.com>
1465
1466 PR c/65120
1467 * c-typeck.c (parser_build_binary_op): Don't warn for
1468 !!x == y or !b == y where b is _Bool.
1469
802ac282
MP
14702015-03-09 Marek Polacek <polacek@redhat.com>
1471
1472 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1473 * c-decl.c (grokdeclarator): Likewise.
1474 * c-typeck.c (build_binary_op): Likewise.
1475
e5165b60
MP
14762015-02-27 Marek Polacek <polacek@redhat.com>
1477
1478 PR c/65228
1479 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1480
065d214c
MP
14812015-02-14 Marek Polacek <polacek@redhat.com>
1482
1483 PR c/64768
1484 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1485 declared through a typedef name.
1486
e5d9235b
MP
14872015-02-13 Marek Polacek <polacek@redhat.com>
1488
1489 PR c/65050
1490 * c-decl.c (grokdeclarator): Print also the type when giving
1491 the error message about array's incomplete element type.
1492
fa01ffcc
JJ
14932015-02-11 Jakub Jelinek <jakub@redhat.com>
1494
1495 PR c/64824
1496 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1497 check in the POP macro.
1498
c3e38a03
MP
14992015-02-09 Marek Polacek <polacek@redhat.com>
1500
1501 PR c/64856
1502 * c-typeck.c (process_init_element): Don't always wrap
1503 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1504 initializing a range of elements.
1505
4886ec8e
JJ
15062015-02-04 Jakub Jelinek <jakub@redhat.com>
1507
1508 PR c/64824
1509 PR c/64868
1510 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1511
c3e38a03 15122015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
1513
1514 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1515 processing enum declaration.
1516
7b33f0c8
MP
15172015-01-29 Marek Polacek <polacek@redhat.com>
1518
1519 PR c/64709
1520 * c-typeck.c (pop_init_level): If constructor_elements has
1521 exactly one element with integer_zerop value, set constructor_zeroinit
1522 to 1. Remove braces around warning_init call.
1523
dea63e49
JJ
15242015-01-27 Jakub Jelinek <jakub@redhat.com>
1525
1526 PR c/64766
1527 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1528 of FUNCTION_DECLs with error_mark_node.
1529
d38f7dce
JJ
15302015-01-26 Jakub Jelinek <jakub@redhat.com>
1531
1532 PR c/64778
1533 * c-typeck.c (convert_arguments): Return -1 if there are
1534 error_args, even if we've diagnosed too many arguments.
1535
cbf5d0e7
RB
15362015-01-21 Richard Biener <rguenther@suse.de>
1537
1538 PR middle-end/64313
1539 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1540 for builtins the user declared correctly.
1541
41dbbb37
TS
15422015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1543 Bernd Schmidt <bernds@codesourcery.com>
1544 Cesar Philippidis <cesar@codesourcery.com>
1545 James Norris <jnorris@codesourcery.com>
1546 Jakub Jelinek <jakub@redhat.com>
1547 Ilmir Usmanov <i.usmanov@samsung.com>
1548
1549 * c-parser.c: Include "gomp-constants.h".
1550 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1551 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1552 Use OMP_CLAUSE_SET_MAP_KIND.
1553 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1554 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1555 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1556 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1557 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1558 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1559 "copyout", "create", "delete", "deviceptr", "gang", "host",
1560 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1561 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1562 "present_or_create", "pcreate", "seq", "self", "vector",
1563 "vector_length", "wait", "worker".
1564 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1565 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1566 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1567 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1568 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1569 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1570 (c_parser_oacc_data_clause_deviceptr)
1571 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1572 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1573 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1574 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1575 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1576 (c_parser_oacc_parallel, c_parser_oacc_update)
1577 (c_parser_oacc_wait): New functions.
1578 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1579 (c_finish_oacc_data): New prototypes.
1580 * c-typeck.c: Include "gomp-constants.h".
1581 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1582 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1583 OMP_CLAUSE_SET_MAP_KIND.
1584 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1585 (c_finish_oacc_data): New functions.
1586 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1587 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1588 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1589 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1590 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1591 GOMP_MAP_FORCE_DEVICEPTR.
1592
adfac8df
JJ
15932015-01-09 Michael Collison <michael.collison@linaro.org>
1594
1595 * c-array-notation.c: Include hash-set.h, machmode.h,
1596 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1597 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1598 * c-aux-info.c: Ditto.
1599 * c-convert.c: Ditto.
1600 * c-decl.c: Ditto.
1601 * c-errors.c: Ditto.
1602 * c-lang.c: Dittoxs.
1603 * c-objc-common.c: Ditto.
1604 * c-parser.c: Ditto.
1605 * c-typeck.c: Include hash-set.h, machmode.h,
1606 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1607 fold-const.h, wide-int.h, inchash.h, real.h and
1608 fixed-value.h due to flattening of tree.h.
1609
2cc901dc
MP
16102015-01-07 Marek Polacek <polacek@redhat.com>
1611
1612 PR c/64417
1613 * c-typeck.c (process_init_element): Disallow initialization of
1614 a flexible array member with a string constant if the structure
1615 is in an array.
1616
5624e564
JJ
16172015-01-05 Jakub Jelinek <jakub@redhat.com>
1618
e5341100
JJ
1619 PR sanitizer/64344
1620 * c-typeck.c (convert_for_assignment, c_finish_return): For
1621 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1622 types also set in_late_binary_op around convert call.
1623 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1624 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1625 result on expr as last argument to ubsan_instrument_float_cast,
1626 if in_late_binary_op, don't use c_save_expr but save_expr.
1627
5624e564
JJ
1628 Update copyright years.
1629
5bd012f8
MP
16302015-01-05 Marek Polacek <polacek@redhat.com>
1631
1632 PR c/64423
1633 * c-typeck.c (build_array_ref): Pass loc down to
1634 warn_array_subscript_with_type_char.
1635
768952be
MU
16362014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1637
1638 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1639 (common-pointer-type): For pointers to arrays take qualifiers from
1640 element type.
1641 (build_conditional_expr): Add warnings for lost qualifiers.
1642 (comp-target-types): Allow pointers to arrays with different qualifiers.
1643 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1644 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1645 to PEDWARN_FOR_QUALIFIERS.
1646
8f94a8c4
JJ
16472014-12-17 Jakub Jelinek <jakub@redhat.com>
1648
1649 PR sanitizer/64289
1650 * c-convert.c: Include ubsan.h.
1651 (convert): For real -> integral casts and
1652 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1653 instead instrument the float cast directly.
1654
b731b390
JJ
16552014-11-29 Jakub Jelinek <jakub@redhat.com>
1656
1657 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1658 c_finish_stmt_expr): Remove NULL last argument from
1659 create_tmp_var_raw and create_tmp_var calls.
1660 * c-array-notation.c (fix_builtin_array_notation_fn,
1661 build_array_notation_expr, fix_conditional_array_notations_1,
1662 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1663
541e35a6
MP
16642014-11-28 Marek Polacek <polacek@redhat.com>
1665
1666 PR c/63862
1667 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1668 convert the right operand to integer type.
1669
b286be94
MP
16702014-11-25 Marek Polacek <polacek@redhat.com>
1671
1672 PR c/63877
1673 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1674 for inline functions.
1675
aa7da51a
JJ
16762014-11-21 Jakub Jelinek <jakub@redhat.com>
1677
1678 PR target/63764
1679 * c-typeck.c (build_array_ref): Adjust
1680 convert_vector_to_pointer_for_subscript caller. If it returns true,
1681 call non_lvalue_loc on the result.
1682
d876207f
RB
16832014-11-11 Richard Biener <rguenther@suse.de>
1684
1685 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1686 to true.
1687
e5e44252
AK
16882014-11-10 Andi Kleen <ak@linux.intel.com>
1689
1690 PR c/60804
1691 * c-parser.c (c_parser_statement_after_labels): Call
1692 check_no_cilk.
1693 (c_parser_if_statement): Dito.
1694 (c_parser_switch_statement): Dito.
1695 (c_parser_while_statement): Dito.
1696 (c_parser_do_statement): Dito.
1697 (c_parser_for_statement): Dito.
1698 * c-typeck.c (c_finish_loop): Dito.
1699
13c21655
PC
17002014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1701
1702 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1703 OPT_Wshift_count_overflow in the warnings.
1704
2d51fcef
MP
17052014-10-30 Marek Polacek <polacek@redhat.com>
1706
1707 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1708 print the stripped version as well, if they're not the same.
1709
ef4bddc2
RS
17102014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1711
1712 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1713 machine_mode.
1714
c582198b
AM
17152014-10-28 Andrew MacLeod <amacleod@redhat.com>
1716
1717 * c-decl.c: Adjust include files.
1718 * c-parser.c: Ditto.
1719
ddc8de03
PM
17202014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1721 Tom Tromey <tromey@redhat.com>
1722
1723 * c-tree.h (enum c_oracle_request): New.
1724 (c_binding_oracle_function): New typedef.
1725 (c_binding_oracle, c_pushtag, c_bind): Declare.
1726 * c-decl.c (c_binding_oracle): New global.
1727 (I_SYMBOL_CHECKED): New macro.
1728 (i_symbol_binding): New function.
1729 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1730 (I_TAG_CHECKED): New macro.
1731 (i_tag_binding): New function.
1732 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1733 (I_LABEL_CHECKED): New macro.
1734 (i_label_binding): New function.
1735 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1736 (c_print_identifier): Save and restore c_binding_oracle.
1737 (c_pushtag, c_bind): New functions.
1738
60393bbc
AM
17392014-10-27 Andrew MacLeod <amacleod@redhat.com>
1740
1741 * c-typeck.c: Adjust include files.
1742
d723bb7c
MLI
17432014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1744
1745 PR c++/53061
1746 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1747 initialization here...
1748 (c_initialize_diagnostics): ... but here. Set defaults after
1749 building pretty-printer.
1750
1bc5a451
MP
17512014-10-23 Marek Polacek <polacek@redhat.com>
1752
1753 PR c/63626
1754 * c-decl.c (pop_scope): Don't print warning in external_scope.
1755
4435bb92
MP
17562014-10-19 Marek Polacek <polacek@redhat.com>
1757
1758 PR c/63567
1759 * c-typeck.c (output_init_element): Allow initializing objects with
1760 static storage duration with compound literals even in C99 and add
1761 pedwarn for it.
1762
7278465e
MP
17632014-10-17 Marek Polacek <polacek@redhat.com>
1764
1765 PR c/63567
1766 * c-typeck.c (digest_init): Allow initializing objects with static
1767 storage duration with compound literals even in C99 and add pedwarn
1768 for it.
1769
d9b7be2e
MP
17702014-10-17 Marek Polacek <polacek@redhat.com>
1771
1772 PR c/63543
1773 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1774 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1775 error multiple times. Print the type.
1776
f406ae1f
MP
17772014-10-17 Marek Polacek <polacek@redhat.com>
1778
1779 PR c/63549
1780 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1781 type.
1782
92574c7c
MP
17832014-10-17 Marek Polacek <polacek@redhat.com>
1784
1785 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1786 (start_function): Use OPT_Wimplicit_int instead of 0.
1787 (store_parm_decls_oldstyle): Likewise.
1788
1bc4a978
MT
17892014-10-17 Alan Modra <amodra@gmail.com>
1790
1791 PR middle-end/61848
1792 * c-decl.c (merge_decls): Don't merge section name or tls model
1793 to newdecl symtab node, instead merge to olddecl. Override
1794 existing olddecl section name. Set tls_model for all thread-local
1795 vars, not just OMP thread-private ones. Remove incorrect comment.
1796
83685514
AM
17972014-10-16 Andrew MacLeod <amacleod@redhat.com>
1798
1799 * c-decl.c: Adjust include files.
1800
78a7c317
DD
18012014-10-14 DJ Delorie <dj@redhat.com>
1802
1803 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1804 (c_token_starts_typename): Check all __intN, not just __int128.
1805 (c_token_starts_declspecs): Likewise.
1806 (c_parser_declspecs): Likewise.
1807 (c_parser_attribute_any_word): Likewise.
1808 (c_parser_objc_selector): Likewise.
1809 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1810 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1811 is specified.
1812 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1813 __int128.
1814 (finish_declspecs): Likewise.
1815
74d98c1e
AB
18162014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1817
1818 * c-parser.c (c_parser_all_labels): New function to replace
1819 the duplicate code.
1820 (c_parser_statement): Call the new function.
1821
84937de2
MP
18222014-10-09 Marek Polacek <polacek@redhat.com>
1823
1824 PR c/63480
1825 * c-typeck.c (pop_init_level): Don't warn about initializing
1826 with { }.
1827
0382aaa0
MP
18282014-10-07 Marek Polacek <polacek@redhat.com>
1829
1830 PR c/59717
1831 * c-decl.c (header_for_builtin_fn): New function.
1832 (implicitly_declare): Suggest which header to include.
1833
7a0ca710
MP
18342014-10-07 Marek Polacek <polacek@redhat.com>
1835
1836 * c-convert.c (convert): Use error_operand_p.
1837 * c-typeck.c (require_complete_type): Likewise.
1838 (really_atomic_lvalue): Likewise.
1839 (digest_init): Likewise.
1840 (handle_omp_array_sections_1): Likewise.
1841
6bc8a126
MP
18422014-10-03 Marek Polacek <polacek@redhat.com>
1843
1844 PR c/63453
1845 * c-decl.c (pop_scope): Don't warn about "inline function declared
1846 but never defined" for functions marked with gnu_inline attribute.
1847
d90c0a59
JJ
18482014-09-25 Jakub Jelinek <jakub@redhat.com>
1849
1850 PR c++/63249
1851 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1852 on low_bound and length.
1853
083e891e
MP
18542014-09-24 Marek Polacek <polacek@redhat.com>
1855
1856 PR c/61405
1857 PR c/53874
1858 * c-parser.c: Don't define CPP_KEYWORD.
1859 (c_parser_switch_statement): Pass original type to c_finish_case.
1860 * c-tree.h (c_finish_case): Update declaration.
1861 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1862 conditionally to c_do_switch_warnings.
1863
8d95fe25
MP
18642014-09-03 Marek Polacek <polacek@redhat.com>
1865
1866 PR c/62024
1867 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1868 conversions.
1869
9a771876
JJ
18702014-09-02 Jakub Jelinek <jakub@redhat.com>
1871 Balaji V. Iyer <balaji.v.iyer@intel.com>
1872 Igor Zamyatin <igor.zamyatin@intel.com>
1873
1874 * c-parser.c (c_parser_cilk_for): New function.
1875 (c_parser_cilk_grainsize): Likewise.
1876 (c_get_temp_regvar): Likewise.
1877 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1878 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1879 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1880 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1881 case.
1882
b7679d96
CG
18832014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1884
1885 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1886 with using HOST_WIDE_INT without truncation to 'int'
1887
59ea0364
MP
18882014-08-22 Marek Polacek <polacek@redhat.com>
1889
1890 PR c++/62199
1891 * c-typeck.c (parser_build_binary_op): Adjust call to
1892 warn_logical_not_parentheses.
1893
671a475e
IZ
18942014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1895
1896 PR other/62008
1897 * c-parser.c (c_parser_array_notation): Check for correct
1898 type of an array added.
1899
04159acf
MP
19002014-08-19 Marek Polacek <polacek@redhat.com>
1901
1902 PR c++/62153
1903 * c-typeck.c (build_binary_op): If either operand of a comparison
1904 is a boolean expression, call maybe_warn_bool_compare.
1905
c77935ee
PP
19062014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
1907
1908 PR c/45584
1909 * c-typeck.c (build_c_cast): Do a conversion even when the
1910 TYPE_MAIN_VARIANTs are the same.
1911
35aff4fb
MP
19122014-08-19 Marek Polacek <polacek@redhat.com>
1913
1914 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
1915 pedwarn_c99 instead of pedwarn.
1916 (grokfield): Likewise.
1917 (warn_defaults_to): New function.
1918 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
1919 Unconditionally call pedwarn_c99 instead of pedwarn.
1920 (start_function): Call warn_defaults_to instead of pedwarn_c99.
1921 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
1922 check flag_isoc11 before.
1923 * c-errors.c (pedwarn_c99): Change the return type to bool.
1924 Handle -Wc99-c11-compat.
1925 * c-parser.c (disable_extension_diagnostics): Handle
1926 warn_c99_c11_compat.
1927 (restore_extension_diagnostics): Likewise.
1928 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
1929 instead of pedwarn, don't check flag_isoc11 before.
1930 (c_parser_declspecs): Likewise.
1931 (c_parser_alignas_specifier): Likewise.
1932 (c_parser_alignof_expression): Likewise.
1933 (c_parser_generic_selection): Likewise.
1934 * c-tree.h (pedwarn_c99): Update declaration.
1935 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
1936 of pedwarn_c99.
1937
177cce46
MP
19382014-08-19 Marek Polacek <polacek@redhat.com>
1939
1940 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
1941 to pedwarn_c90.
1942 * c-errors.c: Include "opts.h".
1943 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
1944 * c-parser.c (disable_extension_diagnostics): Handle negative value
1945 of warn_c90_c99_compat, too.
1946 (restore_extension_diagnostics): Likewise.
1947 (c_parser_compound_statement_nostart): Pass
1948 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
1949
6dc99c33
MP
19502014-08-12 Marek Polacek <polacek@redhat.com>
1951
1952 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
1953 Add pedwarn.
1954 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
1955 Likewise.
1956 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
1957
f3bede71
MP
19582014-08-10 Marek Polacek <polacek@redhat.com>
1959
1960 PR c/51849
1961 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
1962 Call pedwarn_c90 instead of pedwarn.
1963 (check_bitfield_type_and_width): Likewise.
1964 (declspecs_add_qual): Likewise.
1965 (declspecs_add_type): Likewise.
1966 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
1967 Adjust to only call pedwarn_c90.
1968 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
1969 pedwarn_c90 instead of pedwarn.
1970 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
1971 * c-parser.c (disable_extension_diagnostics): Handle
1972 warn_c90_c99_compat.
1973 (restore_extension_diagnostics): Likewise.
1974 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
1975 pedwarn_c90 instead of pedwarn.
1976 (c_parser_initelt): Likewise.
1977 (c_parser_postfix_expression): Likewise.
1978 (c_parser_postfix_expression_after_paren_type): Likewise.
1979 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
1980 * c-tree.h: Fix formatting.
1981 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
1982 pedwarn_c90 instead of pedwarn.
1983
9f25a338
TS
19842014-08-07 Trevor Saunders <tsaunders@mozilla.com>
1985
1986 * c-typeck.c: Remove include of pointer-set.h.
1987
044331a8
MP
19882014-08-07 Marek Polacek <polacek@redhat.com>
1989
1990 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
1991
b787e7a2
TS
19922014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1993
1994 * c-typeck.c: Use hash_map instead of pointer_map.
1995
6e2830c3
TS
19962014-08-02 Trevor Saunders <tsaunders@mozilla.com>
1997
1998 * c-decl.c: Use hash_set instead of pointer_set.
1999
a7ee52fb
IZ
20002014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2001
2002 PR middle-end/61455
2003 * c-array-notation.c (expand_array_notations): Handling
2004 of DECL_EXPR added.
2005
b4dfdc11
MG
20062014-07-31 Marc Glisse <marc.glisse@inria.fr>
2007
2008 PR c++/60517
2009 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2010 a local variable.
2011
976d5a22
TT
20122014-07-30 Tom Tromey <tromey@redhat.com>
2013
2014 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2015 field.
2016 (really_start_incremental_init, push_init_level): Initialize
2017 designator_depth.
2018 (pop_init_level): Set global designator_depth.
2019 (process_init_element): Check for designated_init attribute.
2020
30281de2
MP
20212014-07-20 Marek Polacek <polacek@redhat.com>
2022
2023 PR c/61852
2024 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2025 (implicitly_declare): Pass location to implicit_decl_warning.
2026
b108f48f
JJ
20272014-07-14 Jakub Jelinek <jakub@redhat.com>
2028
2029 PR middle-end/61294
2030 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2031 If non-NULL, call c_parser_check_literal_zero.
2032 (c_parser_check_literal_zero): New function.
2033 (c_parser_postfix_expression_after_primary): Adjust
2034 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2035
773ec47f
MP
20362014-07-06 Marek Polacek <polacek@redhat.com>
2037
2038 PR c/6940
2039 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2040 * c-tree.h (C_ARRAY_PARAMETER): Define.
2041 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2042 function parameter.
2043
22e1cf1c
JH
20442014-07-02 Jan Hubicka <hubicka@ucw.cz>
2045 Chen Gang <gang.chen.5i5j@gmail.com>
2046
2047 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2048 releasing symbol.
2049
52ec0ea3
MP
20502014-07-01 Marek Polacek <polacek@redhat.com>
2051
2052 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2053 instead of 0 to WARN_FOR_ASSIGNMENT.
2054
d5c3d343
MP
20552014-07-01 Marek Polacek <polacek@redhat.com>
2056
2057 PR c/58286
2058 * c-typeck.c (convert_for_assignment): Pass
2059 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2060
6a7253a4
MP
20612014-06-30 Marek Polacek <polacek@redhat.com>
2062
2063 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2064 has no_sanitize_undefined attribute.
2065
5e88a8f4
IZ
20662014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2067
2068 PR middle-end/57541
2069 * c-array-notation.c (fix_builtin_array_notation_fn):
2070 Check for 0 arguments in builtin call. Check that bultin argument is
2071 correct.
2072 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2073 index.
2074
9698b078
SH
20752014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2076
2077 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2078 qualifiers in __auto_type for atomic types.
2079 (c_parser_typeof_specifier): Discard all type qualifiers in
2080 __typeof__ for atomic types.
2081
6e07c515
MP
20822014-06-25 Marek Polacek <polacek@redhat.com>
2083
2084 PR c/61162
2085 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2086 the return expression to c_finish_return.
2087
da6f124d
JJ
20882014-06-25 Jakub Jelinek <jakub@redhat.com>
2089
2090 * c-typeck.c (c_finish_omp_clauses): Make sure
2091 OMP_CLAUSE_LINEAR_STEP has correct type.
2092
c203e8a7
TS
20932014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2094
2095 * c-decl.c: Adjust.
2096
56ad0e38
JJ
20972014-06-24 Jakub Jelinek <jakub@redhat.com>
2098
2099 * c-parser.c (c_parser_omp_for_loop): For
2100 #pragma omp parallel for simd move lastprivate clause from parallel
2101 to for rather than simd.
2102
47c2554f
MP
21032014-06-23 Marek Polacek <polacek@redhat.com>
2104
2105 * c-typeck.c (parser_build_binary_op): Don't call
2106 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2107
56363ffd
JH
21082014-06-15 Jan Hubicka <hubicka@ucw.cz>
2109
2110 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2111 * c-decl.c (merge_decls): Likewise.
2112
d7ff7ae5
MP
21132014-06-09 Marek Polacek <polacek@redhat.com>
2114
2115 PR c/36446
2116 * c-typeck.c (error_init): Call inform instead of error_at.
2117 (pedwarn_init): Call inform instead of pedwarn.
2118 (warning_init): Call inform instead of warning_at.
2119
24d047a3
JH
21202014-06-07 Jan Hubicka <hubicka@ucw.cz>
2121
2122 * c-decl.c (merge_decls): Use set_decl_section_name.
2123 (duplicate_decls): Remove node if it exists.
2124
9bac5cbb
G
21252014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2126
2127 PR c/53119
2128 * c-typeck.c (push_init_level, process_init_element,
2129 pop_init_level): Correct check for zero initialization, move
2130 missing brace warning to respect zero initialization.
2131
8ffcdea8
MP
21322014-06-05 Marek Polacek <polacek@redhat.com>
2133
2134 PR c/56724
2135 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2136
742938c9
MP
21372014-06-05 Marek Polacek <polacek@redhat.com>
2138
2139 PR c/49706
2140 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2141 on the left hand side operand of a comparison.
2142
6447c55d
MP
21432014-06-05 Marek Polacek <polacek@redhat.com>
2144
2145 PR c/48062
2146 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2147 Print note only if the warning was printed.
2148
9dc7743c
IZ
21492014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2150
2151 PR c/58942
2152 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2153 with a pointer.
2154
fedfecef
MP
21552014-06-03 Marek Polacek <polacek@redhat.com>
2156
2157 PR c/60439
2158 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2159 c_start_case.
2160 * c-tree.h (c_start_case): Update.
2161 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2162 switch condition has boolean value.
2163
9b2b7279
AM
21642014-06-02 Andrew MacLeod <amacleod@redhat.com>
2165
2166 * c-decl.c: Include builtins.h.
2167 * c-parser.c: Likewise.
2168
5c1bc275
MP
21692014-05-27 Marek Polacek <polacek@redhat.com>
2170
2171 PR c/56724
2172 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2173 error and warning calls to error_at and warning_at. Pass location of
2174 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2175 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2176 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2177
97563bc8
IZ
21782014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2179
2180 PR c/61191
2181 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2182 function parameters.
2183
aede2c10
JH
21842014-05-23 Jan Hubicka <hubicka@ucw.cz>
2185
2186 * c-decl.c (merge_decls): Preserve symtab node pointers.
2187 (duplicate_decls): Free new decl.
2188
edbba2ce
TS
21892014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2190
f3316c6d
TS
2191 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2192 initialization.
2193
edbba2ce
TS
2194 * c-parser.c (c_parser_omp_target): Return bool values.
2195
68c81f24
TS
21962014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2197
2198 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2199 num_teams_loc variable to num_thread_limit_loc.
2200
632f2871
RS
22012014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2202
2203 * c-array-notation.c (expand_array_notations): Use void_node
2204 instead of void_zero_node.
2205
766090c2
TS
22062014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2207
2208 * c-decl.c (finish_struct): Adjust.
2209 (finish_enum): Likewise.
2210 (bind): Adjust.
2211 (record_inline_static): Likewise.
2212 (push_scope): Likewise.
2213 (make_label): Likewise.
2214 (lookup_label_for_goto): Likewise.
2215 (finish_struct): Likewise.
2216 (finish_enum): Likewise.
2217 (store_parm_decls): Likewise.
2218 (c_push_function_context): Likewise.
2219 * c-lang.h: Remove usage of variable_size gty attribute.
2220 * c-parser.c (c_parse_init): Adjust.
2221 (c_parse_file): Likewise.
2222
2b107f6b
MP
22232014-05-13 Marek Polacek <polacek@redhat.com>
2224
2225 PR c/61162
2226 * c-typeck.c (convert_for_assignment): Pass location to
2227 WARN_FOR_ASSIGNMENT instead of input_location.
2228
d033409e
MP
22292014-05-10 Marek Polacek <polacek@redhat.com>
2230
2231 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2232 maybe_warn_string_init.
2233 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2234 maybe_warn_string_init.
2235 * c-tree.h (maybe_warn_string_init): Update declaration.
2236 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2237 Call pedwarn_init with loc instead of with input_location.
2238 (digest_init): Pass init_loc to maybe_warn_string_init.
2239 (pop_init_level): Call pedwarn_init with loc instead of with
2240 input_location.
2241 (set_init_index): Likewise.
2242 (process_init_element): Likewise.
2243
ea58ef42
MP
22442014-05-09 Marek Polacek <polacek@redhat.com>
2245
2246 PR c/61096
2247 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2248 (c_parser_initelt): Pass location to set_init_label. Pass array index
2249 location to set_init_index.
2250 * c-tree.h (push_init_level): Update declaration.
2251 (pop_init_level): Likewise.
2252 (set_init_index): Likewise.
2253 (set_init_label): Likewise.
2254 * c-typeck.c (error_init): Add location parameter. Call error_at
2255 instead of error.
2256 (digest_init): Pass init_loc to error_init.
2257 (really_start_incremental_init):
2258 (push_init_level): Add location parameter. Pass loc to pop_init_level
2259 and error_init.
2260 (pop_init_level): Likewise.
2261 (set_designator): Add location parameter. Pass loc to pop_init_level,
2262 push_init_level, and error_init.
2263 (set_init_index): Add location parameter. Pass loc to error_init and
2264 set_designator.
2265 (set_init_label): Likewise.
2266 (output_init_element): Pass loc to error_init.
2267 (process_init_element): Pass loc to error_init, pop_init_level,
2268 pedwarn_init, and push_init_level.
2269
661a0813
MP
22702014-05-09 Marek Polacek <polacek@redhat.com>
2271
2272 PR c/50459
2273 * c-parser.c (c_parser_attributes): Parse the arguments as an
2274 expression-list if the attribute takes identifier.
2275
2793eeab
MP
22762014-05-08 Marek Polacek <polacek@redhat.com>
2277
2278 PR c/61053
2279 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2280 TYPE_ALIGN_UNIT.
2281
f827930a
MP
22822014-05-08 Marek Polacek <polacek@redhat.com>
2283
2284 PR c/61077
2285 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2286 of main.
2287
1d60af08
KZ
22882014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2289 Mike Stump <mikestump@comcast.net>
2290 Richard Sandiford <rdsandiford@googlemail.com>
2291
2292 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2293 (finish_enum): Use wide-int interfaces.
2294 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2295 * c-typeck.c (build_c_cast): Likewise.
2296 (set_nonincremental_init_from_string): Likewise.
2297 (c_tree_equal): Likewise.
2298
a0e24419
MP
22992014-05-02 Marek Polacek <polacek@redhat.com>
2300
2301 PR c/25801
2302 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2303 Return size_one_node when the type is not complete.
2304 (pointer_diff): Remove comment.
2305 (build_unary_op): Improve error messages.
2306
19fc9faa
MP
23072014-05-02 Marek Polacek <polacek@redhat.com>
2308
2309 * c-typeck.c (c_finish_return): Separate warning_at calls.
2310
63bc4e87
MP
23112014-05-02 Marek Polacek <polacek@redhat.com>
2312
2313 * c-tree.h (error_init): Remove declaration.
2314 (pedwarn_init): Likewise.
2315 * c-typeck.c (error_init): Make static and move above.
2316 (pedwarn_init): Likewise.
2317 (warning_init): Move above.
2318 (maybe_warn_string_init): Likewise.
2319
4bd2511b
JL
23202014-05-01 Jeff Law <law@redhat.com>
2321
2322 Revert:
2323
2324 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2325 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2326 avoid goto.
2327
6a358dcb
MP
23282014-05-02 Marek Polacek <polacek@redhat.com>
2329
2330 PR c/60784
2331 * c-typeck.c (push_init_level): Set constructor_designated to
2332 p->designated for structures.
2333
ae5ebda4
MP
23342014-05-01 Marek Polacek <polacek@redhat.com>
2335
2336 PR c/60915
2337 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2338 function-definition has an attribute after the declarator.
2339
96b40f8d
MP
23402014-05-01 Marek Polacek <polacek@redhat.com>
2341
2342 PR c/60257
2343 * c-typeck.c (warning_init): Add location_t parameter. Call
2344 warning_at instead of warning.
2345 (push_init_level): Pass input_location to warning_init.
2346 (add_pending_init): Add location_t parameter. Pass loc to
2347 warning_init.
2348 (set_nonincremental_init): Pass input_location to add_pending_init.
2349 (set_nonincremental_init_from_string): Likewise.
2350 (output_init_element): Pass loc to warning_init and to
2351 add_pending_init.
2352
32e00768
MP
23532014-05-01 Marek Polacek <polacek@redhat.com>
2354
2355 PR c/43395
2356 * c-typeck.c (c_finish_return): Distinguish between label and variable
2357 when warning about returning local address.
2358
c9379ce2
MP
23592014-05-01 Marek Polacek <polacek@redhat.com>
2360
2361 PR c/29467
2362 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2363 in C89 mode.
2364
d00887e8
MP
23652014-05-01 Marek Polacek <polacek@redhat.com>
2366
2367 PR c/43245
2368 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2369 instead of 0 to WARN_FOR_QUALIFIERS.
2370
5436fa2e
MP
23712014-05-01 Marek Polacek <polacek@redhat.com>
2372
2373 PR c/56989
2374 * c-typeck.c (default_conversion): Use better location for
2375 error call.
2376
f8ed5150
MP
23772014-04-30 Marek Polacek <polacek@redhat.com>
2378
2379 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2380 also when SANITIZE_FLOAT_DIVIDE is on.
2381
8337d1db
MP
23822014-04-30 Marek Polacek <polacek@redhat.com>
2383
2384 PR c/60139
2385 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2386 and pedwarn_init. Use loc insted of input_location.
2387
c4bdc42f
MP
23882014-04-30 Marek Polacek <polacek@redhat.com>
2389
2390 PR c/60351
2391 * c-typeck.c (build_binary_op): Use location when warning about
2392 shift count.
2393
45484dcf
MP
23942014-04-25 Marek Polacek <polacek@redhat.com>
2395
2396 PR c/18079
2397 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2398 always_inline/noinline and hot/cold attributes.
2399
34cf811f
MP
24002014-04-25 Marek Polacek <polacek@redhat.com>
2401
2402 PR c/60114
2403 * c-parser.c (c_parser_initelt): Pass input_location to
2404 process_init_element.
2405 (c_parser_initval): Pass loc to process_init_element.
2406 * c-tree.h (process_init_element): Adjust declaration.
2407 * c-typeck.c (push_init_level): Pass input_location to
2408 process_init_element.
2409 (pop_init_level): Likewise.
2410 (set_designator): Likewise.
2411 (output_init_element): Add location_t parameter. Pass loc to
2412 digest_init.
2413 (output_pending_init_elements): Pass input_location to
2414 output_init_element.
2415 (process_init_element): Add location_t parameter. Pass loc to
2416 output_init_element.
2417
42056eac
JJ
24182014-04-24 Jakub Jelinek <jakub@redhat.com>
2419
2420 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2421 atomic-clause, allow comma in between atomic-clause and
2422 seq_cst.
2423
e162a134
JJ
24242014-04-22 Jakub Jelinek <jakub@redhat.com>
2425
2426 PR c/59073
2427 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2428 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2429
2f6babac
IZ
24302014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2431
2432 PR middle-end/60469
2433 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2434 create_tmp_var instead build_decl for creating temps.
2435 (build_array_notation_expr): Likewise.
2436 (fix_conditional_array_notations_1): Likewise.
2437 (fix_array_notation_expr): Likewise.
2438 (fix_array_notation_call_expr): Likewise.
2439
8edbfaa6
JJ
24402014-03-28 Jakub Jelinek <jakub@redhat.com>
2441
2442 PR c++/60689
2443 * c-tree.h (c_build_function_call_vec): New prototype.
2444 * c-typeck.c (build_function_call_vec): Don't call
2445 resolve_overloaded_builtin here.
2446 (c_build_function_call_vec): New wrapper function around
2447 build_function_call_vec. Call resolve_overloaded_builtin here.
2448 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2449 Call c_build_function_call_vec instead of build_function_call_vec.
2450 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2451 * c-decl.c (finish_decl): Likewise.
2452
7485aeea
MLI
24532014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2454
2455 PR c/55383
2456 * c-typeck.c: Use correct format string in cast-qual warning
2457
b17a8b07
TS
24582014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2459
2460 * c-decl.c (c_decl_attributes): Use
2461 lang_hooks.types.omp_mappable_type.
2462 * c-typeck.c (c_finish_omp_clauses): Likewise.
2463
3af9c5e9
MP
24642014-03-06 Marek Polacek <polacek@redhat.com>
2465
2466 PR c/60197
2467 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2468 of checking tree code.
2469
1c9f5f33
PK
24702014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2471
2472 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2473 (c_parser_parameter_declaration): Likewise.
2474
cc28fc7f
MP
24752014-02-19 Marek Polacek <polacek@redhat.com>
2476
2477 PR c/60195
2478 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2479 Call mark_exp_read on exp.value.
2480 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2481 TREE_ADDRESSABLE on old instead of val.
2482 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2483
b581c05c
PK
24842014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2485
2486 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2487 C_EXPR_APPEND by vec_safe_push.
2488 * c-tree.h (C_EXPR_APPEND): Remove.
2489
81e5eca8
MP
24902014-01-31 Marek Polacek <polacek@redhat.com>
2491
2492 PR c/59963
2493 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2494 build_function_call_vec.
2495 (build_function_call): Likewise.
2496 (build_atomic_assign): Likewise.
2497 (build_function_call_vec): Add arg_loc parameter. Use it.
2498 (convert_arguments): Likewise.
2499 (convert_for_assignment): Rename rhs_loc to expr_loc.
2500 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2501 (c_parser_objc_keywordexpr): Likewise.
2502 (c_parser_postfix_expression_after_primary): Call
2503 build_function_call_vec with expr_loc rather than op_loc.
2504 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2505 build_function_call_vec.
2506 (c_parser_expr_list): Add locations parameter. Fill it with locations
2507 of function arguments.
2508 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2509
68fca595
MP
25102014-01-30 Marek Polacek <polacek@redhat.com>
2511
2512 PR c/59940
2513 * c-typeck.c (build_function_call_vec): Use loc parameter.
2514 (convert_arguments): Add location parameter. Use it.
2515 (ep_convert_and_check): Likewise.
2516 (build_atomic_assign): Adjust convert_for_assignment call.
2517 (build_modify_expr): Likewise.
2518 (digest_init): Likewise.
2519 (c_finish_return): Likewise.
2520 (build_conditional_expr): Adjust ep_convert_and_check calls.
2521 (convert_for_assignment): Add rhs_loc parameter. Use it.
2522 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2523 calls.
2524
fa337f3a
RB
25252014-01-30 Richard Biener <rguenther@suse.de>
2526
2527 PR c/59905
2528 * c-typeck.c (build_function_call_vec): Do not replace calls
2529 to a function via an incompatible type with a runtime abort.
2530
b72271b9
BI
25312014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2532
2533 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2534 flag_enable_cilkplus with flag_cilkplus.
2535 (c_parser_direct_declarator_inner): Likewise.
2536 (c_parser_attribute_any_word): Likewise.
2537 (c_parser_attributes): Likewise.
2538 (c_parser_compound_statement): Likewise.
2539 (c_parser_statement_after_labels): Likewise.
2540 (c_parser_if_statement): Likewise.
2541 (c_parser_switch_statement): Likewise.
2542 (c_parser_do_statement): Likewise.
2543 (c_parser_for_statement): Likewise.
2544 (c_parser_unary_expression): Likewise.
2545 (c_parser_postfix_expression): Likewise.
2546 (c_parser_postfix_expression_after_primary): Likewise.
2547 (c_parser_postfix_expression_after_primary): Likewise.
2548 (c_parser_omp_clause_name): Likewise.
2549 (c_finish_omp_declare_simd): Likewise.
2550 (c_parser_cilk_verify_simd): Likewise.
2551 * c-typeck.c (build_array_ref): Likewise.
2552 (build_function_call_vec): Likewise.
2553 (convert_arguments): Likewise.
2554 (build_compound_expr): Likewise.
2555 (c_finish_return): Likewise.
2556 (c_finish_if_stmt): Likewise.
2557 (c_finish_loop): Likewise.
2558 (build_binary_op): Likewise.
2559
393e8e8b
MP
25602014-01-23 Marek Polacek <polacek@redhat.com>
2561
2562 PR c/59846
2563 * c-typeck.c (parser_build_binary_op): Use location instead of
2564 input_location.
2565 (build_binary_op): Pass location to shorten_compare.
2566
f04dda30
MP
25672014-01-23 Marek Polacek <polacek@redhat.com>
2568
2569 PR c/58346
2570 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2571 an empty aggregate.
2572
789eadcd
MP
25732014-01-23 Marek Polacek <polacek@redhat.com>
2574
2575 PR c/59871
2576 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2577 of a comma expression.
2578 (emit_side_effect_warnings): Likewise.
2579
40f14e9f
BI
25802014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2581
2582 PR c/59825
2583 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2584 function to use walk_tree and moved a lot of its functionality to
2585 expand_array_notations.
2586 (expand_array_notations): New function.
2587
74558dd9
BI
25882014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2589
2590 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2591 attribute an attribute without value.
2592
652fea39
JJ
25932014-01-23 Jakub Jelinek <jakub@redhat.com>
2594
2595 PR middle-end/58809
2596 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2597 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2598
f34f1c87
MP
25992014-01-22 Marek Polacek <polacek@redhat.com>
2600
2601 PR c/59891
2602 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2603 of remove_c_maybe_const_expr on op1 and op2.
2604
241f845a
JJ
26052014-01-15 Jakub Jelinek <jakub@redhat.com>
2606
2607 PR c/58943
2608 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2609 effects, preevaluate rhs using SAVE_EXPR first.
2610
9a74f20c
BI
26112014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2612
2613 PR c++/59631
2614 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2615 statements with if-elseif statements.
2616
96066ce1
MP
26172014-01-06 Marek Polacek <polacek@redhat.com>
2618
2619 PR c/57773
2620 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2621 defined bit-field types only in ISO C.
2622
23a5b65a
RS
26232014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2624
2625 Update copyright years
2626
f9030485
RS
26272014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2628
2629 * c-array-notation.c: Use the standard form for the copyright notice.
2630
41958c28
BI
26312013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2632
2633 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2634 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2635 field in parser is not empty. If not-empty, call the function
2636 c_parser_finish_omp_declare_simd.
2637 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2638 between SIMD-enabled functions and #pragma simd. Added new parameter.
2639 (c_parser_cilk_all_clauses): Modified the usage of the function
2640 c_parser_cilk_clause_vectorlength as mentioned above.
2641 (c_parser_cilk_simd_fn_vector_attrs): New function.
2642 (c_finish_cilk_simd_fn_tokens): Likewise.
2643 (is_cilkplus_vector_p): Likewise.
2644 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2645 "nomask," and "mask" strings in clause name.
2646 (c_parser_omp_all_clauses): Added 3 new case statements:
2647 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2648 PRAGMA_CILK_CLAUSE_NOMASK.
2649 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2650 check for vector attribute and if so call the function
2651 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2652 called the function c_finish_cilk_simd_fn_tokens.
2653 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2654 parser field is non-empty. If so, parse them as you would parse
2655 the omp declare simd pragma.
2656 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2657 Added a check when step is a parameter and flag it as error.
2658 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2659 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2660 pragma_omp_clause.
2661
cef0fd0e
TS
26622013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2663
2664 * c-parser.c (c_parser_omp_parallel): Fix description.
2665
12893402
BI
26662013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2667
2668 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2669 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2670 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2671 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2672
296674db
JM
26732013-12-04 Joseph Myers <joseph@codesourcery.com>
2674
2675 PR c/52023
2676 * c-parser.c (c_parser_alignas_specifier): Use
2677 c_sizeof_or_alignof_type instead of c_alignof.
2678 (c_parser_alignof_expression): Likewise, with min_alignof
2679 parameter depending on alignof spelling used.
2680
edd28054
MP
26812013-12-04 Marek Polacek <polacek@redhat.com>
2682
2683 PR c/54113
2684 * c-decl.c (start_function): Don't warn for missing prototype for
2685 inline functions.
2686
da0fc454
MP
26872013-12-03 Marek Polacek <polacek@redhat.com>
2688
2689 PR c/59351
2690 * c-decl.c (build_compound_literal): Allow compound literals with
2691 empty initial value.
2692
4c2ecab0
JM
26932013-12-02 Joseph Myers <joseph@codesourcery.com>
2694
2695 PR c/58235
2696 * c-typeck.c (build_modify_expr): Diagnose assignment to
2697 expression with array type.
2698
340baef7
JM
26992013-11-29 Joseph Myers <joseph@codesourcery.com>
2700
2701 PR c/42262
2702 * c-typeck.c (process_init_element): Do not treat a string as
2703 initializing a whole array when used with a designator for an
2704 individual element.
2705
6763b9f7
JM
27062013-11-29 Joseph Myers <joseph@codesourcery.com>
2707
2708 PR c/57574
2709 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2710 an inline function following a static declaration.
2711
e7bd1de1
JJ
27122013-11-28 Jakub Jelinek <jakub@redhat.com>
2713
2714 PR c/59310
2715 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2716 to p_name before calling c_parser_omp_teams instead of after.
2717 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2718 argument. Remove unused p_name variable.
2719
0136f8f0
AH
27202013-11-27 Aldy Hernandez <aldyh@redhat.com>
2721 Jakub Jelinek <jakub@redhat.com>
2722
2723 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2724 external_scope is NULL.
2725
241b71bb
TV
27262013-11-27 Tom de Vries <tom@codesourcery.com>
2727 Marc Glisse <marc.glisse@inria.fr>
2728
2729 PR c++/59032
2730 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2731
2fb9a547
AM
27322013-11-22 Andrew MacLeod <amacleod@redhat.com>
2733
2734 * c-typeck.c: Add required include files from gimple.h.
2735
8400e75e
DM
27362013-11-22 David Malcolm <dmalcolm@redhat.com>
2737
2738 * c-decl.c (define_label, shadow_tag_warned)
2739 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2740 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2741 (declspecs_add_type): Remove use of in_system_header macro.
2742 * c-parser.c (c_parser_unary_expression): Likewise.
2743 * c-typeck.c (store_init_value, process_init_element)
2744 (c_start_case): Likewise.
2745
2746 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2747 macro.
2748
2749 * c-parser.c (c_parser_set_source_position_from_token): Remove
2750 reference to in_system_header from comment.
2751
386b1f1f
RS
27522013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2753
2754 * c-decl.c (grokdeclarator): Update comment to refer to
2755 tree_to_[su]hwi rather than tree_low_cst.
2756
ae7e9ddd
RS
27572013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2758
2759 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2760 tree_to_uhwi throughout.
2761
9439e9a1
RS
27622013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2763
2764 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2765 throughout.
2766
9541ffee
RS
27672013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2768
2769 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2770 throughout.
2771
c02065fc
AH
27722013-11-15 Aldy Hernandez <aldyh@redhat.com>
2773
2774 * c-parser.c (c_parser_cilk_simd): New.
2775 (c_parser_cilk_verify_simd): New.
2776 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2777 (c_parser_omp_for_loop): Add case for NE_EXPR.
2778 Set c_break_label for CILK_SIMD.
2779 (c_parser_cilk_clause_vectorlength): New.
2780 (c_parser_cilk_clause_linear): New.
2781 (c_parser_cilk_clause_name): New.
2782 (c_parser_cilk_all_clauses): New.
2783 * c-typeck.c (build_unary_op): Pass location argument to
2784 readonly_error.
2785 (build_modify_expr): Same.
2786 (build_asm_expr): Same.
2787 (c_finish_bc_stmt): Error on break/continue in loops.
2788
18f429e2
AM
27892013-11-14 Andrew MacLeod <amacleod@redhat.com>
2790
2791 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2792
d8a2d370
DN
27932013-11-14 Diego Novillo <dnovillo@google.com>
2794
2795 * c-decl.c: Include print-tree.h.
2796 Include stor-layout.h.
2797 Include varasm.h.
2798 Include attribs.h.
2799 Include stringpool.h.
2800 * c-lang.c: Include fold-const.h.
2801 * c-parser.c: Include stringpool.h.
2802 Include attribs.h.
2803 Include stor-layout.h.
2804 Include varasm.h.
2805 Include trans-mem.h.
2806 * c-typeck.c: Include stor-layout.h.
2807 Include trans-mem.h.
2808 Include varasm.h.
2809 Include stmt.h.
2810
38b7bc7f
JM
28112013-11-13 Joseph Myers <joseph@codesourcery.com>
2812
2813 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2814 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2815 __auto_type.
2816 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2817 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2818 RID_AUTO_TYPE.
2819 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2820 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2821 (c_parser_declarator, c_parser_direct_declarator_inner)
2822 (c_parser_parameter_declaration, c_parser_type_name): All callers
2823 changed.
2824 (c_parser_declaration_or_fndef): Handle declarations with type
2825 determined from the initializer.
2826
45b0be94
AM
28272013-11-12 Andrew MacLeod <amacleod@redhat.com>
2828
18f429e2 2829 * c-typeck.c: Include gimplify.h.
45b0be94 2830
582d9b50
JM
28312013-11-12 Joseph Myers <joseph@codesourcery.com>
2832
2833 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2834 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2835 comment.
2836 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2837 or _Thread_local as appropriate in diagnostics.
2838 (build_null_declspecs): Initialize ret->thread_gnu_p.
2839 (declspecs_add_scspec): Handle either __thread or _Thread_local
2840 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2841 pedantic. Do not disallow _Thread_local extern and _Thread_local
2842 static.
2843
267bac10
JM
28442013-11-07 Joseph Myers <joseph@codesourcery.com>
2845 Andrew MacLeod <amacleod@redhat.com>
2846
2847 * c-aux-info.c (gen_type): Handle atomic qualifier.
2848 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2849 qualifiers when compating types.
2850 (shadow_tag_warned): Handle atomic_p in declspecs.
2851 (quals_from_declspecs): Likewise.
2852 (start_decl): Use c_type_promotes_to when promoting argument
2853 types.
2854 (grokdeclarator): Handle _Atomic.
2855 (get_parm_info): Diagnose any qualifier on "void" as only
2856 parameter.
2857 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2858 comparing types. Use c_type_promotes_to when promoting argument
2859 types.
2860 (finish_function): Use c_type_promotes_to when promoting argument
2861 types.
2862 (build_null_declspecs): Handle atomic_p in declspecs.
2863 (declspecs_add_qual): Handle RID_ATOMIC.
2864 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2865 (c_token_starts_declspecs): Handle RID_ATOMIC.
2866 (c_parser_declspecs): Handle atomic type specifiers and
2867 qualifiers.
2868 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2869 from types of expressions with atomic type.
2870 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2871 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2872 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2873 (c_parser_statement_after_labels, c_parser_switch_statement)
2874 (c_parser_for_statement, c_parser_expr_no_commas)
2875 (c_parser_conditional_expression, c_parser_binary_expression)
2876 (c_parser_cast_expression, c_parser_unary_expression)
2877 (c_parser_postfix_expression)
2878 (c_parser_postfix_expression_after_primary, c_parser_expression):
2879 Use convert_lvalue_to_rvalue.
2880 (c_parser_expression_conv, c_parser_expr_list): Document
2881 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2882 (c_parser_objc_synchronized_statement): Use
2883 convert_lvalue_to_rvalue.
2884 (c_parser_objc_selector): Handle RID_ATOMIC.
2885 (c_parser_objc_receiver, c_parser_array_notation): Use
2886 convert_lvalue_to_rvalue.
2887 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2888 _Atomic (type-name).
2889 (struct c_declspecs): Add atomic_p field.
2890 (convert_lvalue_to_rvalue): Declare.
2891 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2892 corresponding atomic types.
2893 (qualify_type): Don't add _Atomic qualifiers from second argument.
2894 (comp_target_types): Do not allow _Atomic mismatches.
2895 (type_lists_compatible_p): Do not remove atomic qualifiers when
2896 comparing types.
2897 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2898 (build_atomic_assign): New functions.
2899 (build_unary_op): Use build_atomic_assign for atomic increment and
2900 decrement.
2901 (build_conditional_expr): Do not treat _Atomic void as a qualified
2902 version of void.
2903 (build_modify_expr): Use build_atomic_assign for atomic LHS.
2904 (find_anonymous_field_with_type, convert_to_anonymous_field)
2905 (convert_for_assignment): Do not remove atomic qualifiers when
2906 comparing types.
2907 (digest_init): Do not accept initialization of arrays of atomic
2908 elements by string constants.
2909 (build_asm_expr): Use convert_lvalue_to_rvalue.
2910 (build_binary_op): Do not treat _Atomic void as a qualified
2911 version of void.
2912
0c249d4b
DD
29132013-11-06 DJ Delorie <dj@redhat.com>
2914
2915 * c-decl.c (locate_old_decl): If a previous conflicting decl is
2916 both explicit and builtin, print the location of the explicit one.
2917
6d7f7e0a
TB
29182013-11-05 Tobias Burnus <burnus@net-b.de>
2919
2920 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
2921 c_parser_omp_distribute, c_parser_omp_teams,
2922 c_parser_omp_target, c_parser_omp_declare): Handle
2923 -fopenmp-simd.
2924
b906f4ca
MP
29252013-11-03 Marek Polacek <polacek@redhat.com>
2926
2927 * c-decl.c (grokdeclarator): Add VLA instrumentation.
2928
ee1d5a02
JJ
29292013-11-01 Jakub Jelinek <jakub@redhat.com>
2930
2931 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
2932 check_dup_generic at the end, unless remove is true.
2933 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
2934 remove = true;.
2935 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
2936
5a9785fb
JJ
29372013-10-31 Jakub Jelinek <jakub@redhat.com>
2938
2939 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
2940 with decl that is not pointer nor array.
2941
939b37da
BI
29422013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
2943
2944 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
2945 a spawning function is found.
2946 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
2947 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
2948 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2949 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
2950 case.
2951 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
2952 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
2953 expr.
2954 (c_finish_return): Added a check to reject _Cilk_spawn in return
2955 expression.
2956 (build_cilk_spawn): New function.
2957 (build_cilk_sync): Likewise.
2958 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
2959
d4af74d4
TB
29602013-10-27 Tobias Burnus <burnus@net-b.de>
2961
2962 PR other/33426
2963 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
2964 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
2965 (c_parser_statement_after_labels): Update calls.
2966
d73749df 29672013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
2968
2969 PR other/33426
2970 * c-parser.c (c_parser_pragma, c_parser_for_statement):
2971 Handle PRAGMA_IVDEP.
2972 (c_parser_statement_after_labels): Update call.
2973
f28aa681
MP
29742013-10-24 Marek Polacek <polacek@redhat.com>
2975
2976 * c-parser.c (c_parser_struct_declaration): Add a comment.
2977 (c_parser_declarator): Don't allow _Alignas here.
2978
0645c1a2
AM
29792013-10-17 Andrew MacLeod <amacleod@redhat.com>
2980
2981 * c-parser.c: Include omp-low.h.
2982 * c-typeck.c: Likewise.
2983
568a31f2
MP
29842013-10-17 Marek Polacek <polacek@redhat.com>
2985
2986 PR c/58267
2987 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
2988 Document syntax of the array-declarator.
2989 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
2990 are not permitted.
2991 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
2992 (c_parser_struct_declaration): Likewise.
2993 (c_parser_declarator): Likewise.
2994 (c_parser_direct_declarator_inner): Likewise.
2995 (c_parser_parameter_declaration): Likewise.
2996 (c_parser_type_name): Likewise.
2997
acf0174b
JJ
29982013-10-11 Jakub Jelinek <jakub@redhat.com>
2999
3000 * c-lang.h (current_omp_declare_target_attribute): New extern
3001 decl.
3002 * c-parser.c: Include c-lang.h.
3003 (struct c_parser): Change tokens to c_token *.
3004 Add tokens_buf field. Change tokens_avail type to unsigned int.
3005 (c_parser_consume_token): If parser->tokens isn't
3006 &parser->tokens_buf[0], increment parser->tokens.
3007 (c_parser_consume_pragma): Likewise.
3008 (enum pragma_context): Add pragma_struct and pragma_param.
3009 (c_parser_external_declaration): Adjust
3010 c_parser_declaration_or_fndef caller.
3011 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3012 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3013 Adjust recursive call.
3014 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3015 of pragma_external.
3016 (c_parser_parameter_declaration): Use pragma_param instead of
3017 pragma_external.
3018 (c_parser_compound_statement_nostart, c_parser_label,
3019 c_parser_for_statement): Adjust
3020 c_parser_declaration_or_fndef callers.
3021 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3022 it through to c_parser_conditional_expression.
3023 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3024 pass it through to c_parser_binary_expression. Adjust recursive
3025 call.
3026 (c_parser_binary_expression): Remove prec argument, add
3027 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3028 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3029 binop matches it, use build2 instead of parser_build_binary_op.
3030 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3031 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3032 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3033 Handle pragma_struct and pragma_param the same as pragma_external.
3034 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3035 (c_parser_omp_variable_list): Parse array sections for
3036 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3037 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3038 (c_parser_omp_clause_reduction): Handle user defined reductions.
3039 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3040 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3041 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3042 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3043 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3044 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3045 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3046 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3047 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3048 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3049 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3050 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3051 (c_parser_omp_for_loop): Add CODE argument, pass it through
3052 to c_finish_omp_for. Change last argument to cclauses,
3053 and adjust uses to grab parallel clauses from the array of all
3054 the split clauses. Adjust c_parser_binary_expression,
3055 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3056 (omp_split_clauses): New function.
3057 (c_parser_omp_simd): New function.
3058 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3059 Allow the function to be called also when parsing combined constructs,
3060 and call c_parser_omp_simd when parsing for simd.
3061 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3062 #pragma omp section, require exactly one structured-block instead of
3063 sequence of statements.
3064 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3065 Allow the function to be called also when parsing combined constructs.
3066 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3067 Allow the function to be called also when parsing combined
3068 constructs.
3069 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3070 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3071 c_parser_omp_teams, c_parser_omp_target_data,
3072 c_parser_omp_target_update, c_parser_omp_target,
3073 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3074 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3075 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3076 (c_parser_omp_construct): Add p_name and mask vars. Handle
3077 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3078 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3079 and c_parser_omp_sections callers.
3080 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3081 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3082 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3083 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3084 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3085 OMP_CLAUSE_DEPEND.
3086 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3087 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3088 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3089 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3090 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3091 * c-typeck.c: Include tree-inline.h.
3092 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3093 handle_omp_array_sections_1, handle_omp_array_sections,
3094 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3095 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3096 user defined reductions.
3097 (c_tree_equal): New function.
3098 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3099 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3100 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3101 c_check_omp_declare_reduction_r): New prototypes.
3102 * c-decl.c (current_omp_declare_target_attribute): New variable.
3103 (c_decl_attributes): New function.
3104 (start_decl, start_function): Use it instead of decl_attributes.
3105 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3106 c_omp_reduction_decl, c_omp_reduction_lookup,
3107 c_check_omp_declare_reduction_r): New functions.
3108
0a6c2227
TT
31092013-09-25 Tom Tromey <tromey@redhat.com>
3110
3111 * Make-lang.in (c/gccspec.o): Remove.
3112 (CFLAGS-c/gccspec.o): New variable.
3113 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3114 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3115 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3116
f3bc55f0
TT
31172013-09-25 Tom Tromey <tromey@redhat.com>
3118
3119 * Make-lang.in (c/gccspec.o): Don't use subshell.
3120
a24d975c
MP
31212013-09-18 Marek Polacek <polacek@redhat.com>
3122
3123 PR sanitize/58443
3124 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3125 Remove unnecessary check.
3126
ce6923c5
MP
31272013-09-18 Marek Polacek <polacek@redhat.com>
3128
3129 PR sanitizer/58411
3130 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3131 no_sanitize_undefined attribute.
3132
a1e51df9
KT
31332013-09-13 Kai Tietz <ktietz@redhat.com>
3134
3135 PR target/57848
3136 * c-decl.c (c_builtin_function_ext_scope): Remove
3137 wrong assumption that it is never called on prexisting
3138 symbol.
3139
0af94e6f
JR
31402013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3141
3142 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3143
20059c8b
GDR
31442013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3145
3146 * c-objc-common.c (c_tree_printer): Tidy.
3147
de5a5fa1
MP
31482013-08-30 Marek Polacek <polacek@redhat.com>
3149
3150 * c-typeck.c (build_binary_op): Add division by zero and shift
3151 instrumentation.
3152
2531a1d9 31532013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 3154 Joseph Myers <joseph@codesourcery.com>
2531a1d9 3155
6e2bcc98 3156 PR c/35649
2531a1d9
JR
3157 * c-typeck.c (c_common_type): Prefer double_type_node over
3158 other REAL_TYPE types with the same precision.
3159 (convert_arguments): Likewise.
3160
025311c4
GDR
31612013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3162
3163 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3164 (c_initialize_diagnostics): Call a destructor for the early printer.
3165
da6ca2b5
GDR
31662013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3167
3168 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3169 printer initialization.
3170
318cda85 31712013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 3172
318cda85
BI
3173 PR c/57490
3174 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3175 check for truth values.
3176 (expand_array_notation_exprs): Added truth values case. Removed an
3177 unwanted else. Added for-loop to walk through subtrees in default
3178 case.
3179
b066401f
GDR
31802013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3181
3182 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3183
fb48aadc
JM
31842013-07-23 Joseph Myers <joseph@codesourcery.com>
3185
3186 * c-parser.c (struct c_generic_association): Fix typo.
3187
433cc7b0
TT
31882013-07-23 Tom Tromey <tromey@redhat.com>
3189 Joseph Myers <joseph@codesourcery.com>
3190
3191 * c-parser.c (struct c_generic_association): New.
3192 (c_generic_association_d): New typedef.
3193 (c_parser_generic_selection): New function.
3194 (c_parser_postfix_expression): Handle RID_GENERIC.
3195
26d40c3d
JM
31962013-07-13 Jason Merrill <jason@redhat.com>
3197
3198 PR c++/57793
3199 * c-decl.c (finish_struct): Check for too-large class.
3200
ecdbd01a 32012013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
3202
3203 PR c/57821
3204 * c-typeck.c (set_init_index): When folding, check for index overflow.
3205
1141ed3f
BI
32062013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3207
3208 * c-parser.c (c_parser_array_notation): Removed rejection of array
3209 notations in an array of function pointers.
3210
713b46fa
BI
32112013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3212
3213 * c-array-notation.c (make_triplet_val_inv): New function.
3214 (create_cmp_incr): Likewise.
3215 (create_array_refs): Likewise.
3216 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3217 Also modularized common parts between functions and called the function.
3218 (build_array_notation_expr): Likewise.
3219 (fix_conditional_array_notations_1): Likewise.
3220 (fix_array_notation_expr): Likewise.
3221 (fix_array_notation_call_expr): Likewise.
3222
92f20202
MP
32232013-06-18 Marek Polacek <polacek@redhat.com>
3224
3225 PR c/57630
3226 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3227
73a23b06
BI
32282013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3229
3230 * c-array-notation.c (build_array_notation_expr): Reject array notation
3231 mismatch between LHS and RHS even inside a call_expr. Also, removed
3232 a couple while statements that were dead code.
3233
00b8517d
BI
32342013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3235
3236 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3237 excessive precision expressions in function parameters. Also removed
3238 couple unwanted while statements.
3239
1509bdda
BI
32402013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3241
3242 * c-array-notation.c (expand_array_notation_exprs): Added
3243 ARRAY_NOTATION_REF case.
3244
d60f1706
BI
32452013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3246
3247 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3248 function to c-family/array-notation-common.c.
3249 (is_cilkplus_reduce_builtin): Likewise.
3250 (find_rank): Likewise.
3251 (extract_array_notation_exprs): Likewise.
3252 (replace_array_notations): Likewise.
3253 (find_inv_trees): Likewise.
3254 (replace_inv_trees): Likewise.
3255 (contains_array_notation_expr): Likewise.
3256 (find_correct_array_notation_type): Likewise.
3257 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3258 (struct inv_list): Moved this to c-family/array-notation-common.c.
3259 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3260
6d6efbb3
BI
32612013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3262
3263 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3264 reduction functions outside the for-loop. Added a check if the fundecl
3265 is non-NULL. Finally, removed an unwanted if-statement, and made the
3266 body unconditional.
3267
25c22937
BI
32682013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3269
3270 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3271 condition of the if-statement matches the rank of else-block and then-
3272 block when array notations are used.
3273 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3274 expression after the entire function body is parsed.
3275 (c_parser_expr_no_commas): Delayed creating array notation expressions
3276 to the end of function parsing.
3277 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3278 whole if-statement instead of just the condition.
3279 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3280
edd25645
BI
32812013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3282
3283 PR c/57474
3284 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3285 array to NULL_TREE if they are unused. Also added a check for the
3286 field to be NULL before its fields are used in future.
3287
065ce7f1
RO
32882013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3289
3290 PR bootstrap/57450
3291 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3292 (build_array_notation_expr): Likewise.
3293
36536d79
BI
32942013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3295
3296 * c-typeck.c (build_array_ref): Added a check to see if array's
3297 index is greater than one. If true, then emit an error.
3298 (build_function_call_vec): Exclude error reporting and checking
3299 for builtin array-notation functions.
3300 (convert_arguments): Likewise.
3301 (c_finish_return): Added a check for array notations as a return
3302 expression. If true, then emit an error.
3303 (c_finish_loop): Added a check for array notations in a loop
3304 condition. If true then emit an error.
3305 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3306 (build_binary_op): Added a check for array notation expr inside
3307 op1 and op0. If present, we call another function to find correct
3308 type.
3309 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3310 * c-parser.c (c_parser_compound_statement): Check if array
3311 notation code is used in tree, if so, then transform them into
3312 appropriate C code.
3313 (c_parser_expr_no_commas): Check if array notation is used in LHS
3314 or RHS, if so, then build array notation expression instead of
3315 regular modify.
3316 (c_parser_postfix_expression_after_primary): Added a check for
3317 colon(s) after square braces, if so then handle it like an array
3318 notation. Also, break up array notations in unary op if found.
3319 (c_parser_direct_declarator_inner): Added a check for array
3320 notation.
3321 (c_parser_compound_statement): Added a check for array notation in
3322 a stmt. If one is present, then expand array notation expr.
3323 (c_parser_if_statement): Likewise.
3324 (c_parser_switch_statement): Added a check for array notations in
3325 a switch statement's condition. If true, then output an error.
3326 (c_parser_while_statement): Similarly, but for a while.
3327 (c_parser_do_statement): Similarly, but for a do-while.
3328 (c_parser_for_statement): Similarly, but for a for-loop.
3329 (c_parser_unary_expression): Check if array notation is used in a
3330 pre-increment or pre-decrement expression. If true, then expand
3331 them.
3332 (c_parser_array_notation): New function.
3333 * c-array-notation.c: New file.
3334 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3335
cd192ccc
MS
33362013-05-23 Mike Stump <mikestump@comcast.net>
3337
3338 * c-typeck.c (convert_for_assignment): Handle references to memory
3339 spaces better.
3340
427b248d
JM
33412013-05-16 Jason Merrill <jason@redhat.com>
3342
3343 * Make-lang.in (cc1$(exeext)): Use link mutex.
3344
44d90fe1
PC
33452013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3346
3347 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3348 to simply use OPT_Wpointer_arith.
3349 (build_unary_op): Likewise.
3350
4e7d7b3d
JJ
33512013-04-03 Jakub Jelinek <jakub@redhat.com>
3352
3353 PR c/19449
3354 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3355 argument. If set, or it temporarily for parsing of the first
3356 argument into force_folding_builtin_constant_p.
3357 (c_parser_postfix_expression): Adjust callers.
3358
839b422f
RB
33592013-03-21 Richard Biener <rguenther@suse.de>
3360
3361 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3362 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3363
2ee028f1
MP
33642013-02-12 Marek Polacek <polacek@redhat.com>
3365
3366 PR c/44938
3367 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3368 origtypes to NULL.
3369
8824edff
JJ
33702013-01-24 Jakub Jelinek <jakub@redhat.com>
3371
3372 PR c/56078
3373 * c-typeck.c (set_nonincremental_init_from_string): If
3374 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3375 returned false.
3376 (process_init_element): Likewise.
3377
eadd3d0d
JJ
33782012-12-20 Jakub Jelinek <jakub@redhat.com>
3379
3380 PR c++/55619
3381 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3382 argument, don't call default_function_array_conversion
3383 nor c_fully_fold here.
3384 (c_parser_asm_statement): Adjust callers.
3385 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3386 and outputs here, and call default_function_array_conversion
3387 on inputs that don't need to be addressable.
3388
f8a93a2e
JJ
33892012-12-18 Jakub Jelinek <jakub@redhat.com>
3390
3391 PR c/39464
3392 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3393 warning require that both c_common_unsigned_type as well as
3394 c_common_signed_type is the same for both mvl and mvr types.
3395
9771b263
DN
33962012-11-16 Diego Novillo <dnovillo@google.com>
3397
3398 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3399
3400 * c-common.c: Use new vec API in vec.h.
3401 * c-common.h: Likewise.
3402 * c-gimplify.c: Likewise.
3403 * c-pragma.c: Likewise.
3404 * c-pretty-print.c: Likewise.
3405 * c-pretty-print.h: Likewise.
3406 * c-semantics.c: Likewise.
3407 * c-decl.c: Likewise.
3408 * c-parser.c: Likewise.
3409 * c-tree.h: Likewise.
3410 * c-typeck.c: Likewise.
3411
880661a4
JW
34122012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3413
3414 PR c++/54930
3415 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3416
077d1abe
MLI
34172012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3418
3419 PR c/53066
3420 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3421 shadows a function, unless the variable is a function or a
3422 pointer-to-function.
3423
3a785c97
JJ
34242012-10-12 Jakub Jelinek <jakub@redhat.com>
3425
3426 PR c/54381
3427 * c-parser.c (struct c_tree_loc_pair): Removed.
3428 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3429 add location_t * and tree * arguments, fill in array of 3
3430 sizeof_arg trees and corresponding locs.
3431 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3432 c_parser_expr_list callers.
3433 (c_parser_postfix_expression_after_primary): Likewise. Pass
3434 array of 3 sizeof_arg trees and locs (corresponding to first
3435 3 arguments) to sizeof_pointer_memaccess_warning.
3436
703c8606
LC
34372012-10-09 Lawrence Crowl <crowl@google.com>
3438
3439 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3440 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3441 hash table.
3442
5d9de0d0
PC
34432012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3444
3445 PR c++/54194
3446 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3447 call.
3448
a212e43f
MG
34492012-10-09 Marc Glisse <marc.glisse@inria.fr>
3450
3451 PR c++/54427
3452 * c-typeck.c: Include c-common.h.
3453 (enum stv_conv): Moved to c-common.h.
3454 (scalar_to_vector): Moved to c-common.c.
3455 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3456 * Make-lang.in: c-typeck.c depends on c-common.h.
3457
3b78de56
AC
34582012-10-04 Arnaud Charlet <charlet@adacore.com>
3459
3460 * c-decl.c (c_write_global_declarations): Fix handling of
3461 -fdump-ada-spec*.
3462
78c60e3d
SS
34632012-09-30 Sharad Singhai <singhai@google.com>
3464
3465 * c-decl.c (c_write_global_declarations): Use a different method
3466 to determine if the dump has ben initialized.
3467
9f33203d
JM
34682012-09-14 Joseph Myers <joseph@codesourcery.com>
3469
3470 PR c/54552
3471 * c-typeck.c (c_cast_expr): When casting to a type requiring
3472 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3473 c_fully_fold first.
3474
a27d595d
JM
34752012-09-14 Joseph Myers <joseph@codesourcery.com>
3476
3477 PR c/54103
3478 * c-typeck.c (build_unary_op): Pass original argument of
3479 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3480 any C_MAYBE_CONST_EXPR, if it has integer operands.
3481 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3482 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3483 to c_objc_common_truthvalue_conversion, then remove any
3484 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3485 c_objc_common_truthvalue_conversion not
3486 c_common_truthvalue_conversion.
3487 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3488 call note_integer_operands for arguments with integer operands
3489 that are not integer constants.
3490
9feb29df
JJ
34912012-09-13 Jakub Jelinek <jakub@redhat.com>
3492
3493 PR c/54559
3494 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3495 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3496
d409320c
JJ
34972012-08-31 Jakub Jelinek <jakub@redhat.com>
3498
3499 PR c/54428
3500 * c-convert.c (convert): Don't call fold_convert_loc if
3501 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3502 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3503 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3504
6265d07c
JJ
35052012-08-24 Jakub Jelinek <jakub@redhat.com>
3506
3507 PR c/54355
3508 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3509 for nested and empty_ok arguments in the call to
3510 c_parser_declaration_or_fndef.
3511
1a4049e7
JJ
35122012-08-17 Jakub Jelinek <jakub@redhat.com>
3513
3514 * c-tree.h (c_last_sizeof_arg): Declare.
3515 * c-parser.c (struct c_tree_loc_pair): New type.
3516 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3517 non-NULL.
3518 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3519 (c_parser_postfix_expression_after_primary): Likewise. Call
3520 sizeof_pointer_memaccess_warning if needed.
3521 (sizeof_ptr_memacc_comptypes): New function.
3522 * c-typeck.c (c_last_sizeof_arg): New global variable.
3523 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3524
0229aee9
UB
35252012-07-24 Uros Bizjak <ubizjak@gmail.com>
3526
3527 * c-lang.h (lang_decl): Add variable_size GTY option.
3528
7ee2468b
SB
35292012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3530
3531 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3532 * Make-lang.in: Fix dependencies.
3533
d4a10d0a
SB
35342012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3535
3536 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3537 and add language Makefile hooks.
3538 * config-lang.in: New file.
3539 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3540 add the required "normal" config-lang.in rules.
3541 * c-lang.h: Moved from gcc/ to here.
3542 * c-tree.h: Likewise.
3543 * c-objc-common.c: Likewise.
3544 * c-objc-common.h: Likewise.
3545 * c-typeck.c: Likewise.
3546 * c-convert.c: Likewise.
3547 * c-lang.c: Likewise.
3548 * c-aux-info.c: Likewise.
3549 * c-errors.c: Likewise.
3550 * gccspec.c: Likewise.
3551 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3552 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3553\f
818ab71a 3554Copyright (C) 2012-2016 Free Software Foundation, Inc.
d4a10d0a
SB
3555
3556Copying and distribution of this file, with or without modification,
3557are permitted in any medium without royalty provided the copyright
3558notice and this notice are preserved.